Back to skill

Security audit

Git Essentials

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Git command reference skill with some risky Git examples that users should run carefully, but it shows no hidden execution, exfiltration, or deceptive behavior.

Install only if you want a Git command reference available to your agent. Before using commands that discard work, remove untracked files, rewrite history, alter remotes, or change global Git config, confirm the repository, inspect status and diffs, and prefer reversible commands such as revert or dry-run cleanup when 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
  • 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 (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% 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 136)May include surrounding context.

md
git pull --rebase

# Push changes
git push

# Push new branch
git push -u origin branch-name

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

git reset --hard HEAD~1 is a destructive command that immediately discards changes and moves the branch pointer, which can lead to irreversible loss of local work if used incorrectly. In an agent skill, presenting it as a direct 'undo' operation without strong guardrails makes accidental misuse more likely, especially for less experienced users or automated assistants generating shell steps.

Content

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

md
git reset --soft HEAD~1

# Undo last commit (discard changes)
git reset --hard HEAD~1

# Revert commit (create new commit)
git revert commit-hash

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

git reset --hard commit-hash can discard all working tree and index changes and reset the branch to an arbitrary prior state, making it highly destructive if the wrong commit is chosen. In this skill, it is documented as a normal reset operation without explicit recovery caveats, which is risky in a reusable agent-facing command reference.

Content

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

git revert commit-hash

Reset to specific commit

git reset --hard commit-hash

text

## Stashing

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

git clean -fdx removes untracked files, directories, and ignored files, which often includes local environment files, generated assets, and other non-recoverable content. Because ignored files are commonly excluded precisely to protect local-only state, exposing this command in a concise recipe without an explicit danger banner creates substantial accidental-deletion risk.

Content

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

git clean -fd

Include ignored files

git clean -fdx

text

## Common Workflows

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents destructive Git history-rewriting commands such as git reset --hard without consistently and explicitly warning that they can permanently discard uncommitted work or rewrite repository state. In a general-purpose agent skill, an automated consumer may surface or execute these commands without the contextual caution a human tutorial would normally provide, increasing the chance of unintended data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cleanup section includes git clean -f, git clean -fd, and especially git clean -fdx, which irreversibly remove untracked files and ignored files, but it only provides a preview command and not a strong warning about deletion risk. In an agent skill context, these examples may be copied or automated directly, causing accidental loss of local files outside normal versioned recovery paths.

Content

No source excerpt is available for this finding.