husky-test-coverage

Warn

Audited by Gen Agent Trust Hub on Oct 7, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSDYNAMIC_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/setup-husky-coverage.py uses subprocess.run() to execute shell commands for package management (e.g., npm install, bun add) and tool initialization (e.g., npx husky install). These commands are executed with arguments derived from the project environment.
  • [EXTERNAL_DOWNLOADS]: The skill triggers the download and installation of external Node.js packages, such as husky and @vitest/coverage-v8, from public registries if it detects they are missing from the target project.
  • [DYNAMIC_EXECUTION]: The skill dynamically constructs a shell script for the Git pre-commit hook (.husky/pre-commit) by interpolating test runner commands into a template. This generated script is then written to the local file system.
  • [PRIVILEGE_ESCALATION]: The Python script scripts/setup-husky-coverage.py uses Path.chmod(0o755) to grant execution permissions to the newly created pre-commit hook file, modifying the system's security posture for that file.
  • [INDIRECT_PROMPT_INJECTION]: The skill ingests data from local project files to determine its execution logic, creating a surface where malicious configuration files could influence the agent's actions.
  • Ingestion points: Reads package.json and .husky-test-coverage.json in scripts/setup-husky-coverage.py to detect dependencies and thresholds.
  • Boundary markers: None identified; the script trusts the structure and content of the project files it reads.
  • Capability inventory: The script possesses file-write capabilities, permission modification (chmod), and arbitrary command execution via subprocess.run across its logic.
  • Sanitization: Employs standard JSON parsing but lacks strict validation or escaping for script names or test commands extracted from package.json before they are placed in the hook script.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Oct 7, 2026, 04:47 PM