ai-code-stats
Fail
Audited by Gen Agent Trust Hub on Mar 14, 2026
Risk Level: HIGHCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
ai-code-stats.jsis vulnerable to shell command injection. It accepts user-provided arguments such ascommitHashandrangeand interpolates them directly into Git commands executed viachild_process.execSync. An attacker can execute arbitrary commands on the host machine by providing input containing shell metacharacters such as semicolons, backticks, or pipes.\n- [COMMAND_EXECUTION]: Evidence found inai-code-stats.jswhere theexecGitfunction is invoked with unsanitized template strings, includinggit show --numstat --format= ${target},git diff --numstat ${range}, andgit diff ${range} -- "${filePath}". These inputs are derived fromprocess.argvand are not validated or escaped before execution.
Recommendations
- AI detected serious security threats
Audit Metadata