Back to skill

Security audit

Vibe Coding Best Practices v3.0

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a development guide, but it includes instructions that could persistently auto-push future Git commits and risky rollback commands without enough safeguards.

Review this skill before installing if you might follow its emergency procedures. Do not install the suggested post-commit auto-push hook unless you intentionally want persistent automatic pushes, have verified the remote, and know how to remove the hook. Treat git reset --hard and git checkout . as last-resort commands only after checking status, saving a backup branch or stash, and confirming what will be lost. Use pinned local project tools for the npx verification examples where possible.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T06 · System Persistence

Error
Location
references/04-emergency.md:120
Finding

Persistent Git Hook Automatically Pushes Repository Content

Content
View full analysis
/dev/null || true' > .git/hooks/post-commit chmod +x .git/hooks/post-commit ``` ### Technical Analysis The documented command creates an executable Git `post-commit` hook. The hook persists in the repository metadata after the current skill or agent session ends and runs automatically after every subsequent commit. Each invocation pushes the current branch to the repository's configured `origin`. The command redirects standard error and uses `|| true`, concealing transmission failures and making the behavior less visible to the user. Although the destination is not hard-coded and the stated purpose is recovery, the mechanism creates persistent automated behavior and initiates network transmission without requiring confirmation for each push. If the remote is incorrectly configured, compromised, or later changed, repository content could be sent to an unintended destination. ### Attack Path 1. A user or agent follows the disaster-recovery instructions. 2. The command writes an executable hook to `.git/hooks/post-commit`. 3. The hook remains active across future sessions. 4. A developer creates a later commit containing source code, configuration, or accidentally committed credentials. 5. Git automatically invokes the hook. 6. The hook pushes the current branch to the configured `origin` without a separate confirmation. 7. If `origin` is controlled by an unauthorized party, the committed data is disclosed to that party. ### Impact Assessment The hook executes with the privileges of the user performing the commit and inherits that user's Git credentials and network access. It does not independently elevate system privileges, but it can use existing re ...[truncated 271 chars]
Remediation
View remediation
/dev/null || true`; preserve errors so users can detect unexpected behavior. - Restrict automated pushes to a dedicated backup remote and protected branch rather than implicitly trusting `origin`. - Provide a cleanup command for existing installations: ```bash rm -f .git/hooks/post-commit ``` ]]>

T08 · Insecure Dependencies

Warning
Location
references/05-security-qa.md:99
Finding

Unpinned npx Commands May Retrieve and Execute Third-Party Packages

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/04-emergency.md:19
Finding

Destructive Git Recovery Commands Lack Mandatory Safeguards

Content
View full analysis
``` ```bash # Golden rule: commit immediately after completing each feature git checkout -b feature/xxx # ... implement Step 1 ... git add -A && git commit -m "feat: step 1" # ... if something goes wrong ... git reset --hard HEAD~1 ``` ### Technical Analysis The recovery instructions recommend `git checkout .` and `git reset --hard` without consistently requiring a clean-working-tree check, backup branch, complete stash including untracked files, preview, or explicit human confirmation. `git checkout .` discards tracked working-tree modifications. `git reset --hard ` changes the branch position and makes the index and working tree match the selected commit, discarding tracked local changes. `git reset --hard HEAD~1` additionally removes the latest commit from the current branch reference. Some removed commits may remain temporarily recoverable through the reflog, but recovery is not guaranteed indefinitely. Uncommitted tracked changes discarded by these operations may not be recoverable through Git at all. ### Attack Path 1. An agent observes repeated failures and selects the documented rollback procedure. 2. The repository contains valuable uncommitted changes or commits that have not been backed up. 3. The agent runs `git checkout .` or `git reset --hard` without first reviewing repository state. 4. Git overwrites tracked working-tree content an ...[truncated 744 chars]
Remediation
View remediation
` for committed changes when preserving repository history is appropriate. - Show the exact commits and files affected before rollback. - Document immediate reflog recovery procedures, while making clear that reflog availability is temporary and is not a substitute for backups. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (22)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 59)May include surrounding context.

md
|------|------|
| 单个错误,信息清晰 | 粘贴完整 stack trace → AI 修 |
| 来回改同一文件 3+ 次 | 🛑 停!`git stash` → 换模型/策略 |
| 多处报错,越修越乱 | `git reset --hard <stable>` → 重新 Plan |
| AI 重复/遗忘/答非所问 | 关 session → LOG.md → 新 session 接力 |

### 安全红线

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guidance includes git reset --hard <stable-commit> as a recovery step without a prominent warning that it rewrites HEAD and permanently discards uncommitted changes. Because this file is positioned as an emergency SOP, readers may execute it immediately, making accidental destruction of work highly plausible.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

git reset --hard is a destructive command and, in instructional content, qualifies as tool-parameter abuse risk because it encourages irreversible repository state changes with minimal safeguards. In this emergency-repair context, the chance of unreviewed copy-paste execution is elevated, so misuse could wipe in-progress work or recovery evidence.

Content

Scanner excerpt · references/04-emergency.md (reported line 30)May include surrounding context.

🔴 架构崩塌

bash
git log --oneline -20
git reset --hard <stable-commit>

更新 DESIGN.md → 重新 Plan

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Presenting git reset --hard HEAD~1 in a section titled 'Git 是你的安全网' is risky because it normalizes a destructive rollback command without clearly stating that local changes and commit history position will be irreversibly altered. Users may interpret it as a safe default and lose work they intended to preserve.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Using git reset --hard HEAD~1 as a routine example promotes a highly destructive command that can erase local modifications and complicate recovery if the user misunderstands repository state. The context makes this more dangerous because the file frames it as normal troubleshooting behavior rather than an exceptional last-resort operation.

Content

Scanner excerpt · references/04-emergency.md (reported line 60)May include surrounding context.

... 实现 Step 1 ...

git add -A && git commit -m "feat: step 1"

... 出问题 ...

git reset --hard HEAD~1 # 只回退 Step 2

text

> **Note**: git 命令在 Bash 和 PowerShell 中语法基本一致(`git add -A; git commit ...`)。PowerShell 5.x 不支持 `&&`,用 `;` 代替即可。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/01-quickstart.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/02-single-agent.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/03-multi-agent.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/04-emergency.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/05-security-qa.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/06-tools.md (reported line 1)May include surrounding context.

md
# 06 — 工具推荐

> ⚠️ 以下信息截至 2026-02,工具能力和 API 可能已更新,请以官方文档为准。

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description lists triggers such as "AI 开发", "agent 协作", "新项目启动", "故障处理", and "代码验收", which are high-level concepts rather than narrowly scoped invocation phrases. These broad terms make it unclear when the skill should activate versus when a user is merely discussing routine software work, increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file title and all instructional content are presented in Chinese, and the templates implicitly prescribe that interaction and project guidance occur in that language. Under the policy, forcing a specific language without explicit user choice or documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file is natural-language guidance and all substantive instructions are presented only in Chinese. Under the policy rule, forcing a specific language without offering the user a language or locale choice is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill guidance, role templates, and workflow instructions are written only in Chinese, with no note that users may choose another language or that the skill is intended solely for a Chinese-language environment. Under the policy, a skill that effectively imposes a specific language without opt-in should be flagged.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document instructs users to run git stash or git checkout . during recovery without clearly warning that these commands can discard or obscure local work if used incorrectly. In an emergency-recovery skill, users are especially likely to copy commands verbatim under stress, increasing the chance of unintended data loss.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill reference is written in Chinese and includes embedded prompts and operational guidance only in Chinese. Under the stated policy, a language-specific constraint should either be optional for the user or clearly documented as a justified region-specific requirement, which is not present here.

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.

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.

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.

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.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese and does not indicate that other languages are available. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.