T09 · Insecure Skill Coding Practices
- Location
scripts/list_openapi_meta_apis.py:28- Finding
Path Traversal Through Unvalidated Output Filename Components
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed Alibaba Cloud BDRC management helper, but users should handle cloud credentials and mutating operations carefully.
Install only with least-privilege Alibaba Cloud credentials. Review planned BDRC mutations before execution, avoid saving secrets in logs or evidence files, and use safe product/version values or the defaults for the metadata script until filename validation is added.
scripts/list_openapi_meta_apis.py:28Path Traversal Through Unvalidated Output Filename Components
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def fetch_json(url: str, timeout: int) -> dict:
req = urllib.request.Request(url, headers={"User-Agent": "codex-skill"})
with urllib.request.urlopen(req, timeout=timeout) as resp:
return json.loads(resp.read().decode("utf-8"))
The skill is presented as a manager for Backup and Disaster Recovery Center operations, but the documented quickstart and behavior focus on OpenAPI metadata discovery and writing local artifacts rather than direct BDRC resource management. This mismatch can mislead operators and policy systems about what the skill actually does, which is dangerous because hidden or undocumented behavior can bypass expected review boundaries and lead to unanticipated network access or data collection.
The skill advertises executable workflows that rely on environment access, filesystem writes, and network/API calls, but it does not declare any explicit tool scope such as permissions or allowed-tools. This increases the risk of overbroad execution because an agent may invoke capabilities beyond what a reviewer or user expects, especially when cloud credentials and remote API access are involved.
The skill instructs the agent to source Alibaba Cloud credentials from environment variables and shared credential files, but it does not include a clear warning against exposing, logging, copying, or persisting those secrets. In a skill that performs networked cloud operations and writes artifacts to disk, missing secret-handling guidance raises the chance of accidental credential disclosure through logs, evidence files, or debugging output.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
output_dir.mkdir(parents=True, exist_ok=True)
url = (
f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
f"/versions/{args.version}/api-docs.json"
)
payload = fetch_json(url, timeout)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
output_dir.mkdir(parents=True, exist_ok=True)
url = (
f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
f"/versions/{args.version}/api-docs.json"
)
payload = fetch_json(url, timeout)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
output_dir.mkdir(parents=True, exist_ok=True)
url = (
f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
f"/versions/{args.version}/api-docs.json"
)
payload = fetch_json(url, timeout)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
output_dir.mkdir(parents=True, exist_ok=True)
url = (
f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
f"/versions/{args.version}/api-docs.json"
)
payload = fetch_json(url, timeout)
No suspicious patterns detected.