Back to skill

Security audit

finding-youtube-sponsorship-candidates

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated YouTube sponsorship research purpose, but it documents credential handling that can expose an Apify token and relies on an unbundled local runner script.

Install only if you are comfortable sending sponsorship research queries and YouTube targets to Apify. Prefer a trusted MCP or runner that uses an Authorization header or secret manager, avoid the documented URL-token curl fallback, and do not run an unreviewed local scripts/run_actor.js file.

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

API Token Exposed in Command-Line URL

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 94
Vulnerability Type: Credential exposure through process arguments and URL handling
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 '{
    "searchKeywords": ["best personal finance tools", "personal finance review"],
    "maxResults": 50,
    "type": "video"
  }'

Technical Analysis

The documented REST fallback places APIFY_TOKEN in the request URL. When the command is executed, the shell expands the environment variable, causing the secret to appear in curl's command-line arguments. Depending on operating-system configuration and local permissions, command arguments may be exposed through process-inspection facilities, endpoint monitoring, audit records, debugging output, or execution logs.

URLs are also more likely than authorization headers to be retained by HTTP infrastructure and observability systems. Although HTTPS protects the request in transit, it does not prevent the token from being disclosed through local process metadata or URL logging at endpoints that can observe the decrypted request.

Attack Path

  1. A user sets APIFY_TOKEN and runs the documented REST fallback command.
  2. The shell expands $APIFY_TOKEN into the URL passed to curl.
  3. A local user, monitoring agent, audit subsystem, diagnostic collector, or improperly configured HTTP logger captures the command arguments or request URL.
  4. The observer extracts the token from the token= query parameter.
  5. The exposed credential is reused against the Apify API until it is revoked or expires.

This path requires access to relevant local process metadata or logs; the document does not itself transmit the token to an unrelated host.

Impact Assessment

Successful exploitation exposes the privileges assigned to the compro ...[truncated 381 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace query-string authentication with an Apify-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 '{
        "searchKeywords": ["best personal finance tools", "personal finance review"],
        "maxResults": 50,
        "type": "video"
      }'
    
  2. Ensure command tracing and verbose HTTP diagnostics are disabled when credentials are used.

  3. Redact authorization data from application, proxy, CI/CD, and observability logs.

  4. Store the token in a dedicated secret manager where available. If a .env file is used, exclude it from version control and restrict its permissions to the owning user.

  5. Grant the token only the minimum permissions required for actor execution and rotate any token suspected of prior exposure.

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
80% confidence
Finding

This skill transmits user-provided search terms and workflow data to an external API endpoint outside the local environment. In context this is core functionality rather than obviously malicious behavior, but it still creates a real data-exfiltration boundary and may leak sensitive business research or campaign targeting data if users provide confidential inputs.

Content

Scanner excerpt · SKILL.md (reported line 94)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 '{
    "searchKeywords": ["best personal finance tools", "personal finance review"],
    "maxResults": 50,
    "type": "video"

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

This skill transmits user-provided search terms and workflow data to an external API endpoint outside the local environment. In context this is core functionality rather than obviously malicious behavior, but it still creates a real data-exfiltration boundary and may leak sensitive business research or campaign targeting data if users provide confidential inputs.

Content

Scanner excerpt · SKILL.md (reported line 94)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 '{
    "searchKeywords": ["best personal finance tools", "personal finance review"],
    "maxResults": 50,
    "type": "video"

Static analysis

No suspicious patterns detected.