Back to skill

Security audit

my_acceptance_rate_analysis_new

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent analytics purpose, but it embeds and auto-discovers credentials, can send them to an unrestricted endpoint, and persistently logs raw business query data.

Review before installing. This skill should only be used in a controlled internal environment after the embedded token is revoked/removed, endpoint destinations are allowlisted, ambient credential discovery is disabled or explicitly approved, and raw debug logging is off by default or redacted.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dataworks_client.py:17
Finding

Hardcoded DataWorks Access Token in Source Code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dataworks_client.py:200
Finding

Automatically Discovered Credentials Can Be Transmitted to an Arbitrary Endpoint

Content
View full analysis
str: for env_name in ( "BIGDATA_ACCESS_TOKEN", "bigdata_access_token", "DATAWORKS_METRIC_QUERY_ACCESS_KEY", "dataworks_metric_query_access_key", ): value = os.getenv(env_name) if value: return value env_path = Path.home() / ".openclaw" / ".env" if env_path.exists(): for line in env_path.read_text(encoding="utf-8").splitlines(): if "=" not in line: continue key, raw_value = line.split("=", 1) if key.strip() in { "BIGDATA_ACCESS_TOKEN", "bigdata_access_token", "DATAWORKS_METRIC_QUERY_ACCESS_KEY", "dataworks_metric_query_access_key", }: value = raw_value.strip().strip('"').strip("'") if value: return value return DEFAULT_ACCESS_TOKEN def resolve_access_token(explicit_token: str | None) -> str: if explicit_token: return explicit_token return load_token_from_known_locations() ``` Each analysis subcommand exposes an endpoint override: ```python primary_parser.add_argument("--access-token", default="") primary_parser.add_argument("--endpoint", default="") ``` The resolved credential is sent to that endpoint without a scheme or hostname allowlist: ```python response = httpx.post( endpoint or DEFAULT_ENDPOINT, headers={ "Cookie": f"bigdata_access_token={access_token or DEFAULT_ACCESS_TOKEN} ...[truncated 2504 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dataworks_client.py:221
Finding

Raw Business Query Data Is Persistently Logged by Default

Content
View full analysis
None: DEBUG_LOG_FILE.parent.mkdir(parents=True, exist_ok=True) logger.remove() logger.add( DEBUG_LOG_FILE, level="DEBUG", format="{time:YYYY-MM-DD HH:mm:ss.SSS} | {level:<8} | {name}:{function}:{line} - {message}", encoding="utf-8", mode="a", ) run_session_id = datetime.now().strftime("%Y%m%d_%H%M%S_%f") logger.info("========== 调试会话开始 run_session_id={} log_file={} ==========", run_session_id, str(DEBUG_LOG_FILE)) ``` Request payload logging is enabled by default: ```python if os.getenv("DATAWORKS_QUERY_LOG", "1").strip().lower() not in {"0", "false", "no"}: logger.info( "[query_metric_data] POST {}\n{}", endpoint or DEFAULT_ENDPOINT, json.dumps(payload, ensure_ascii=False, indent=2), ) ``` The complete SQL and raw response rows are also logged: ```python if os.getenv("DATAWORKS_QUERY_LOG", "1").strip().lower() not in {"0", "false", "no"}: logger.info( "[query_metric_data] 响应摘要 {}", json.dumps( { "code": raw_payload.get("code"), "row_count": len(data_list), "column_head_list": column_head_list, }, ensure_ascii=False, default=str, ), ) logger.info( "[query_metric_data] 响应原始数据 {}", json.dumps( { "sql": data.get("sql"), "column_head ...[truncated 2325 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (22)

Tainted flow: 'DEFAULT_ENDPOINT' from os.getenv (line 12, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The request target is taken from an environment-controlled endpoint and used directly in an authenticated httpx.post call, while the same request includes a bearer-equivalent authentication cookie. If an attacker can influence the environment or runtime configuration, they can redirect requests and exfiltrate both the query payload and the access token to an attacker-controlled server.

Content

Scanner excerpt · scripts/dataworks_client.py (reported line 200)May include surrounding context.

python
json.dumps(payload, ensure_ascii=False, indent=2),
        )

    response = httpx.post(
        endpoint or DEFAULT_ENDPOINT,
        headers={
            "Cookie": f"bigdata_access_token={access_token or DEFAULT_ACCESS_TOKEN}",

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose is a narrowly scoped acceptance-rate root cause analysis skill, but the detected behavior includes generic remote metric querying, use of cookie-based access tokens to reach external services, and logging of requests/raw responses. That mismatch is dangerous because it hides sensitive external data access and potential credential handling behind a benign analytics description, reducing operator scrutiny and increasing the chance of data leakage.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 本 `SKILL.md` 是该技能的唯一主契约,决定阶段执行顺序、判定口径、展示字段和下钻规则。

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Debug logging to a local file occurs without a clear warning and is likely to capture sensitive query details. Because this is automatic and persistent, it materially increases confidentiality risk in shared or managed execution environments.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

Reading ~/.openclaw/.env is a form of ambient credential access from a user-controlled secrets store. In an agent skill, this behavior is especially sensitive because it reaches beyond provided inputs to harvest credentials that can then be used for network access, which is a classic credential-access pattern even if the apparent goal is operational convenience.

Content

Scanner excerpt · scripts/acceptance_rate_analysis.py (reported line 587)May include surrounding context.

python
if value:
            return value

    env_path = Path.home() / ".openclaw" / ".env"
    if env_path.exists():
        for line in env_path.read_text(encoding="utf-8").splitlines():
            if "=" not in line:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code embeds a default access token directly in source and uses it automatically for authenticated requests. Hardcoded secrets are easily leaked through source control, logs, builds, or reuse in other environments, and they create unauthorized access risk if the code is shared beyond its intended boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

A built-in default token causes authenticated access to occur without explicit operator awareness or consent. In an analytics skill, that is especially risky because routine use can mask secret misuse, expand blast radius across environments, and enable unintended data access whenever the module is imported and called.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill documentation defines execution behavior and shell commands that can invoke scripts with capabilities implying environment access, file reads, and remote data access, yet it declares no explicit tool scope or permission boundaries. Without an allowlist, an agent may execute the skill with broader-than-necessary privileges, increasing the risk of unauthorized data access or unintended external calls.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation phrases are broad enough to match common business-analysis requests, which can cause the skill to trigger in contexts not intended by the user. In this skill's context, overbroad triggering is more dangerous because the skill appears capable of remote data retrieval and multi-stage analysis, so accidental activation could expose sensitive operational data or launch unnecessary external queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest content is entirely written in Chinese and the default prompt prescribes response behavior in Chinese business phrasing, but it does not offer the user any language choice or indicate that Chinese is optional. This can violate language/locale policy when users have not opted into Chinese output.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script enables persistent debug logging to a local file on every run and records detailed execution traces. In this skill, those traces can include query metadata and business data, creating a durable local artifact that may expose sensitive operational information to other users, processes, or later collection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-facing strings throughout the script, including errors, summaries, CLI descriptions, and business-view outputs, are consistently hard-coded in Chinese with no language selection mechanism. This imposes a specific language/locale on all users without offering a choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill silently searches multiple environment variables and a user home directory .env file for access tokens, even when no explicit token was provided. In an agent-skill context, that broad credential discovery exceeds the apparent analytics task and can cause unintended credential use or exposure, especially if combined with logging, errors, or downstream transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill obtains credentials from environment variables and a local .env file without clear disclosure to the user. In an agent setting, undisclosed secret sourcing reduces transparency and may cause users to unknowingly authorize remote access with ambient credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script sends analysis filters and business context to a remote metric-query service without any user-facing warning. Although remote querying is part of the tool's function, the lack of disclosure is risky because users may not realize their time windows, slice conditions, and related business metadata are leaving the local environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code builds debug snapshots containing raw payloads, SQL, filters, column metadata, and row data, despite comments suggesting raw query details are not returned upstream. This creates a direct data-exposure path because sensitive query context and result sets can be persisted or surfaced during failures, undermining data-minimization expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file contains hard-coded Chinese output text such as the unit suffix "万" and many later user-facing strings, indicating the skill is designed to respond in a specific language. Under the policy, language constraints should not be forced unless the user is given a choice or the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The inline comment states that the request-body JSON does not contain Cookie/token, implying a safer or less sensitive operation, but the actual request includes a Cookie header carrying the access token. While the token is not in the JSON body specifically, the documentation is misleading about the sensitivity of the outbound request and can cause incorrect assumptions during auditing or operation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Comments and visible log/error strings such as '请求体 JSON 不含 Cookie/token', 'DataWorks 查询失败', and '响应原始数据' indicate a fixed Chinese-language user/operator experience. The file does not offer language selection or explain that the skill is intentionally limited to a Chinese locale.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Verbose logging is enabled by default and records full query payloads plus raw response rows. Because this module queries business metrics data, those logs can expose sensitive user-provided filters, internal SQL, and returned records to log sinks, support staff, or other systems not authorized to access the underlying data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function sends data to a remote endpoint with an authentication cookie, which can expose user or system data to an external service. Although debug logging exists, it is not a user-facing warning or confirmation about the network transmission itself.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The comment states that from the first stage onward, logic is unified around extracted helpers so stage logic depends only on an external module. In reality, this file still contains local definitions of the same helpers above and continues to use helper names that are rebound via import, so the documentation overstates the architectural separation actually present in the file.

Content

No source excerpt is available for this finding.