T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:59
- Finding
- Overbroad State Access, Conversation Monitoring, and Indefinite Data Retention## Vulnerability Details **File Location**: `SKILL.md:59-62`; `references/method-patterns.md:30, 105-106, 143, 146, 208, 211`; `prompts/05-workflow-execution.md:41-44` **Vulnerability Type**: T05: Unauthorized Access and Privilege Escalation **Risk Level**: Medium ### Vulnerable Content `SKILL.md:59-62`: ```yaml files: [read, write] network: [api] commands: [] mcp: [sessions_send, subagents] ``` `references/method-patterns.md:30`: ```markdown - **Permission Level**: L5 (Infrastructure Authority) ``` `references/method-patterns.md:105-106`: ```markdown | Level | Read | Write | Scope | |-------|------|-------|-------| | L5-Infrastructure | All | All | All states | ``` `references/method-patterns.md:143`: ```markdown 6. ARCHIVE: Previous version archived (never deleted) ``` `references/method-patterns.md:146`: ```markdown 1. SCAN: Monitor agent conversations and outputs ``` `references/method-patterns.md:208`: ```markdown | Decision | Permanent | CEO + Board | Strategic decisions, escalations | ``` `references/method-patterns.md:211`: ```markdown - Audit records can NEVER be deleted (only archived) ``` `prompts/05-workflow-execution.md:41-44`: ```markdown 5. CLOSE-LOOP - Log execution metrics for KPI tracking - Update shared state via HQ - Archive execution record for audit ``` ### Technical Analysis The Skill assigns HQ unrestricted read and write access to all states while also declaring file access, API connectivity, session messaging, and subagent capabilities. It instructs the system to monitor agent conversations and outputs, update shared state, and archive collected records indefinitely. This design violates least-privilege and data-minimization principles. Although the specification describes permission levels, HQ itself receives the highest level and no enforceable task-level authorization boundary is defined. The documentation also l ...[truncated 2467 chars]
- Remediation
- ## Remediation Suggestions 1. Replace universal L5 access with deny-by-default, task-scoped permissions. Grant access only to explicitly identified state namespaces and operations. 2. Separate routing, state administration, auditing, and knowledge extraction into distinct roles with independent permission sets. 3. Require explicit authorization before inspecting conversations or session state. Monitoring should be disabled by default. 4. Collect only content necessary for the active task and prohibit ingestion of unrelated conversation history. 5. Redact credentials, API tokens, personal data, and confidential fields before writing records to shared state, audit storage, or the knowledge base. 6. Define finite, category-specific retention periods. Provide authorized deletion and data-subject removal procedures where legally or operationally required. 7. Restrict `files`, `network`, `sessions_send`, and `subagents` permissions to workflows that demonstrably need them; remove unused permissions. 8. Require resource-level authorization checks immediately before every state read, state write, archive operation, broadcast, and cross-agent message. 9. Record the requesting identity, authorization decision, purpose, affected resources, and redaction outcome in the audit trail without logging sensitive payloads. 10. Add tests proving that HQ cannot access unrelated states, cannot monitor conversations without approval, cannot archive secrets, and cannot retain records beyond the configured period.
