Back to skill

Security audit

Git Workflow

Security checks for vulnerabilities and agentic risk

Overview

This Git automation skill is purpose-aligned, but it tells agents to automatically stage, commit, and push repository changes without enough scoping or confirmation safeguards.

Install only if you are comfortable with an agent helping perform Git writes. Before use, require explicit repository selection, inspect `git status` and staged diffs, avoid `git add .` unless reviewed, and approve any `git push` as a separate step because pushing can publish secrets or unrelated files to a remote repository.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:48
Finding

Unreviewed Automatic Staging and Remote Publication

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:48-54, SKILL.md:74-80, and SKILL.md:85-92
Vulnerability Type: Unsafe Git staging and automatic remote publication
Risk Level: Medium

Vulnerable Code

The workflow stages every change beneath the repository working tree:

bash
git add .

It then commits and pushes the staged content:

bash
git commit -m "commit message"
git push

The documented example also treats completion of an analysis task as a trigger for adding, committing, and pushing generated files.

Technical Analysis

The use of git add . indiscriminately stages tracked modifications and untracked files within the applicable working tree. The documented workflow does not require:

  • Review of the staged diff or file list.
  • Explicit approval of each staged path.
  • Secret or credential scanning.
  • Verification of .gitignore coverage.
  • Validation of the repository root, active branch, or destination remote.
  • User confirmation immediately before git push.

Combining broad staging with automatic remote publication creates a data-exposure risk. Files unrelated to the requested task, including credentials, environment files, private reports, personal information, or attacker-created artifacts, could be included in a commit and transmitted to a configured remote.

This is especially significant because the skill advertises multi-repository operation and presents generic task completion as a possible trigger. An agent following these instructions could mutate and publish repository contents even when the user requested analysis rather than publication.

Attack Path

  1. A sensitive or attacker-controlled file is placed inside a repository working tree.
  2. The file is not excluded by .gitignore.
  3. An analysis or automation task completes, activating the documented automatic workflow.
  4. The agent executes git add ., staging the sensitive file togeth ...[truncated 1107 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace git add . with explicit staging of user-approved file paths, such as git add -- path/to/file.
  2. Require an explicit user request before creating a commit, and obtain separate confirmation immediately before pushing.
  3. Display and review the staged file list using git diff --cached --name-status.
  4. Review actual staged content using git diff --cached before committing.
  5. Run a secret scanner against staged content and block commits containing credentials, tokens, private keys, or high-confidence secrets.
  6. Verify the repository root, active branch, upstream branch, and remote URL before mutation or publication.
  7. Validate .gitignore and warn about commonly sensitive files such as .env, credential files, private keys, local configuration, and generated reports.
  8. Do not use generic task completion as an automatic commit-and-push trigger. Restrict activation to an explicit version-control request.
  9. For multi-repository operation, obtain repository-specific approval and present a separate staged-change summary for every repository.
  10. Prefer creating a local commit without pushing by default. Treat remote publication as a distinct, higher-risk action.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises automatic detection, commit-message generation, and remote pushing without clearly warning that it will modify local repository state and publish data externally. In repository workflows, silent or assumed write/publish behavior is dangerous because users may not realize that files will be staged, committed, and sent to a remote endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow explicitly recommends 'git add .' followed by commit and push, but does not require file-scope review, secret scanning, or confirmation before publication. This is dangerous because it can capture unintended files such as credentials, generated artifacts, or unrelated edits and then immediately transmit them to a remote repository.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly promotes automatic detection of changes, generation of commit messages, and automatic push to remote repositories, but it does not warn that these actions modify repository state and may publish data externally. In context, this is especially dangerous because git add . can sweep up unintended files such as secrets or unrelated work, and git push can immediately exfiltrate them to a remote service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger conditions are broad enough to activate on common development requests such as committing code, pushing changes, or checking Git status, which can cause the skill to run outside a narrowly intended context. In a skill that performs state-changing actions, overbroad activation increases the chance of unintended repository modification or publication.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example trigger 'analysis task complete' is ambiguous and could cause automatic Git operations after unrelated work finishes, without a fresh user request to commit or publish results. Because the described behavior includes add/commit/push, this ambiguity can lead to unintended disclosure of generated files, secrets, or incomplete work to remote repositories.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description enumerates broad tasks like committing code, pushing to remotes, and managing multiple repositories without defining boundaries, preconditions, or when automation should stop and ask the user. That ambiguity increases the chance the agent performs sensitive version-control actions in the wrong repo or at the wrong time.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger is simply "git", which is broad enough to activate on ordinary discussion rather than explicit requests to perform repository actions. In a skill that stages, commits, and pushes changes, accidental activation can lead to unintended repository modification or remote publication without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The examples advertise broad natural-language triggers like '提交刚才的代码修改' and '检查所有项目仓库的状态' without any explicit confirmation, repository scoping, or push safeguards. In a skill that has exec/write access and explicitly supports automatic commit and push, this can cause the agent to perform sensitive source-control actions on the wrong repository or exfiltrate code to a remote by interpreting an ambiguous user request too broadly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The description and operational guidance are presented entirely in Chinese, and the file does not indicate that language selection is optional or limited to a Chinese-specific environment. If organizational policy requires not forcing a specific language without user opt-in, this could be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The title, description, author text, and usage examples are all written in Chinese, but the manifest does not state that the skill is China/Chinese-specific or offer language choice. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.