fix: bump github.com/go-chi/chi/v5 v5.2.4 to v5.3.1 - #27147
Conversation
|
👋 Hey @Copilot! This PR is targeting the Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format: If this is not a bug fix, it likely should not target a release branch. |
|
/coder-agents-review |
|
Chat: Review posted | View chat Review history
deep-review v0.9.0 | Round 1 | Last posted: Round 1, 2 findings (1 P1, 1 Note), REQUEST_CHANGES. Review Finding inventoryFinding inventory - PR #27147Findings
Contested and acknowledged(none this round) Drop/downgrade logCRF-5 (was P2, title CI check)
Law analysisNot run (effective additions = 1, far below the 1000 threshold). Round logRound 1Netero first pass + panel (Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Gon, Leorio + Razor wildcard). Reviewed against 404826a..cfe7434. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
There was a problem hiding this comment.
This is a clean, minimal dependency bump: go.mod/go.sum only, go mod tidy and go mod verify both pass, no scope creep, and the PR body cites the source commit (PR #27051) and the Linear issue. The mechanics are sound and the upgrade itself is worth taking.
The problem is the justification, not the change. Severity this round: 1 P1 and 1 Note inline, plus 2 Nits in this body.
The three CVE/GHSA identifiers cited as the reason for this security backport do not correspond to any real go-chi/chi advisory (CRF-1). Five reviewers reached this independently, and I verified it against chi's upstream advisories and release notes: the real advisories in this version range are the RealIP IP-spoofing set (GHSA-3fxj-6jh8-hvhx, GHSA-rjr7-jggh-pgcp, GHSA-9g5q-2w5x-hmxf, fixed in v5.3.0) and the RedirectSlashes open redirect (CVE-2025-69725 / GHSA-mqqf-5wvp-8fh8 / GHSA-vrw8-fxc6-2r93). Chi has no "path traversal via StripSlashes" advisory and no "unbounded URL path DoS" advisory, and the cited IDs appear nowhere in chi's advisory list. As Hisoka put it: "I fought the diff for the three CVEs it claims to fix. None of them landed." This is a security-tracked backport to release/2.35, so the CVE list becomes the permanent security provenance for that release. Correct it (cite the advisories v5.3.1 actually carries, or describe the change as routine dependency hygiene) before merge.
On the red title check: it is a stale, superseded run. The check passed on the latest run against this same head SHA and the PR is currently mergeable; the scopeless fix: title is valid. No action needed there.
Two minor items, raised here rather than inline because they are not diff-line issues:
- Nit [CRF-3]: the PR description uses three emdashes (U+2014) in the CVE bullets, which AGENTS.md bans in human-facing writing. The commit body already uses
-for the same lines; match it. - Nit [CRF-4]: the commit subject
chore(go.mod): upgrade ...useschorewhile the release cherry-pick policy (.github/workflows/pr-cherry-pick-check.yaml) expectsfix:for release/* targets, and thego.modscope excludesgo.sum. Squash-merge takes the PR title so it never lands, but the two records disagree; align the subject tofix: bump github.com/go-chi/chi/v5 from 5.2.4 to 5.3.1.
🤖 This review was automatically generated with Coder Agents.
Backport chi v5.3.1 to release/2.35, aligning with the upgrade already merged on main (#27051). chi v5.3.0 and v5.3.1 address several security advisories: - GHSA-9g5q-2w5x-hmxf: IP spoofing via XFF in RemoteAddr resolution - GHSA-rjr7-jggh-pgcp: RealIP allows IP spoofing via unvalidated XFF - GHSA-3fxj-6jh8-hvhx: IP spoofing in middleware.RealIP (Critical, 9.3) - GHSA-mqqf-5wvp-8fh8 (CVE-2025-69725): Open redirect in RedirectSlashes - GHSA-vrw8-fxc6-2r93: Host Header Injection in RedirectSlashes Coder does not use the affected middleware (middleware.RealIP, StripSlashes, RedirectSlashes, CleanPath); it relies on its own httpmw.ExtractRealIP and singleSlashMW. The primary motivation is keeping the release branch aligned with main to prevent drift.
cfe7434 to
63cf941
Compare
#27148) ## Summary Backport [go-chi/chi](https://github.com/go-chi/chi) v5.2.4 to v5.3.1 on `release/2.34`, aligning with the upgrade already merged on `main` via #27051. ## Security Advisories Addressed chi v5.3.0 and v5.3.1 resolve the following advisories: | Advisory | Description | Severity | |----------|-------------|----------| | [GHSA-9g5q-2w5x-hmxf](GHSA-9g5q-2w5x-hmxf) | IP spoofing via XFF in RemoteAddr resolution | — | | [GHSA-rjr7-jggh-pgcp](GHSA-rjr7-jggh-pgcp) | RealIP allows IP spoofing via unvalidated XFF | — | | [GHSA-3fxj-6jh8-hvhx](GHSA-3fxj-6jh8-hvhx) | IP spoofing in middleware.RealIP | Critical (9.3) | | [GHSA-mqqf-5wvp-8fh8](GHSA-mqqf-5wvp-8fh8) | Open redirect in RedirectSlashes (CVE-2025-69725) | — | | [GHSA-vrw8-fxc6-2r93](GHSA-vrw8-fxc6-2r93) | Host Header Injection in RedirectSlashes | — | ## Impact Assessment Coder does **not** use the directly affected middleware: - `middleware.RealIP` — Coder uses its own `httpmw.ExtractRealIP` - `StripSlashes` / `RedirectSlashes` / `CleanPath` — Coder uses its own `singleSlashMW` The primary motivation for this backport is keeping `release/2.34` aligned with `main` to prevent dependency drift and to satisfy IronBank scanning requirements. ## Changes - `go.mod` / `go.sum`: bump `github.com/go-chi/chi/v5` v5.2.4 to v5.3.1 ## Related - #27051 — original Dependabot upgrade on `main` - #27147 — same backport on `release/2.35` --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Marcin Tojek <mtojek@users.noreply.github.com>
Summary
Backport go-chi/chi v5.2.4 to v5.3.1 on
release/2.35, aligning with the upgrade already merged onmainvia #27051.Security Advisories Addressed
chi v5.3.0 and v5.3.1 resolve the following advisories:
Impact Assessment
Coder does not use the directly affected middleware:
middleware.RealIP— Coder uses its ownhttpmw.ExtractRealIPStripSlashes/RedirectSlashes/CleanPath— Coder uses its ownsingleSlashMWThe primary motivation for this backport is keeping
release/2.35aligned withmainto prevent dependency drift and to satisfy IronBank scanning requirements.Changes
go.mod/go.sum: bumpgithub.com/go-chi/chi/v5v5.2.4 to v5.3.1Related
mainrelease/2.34