Back to skill

Security audit

Git命令行

Security checks across malware telemetry and agentic risk

Overview

This Git helper is mostly what it claims to be, but it presents high-impact Git commands as normal guidance without enough scoping or safeguards.

Install only if you are comfortable with an agent surfacing and potentially executing Git commands. Treat force pushes, branch deletion, and reset --hard as manual-only operations that require explicit review of the current branch, remote, status, and recoverability before running them.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The skill is framed as a Git CLI helper, but the runtime section introduces generic LLM/API-key setup that is not necessary for local Git operations. This expands the operational scope and may prompt users to expose or manage secrets in contexts unrelated to the stated functionality, increasing confusion and the chance of credential mishandling.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The document claims that only whitelisted commands are executed, but it does not define the whitelist or describe any enforcement mechanism. This creates a false sense of safety around command execution, which is particularly risky because the skill has exec capability and includes potentially destructive Git operations.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The activation guidance is overly broad and matches many generic development, debugging, and deployment requests rather than narrowly scoped Git tasks. In an agent setting, this can cause the skill to be invoked in situations where exec/write permissions are unnecessary, increasing the attack surface and the chance of unsafe command execution.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The branching section includes force deletion of unmerged branches without a prominent warning about irreversible loss of work. In a skill with execution capability, presenting destructive commands as routine examples can lead users or agents to perform data-loss actions without adequate review.

Missing User Warnings

High
Confidence
98% confidence
Finding
The FAQ recommends `git reset --hard HEAD~1` as a rollback mechanism and only notes data loss in a terse table entry, without a strong safety warning or safer alternatives. This is dangerous because it irreversibly discards local changes and recent history, and an agent may surface or execute it as a standard fix.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
git fetch origin
git fetch --all --prune  # 获取所有远程并清理已删除的分支
# 推送
git push origin feature/branch
git push -u origin feature/branch  # 设置上游跟踪
git push --force-with-lease origin main  # 安全强制推送(推荐)
# 注意:避免使用 git push --force,它会覆盖远程历史
Confidence
97% confidence
Finding
The skill includes direct push commands, including `git push --force-with-lease origin main`, which can rewrite remote history on a critical branch. In the context of an agent with exec access, this is especially dangerous because it can alter shared repositories, disrupt collaborators, and propagate mistakes beyond the local environment.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
| 完成合并 | git commit |

### Q5: 如何在Git CLI中回退到上一个提交?
A: 使用 `git reset --hard HEAD~1` 命令可以回退到上一个提交。

| 命令 | 操作 |
|:-----|:-----|
Confidence
99% confidence
Finding
`git reset --hard` is a destructive command that discards working tree and index changes, and using it as a simple rollback example invites accidental irreversible loss. Because the skill can influence command execution, this documentation materially increases the risk of unsafe tool use.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
| 命令 | 操作 |
|:-----|:-----|
| git reset --hard HEAD~1 | 回退到上一个提交,丢失当前提交后的所有更改 |
Confidence
99% confidence
Finding
The table explicitly describes `git reset --hard HEAD~1` as losing all changes after the current commit, confirming the presence of a destructive operation in user-facing guidance. In a Git-assistance skill, this context makes the issue more dangerous because the operation is positioned as a normal answer to a common question rather than an emergency-only action.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

No suspicious patterns detected.