T09 · Insecure Skill Coding Practices
- Location
SKILL.md:32- Finding
Automatic staging can expose secrets and sensitive files
- Content
View full analysis
` to add the remote 5. Run `git branch -M ` to rename to the detected branch name ``` ```markdown ### Step 3: Handle uncommitted changes Check for uncommitted changes with `git status --porcelain`. **If there are uncommitted changes:** 1. Run `git diff --cached` to see staged changes 2. Run `git diff` to see unstaged changes 3. Stage all changes: `git add .` 4. Analyze the staged changes and generate a commit message by summarizing the diff. The commit message should: - Follow conventional commit format: `type(scope): brief summary` - Types: `feat` (new feature), `fix` (bug fix), `chore` (maintenance), `docs`, `refactor`, `style`, `test` - Title no more than 50 characters - Body lists the affected files and what changed 5. Run `git commit -m ""` ``` ### Technical Analysis The Skill instructs the agent to run `git add .`, which recursively stages all unignored content beneath the project directory. It does not require a sensitive-file review, secret scan, staged-file confirmation, or user approval before the resulting commit is pushed to GitHub. The preceding `git diff` instructions are insufficient because they do not necessarily expose the contents of untracked files before those files are staged. Consequently, untracked `.env` files, private keys, credential exports, cloud configuration, database dumps, access tokens, or other confidential artifacts can be committed without meaningful review. This behavior is especially hazardous when the destination repository is public. Deleting the file in a later commit would not remove the secret from e ...[truncated 1233 chars]- Remediation
View remediation
