Skip to content

feat(mcp): add workload vulnerability reports - #853

Merged
jhrv merged 5 commits into
mainfrom
feat/mcp-workload-vulnerability-report
Nov 16, 2026
Merged

jhrv merged 5 commits into
mainfrom
feat/mcp-workload-vulnerability-report

Conversation

@jhrv

@jhrv jhrv commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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. Request include_details: true for 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: true means 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; complete is 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, MCP go vet and staticcheck passed.
  • Original local stdio test against Oracleverk retrieved all 54 findings across pages and grouped the shared image in dev-gcp/prod-gcp.
  • Refined local stdio tests against Oracleverk verified inherited input schemas, compact output, the intended deployed digest and ready scans in both environments (now zero findings), rejection of a wrong digest and rejection of a missing requested environment.

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.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📝 Changelog preview

Below 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-16

Full Changelog: v8.3.1...v8.4.0

🚀 Features

  • (mcp) Add workload vulnerability reports (f2efda0)
  • (mcp) Summarize vulnerability fixes and verify deployed image scans (c40b3f0)

⚙️ Miscellaneous Changes

  • (mcp) Simplify vulnerability tools and task routing (8eb717b)
  • (mcp) Restore a concise vulnerability remediation workflow (f74080b)
  • (mcp) Fix vulnerability fixture lint (a6769ba)

@jhrv
jhrv merged commit d0fcd0b into main Nov 16, 2026
22 checks passed
@jhrv
jhrv deleted the feat/mcp-workload-vulnerability-report branch November 16, 2026 14:49
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.

1 participant