ROX-30352: add VM-scoped vulnerability and component endpoints#19666
ROX-30352: add VM-scoped vulnerability and component endpoints#19666ajheflin wants to merge 1 commit intoaheflin/ROX-30352/vm-v2-service-scaffoldfrom
Conversation
Add 4 VM-scoped endpoints to VirtualMachineV2Service:
- GetVMVulnSummary (GET /v2/virtualmachines/{id}/vuln-summary)
- ListVMCVEsByVM (GET /v2/virtualmachines/{vm_id}/cves)
- GetVMCVEComponents (GET /v2/virtualmachines/{vm_id}/cves/{id}/components)
- ListVMComponents (GET /v2/virtualmachines/{vm_id}/components)
Includes conversion functions for CVE and component storage types to
API response types.
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This change is part of the following stack:
Change managed by git-spice. |
|
Images are ready for the commit at f331507. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## aheflin/ROX-30352/vm-v2-service-scaffold #19666 +/- ##
============================================================================
+ Coverage 49.32% 49.35% +0.02%
============================================================================
Files 2744 2744
Lines 207082 207123 +41
============================================================================
+ Hits 102152 102222 +70
+ Misses 97333 97318 -15
+ Partials 7597 7583 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Part 4/6 of the VirtualMachineV2Service API stack (ROX-30352).
Adds 4 VM-scoped endpoints:
GetVMVulnSummary(GET /v2/virtualmachines/{id}/vuln-summary) - severity counts and fixable/not-fixable totals for a single VMListVMCVEsByVM(GET /v2/virtualmachines/{vm_id}/cves) - paginated CVE list for a specific VMGetVMCVEComponents(GET /v2/virtualmachines/{vm_id}/cves/{id}/components) - components affected by a CVE on a VM (expanded row)ListVMComponents(GET /v2/virtualmachines/{vm_id}/components) - paginated component list for a VMIncludes conversion functions for CVE and component storage types to API response types.
User-facing documentation
Testing and quality
Automated testing
Service tests to be added in a follow-up.
How I validated my change
go build ./central/virtualmachine/v2/service/...compiles cleanly