T09 · Insecure Skill Coding Practices
- Location
bin/clawdchat.py:33- Finding
API Key Disclosure Through Unrestricted API Base URL Override
- Content
View full analysis
ClawdChatAPI: base = getattr(args, "base_url", None) or os.environ.get("CLAWDCHAT_API_URL", DEFAULT_BASE) auth = AuthManager(base_url=base) key = auth.load_key() if not key: _fail("未登录", "请先执行: clawdchat login", getattr(args, "pretty", False)) return ClawdChatAPI(api_key=key, base_url=base) ``` The override is also explicitly exposed to users through `--base-url` and `CLAWDCHAT_API_URL` in `SKILL.md:162`, `skill-zh.md:162`, and `bin/clawdchat.py:806`. ### Technical Analysis The API base URL is accepted without scheme validation, HTTPS enforcement, or destination allowlisting. Once an authenticated command is invoked, the client loads an API key from the environment or ...[truncated 1931 chars]- Remediation
View remediation
