T09 · Insecure Skill Coding Practices
- Location
SKILL.md:382- Finding
API Key Exposure Through Troubleshooting Command
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 382–385
Vulnerability Type: Sensitive credential exposure through terminal output
Risk Level: MediumVulnerable Code:
bash 1. Check that the `AISA_API_KEY` environment variable is set: ```bash echo $AISA_API_KEYTechnical Analysis
The troubleshooting procedure instructs the user or agent to print the complete
AISA_API_KEYvalue to standard output. Although this does not transmit the key to an undeclared endpoint, it unnecessarily exposes a bearer credential when only its presence needs to be verified.Terminal output can be retained in AI-agent tool transcripts, CI/CD logs, remote shell recordings, support bundles, screen-sharing sessions, or other monitoring systems. Because the Skill describes the key as unified across multiple AIsa services and all requests are pay-per-use, disclosure may affect more than the YouTube search endpoint.
The regular transmission of this credential in the HTTPS
Authorizationheader toapi.aisa.oneis necessary for the declared API functionality and is not treated as covert exfiltration. The vulnerability is specifically the unnecessary plaintext display of the credential.Attack Path
- A user encounters an authentication problem and follows the documented troubleshooting instructions.
- The user or agent executes
echo $AISA_API_KEY. - The complete bearer credential is written to terminal output.
- The output is captured in an agent transcript, CI log, shell recording, screen share, or support artifact.
- A party with access to that output extracts the key.
- The party uses the key to authenticate to supported AIsa endpoints and consume account resources until the key is revoked or expires.
Impact Assessment
An exposed key may allow unauthorized authentication to AIsa services available to the affected account. Potential impact includes unauthorized paid API consumption, ex ...[truncated 399 chars]
- Remediation
View remediation
Remediation Suggestions
Replace the secret-printing command with a presence check that never displays the value:
bash if [ -n "${AISA_API_KEY:-}" ]; then echo "AISA_API_KEY is set" else echo "AISA_API_KEY is not set" fiAdditional hardening measures:
- Explicitly warn users never to print, paste, log, or commit the API key.
- Recommend rotating the key immediately if it appears in terminal or agent logs.
- Redact
Authorizationheaders andAISA_API_KEYvalues in diagnostic output. - Use a dedicated, least-privileged key for this Skill if AIsa supports scoped credentials.
- Avoid reusing one broadly privileged key across unrelated services where scoped alternatives are available.
- Ensure CI/CD systems and agent runtimes mask the
AISA_API_KEYenvironment variable in logs.
