T09 · Insecure Skill Coding Practices
- Location
scripts/variflight.py:98- Finding
API Key Exposure Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This travel-query skill is purpose-aligned, but it should be reviewed because it normalizes unsafe handling of a Variflight API key.
Before installing, prefer VARIFLIGHT_API_KEY from a trusted secret manager or protected environment. Avoid passing the key with --api-key, avoid project-level .variflight.json files, keep any local credential file outside repositories with restrictive permissions such as 600, and rotate the key if it was previously exposed in shell history, logs, or a shared file.
scripts/variflight.py:98API Key Exposure Through Command-Line Arguments
README.md:114Plaintext Credential Files Created Without Restrictive Permissions
The README explicitly shows passing the API key on the command line and storing it in plaintext JSON files. Command-line arguments can be exposed via shell history, process listings, CI logs, and screen sharing, while plaintext config files are easily leaked through backups, dotfile sync, or accidental commits. In a travel-query skill that relies on authenticated HTTP API access, this increases the risk of credential theft and unauthorized API use.
The client integration section repeatedly instructs users to write API keys into local environment/config files and shows literal secret values in examples without warning. Those patterns normalize insecure secret handling and can lead to leakage through repository commits, shared home directories, CI artifact capture, or misconfigured permissions. Because this skill is meant for broad use across OpenClaw, Claude Code, Cursor, GitHub Actions, and Docker, the insecure guidance is likely to be copied widely, increasing the attack surface.
The skill documents network access and use of environment/config-based secrets, but it does not declare an explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, missing scope declarations can cause the runtime or user to grant broader capabilities than necessary, reducing transparency and weakening least-privilege controls.
The documentation instructs users to store the API key in plaintext config files like ~/.variflight.json without warning about file permissions, secret managers, or accidental commits. Plaintext credential storage increases the chance of credential disclosure through local compromise, backups, dotfile syncing, or source control exposure.
The examples pass the API key directly on the command line, which can leak secrets via shell history, process listings, CI logs, or telemetry collected by terminal tools. This is a well-known unsafe secret-handling practice, especially in shared systems and automated environments.
The script explicitly supports passing an API key on the command line, which commonly exposes secrets through process listings, shell history, audit logs, and CI/job telemetry. In a travel-data skill, that key likely grants access to a paid upstream API, so disclosure can enable unauthorized API use, quota exhaustion, billing abuse, or service disruption.
The skill documentation is predominantly Chinese, which may force a specific language experience on users without opt-in or an explicit note that the skill is intended for Chinese-speaking users. Under the stated policy, language constraints should either offer user choice or be clearly documented and justified.
Natural-language content in the file switches between English and Chinese for key setup and usage instructions. Under the stated policy, forcing or assuming a specific language without opt-in can be a locale-policy issue when no choice or justification is provided.
The script accepts a user-supplied API key and forwards it on the command line to another shell script without any warning or safer handling. Command-line arguments are commonly exposed via shell history, process listings, logs, and debugging output, so the credential may be unintentionally disclosed to other local users or operational tooling.
The script invokes another shell script and passes through the optional --api-key value, which is a sensitive credential flow. While the usage comment documents the parameter, there is no user-facing warning, confirmation, or disclosure about handling a credential when executing the command.
This Python file makes an HTTP POST request to an external Variflight endpoint using user-provided endpoint/params data and an API key in a request header. Although the function names imply API usage, the code lacks an inline warning, confirmation, or other user-facing disclosure near the network operation itself about transmitting request data to a remote service.
No suspicious patterns detected.