T09 · Insecure Skill Coding Practices
- Location
scripts/board.mjs:52- Finding
Unauthenticated Information Disclosure Through Non-Loopback Board Binding
- Content
View full analysis
{ handleRequest(hub, req, res).catch((error) => { if (res.headersSent) { res.end(); return; } sendText(res, error.statusCode || 400, error.message || "Request failed", { closeConnection: error.closeConnection === true, socket: req.socket, }); }); }); server.listen(candidate, host, () => { server.off("error", fail); ok(); }); ``` Board and journal contents are returned through unauthenticated GET endpoints: ```js function handleBoardRequest(record, req, res, pathname, searchParams) { const prefix = record.boardPath.slice(0, -1); if (pathname === prefix) { redirect(res, record.boardPath); return; } if (req.method !== "GET") { methodNotAllowed(res, "GET"); return; } const rest = pathname === record.boardPath ? "/" : pathname.slice(prefix.length); if (rest === "/api/board") { sendJson(res, record.lastPayload); return; } if (rest === "/api/journal") { sendJson(res, { entries: readJournal(record.root, { since: searchParams.get("since"), limit: Number(searchParams.get("limit")) || 2 ...[truncated 4421 chars]- Remediation
View remediation
