T09 · Insecure Skill Coding Practices
- Location
SKILL.md:151- Finding
Meta Access Tokens Exposed in URL Query Strings
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward Meta social-media automation guide, but it handles powerful account tokens and destructive post deletion with weak safeguards.
Review before installing if you will connect a real business account. Use least-privilege Meta tokens, prefer environment variables or a tightly protected cache, avoid putting access tokens in URLs, and require explicit user confirmation before publishing, commenting, scheduling, or deleting content.
SKILL.md:151Meta Access Tokens Exposed in URL Query Strings
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
PAGE_ID="$META_PAGE_ID"
The same Page Access Token works for both Facebook and Instagram (the IG Business account is linked to the Page).
### Option B: Token cache file (alternative)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
PAGE_ID="$META_PAGE_ID"
The same Page Access Token works for both Facebook and Instagram (the IG Business account is linked to the Page).
### Option B: Token cache file (alternative)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
curl -X POST "https://graph.facebook.com/v25.0/$PAGE_ID/feed" \
-d "message=Tu mensaje aquí" \
-d "access_token=$PAGE_TOKEN"
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
curl -X POST "https://graph.facebook.com/v25.0/$IG_ID/media_publish"
-d "creation_id=$CONTAINER_ID"
-d "access_token=$PAGE_TOKEN"
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Step 2: Wait for processing
curl -s "https://graph.facebook.com/v25.0/$CONTAINER_ID?fields=status_code&access_token=$PAGE_TOKEN"
# Poll until status_code = "FINISHED"
# Step 3: Publish
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
-d "is_carousel_item=true" \
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
IMG2=$(curl -s -X POST "https://graph.facebook.com/v25.0/$IG_ID/media" \
-d "image_url=https://example.com/img2.jpg" \
-d "is_carousel_item=true" \
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Step 2: Create carousel container
CAROUSEL=$(curl -s -X POST "https://graph.facebook.com/v25.0/$IG_ID/media" \
-d "media_type=CAROUSEL" \
-d "children=$IMG1,$IMG2" \
-d "caption=Mi carrusel #carousel" \
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
If environment variables are not set, credentials can be read from ~/.meta_tokens_cache.json (chmod 600):
PAGE_TOKEN=$(python3 -c "
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST "https://graph.facebook.com/v25.0/$PAGE_ID/feed" \
-d "message=Tu mensaje aquí" \
-d "access_token=$PAGE_TOKEN"
The skill documents a direct DELETE call for Facebook posts without any warning, confirmation step, or guidance to verify the target post ID. In an automation context, this increases the chance of accidental irreversible content deletion if the agent or user supplies the wrong identifier.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
curl -X POST "https://graph.facebook.com/v25.0/$IG_ID/media_publish"
-d "creation_id=$CONTAINER_ID"
-d "access_token=$PAGE_TOKEN"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Step 2: Wait for processing
curl -s "https://graph.facebook.com/v25.0/$CONTAINER_ID?fields=status_code&access_token=$PAGE_TOKEN"
# Poll until status_code = "FINISHED"
# Step 3: Publish
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "is_carousel_item=true" \
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
IMG2=$(curl -s -X POST "https://graph.facebook.com/v25.0/$IG_ID/media" \
-d "image_url=https://example.com/img2.jpg" \
-d "is_carousel_item=true" \
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Step 2: Create carousel container
CAROUSEL=$(curl -s -X POST "https://graph.facebook.com/v25.0/$IG_ID/media" \
-d "media_type=CAROUSEL" \
-d "children=$IMG1,$IMG2" \
-d "caption=Mi carrusel #carousel" \
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "access_token=$PAGE_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
curl -X POST "https://graph.facebook.com/v25.0/$IG_ID/media_publish"
-d "creation_id=$CAROUSEL"
-d "access_token=$PAGE_TOKEN"
The Instagram delete example exposes an irreversible DELETE operation with no warning about permanence or validation guidance. In a skill intended for automation, this can lead to unintended data loss or unauthorized cleanup if the wrong media ID is used.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Reels may take time to process — poll status before publishing
- Schedule Facebook posts at least 10 minutes in advance
- Instagram does NOT support native scheduling via API
- File permissions on cache: `chmod 600 ~/.meta_tokens_cache.json`
Multiple example payloads use Spanish text such as 'Tu mensaje aquí' and similar fixed-language content, while the skill does not state that it is Spanish-specific or give the user a language option. This can violate the language/locale policy when a skill implicitly defaults to one language without opt-in or justification.
Detected: suspicious.exposed_secret_literal