Repository navigation
Conversation
kyletser
force-pushed
the
feat/advisory-by-cve
branch
from
December 1, 2026 07:13
efd022a to
b2ca716
Compare
Rebase onto the current upstream main. The README is regenerated from the tool schema, so it carries both the new cveId parameter and the upstream changes to the rest of the file.
kyletser
force-pushed
the
feat/advisory-by-cve
branch
from
December 1, 2026 07:16
b2ca716 to
38c581c
Compare
5 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_global_security_advisorynow accepts either a GHSA ID or a CVE ID.Why
Fixes #3546
Agents asked to assess a CVE usually have the CVE ID, but the tool only accepted a GHSA ID, so the agent had to resolve the CVE through another source before it could read the advisory. Extending the existing tool keeps one advisory tool in the toolset.
What changed
GetGlobalSecurityAdvisoryInputgains an optionalcveIdfield;ghsaIdis no longer required on its own, so the JSON schema publishes both as optional and the handler decides.findGlobalSecurityAdvisorykeeps the GHSA path as a directGET /advisories/{ghsa_id}fetch and resolves a CVE ID throughGET /advisories?cve_id=, which is the filter GitHub provides for it.ghsaId, because the tool returns a single advisory and picking one silently would hide the others.MCP impact
get_global_security_advisorykeeps its name, itssecurity_eventsscope, its read-only annotation, and its output schema. Only the input schema and how the identifier is resolved change. Existing callers that passghsaIdare unaffected.Prompts tested (tool changes only)
Security / limits
The scope is unchanged (
security_events), and the result keeps the existing global-advisory IFC label, so the new path returns the same public, externally authored data as the GHSA path.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testgolangci-lint v2.14.0 run ./pkg/github/...reports 0 issues, andgofmt -lis clean for the three touched Go files.go test ./...passes../script/testruns with-race, which needs cgo; this machine has no C compiler (gccnot found), so the suite was run without-race.New test cases in
pkg/github/security_advisories_test.go: lookup by CVE ID, a CVE with no advisory, a CVE with several advisories, neither identifier, and both identifiers. Each was checked to fail against the code before thecveIdpath was wired up.Docs
README was regenerated with
go run ./cmd/github-mcp-server generate-docs.