Back to skill

Security audit

Commit Message Validation

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent commit-message helper, but its included Git hook can run validator code from repository-controlled paths when commits are made.

Review the hook before installing it. The core SKILL.md guidance and standalone validator are ordinary commit-message tooling, but avoid copying the provided hook into .git/hooks unless it is changed to call a trusted, fixed validator path and fail closed when missing.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/commit-msg-hook.sh:8
Finding

Repository-Controlled Validator Allows Arbitrary Code Execution During Git Commits

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi ``` 4. If the validator must be loaded from another directory, canonicalize the path and verify that it remains under an administrator- or user-controlled trusted directory. 5. Pin and verify the validator's integrity with a trusted cryptographic digest or signed release before execution. 6. Ensure the trusted validator and its parent directories are not writable by untrusted users or modified through repository branch checkouts. 7. Add integration tests that install the hook in a temporary repository and verify that repository-provided validators are never selected. 8. Document the trust boundary and provide an installation script that atomically installs both the hook and its trusted validator. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill instructs the agent to run shell commands and inspect repository state (git status, git diff, and a Python validator), but it does not declare any explicit tool scope such as allowed tools or permissions. That creates an authorization gap where an orchestrator may permit broader command execution than intended, and shell/file access in a developer workflow can expose repository contents or enable unintended command use if the skill is invoked in the wrong context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation description is broad enough to match many routine development moments, including planning branches, reviewing PRs, staging changes, and finishing implementation units. Because the skill also directs shell and repository inspection actions, over-broad triggering can cause the agent to invoke this skill outside narrow commit-message assistance, unnecessarily expanding opportunities for repo inspection or command execution.

Content

No source excerpt is available for this finding.