Back to skill

Security audit

extracting-google-paa-questions-for-seo

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward SEO helper that sends search terms to Apify's Google scraper, with a token-handling weakness users should understand before use.

Reasonable to install for SEO research if you are comfortable sending the queried keywords and related parameters to Apify and Google. Use a limited Apify token where possible, keep it in an environment variable or secret store, avoid sharing logs or screenshots containing commands, and prefer authorization-header based authentication over putting tokens in URLs.

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

Apify API Token Exposed in Request URL

Content
View full analysis

Vulnerability Details

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

Vulnerable Code

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~google-search-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "queries": ["email marketing tools", "best email marketing tools", "how to email marketing"],
    "maxPagesPerQuery": 3,
    "countryCode": "US",
    "includePeopleAlsoAsk": true
  }'

Technical Analysis

The documented REST fallback places APIFY_TOKEN in a URL query parameter. Once the shell expands the environment variable, the secret becomes part of the command-line URL. URLs can be captured by shell history, process inspection, command auditing, client diagnostics, proxy telemetry, monitoring platforms, and server access logs.

The receiving endpoint is the expected official Apify API, and sending search terms to that service is necessary for the Skill's declared remote scraping function. Therefore, this finding does not establish intentional exfiltration. Nevertheless, placing authentication credentials in a URL unnecessarily increases their exposure compared with transmitting them in an authorization header.

Attack Path

  1. A user sets APIFY_TOKEN and executes the documented REST fallback.
  2. The shell expands the token into the command-line URL.
  3. A local process monitor, shell-history mechanism, audit system, proxy, diagnostics system, or remote access log records the URL.
  4. An attacker with access to one of those records extracts the token.
  5. The attacker uses the exposed token to make requests to Apify under the victim's account and within the token's assigned permissions.

Impact Assessment

A recovered token may permit unauthorized consumption of Apify resources, access to token-authorized account data or actor results, and generation of usag ...[truncated 224 chars]

Remediation
View remediation

Remediation Suggestions

Remove the token from the URL and provide it through an authorization header:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~google-search-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": ["email marketing tools", "best email marketing tools", "how to email marketing"],
    "maxPagesPerQuery": 3,
    "countryCode": "US",
    "includePeopleAlsoAsk": true
  }'

Additionally:

  • Ensure .env files are excluded from version control and readable only by the owning user.
  • Avoid verbose HTTP diagnostics that may record authorization material.
  • Redact credentials from application, proxy, and audit logs.
  • Use a narrowly scoped token where Apify supports token scoping.
  • Rotate any token suspected of having appeared in retained URLs or logs.
  • Warn users not to submit confidential search terms because those terms are intentionally transmitted to the external Apify service.
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 (4)

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The presence of the Apify endpoint confirms that the skill performs external network requests to a third-party service. In this SEO context that behavior is functionally necessary and not malicious, but it remains security-relevant because user input is transmitted off-platform and may be processed or retained by external providers.

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~google-search-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "queries": ["email marketing tools", "best email marketing tools", "how to email marketing"],
    "maxPagesPerQuery": 3,
    "countryCode": "US",

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The presence of the Apify endpoint confirms that the skill performs external network requests to a third-party service. In this SEO context that behavior is functionally necessary and not malicious, but it remains security-relevant because user input is transmitted off-platform and may be processed or retained by external providers.

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~google-search-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "queries": ["email marketing tools", "best email marketing tools", "how to email marketing"],
    "maxPagesPerQuery": 3,
    "countryCode": "US",

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill clearly causes user-provided search terms and related parameters to be sent to third-party services, but the description does not warn about that data leaving the local environment. This is a real transparency/privacy weakness because users may supply sensitive keywords, client data, or research topics without realizing they will be transmitted to Apify and indirectly to Google.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill requires an APIFY_TOKEN but does not warn users not to place tokens directly in shared commands, logs, screenshots, or output artifacts. This creates a real secret-handling risk because the provided REST example includes the token in a URL query string, which is commonly captured in shell history, monitoring tools, and server logs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.