Back to skill

Security audit

finding-instagram-ugc-creators-for-brands

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small, coherent Apify/Instagram-scraper workflow, with a credential-handling caveat in its REST fallback example.

Installers should understand that this skill uses an Apify API token and sends campaign search inputs to Apify. Prefer the MCP or helper-script path, keep APIFY_TOKEN out of shared logs and repositories, and avoid the REST fallback unless it is changed to use safer authorization-header handling.

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

API Token Exposed in URL Query String

Content
View full analysis

Vulnerability Details

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

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

Technical Analysis

The documented REST fallback expands the APIFY_TOKEN environment variable directly into a command-line URL. Although HTTPS encrypts the request in transit, it does not protect the expanded command argument from local process inspection, shell or endpoint audit telemetry, debugging output, command recording, or HTTP access and proxy logs that retain query strings.

Secrets placed in URLs also tend to propagate through observability systems more readily than credentials supplied through authorization headers. An attacker who can read one of these local or centralized records may recover a valid Apify token without compromising TLS.

Attack Path

  1. A user follows the documented REST fallback command while APIFY_TOKEN contains a valid credential.
  2. The shell expands $APIFY_TOKEN into the URL passed to curl.
  3. The complete command or request URL is captured by process inspection, shell or endpoint auditing, debugging telemetry, or an intermediary/access log.
  4. An attacker with access to that record extracts the token from the token query parameter.
  5. The attacker submits requests to Apify using the stolen token, subject to the permissions and limits associated with it.

Impact Assessment

Successful exploitation discloses the Apify API credential. The attacker could consume paid actor resources, run jobs, or access Apify data and operations authorized to that token. The exact scope and privileges depend on the token's permissions and the associated account c ...[truncated 86 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the token from the request URL and use Apify's supported HTTP authorization header instead.
  • Ensure request-debugging, shell tracing, and verbose HTTP logging are disabled when credentials are present.
  • Configure proxies and observability systems to redact authorization data and sensitive query parameters.
  • Use a narrowly scoped token with only the permissions required to run the intended actor.
  • Rotate the token regularly and immediately rotate any token that may have appeared in process telemetry or logs.
  • Document secure secret injection through environment variables or a dedicated secret manager without printing the resolved value.
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 (5)

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 92)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 '{
    "keywords": ["#skincarereviews", "#skincareobsessed", "#honestskincarereviews"],
    "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 92)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 '{
    "keywords": ["#skincarereviews", "#skincareobsessed", "#honestskincarereviews"],
    "maxItems": 100
  }'

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown lists APIFY_TOKEN as a prerequisite, which is a sensitive credential, but does not include any user warning about protecting the token or that it will be used to authenticate requests to Apify. Because this skill interacts with a third-party scraping service, a brief disclosure about credential use would improve safety transparency.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The markdown provides commands that save output as CSV and JSON files, but it does not explicitly warn users that running these examples will create files on the local system. Since file-writing behavior can affect user data and system state, the skill description should disclose this behavior clearly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The fallback curl example posts data to api.apify.com using the user's API token, but the documentation does not explicitly warn that input data and authentication credentials are being sent to a third-party network service. A user-facing disclosure is appropriate for network operations involving external providers.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.