Back to skill

Security audit

my_acceptance_rate_analysis2

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to perform the stated acceptance-rate analysis, but it handles a browser cookie token in ways that create credential and business-data exposure risk.

Install only if you trust this publisher and the DataWorks endpoint, and understand that the skill may store a browser session token for future sessions and log sensitive query results. Prefer a short-lived scoped token, disable verbose query logging, avoid endpoint overrides, and remove any persisted BIGDATA_ACCESS_TOKEN from shell profiles or user environment storage when finished.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/acceptance_rate_analysis.py:104
Finding

Browser access token is automatically persisted in plaintext and can be sent to an environment-controlled endpoint

Content
View full analysis
None: import winreg with winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Environment", 0, winreg.KEY_SET_VALUE) as registry_key: winreg.SetValueEx(registry_key, "BIGDATA_ACCESS_TOKEN", 0, winreg.REG_SZ, token) _broadcast_windows_environment_change() ``` ```python def _persist_access_token_unix(token: str) -> None: profile_path = _unix_profile_path() profile_path.parent.mkdir(parents=True, exist_ok=True) if profile_path.exists(): existing_text = profile_path.read_text(encoding="utf-8") lines = existing_text.splitlines() else: existing_text = "" lines = [] export_line = f"export BIGDATA_ACCESS_TOKEN={shlex.quote(token)}" updated_lines: list[str] = [] replaced = False for line in lines: stripped = line.strip() if stripped.startswith("export BIGDATA_ACCESS_TOKEN="): updated_lines.append(export_line) replaced = True else: updated_lines.append(line) if not replaced: if updated_lines and updated_lines[-1].strip(): updated_lines.append("") updated_lines.append(export_line) new_text = "\n".join(updated_lines) if new_text and not new_text.endswith("\n"): new_text += "\n" if new_text != existing_text: profile_path.write_text(new_text, encoding="utf-8") ``` ```python def persist_access_token(token: str) -> str: normalized_token = str(token).strip() if not normalized_token: return "" _set_process_access_token(normalized_token) try: persist_access_token_for_future_sessions(normalized_token) ...[truncated 4084 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dataworks_client.py:188
Finding

Raw business query payloads, SQL, and response rows are logged by default

Content
View full analysis
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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (38)

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The request destination is controllable via the endpoint parameter or the DATAWORKS_METRIC_ENDPOINT environment variable, while the code always attaches the bigdata_access_token cookie. That creates a credential exfiltration/SSRF-like risk: if an attacker can influence configuration or call-site input, the token will be sent to an arbitrary host.

Content

Scanner excerpt · scripts/dataworks_client.py (reported line 197)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
97% confidence
Finding

The documented purpose is attribution analysis, but the skill also performs external API access using cookie-derived authentication and may log request/response data. If the implementation only provides generic data access/mapping rather than the claimed analysis, users may unknowingly authorize broad data retrieval and logging under a misleading business-facing description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented purpose is attribution analysis, but the skill also performs external API access using cookie-derived authentication and may log request/response data. If the implementation only provides generic data access/mapping rather than the claimed analysis, users may unknowingly authorize broad data retrieval and logging under a misleading business-facing description.

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 10)May include surrounding context.

md
**计算口径的唯一事实来源是代码**:阈值、门禁公式、命中与候选范围逻辑以 `scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。*

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 本 `SKILL.md` 的主职责是:**阶段顺序、终端调用方式、展示字段与顺序、状态块原样输出、对用户可用的业务话术边界(如不暴露内部码)**——不是第二份公式手册。

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code reads and modifies persistent shell profile files and Windows user environment settings to manage credentials, a capability unrelated to simple acceptance-rate analysis. This broadens the skill from read-only analytics into credential harvesting and host state modification, increasing the blast radius if the skill is misused or compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This code writes the credential to the Windows user environment registry and broadcasts the change, making the token persist across sessions and potentially visible to other user-context processes. Persisting credentials in environment variables is a weak storage practice because they are commonly exposed to child processes, diagnostics, and local inspection tools.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The Unix path appends an export line containing the access token into shell startup files such as .bashrc, .zshrc, or .profile, exposing the secret in plaintext on disk. Plaintext credentials in profile files are easy to leak through backups, dotfile syncing, support bundles, accidental commits, and other local tooling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill persists an access token into persistent user environment locations for future sessions, which exceeds the stated analytical purpose and creates long-lived credential exposure on the host. Any later process, shell session, local malware, or other skill running as the same user may be able to read and reuse the token, turning a one-time secret into a broadly accessible credential.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill explicitly instructs users to retrieve an access token from a browser cookie and pass it to the script, then combines that with automatic persistence behavior elsewhere. In the context of an analytics skill, handling bearer-style tokens sourced from browser cookies is especially sensitive because compromise of that token may grant direct API access under the user's identity.

Content

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

python
def resolve_access_token(explicit_token: str | None) -> str:
    """
    解析access token,优先级:
    1. 显式传入的token
    2. 当前终端环境变量中的token
    3. 抛出错误,提示用户从浏览器 Cookie 获取 token 值

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/acceptance_rate_analysis.py:3486