T09 · Insecure Skill Coding Practices
- Location
SKILL.md:153- Finding
API Key Exposed Through Terminal Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 153–156
Vulnerability Type: Sensitive credential exposure
Risk Level: MediumVulnerable Code
markdown 1. Check that the `MATON_API_KEY` environment variable is set: ```bash echo $MATON_API_KEYtext ### Technical Analysis The troubleshooting instructions print the complete `MATON_API_KEY` value to standard output. The stated diagnostic purpose is only to determine whether the environment variable is configured, which does not require disclosure of its contents. Terminal output may be retained in AI-agent transcripts, CI/CD logs, shell recordings, screenshots, telemetry, or support tickets. Because the same key is used as a bearer credential for requests to `api.maton.ai`, possession of the exposed value may be sufficient to impersonate its owner within the key's authorized scope. This behavior exceeds the minimum privilege and disclosure necessary for configuration validation. It is classified as `T09: Insecure Skill Coding Practices` because the Skill directly recommends an unsafe secret-handling practice. ### Attack Path 1. A user encounters an authentication or connection error. 2. The user follows the documented troubleshooting procedure. 3. `echo $MATON_API_KEY` writes the complete credential to terminal output. 4. The output is retained in an agent transcript, build log, shell recording, screenshot, or support artifact. 5. An unauthorized party with access to that artifact extracts the API key. 6. The party submits the key as a bearer credential to Maton API endpoints. 7. If the key remains valid, the party accesses Jira connections and operations permitted by its assigned scopes. ### Impact Assessment Successful exploitation may allow unauthorized use of the victim's Maton account and connected Jira resources. The precise impact depends on the API key's scopes and the Jira permissions associated with the managed OAuth c ...[truncated 405 chars]- Remediation
View remediation
Remediation Suggestions
Replace the secret-printing command with a presence check that does not disclose the value:
bash if [ -n "${MATON_API_KEY:-}" ]; then echo "MATON_API_KEY is set" else echo "MATON_API_KEY is not set" fiAdditional hardening measures:
- Explicitly warn users never to print, paste, log, or share API keys.
- Redact bearer tokens from agent transcripts, command logs, telemetry, and error output.
- Recommend rotating the key immediately if it has appeared in terminal output or a shared artifact.
- Grant the Maton key and connected Jira identity only the scopes required for the intended operation.
- Prefer a secret manager or protected environment injection mechanism over plaintext shell configuration.
- Keep network requests restricted to the documented HTTPS service and clearly disclose that Jira access is mediated by
api.maton.ai.
