T09 · Insecure Skill Coding Practices
- Location
scripts/validate-setup.sh:61- Finding
API Key Disclosure Caused by Fail-Open URL Validation
- Content
View full analysis
/dev/null || echo "000") ``` ### Technical Analysis The URL validation is fail-open. When `N8N_URL` fails either validation check, `print_error` only increments the global error count. It does not terminate execution, clear the invalid value, or prevent `test_api_connectivity` from running. The second validation expression also matches the colon in every normal `https://` URL: ```bash [[ "$N8N_URL" =~ @|:|key|token|secret ]] ``` As a result, a legitimate HTTPS URL is reported as containing credentials, but the script still sends the request. More importantly, an attacker-controlled HTTPS URL that fails validation is also used by `curl`, with the sensitive `N8N_API_KEY` included in the `X-N8N-API-KEY` header. TLS protects the connection in transit but does ...[truncated 1653 chars]- Remediation
View remediation
