Back to skill

Security audit

building-twitter-industry-watchlist

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward guide for using Apify Twitter scrapers to build an industry watchlist, with a credential-handling caveat but no hidden or destructive behavior.

Install only if you intend to use Apify for Twitter/X research. Use a least-privilege Apify token, avoid verbose logging or sharing command histories, and prefer a safer authentication method or MCP/helper workflow over putting tokens in URLs when available.

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

API Token Exposed Through URL Query Parameter

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 92–95
Vulnerability Type: Credential exposure through a URL query parameter
Risk Level: Medium

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["venture capital", "#vc", "VC trends 2026"], "maxItems": 500}'

Technical Analysis

The documented REST fallback inserts APIFY_TOKEN directly into the request URL. After shell expansion, the complete credential-bearing URL may be exposed through process inspection, shell or command auditing, HTTP debugging output, proxy telemetry, server access logs, observability platforms, and copied diagnostic records.

Authentication secrets should not be placed in URLs because URL handling infrastructure commonly records them. Supplying the token through a supported authorization header reduces the number of systems that may inadvertently retain it.

Attack Path

  1. A user sets APIFY_TOKEN and executes the documented REST fallback.
  2. The shell expands $APIFY_TOKEN inside the URL.
  3. A process monitor, audit facility, HTTP intermediary, Apify-side access log, or observability system records the credential-bearing URL.
  4. An attacker with access to that telemetry extracts the token.
  5. The attacker submits authenticated requests to Apify using the exposed token.

Exploitation therefore requires access to a system or service that records the expanded URL; the document does not itself transmit the token to an unrelated destination.

Impact Assessment

A recovered token could permit unauthorized use of Apify resources and access to data available within the token's granted scope. This may result in account-credit consumption, actor execution, disclosure of accessible run data, or other actions authorized to the token. The exact privileges and affected scope depend on the permissions assi ...[truncated 34 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace query-string authentication with Apify's supported authorization-header mechanism.
  • Ensure the token is never printed in command output, exceptions, debug traces, or HTTP verbose logs.
  • Redact authorization values in process, proxy, CI/CD, and observability telemetry.
  • Grant the token only the minimum permissions required to run the designated actors and retrieve their results.
  • Use a dedicated, short-lived token where the platform supports one.
  • Rotate the existing token if the documented command has been executed in an environment where URLs may have been logged.
  • Document secure storage requirements and restrict .env permissions; ensure .env files are excluded from version control.
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 (2)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 90)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": ["venture capital", "#vc", "VC trends 2026"], "maxItems": 500}'

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 91)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": ["venture capital", "#vc", "VC trends 2026"], "maxItems": 500}'

Static analysis

No suspicious patterns detected.