T09 · Insecure Skill Coding Practices
- Location
scripts/twitter_oauth_client.py:337- Finding
AISA API Key Disclosed in Command Output and Result Objects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Twitter/X skill is mostly purpose-aligned, but its posting client prints the raw AISA API key in command output, which can leak credentials into logs or agent transcripts.
Review before installing. Use this only if you trust the AIsa relay with Twitter/X API requests, post content, selected media files, and your AISA_API_KEY. Do not run the OAuth posting client with a real key until the raw key is removed or masked from command output; rotate the key if it has already appeared in logs or transcripts.
scripts/twitter_oauth_client.py:337AISA API Key Disclosed in Command Output and Result Objects
A substantial mismatch between the advertised read/research/watchlist functionality and code that is reportedly focused mainly on authorization and posting creates a trust and consent problem. Users or orchestrators may invoke the skill expecting passive research behavior, while the actual implementation may drive account authorization or external posting flows, which raises the risk of unintended writes to a third-party service.
A substantial mismatch between the advertised read/research/watchlist functionality and code that is reportedly focused mainly on authorization and posting creates a trust and consent problem. Users or orchestrators may invoke the skill expecting passive research behavior, while the actual implementation may drive account authorization or external posting flows, which raises the risk of unintended writes to a third-party service.
The post/status flows include the full AIsa API key in printed JSON output, even though the key is only needed for authenticating requests and is not required for normal user-visible results. Printing secrets to stdout risks credential disclosure through terminal history, logs, CI output, agent transcripts, or downstream tooling, which could let anyone with access to that output use the key against the remote AIsa API.
The authorization command prints the full AIsa API key alongside the authorization URL and raw response. Because authorization is likely to be run interactively and captured in shell history, logs, notebook output, or agent traces, this unnecessarily exposes a bearer credential that can be reused by others.
The skill declares access to an API key and explicitly relies on outbound network access to a relay, but it does not define an explicit tool scope such as permissions or allowed-tools. That omission can cause overly broad execution in hosts that depend on manifest scoping, increasing the chance of unintended environment-variable access or network use beyond what the user expects.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Guardrails
- Do not ask the user for their Twitter password.
- Do not use cookie-based login or proxy-based login unless the user explicitly asks for legacy behavior.
- Do not default to `--open-browser`; return the authorization link unless the user explicitly wants local browser launch.
- Do not invent remote URLs for attachments; always use the provided local workspace file path with `--media-file`.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
DEFAULT_TIMEOUT = 30
DEFAULT_BASE_URL = "https://api.aisa.one/apis/v1"
DEFAULT_CHROME_USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
DEFAULT_TIMEOUT = 30
DEFAULT_BASE_URL = "https://api.aisa.one/apis/v1"
DEFAULT_CHROME_USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
The authorize command reads the sensitive AISA_API_KEY from the environment and sends it in an Authorization header and JSON payload to the remote service, but there is no explicit user disclosure that a credential is being used and transmitted. The output also includes the raw API key value, increasing the need for a clear warning around sensitive credential handling.
The post command sends tweet text, media IDs, and uploaded local media files to the remote AIsa service via HTTP requests, but the execution path only prints results after transmission and does not present a prior disclosure or confirmation. Although posting is the script's purpose, the code also uploads local files and forwards content to a third-party endpoint, which merits an explicit warning to the user before execution.
No suspicious patterns detected.