T05 · Unauthorized Access and Privilege Escalation
- Location
setup.sh:246- Finding
Management API Is Unauthenticated by Default
- Content
View full analysis
"$ENV_FILE" < { if (req.path === "/events/stream" || req.path === "/health") return next(); if (req.path.startsWith("/hooks/") && req.headers["x-hook-secret"] === process.env.HOOK_SECRET) return next(); const auth = req.headers.authorization; if (!auth || auth !== `Bearer ${token}`) { return res.status(401).json({ error: "Unauthorized" }); } next(); }); } ``` ### Technical Analysis Authentication middleware is installed only when both `AUTH_MODE` equals `loca ...[truncated 2056 chars]- Remediation
View remediation
