T09 · Insecure Skill Coding Practices
- Location
scripts/trains.sh:7- Finding
Arbitrary Huxley2 Endpoint Override Can Disclose the National Rail API Token
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This train-times skill has a legitimate purpose, but one included helper script can send the National Rail token to an environment-selected endpoint.
Review this before installing. The Python command path appears purpose-aligned, but avoid using scripts/trains.sh unless you trust and control the HUXLEY_URL environment; rotate the National Rail token if it may have been used with an untrusted endpoint. Prefer a version that removes the endpoint override or validates it against trusted HTTPS origins and avoids putting tokens in URLs.
scripts/trains.sh:7Arbitrary Huxley2 Endpoint Override Can Disclose the National Rail API Token
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
return resp.read().decode('utf-8')
except HTTPError as e:
print(json.dumps({'error': f'HTTP {e.code}: {e.reason}'}), file=sys.stderr)
The skill description claims behavior that does not match the detected implementation, including using a different API path and overstating station-search coverage. Description-behavior mismatches are dangerous because they undermine trust, impair review, and can hide undeclared data flows or unsupported edge cases that operators and users rely on when granting access or making decisions.
The skill appears to require environment access, network access, and shell execution, but it does not declare any explicit tool scope or permissions. That makes the skill's operational privileges opaque to the host and reviewers, increasing the risk of over-broad execution, accidental secret exposure, or unintended command/network use beyond the stated train-query purpose.
No suspicious patterns detected.