Back to skill

Security audit

Dataify Bing Images

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real Bing Images search wrapper, but its API-token handling is risky enough that users should review it before installing.

Review the credential handling before installing. Prefer setting DATAIFY_API_TOKEN only for the current session or through a credential manager, avoid the --token command-line option, do not paste real tokens into chat, and do not put tokens in shell startup files unless you accept the plaintext exposure risk.

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

Warning
Location
scripts/bing_images.py:979
Finding

API Token Can Be Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/bing_images.py:921
Finding

API Token Is Unnecessarily Copied into the Process Environment

Content
View full analysis
str: token = args.token or os.getenv("DATAIFY_API_TOKEN") if not token: raise MissingTokenError( "DATAIFY_API_TOKEN is missing. Configure a Dataify API token before continuing." ) token = token.strip() if not token.lower().startswith("bearer "): token = f"Bearer {token}" os.environ["DATAIFY_API_TOKEN"] = token return token ``` The exception text above is an English translation of the localized source string; the credential-handling logic is unchanged. ### Technical Analysis After resolving and normalizing the credential, the function writes the complete bearer token back into `os.environ`. This assignment is not required because the normalized token is returned directly and passed to `call_api()`. Environment variables are inherited by child processes unless explicitly removed. The current script does not launch subprocesses, which limits immediate exploitability. However, mutating the environment unnecessarily increases exposure if the module is imported by another application, if later revisions add subprocess execution, or if surrounding runtime instrumentation captures process environments. The assignment also changes the environment variable from its original token form to a bearer-header value, creating an undocumented global side effect. ### Attack Path 1. The script obtains the Dataify credential from `--token` or `DATAIFY_API_TOKEN`. 2. `resolve_token()` stores the normalized bearer credential in the process environment. 3. The module is used in a host process that subsequently launches a child process, or an environment-collection mechanism inspects the process. 4. The child process or collector receives the credential despite ...[truncated 661 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Documentation Encourages Persistent Plaintext Storage of the API Token

Content
View full analysis
> ~/.bashrc source ~/.bashrc ``` ```bash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.zshrc source ~/.zshrc ``` ### Technical Analysis The documentation recommends placing the API token directly in persistent user-level environment configuration or shell startup files. On Unix-like systems, this stores the secret as plaintext in `.bashrc` or `.zshrc`. The literal token may also remain in shell history because it is embedded directly in the setup command. On Windows, the recommended persistent user environment variable can be inherited by unrelated applications running as that user and may be accessible to processes or diagnostics that inspect user environment configuration. These instructions conflict with the primary Skill documentation, which directs the agent to prefer session-scoped setup. Persistent storage is not required to perform an image search and increases the duration and number of contexts in which the credential is exposed. This is not evidence of a malicious system-persistence mechanism: the commands do not install a backdoor, service, or scheduled task. The security issue is persistent plaintext credential handling. ### Attack Path 1. A user follows the documented setup command and substitutes the real Dataify API token. 2. The token is written to a shell startup file or persistent user environment configuration. 3. The setup command may additionally remain in shell history, terminal capture, or support logs. 4. A local process, another user with access to the account's files, a backup operator, or malware reads the ...[truncated 735 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 (17)

Tainted flow: 'request' from os.getenv (line 948, 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_images.py (reported line 950)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

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
88% confidence
Finding

The skill uses sensitive capabilities—network access and reading an environment variable token—but does not declare any explicit tool scope or permissions boundary. That increases the chance the agent can invoke capabilities beyond what a reviewer or runtime policy expects, weakening least-privilege controls and making credentialed external calls less transparent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction includes a hard-coded Chinese example for user-facing updates, which can cause the agent to respond in a language the user did not request. While not a direct security exploit, forcing unexpected language can mislead users about what action will be taken, reduce informed consent, and make review of outbound requests harder.

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

md
Read `DATAIFY_API_TOKEN` from the environment. Never display its value or ask the user to paste it into chat.

Detect the current operating system and shell before showing setup instructions. Never ask the user to paste the token into chat. After configuration succeeds, continue the original task without requiring the user to repeat it.

- If missing, offer https://dashboard.dataify.com/login?utm_source=skill and state that new accounts receive 50 free credits. Show only the session-scoped setup command appropriate to the current OS and shell.
- After the user says it is configured, verify only whether the variable is present, then continue the original request without making them repeat it.

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

md
Read `DATAIFY_API_TOKEN` from the environment. Never display its value or ask the user to paste it into chat.

Detect the current operating system and shell before showing setup instructions. Never ask the user to paste the token into chat. After configuration succeeds, continue the original task without requiring the user to repeat it.

- If missing, offer https://dashboard.dataify.com/login?utm_source=skill and state that new accounts receive 50 free credits. Show only the session-scoped setup command appropriate to the current OS and shell.
- After the user says it is configured, verify only whether the variable is present, then continue the original request without making them repeat it.

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
Read `DATAIFY_API_TOKEN` from the environment. Never display its value or ask the user to paste it into chat.

Detect the current operating system and shell before showing setup instructions. Never ask the user to paste the token into chat. After configuration succeeds, continue the original task without requiring the user to repeat it.

- If missing, offer https://dashboard.dataify.com/login?utm_source=skill and state that new accounts receive 50 free credits. Show only the session-scoped setup command appropriate to the current OS and shell.
- After the user says it is configured, verify only whether the variable is present, then continue the original request without making them repeat it.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L03 的描述是“当用户想使用 Bing 进行图片搜索时,使用此 skill。”,只给出高层意图,没有限定具体触发短语、上下文或排除条件。这样的描述对路由器来说过于泛化,容易覆盖普通对话中与图片搜索相关的表述,增加非预期调用的风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

L06 明确将该技能标注为“Bing Images 中文版”,全文也仅提供中文说明,但未说明这是可选语言版本,也未给出用户选择其他语言的方式。根据语言/地区策略,技能若隐含强制特定语言而无用户选择或合理限定,属于自然语言层面的策略问题。

Content

No source excerpt is available for this finding.

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 96)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
94% confidence
Finding

The document instructs the skill to send user search queries to an external third-party endpoint using bearer-token authentication, but it does not disclose that user-provided content and related request metadata leave the local agent boundary. This can cause unintentional data exposure, especially if users include sensitive terms, internal identifiers, or regulated data in search queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The user-facing descriptions, CLI help text, and error messages are predominantly in Chinese, with no option to select another language. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Most of the field descriptions and usage guidance are presented only in Chinese, which effectively forces a specific language for users of this reference. The policy allows locale constraints only when users are offered a choice or when the restriction is clearly documented and justified, neither of which appears here.

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_images.py (reported line 831)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", "imagesize", "color2", "photo", "aspect", "face", "age", "license"]:
        value = getattr(args, key, None)
        if value is not None:
            payload[key] = value

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a skill for searching Bing Images, but this code also reads the DATAIFY_API_TOKEN from the environment and writes a normalized bearer token back into os.environ. Credential handling is not inherently required by the user-facing purpose of 'search Bing Images' and represents an additional capability beyond simple query execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This script sends the parsed prompt-derived payload to an external Dataify endpoint, which includes the user's search query and potentially locale, country, and other request metadata. Although the module docstring says it calls the API, there is no runtime notice, confirmation, or explicit user-facing disclosure near execution that user-supplied data will be transmitted off-system.

Content

No source excerpt is available for this finding.