Security checks for vulnerabilities and agentic risk
Overview
The skill is a Git commit/push helper, but it tells the agent to automatically stage and commit existing changes despite also claiming every Git action requires user approval.
Review this skill carefully before installing. It should not be used unless you are comfortable with an agent managing Git operations, and the automatic commit step should be removed or changed to require explicit approval of exact files before any staging or commit.
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:14
Finding
Automatic Bulk Commit Bypasses Explicit Approval and Pre-Commit Security Checks
Content
View full analysis
Vulnerability Details
File Location: SKILL.md, lines 14–16 and 40–49 Vulnerability Type: Unsafe automatic Git staging and commit workflow Risk Level: Medium
Vulnerable Code
markdown
**NEVER automatically commit or push code without explicit user approval.**
All Git operations require user confirmation at each step.
markdown
### Step 1: Auto-Commit Existing Changes
Before making any code modifications, automatically commit existing uncommitted changes:
```bash
# Check for uncommitted changes
git status
# If changes exist, commit them
git add .
git commit -m "chore: 保存当前工作进度"
text
### Technical Analysis
The workflow contradicts its stated authorization boundary. Lines 14–16 require explicit user approval for every Git operation, but lines 40–49 instruct the agent to stage and commit existing changes automatically.
The use of `git add .` indiscriminately stages modified and untracked files beneath the current working directory. This operation occurs before the later file-size and sensitive-data checks described elsewhere in the skill. Those checks are also documentation-only and have no concrete implementation in the included script.
Consequently, unrelated work, generated artifacts, local configuration files, credentials, tokens, private keys, or other sensitive content could be recorded in Git history before the user reviews the affected files or authorizes the commit.
### Attack Path
1. A repository contains uncommitted files, including an unintended or sensitive file.
2. The user invokes the skill for a code modification, commit, or push workflow.
3. The skill follows the automatic pre-modification workflow.
4. It runs `git status`, followed by `git add .`.
5. Every eligible change under the working directory is staged without an approved file list.
6. The skill creates a local commit without obtaining the explicit approval required by its own critical rules.
7. The sensitive or unrelated content becomes part of r
...[truncated 771 chars]
Remediation
View remediation
Remediation Suggestions
Remove the automatic commit instruction and require explicit user approval before every staging or commit operation.
Begin with a non-mutating inspection such as git status --short.
Display the exact candidate file list, proposed grouping, and commit message to the user before changing the index.
Run sensitive-data, file-type, and file-size checks before staging anything.
Stage only explicitly approved paths, for example:
bash
git add -- path/to/approved-file
Do not use git add . for an approval-based workflow.
Review the staged diff with:
bash
git diff --cached --stat
git diff --cached
Obtain final confirmation after showing the staged diff and before running git commit.
If any secret is detected, stop the workflow, remove it from the candidate changes, and advise the user to rotate the credential if it was previously committed.
Reconcile all workflow sections so the critical approval rules, decision tree, examples, and checklist consistently prohibit automatic commits.
There is a clear mismatch between the declared description and the actual code. The description claims substantial functionality around code review and Git submission workflows, but the provided script only prints a fixed example message and includes comments indicating it is a placeholder. It does not inspect code, interact with Git, run checks, verify builds, or provide workflow logic. This is a materially different primary purpose from what was declared.
Content
No source excerpt is available for this finding.
Intent-Code Divergence
High
Category
Not specified by scanner
Confidence
98% confidence
Finding
The skill says Git operations require explicit user confirmation, but later instructs automatically committing existing changes before approval. That contradiction can cause unintended persistence of sensitive, partial, or unrelated work into version history, violating user intent and potentially capturing secrets before review.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
High
Category
Not specified by scanner
Confidence
98% confidence
Finding
The file states "ALWAYS use Chinese for commit messages" and requires all commit messages to be written in Chinese. This forces a specific language without user opt-in or a documented region-specific justification, which violates the language/locale policy described in the audit rules.
Content
No source excerpt is available for this finding.
Vague Triggers
Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding
The trigger scope is so broad that merely mentioning push, commit, or generic Git submission operations could activate a workflow that proposes or performs repository actions in the wrong context. Overbroad activation increases the chance of unintended sensitive operations, especially in conversational environments where users may be discussing Git conceptually rather than requesting action.
Content
No source excerpt is available for this finding.
Intent-Code Divergence
Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding
The example interaction normalizes automatic execution of git pull and build steps without obtaining confirmation at each step, despite the stated requirement. In an agent context, examples often shape implementation behavior, so this inconsistency can lead to unauthorized repository changes, network actions, or merges the user did not intend.
Content
No source excerpt is available for this finding.
Vague Triggers
Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding
The workflow trigger "When user mentions push/commit/提交" lacks context checks and exclusion conditions, making accidental invocation likely. In a tool-using agent, ambiguous triggers can escalate harmless conversation into file staging, commits, pulls, or push preparation, increasing the risk of unintended code or secret exposure.