T09 · Insecure Skill Coding Practices
- Location
SKILL.md:84- Finding
Apify API Token Exposed Through URL Query Parameters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed Apify-based Instagram scraping workflow, but it has review-worthy scope and credential-handling concerns.
Review before installing. Use a dedicated, least-privilege Apify token, avoid the documented token-in-URL curl fallback when possible, confirm what account or URL lists will be sent to Apify, set explicit item limits, and avoid customMapFunction unless you trust the remote actor and transformation code.
SKILL.md:84Apify API Token Exposed Through URL Query Parameters
SKILL.md:73Unpinned Mutable Third-Party Apify Actor
The trigger/description language is broad and activation boundaries are not clearly constrained, which raises the risk that the skill will be invoked for loosely related requests. In an agent setting, ambiguous routing can lead to unintended third-party scraping and disclosure of queried account lists without sufficiently specific user intent.
The skill does not clearly warn that Instagram usernames and query parameters are transmitted to Apify/apidojo, a third-party service. This is a privacy and transparency issue because account lists may be sensitive business intelligence, investigative targets, or personal data, and users may not realize they are being shared externally.
The skill metadata and prose position this as a profile-data scraper, but the documented inputs allow arbitrary Instagram URLs and time-bounded post scraping. This scope mismatch can cause the agent to collect broader content than the user intended, including non-profile resources and historical post data, increasing data collection and policy/compliance risk.
Allowing a user-supplied customMapFunction JavaScript transform in a scraping skill materially expands capability beyond simple data retrieval. Even if execution occurs on the third-party platform, it enables arbitrary code-like logic over scraped data and can be abused to bypass expected data-shaping constraints or introduce unsafe processing behavior.
This documents an external POST request that sends usernames to Apify for scraping. In this skill context the transmission is expected, but it is still security-relevant because it discloses user-supplied targets to a third party and uses a bearer token in the request URL, which can increase secret exposure through logs or shell history.
REST API fallback:
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"usernames": ["handle1", "handle2"]}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
REST API fallback:
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"usernames": ["handle1", "handle2"]}'
Polling the actor run status sends the run identifier and API token to the third-party service. This is normal for the workflow, but still represents external communication and continues the practice of placing credentials in the URL, which can leak via logs or monitoring systems.
Save id as RUN_ID. Poll until status = SUCCEEDED:
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'
Fetch results:
Fetching dataset items from Apify is an external transmission of potentially sensitive scraped results and again exposes the API token in the request URL. If outputs include business/contact information or target-account data, this increases privacy and secret-handling risk if requests are logged or shared.
Fetch results:
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
The documentation says the skill performs bulk username-based profile export, but the declared input accepts generic Instagram URLs for unrelated page types. This inconsistency can mislead users and downstream agents into sending broader targets than expected, causing overcollection and unpredictable behavior.