T09 · Insecure Skill Coding Practices
- Location
SKILL.md:38- Finding
Credential Exposure Through Full Secret File Display
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:38
Vulnerability Type: Unnecessary disclosure of credential-file contents
Risk Level: MediumVulnerable Code
bash cat ~/.upkuajing/.envTechnical Analysis
The Skill directs the operator or Agent to display the complete contents of the credential file. Verifying whether
UPKUAJING_API_KEYis configured does not require revealing its value or printing every entry in the file.Command output may enter terminal logs, Agent context, conversation transcripts, screen recordings, or command-execution telemetry. If the file contains additional environment variables, those values are exposed as well.
Attack Path
- The Skill encounters a missing or apparently unavailable API key.
- The documented diagnostic command is executed.
- The complete
.envfile, including the API key and potentially unrelated secrets, is printed. - A user with access to logs, transcripts, terminal output, or Agent context obtains the credential.
- The exposed key is used to make unauthorized or billable API requests.
Impact Assessment
Exploitation can disclose the
UPKUAJING_API_KEYand any additional secrets stored in the same file. The resulting access is limited to the privileges associated with the exposed credentials, but may include paid API usage, access to account information, and creation of payment-related requests.- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to print the credential file.
- Check only whether the required variable exists, without returning its value.
- Prefer secret injection through the process environment or a dedicated secret manager.
- If file-based configuration remains supported, implement a helper that parses only
UPKUAJING_API_KEYand reports a Boolean configured/not-configured result. - Ensure diagnostics redact credential values and never include them in Agent responses, logs, or error reports.
