Back to skill

Security audit

finding-saas-company-leads-twitter

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Twitter/X lead-finding workflow that uses Apify as disclosed, but users should treat its Apify requests and saved lead files as sensitive business data.

Install only if you are comfortable sending Twitter/X search terms, handles, and resulting lead data to Apify for processing. Prefer the MCP or a header-based API call over the shown token-in-URL curl examples, protect and scope your APIFY_TOKEN, and store exported lead files only where business prospect data is allowed.

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:106
Finding

Apify API Token Exposed Through URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 106-128
Vulnerability Type: API credential exposure through URL query strings
Risk Level: Medium

The REST fallback examples place the APIFY_TOKEN credential directly in request URLs:

bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["HR tech SaaS", "HR software launch", "we built HR tool"],
    "maxItems": 300
  }'
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": ["handle1", "handle2"]}'

Technical Analysis

Secrets in URL query parameters can be exposed through server access logs, reverse proxies, observability platforms, error reports, debugging output, and process inspection. After shell variable expansion, the token may also appear temporarily in the curl process command-line arguments.

HTTPS protects the request URL while it is in transit between TLS endpoints, but it does not prevent the URL from being recorded at the client, TLS termination point, or destination service. Authorization headers are less likely to be logged by default and are therefore the safer authentication mechanism.

The requests target the declared Apify service, and the reviewed file contains no evidence of deliberate credential exfiltration. The issue is an insecure credential-handling practice.

Attack Path

  1. A user exports a valid APIFY_TOKEN and executes one of the documented REST commands.
  2. The shell expands $APIFY_TOKEN inside the URL.
  3. The resulting URL containing the credential becomes visible to the curl process and may be recorded by Apify, a TLS-terminating proxy, or monitoring and diagnostic infrastructure.
  4. An attacker with access to one of those records or to local process informa ...[truncated 759 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace query-string authentication with Apify's supported authorization header. For example:

    bash
    curl -X POST \
      "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs" \
      -H "Authorization: Bearer $APIFY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "searchTerms": ["HR tech SaaS", "HR software launch", "we built HR tool"],
        "maxItems": 300
      }'
    
  • Apply the same change to the twitter-user-scraper REST example.

  • Configure HTTP clients, proxies, and monitoring systems to redact authorization headers and known credential fields.

  • Use narrowly scoped tokens with only the permissions required to run the documented actors.

  • Store the token in a protected environment variable or secret manager rather than source files or command-line literals.

  • Rotate any token suspected of having appeared in logs, process captures, or diagnostic output.

  • Review and restrict access to historical HTTP, proxy, and application logs that may contain token-bearing 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
95% confidence
Finding

The skill explicitly instructs users to send search terms, Twitter handles, user IDs, and scraped profile/tweet data to third-party services (Apify actors scraping Twitter/X) but does not clearly warn about the resulting data transfer, third-party processing, or potential terms/privacy implications. This can cause unintentional disclosure of user-provided targets and collected lead data to external processors, especially in enterprise or regulated environments.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This command sends search terms and authentication material to Apify over an external API call, causing user intent and collected targeting criteria to leave the local environment. Although external API use is expected for this skill, the transmission is security-relevant because it involves third-party processing and potential exposure of business-sensitive prospecting activity if users are not clearly informed.

Content

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

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["HR tech SaaS", "HR software launch", "we built HR tool"],
    "maxItems": 300
  }'

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This command sends search terms and authentication material to Apify over an external API call, causing user intent and collected targeting criteria to leave the local environment. Although external API use is expected for this skill, the transmission is security-relevant because it involves third-party processing and potential exposure of business-sensitive prospecting activity if users are not clearly informed.

Content

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

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["HR tech SaaS", "HR software launch", "we built HR tool"],
    "maxItems": 300
  }'

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This API call transmits discovered Twitter usernames to a third-party enrichment service, which may reveal prospect lists, research targets, or outreach strategy to an external processor. In context, this is inherent to the skill's purpose, but it remains a genuine data-transfer risk because no explicit consent or handling warning is provided.

Content

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

REST API fallback:

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": ["handle1", "handle2"]}'

Step 4: Filter and Classify

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill advertises automatic saving of output files containing lead data without clearly warning that results will be written to local storage. Even if the data is public, silent persistence increases the risk of unintended retention, later disclosure, or mishandling of scraped contact/prospect information on shared systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.