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.py uses subprocess.run to wrap CLI calls to npm and guarddog. 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.urlretrieve for 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
Risk Level
SAFE
Analyzed
Aug 3, 2026, 09:25 AM
Security Audit — agent-trust-hub — detecting-malicious-npm-packages