T09 · Insecure Skill Coding Practices
- Location
scripts/twitter_oauth_client.py:342- Finding
AISA API Key Exposed in CLI Output and Redundantly Transmitted in Request Bodies
- Content
View full analysis
- Remediation
View remediation
``` 3. Remove the redundant body field from the engagement client as well, subject to relay API compatibility. 4. If the relay contract currently requires the body field: - Change the server contract to support header-only authentication. - Mark the body field as sensitive in application, proxy, tracing, and error-reporting systems. - Apply structured redaction before logging request or response objects. - Never include the body credential in client-visible results. 5. Add automated regression tests that invoke `authorize` and `post` with a sentinel key and assert that the sentinel never appears in: - Standard output or standard error. - Returned command objects. - Error messages. - Serialized diagnostics. - Recorded request bodies when header-only authentication is enabled. 6. Rotate any API keys that may already have been exposed through command output, agent transcripts, CI logs, or telemetry. Remove retained copies from accessible logs and artifacts where feasible. ]]>
