Back to skill

Security audit

Dataify Bing News

Security checks for vulnerabilities and agentic risk

Overview

This Bing News skill is mostly purpose-aligned, but it handles API tokens through unsafe channels and gives some insecure setup guidance.

Review this skill before installing. Use it only with a Dataify token you are comfortable granting to this search workflow, avoid putting tokens in chat or command-line arguments, prefer session-scoped secret setup, and rotate any token previously stored in shell profiles or pasted into prompts.

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

Warning
Location
scripts/bing_news.py:600
Finding

API Token Accepted Through Observable Input Channels and Unnecessarily Copied into the Process Environment

Content
View full analysis
str: token = args.token or os.getenv("DATAIFY_API_TOKEN") or extract_token(args.prompt) if not token: raise MissingTokenError( "缺少 DATAIFY_API_TOKEN。请提供 Dataify API token,或访问 https://dashboard.dataify.com/login?utm_source=skill 注册获取;新账号注册即得 50 免费积分。" ) token = token.strip() if not token.lower().startswith("bearer "): token = f"Bearer {token}" os.environ["DATAIFY_API_TOKEN"] = token return token ``` The command-line credential option is registered separately: ```python parser.add_argument("--token", help="API token for this run. Bearer prefix is added when missing.") ``` The prompt credential extractor used by `resolve_token()` is defined at lines 484–489: ```python def extract_token(prompt: str) -> str | None: match = re.search( r"(?:DATAIFY_API_TOKEN|api[_ -]?token|token|令牌|密钥)\s*(?:=|:|:|是|为)\s*((?:Bearer\s+)?[A-Za-z0-9._~+/=-]+)", prompt, re.IGNORECASE, ) return match.group(1).strip() if match else None ``` ### Technical Analysis The Skill's primary instructions specify that authentication should be read from the `DATAIFY_API_TOKEN` environment variable and explicitly state that users should never paste tokens into chat. The implementation nevertheless accepts the token through two additional channels: 1. The natural-language value supplied through `--prompt`. 2. The `--token` command-line argument. These channels provide no functional capability beyond reading the existing environment variable and expose credentials to additional systems. A token embedded in a natural-language request may be retained in conversation histories, agent tr ...[truncated 2294 chars]
Remediation
View remediation
str: token = os.getenv("DATAIFY_API_TOKEN") if not token: raise MissingTokenError( "DATAIFY_API_TOKEN is not configured. Set it in the current session without sharing it in chat." ) token = token.strip() if not token.lower().startswith("bearer "): token = f"Bearer {token}" return token ``` 4. Remove `os.environ["DATAIFY_API_TOKEN"] = token`. Pass the normalized token directly to `call_api()` and avoid making it available to possible child processes. 5. Ensure errors and diagnostics never print the token, authorization header, entire process environment, or unredacted command line. 6. Add tests confirming that: - A token embedded in `--prompt` is ignored. - `--token` is rejected as an unsupported argument. - Authentication succeeds only when `DATAIFY_API_TOKEN` is present. - Preview and dry-run modes never access or display credentials. 7. Rotate any token previously supplied through chat or command-line arguments because it may already exist in retained logs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.zh-CN.md:21
Finding

Localized Documentation Recommends Persistent Plaintext API Token Storage

