Back to skill

Security audit

Dataify Google Videos

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Google Videos API helper, but it needs Review because its credential handling can expose parts of a Dataify API token.

Install only if you are comfortable giving this skill access to a Dataify API token and sending searches to Dataify. Configure the token through DATAIFY_API_TOKEN, avoid passing tokens on the command line or in chat, and avoid preview output with real credentials until the token masking issue is fixed.

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/google_videos.py:143
Finding

API Token Exposure Through Command-Line Arguments

Content
View full analysis
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 the complete Dataify API token to be supplied using the `--token` command-line option. Command-line arguments are not an appropriate secret transport mechanism because they may be exposed through: - Operating-system process inspection utilities. - Shell command history. - Agent execution traces and debugging output. - Terminal session recording. - Process monitoring or audit infrastructure. The safer `DATAIFY_API_TOKEN` environment-variable path is already supported, so accepting the token through a command-line argument is not necessary for the declared Google Videos search functionality. The function also writes the normalized token back into `os.environ`. This mutation is unnecessary because the normalized token can be passed directly to the request function. Although this does not persist the token outside the process by itself, it increases the number of places inside the process from which child code or subsequently invoked libraries could retrieve the credential. ### Attack Path 1. A user or agent invokes the script using a command such as: ```bash python3 scripts/google_videos.py --token SECRET_TOKEN --q "electric cars" ``` 2. The complete token becomes part of the process command line. 3. A local user, monitoring proce ...[truncated 644 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/google_videos.py:475
Finding

Partial API Token Disclosure in Parameter Preview

Content
View full analysis
str: token = get_authorization(token_arg) if not token: return "missing" bare = re.sub(r"^bearer\s+", "", token, flags=re.IGNORECASE) if len(bare) <= 8: return "provided (***)" return f"provided ({bare[:4]}...{bare[-4:]})" ``` ### Technical Analysis For tokens longer than eight characters, the preview function exposes the first four and last four characters. The resulting value is included in parameter-table output through `build_parameter_table`. This disclosure is unnecessary: the preview only needs to indicate whether authorization is configured. It also conflicts with the Skill policy in `SKILL.md`, which states that credentials must never be shown. A token fragment normally cannot be used independently to authenticate. However, it can identify or correlate a credential across chat transcripts, terminal logs, support records, and other partial disclosures. It also reduces the unknown token space if another vulnerability leaks the remaining portion. ### Attack Path 1. `DATAIFY_API_TOKEN` is configured in the environment or supplied through `--token`. 2. The script is executed with `--preview-table`. 3. `mask_authorization` reads the token and derives its first and last four characters. 4. The parameter table prints the token fragment. 5. Chat transcripts, terminal logs, or agent telemetry retain the fragment. 6. An observer correlates the fragment with other records or combines it with another partial disclosure. ### Impact Assessment This issue exposes eight token characters but does not, by itself, disclose the complete credential or grant authenticated API access. Its primary impact is credential correlation and incremental reduction of secrecy. The affected sco ...[truncated 218 chars]
Remediation
View remediation
str: return "provided" if get_authorization(token_arg) else "missing" ``` 2. Prefer a separate Boolean presence check that does not normalize, copy, or otherwise process the secret merely to render a preview. 3. Never display token prefixes, suffixes, lengths, hashes, or other stable credential identifiers. 4. Add automated tests confirming that preview output contains no substring of the configured token. 5. Review retained logs and transcripts and rotate credentials if meaningful token fragments have already been exposed. ]]>
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 (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a clear description-behavior mismatch. The declared purpose says the skill searches Google Videos, but the code shown is an auxiliary preview/inspection script for parameters. Its primary behavior is reading local files (references/api.md and scripts/.py), parsing markdown tables and constants, merging them with CLI-provided values, and printing a confirmation table. There is no implementation of Google Video search, no outbound requests, and no handling of video search results. The code’s capabilities are materially different from the declared end-user function, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs the agent to access environment variables, local files, and the network, but it declares no explicit tool scope or permission boundaries. This creates an over-privileged execution model where the agent may use sensitive capabilities implicitly, making review, sandboxing, and least-privilege enforcement 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 94)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 89)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 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 91)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

This code emits user-facing CLI errors only in Chinese (不是有效 JSON, 必须是 JSON object), which imposes a specific language on users. The policy allows locale constraints only when the skill offers language choice or clearly documents a justified regional limitation, neither of which is present in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The table headers shown to users are entirely in Chinese (参数名, 当前值, 默认值, 说明), which enforces a specific locale in normal operation. Under the stated policy, this is a natural-language locale restriction unless the user can choose the language or the limitation 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
93% confidence
Finding

The file is a Chinese-language skill, but the 'Account CTA policy' section switches to English-only operational instructions. This creates a locale-policy inconsistency because the skill does not offer a language choice or explain why this section must be in English.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The module docstring at L003 and argparse description at L141 state that the script calls the Google Videos API and prints the raw response body. However, the implementation includes --preview-table and --dry-run modes at L147-L156 and branches in main at L554-L560 that avoid the API call and output local diagnostic data instead. This is a documentation-to-code contradiction rather than a mere omitted detail because the documented behavior is specifically narrower than the implemented modes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The token-missing message is hard-coded in Chinese, which imposes a specific language on users regardless of their locale or preferences. The file does not offer any opt-in, fallback, or documented justification for this locale constraint.

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_videos.py (reported line 420)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

Static analysis

No suspicious patterns detected.