Back to skill

Security audit

需求迭代工作流

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent planning workflow, but it can automatically change project files and create Git commits using broad staging that may include unintended files.

Review carefully before installing. Use it only in repositories where automated file edits and commits are acceptable, require the agent to show `git status` and staged diffs before committing, and replace `git add .` with explicit file paths for the current task. The artifact does not show exfiltration, hidden code execution, or system persistence, but its commit workflow needs user control.

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
templates/build-prompt.md:49
Finding

Unrestricted Git Staging May Commit Sensitive or Unrelated Files

Content
View full analysis

Vulnerability Details

File Location: templates/build-prompt.md:49-50
Vulnerability Type: Unrestricted repository-wide Git staging
Risk Level: Medium

Vulnerable Code

sh
git add .
git commit -m "[TASK_TITLE]: Complete [brief description]"

Technical Analysis

The build template directs the agent to execute git add ., which stages every modified or untracked file beneath the current working directory. It does not restrict staging to files intentionally changed for the selected task.

This behavior violates least-change principles and conflicts with the workflow's stated requirement to perform only one task per iteration. Before this command runs, unrelated user work, generated configuration, local environment files, credentials, or attacker-planted artifacts may be present in the working tree. All such files can be incorporated into the task's commit without an explicit review or allowlist.

The issue does not independently grant new operating-system privileges. Exploitation depends on the presence or creation of unintended files within the repository and on a later action that publishes or otherwise shares the resulting commit.

Attack Path

  1. A user, another process, or a malicious project task creates or modifies an unrelated file within the repository.
  2. The file contains sensitive information or content that should not be included in the current task, such as credentials, local configuration, private data, or attacker-controlled artifacts.
  3. During Phase 3, the agent follows the build template and executes git add ..
  4. Git stages both the intended task changes and the unrelated file.
  5. The agent creates a legitimate-looking task commit containing all staged content.
  6. If that commit is subsequently pushed, exported, reviewed, or shared, the unintended content is disclosed or introduced into the repository history.

Impact Assessment

The affected scope includes all modified and untracked files under the Gi ...[truncated 671 chars]

Remediation
View remediation

Remediation Suggestions

Replace repository-wide staging with an explicit review and allowlisted staging process:

  1. Inspect the working tree before staging:

    sh
    git status --short
    git diff -- .
    
  2. Stage only files intentionally modified for the current task:

    sh
    git add -- path/to/intended-file path/to/another-intended-file
    
  3. Review the staged patch before committing:

    sh
    git diff --cached
    git status --short
    
  4. Abort and request user confirmation if unexpected files or unrelated modifications are detected.

  5. Explicitly reject likely secret-bearing files, including .env files, private keys, credential exports, local configuration, and generated authentication data.

  6. Run an appropriate secret scanner against staged content before committing.

  7. Consider using git add -p where interactive review is available, and require each staged hunk to correspond to the current task.

  8. Update the template to prohibit git add ., git add -A, and equivalent unrestricted staging commands.

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrase set for Phase 1 includes broad natural-language terms like “讨论需求” and “帮我理清需求”, which can plausibly appear in ordinary conversation and unintentionally activate the workflow. In an agent skill, ambiguous activation can cause the agent to shift modes, create or modify project files, and steer the conversation into structured requirements capture without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and all listed trigger phrases are in Chinese, and the document does not state that the skill is intentionally limited to Chinese-speaking users or provide an opt-in language choice. This can violate language or locale policy where skills should not enforce a specific language without user choice or clear justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill describes a workflow that creates specs files, generates an implementation plan, updates that plan, and makes commits, but it does not clearly warn users up front that invoking the skill may modify project files and version history. Lack of disclosure can lead to uninformed consent and unsafe execution in repositories where automated writes or commits are sensitive operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrase "迭代" is overly generic and likely to appear in ordinary conversation about development process, which can cause accidental skill activation without clear user intent. In this skill’s context, unintended activation is more concerning because the workflow can lead to file creation, plan generation, and later code changes or commits.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt explicitly instructs the agent to run git add ., create a commit, and update IMPLEMENTATION_PLAN.md, which modifies repository state without any built-in requirement for explicit per-run user consent or a safety confirmation step. In an agent skill, this is risky because it can persist unintended changes, commit sensitive files, or create misleading history as part of an automated loop.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents the planning prompt and operational instructions entirely in Chinese, including imperative guidance for how the agent should behave. There is no opt-in, alternative language option, or justification that this skill is intended only for a Chinese-language or region-specific context, which creates a language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire interview template, including headings and prompt text, is written as mandatory Chinese-language phrasing for the skill's interaction flow. Because the file does not offer an alternative language, opt-in, or justification for a Chinese-only locale, it creates a natural-language policy concern under the language/locale rule.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The phrase "帮我理清需求" is broad and may describe normal assistance rather than an intentional request to start a structured workflow. This can cause mild confusion or unwanted workflow entry, though the impact is lower than the generic "迭代" trigger because it is still somewhat domain-specific.

Content

No source excerpt is available for this finding.