T09 · Insecure Skill Coding Practices
- 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, andSKILL.md:85-92
Vulnerability Type: Unsafe Git staging and automatic remote publication
Risk Level: MediumVulnerable 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 pushThe 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
.gitignorecoverage. - 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
- A sensitive or attacker-controlled file is placed inside a repository working tree.
- The file is not excluded by
.gitignore. - An analysis or automation task completes, activating the documented automatic workflow.
- The agent executes
git add ., staging the sensitive file togeth ...[truncated 1107 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
git add .with explicit staging of user-approved file paths, such asgit add -- path/to/file. - Require an explicit user request before creating a commit, and obtain separate confirmation immediately before pushing.
- Display and review the staged file list using
git diff --cached --name-status. - Review actual staged content using
git diff --cachedbefore committing. - Run a secret scanner against staged content and block commits containing credentials, tokens, private keys, or high-confidence secrets.
- Verify the repository root, active branch, upstream branch, and remote URL before mutation or publication.
- Validate
.gitignoreand warn about commonly sensitive files such as.env, credential files, private keys, local configuration, and generated reports. - Do not use generic task completion as an automatic commit-and-push trigger. Restrict activation to an explicit version-control request.
- For multi-repository operation, obtain repository-specific approval and present a separate staged-change summary for every repository.
- Prefer creating a local commit without pushing by default. Treat remote publication as a distinct, higher-risk action.
- Replace
