Back to skill

Security audit

finding-ecommerce-brands-for-outreach

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Apify-based workflow for finding social-media e-commerce brands, with credential-handling and data-export cautions but no evidence of hidden or malicious behavior.

Install only if you are comfortable using Apify to scrape Instagram/TikTok data for outreach. Prefer MCP or authorization-header authentication over URL query tokens, use a least-privileged Apify token, avoid shell tracing, and treat any CSV/JSON exports as sensitive prospecting data.

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

Apify API Token Exposed in URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 89–103
Vulnerability Type: API credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

bash
**REST API fallback (Instagram):**
```bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["[hashtag1]", "[hashtag2]"], "maxItems": 100}'

REST API fallback (TikTok):

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

### Technical Analysis

The documented REST fallback places the `APIFY_TOKEN` credential directly in the request URL. The token is sent to the intended Apify API over HTTPS and is required to authenticate the actor run; therefore, the network request itself is consistent with the Skill's declared functionality. However, putting authentication credentials in a URL is an insecure coding practice.

URLs are commonly recorded by reverse proxies, API gateways, server access logs, monitoring systems, tracing infrastructure, shell-debug output, and command-history or process-observation tooling. HTTPS protects the request from passive interception in transit, but it does not prevent the full URL from being exposed at endpoints or within authorized intermediary infrastructure.

The credential disclosure is unnecessary because authentication can be provided through an HTTP authorization header. Consequently, the query-string approach exposes the token beyond the minimum scope required to invoke the Apify actors.

### Attack Path

1. A user follows one of the documented REST fallback examples with `APIFY_TOKEN` set.
2. The shell expands `$APIFY_TOKEN` into the request URL.
3. The complete URL is captured by server access logs, an API gat
...[truncated 1067 chars]
Remediation
View remediation

Remediation Suggestions

Remove token=$APIFY_TOKEN from both URLs and provide the credential through an authorization header instead:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["[hashtag1]", "[hashtag2]"], "maxItems": 100}'

Apply the same authentication pattern to the TikTok request:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tiktok-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["[hashtag1]", "[hashtag2]"]}'

Additional hardening measures:

  • Use an Apify token restricted to the minimum permissions required by this Skill.
  • Ensure authorization headers and environment-variable values are redacted from logs, traces, and diagnostic output.
  • Do not enable shell tracing while commands involving credentials are running.
  • Rotate the token immediately if it may already have appeared in retained URL or command logs.
  • Establish periodic credential rotation and revoke unused tokens.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger description is broad enough to activate on common sales/prospecting requests that may not explicitly ask for Instagram/TikTok scraping. Over-broad routing can cause the agent to invoke external scraping and outreach-list generation unexpectedly, increasing the chance of unintended data collection or actions beyond user intent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This skill instructs sending query parameters and authentication to an external third-party service, which transmits user-specified search terms and uses the APIFY_TOKEN to initiate remote scraping jobs. While expected for the skill’s purpose, it is still a real data egress path and can disclose user intent, targeting criteria, and operational metadata to an external provider.

Content

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

REST API fallback (Instagram):

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["[hashtag1]", "[hashtag2]"], "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 91)May include surrounding context.

REST API fallback (Instagram):

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["[hashtag1]", "[hashtag2]"], "maxItems": 100}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The TikTok REST fallback similarly directs the agent to transmit search keywords to Apify, creating a third-party data egress path for user-supplied targeting criteria. In context this is part of intended functionality, but it still carries privacy, compliance, and transparency risks if done without explicit user awareness.

Content

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

REST API fallback (TikTok):

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill recommends commands that save scraped results to local files automatically, but it does not require a user-facing warning or explicit confirmation before writing files. In agent environments, silent file creation can surprise users, expose collected data in shared workspaces, or create durable artifacts containing third-party profile information.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.