Back to skill

Security audit

discovering-brand-ambassadors-across-platforms

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a legitimate Apify-based influencer research workflow, but it overstates its cross-platform capability and shows unsafe Apify token handling in its REST examples.

Review this skill before installing if you need true Instagram, TikTok, and Twitter discovery; as written, it only documents Instagram collection. If you use the REST fallback, avoid putting APIFY_TOKEN in URLs and prefer authorization headers or a safer Apify client/MCP workflow with a narrowly scoped token.

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

API Token Exposure Through URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 78–87
Vulnerability Type: API credential exposure through URL query strings
Risk Level: Medium

Vulnerable Code

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["#[brand]", "#[brand]ambassador", "#[brand]fam"], "maxItems": 100}'
bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN"

Technical Analysis

The documented REST fallback places the APIFY_TOKEN credential in URL query parameters. Sending the token to the official Apify endpoint is necessary for authentication, but putting it in a URL is not the least-exposure authentication method.

URLs can be retained by shell history, process inspection facilities, HTTP access logs, reverse proxies, monitoring platforms, debugging output, and error-reporting systems. TLS protects the request while it is in transit but does not prevent credential disclosure through these endpoint and infrastructure records.

No evidence indicates intentional exfiltration to an unrelated service. The issue is insecure credential handling in otherwise legitimate network requests.

Attack Path

  1. A user follows the documented REST fallback with a valid APIFY_TOKEN.
  2. The expanded URL containing the token is exposed through process metadata, command logging, proxy logs, monitoring telemetry, or error diagnostics.
  3. An attacker or unauthorized operator with access to one of these records extracts the token.
  4. The attacker submits authenticated requests to the Apify API using the recovered credential.
  5. The attacker consumes account resources or accesses Apify data and capabilities permitted to that token until it is revoked or expires.

Impact Assessment

A disclosed token grants the attacker the same Apify privileges assigned to that credential. Depending on account and token ...[truncated 369 chars]

Remediation
View remediation

Remediation Suggestions

Use an HTTP authorization header rather than a URL query parameter for both actor execution and dataset retrieval:

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 '{"searchTerms":["#[brand]","#[brand]ambassador","#[brand]fam"],"maxItems":100}'
bash
curl \
  "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items" \
  -H "Authorization: Bearer $APIFY_TOKEN"

Additional hardening measures:

  • Use a narrowly scoped token with only the permissions needed to run the specified actor and retrieve its results.
  • Avoid command tracing, verbose HTTP output, or diagnostics that print authorization headers.
  • Redact credentials from application, proxy, monitoring, and error logs.
  • Store the token in a protected secret manager or environment variable rather than source files.
  • Ensure .env files are excluded from version control and accessible only to the intended user.
  • Rotate the token immediately if commands containing it may already have been logged.
  • Configure token expiration and usage monitoring where supported.
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 (7)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says this skill discovers cross-platform brand ambassadors across Instagram, TikTok, and Twitter and returns per-platform handles and combined reach. However, the documented inputs are Instagram-specific URLs and the run examples invoke only apidojo~instagram-scraper, with no documented collection or correlation of TikTok or Twitter data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The inline workflow explicitly scopes execution to a single Instagram scraper, which contradicts the stated intent of discovering creators across multiple platforms. This is more than an omission because the workflow actively describes a narrower single-platform process than the skill claims to perform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This section repeatedly instructs the user to run apidojo~instagram-scraper via script, MCP, and REST API, without corresponding TikTok or Twitter execution. That directly conflicts with the skill's documented purpose of finding ambassadors across Instagram, TikTok, and Twitter.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs users to place APIFY_TOKEN directly in REST API URLs, which increases the chance that the secret will be exposed via shell history, process lists, logs, shared transcripts, proxy logs, or copied command snippets. While sending the token to Apify is expected for authentication, embedding credentials in query strings is a poor secret-handling practice that can lead to accidental credential disclosure.

Content

No source excerpt is available for this finding.

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 80)May include surrounding context.

REST API fallback:

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

REST API fallback:

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

REST API fallback:

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

Static analysis

No suspicious patterns detected.