Skip to content

Conversation

@another-rex
Copy link
Collaborator

@another-rex another-rex commented Dec 19, 2025

Fixes #2421

Also:

  • fixes schema validation issue which could appear if there is additional data in database specific.
  • adds integration tests to confirm all the tools works correctly.
  • Add GOTOOLCHAIN default to run_lints.sh to allow linter to run when system go version is older than expected.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.68%. Comparing base (5f791d7) to head (d64b233).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/osv-scanner/mcp/command.go 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2422      +/-   ##
==========================================
- Coverage   67.80%   67.68%   -0.13%     
==========================================
  Files         172      172              
  Lines       13318    13336      +18     
==========================================
- Hits         9030     9026       -4     
- Misses       3574     3594      +20     
- Partials      714      716       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@another-rex another-rex requested review from G-Rath and cuixq January 13, 2026 04:54
set -ex

go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 run ./...
GOTOOLCHAIN=go1.25.5 go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 run ./... $@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intended? this will probably override the environment variable specified in a command.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended, though good point about it overriding, fixed now. Right now on our machines run_lint script won't work because it uses the system's go version rather than the projects go version.

@another-rex another-rex requested a review from cuixq January 13, 2026 23:32
vulnID = "GO-2023-1558"
})

if vulnID == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is redundant now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good point, removed.

@another-rex
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses a type safety issue in the MCP command by replacing sync.Map with a standard map protected by an RWMutex. This is a great improvement for correctness and maintainability. The addition of comprehensive integration tests is also a valuable contribution that significantly improves confidence in the MCP functionality. The changes to the build scripts are also sensible. I have one suggestion to improve the concurrency handling in the vulnerability cache to prevent a potential race condition during cache misses.

@another-rex another-rex merged commit 2a77559 into google:main Jan 14, 2026
17 checks passed
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.

mcp: regression in get_vulnerability_details in v2.3.1

3 participants