Back to skill

Security audit

Commit Reviewer(提交修复检查)

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly purpose-aligned for commit review, but it can expose sensitive repository metadata and raw untrusted commit content without enough safeguards.

Review before installing if you work with private repositories. Prefer invoking it from an explicit repo path, make sure Git remotes do not contain tokens or passwords, and avoid using it on untrusted commits unless the consuming agent treats all emitted repository content as evidence only. Redacting remote URLs and author emails by default would materially reduce risk.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/collect_commit_context.sh:222
Finding

Authenticated Git Remote URL Disclosed in Generated Context

Content
View full analysis
/dev/null || echo unknown)" remote_url="$(git -C "$repo" remote get-url origin 2>/dev/null || echo none)" echo "=== REPOSITORY CONTEXT ===" echo "repo_root: $repo_root" echo "branch: $current_branch" echo "remote: $remote_url" ``` ### Technical Analysis The script retrieves the complete URL of the Git `origin` remote and places it directly into generated review context. Git remote URLs can contain URI user information, including usernames, access tokens, or passwords, such as: ```text https://username:token@example.com/private/repository.git ``` The code performs no redaction before printing the value. Consequently, embedded credentials and private repository information can be exposed to the AI agent, command logs, captured output, audit systems, or users who can view the generated context. The remote URL is not necessary to inspect the contents of a local commit, making this disclosure avoidable. ### Attack Path 1. A repository is configured with credentials embedded in its `origin` URL. 2. A user invokes the skill to inspect a commit in that repository. 3. The script executes `git remote get-url origin`. 4. The complete authenticated URL is printed as the `remote` field. 5. The credential becomes available in generated agent context, logs, or other downstream output. 6. Anyone with access to that output may extract the credential and use it according to its existing permissions and validity. ### Impact Assessment This issue does not directly grant elevated local privileges. Its impact depends on the credential embedded in the remote URL. A disclosed token or password could permit unauthor ...[truncated 320 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/collect_commit_context.sh:194
Finding

Untrusted Git Metadata and Patch Content Passed Directly into Agent Context

Content
View full analysis
date: %ad subject: %s' --date=local "$commit" ``` ### Technical Analysis Commit patches, author names, author email addresses, and commit subjects are attacker-controlled repository content. The script emits this material directly into the context consumed by an AI agent without establishing an explicit trust boundary or instructing the agent to treat repository content strictly as inert evidence. An attacker can place prompt-like instructions in source files, comments, strings, commit subjects, or author fields. When the commit is reviewed, those instructions become part of the agent context. A vulnerable downstream agent may interpret them as operational instructions rather than untrusted source material, potentially altering the review, suppressing findings, or causing unrelated tool actions. Raw control characters can also make terminal or log output misleading where the output consumer interprets such sequences. Patch truncation limits volume but does not prevent malicious instructions from appearing within the retained section. ### Attack Path 1. An attacker creates or contributes a commit to a repository that may be reviewed. 2. The attacker inserts instruction-like text or contr ...[truncated 1167 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill promises to determine whether commits truly fix a bug, but the described behavior and static finding indicate it only gathers and presents commit context while also scanning multiple repositories. This can mislead users into trusting an authoritative-sounding security or QA conclusion that was never actually performed, and the repository auto-discovery expands data exposure beyond the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README is entirely written in Chinese and presents the skill's interaction model, examples, and usage guidance only in that language. Under the policy, forcing a specific language without an explicit user choice or opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill's language style section explicitly requires '中文输出', which forces a specific language for all interactions. This is a natural-language policy concern because the file does not offer the user a language choice or indicate that Chinese is optional.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script prints the repository remote URL and full commit author identity, including email address, directly to output. In a commit-review skill, that output is likely to be forwarded to an LLM, logs, chat transcripts, or shared review artifacts, which can unintentionally leak private infrastructure details and personal data beyond the local machine.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's human-readable guidance and explanatory comments are written entirely in Chinese, which imposes a specific language on users without opt-in or justification. Under the policy, language constraints should either offer a choice or be clearly documented as intentionally region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.