T09 · Insecure Skill Coding Practices
API Credential Disclosure Through Troubleshooting Command
SKILL.md:323Vulnerability Details
File Location: SKILL.md, lines 323–325
Vulnerability Type: Exposure of sensitive credentials in terminal output
Risk Level: Medium
echo $CLOUDSWAYS_AK
Technical Analysis
The troubleshooting documentation instructs users or agents to print the complete value of the CLOUDSWAYS_AK API credential. Although the command does not transmit the credential directly, its output may be retained in terminal transcripts, CI/CD logs, agent tool-call records, screen recordings, debugging artifacts, or support communications.
Printing the secret is unnecessary when determining whether the environment variable is configured. The command also leaves the expansion unquoted, although the primary security issue is disclosure of the complete credential rather than shell word splitting.
Attack Path
- A user or automated agent encounters an authentication or configuration problem.
- The user or agent follows the documented troubleshooting instruction.
- The shell expands
CLOUDSWAYS_AKand prints the complete API key. - The terminal output is captured in an agent trace, build log, support record, or shared screenshot.
- An unauthorized party with access to that output retrieves the credential.
- The party submits requests to the Cloudsway API using the exposed key.
Impact Assessment
Exploitation exposes the privileges assigned to the affected Cloudsway API key. An attacker could potentially make unauthorized search API requests, consume the account's quota, create billing impact, or interfere with service availability through quota exhaustion. The issue does not by itself provide local operating-system privileges or arbitrary code execution. Its scope is limited to the API permissions and account resources associated with the disclosed credential.
Remediation
Remediation Suggestions
Replace the credential-printing command with a presence check that never reveals the value:
if [ -n "${CLOUDSWAYS_AK:-}" ]; then
echo "CLOUDSWAYS_AK is set"
else
echo "CLOUDSWAYS_AK is not set"
fi
Additional hardening measures:
- Explicitly warn users not to print, paste, log, or include the API key in support requests.
- Redact the credential from agent traces and CI/CD logs where environment values might be recorded.
- Store the key in an appropriate secret manager rather than plaintext configuration files.
- Rotate any key that has already been printed in retained or shared output.
- Apply API-side usage limits and monitoring to detect unauthorized requests or unexpected quota consumption.
