Back to skill

Security audit

Dataify Instagram Profiles

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated purpose, but its helper script loads unaudited code from a sibling directory and gives it the Dataify API token.

Review this skill before installing. It needs a Dataify API token and sends Instagram usernames or profile URLs to Dataify; the main risk is that the packaged script loads monitoring code from a sibling directory outside this reviewed artifact and gives that code the token. Install only if you trust the companion dataify-task-operations runtime and the environment where both packages are stored.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/submit_dataify_instagram_profiles.py:11
Finding

External Sibling Runtime Can Hijack Execution and Access the API Token

Content
View full analysis

Vulnerability Details

File Location: scripts/submit_dataify_instagram_profiles.py, lines 11–14 and 210–216
Vulnerability Type: Untrusted external module loading and tool hijacking
Risk Level: High

Vulnerable Code

python
TASK_RUNTIME_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "dataify-task-operations", "scripts"))
if TASK_RUNTIME_DIR not in sys.path:
    sys.path.insert(0, TASK_RUNTIME_DIR)
from task_runtime import complete_task

The imported function is subsequently given the live API token:

python
if not args.no_wait:
    try:
        final_result = complete_task(task_id, api_token, args.wait_timeout)
    except RuntimeError as exc:
        print(str(exc), file=sys.stderr)
        return 1
    print(json.dumps(final_result, ensure_ascii=False, indent=2))

Technical Analysis

The script constructs a path to ../../dataify-task-operations/scripts, which is outside the audited Skill package, and inserts it at the beginning of sys.path. It then imports task_runtime without validating the module's canonical path, ownership, permissions, version, or cryptographic integrity.

Placing the external directory at index zero gives a task_runtime.py file in that location import precedence. Python executes module-level code immediately during import, so exploitation does not require the legitimate complete_task function to be called. Under the default wait behavior, the imported function also receives the live DATAIFY_API_TOKEN and task ID.

The asynchronous monitoring functionality is related to the Skill's declared purpose, but loading executable code from a mutable sibling directory and entrusting it with a bearer token exceeds the minimum privilege required. The monitored task could instead be handled by packaged, reviewed code or a pinned and verified dependency.

Attack Path

  1. An attacker obtains the ability to create or modify dataify-task-operations/scripts/task_runtime.py in ...[truncated 1780 chars]
Remediation
View remediation

Remediation Suggestions

  1. Package the task-monitoring implementation inside the audited Skill rather than importing it from a sibling directory.
  2. Remove the sys.path.insert(0, TASK_RUNTIME_DIR) modification. Use a normal package import from a trusted installation location.
  3. If a shared runtime is required, distribute it as a pinned dependency with an exact version and integrity hash through a trusted package source.
  4. Before loading any external runtime, resolve its canonical path and verify that it is the expected file under an approved, non-user-writable directory.
  5. Verify the runtime's cryptographic digest or signature against a trusted value before import or execution.
  6. Apply restrictive ownership and filesystem permissions so untrusted users, Skills, and processes cannot replace the runtime.
  7. Avoid passing the bearer token to a broad external helper. Expose only narrowly scoped operations or perform authenticated monitoring within reviewed code.
  8. Consider using a short-lived, task-scoped credential for monitoring if the Dataify API supports one.
  9. Add automated tests that fail when task_runtime resolves outside the approved package and security checks that detect import-path shadowing.
  10. Document the monitoring dependency and its trust boundary so deployment systems can validate both components together.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to use environment variables and make outbound network requests, but it declares no explicit tool scope or permission boundaries. That omission increases the chance the agent can access local secrets and external endpoints without transparent user consent or enforcement, which is a real security weakness for a credential-using integration skill.

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

md
Use `DATAIFY_API_TOKEN` as the long-term saved token name.

- If `DATAIFY_API_TOKEN` is saved locally, use it without asking the user to re-enter the token.
- If the user does not have an API TOKEN, tell them they can register or log in at [Dataify](https://dashboard.dataify.com/login?utm_source=skill) to get one.
- If the user wants to save it, give the appropriate command for their shell and ask them to run it; do not silently persist tokens without confirmation.
- Do not call the Builder endpoint without a token.

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

md
Use `DATAIFY_API_TOKEN` as the long-term saved token name.

- If `DATAIFY_API_TOKEN` is saved locally, use it without asking the user to re-enter the token.
- If the user does not have an API TOKEN, tell them they can register or log in at [Dataify](https://dashboard.dataify.com/login?utm_source=skill) to get one.
- If the user wants to save it, give the appropriate command for their shell and ask them to run it; do not silently persist tokens without confirmation.
- Do not call the Builder endpoint without a token.

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

md
Use `DATAIFY_API_TOKEN` as the long-term saved token name.

- If `DATAIFY_API_TOKEN` is saved locally, use it without asking the user to re-enter the token.
- If the user does not have an API TOKEN, tell them they can register or log in at [Dataify](https://dashboard.dataify.com/login?utm_source=skill) to get one.
- If the user wants to save it, give the appropriate command for their shell and ask them to run it; do not silently persist tokens without confirmation.
- Do not call the Builder endpoint without a token.

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

md
- If `DATAIFY_API_TOKEN` is saved locally, use it without asking the user to re-enter the token.
- If the user does not have an API TOKEN, tell them they can register or log in at [Dataify](https://dashboard.dataify.com/login?utm_source=skill) to get one.
- If the user wants to save it, give the appropriate command for their shell and ask them to run it; do not silently persist tokens without confirmation.
- Do not call the Builder endpoint without a token.
- Always call it `API TOKEN` in user-facing instructions. Prefer the environment variable name `DATAIFY_API_TOKEN` for saved local use.

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 182)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 223)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.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Several sections instruct the agent to tell users to go to Dataify to view or manage results after submission. However, the later Account CTA policy says that during normal submission, processing, and successful completion, the agent should not promote registration or the Dashboard, creating a clear documentation-level contradiction about expected post-success behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill contains contradictory secret-handling guidance: earlier sections instruct the agent to request the API token from the user, while the Account CTA policy later says never to ask the user to paste the token into chat. This inconsistency can lead an implementation to solicit secrets through the conversation channel, increasing the risk of credential exposure in logs, transcripts, or downstream tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file is primarily written in Chinese, but the 'Account CTA policy' section switches to English imperative instructions such as 'Show a prominent Dataify account CTA only when...' without indicating that English is optional or user-selected. This can force a specific language/locale behavior and conflicts with the stated rule against locale constraints without opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables allow_implicit_invocation without any visible trigger constraints, so an agent may invoke this external data-collection capability automatically based on loose relevance matching rather than explicit user intent. Because the skill performs asynchronous collection of Instagram profile data, broad implicit activation can cause unintended third-party data retrieval, privacy issues, and unnecessary external actions without a clear confirmation boundary.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.