Back to skill

Security audit

CR Automated

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a code review helper, but it can direct the agent to commit and push repository changes without enough safeguards.

Install only if you are comfortable with a review skill that may also repair CI failures. Before allowing it to make changes, require explicit approval, review `git status` and the staged diff, avoid `git add .`, and run any push command yourself or only after confirming the target branch and remote.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:97
Finding

Unscoped Staging and Autonomous Remote Repository Push

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:97-106
Vulnerability Type: Unsafe repository mutation and remote publication
Risk Level: Medium

Complete Code Snippet:

markdown
2. **修正を実施**:
   - エラーログを読み、根本原因を修正
   - 関連するテストケースも更新
   - ローカルで同じチェックを実行して検証

3. **再プッシュ**:
   ```bash
   git add .
   git commit -m "fix: resolve CI failures"
   git push
   ```

Technical Analysis

The Skill is declared as a code-review assistant, for which read access to source files, diffs, and CI results is normally sufficient. However, this workflow directs the Agent to modify the working tree, stage all unignored changes with git add ., create a commit, and push it to a remote repository.

git add . is not scoped to files intentionally changed while addressing the CI failure. It can include unrelated pre-existing changes, generated artifacts, local configuration, or accidentally created sensitive files. The workflow does not require the Agent to:

  • Obtain explicit user approval before modifying, committing, or pushing.
  • Restrict staging to specifically reviewed paths.
  • Inspect the staged diff before committing.
  • Scan staged files for credentials or other sensitive data.
  • Confirm the intended branch and remote destination.

The behavior is also reinforced by examples in examples.md:98-103 and examples.md:232-236. Although no malicious intent or credential-exfiltration endpoint was identified, the workflow creates an unsafe remote-publication path that exceeds the minimum privileges needed for code review.

Attack Path

  1. A user invokes the Skill to review an Agent-owned pull request.
  2. A CI check reports a failure.
  3. Following the Skill instructions, the Agent changes source code or tests.
  4. The working tree also contains unrelated or sensitive uncommitted files.
  5. The Agent executes git add ., staging all unignored changes rather than only the intended repair.

...[truncated 1019 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make the default workflow review-only. Produce findings or a proposed patch rather than directly modifying the repository.

  2. Require explicit user authorization before each consequential action:

    • Editing files.
    • Creating commits.
    • Pushing to a remote repository.
  3. Replace broad staging with an explicit allowlist:

    bash
    git add -- path/to/intentionally-modified-file
    
  4. Require staged-diff validation before committing:

    bash
    git diff --cached --name-status
    git diff --cached
    
  5. Run a secret scanner against staged content and abort if credentials, tokens, private keys, or sensitive configuration are detected.

  6. Verify the target branch and remote with git status, git branch --show-current, and git remote -v.

  7. Never push automatically. Present the commit hash and proposed push command to the user unless remote publication was expressly authorized.

  8. Update the corresponding examples in examples.md so they demonstrate scoped staging, approval gates, and staged-diff inspection.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match common requests like 'review this' or 'check quality,' increasing the chance the skill activates in contexts the user did not intend. When combined with repository and CI command usage, overbroad activation increases the risk of unnecessary inspection or accidental operational actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description and operational instructions are written entirely in Japanese and explicitly define invocation phrases in Japanese, with no indication that other languages are supported or that the user can opt into Japanese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a code review helper, but its instructions expand into making code changes, committing, and pushing for the user's own PR. That broadens the skill from analysis into repository modification, which can cause unintended source changes or remote actions under the guise of a review workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Including git commit and git push in a code-review skill gives it remote modification capability that is not necessary for review. If triggered inappropriately, the skill could alter repository state and publish changes without a clearly separated authorization boundary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file contains user-facing instructional content exclusively in Japanese, and there is no indication that the skill is region-specific or that users can opt into this language. Under the language/locale policy, forcing a specific language without user choice 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 guide states its instructions in Japanese and does not indicate that users may choose another language or that the skill is intentionally restricted to a Japanese-speaking context. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
reference.md:418