T03 · Remote Payload Retrieval and Execution
- Location
scripts/generator.py:259- Finding
Remote OpenAPI Fields Can Inject Executable Python into Generated Clients
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate API-wrapper purpose, but its generator handles untrusted API specs with too little containment, creating risks around file writes, generated code, prompt injection, network access, and credentials.
Use this only with trusted OpenAPI specs, preferably local files or known public HTTPS hosts. Always provide a safe --name and controlled --output directory, review generated SKILL.md and scripts/api.py before installing or running them, and use sandbox or read-only API credentials rather than production tokens.
scripts/generator.py:259Remote OpenAPI Fields Can Inject Executable Python into Generated Clients
scripts/generator.py:196Remote OpenAPI Description Can Inject Instructions into Generated SKILL.md
scripts/generator.py:164Specification-Controlled Skill Name Permits Output Path Traversal
scripts/generator.py:112Unrestricted OpenAPI URL Fetching Enables Server-Side Request Forgery
scripts/generator.py:318Generated Clients Can Send Environment Credentials to Arbitrary or Redirected Origins
The skill advertises behaviors that imply network access, reading local files, writing generated files, and likely reading environment-based credentials, but it does not declare any tool scope or permission boundaries. This is dangerous because users and hosting platforms cannot clearly see or constrain what the skill may access, increasing the risk of over-privileged execution and unintended data exposure.
The skill encourages generating files and testing against live APIs, but it does not warn users that these actions can write to disk, send requests to external systems, consume API quotas, or modify real remote data. In context, this wrapper is specifically designed to interact with arbitrary third-party APIs, which makes the omission more dangerous because generated clients and test operations may perform state-changing actions unexpectedly.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
API Wrapper Generator - Generate OpenClaw skills from REST APIs
Usage:
python generator.py generate --spec https://api.example.com/openapi.json --name my-api
python generator.py validate --spec ./openapi.yaml
python generator.py test --skill ./my-api --endpoint <operationId>
"""
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
API Wrapper Generator - Generate OpenClaw skills from REST APIs
Usage:
python generator.py generate --spec https://api.example.com/openapi.json --name my-api
python generator.py validate --spec ./openapi.yaml
python generator.py test --skill ./my-api --endpoint <operationId>
"""
When --spec is an HTTP(S) URL, the script automatically performs a network request to retrieve the specification. The docstring shows URL usage, but it does not warn that execution will contact external servers and transmit request metadata, so the network behavior lacks clear disclosure.
The generator creates directories and writes SKILL.md, claw.json, scripts/api.py, and references/endpoints.md, but provides no prior disclosure that running generation will modify the filesystem. Although the script prints output paths afterward, there is no confirmation prompt or pre-action warning in the code comments/docstrings for this safety-relevant behavior.
No suspicious patterns detected.