T09 · Insecure Skill Coding Practices
- Location
scripts/dashscope_image_gen.py:45- Finding
API Credential Disclosure Through an Unrestricted Endpoint Override
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent DashScope image generator, but it can silently reuse a local OpenClaw API key and send it to a caller-selected endpoint.
Review this before installing if you keep DashScope credentials in OpenClaw config or might let agents choose command arguments. Prefer explicit DASHSCOPE_API_KEY use, avoid custom --base-url values, and consider requiring endpoint allowlisting plus bounded image downloads before trusting it with paid API credentials.
scripts/dashscope_image_gen.py:45API Credential Disclosure Through an Unrestricted Endpoint Override
scripts/dashscope_image_gen.py:124Unvalidated Server-Directed Image URL Retrieval
The skill describes and invokes capabilities that access environment variables, read local files, and make outbound network requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a mismatch between the skill’s documented behavior and its effective capabilities, which weakens policy enforcement and can allow broader execution than reviewers or orchestrators expect.
Reading credentials from an unrelated application's config file is a genuine security design issue because it allows this helper to inherit privileges the user did not explicitly provide to it. In a skill/agent context, this is more dangerous than a normal local script because the tool can opportunistically access local secrets and use them for outbound network requests, increasing the risk of covert credential use or abuse if the endpoint or surrounding workflow is modified.
The script silently falls back to reading an API key from ~/.openclaw/openclaw.json even though its documented credential sources are the environment or --api-key. This creates an unexpected secret boundary crossing: a utility for one service automatically consumes credentials from an unrelated local application, which can cause unintended credential use and weakens least-privilege expectations.
No suspicious patterns detected.