Fix critical and high vulns - #5066
Conversation
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughBumps Go toolchains and many dependencies, replaces imroc/req with net/http in token and metrics code, updates Node dependency pins, enforces govulncheck in CI, clears yarn audit allowlist, and adds minor infra edits. ChangesMaintenance and Upgrade
Sequence diagrams: sequenceDiagram
participant retrieveToken
participant httpClient
participant oauth_server
retrieveToken->>httpClient: POST JSON (application/json)
httpClient->>oauth_server: HTTP POST
oauth_server->>httpClient: JSON response (200-299)
httpClient->>retrieveToken: full response body -> unmarshal -> update token/expiry
sequenceDiagram
participant cacheProjectMembership
participant httpClient
participant project_service
participant LfMembers
cacheProjectMembership->>httpClient: GET (Bearer auth, Accept: application/json)
httpClient->>project_service: HTTP GET
project_service->>httpClient: JSON response (200-299)
httpClient->>cacheProjectMembership: full response body -> unmarshal -> store names in LfMembers
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
There was a problem hiding this comment.
Pull request overview
This PR focuses on remediating critical/high vulnerabilities across the Node (serverless backends) and Go services by upgrading dependency versions, removing a third-party HTTP client, and tightening CI vulnerability scanning so regressions fail builds.
Changes:
- Upgraded Node dependency pins/resolutions (e.g., axios, basic-ftp, simple-git, fast-xml-*) and updated lockfile(s) to remove allowlisted high/critical advisories.
- Upgraded Go toolchain/dependencies (including
ginandgolang.org/x/*) and removedgithub.com/imroc/requsage by switching tonet/http. - Updated GitHub Actions security workflows to run
govulncheckwithoutcontinue-on-errorand removed the Nancy step.
Reviewed changes
Copilot reviewed 10 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
cla-backend/yarn.lock |
Locks updated transitive dependency versions to incorporate vulnerability fixes (axios/basic-ftp/fast-xml-* etc.). |
cla-backend/package.json |
Bumps simple-git and refreshes resolutions to force patched versions. |
cla-backend-legacy/go.mod |
Updates Go toolchain and indirect Go deps to patched versions. |
cla-backend-legacy/go.sum |
Syncs module checksums for upgraded dependencies. |
cla-backend-go/v2/metrics/repository.go |
Replaces imroc/req HTTP usage with net/http to reduce vuln surface and keep timeouts explicit. |
cla-backend-go/token/token.go |
Replaces imroc/req token fetch with net/http + JSON marshal/unmarshal. |
cla-backend-go/package.json |
Updates simple-git and resolution pins for vulnerable JS transitive deps used in Go backend tooling. |
cla-backend-go/go.sum |
Syncs module checksums after dependency upgrades/removals. |
cla-backend-go/go.mod |
Upgrades Go version/toolchain and several dependencies (gin, x/*, grpc, validator, etc.) and drops imroc/req. |
cla-backend-go/cmd/server_standalone.go |
Buffers the signal channel to avoid potential missed signals. |
.yarn-audit-allowlist.json |
Clears allowlist/notes so high vulns are no longer suppressed. |
.gitignore |
Ignores .claude/* artifacts. |
.github/workflows/security-scan-go.yml |
Makes govulncheck failures block the workflow (removes continue-on-error). |
.github/workflows/go-audit.yml |
Removes Nancy step and makes govulncheck failures block the workflow. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
cla-backend-go/go.mod (1)
5-7: Confirm Go 1.25 toolchain validity in cla-backend-go/go.modGo 1.25.0 is officially released, and
toolchain go1.25.10matches the latest released 1.25 patch version—no change needed for release/toolchain correctness. Still do a quick compatibility and vulnerability scan given the language/runtime bump.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cla-backend-go/go.mod` around lines 5 - 7, The go.mod declares "go 1.25.0" and "toolchain go1.25.10" which is valid; confirm this by verifying the local/build CI Go binary version (run `go version` in CI or locally) and ensure the toolchain string matches the desired patch (toolchain identifier "go1.25.10") in the file; then run a quick compatibility and vulnerability scan (e.g., `go vet`, `go test`, and `govulncheck`) against the module to surface any issues and update the toolchain line only if you need a different patch release.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cla-backend-go/package.json`:
- Line 29: The package.json still allows a vulnerable minimatch range (>=10.0.0,
<10.2.3); update the minimatch dependency entry to version ">=10.2.3" (or a
specific patched version like "10.2.3" or newer) in cla-backend-go/package.json
and then regenerate the lockfile (npm install / npm ci or yarn install) so
package-lock.json/Yarn lock is updated; if minimatch is transitive, run an audit
fix or add a resolution/overrides for "minimatch" => "10.2.3" and verify with
npm audit that the HIGH-severity advisory is resolved.
In `@cla-backend-go/token/token.go`:
- Around line 114-119: The log entry built in the non-2xx response branch is
never emitted: replace the call to log.WithFields(f).WithError(err) with an
actual logging call (e.g. log.WithFields(f).WithError(err).Error("auth0 token
request failed") or .Errorf) so the constructed err (from oauthTokenURL,
resp.StatusCode, string(respBody)) is written to logs; update the block that
sets err and currently returns it to emit the log before returning.
In `@cla-backend/package.json`:
- Line 64: Update the inconsistent dependency entry for "minimatch" so both
projects use the same version (prefer the higher version ^10.2.3); edit the
"minimatch" entry in the other package.json to match the chosen version and then
regenerate lockfiles (npm/yarn) to ensure consistency across the repo; target
the "minimatch" dependency lines in both package.json files and update
package-lock.json / yarn.lock accordingly.
---
Nitpick comments:
In `@cla-backend-go/go.mod`:
- Around line 5-7: The go.mod declares "go 1.25.0" and "toolchain go1.25.10"
which is valid; confirm this by verifying the local/build CI Go binary version
(run `go version` in CI or locally) and ensure the toolchain string matches the
desired patch (toolchain identifier "go1.25.10") in the file; then run a quick
compatibility and vulnerability scan (e.g., `go vet`, `go test`, and
`govulncheck`) against the module to surface any issues and update the toolchain
line only if you need a different patch release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 871e59c1-fb01-45f3-b213-25d60fb88c5a
⛔ Files ignored due to path filters (4)
cla-backend-go/go.sumis excluded by!**/*.sumcla-backend-go/yarn.lockis excluded by!**/yarn.lock,!**/*.lockcla-backend-legacy/go.sumis excluded by!**/*.sumcla-backend/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (11)
.github/workflows/go-audit.yml.github/workflows/security-scan-go.yml.gitignore.yarn-audit-allowlist.jsoncla-backend-go/cmd/server_standalone.gocla-backend-go/go.modcla-backend-go/package.jsoncla-backend-go/token/token.gocla-backend-go/v2/metrics/repository.gocla-backend-legacy/go.modcla-backend/package.json
💤 Files with no reviewable changes (2)
- .github/workflows/go-audit.yml
- .github/workflows/security-scan-go.yml
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
@code PTAL agin. |
|
@copilot review all 15 files, not just 10. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Fixes critical vulns.
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude
cc @mlehotskylf @ahmedomosanya