T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- modules/cleanup-workflow.md:10
- Finding
- Repository-Wide Modification and Push Exceed the Skill's Declared Scope<![CDATA[ ## Vulnerability Details **File Location**: `modules/cleanup-workflow.md:10-25, 137, 155, 170, 191, 217, 233, 250, 289` **Vulnerability Type**: Unauthorized repository modification and publication **Risk Level**: High ### Vulnerable Instructions ```markdown **Run passes in order. Each pass is independent. Commit between passes. Prefer deletion over rewriting.** ... 1. **One pass per commit.** A commit titled "cleanup" that touches comments, prose, error handling, and tests is not reviewable. Split. 2. **Deletion beats rewriting.** When in doubt, remove the material. AI slop is additive; the cheapest correct fix is almost always to take material away. ``` The workflow repeatedly instructs the agent to commit changes, ending with: ```markdown Commit, push, and let it land. ``` ### Technical Analysis The skill metadata describes a prose-detection function, but the cleanup workflow expands that role into modifying documentation, source-code idioms, architecture, tests, repository policy, and CI configuration. It also directs the agent to create multiple commits and push the resulting changes. Detection does not inherently require repository write access, Git commit access, or permission to publish changes to a remote repository. Directing an agent to use those capabilities violates least privilege and creates a significant gap between the apparent purpose of the skill and its effective authority. The instruction to prefer deletion compounds the risk because false positives can lead to the removal of valid comments, tests, abstractions, or documentation. The final push instruction can publish those changes without a distinct approval boundary. ### Attack Path 1. A user invokes the skill expecting a read-only prose audit. 2. The agent loads `modules/cleanup-workflow.md`. 3. The workflow directs the agent to perform repository-wide cleanup passes. 4. The agent deletes or rewrites documentation, code, architecture, and tests based on he ...[truncated 805 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make the skill strictly read-only by default. 2. Remove all unconditional `commit`, `push`, and automatic deletion instructions. 3. Separate detection from remediation into independently invoked operations. 4. Require explicit user approval before: - Editing any file. - Deleting any content. - Creating each commit. - Accessing a Git remote. - Pushing any branch. 5. Present proposed changes as minimal diffs rather than applying them automatically. 6. Restrict remediation to user-selected files and categories. 7. Require a clean working tree and create a recoverable backup or patch before modification. 8. Never trigger CI/CD through a push without separate, informed confirmation. ]]>
