Back to skill

Security audit

analyzing-competitor-youtube-content-strategy

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent YouTube analysis workflow, but its fallback API example puts the Apify token in the request URL.

Review before installing if you will use the REST fallback. Prefer Apify MCP or a helper that sends APIFY_TOKEN in an Authorization header, use a narrowly scoped token, and rotate the token if you already ran the documented URL-token curl command in a logged or shared environment.

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

Apify API Token Exposed Through Command-Line URL

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 90
Vulnerability Type: Credential exposure through URL and process arguments
Risk Level: Medium

Vulnerable Code

bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"startUrls": [{"url": "https://www.youtube.com/@competitorhandle"}], "maxResults": 30, "type": "video"}'

Technical Analysis

The documented REST fallback places APIFY_TOKEN in the URL query string. When the shell expands this variable, the secret becomes part of the curl process arguments and requested URL.

Command-line arguments can be exposed to local process inspection tools, shell tracing, diagnostic records, and monitoring systems. URLs may additionally be retained by proxies, gateways, access logs, error reports, or other observability infrastructure. Query parameters are therefore unsuitable for transmitting long-lived credentials.

Exploitation requires an attacker or logging component capable of observing the command arguments or recorded request URL while the documented command is executed.

Attack Path

  1. A user sets a valid APIFY_TOKEN and follows the documented REST fallback.
  2. The shell expands $APIFY_TOKEN directly into the request URL.
  3. A local user with process-observation access, shell-debugging facility, or URL-logging component captures the expanded URL.
  4. The attacker extracts the token from the token query parameter.
  5. The attacker submits requests to Apify using the stolen token.
  6. The attacker can perform operations and access resources permitted by the token until it expires or is revoked.

Impact Assessment

Successful exploitation compromises the confidentiality of the Apify API token. An attacker may consume paid platform resources, invoke actors, access actor runs or datasets, and perform any other operation authorized by the token. The ...[truncated 214 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not include API tokens in URLs or query parameters.

  • Supply the token through Apify's supported authorization header, for example:

    bash
    curl -X POST \
      "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs" \
      -H "Authorization: Bearer $APIFY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"startUrls": [{"url": "https://www.youtube.com/@competitorhandle"}], "maxResults": 30, "type": "video"}'
    
  • Use a narrowly scoped token with only the permissions required to invoke the intended actor and retrieve its results.

  • Avoid enabling shell tracing while handling secrets, and prevent command logging from recording authorization headers.

  • Ensure application and proxy configurations redact authorization data from logs.

  • Rotate the token immediately if the original command has been executed in an environment where process arguments or URLs may have been retained.

  • Document secure token storage through environment variables or an approved secrets manager, and prohibit committing tokens to project files.

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 (2)

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

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"startUrls": [{"url": "https://www.youtube.com/@competitorhandle"}], "maxResults": 30, "type": "video"}'

Step 2: Classify Videos

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

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"startUrls": [{"url": "https://www.youtube.com/@competitorhandle"}], "maxResults": 30, "type": "video"}'

Step 2: Classify Videos

Static analysis

No suspicious patterns detected.