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.pyusessubprocess.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
huskyand@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.pyusesPath.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.jsonand.husky-test-coverage.jsoninscripts/setup-husky-coverage.pyto 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 viasubprocess.runacross its logic. - Sanitization: Employs standard JSON parsing but lacks strict validation or escaping for script names or test commands extracted from
package.jsonbefore they are placed in the hook script.
Audit Metadata