T09 · Insecure Skill Coding Practices
- Location
SKILL.md:51- Finding
Overbroad Git Staging Followed by Unreviewed Remote Push
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 51–55
Vulnerability Type: Unsafe repository staging and publication
Risk Level: MediumVulnerable Code
bash git add -A git commit -m "descriptive message" git pushTechnical Analysis
The skill instructs an autonomous agent to stage all repository changes with
git add -A, create a commit, and immediately push it to the configured remote. The staging command includes every modified, deleted, and untracked path in the repository, not merely files created or intentionally changed during the current build session.No intervening review, path allowlist, staged-diff inspection, secret scan, or user approval is required before publication. Consequently, unrelated changes or sensitive untracked files already present in the working tree can be included in the commit and transmitted to the repository remote.
This is an insecure workflow rather than evidence of a deliberately embedded malicious payload. Its exploitability depends on sensitive or attacker-influenced content being present in the repository when the instructions are followed.
Attack Path
- A repository contains an unrelated sensitive, private, unfinished, or attacker-created file in its working tree.
- An autonomous agent loads
SKILL.mdand follows its commit instructions after completing a task. git add -Astages the intended deliverable together with all unrelated changes, deletions, and untracked files.- The agent commits the complete staged set without reviewing the staged diff.
git pushtransmits the commit to the configured remote.- Anyone with access to that remote can retrieve the unintentionally committed content. Removing it in a later commit may not remove it from repository history.
Impact Assessment
The issue does not grant operating-system privilege escalation. Its scope is the contents of the current Git working tree and the configured remote repository.
Potential impact i ...[truncated 382 chars]
- Remediation
View remediation
Remediation Suggestions
Replace the broad staging and automatic-push workflow with a least-privilege publication process:
-
Run
git status --shortand review all working-tree changes before staging. -
Stage only explicit files created or intentionally modified during the current session, for example:
bash git add -- path/to/intended-file -
Inspect the staged patch before committing:
bash git diff --cached -
Run secret scanning against staged content and reject credentials, private keys, tokens, and sensitive configuration.
-
Require explicit user approval before committing or pushing, especially in autonomous or scheduled sessions.
-
Verify the destination with
git remote -vand confirm the current branch before publication. -
Avoid pushing directly to protected or production branches; use a dedicated branch and pull-request review.
-
If accidental disclosure has already occurred, revoke exposed credentials immediately and purge sensitive objects from repository history where appropriate.
-
