T09 · Insecure Skill Coding Practices
- Location
scripts/search.py:61- Finding
API key exposure through unvalidated cross-origin HTTP redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This search skill is coherent, but it needs review because its API key could be forwarded on an HTTP redirect despite claiming it only goes to one fixed endpoint.
Review before installing. Use only a scoped Octen API key you can revoke or rotate, and prefer an updated version that disables redirects or revalidates every redirect target before forwarding authentication headers.
scripts/search.py:61API key exposure through unvalidated cross-origin HTTP redirects
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with request.urlopen(req) as response:
return json.loads(response.read().decode('utf-8'))
except error.HTTPError as e:
error_text = e.read().decode('utf-8') if e.fp else ''
The skill declares access to environment variables and performs network activity, but it does not declare any explicit tool scope or permissions boundaries. This creates a least-privilege and transparency problem: operators and automated policy systems cannot easily restrict or review what the skill is allowed to access, increasing the risk of unintended secret exposure or unauthorized outbound requests.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Security: Hardcoded API endpoint whitelist
ALLOWED_API_ENDPOINT = "https://api.octen.ai/search"
def validate_api_endpoint(url):
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Security: Hardcoded API endpoint whitelist
ALLOWED_API_ENDPOINT = "https://api.octen.ai/search"
def validate_api_endpoint(url):
No suspicious patterns detected.