Fixed Admin By Request false positive CVEs - #42095
Conversation
|
@claude review |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
WalkthroughThis PR addresses false-positive vulnerability reports for Admin By Request on macOS and Linux by suppressing CVE-2019-17201 and CVE-2019-17202, which are Windows-specific. The changes include a new CPEMatchingRule in the NVD vulnerability matching logic that filters out these CVEs when the target software is not Windows, a corresponding test case validating platform-specific CVE matching behavior, and a changelog entry documenting the fix. Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@server/vulnerabilities/nvd/cpe_matching_rules.go`:
- Around line 327-329: The IgnoreIf closure currently returns cpeMeta.TargetSW
!= "windows", which also suppresses CVEs when TargetSW is empty/ANY; update the
IgnoreIf in cpe_matching_rules.go so it only ignores when TargetSW is a known
non-Windows value (i.e., not empty and not "ANY" and not "windows"). Concretely,
change the predicate on IgnoreIf (the function taking cpeMeta *wfn.Attributes)
to first ensure cpeMeta.TargetSW is non-empty and not "ANY", and then check it
is not "windows" so unknown/ANY TargetSW will not be suppressed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e42f2887-9e8a-47ec-a233-f137953d9ea2
📒 Files selected for processing (3)
changes/41586-admin-by-request-false-positiveserver/vulnerabilities/nvd/cpe_matching_rule_test.goserver/vulnerabilities/nvd/cpe_matching_rules.go
There was a problem hiding this comment.
Pull request overview
This PR addresses false-positive vulnerability detections for Admin By Request on non-Windows hosts by adding an NVD CPE-matching exception rule, ensuring the affected CVEs are only considered applicable on Windows.
Changes:
- Added a known NVD bug rule to ignore CVE-2019-17201 and CVE-2019-17202 unless the CPE target software is Windows.
- Added unit test coverage to verify the rule behavior across macOS/Linux/Windows target_sw values.
- Added a changelog entry documenting the false-positive fix.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/vulnerabilities/nvd/cpe_matching_rules.go | Adds a CPE matching rule to treat the ABR CVEs as Windows-only by filtering on target_sw. |
| server/vulnerabilities/nvd/cpe_matching_rule_test.go | Adds tests asserting the ABR CVEs match only for Windows target_sw. |
| changes/41586-admin-by-request-false-positive | Documents the user-visible fix in a changes entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42095 +/- ##
==========================================
+ Coverage 66.40% 66.46% +0.06%
==========================================
Files 2513 2516 +3
Lines 201457 201941 +484
Branches 9060 9060
==========================================
+ Hits 133772 134225 +453
+ Misses 55583 55570 -13
- Partials 12102 12146 +44
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:
|
Related issue: Resolves #41586
The fix is speculative since I wasn't able to find/get the "Admin By Request" app to install.
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.Testing
Summary by CodeRabbit