Stubbifier: Debloating Dynamic Server-Side JavaScript Applications
Alexi Turcotte, Ellen Arteca, Ashish Mishra, Saba Alimadadi, Frank Tip

TL;DR
Stubbifier is an automatic tool that reduces server-side JavaScript application size by removing unused code through static and dynamic analysis, while maintaining functionality and security.
Contribution
It introduces a novel approach combining static and dynamic call graphs to identify unused code in JavaScript, supporting on-demand code fetching and security guarding.
Findings
Reduced application size by 56% on average
Achieved 37% size reduction in bundled distributions
Guarded mode prevented known injection vulnerabilities
Abstract
JavaScript is an increasingly popular language for server-side development, thanks in part to the Node.js runtime environment and its vast ecosystem of modules. With the Node.js package manager npm, users are able to easily include external modules as dependencies in their projects. However, npm installs modules with all of their functionality, even if only a fraction is needed, which causes an undue increase in code size. Eliminating this unused functionality from distributions is desirable, but the sound analysis required to find unused code is difficult due to JavaScript's extreme dynamicity. We present a fully automatic technique that identifies unused code by constructing static or dynamic call graphs from the application's tests, and replacing code deemed unreachable with either file- or function-level stubs. If a stub is called, it will fetch and execute the original code…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Web Application Security Vulnerabilities · Advanced Malware Detection Techniques
