Back to skill

Security audit

Dataify Google Shopping

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Google Shopping API helper that sends user shopping queries to Dataify, with manageable credential and privacy hygiene notes.

Install only if you are comfortable sending shopping queries, filters, and any optional location data to Dataify. Prefer DATAIFY_API_TOKEN over the --token argument, never paste the token into chat, and avoid using this skill for bulk scraping or multi-page collection without reviewing cost and scope first.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/google_shopping.py:144
Finding

API Token Exposure Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/google_shopping.py, lines 144 and 447–452
Vulnerability Type: API credential exposure through process arguments and unnecessary environment mutation
Risk Level: Medium

Vulnerable Code

python
parser.add_argument("--token", help="Dataify API token. Bearer prefix is optional.")
python
def get_authorization(token_arg: str | None) -> str | None:
    token = clean_value(token_arg) or clean_value(os.environ.get("DATAIFY_API_TOKEN"))
    if not token:
        return None
    if not token.lower().startswith("bearer "):
        token = f"Bearer {token}"
    os.environ["DATAIFY_API_TOKEN"] = token
    return token

Technical Analysis

The script accepts a Dataify API token through the --token command-line argument. Credentials passed this way can be exposed in shell history, process listings, CI/CD logs, terminal recordings, command telemetry, and diagnostic reports.

The get_authorization function also writes the normalized bearer credential back to DATAIFY_API_TOKEN. This mutation is unnecessary because the value can be returned directly to the request function. It increases the credential's exposure within the process environment and may make it accessible to subsequently launched child processes if the implementation is extended.

Sending the authorization token to the fixed HTTPS endpoint https://scraperapi.dataify.com/request is necessary for the declared API-client functionality and is documented by the Skill. The vulnerability is therefore not the authorized network transmission itself, but the insecure optional mechanism for supplying and retaining the credential locally.

Attack Path

  1. A user or automation system invokes the script using a command such as:
    bash
    python3 scripts/google_shopping.py --token SECRET_TOKEN --q "wireless headphones"
    
  2. The complete command, including SECRET_TOKEN, is ...[truncated 1045 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the --token argument and accept the credential only through DATAIFY_API_TOKEN or another protected secret-delivery mechanism.
  2. Do not write the normalized bearer token back into os.environ; normalize it in a local variable and return it directly.
  3. If command-line token support must temporarily remain for compatibility:
    • Mark it as deprecated.
    • Emit a warning that command-line arguments may be logged or visible to other local users.
    • Ensure documentation and examples never recommend it.
  4. For interactive use where environment variables are unsuitable, read the token without terminal echo using getpass.getpass().
  5. Configure CI/CD systems to inject the token through their protected secret facilities and mask it in logs.
  6. Rotate any token that may previously have been passed on the command line or captured in logs.
  7. Keep previews limited to indicating whether a token is present; never print any portion of the credential.
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The description says the skill should not be used for structured bulk extraction by keyword, yet the documented interface supports parameterized search, pagination-like offsets, raw output modes, and direct scraper API usage consistent with scalable extraction. This policy/behavior mismatch can mislead reviewers and users about the real capability, weakening governance and enabling prohibited scraping workflows under a benign description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description says the skill should not be used for structured bulk extraction by keyword, yet the documented interface supports parameterized search, pagination-like offsets, raw output modes, and direct scraper API usage consistent with scalable extraction. This policy/behavior mismatch can mislead reviewers and users about the real capability, weakening governance and enabling prohibited scraping workflows under a benign 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 18)May include surrounding context.

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Run commands from this skill directory, or use the absolute path to `scripts/google_shopping.py`.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs use of environment variables, local scripts, and outbound API calls, but it declares no explicit tool scope or permission boundaries. That creates an over-privileged execution model where an agent may access env, files, or network more broadly than intended, increasing the blast radius if the skill is modified, misused, or prompt-injected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L003 将“购物搜索/商品搜索/价格比较”列为触发条件,这些表述在普通对话中也很常见,且未给出边界或排除条件。缺少负例或更明确的上下文限制时,技能可能在用户泛泛讨论购物比较时被意外激活。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

文件名和内容整体强制采用 zh-CN 呈现,但文档中未说明这是可选语言,亦未提供用户语言选择机制。按规则,未经用户选择而固定语言/locale 可能构成自然语言策略违规。

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 103)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 98)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 105)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 100)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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Multiple user-facing descriptions and error/help strings are presented exclusively in Chinese, including parameter descriptions and runtime messages. The file does not offer a language choice or document that it is intentionally limited to Chinese users, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script forwards user-provided search terms and optional contextual data such as location, language, and encoded geolocation to an external third-party API. In a skill context, this can expose sensitive user interests or geographic data without clear consent or a prominent disclosure at the point of transmission, creating a privacy and data-handling risk rather than a memory-safety issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The parameter table uses Chinese-only column headers (参数名, 默认值, 说明) while the rest of the document is in English, effectively imposing a specific language presentation without user opt-in or justification. This matches the language/locale policy concern for natural-language content.

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/google_shopping.py (reported line 408)May include surrounding context.

python
params[canonical_key] = cleaned

    for field in BODY_FIELDS:
        value = clean_value(getattr(args, field))
        if value is not None:
            params[field] = value

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code emits user-facing error messages only in Chinese for invalid JSON input and type validation. That creates a language/locale policy issue because the skill does not offer the user any language choice or document a justified locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.