T09 · Insecure Skill Coding Practices
- Location
SKILL.md:21- Finding
Unfiltered workspace changes may be committed and uploaded to a remote repository
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21-25
Vulnerability Type: Missing sensitive-file filtering before Git commit and push
Risk Level: HighEvidence
markdown ## Core Workflow 1. Run pre-flight-check.sh to inspect the current workspace 2. Act according to the result (NOT_GIT_REPO → git init, NO_CHANGES → skip, HAS_CHANGES → commit changes in content-based groups and push) 3. If the remote has not been created, follow references/spec.mdThe snippet above is a faithful English rendering of the relevant source instructions.
Technical Analysis
The documented workflow instructs the Agent to commit and push workspace changes without requiring a sensitive-file review, secret scan, staging allowlist, or user approval of the exact files being uploaded. Agent workspaces may contain environment files, API tokens, private keys, credentials, local state, memory data, execution logs, or other material that should not leave the local system.
Remote transfer is necessary for backup functionality, but committing every detected change is broader than the minimum privilege and data scope required. Git also preserves committed secrets in repository history even if they are removed in a later commit.
Attack Path
- A credential, private configuration file, token-bearing log, or other sensitive artifact is created or modified inside the workspace.
- The pre-flight script reports
HAS_CHANGES. - The Agent follows the Skill instructions and stages the workspace changes without a mandatory sensitive-file check.
- The Agent commits and pushes the changes to the configured remote repository.
- The sensitive data becomes accessible to remote-repository users and remains recoverable from Git history.
Impact Assessment
Exploitation can disclose any sensitive material readable within the selected workspace. Depending on the exposed data, this may allow access to source repositori ...[truncated 221 chars]
- Remediation
View remediation
Remediation Suggestions
- Require a secret scan before any
git add, commit, or push operation. - Use an explicit backup allowlist instead of staging the complete workspace.
- Exclude private keys, environment files, credential stores, Agent memory, execution logs, and platform-specific secret files by default.
- Maintain a secure
.gitignoretemplate and verify ignored files withgit check-ignore. - Present the exact staged file list to the user or calling Agent before committing.
- Block the push when high-confidence credentials are detected and provide instructions for secret rotation and Git-history cleanup.
- Prefer a private, access-controlled remote repository with narrowly scoped credentials.
- Require a secret scan before any
