T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:18- Finding
Excessive Access to Agent-Wide Configuration Containing Sensitive Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 18
Vulnerability Type: Sensitive configuration access beyond least-privilege requirements
Risk Level: MediumVulnerable Code Snippet:
markdown - Before any tool call, check `~/.claude/settings.json` has `env.PROFOUND_API_KEY`.Technical Analysis
The skill instructs the agent to inspect the complete Agent-wide
~/.claude/settings.jsonfile before every tool call merely to determine whetherPROFOUND_API_KEYexists. This configuration file may contain unrelated environment variables, credentials, hooks, integration settings, or other sensitive Agent configuration.Accessing the entire settings file exceeds the minimum privileges required for the stated task. The skill only needs to know whether the Profound API key is available; it does not need access to unrelated settings or the key's plaintext value. Requiring this access before every tool call also broadens the exposure window beyond Profound-specific operations.
The file does not explicitly instruct the agent to transmit or disclose the configuration contents. Therefore, this finding represents unnecessary sensitive-resource access and increased exposure risk, rather than confirmed credential exfiltration.
Attack Path
- A user or Agent loads the skill and requests an operation.
- The Agent follows the prerequisite instruction before making a tool call.
- The Agent reads
~/.claude/settings.jsonto locateenv.PROFOUND_API_KEY. - Unrelated credentials and configuration values from that file may enter the active model, tool, or logging context.
- Those values could subsequently be exposed through accidental output, retained tool logs, or later prompt-driven misuse.
No explicit exfiltration destination or malicious transmission mechanism is present in the audited file, so the final exposure step is conditional rather than directly implemented.
Impact Assessment
T ...[truncated 685 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to read the complete
~/.claude/settings.jsonfile. - Check only whether
PROFOUND_API_KEYis present in the current process environment, without printing, logging, or returning its value. - Perform the check only immediately before a Profound API request rather than before every tool call.
- Use a narrowly scoped credential provider or secret manager that returns availability status without exposing the secret to the model context.
- Ensure diagnostic messages report only that the key is configured or missing; they must never include the key value.
- Document the minimum required permission and prevent the skill from accessing unrelated Agent configuration.
- Add the referenced installer scripts to the auditable package or remove those references. The current project references
extensions/profound/install.shandinstall.ps1, but those files were not present and their credential-handling behavior could not be reviewed.
- Remove the requirement to read the complete
