T09 · Insecure Skill Coding Practices
- Location
scripts/mealie_import.py:30- Finding
Long-Lived API Token Can Be Exposed Through Plaintext HTTP and Unvalidated Redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Mealie recipe importer, but it handles a long-lived API token in a way that can expose it if users follow the documented HTTP configuration.
Install only if you are comfortable giving the skill a Mealie API token that can create and modify recipe data. Use HTTPS for MEALIE_URL, prefer a dedicated revocable token with the least permissions available, avoid exposing the token in shared logs or shell history, and rotate any token previously used over plaintext HTTP.
scripts/mealie_import.py:30Long-Lived API Token Can Be Exposed Through Plaintext HTTP and Unvalidated Redirects
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
h["Content-Type"] = "application/json"
r = urllib.request.Request(BASE + path, data=body, headers=h, method=method)
try:
with urllib.request.urlopen(r, timeout=90) as resp:
raw = resp.read().decode()
return json.loads(raw) if raw.strip() else None
except urllib.error.HTTPError as e:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
h["Content-Type"] = "application/json"
r = urllib.request.Request(BASE + path, data=body, headers=h, method=method)
try:
with urllib.request.urlopen(r, timeout=90) as resp:
raw = resp.read().decode()
return json.loads(raw) if raw.strip() else None
except urllib.error.HTTPError as e:
The documented behavior says the skill imports recipes from photo, text, or URL, but the described implementation actually depends on pre-structured JSON input and also creates foods and units in Mealie. This mismatch can mislead operators about what the skill will do and what permissions or data modifications it requires, which is dangerous because hidden write behavior can expand impact on a production Mealie instance.
The skill requires access to environment variables and makes authenticated network requests, but it does not declare any explicit tool scope or allowed-tools boundary. That weakens least-privilege controls and can cause the agent runtime to grant broader capabilities than users expect, increasing the chance of unintended secret access or outbound requests.
No suspicious patterns detected.