Back to skill

Security audit

Git Engineering & Repository Strategy

Security checks for vulnerabilities and agentic risk

Overview

This is a Git workflow guidance skill with some powerful commands users should review carefully, but I found no hidden or malicious behavior.

Install this if you want Git workflow and repository strategy guidance. Before applying its examples, review any global Git config, hook, force-push, history-rewrite, or reset command, and prefer pinned local dev dependencies or package scripts instead of npx commands that can download tools dynamically.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:930
Finding
Unpinned npx Commands May Retrieve and Execute Mutable Third-Party Packages<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:930-940` and `SKILL.md:980` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml run: npx eslint {staged_files} run: npx prettier --check {staged_files} run: npx commitlint --edit {1} ``` ```yaml command: "npx conventional-changelog -p angular -i CHANGELOG.md -s" ``` ### Technical Analysis The Skill recommends invoking development tools through `npx` without requiring locally installed, lockfile-controlled versions. If a requested package is not available in the local dependency tree, `npx` may retrieve it from the configured package registry and execute it. This creates a mutable supply-chain execution path: the code executed at runtime is not necessarily the code that was present or reviewed when the configuration was generated. The commands also lack `--no-install`, exact package versions, registry restrictions, integrity verification, or an explicit prerequisite to install dependencies using a frozen lockfile. The affected commands are proposed for Git hooks and changelog generation. Git hooks run in a developer's repository context, while equivalent CI tasks may execute with access to source code, environment variables, package registry credentials, release tokens, or other CI secrets. No evidence shows that the named packages are currently malicious. The vulnerability is the unsafe dependency execution pattern and its exposure to registry compromise, dependency confusion, package substitution, or an unexpectedly compromised future release. ### Attack Path 1. A user copies the recommended hook or changelog configuration into a repository. 2. One of the referenced packages is absent from the local dependency tree, or the execution environment does not contain installed project dependencies. 3. The hook or release command invokes `npx`. 4. `npx` resolves and downloads a package from the configured registry. 5. A compromis ...[truncated 1129 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Declare each tool as an exact or tightly constrained development dependency in the repository: ```bash npm install --save-dev --save-exact eslint prettier @commitlint/cli conventional-changelog-cli ``` 2. Commit the generated lockfile and install dependencies in CI using a frozen, reproducible installation: ```bash npm ci ``` 3. Prevent `npx` from downloading missing packages: ```yaml run: npx --no-install eslint {staged_files} run: npx --no-install prettier --check {staged_files} run: npx --no-install commitlint --edit {1} ``` 4. Prefer explicit package scripts that resolve binaries from the project's installed dependency tree: ```json { "scripts": { "lint": "eslint .", "format:check": "prettier --check .", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" } } ``` 5. Configure CI to use an approved registry, disable unexpected lifecycle scripts where practical, and verify lockfile integrity. 6. Add dependency review, registry allowlisting, provenance verification, and automated vulnerability monitoring for build and release dependencies. 7. Update the Skill guidance to state explicitly that these commands must only run after a lockfile-backed installation and must fail rather than retrieve packages dynamically. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (10)

Credential Access

High
Category
Privilege Escalation
Content
# SSH signing (GitHub, simpler)
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true

# Verify signed commits
Confidence
90% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
gitignore_checklist:
  always_ignore:
    - "node_modules/ / venv/ / __pycache__/"
    - ".env / .env.local / .env.*.local"
    - "*.key / *.pem / *.p12"
    - ".DS_Store / Thumbs.db"
    - "*.log / logs/"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
gitignore_checklist:
  always_ignore:
    - "node_modules/ / venv/ / __pycache__/"
    - ".env / .env.local / .env.*.local"
    - "*.key / *.pem / *.p12"
    - ".DS_Store / Thumbs.db"
    - "*.log / logs/"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
| Problem | Command | Notes |
|---------|---------|-------|
| Undo last commit (keep changes) | `git reset --soft HEAD~1` | Staged, ready to recommit |
| Undo last commit (discard) | `git reset --hard HEAD~1` | ⚠️ Destructive |
| Find lost commit | `git reflog` | Reflog keeps 90 days |
| Recover deleted branch | `git reflog` → `git checkout -b branch <sha>` | Find the SHA in reflog |
| Remove file from all history | `git filter-repo --path file --invert-paths` | Requires force push |
Confidence
75% confidence
Finding
The skill includes a destructive command, `git reset --hard HEAD~1`, in a troubleshooting table. Although clearly labeled as destructive, broad skill triggering combined with recovery-oriented advice could lead an agent or user to apply this command in the wrong context, causing irreversible local data loss.

Vague Triggers

Medium
Confidence
85% confidence
Finding
The quick-start instruction uses a very broad natural-language trigger that could cause an agent to activate the skill in loosely related contexts without clear user consent or scope boundaries. While the README is otherwise operational guidance rather than overtly malicious prompt injection, unconstrained invocation phrases increase the chance of unintended use and inappropriate repository changes or recommendations.

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.

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.

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.

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.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The skill defines very broad natural-language triggers such as 'Fix git problem' and 'Help with git recovery' that overlap with ordinary user phrasing. In an agent environment, this can cause accidental invocation in contexts the user did not intend, increasing the chance that high-risk operational guidance is surfaced or acted on without sufficient confirmation.

Static analysis

No suspicious patterns detected.