T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:40- Finding
Unrestricted Distribution of Main-Agent Credentials to Sub-Agents
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 40
Vulnerability Type: Violation of least privilege through unrestricted credential distribution
Risk Level: HighVulnerable Code
markdown - Auth: all agents need `auth-profiles.json` copied from main agentTechnical Analysis
The skill requires the main agent's complete
auth-profiles.jsonfile 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
- A repository contains adversarial content designed to influence a spawned sub-agent, such as instructions embedded in source files or documentation.
- The main agent follows the skill and copies
auth-profiles.jsoninto the sub-agent's accessible environment. - The affected sub-agent reads or exposes credentials from that file.
- The credentials are used to authenticate to repositories, board systems, planner services, or other accounts represented in the profile.
- 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
View remediation
Remediation Suggestions
- Remove the requirement to copy the complete
auth-profiles.jsonfile. - 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.
- Remove the requirement to copy the complete