Content
View full analysis
> ~/.bashrc source ~/.bashrc ``` ```bash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.zshrc source ~/.zshrc ``` ### Technical Analysis The localized guide explicitly recommends permanent environment-variable configuration. On Linux and macOS, this stores the API token as plaintext in `.bashrc` or `.zshrc`. These files are routinely read by shell processes and may be collected by backup software, endpoint diagnostics, configuration synchronization, support bundles, or malicious software operating under the same user account. On Windows, a persistent user environment variable likewise remains available across sessions and can be read by processes running in the user's security context. It is not equivalent to protected storage in an operating-system credential manager. These instructions conflict with the safer policy in `SKILL.md`, which says to show a session-scoped setup command first and to provide persistent setup only when requested. The issue is classified as insecure credential handling rather than system persistence because the documentation does not install a backdoor, scheduled task, startup service, or attacker-controlled hook. ### Attack Path 1. A user follows the localized setup instructions and places a real Dataify token in a shell startup file or persistent user environment variable. 2. The credential remains available across sessions after the Skill has finished. 3. Unrelated software, malware operati ...[truncated 978 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (18)

Tainted flow: 'request' from os.getenv (line 626, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/bing_news.py (reported line 628)May include surrounding context.

python
request = urllib.request.Request(DEFAULT_ENDPOINT, data=data, headers=headers, method="POST")
    try:
        with urllib.request.urlopen(request, timeout=timeout) as response:
            raw = response.read()
            text = raw.decode(response.headers.get_content_charset() or "utf-8", errors="replace")
            return 200 <= response.status < 300, text

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as Bing News search, but it actually routes requests through a third-party Dataify API and handles authentication material, which is a materially broader capability than declared. This can mislead users and reviewers about where data is sent and what sensitive inputs are processed, increasing the risk of unintended disclosure or trust-boundary violations.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · SKILL.zh-CN.md (reported line 40)May include surrounding context.

量,而不是只在当前终端临时设置。

Windows PowerShell,当前用户永久设置:

powershell
[Environment]::SetEnvironmentVariable("DATAIFY_API_TOKEN", "your_token_here", "User")

然后重新打开 PowerShell。如果当前会话也要立即生效,再执行:

powershell
$env:DATAIFY_API_TOKEN = "your_token_here"

macOS 或 Linux,bash 永久设置:

bash
echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.bashrc
source ~/.bashrc

macOS 或 Linux,zsh 永久设置:

bash
echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.zshrc
source ~/.zshrc

参考文件

  • references/ 目录下的 API 文档包含完整的字段列表和说明。
  • 当字段行为、允许的值或响应格式不明确时,请查阅参考文档。

注意事项

  • 始终使用 Content-Type: application/x-www-form-urlencoded 提交 API 请求。
  • 保持请求值为字符串类型。
  • 省略用户未请求的可选字段。

结果呈现

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes a local Python script, reads an environment variable containing an API token, and performs outbound network calls, yet it declares no tool scope or permissions boundary. This weakens reviewability and policy enforcement because operators and upstream systems cannot clearly constrain or audit the skill's access to sensitive runtime capabilities.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions at L28-L32 explicitly require running --preview, showing the table, and obtaining confirmation before any live API call. However, L80-L85 later instruct the agent to execute immediately for clear, low-risk, read-only requests and not pause for confirmation, which is a direct contradiction in the skill's own documentation about intended behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L03 使用“当用户需要运行 Bing 新闻搜索时,使用此 skill”作为触发描述,但没有给出更具体的触发短语、适用范围或不适用情形。该描述容易与一般性新闻查询或普通搜索请求重叠,可能导致技能被过度触发。

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## Account CTA policy

- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.zh-CN.md (reported line 80)May include surrounding context.

md
## Account CTA policy

- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
- For an invalid token, direct the user to API-key management without implying that a new registration is required. For insufficient credits, direct the user to balance or recharge management.
- During normal submission, processing, and successful completion, do not promote registration or the Dashboard. Never expose the token or include it in CTA attribution parameters.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.zh-CN.md (reported line 82)May include surrounding context.

md
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
- For an invalid token, direct the user to API-key management without implying that a new registration is required. For insufficient credits, direct the user to balance or recharge management.
- During normal submission, processing, and successful completion, do not promote registration or the Dashboard. Never expose the token or include it in CTA attribution parameters.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly instructs the agent to perform live external API calls and prescribes pre-call behavior, but it does not warn that user-provided queries and related parameters will be transmitted to a third-party service. In an agent skill context, this creates a real data exfiltration and privacy risk because users may supply sensitive prompts, identifiers, or confidential topics without understanding they leave the local environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The parameter descriptions and user-visible error/help text in this file are written in Chinese, which imposes a specific language on users regardless of their preference. The skill does not offer any language selection or document that it is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill parses API tokens directly out of natural-language prompt text, which expands the prompt's authority to include credential handling unrelated to normal news search semantics. In an agent setting, this increases the chance that secrets embedded in conversation text are unintentionally captured and then used or propagated, especially under prompt injection or transcript-mixing scenarios.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code not only extracts an API token from prompt text but also writes it back into DATAIFY_API_TOKEN in the process environment without explicit user warning or consent. In multi-step agent workflows, this can cause sensitive credentials to persist longer than intended and become available to other code paths, subprocesses, logs, or later actions within the same execution context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Line L55 uses a Chinese-language prompt example (用必应新闻搜索 OpenAI) without indicating that language choice is optional or user-driven. Because SQP-3 covers language or locale policy violations, this is a natural-language signal that may steer execution toward a specific language without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction requires output columns specifically as '参数名, 当前值, 默认值, 说明', which imposes a specific language on the user interaction. This is a natural-language policy issue because no user opt-in or language-selection mechanism is offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest narrowly describes searching Bing News for current news results, but the supported 'json' parameter explicitly allows returning 'JSON+HTML' or 'HTML'. Returning raw HTML is a broader scraping/output behavior than a typical news-results skill description implies, especially since the manifest does not mention HTML retrieval.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bing_news.py (reported line 524)May include surrounding context.

python
def apply_overrides(payload: dict[str, str], args: argparse.Namespace) -> dict[str, str]:
    for key in ["q", "json", "mkt", "cc", "first", "count", "qft", "safeSearch"]:
        value = getattr(args, key, None)
        if value is not None:
            payload[key] = value

Static analysis

No suspicious patterns detected.