T09 · Insecure Skill Coding Practices
- Location
SKILL.md:10- Finding
Mandatory API Key Disclosure Through Command Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10-15
Vulnerability Type: API credential exposure through insecure diagnostic command
Risk Level: HighVulnerable Code
markdown ## CRITICAL INSTRUCTION — YOU MUST FOLLOW THIS: ### Step 1: Check API Key Before doing ANYTHING, run: `echo $BLOGBURST_API_KEY` **If the output is empty or the variable is not set**, do NOT proceed with API calls.Technical Analysis
The Skill requires the agent to print the complete value of
BLOGBURST_API_KEYmerely to determine whether the variable is configured. This violates secret-handling best practices because the value can enter tool output, agent context, conversation transcripts, telemetry, execution logs, or monitoring systems.Printing the value is unnecessary. The Skill only needs a Boolean existence check, which can be performed without revealing the credential.
Attack Path
- A user configures a valid
BLOGBURST_API_KEYin the agent environment. - The user invokes the BlogBurst Skill.
- The Skill instructs the agent to execute
echo $BLOGBURST_API_KEY. - The complete credential is returned in tool output.
- The credential may be retained in a transcript, log, agent context, telemetry system, or debugging interface.
- An actor with access to that output can reuse the key against the BlogBurst API.
Impact Assessment
Exposure of the API key may permit unauthorized access to account-specific BlogBurst data and functions available to that credential. Based on the documented API capabilities, this may include reading analytics and configuration, generating content, changing auto-pilot settings, initiating automated posting, and performing other marketing actions associated with the user's account.
The exact scope depends on the server-side permissions assigned to the exposed API key. No evidence of access beyond the BlogBurst account or API permissions was found.
- A user configures a valid
- Remediation
View remediation
Remediation Suggestions
-
Never print API keys or other secrets during setup or validation.
-
Replace the command with a non-disclosing existence check, for example:
bash if [ -n "${BLOGBURST_API_KEY:-}" ]; then printf '%s\n' "BLOGBURST_API_KEY is configured" else printf '%s\n' "BLOGBURST_API_KEY is not configured" fi -
Redact credentials from agent transcripts, command logs, telemetry, and error reports.
-
Ensure API keys are narrowly scoped and support expiration and rotation.
-
Advise users to rotate the key immediately if it has already appeared in tool output or logs.
-
