T07 · Tool Hijacking and Spoofing
- Location
scripts/run.py:9- Finding
External Python Module Path Can Override the Bundled Bootstrap Module
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s stated outcome-recording purpose is plausible, but it handles an API key and seller metrics with broader cloud execution code and under-scoped endpoint/import controls.
Install only if you trust the Yufluent endpoint configuration and the local skills/_shared directory. Avoid setting TOKENAPI_BASE_URL to any untrusted or remote HTTP server, and confirm the payload before sending seller metrics.
scripts/run.py:9External Python Module Path Can Override the Bundled Bootstrap Module
scripts/yufluent_api.py:21Bearer Credential and Seller Analytics Can Be Sent to an Insecure or Untrusted Endpoint
requirements.txt:1Open-Ended Dependency Version Prevents Reproducible and Integrity-Verified Installation
The module allows the HTTP destination to be derived from TOKENAPI_BASE_URL/environment input and sends the bearer API key in the Authorization header to that URL. If an attacker can influence the environment or caller-supplied base_url, they can redirect requests to an attacker-controlled host and exfiltrate credentials and outcome data; the default use of plain HTTP for localhost also weakens transport assumptions.
}
if body is not None:
kwargs["json"] = body
return requests.post(url, **kwargs)
def _raise_for_status(resp: requests.Response) -> None:
The documentation explicitly says the skill does not use /v1/skills/*/run and only posts to /v1/agent/outcomes, but the detected behavior suggests it can invoke arbitrary skills and agent-turn orchestration through more general Yufluent client paths. That creates a significant trust violation: a user approving a simple outcome-registration helper could unknowingly grant a general-purpose remote execution/orchestration surface.
The documentation explicitly says the skill does not use /v1/skills/*/run and only posts to /v1/agent/outcomes, but the detected behavior suggests it can invoke arbitrary skills and agent-turn orchestration through more general Yufluent client paths. That creates a significant trust violation: a user approving a simple outcome-registration helper could unknowingly grant a general-purpose remote execution/orchestration surface.
The documentation explicitly says the skill does not use /v1/skills/*/run and only posts to /v1/agent/outcomes, but the detected behavior suggests it can invoke arbitrary skills and agent-turn orchestration through more general Yufluent client paths. That creates a significant trust violation: a user approving a simple outcome-registration helper could unknowingly grant a general-purpose remote execution/orchestration surface.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 快速开始(3 步,60 秒)
1. **注册获取 API 密钥** → https://claw.changzhiai.com/login (新用户即送体验积分,无需绑卡)
2. **设置环境变量**:export TOKENAPI_KEY=*** 或写入 .env 文件
3. **运行**:参照下方 Examples 示例执行 python scripts/run.py ...
> 还没注册?前往 https://claw.changzhiai.com/login 免费获取密钥。
The advertised skill scope is outcome recording only, but this module also exposes generic skill execution through /skills/{skill_id}/run and /agent/turn. That scope expansion materially increases privilege and abuse potential, because any consumer expecting a narrow telemetry helper can instead use it to trigger arbitrary remote skill execution with the same tk-* credential.
The '何时使用' section says to use the skill when a user says phrases like 'Listing 上架了' or '这周卖了 N 单', which are common conversational statements and not clearly bounded trigger conditions. The file does not provide exclusions, negative examples, or tighter constraints beyond the presence of a prior run_id in the conversation, so the activation scope remains ambiguous.
The skill declares runtime-affecting capabilities such as environment variable access, file interaction, and outbound network use, but does not explicitly scope or constrain allowed tools/permissions in the manifest. That weakens sandboxing and reviewability, making it easier for a supposedly narrow outcome-recording skill to access broader resources than users or operators expect.
The trigger phrases are broad and conversational, which can cause the skill to activate in contexts where the user did not intend to submit outcome data. In a skill that can access credentials and make network requests, accidental invocation can lead to unintended data transmission or confusing side effects.
The module docstring and argparse help text are written entirely in Chinese, which imposes a specific language on users of the skill. Under the policy, language constraints should either be optional/opt-in or clearly justified as region-specific; this file provides neither.
This code file contains natural-language text that presents the skill as Chinese-only ('Yufluent 技能云端薄客户端') and all user-facing messages in the file are likewise Chinese, with no indication that users can opt into another language. Under the policy, forcing a specific language without user choice or a documented region-specific justification is a natural-language policy violation.
The inline comments/docstrings describe a narrow transport fallback for skill execution, but in context the skill manifest says this package should only post outcomes and not use /v1/skills/*/run. These comments frame the behavior as an implementation detail while the code actually introduces an alternate orchestration path that can execute skills, contradicting the package’s stated intent and documentation scope.
The dependency specification uses a lower-bound only constraint (requests>=2.31.0) rather than pinning to a specific vetted version. This makes builds non-reproducible and can unexpectedly pull in vulnerable or behavior-changing releases, which is a real supply-chain risk even if no exploit is guaranteed from this file alone.
requests>=2.31.0
Because requests is unpinned, it is impossible to verify from this manifest whether deployment will use a release affected by known advisories. In a skill that submits outcome data over HTTP APIs and may handle authentication tokens (tk-*), using an affected requests version could increase the chance of credential leakage or other client-side request handling issues.
The natural-language strings in the module docstring and function docstrings are written only in Chinese, which indicates a language-specific skill context without offering any user language choice or documenting a justified locale restriction. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.
No suspicious patterns detected.