Metraipolis › archive › dc_60b9dcd06034
CASHEWS: Source Preprocessor for LLM-based Malicious Package Detection — arXiv:2609.18862
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.18862
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-15T14:31:43.533Z
- SHA-256 of the archived text
3a7fc2502cfbb5712c34c3b4ba2e8885a0ebaec0b2a2a1aebf5d6fc9cc4a8652- Stable URL of this page
https://metraipolis.com/documento/dc_60b9dcd06034
How to cite
CASHEWS: Source Preprocessor for LLM-based Malicious Package Detection — arXiv:2609.18862 — arXiv (en), https://arxiv.org/abs/2609.18862 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_60b9dcd06034 (Metraipolis archive dc_60b9dcd06034, sha256 3a7fc2502cfbb5712c34c3b4ba2e8885a0ebaec0b2a2a1aebf5d6fc9cc4a8652)
BibTeX
@misc{dc60b9dcd06034,
title = {CASHEWS: Source Preprocessor for LLM-based Malicious Package Detection — arXiv:2609.18862},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.18862},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_60b9dcd06034; sha256 3a7fc2502cfbb5712c34c3b4ba2e8885a0ebaec0b2a2a1aebf5d6fc9cc4a8652},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.18862. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Malicious npm package detection tools now leverage LLMs' semantic understanding of source code to detect malicious intent at scale. This capability has proven invaluable in identifying packages involved in recent supply-chain attacks such as Shai-Hulud. However, threat actors exploit the limited context windows of LLMs through JavaScript techniques such as code obfuscation that yields high token density and bundling malicious code with benign packages, causing detectors to skip large files or miss malicious behavior. This creates an attack surface for evading detection. In this paper, we present CASHEWS, a JavaScript preprocessor that reduces file size by rewriting source code to remove code that is irrelevant to analysis or likely to mislead the model. Given a package source file, CASHEWS deobfuscates it through iterative decoding, extracts bundled modules and dynamically executed code, identifies malicious sinks and computes backward slices that reach them, and abbreviates long literals and identifiers to produce a compact representation for the detector. Across 512 large package files, two scanner types, and three LLMs, CASHEWS increases analysis coverage from 69.1--85.7% to 98.8--100% and reduces the false-negative rate by up to 18.6 percentage points. CASHEWS also has a median preprocessing time of 30 seconds while reducing net analysis cost by 34.6%, making registry-wide LLM-based analysis more practical. By preprocessing source code before analysis, CASHEWS enables researchers and industry practitioners to use more powerful models for malicious package detection at the same or lower analysis cost as less powerful models. Tema degli esploratori: fiducia digitale e crittografia (retro-catalogo arXiv: annunci del 2026-09-17 in cs.CR). Categorie arXiv: Cryptography and Security (cs.CR). Pagina del lavoro: https://arxiv.org/abs/2609.18862 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-15T13:56:52.869Z dalla pagina https://arxiv.org/catchup/cs.CR/2026-09-17?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).