]> git.99rst.org Git - sgasser-llm-shield.git/commit
Fix web security issues in dashboard, detector, and CORS (#146)
authorStefan Gasser <redacted>
Thu, 23 Jul 2026 16:47:21 +0000 (18:47 +0200)
committerGitHub <redacted>
Thu, 23 Jul 2026 16:47:21 +0000 (18:47 +0200)
commit14cf5497f3cbddca61783c822ee19947cc26e3b9
treebf4fef8af300b906b51d17cebfc337dd92925e59
parent5cf6d7f8985459a2c24b1ef720727b828f2726bd
Fix web security issues in dashboard, detector, and CORS (#146)

- Escape the client-supplied model string before rendering it into the
  dashboard logs table, preventing stored XSS in the dashboard origin.
- Bound the variable-name run in the ENV_PASSWORD and ENV_SECRET regexes
  to {0,128} to remove quadratic backtracking (ReDoS) on long inputs.
- Exclude the same-origin dashboard routes from the wildcard CORS policy
  so its unauthenticated JSON APIs are no longer readable cross-origin,
  while keeping permissive CORS for the proxy and mask APIs.
src/index.ts
src/secrets/patterns/env-vars.ts
src/views/dashboard/page.tsx
git clone https://git.99rst.org/PROJECT