Skip to content

fix(deps): remove vulnerable chi v4 middleware dependency - #2651

Open
Quang Nguyen (nddq) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-scanning-alerts-808
Open

fix(deps): remove vulnerable chi v4 middleware dependency#2651
Quang Nguyen (nddq) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-scanning-alerts-808

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

pkg/server and pkg/log imported the chi v4 middleware package while go.mod already requires chi/v5 for the router — a mixed-version leftover. The v4 line carries GO-2026-4316 (open redirect in RedirectSlashes) with no fixed v4 release, and govulncheck flags it as reachable.

This migrates both imports to github.com/go-chi/chi/v5/middleware and drops the v4 module from go.mod/go.sum. The v5 middleware API is drop-in for everything used.

Related Issue

Code-scanning alert 808 (govulncheck, GO-2026-4316), raised by the scanner added in #2643.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Verified on the PR head: no go-chi/chi v4 reference remains anywhere in the repo, and go build and go vet pass for pkg/server and pkg/log. govulncheck at the builder toolchain (go1.26.5) confirms GO-2026-4316 no longer appears.

Additional Notes

The govulncheck legs on this PR will still be red with 11 findings — that is unrelated to this change. Go 1.26.6 shipped stdlib security fixes on 2026-08-13 and the builder images are on 1.26.5, so seven new stdlib findings apply repo-wide until the golang-base image bump. This PR's delta is exactly the removal of GO-2026-4316.

Co-authored-by: nddq <28567936+nddq@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert #808 Remove vulnerable legacy chi middleware dependency Aug 13, 2026
@nddq Quang Nguyen (nddq) changed the title Remove vulnerable legacy chi middleware dependency fix(deps): remove vulnerable chi v4 middleware dependency Aug 14, 2026
@nddq
Quang Nguyen (nddq) marked this pull request as ready for review August 14, 2026 03:23
@nddq
Quang Nguyen (nddq) requested a review from a team as a code owner August 14, 2026 03:23
@github-actions

Copy link
Copy Markdown

Retina Code Coverage Report

Total coverage no change

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.

2 participants