edge-computing-patterns
Audited by Socket on Nov 13, 2026
2 alerts found:
Securityx2The code is ordinary routing middleware and shows no evidence of malware, credential exfiltration, or unauthorized network activity. The primary security issue is that JWT signatures are never verified, allowing forged tokens to authorize protected routes; tokens without an exp claim are also accepted. The CSP permits unsafe-inline and unsafe-eval, and the optional rate limiter trusts x-forwarded-for, although rate limiting is disabled. Overall severity is high for authentication integrity where this middleware protects sensitive routes.
The code implements an edge API and shows no clear evidence of intentional malware or obfuscation. The /api/proxy endpoint presents a high-severity SSRF and credential-disclosure risk because callers can select an arbitrary HTTP(S) destination and the worker forwards their Authorization header; destinations are not otherwise allowlisted. The code also sends error details and request metadata to https://logging[.]example[.]com/errors and sends env.API_KEY to https://api[.]example[.]com/data. Review or restrict the proxy before deployment.