Back to skill

Security audit

Contextual Git-Committer

Security checks for vulnerabilities and agentic risk

Overview

This commit-message skill does what it claims broadly, but it reads global shell history and sends that sensitive context into model-facing output without clear opt-in, scoping, or redaction.

Review before installing. This skill may include recent shell commands and staged source diffs in AI-facing output; shell history can contain tokens, passwords, internal paths, or private operational details. It should be changed to make history collection opt-in, scoped, previewed, and redacted before normal use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
handler.py:76
Finding

Unnecessary Collection and Disclosure of Global Shell History

Content
View full analysis
= count: break return list(reversed(unique)) ``` The collected history is subsequently included in model-facing output at `handler.py:178-182`: ```python if history: hist_lines = [] for cmd in history: hist_lines.append(f"- `{cmd}`") sections.append("### Recent Terminal History\n" + "\n".join(hist_lines)) ``` ### Technical Analysis The skill reads the user's complete `~/.bash_history` and `~/.zsh_history` files, even though only a small number of entries are eventually re ...[truncated 2231 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
handler.py:159
Finding

Indirect Prompt Injection Through Untrusted Repository and Shell Content

Content
View full analysis
8000: sections.append( "### Staged Diff (truncated)\n```\n" + diff_text[:8000] + "\n... (truncated)\n```" ) else: sections.append("### Staged Diff\n```\n" + diff_text + "\n```") # Recent terminal history if history: hist_lines = [] for cmd in history: hist_lines.append(f"- `{cmd}`") sections.append("### Recent Terminal History\n" + "\n".join(hist_lines)) # Recent commits for style reference if commits: commit_lines = [] for c in commits: commit_lines.append(f"- {c}") sections.append( "### Recent Commits (for style reference)\n" + "\n".join(commit_lines) ) ``` The corresponding model-processing instruction in `SKILL.md:35` is: ```markdown When the `suggest_commit` tool returns its output, use the gathered context to generate exactly **3 commit message options**: ``` ### Technical Analysis The handler directly concatenates several attacker-influenced values into Markdown intended for an AI model: - Staged diff contents - Function or hunk context extracted from the diff - Recent Git commit subjects - Shell-history commands - Filenames and other repository metadata elsewhere in the generated output These values are not escaped, structurally separated, or explicitly labeled as data that must never be interpreted as instructions. In particular, a staged file can contain triple backticks that terminate the generated Markdown code block. Text following the injected delimiter may then a ...[truncated 2673 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose understates the actual behavior: the skill reads shell history and gathers broader repository metadata, then returns that context to another AI component. Shell history can contain secrets, tokens, internal hostnames, and sensitive operational commands, so this mismatch can lead users to authorize or invoke the skill without understanding the breadth of data collection.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code silently reads and emits terminal history into the generated markdown without any warning, consent prompt, or review step. This creates a direct disclosure path for sensitive commands and embedded secrets to downstream AI systems or logs, where users may not realize their shell history is being exposed.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill gathers recent terminal history and formats it into plain-language output intended for an AI, creating a natural exfiltration channel for sensitive user commands and secret-bearing CLI arguments. Because shell history often contains unrelated and highly sensitive data, this behavior is especially dangerous in a commit assistant whose normal function does not justify such access.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The formatted output bundles full staged diffs together with recent terminal history, increasing the volume and sensitivity of data sent to the downstream model. In this skill context, that combination creates a broad natural-language leakage channel that can expose source code, credentials, and operational context beyond what is necessary to draft a commit message.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares and invokes a Python handler with shell and file-read capabilities but does not declare any tool scope or permissions boundaries. That creates an authorization gap where the agent may access repository data and local files without clear user consent or enforcement, increasing the chance of unintended data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill text says it correlates terminal history but provides no user-facing warning that recent shell commands may be read from local history files. Because terminal history frequently includes secrets or sensitive workflow details, omitting that warning undermines informed consent and makes accidental disclosure more likely.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · handler.py (reported line 14)May include surrounding context.

python
def run_git(*args):
    """Run a git command and return its stdout, or None on failure."""
    try:
        result = subprocess.run(
            ["git"] + list(args),
            capture_output=True,
            text=True,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description says it analyzes staged changes and workspace context, but the implementation also reads ~/.bash_history and ~/.zsh_history. This omission prevents informed user consent and hides a privacy-relevant data collection behavior that is unrelated enough to surprise most users.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Reading full shell history files is excessive for a commit-message assistant because those files may contain secrets, tokens, internal hostnames, operational commands, or unrelated private activity. The skill context makes this more dangerous, not less, because commit generation does not require broad access to a user's command history to function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The tool prints the full staged diff for AI consumption, which may include proprietary code, credentials, or sensitive data accidentally staged in files. Although exposing staged changes is more aligned with the tool's purpose than shell-history scraping, failing to warn users or provide review controls still creates a meaningful data-leak risk.

Content

No source excerpt is available for this finding.