Fixed false positive CVE on emacs-common on Ubuntu.#39895
Fixed false positive CVE on emacs-common on Ubuntu.#39895
Conversation
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
WalkthroughThis pull request addresses a false positive CVE detection for Debian packages with epoch prefixes in their version strings. Changes include adding logic to 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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.
Pull request overview
This pull request fixes a false positive CVE detection issue for the emacs-common package on Ubuntu. The root cause was that Debian/RPM package versions include an "epoch" prefix (e.g., "1:" in "1:29.3+1-1ubuntu2") which is package manager metadata, not part of the upstream software version. When matching against the NVD CPE database, this epoch was being misinterpreted as part of the version number, causing incorrect CVE matches.
Changes:
- Added epoch prefix stripping for deb_packages and rpm_packages sources in CPE string formatting
- Created comprehensive unit tests covering epoch stripping scenarios
- Added changelog entry for the fix
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/vulnerabilities/nvd/indexed_cpe_item.go | Added logic to strip epoch prefix (e.g., "1:") from version strings for deb_packages and rpm_packages before CPE matching, with clear documentation explaining why |
| server/vulnerabilities/nvd/indexed_cpe_item_test.go | New test file with comprehensive test cases covering epoch stripping for deb/rpm packages, packages without epochs, and non-deb/rpm sources |
| changes/39370-emacs-false-positive | Changelog entry documenting the fix for users |
💡 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 #39895 +/- ##
==========================================
- Coverage 66.27% 66.26% -0.01%
==========================================
Files 2439 2439
Lines 195446 195449 +3
Branches 8615 8615
==========================================
- Hits 129528 129511 -17
- Misses 54189 54204 +15
- Partials 11729 11734 +5
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 #39370
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.Testing
Summary by CodeRabbit
Bug Fixes
Tests