T09 · Insecure Skill Coding Practices
- Location
SKILL.md:541- Finding
MATON_API_KEY Disclosed Through Troubleshooting Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:541-544
Vulnerability Type: Secret exposure through terminal output
Risk Level: MediumVulnerable Code
bash ### Troubleshooting: API Key Issues 1. Check that the `MATON_API_KEY` environment variable is set: ```bash echo $MATON_API_KEYtext ### Technical Analysis The troubleshooting instructions explicitly print the complete `MATON_API_KEY` value to standard output. The key is the bearer credential used to authenticate requests to Maton's gateway and connection-management services. Printing a secret is unnecessary to verify that an environment variable is configured. Terminal output can be retained in scrollback, CI/CD logs, shell-session recordings, support captures, screen sharing, or AI-agent transcripts. This increases the credential's exposure beyond the process that legitimately needs it. ### Attack Path 1. A user encounters an authentication problem and follows the documented troubleshooting procedure. 2. The user runs `echo $MATON_API_KEY`. 3. The complete bearer credential appears in terminal output. 4. A local user, logging system, support transcript recipient, session recorder, or other party with access to that output obtains the key. 5. The party submits the key in an `Authorization: Bearer` header to `gateway.maton.ai` or `ctrl.maton.ai`. 6. The party can use the victim's authorized Maton connections until the key is revoked or otherwise becomes invalid. ### Impact Assessment Disclosure can permit unauthorized use of the Maton account and its existing OAuth-backed service connections. The exact scope is limited by the third-party connections and OAuth scopes that the user previously authorized, but those connections may include sensitive services such as email, cloud storage, CRM systems, collaboration platforms, payment systems, and administrative APIs. The key does not independently create new third-party authoriza ...[truncated 127 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace the command with a non-revealing presence check:
bash if [ -n "${MATON_API_KEY:-}" ]; then echo "MATON_API_KEY is set" else echo "MATON_API_KEY is not set" fi -
If diagnostic identification is required, display only a short, non-sensitive fingerprint derived from a one-way hash rather than any portion of the key.
-
Add an explicit warning that API keys must not be printed, pasted into support tickets, included in screenshots, or stored in logs.
-
Redact authorization headers in application and proxy logging.
-
Document an immediate key-rotation procedure for suspected disclosure.
-
