Repository navigation
feat(mcp): add workload vulnerability reports - #853
Merged
Merged
Conversation
Contributor
📝 Changelog previewBelow is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog. v8.4.0 - 2026-11-16Full Changelog: v8.3.1...v8.4.0 🚀 Features
⚙️ Miscellaneous Changes |
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
Add two read-only MCP tools for vulnerability remediation without requiring agents to discover the GraphQL schema first:
get_workload_vulnerability_report: a compact overview grouped by installed package PURL, with severity/priority counts, reported fix/latest versions, unknown-fix counts and suppression counts. Requestinclude_details: truefor full individual findings.get_workload_vulnerability_status: check an expected new image digest after deploy without retrieving individual findings. Reports digest unavailable, not deployed, scan pending/unavailable or scan ready; verifies every explicitly requested environment and each workload's scan metadata.Resolve exact application/job names across environments, requiring an explicit kind when ambiguous.
Retrieve all workload and finding pages and group shared images by image name and digest, with a warned tag fallback.
Include image identity, deployment metadata and SBOM/summary freshness. Fail on incomplete pagination or an image change during finding retrieval.
Guide agents to compare deployed versions with source before upgrading, distinguish local fixes from deployed remediation, and require evidence and explicit approval for suppression.
Reuse a common Workload fragment and API-side finding ordering rather than duplicating field selections and implementing local severity sorting.
verified: truemeans the intended digest is deployed with READY SBOM and a timestamped summary without older-image fallback. It does not imply zero findings, no suppressions or verified image-to-source provenance. Reported fix versions may span release branches; the tool does not guess an upgrade from lexical ordering.Includes documentation, generated GraphQL client code and focused behavior tests. Pagination uses three findings across two pages rather than a large synthetic dataset. Tests cover compact vs detailed output, grouping, API errors, incomplete pagination, image changes, partial rollouts and missing/stale scan metadata.
Keeping additional tools simple
Use explicit registration, typed contracts, thin handlers and ordinary functions accepting the existing GraphQL client. Shared image discovery returns image groups rather than a report envelope, so report and status assemble their own results;
completeis set only after every finding page succeeds.Tool descriptions focus on routing, results and safety, with longer guidance in MCP.md. Known targets do not need an unconditional context/schema round trip. MCP.md documents this pattern for future task-specific tools; no new dependencies, registry or workflow/pagination framework.
API gaps
Advisory withdrawal/aliases and a verified image-to-source build relationship are not exposed by the current API. This change documents those limitations rather than guessing or making external OSV requests. Summary update time is not presented as an authoritative scan timestamp.
Validation
mise run test(full CLI suite with race detection),mise run fmt,mise run build, MCPgo vetandstaticcheckpassed.No deploys or suppression changes by these tools. Automatic tool selection from a fresh natural-language agent session has not yet been evaluated; a short acceptance procedure is documented in MCP.md.