T09 · Insecure Skill Coding Practices
- Location
SKILL.md:10- Finding
API Credentials Transmitted in URL Query Strings
- Content
View full analysis
Vulnerability Details
File Locations:
SKILL.md:10SKILL.md:58-62tiktok.md:5tiktok.md:33-35tiktok.md:128-130instagram.md:5instagram.md:39-41reddit.md:5reddit.md:31-33youtube.md:5youtube.md:28-30
Vulnerability Type: API credential exposure through URL query parameters
Risk Level: MediumVulnerable Code
SKILL.md:10:markdown **Authentication:** Every request must include `?token=YOUR_TOKEN`. Tokens are 12–24 characters long and are assigned on signup.SKILL.md:58-62:python res = requests.get("https://ensembledata.com/apis/customer/get-used-units", params={ "date": "2024-01-15", "token": "YOUR-TOKEN" })tiktok.md:33-35:python res = requests.get("https://ensembledata.com/apis/tt/hashtag/posts", params={ "name": "magic", "cursor": 0, "token": "YOUR-TOKEN" })tiktok.md:128-130:python res = requests.get("https://ensembledata.com/apis/tt/user/info", params={ "username": "daviddobrik", "token": "YOUR-TOKEN" })instagram.md:39-41:python res = requests.get("https://ensembledata.com/apis/instagram/user/basic-stats", params={ "username": "natgeo", "token": "YOUR-TOKEN" })reddit.md:31-33:python res = requests.get("https://ensembledata.com/apis/reddit/keyword/search", params={ "name": "machine learning", "token": "YOUR-TOKEN" })youtube.md:28-30:python res = requests.get("https://ensembledata.com/apis/youtube/keyword/search", params={ "name": "python tutorial", "token": "YOUR-TOKEN" })Technical Analysis
The Skill consistently instructs users to transmit the EnsembleData API token as a
tokenURL query parameter. Authentication is necessary for the declared social-media scraping functionality, and the requests use HTTPS to the disclosedensembledata.comservice. Therefore, t ...[truncated 1833 chars]- Remediation
View remediation
Remediation Suggestions
-
Prefer an HTTP authorization header, such as:
python headers = {"Authorization": f"Bearer {token}"} res = requests.get( "https://ensembledata.com/apis/customer/get-used-units", params={"date": "2024-01-15"}, headers=headers, timeout=30 ) -
If EnsembleData only accepts query-string authentication, explicitly document that users must:
- Disable or sanitize full-URL request logging.
- Redact the
tokenparameter in proxy, CDN, API gateway, and observability logs. - Avoid sharing request URLs, screenshots, traces, and exception output containing tokens.
- Load tokens from a secret manager or protected environment variable rather than embedding them in source code.
- Use separate tokens for development and production where supported.
- Rotate any token that may have appeared in logs or shared URLs.
-
The service should support short-lived, scoped credentials and authorization headers so that clients do not need to place long-lived secrets in URLs.
-
Documentation examples should use a variable such as
os.environ["ENSEMBLEDATA_TOKEN"]and include explicit credential-handling warnings.
-
