T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:40
- Finding
- Unrestricted Distribution of Main-Agent Credentials to Sub-Agents## Vulnerability Details **File Location**: `SKILL.md`, line 40 **Vulnerability Type**: Violation of least privilege through unrestricted credential distribution **Risk Level**: High ### Vulnerable Code ```markdown - Auth: all agents need `auth-profiles.json` copied from main agent ``` ### Technical Analysis The skill requires the main agent's complete `auth-profiles.json` file to be copied to every sub-agent. This includes roles such as reviewer, tester, researcher, and security auditor, even when those roles do not require authenticated access to perform their stated responsibilities. Sharing a complete authentication profile across multiple agent contexts violates least-privilege and credential-compartmentalization principles. The instruction does not require: - Role-specific credential scopes - Short-lived credentials - Secret redaction - Read restrictions - Isolated secret injection - Prevention of credentials entering prompts, logs, or generated output Any sub-agent influenced by malicious repository content or other untrusted instructions could attempt to inspect, disclose, or misuse the copied credentials. ### Attack Path 1. A repository contains adversarial content designed to influence a spawned sub-agent, such as instructions embedded in source files or documentation. 2. The main agent follows the skill and copies `auth-profiles.json` into the sub-agent's accessible environment. 3. The affected sub-agent reads or exposes credentials from that file. 4. The credentials are used to authenticate to repositories, board systems, planner services, or other accounts represented in the profile. 5. The attacker performs actions permitted by those credentials, potentially outside the sub-agent's legitimate role. ### Impact Assessment Successful exploitation could expose every credential stored in `auth-profiles.json`. The resulting privileges depend on the actual contents and scopes of the file, but co ...[truncated 460 chars]
- Remediation
- ## Remediation Suggestions - Remove the requirement to copy the complete `auth-profiles.json` file. - Provide credentials only to roles that demonstrably require authenticated access. - Issue separate, short-lived, role-scoped credentials with the minimum required permissions. - Supply secrets through an approved secret manager or isolated runtime mount rather than copying them into agent workspaces. - Make mounted secrets read-only and prevent their inclusion in prompts, logs, diffs, commits, and generated reports. - Ensure reviewer, tester, researcher, and security roles operate without credentials unless a specific authenticated action is necessary. - Revoke credentials immediately after the relevant stage and maintain audit logs of credential issuance and use. - Add controls that prevent sub-agents from reading arbitrary secret files or transmitting secret material.
