T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:85- Finding
Unnecessary Access to Secret-Bearing Environment Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:85
Vulnerability Type: Excessive access to sensitive configuration data
Risk Level: MediumVulnerable Instruction
The following is a faithful English rendering of the instruction at line 85:
markdown - Configuration file analysis: Read `.env`, `application.yml`, and similar files to understand deployment environments and third-party service dependencies.Technical Analysis
The Skill explicitly directs the Agent to read
.envfiles during ordinary project analysis. These files commonly contain API tokens, database passwords, private service endpoints, signing secrets, and cloud credentials.Reading the values of these secrets is not necessary to identify configuration structure or third-party dependencies. The analysis can normally use
.env.example, configuration schemas, or environment-variable names with values redacted.Although no network exfiltration or deliberate credential theft was found, placing secrets in the Agent context creates unnecessary exposure. The values may be retained in conversation logs, tool traces, generated documentation, or model-provider processing systems. They may also be reproduced accidentally when the Agent discusses configuration or deployment.
Attack Path
- A user provides a project directory containing a real
.envfile. - The Skill enters its mandatory deep-code-analysis stage.
- Following
SKILL.md:85, the Agent opens and reads the.envfile. - Secret values enter the Agent's context and associated execution logs.
- The Agent may inadvertently quote, summarize, or place those values in generated showcase or deployment documentation.
- Anyone with access to the conversation, logs, or generated files could recover the exposed credentials.
Impact Assessment
The potential scope depends on the credentials stored in the environment file. Exposure could provide access to:
- Appli ...[truncated 385 chars]
- A user provides a project directory containing a real
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to read
.envfiles by default. - Prefer
.env.example,.env.template, configuration schemas, and documented variable lists. - If inspection of a real environment file is essential, obtain explicit user consent first.
- Read only environment-variable names and replace every value with a fixed marker such as
[REDACTED]. - Add an explicit rule prohibiting credentials from appearing in prompts, analysis results, generated documents, logs, or code examples.
- Detect common secret formats before processing configuration content and redact matching values.
- Restrict configuration analysis to files inside the user-approved project root.
- Recommend immediate credential rotation if a secret is accidentally exposed.
- Remove the instruction to read
