Back to skill

Security audit

Code Review

Security checks for vulnerabilities and agentic risk

Overview

The skill is a mostly coherent code-review helper, but it can commit and push repository changes without clear final user confirmation or safe staging.

Install only if you are comfortable with a review skill that may inspect PRs and CI state via GitHub CLI. Before letting it fix CI failures, require it to show the exact diff, stage only intended files, verify branch and remote, scan for secrets, and ask before any commit or push.

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

Error
Location
SKILL.md:88
Finding

Unrestricted Git Staging and Remote Publication

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:88-93
Vulnerability Type: Unsafe repository modification and remote publication
Risk Level: High

Vulnerable Code

bash
git add .
git commit -m "fix: resolve CI failures"
git push

Technical Analysis

The Skill directs the Agent to stage every changed and untracked file in the working tree with git add ., create a commit, and publish it to the configured remote repository.

This behavior exceeds the minimum privileges required for the declared code-review functionality. The workflow does not require:

  • Explicit user authorization before committing or pushing
  • An allowlist of files intentionally modified during remediation
  • Review of the staged diff
  • Secret or credential scanning
  • Verification of the destination remote and branch
  • Confirmation immediately before remote publication

Because git add . operates on the entire working tree, it can include unrelated source changes, local configuration files, credentials, generated artifacts, or proprietary data that happen to be present. The subsequent git push transmits the resulting commit over the network.

No evidence indicates deliberate exfiltration or a malicious payload; however, the unsafe publication workflow creates a practical disclosure and integrity risk.

Attack Path

  1. A repository contains an unrelated changed or untracked file, such as a local configuration file containing a credential.
  2. The Agent invokes the Skill while handling a failed CI check on an Agent-owned pull request.
  3. The Agent applies a repair and follows the documented publication workflow.
  4. git add . stages both the intended repair and the unrelated sensitive file.
  5. The Agent creates a commit without reviewing the complete staged file set.
  6. git push publishes the commit to the configured remote repository.
  7. Anyone with access to that repository may retrieve the unintentionally committed information, and the data may remain a ...[truncated 933 chars]
Remediation
View remediation

Remediation Suggestions

  1. Keep code-review operation read-only by default. Do not modify, commit, or push unless the user explicitly requests remediation and publication.
  2. Replace git add . with explicit staging of only the reviewed files, for example:
    bash
    git add -- path/to/reviewed-file
    
  3. Display and inspect the staged changes before committing:
    bash
    git diff --cached --name-status
    git diff --cached
    
  4. Run an appropriate secret scanner against the staged content and stop if credentials or sensitive files are detected.
  5. Verify the active branch and destination remote before publication:
    bash
    git branch --show-current
    git remote -v
    
  6. Require explicit user confirmation after presenting the exact staged diff, destination remote, and branch.
  7. Do not push automatically. Provide the proposed command to the user or require a separate, clearly authorized publication step.
  8. Respect branch-protection rules and prefer creating a dedicated remediation branch rather than directly modifying a protected or shared branch.
  9. If sensitive information has already been published, revoke and rotate affected credentials, remove the data from Git history using an appropriate history-rewriting procedure, and coordinate repository cleanup with administrators.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation phrases are broad enough to match common, generic requests like 'review this' or 'check the code,' which can cause the skill to trigger in contexts the user did not explicitly intend. Because this skill directs use of repository and GitHub CLI commands, overbroad activation increases the chance of unnecessary repository inspection or command-oriented behavior during normal conversation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description and invocation guidance are written entirely in Japanese and imply the skill is intended to operate in Japanese, but there is no opt-in or alternative language guidance. Under the language/locale policy, a skill should not force a specific language unless it offers user choice or clearly documents a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents the skill content and review examples entirely in Japanese, beginning with the top-level description, without indicating that the user may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide states its instructions entirely in Japanese and explicitly begins with Japanese prose, but does not indicate that the language is optional, user-selectable, or required for a specific regional purpose. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

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