T09 · Insecure Skill Coding Practices
- Location
SKILL.md:85- 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 mostly does what it says, but it sends TikTok account lists to Apify and documents commands that can expose the user's Apify token in URLs.
Review before installing. Use a dedicated low-privilege Apify token, prefer Authorization-header authentication over token-in-URL examples, avoid sensitive or regulated account lists unless Apify processing is acceptable, and be cautious with customMapFunction because it runs code-like logic over scraped data.
SKILL.md:85Apify API Token Exposed Through URL Query Parameters
The skill sends TikTok usernames/URLs and query parameters to Apify, a third-party service, but the description does not clearly warn users about this data transfer. This creates a transparency and privacy risk because users may provide creator lists or account targets without understanding that the data leaves the local environment and is processed externally.
The manifest describes a skill for scraping TikTok profile statistics and metadata such as follower counts, likes, video count, and bio. However, the documented inputs since, until, and maxItems are framed around returning posts within a date range and limiting posts, which implies content-level scraping beyond profile metadata.
Allowing a user-supplied customMapFunction introduces a code-like transformation surface that exceeds the stated scope of simple profile scraping. Even if execution occurs within Apify rather than locally, this can enable unreviewed arbitrary logic over scraped data, increasing the risk of misuse, unexpected outbound behavior within the third-party platform, or expansion beyond the declared purpose.
This step explicitly transmits user-supplied TikTok usernames to Apify over the network, which is an external data transfer. In the context of a scraping skill this is expected behavior, but it is still security-relevant because potentially sensitive target lists and the APIFY_TOKEN are involved, and users may not realize the request depends on a third-party processor.
REST API fallback:
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~tiktok-profile-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"usernames": ["creator1", "creator2"]}'
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~tiktok-profile-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"usernames": ["creator1", "creator2"]}'
Polling the actor run status via Apify is another external network interaction and continues exposing operational metadata tied to the scraping job and tokenized account context. While expected for this workflow, it reinforces that the skill depends on a third-party execution environment and that token handling and user awareness matter.
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 retrieves externally processed results and confirms that scraped account data is stored and served by a third-party platform. The danger is not the fetch itself but the privacy/compliance risk of transmitting, storing, and later retrieving data outside the local trust boundary without prominent notice.
Fetch results:
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
No suspicious patterns detected.