Back to skill

Security audit

git

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Git command reference skill; it includes some risky Git operations, but they are visible, purpose-aligned, and not hidden or automatic.

Install only if you want a Git command cheat sheet available to your agent. Before using commands like reset --hard, clean -fd, branch -D, rebase, or push, verify the current repository, branch, and uncommitted changes, and prefer preview or backup steps where possible.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (2)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The skill explicitly includes a destructive command, git reset --hard HEAD~1, which can irreversibly discard local changes and rewrite repository state if executed without safeguards. In a skill meant to help users run commands quickly, presenting this command inline increases the chance of accidental destructive use, especially by less experienced users or when an agent auto-suggests or auto-runs commands.

Content

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

md
# 回退提交
git reset --soft HEAD~1  # 保留更改在暂存区
git reset --mixed HEAD~1 # 保留更改在工作区(默认)
git reset --hard HEAD~1  # 完全删除更改

# 创建反向提交
git revert <commit>      # 安全撤销指定提交

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

L003 中将“提交、推送、拉取、分支、合并”等常见词直接作为触发词,但未限定必须处于 Git 上下文,也没有给出排除条件。这些词在日常工作交流中也很常见,容易与非 Git 请求发生语义重叠,造成误触发。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.