Back to skill

Security audit

Yufluent Clawhub Publish Yufluentcn Compliance Guard

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed cloud compliance assistant, but it needs review because it can send the user's API token and business data to any configured API URL, including non-HTTPS endpoints.

Install only if you trust the Yufluent endpoint and can control TOKENAPI_BASE_URL. Use HTTPS for any remote API URL, keep TOKENAPI_KEY scoped and revocable, avoid shared writable install directories, and treat outputs as compliance references that need human verification.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/yufluent_api.py:20
Finding

Bearer Token and Sensitive User Data Can Be Transmitted over Plaintext HTTP

Content
View full analysis
str: base = (base_url or "").strip().rstrip("/") if not base: base = "http://localhost:8080/v1" if base.endswith("/v1"): return base return f"{base}/v1" ``` ```python def _auth_headers(api_key: str) -> dict[str, str]: return { "Authorization": f"Bearer {api_key}", "Accept": "application/json", } def _json_headers(api_key: str) -> dict[str, str]: return {**_auth_headers(api_key), "Content-Type": "application/json"} ``` ```python def _post_json( url: str, *, api_key: str, body: dict[str, Any] | None = None, timeout: float, ) -> requests.Response: kwargs: dict[str, Any] = { "headers": _json_headers(api_key) if body is not None else _auth_headers(api_key), "timeout": timeout, } if body is not None: kwargs["json"] = body return requests.post(url, **kwargs) ``` ```python root = base_url or os.getenv("TOKENAPI_BASE_URL", "") url = skill_run_url(root, skill_id) try: resp = _post_json(url, api_key=key, body=payload, timeout=timeout) ``` ### Technical Analysis The API URL normalization logic accepts arbitrary schemes and hosts without requiring HTTPS. The default HTTP endpoint is a loopback service, which can be appropriate for local development, but the same logic also permits a remotely hosted `http://` URL through `TOKENAPI_BASE_URL` or the `base_url` argument. Every request attaches `TOKENAPI_KEY` as a bearer credential and sends the full compliance payload. Depending on the command-line options, that payload can contain product descriptions, mat ...[truncated 1944 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/run.py:9
Finding

External Sibling Directory Can Shadow and Execute the Packaged Bootstrap Module

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/yufluent_api.py:66
Finding

User-Controlled Values Are Embedded into Fallback Agent Instructions without Structural Isolation

Content
View full analysis
dict[str, Any]: slots = { k: str(v) for k, v in payload.items() if v is not None and str(v).strip() } lines = [f"Execute the selected skill {skill_id} using the supplied parameters:"] for key, val in slots.items(): lines.append(f"- {key}: {val}") return { "user_message": "\n".join(lines), "react": False, "history": [], "session": { "pending_skill_id": skill_id, "slots": slots, "strategy_state": { "preferred_skill_locked": True, "skill_id": skill_id, }, }, "web_fast": True, } ``` The relevant request path is: ```python def _run_skill_via_agent_turn( skill_id: str, payload: dict[str, Any], *, api_key: str, base_url: str, timeout: float, ) -> dict[str, Any]: url = agent_turn_url(base_url) agent_timeout = max(timeout, 600.0) try: resp = _post_json( url, api_key=api_key, body=_build_agent_turn_body(skill_id, payload), timeout=agent_timeout, ) except requests.RequestException as exc: raise YufluentApiError(f"Agent turn request failed: {exc}") from exc ``` ### Technical Analysis The function preserves the payload as structured session slots, but it also serializes every value into a natural-language `user_message`. Values originate from user-controlled command-line arguments, including free-form `message`, `product`, and `context` fields. No escaping, delimiting, content typing, or newline restriction is applied before values are ...[truncated 2067 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (13)

Tainted flow: 'url' from os.getenv (line 271, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The code sends authenticated requests to a URL derived from TOKENAPI_BASE_URL or a caller-supplied base_url, with no validation of scheme, host, or allowlist. An attacker who can influence environment variables or invocation parameters can redirect requests to an arbitrary server and exfiltrate the Bearer API key and request payloads, which is a classic SSRF/credential-leak pattern.

Content

Scanner excerpt · scripts/yufluent_api.py (reported line 150)May include surrounding context.

python
}
    if body is not None:
        kwargs["json"] = body
    return requests.post(url, **kwargs)


def _raise_for_status(resp: requests.Response) -> None:

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the associated implementation reads arbitrary local files and encodes local images for upload while presenting itself as a compliance assistant, that is a material description-behavior mismatch. Users may provide sensitive business documents, local images, or paths under the assumption of narrow compliance processing, leading to unintended local data exfiltration to the cloud service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the associated implementation reads arbitrary local files and encodes local images for upload while presenting itself as a compliance assistant, that is a material description-behavior mismatch. Users may provide sensitive business documents, local images, or paths under the assumption of narrow compliance processing, leading to unintended local data exfiltration to the cloud service.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
## 快速开始(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 免费获取密钥。

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing instructions exclusively in Chinese, including the title, description, installation guidance, and usage examples. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not stated here.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares install steps, environment-variable use, and a cloud API workflow, but does not declare an explicit permission or allowed-tools scope. In agent platforms, missing scope boundaries can allow broader-than-expected file, environment, or network access and make review harder, especially when the skill instructs use of local scripts and cloud endpoints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list contains short generic phrases such as "帮我算关税", "HS 编码", "CE 认证", and "platform rules" that lack contextual constraints and could overlap with ordinary discussion rather than intentional invocation. This markdown does not provide exclusion conditions or negative examples to clarify when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language strings in the module and function docstrings are written only in Chinese and indicate intended CLI behavior without offering any language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The CLI sets --lang to zh by default, which means the skill will operate in Chinese unless the user explicitly overrides it. This is a natural-language policy concern because it forces a specific language choice rather than prompting for or neutrally inheriting user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file advertises multiple supported languages in metadata, but the primary user-facing instructions and workflow are written in Chinese, which can effectively impose a language preference without explicit opt-in. Under the policy, locale or language constraints should be offered as a clear choice unless justified as region-specific.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified as requests>=2.31.0 without an upper bound or exact pin, so builds are not reproducible and may resolve to different versions over time. This increases supply-chain risk and makes it harder to verify whether a deployed version contains known vulnerabilities or breaking changes.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.31.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

Because requests is unpinned, the manifest does not prove which release will actually be installed, so you cannot determine from this file alone whether the environment will pull a version affected by one of the known advisories. In a cloud-backed compliance assistant that may handle URLs, credentials, or external requests, this uncertainty increases the chance of exposure to dependency-related flaws if an unsafe version is resolved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings and the module docstring is written entirely in Chinese, with later user-facing error and instruction messages also hard-coded in Chinese. The policy only permits a fixed language when the skill offers a language choice or clearly documents a justified locale constraint, which is not present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.