Back to skill

Security audit

tracking-youtube-trending-topics-by-niche

Security checks for vulnerabilities and agentic risk

Overview

The skill’s YouTube trend-research purpose is coherent, but it needs review because it recommends running an absent relative Node script and shows an Apify token in a URL fallback.

Review before installing. Use an Apify token with minimal permissions, prefer an Authorization header or MCP-based secret handling instead of the shown token-in-URL curl fallback, and do not run scripts/run_actor.js unless you have verified which file will execute and trust that implementation.

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

API Token Exposed in URL Query String

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 92
Vulnerability Type: Credential exposure through a URL query parameter
Risk Level: Medium

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searchKeywords": ["personal finance tips", "best investing 2026", "investing for beginners"], "maxResults": 50}'

Technical Analysis

The documented REST fallback places APIFY_TOKEN directly in the request URL. Although HTTPS encrypts the request in transit, URL query strings can be retained in shell history, command and process telemetry, debugging output, proxy or gateway access logs, monitoring systems, and other diagnostic records.

This unnecessarily broadens the token's exposure compared with transmitting it in an authorization header. An attacker who can read any record containing the expanded command or request URL may recover and reuse the credential.

Attack Path

  1. A user follows the documented REST fallback with APIFY_TOKEN set in the environment.
  2. The shell expands $APIFY_TOKEN into the command's URL.
  3. The full URL is captured by shell history, process monitoring, proxy logging, debugging, or observability infrastructure.
  4. An unauthorized party with access to that record extracts the token.
  5. The party submits authenticated requests to Apify within the permissions and lifetime of the compromised token.

Impact Assessment

A recovered token may allow unauthorized use of Apify resources available to that credential, including starting actor runs and potentially accessing related runs or datasets. The precise scope depends on the token's permissions and Apify account configuration. Abuse could expose accessible scraped data, consume quotas, or generate charges. This finding does not establish host privilege escalation or arbitrary local code execution.

Remediation
View remediation

Remediation Suggestions

  • Authenticate through Apify's supported authorization header rather than a URL query parameter.
  • Ensure examples do not print, log, or persist the token.
  • Use a least-privilege token limited to the resources required by the skill.
  • Prevent credential-bearing commands and headers from being captured in verbose logs or command traces.
  • Store the token in an approved secret manager or protected environment variable, with restrictive access controls.
  • Rotate any token that may already have appeared in shell history, logs, telemetry, or shared documentation.
  • Add the referenced scripts/run_actor.js implementation to the package if it is intended to be the recommended secure execution path, and subject its credential handling, input validation, output permissions, and logging behavior to a separate audit.
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 (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest lists many paraphrased requests such as 'find trending YouTube topics in a niche' and 'discover what videos are getting views right now in a category' as triggers, but it does not define exact invocation phrases, scope limits, or negative examples. This makes activation criteria fuzzy and increases the chance of unintended invocation from ordinary research-oriented requests about YouTube performance.

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 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": ["personal finance tips", "best investing 2026", "investing for beginners"], "maxResults": 50}'

Step 2: Analyze Title Patterns

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 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": ["personal finance tips", "best investing 2026", "investing for beginners"], "maxResults": 50}'

Step 2: Analyze Title Patterns

Static analysis

No suspicious patterns detected.