Back to skill

Security audit

Dataify Google Lens

Security checks for vulnerabilities and agentic risk

Overview

The skill coherently submits user-requested reverse-image-search parameters to Dataify, with some credential-handling and privacy caveats users should understand.

Install only if you are comfortable sending image URLs and selected search parameters to Dataify and using a Dataify API token. Configure the token through an environment variable or secret manager, avoid the --token command-line option, avoid private or signed image URLs unless necessary, and monitor account credits for API use.

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_lens.py:219
Finding

API Token Exposure Through Command-Line Arguments and Unnecessary Environment Mutation

Content
View full analysis

Vulnerability Details

File Location: scripts/google_lens.py:219, scripts/google_lens.py:442-448
Vulnerability Type: Insecure credential handling
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 permits a Dataify API token to be supplied through the --token command-line argument. Command-line secrets can be exposed through shell history, process inspection utilities, terminal or automation logs, telemetry, and error reports.

The get_authorization function also writes the normalized bearer credential back into os.environ. This assignment is unnecessary because the credential is already available in a local variable and can be passed directly to the HTTP request. The mutation increases the credential's exposure to process diagnostics and any child process that may be added or launched if the script is imported or extended. It also unexpectedly changes the variable from a raw token to a Bearer ... value.

Sending the credential in the Authorization header to the fixed HTTPS endpoint is necessary for the declared API functionality and is not itself the vulnerability. The issue is the avoidable local exposure created before transmission.

Attack Path

  1. A user or automation system invokes the script with a command such as python3 scripts/google_lens.py --token SECRET ....
  2. The complete command may be recorded in shell history, execution logs, Agent telemetry, or process metadata.
  3. A local user or monitoring component ...[truncated 971 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the --token command-line option and read the credential only from DATAIFY_API_TOKEN or an approved secret-management facility.
  2. Do not assign the normalized token back to os.environ. Normalize it in a local variable and return that value directly.
  3. If interactive token entry is required, use getpass.getpass() so the value is not echoed or placed in shell history.
  4. Ensure application logs, exceptions, telemetry, previews, and HTTP debugging output redact both raw tokens and values prefixed with Bearer .
  5. Document that credentials must never be passed as command-line arguments or pasted into chat.
  6. Prefer short-lived, revocable, and least-privileged API tokens where supported.
  7. A hardened implementation should follow this pattern:
python
def get_authorization() -> str | None:
    token = clean_value(os.environ.get("DATAIFY_API_TOKEN"))
    if not token:
        return None
    if not token.lower().startswith("bearer "):
        token = f"Bearer {token}"
    return token
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose describes an end-user search capability: running Google Lens or reverse-image search from an image. The actual code chunk does not perform any image handling, reverse-image search, Google Lens interaction, network requests, or Google Images operations. Instead, it is a documentation/CLI support script for previewing request parameters by reading local files and formatting a markdown table. This is a materially different primary purpose, so the description does not accurately represent the supplied code.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill invokes a local Python script, checks environment variables, reads local reference files, and submits requests to an external API, but it does not declare any explicit tool scope or allowed-tools boundary. This weakens least-privilege controls and can let a host agent grant broader file, environment, or network access than users expect for a reverse-image-search skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to ask for confirmation using a Chinese sentence, which imposes a specific language regardless of the user's language preference. This is a natural-language locale policy issue because the file does not offer language choice or justify a Chinese-only interaction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is a Chinese-language skill document, but the 'Account CTA policy' section switches to English and includes required user-facing phrasing such as 'New accounts receive 50 free credits.' That creates a language-consistency issue and may cause the agent to respond in English to Chinese-speaking users without offering a language choice.

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 97)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 91)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 99)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 93)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
91% confidence
Finding

The documentation instructs the agent to present request fields before sending data to a third-party API, but it does not require a privacy warning that the image URL and optional locale/query parameters will be transmitted externally. This can cause users to unknowingly disclose sensitive image links, search refinements, or region/language metadata to an outside service, which is especially relevant for reverse-image search workflows.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

L23 says to ask the user to confirm parameters before the API call. However, L81-L83 later state that for clear, low-risk requests the skill should execute directly without waiting for confirmation and only ask in limited cases. This is an active contradiction in the skill's own instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The token-missing message is written only in Chinese, while the rest of the script and CLI are otherwise usable in English. This creates a language/locale constraint in natural-language output without user opt-in or a documented region-specific justification.

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_lens.py (reported line 400)May include surrounding context.

python
params[key] = cleaned

    for field in 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
94% confidence
Finding

This code emits Chinese-only error messages in SystemExit strings for invalid --params-json input. The stated policy flags language or locale constraints when a skill forces a specific language without user opt-in, and no alternative language selection or justification is present in this file.

Content

No source excerpt is available for this finding.