T09 · Insecure Skill Coding Practices
- Location
SKILL.md:16- Finding
API Key Disclosed Through Terminal Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it claims, but it handles API keys and OpenClaw configuration changes in ways users should review before installing.
Install only if you are comfortable letting this skill modify your OpenClaw model configuration and call OpenRouter with your API key. Do not print or paste the API key; use a non-printing presence check instead. Back up ~/.openclaw/openclaw.json before running mutating commands, avoid the watcher unless you want automatic model changes, and prefer pinned or isolated installation where possible.
SKILL.md:16API Key Disclosed Through Terminal Output
skill.json:41Mutable and Unpinned Installation Dependencies
main.py:193Malformed OpenClaw Configuration Can Be Silently Overwritten
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
response = requests.get(OPENROUTER_API_URL, headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
return data.get("data", [])
The README emphasizes one-command setup and automatic fallback/model rotation, but does not prominently warn before installation/use that the tool will modify ~/.openclaw/openclaw.json and may switch models automatically during operation. This can lead to unintended configuration drift, surprising runtime behavior, and trust/safety issues if users rely on a specific model or provider.
The README instructs users to run npx clawhub@latest install freeride, which pulls and executes the latest package version at install time without pinning to a known-good release. This creates a supply-chain risk: if the upstream package is compromised or a malicious update is published, users could execute attacker-controlled code during installation.
The skill directs the agent to read environment variables, install software, modify configuration files, and use network-backed services, but it declares no explicit tool scope or permission boundaries. That increases the chance the skill can be invoked with more authority than intended, making unintended file changes, credential access, or external calls harder to constrain or audit.
The activation text includes broad triggers like 'free AI,' 'model switching,' 'rate limits,' and 'reduce AI costs,' which could cause the skill to activate for ordinary discussion rather than a clear request to reconfigure local tooling. In this skill, activation can lead to config changes, package installation guidance, and service restarts, so overbroad matching raises the risk of unwanted operational changes.
The skill instructs users to echo and persist an API key without emphasizing that the credential is sensitive, which can normalize unsafe handling and increase the risk of disclosure through shell history, screenshots, shared terminals, or stored configuration. Because the skill also encourages writing the key into application config, the exposure surface expands if file permissions or backup practices are weak.
This code path persists changes to the user's OpenClaw configuration, altering primary and fallback models, but there is no confirmation prompt before the write occurs. Although some status messages are printed, they happen after the decision to modify state and do not warn the user that a config file will be overwritten.
The fallbacks command writes a new fallback list directly into the user's configuration file, replacing existing fallback settings, but only informs the user after the write. For a safety-relevant file modification, the code lacks a prior disclosure or confirmation that existing configuration may be changed.
The manifest requires an OPENROUTER_API_KEY environment variable but provides no warning about how the credential is stored, used, or transmitted. In a skill that manages model routing and remote API access, this increases the risk that users provide sensitive credentials without understanding exposure paths, logging behavior, or third-party transmission.
The install command invokes npx clawhub@latest, which fetches and executes the latest published package at install time rather than a pinned, reviewed version. This creates a supply-chain risk: if the upstream package is compromised or a breaking/malicious release is published, users installing the skill may execute attacker-controlled code on their system.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(
OPENROUTER_CHAT_URL,
headers=headers,
json=payload,
The dependency is specified as requests>=2.31.0, which allows any future version and does not ensure reproducible installs. This can introduce vulnerable or breaking releases into the environment over time, especially for a skill that may make network requests to external services.
requests>=2.31.0
The manifest includes requests without pinning to a specific version, so it is impossible to verify from this file whether installation will resolve to a release affected by known CVEs. In a skill that manages AI model access over the network, use of an affected HTTP client could expose credentials, weaken request validation, or otherwise increase risk when interacting with external endpoints.
The install command performs package installation, directory changes, and pip install -e . without any explicit warning that it will modify the local environment. Because skill installation commonly runs with the user's permissions and may alter Python packages or workspace state, lack of disclosure increases the chance of unsafe execution and reduces informed consent around system changes.