T09 · Insecure Skill Coding Practices
- Location
SKILL.md:92- Finding
API Token Exposed Through URL Query Parameter
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 92–95
Vulnerability Type: Credential exposure through a URL query parameter
Risk Level: Mediumbash curl -X POST \ "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"searchTerms": ["venture capital", "#vc", "VC trends 2026"], "maxItems": 500}'Technical Analysis
The documented REST fallback inserts
APIFY_TOKENdirectly into the request URL. After shell expansion, the complete credential-bearing URL may be exposed through process inspection, shell or command auditing, HTTP debugging output, proxy telemetry, server access logs, observability platforms, and copied diagnostic records.Authentication secrets should not be placed in URLs because URL handling infrastructure commonly records them. Supplying the token through a supported authorization header reduces the number of systems that may inadvertently retain it.
Attack Path
- A user sets
APIFY_TOKENand executes the documented REST fallback. - The shell expands
$APIFY_TOKENinside the URL. - A process monitor, audit facility, HTTP intermediary, Apify-side access log, or observability system records the credential-bearing URL.
- An attacker with access to that telemetry extracts the token.
- The attacker submits authenticated requests to Apify using the exposed token.
Exploitation therefore requires access to a system or service that records the expanded URL; the document does not itself transmit the token to an unrelated destination.
Impact Assessment
A recovered token could permit unauthorized use of Apify resources and access to data available within the token's granted scope. This may result in account-credit consumption, actor execution, disclosure of accessible run data, or other actions authorized to the token. The exact privileges and affected scope depend on the permissions assi ...[truncated 34 chars]
- A user sets
- Remediation
View remediation
Remediation Suggestions
- Replace query-string authentication with Apify's supported authorization-header mechanism.
- Ensure the token is never printed in command output, exceptions, debug traces, or HTTP verbose logs.
- Redact authorization values in process, proxy, CI/CD, and observability telemetry.
- Grant the token only the minimum permissions required to run the designated actors and retrieve their results.
- Use a dedicated, short-lived token where the platform supports one.
- Rotate the existing token if the documented command has been executed in an environment where URLs may have been logged.
- Document secure storage requirements and restrict
.envpermissions; ensure.envfiles are excluded from version control.
