Back to skill

Security audit

tracking-brand-sentiment-across-platforms

Security checks for vulnerabilities and agentic risk

Overview

The skill is a social-listening helper, but its Reddit workflow actually points to a Twitter scraper and its fallback examples expose Apify tokens in URLs.

Review or correct the Reddit actor before relying on this skill for cross-platform reporting. Install only if it is acceptable for brand search terms and scraped content to be processed by Apify-hosted actors, use a least-privilege Apify token in authorization headers rather than URL parameters, and store any exported CSV/JSON results in an appropriate protected location.

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

Apify API Token Exposed in URL Query Strings

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 93–96
Vulnerability Type: Credential exposure through command-line arguments and URL query parameters
Risk Level: Medium

Vulnerable Code

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

# Reddit
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'

Technical Analysis

The documented REST fallback expands APIFY_TOKEN directly into each request URL. After shell expansion, the complete secret becomes part of the curl process arguments. Depending on the operating-system configuration, other local users or monitoring software may be able to observe those arguments while the process is running.

URL query parameters are also more likely than authorization headers to be retained by command histories, debugging output, proxies, gateways, observability systems, or HTTP request logs. Although HTTPS protects the URL in transit, it does not prevent exposure through local process inspection or logging at endpoints and intermediary infrastructure.

Attack Path

  1. A user follows the skill's REST fallback instructions with a valid APIFY_TOKEN in the environment.
  2. The shell expands $APIFY_TOKEN and passes a URL containing the plaintext credential to curl.
  3. An attacker with local process-inspection access, or access to infrastructure that records complete request URLs, captures the token.
  4. The attacker reuses the token against Apify APIs.
  5. The attacker can perform actions allowed by the compromised token until it is revoked or expires.

Exploitation requires access to process metadata, logs, telemetry, or another location ...[truncated 547 chars]

Remediation
View remediation

Remediation Suggestions

  • Transmit the token in an authorization header rather than a URL query parameter:

    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": ["[BRAND_NAME]"], "maxItems": 300}'
    
  • Apply the same correction to every documented Apify request.

  • Ensure shell tracing is disabled when commands handle secrets, and never print the token in diagnostic output.

  • Configure proxies, gateways, and application logging to redact authorization data and other credentials.

  • Use a least-privilege token where Apify supports permission scoping.

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

  • Store the token in an appropriately protected environment or secret-management facility rather than in project files or command history.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill claims to collect Reddit data, but both the metadata and documented implementation reference the Twitter scraper instead of a Reddit-specific actor. This is dangerous because users may believe they are getting cross-platform coverage and make business or reputational decisions based on incomplete or mislabeled data, while unintentionally sending queries to the wrong third-party workflow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The Reddit collection step explicitly invokes the Twitter scraper while presenting the action as Reddit analysis. This creates a deceptive data flow and can silently produce incorrect outputs, undermining integrity and causing users to transmit brand-monitoring queries under false assumptions about what source is being queried.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The REST fallback for Reddit posts to the Twitter scraper endpoint, repeating the same platform-confusion flaw in the non-MCP path. This is dangerous because even careful users following the fallback instructions will exfiltrate search terms to the wrong service endpoint and receive misleading data labeled as Reddit sentiment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill does not warn users that their search queries and the scraped content are sent to Apify-hosted third-party actors. In a brand-monitoring context, those queries may reveal confidential campaigns, incident-response investigations, or sensitive watchlists, so lack of disclosure creates privacy and compliance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
72% confidence
Finding

This finding identifies the same external transmission path via the Apify domain used in the REST fallback. Although the network call is core to the skill's operation, it is still a valid concern because the skill lacks strong user-facing notice about third-party processing and query exposure.

Content

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

REST API fallback — run each sequentially:

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

# Reddit
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
72% confidence
Finding

This finding identifies the same external transmission path via the Apify domain used in the REST fallback. Although the network call is core to the skill's operation, it is still a valid concern because the skill lacks strong user-facing notice about third-party processing and query exposure.

Content

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

REST API fallback — run each sequentially:

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

# Reddit
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The Reddit fallback example also sends user queries to Apify, and in this case to the wrong actor endpoint, compounding confidentiality and integrity risk. Users may disclose sensitive monitoring terms externally while simultaneously receiving mislabeled Twitter-derived data as though it were Reddit results.

Content

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

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

Reddit

curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'

text

### Step 2: Sentiment Classification

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The examples encourage saving scraped results to local CSV/JSON files without warning that this creates local copies of potentially sensitive monitoring data. This can increase exposure on shared workstations, CI runners, or developer machines where file permissions, retention, and cleanup are uncontrolled.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.