T09 · Insecure Skill Coding Practices
- Location
scripts/crawl4ai.js:10- Finding
API credentials and crawl targets transmitted over forced plaintext HTTP
- Content
View full analysis
{ const body = JSON.stringify({ urls: Array.isArray(urls) ? urls : [urls] }); const headers = { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) }; if (CRAWL4AI_KEY) { headers['Authorization'] = `Bearer ${CRAWL4AI_KEY}`; } const req = http.request({ hostname, port, path: basePath + '/crawl', method: 'POST', headers }, (res) => { ``` ### Technical Analysis The implementation parses `CRAWL4AI_URL` but does not preserve or validate its protocol. Every request is created with Node.js's `http` module, including when the configured URL uses an `https://` scheme. When `CRAWL4AI_KEY` is set, it is placed in an `Authorization: Bearer` header. For any reachable plaintext HTTP endpoint, that credential and the request body containing the target URLs are transmitted without transport encryption. Although the Skill documentation describes a local Crawl4AI instance, the implementation does not restrict the configured hostname to loopback addresses or trusted hosts. Using an HTTPS URL may cause a connection failure whe ...[truncated 1659 chars]- Remediation
View remediation
