Skip to content

[serhat] Fix frontend advisories and backend CORS normalization#61

Draft
SerhatSoruklu wants to merge 2 commits into
mainfrom
fix/security-advisories
Draft

[serhat] Fix frontend advisories and backend CORS normalization#61
SerhatSoruklu wants to merge 2 commits into
mainfrom
fix/security-advisories

Conversation

@SerhatSoruklu
Copy link
Copy Markdown
Owner

What changed

  • Updated frontend dependency versions to remove the reported Vite/Hono advisories.
  • Replaced the backend CORS origin normalization regex with deterministic trailing-slash trimming.
  • Added a regression test for CORS origin normalization and allowed-origin preflight behavior.

Why

  • GitHub Dependabot reported multiple frontend dependency advisories.
  • CodeQL flagged the CORS normalization regex as vulnerable to polynomial backtracking on uncontrolled input.

Validation

  • npm audit --json in frontend reports 0 vulnerabilities.
  • npm run typecheck in frontend passed.
  • npm run build in frontend passed.
  • node --test tests/security/cors.test.js tests/zee/*.test.js passed in backend.

Notes

  • The frontend build still emits the pre-existing landing-page CSS budget warning, which is unrelated to this change.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant