detecting-malicious-npm-packages
Pass
Audited by Gen Agent Trust Hub on Aug 3, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The helper script
scripts/agent.pyusessubprocess.runto wrap CLI calls tonpmandguarddog. These calls use list-based arguments to avoid shell injection and are used strictly for metadata retrieval and heuristic scanning. - [EXTERNAL_DOWNLOADS]: The workflow downloads package tarballs from the official npm registry using
urllib.request.urlretrievefor the purpose of static analysis. These downloads target a well-known service and are part of the skill's primary defensive purpose. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted external data from npm packages. It mitigates potential risks by using regex-based extraction for inspection and implementing path validation during the extraction of tarball members to prevent directory traversal.
Audit Metadata