Back to skill

Security audit

tracking-product-launch-buzz-on-twitter

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Apify/Twitter scraping workflow, but users should handle the Apify token and search terms carefully.

Install only if you are comfortable sending launch, competitor, or campaign search terms to Apify/apidojo for scraping. Store APIFY_TOKEN securely, avoid pasting token-bearing URLs into logs or support tickets, prefer SDK/header-based authentication when possible, and set maxItems to control cost and data volume.

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

API Token Exposed in URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 108 and 114
Vulnerability Type: API 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": ["[PRODUCT] launch", "[PRODUCT] just launched", "new [PRODUCT]", "[PRODUCT] release"], "maxItems": 100}'
bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN"

Technical Analysis

The documented REST fallback passes APIFY_TOKEN in URL query parameters. Although HTTPS protects the URL in transit between correctly configured endpoints, placing credentials in URLs increases their exposure because complete URLs may be captured by shell history, process inspection, HTTP client diagnostics, proxy or access logs, monitoring platforms, and copied error reports.

Reusing the token in both the actor-start request and dataset-retrieval request expands the number of locations in which the credential may be recorded. The external communication with Apify is necessary for the Skill's declared Twitter-scraping functionality, but exposing its authentication token in URLs is not necessary and violates secure secret-handling and least-exposure principles.

Attack Path

  1. A user follows the documented REST fallback with a valid APIFY_TOKEN.
  2. The shell expands $APIFY_TOKEN into each request URL.
  3. The resulting URL is exposed through a local process listing, command tracing, client diagnostics, proxy/access logging, telemetry, or copied troubleshooting output.
  4. An attacker with access to one of those records extracts the token.
  5. The attacker submits authenticated Apify requests using the recovered token.
  6. The attacker can perform actions allowed by that token until it is revoked, rotated, or otherwise expires.

...[truncated 567 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pass APIFY_TOKEN through Apify's supported authorization header rather than a URL query parameter.
  2. Ensure commands, request diagnostics, and error reports redact authorization headers and other secret-bearing values.
  3. Disable shell tracing when executing commands that access credentials, and avoid printing expanded commands.
  4. Use a narrowly scoped token with only the permissions needed to run the designated actor and retrieve its results.
  5. Store the token in an approved secret manager or protected environment variable; do not commit it to project files.
  6. Review proxy, access, telemetry, and shell-history records for previously exposed URLs.
  7. Revoke and rotate any token suspected of having appeared in logs, process captures, or shared troubleshooting output.
  8. Document a single secure authentication pattern and use it consistently for both actor execution and dataset retrieval.
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 (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to send user-supplied search terms and retrieve Twitter/X data through Apify, but it does not clearly warn users that their queries and resulting social media data are transmitted to a third-party service. This is a genuine privacy/transparency issue because users may provide sensitive product, campaign, or competitor-monitoring terms without realizing they leave the local environment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This command transmits search queries and the APIFY_TOKEN to an external service over the network. While expected for the skill's function, it is still a real security concern because it can expose sensitive search intent and risks accidental credential leakage through shell history, logs, screenshots, or copied commands that embed the token in the URL.

Content

Scanner excerpt · SKILL.md (reported line 99)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": ["[PRODUCT] launch", "[PRODUCT] just launched", "new [PRODUCT]", "[PRODUCT] release"], "maxItems": 100}'

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 100)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": ["[PRODUCT] launch", "[PRODUCT] just launched", "new [PRODUCT]", "[PRODUCT] release"], "maxItems": 100}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This dataset fetch call retrieves results from an external service and again includes the APIFY_TOKEN in the URL, which can leak through logs, browser history, terminal history, or monitoring tools. It also reinforces that potentially sensitive scraped social media data is being handled by a third party without an explicit user-facing warning in the skill.

Content

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

Wait for SUCCEEDED. Fetch dataset:

bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN"

Step 3: Classify Results

Static analysis

No suspicious patterns detected.