Back to skill

Security audit

building-twitter-prospect-lists

Security checks for vulnerabilities and agentic risk

Overview

The skill’s lead-generation workflow is coherent, but it handles an Apify API token and saved prospect data in ways users should review before installing.

Install only if you are comfortable sending Twitter/X search terms, usernames, and enrichment requests to Apify. Treat APIFY_TOKEN as a secret, avoid running the query-string curl examples as written, prefer header-based authentication or a protected MCP/secret configuration, and store exported prospect lists in a controlled location with a retention/deletion plan.

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
SKILL.md:116
Finding

Apify API Token Exposed in URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 116–117 and 144–145
Vulnerability Type: Credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["[TOPIC_KEYWORD]"],
    "maxItems": 200
  }'
bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~twitter-user-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "usernames": ["[username1]", "[username2]"]
  }'

Technical Analysis

The Skill instructs users or agents to interpolate APIFY_TOKEN directly into HTTPS URL query parameters. The credential is sent to the declared official api.apify.com service and is required to authenticate the scraping workflow; therefore, this is not evidence of malicious exfiltration or transmission to an undeclared destination.

Nevertheless, secrets in URLs are more likely to be retained outside the encrypted request channel. The expanded URL may appear in process arguments, shell diagnostics, HTTP access logs, reverse-proxy logs, observability platforms, and API monitoring records. Although interactive shell history will normally preserve the literal variable reference in this exact example rather than its expanded value, wrappers or copied expanded commands may also persist the token.

The behavior therefore constitutes insecure credential handling rather than excessive network privilege. No unrelated environment variables or local files are transmitted.

Attack Path

  1. A user or agent runs one of the documented curl commands with APIFY_TOKEN defined.
  2. The shell expands the variable and places the resulting URL, including the token, in the curl process arguments.
  3. A local user with sufficient process-inspection access, or an op ...[truncated 723 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace query-string authentication with Apify's supported authorization-header mechanism.
  • Avoid placing the expanded token directly in command-line arguments where feasible.
  • Store the token in a protected secret manager or a .env file restricted to the owning user; never commit it to source control.
  • Use a dedicated, least-privilege Apify token for this Skill and rotate it periodically.
  • Configure clients, proxies, CI systems, and observability tools to redact authorization credentials.
  • Revoke and rotate the token immediately if URLs containing it may have been logged.
  • Add explicit documentation warning users not to print, persist, or share expanded authenticated URLs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill requires setting an APIFY_TOKEN in environment variables but provides no warning that this is a sensitive credential or guidance on safe handling. This increases the risk of accidental disclosure through logs, screenshots, shell history, shared environments, or copied commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly encourages saving scraped prospect data to local CSV/JSON files without any notice about persistence, retention, or handling of potentially sensitive personal data. While the data is sourced from public Twitter profiles, prospect lists can still contain personal information and business intelligence that may be retained insecurely or shared unintentionally.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This skill sends user-supplied search terms and scraped prospecting inputs to a third-party external service (Apify), creating an external data transmission risk. In a lead-generation context, the queries themselves may reveal targeting strategy, customer lists, or sensitive business intent, and the example also places the API token in the request URL where it may be logged by tooling or intermediaries.

Content

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

If Apify MCP is not available:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

If Apify MCP is not available:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["[TOPIC_KEYWORD]"],

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This step transmits collected usernames and enrichment requests to an external third-party scraping service, which can expose prospect identities, targeting logic, and downstream lead-enrichment activity. In this skill's context, that is material because the whole workflow is intended to build contact-ready prospect lists, which may be commercially sensitive even if derived from public sources.

Content

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

If Apify MCP is not available:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~twitter-user-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "usernames": ["[username1]", "[username2]"]

Static analysis

No suspicious patterns detected.