T09 · Insecure Skill Coding Practices
- Location
SKILL.md:15- Finding
Meta Access Token Exposure Through Command Arguments and URL Query Strings
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15-20 and 109-119
Vulnerability Type: Sensitive credential exposure
Risk Level: MediumVulnerable Code
markdown Use exec + curl with your META_ACCESS_TOKEN. All requests go to `https://graph.facebook.com/v21.0/`. Example structure: ```bash curl -X POST "https://graph.facebook.com/v21.0/act_{AD_ACCOUNT_ID}/campaigns" \ -d "access_token={META_ACCESS_TOKEN}" \ -d "name=My Campaign" \ -d "objective=LEADS" \ -d "status=PAUSED"text ```markdown **Step 1: Get source campaign structure**text **Step 2: Get source adsets**text **Step 3: Get source ads**GET https://graph.facebook.com/v21.0/[AD_ID]?fields=id,name,status,creative&access_token=[TOKEN]
text Technical Analysis
The Skill instructs the agent to substitute a Meta bearer token directly into a
curlcommand and into URL query strings. A token expanded into a command may be exposed through process inspection, shell tracing, command history, execution telemetry, or captured diagnostic output.Embedding the token in a URL creates additional exposure because complete URLs are commonly recorded by shell history, HTTP clients, proxies, monitoring systems, and request or error logs. Although HTTPS protects the request in transit, it does not prevent disclosure through these endpoint and logging surfaces.
This behavior also conflicts with the Skill's own security rule stating that access tokens must never be logged or printed in plaintext.
Attack Path
- The agent retrieves
META_ACCESS_TOKENfrom configured secret storage. - Following the documented examples, it substitutes the real token into a generated
curlargument or URL query string.
...[truncated 1123 chars]
- The agent retrieves
- Remediation
View remediation
Remediation Suggestions
- Remove every example that places
access_tokenin a URL query string. - Retrieve the token from the platform's secret-management facility only at request time.
- Authenticate using Meta's supported authorization-header mechanism rather than a query parameter.
- Use an HTTP integration capable of injecting secret headers without placing the expanded token in generated command text. If a shell must be used, prevent tracing and avoid echoing, logging, or persisting the command.
- Configure automatic redaction for authorization headers, tokens, request dumps, error messages, and tool telemetry.
- Ensure URLs can be logged safely because they no longer contain credentials.
- Apply least-privilege scopes, short expiration periods, asset restrictions, and regular token rotation.
- Revoke and replace any real token previously used through the documented query-string pattern.
- Add an explicit validation rule prohibiting execution whenever a constructed command or URL contains the token value.
- Remove every example that places
