Filter vulnerable software by cvss on my device page#47372
Filter vulnerable software by cvss on my device page#47372dantecatalfamo wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #47372 +/- ##
==========================================
+ Coverage 67.18% 67.22% +0.03%
==========================================
Files 3177 3394 +217
Lines 227069 228352 +1283
Branches 11743 11766 +23
==========================================
+ Hits 152565 153507 +942
- Misses 60766 61023 +257
- Partials 13738 13822 +84
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds support for filtering vulnerable software on the device-authenticated “My device” software inventory endpoint by CVSS score range and “known exploited” status, while enforcing Fleet Premium licensing for those severity-based filters.
Changes:
- Added integration coverage for CVSS/exploit filtering behavior on the device token endpoint (premium) and missing-license behavior (free tier).
- Enforced Fleet Premium gating in
ListHostSoftwarewhen severity-based vulnerability filters are requested. - Wired frontend “My device” software UI to pass premium-tier status and accept the new query params; documented the new endpoint parameters for contributors.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| server/service/integration_enterprise_test.go | Adds premium integration assertions for CVSS/exploit filters on the device software endpoint. |
| server/service/integration_desktop_test.go | Verifies free-tier rejects premium severity filters (402) while still allowing vulnerable=true. |
| server/service/hosts.go | Enforces Premium license requirement when CVSS/exploit filters are used. |
| frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx | Extends query typing and passes premium-tier flag into the “My device” software card. |
| frontend/pages/hosts/details/cards/Software/HostSoftware.tsx | Uses passed premium-tier flag for token-authenticated “My device” view (no app session context). |
| docs/Contributing/reference/api-for-contributors.md | Documents new query parameters for device software listing (with a needed correction noted in review). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds CVSS range and known-exploit query parameters (min_cvss_score, max_cvss_score, exploit) to the device-authenticated GET /device/{token}/software flow, extends the My Device frontend to accept those query params and pass isPremiumTier to HostSoftware, enforces Premium-only access for those filters in ListHostSoftware (returning ErrMissingLicense / 402 when used on free tier), and adds integration tests covering behavior and license gating including boundary and validation cases. Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Related issue: Resolves #35694
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.Testing
Summary by CodeRabbit
New Features
min_cvss_score,max_cvss_score) and known exploit status filtering for vulnerable software in Fleet Premium's "My device" tab.Improvements