T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- components/02-phase-1-ship-state.md:1
- Finding
- Automatic Repository and Project-State Modification Without Explicit Per-Run Approval## Vulnerability Details **File Location**: `components/02-phase-1-ship-state.md:1-9`; supporting execution policy in `components/01-design-principles.md:9-14` **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Instructions `components/02-phase-1-ship-state.md:1-9`: ```markdown ## Phase 1: Ship State 1. Find touched repos and run `git status` in each. 2. If uncommitted changes exist, commit with descriptive messages. 3. If push is allowed by policy, push to remote; otherwise report ready-to-push commands. 4. Validate file placement and naming conventions for files created in this session. 5. Move misplaced document files (`.md`, `.docx`, `.pdf`, `.xlsx`, `.pptx`) to the correct docs location when applicable. 6. Detect deploy scripts/skills and run only if deploy is approved. 7. Reconcile task tracking: close completed items, flag stale or orphaned items. ``` Supporting policy from `components/01-design-principles.md:9-14`: ```markdown ## Execution policy - Default is execution mode: perform actions directly. - Ask exactly one minimal question only when blocked by unclear irreversible operations. - Only push, deploy, or publish externally when explicitly requested in this session or preapproved by project policy. - Support `dry-run` mode to compute all actions and memory writes without side effects. ``` ### Technical Analysis The Skill defaults to direct execution and instructs the agent to commit all detected uncommitted changes, move documents, and modify task-tracking state. Explicit authorization gates exist for push, deployment, and publication, but equivalent gates are absent for commits, file relocation, and task closure. Repository discovery based on “touched repos” and commit selection based only on the presence of uncommitted changes do not establish that every changed file belongs to the current task. A working tree can contain ...[truncated 2502 chars]
- Remediation
- ## Remediation Suggestions 1. Make `dry-run` the default mode. Require an explicit `execute` request before performing any workspace mutation. 2. Before committing, present: - The repository path. - The exact files to be staged. - A staged diff summary. - The proposed commit message. - Any files excluded because they are unrelated or potentially sensitive. 3. Require explicit user approval for the proposed commit rather than treating a generic wrap-up request as commit authorization. 4. Restrict commit candidates to files demonstrably changed during the current task. Do not automatically include pre-existing working-tree changes. 5. Scan proposed commits for secrets, private keys, environment files, credentials, and local configuration before staging. 6. Convert document relocation into a proposed move plan. Require approval for each source and destination pair, and use version-control-aware move operations where applicable. 7. Convert task closure and cleanup into recommendations unless the user explicitly approves the listed task identifiers and state transitions. 8. Record rollback instructions for every applied action, including commit hashes, reverse file moves, and task-state restoration steps. 9. Preserve the existing explicit gates for push and deployment, and ensure approval applies to a specific remote, branch, target, and command.
