T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:294
- Finding
- Bearer Token Disclosure Through Verbose curl Output in SKILL.md## Vulnerability Details **File Location**: `SKILL.md:294-298` **Vulnerability Type**: Credential exposure through verbose diagnostic output **Risk Level**: Medium ### Vulnerable Code ```bash curl -X POST https://monet.vision/api/v1/files \ -H "Authorization: Bearer $MONET_API_KEY" \ -F "file=@/path/to/your/image.jpg" \ -v ``` ### Technical Analysis The documented upload command combines an authorization header containing `MONET_API_KEY` with curl's verbose (`-v`) option. Verbose mode writes request details, including outgoing headers, to standard error. After shell expansion, this output can contain the complete bearer token. Uploading a user-selected reference image and authenticating to `https://monet.vision` are necessary for the declared image-to-video functionality. However, exposing the authentication header through verbose diagnostics is not necessary and exceeds the minimum information exposure required to perform the upload. The token may be retained in terminal recordings, CI/CD logs, AI-agent execution transcripts, redirected diagnostic output, support bundles, or other centralized logging systems. HTTPS protects the credential in transit but does not prevent its disclosure through local verbose output. ### Attack Path 1. A user or agent follows the upload example in `SKILL.md`. 2. The shell expands `$MONET_API_KEY` into the authorization header. 3. The `-v` option causes curl to print the outgoing request headers to standard error. 4. A terminal recorder, automation platform, agent transcript, or CI system captures that output. 5. An attacker or unauthorized operator with access to the captured output extracts the bearer token. 6. The attacker reuses the token against the Monet API until it is revoked or expires. ### Impact Assessment An exposed token may let an attacker act with the API permissions assigned to the affected Monet credential. Depending on server-side authorization, this ma ...[truncated 409 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `-v` from the upload example: ```bash curl -X POST https://monet.vision/api/v1/files \ -H "Authorization: Bearer $MONET_API_KEY" \ -F "file=@/path/to/your/image.jpg" ``` 2. If troubleshooting instructions are necessary, explicitly warn users that verbose HTTP output may expose authorization headers. 3. Use sanitized diagnostics that redact `Authorization`, cookies, API keys, and signed URLs before logs are stored or shared. 4. Configure CI and agent platforms to mask `MONET_API_KEY` in both standard output and standard error. 5. Restrict log access and retention, and avoid including raw request headers in support bundles. 6. Rotate any API key that may already have appeared in verbose output. 7. Use narrowly scoped, revocable, and expiring API credentials if the Monet platform supports them.
