T09 · Insecure Skill Coding Practices
- Location
scripts/dataworks_client.py:197- Finding
Authentication Cookie Can Be Forwarded to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs the promised analytics, but it handles browser access tokens in ways that can persist or expose them, so it needs careful review before use.
Install only after reviewing token handling. Prefer a version that removes endpoint overrides or allowlists the DataWorks host, keeps tokens in memory or a secure credential store, disables raw query logging by default, and avoids passing tokens on the command line. Users who already ran this should remove persisted BIGDATA_ACCESS_TOKEN values and consider rotating the browser-derived token.
scripts/dataworks_client.py:197Authentication Cookie Can Be Forwarded to an Arbitrary Endpoint
scripts/acceptance_rate_analysis.py:152Browser Authentication Token Is Automatically Persisted in Plaintext
scripts/dataworks_client.py:188Raw Business Query Results and Generated SQL Are Logged by Default
The request target can be overridden from an environment variable or function argument, while the code always attaches the bigdata access token in the Cookie header. If an attacker can influence deployment environment, runtime configuration, or upstream caller input, they can redirect requests to an attacker-controlled endpoint and exfiltrate the token and query payload. In this analytics skill context, the function is specifically designed to access sensitive internal data, which increases the danger of SSRF-style redirection and credential leakage.
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}",
The documented purpose is narrow acceptance-rate analysis, but the instructions effectively grant a general remote querying workflow using browser-derived cookies and external data APIs, with possible logging of query inputs and returned data. This broader capability increases the risk of sensitive data exfiltration and misuse under the guise of a benign analytics skill.
The documented purpose is narrow acceptance-rate analysis, but the instructions effectively grant a general remote querying workflow using browser-derived cookies and external data APIs, with possible logging of query inputs and returned data. This broader capability increases the risk of sensitive data exfiltration and misuse under the guise of a benign analytics skill.
Referenced artifact was not completely inspected
**计算口径的唯一事实来源是代码**:阈值、门禁公式、命中与候选范围逻辑以 `scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。*
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
scripts/acceptance_rate_constants.py` 与 `scripts/acceptance_rate_support.py` / `scripts/acceptance_rate_analysis.py` 为准。**禁止**凭本文件背诵具体百分比、门槛数值或分支细节;若叙述中需要提及规则,只
Referenced artifact was not completely inspected
- 本 `SKILL.md` 的主职责是:**阶段顺序、终端调用方式、展示字段与顺序、状态块原样输出、对用户可用的业务话术边界(如不暴露内部码)**——不是第二份公式手册。
This skill persists BIGDATA_ACCESS_TOKEN into Windows user environment or Unix shell profiles, which exceeds the expected read-only scope of an acceptance-rate analysis tool. Persisting a browser-derived access token to long-lived user storage increases the blast radius of credential theft, exposes the token to other local processes/sessions, and creates a covert state-changing side effect users may not expect from analytics code.
The function explicitly guides users to obtain an access token from browser cookies, which is credential acquisition behavior. In the context of a data-analysis skill, this is more dangerous because it conditions users to extract and reuse session credentials manually, and the same file later persists them, compounding the exposure risk.
def resolve_access_token(explicit_token: str | None) -> str:
"""
解析access token,优先级:
1. 显式传入的token
2. 当前终端环境变量中的token
3. 抛出错误,提示用户从浏览器 Cookie 获取 token 值
The skill declares no explicit tool scope while its instructions clearly require environment access, file reads/writes, and network access. That mismatch weakens least-privilege controls and can cause the agent to run with broader capabilities than users or platform policy would reasonably expect.
The skill encourages persistent storage and automatic reuse of a user-provided token without a clear user-facing warning about the security consequences. Users may unknowingly leave long-lived credentials in shell startup files or the Windows user environment, where other local processes or future sessions can access them.
The skill directs the agent to persist user-provided access tokens into process and user-level environment variables for reuse in future sessions. Persisting secrets beyond the immediate task expands their exposure window and makes compromise of the local account, shell config, or registry much more damaging.
Detected: suspicious.exposed_secret_literal