镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix Ubuntu OSV binary package matching - #49816

Closed
sleepy-slothh wants to merge 5 commits into
fleetdm:mainfrom
sleepy-slothh:fix-ubuntu-osv-binary-package-names
Closed

sleepy-slothh wants to merge 5 commits into
fleetdm:mainfrom
sleepy-slothh:fix-ubuntu-osv-binary-package-names

Conversation

@sleepy-slothh

@sleepy-slothh sleepy-slothh commented Jul 23, 2026 •

Copy link
Copy Markdown

Related issue: #39900

Summary

Issue #39900 identified Ubuntu OSV binary package mappings as a required part of the OSV migration. The current processor reads the source package name but does not deserialize or emit package names from ecosystem_specific.binaries, which can result in false negatives for installed binary packages whose names differ from their source package.

Canonical Ubuntu OSV records identify the affected source package in affected.package.name and provide installed binary package names under affected.ecosystem_specific.binaries.

Example:

  • Source package: libssh2
  • Installed binary package: libssh2-1t64

This is an unreleased bug fix for #39900. The fix is generic and does not contain libssh2- or t64-specific matching logic.

Changes

  • Parses Ubuntu ecosystem_specific.binaries.
  • Emits binary package names as additional Ubuntu artifact keys.
  • Preserves source package keys.
  • Ignores empty binary package names.
  • Deduplicates package names while preserving deterministic order.
  • Adds/updates tests for binary expansion, duplicate names, empty names, nil ecosystem-specific data, and ordering.

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Automated:

go test ./cmd/osv-processor -v

Result: PASS.

Manual artifact generation:

  • Canonical record: CVE-2025-15661
  • Ubuntu release: 26.04
  • Generated result: Ubuntu 26.04: 2 packages, 1 CVEs
  • Artifact contains both libssh2 and libssh2-1t64
  • Generated libssh2-1t64 entry resolves in 1.11.1-1ubuntu0.26.04.2
  • Vulnerable versions include 1.11.1-1ubuntu0.26.04.1

Summary by CodeRabbit

  • Bug Fixes

    • Fixed Ubuntu vulnerability detection for installed binary packages when binary names differ from their corresponding source package names.
    • Enhanced vulnerability artifact generation to include matching Ubuntu binary package identifiers and to skip creating artifacts when no packages are found.
  • New Features

    • Added support for Ubuntu binary-level details in vulnerability parsing and processing.
  • Tests

    • Added unit and integration coverage for Ubuntu binary expansion, deduplication, handling missing Ubuntu metadata, and correct artifact output.

@sleepy-slothh
sleepy-slothh requested a review from a team as a code owner July 23, 2026 13:19
@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: da16fd6f-f0ff-4dd8-91de-9633db16780b

📥 Commits

Reviewing files that changed from the base of the PR and between 663e6a0 and a4a1d2e.

📒 Files selected for processing (5)
  • changes/ubuntu-osv-binary-package-names
  • cmd/osv-processor/main.go
  • cmd/osv-processor/main_test.go
  • cmd/osv-processor/transforms.go
  • cmd/osv-processor/transforms_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • changes/ubuntu-osv-binary-package-names
  • cmd/osv-processor/transforms.go
  • cmd/osv-processor/transforms_test.go
  • cmd/osv-processor/main.go

Walkthrough

Ubuntu OSV processing now parses EcosystemSpecific.Binaries entries containing binary names and versions. The Ubuntu artifact-generation loop augments transformed package lists with deduplicated binary names before writing vulnerability artifacts and deltas, and skips empty results. Unit tests cover expansion, nil ecosystem data, duplicate names, and empty binary names. A changelog entry documents the fix.

Possibly related PRs

  • fleetdm/fleet#49399: Updates the OSV parsing model and EcosystemSpecific handling in the same processor.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing Ubuntu OSV binary package matching.
Description check ✅ Passed The description follows the template well and includes issue link, summary, changes, checklist, and testing details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.95%. Comparing base (0786a5c) to head (2d16f6e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #49816    +/-   ##
========================================
  Coverage   67.95%   67.95%            
========================================
  Files        3922     3908    -14     
  Lines      250011   249999    -12     
  Branches    13140    13334   +194     
========================================
- Hits       169888   169881     -7     
+ Misses      64831    64823     -8     
- Partials    15292    15295     +3     
Flag Coverage Δ
backend 69.35% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sleepy-slothh
sleepy-slothh force-pushed the fix-ubuntu-osv-binary-package-names branch from 663e6a0 to a4a1d2e Compare July 23, 2026 13:48
@juan-fdz-hawa

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Could you share a few examples of the false negatives this aims to fix?

@sleepy-slothh

Copy link
Copy Markdown
Author

Sure! The concrete false negative that led me to this was libssh2 on Ubuntu 26.04.

For UBUNTU-CVE-2025-15661, the Canonical OSV record has:

  • source package: libssh2
  • binary package: libssh2-1t64

Before this change, the OSV processor only generated an artifact key for the source package name libssh2. Since the host package is called libssh2-1t64, there is no package-name match, so the CVE is missed.

With this change, the artifact contains keys for both libssh2 and libssh2-1t64, so the installed binary package resolves correctly.

I also looked for other examples of the same source/binary split in Canonical's OSV data. For example:

  • UBUNTU-CVE-2026-11586: source curl, with binaries including curl, libcurl3t64-gnutls, and libcurl4t64
  • UBUNTU-CVE-2025-3277: source sqlite3, with binaries including sqlite3, libsqlite3-0, libsqlite3-tcl, etc.

So the issue isn't specific to libssh2 or t64: in general, when Fleet inventories an installed Ubuntu binary package whose name differs from the corresponding source package name, source-only artifact generation can result in the vulnerability not being matched.

jkatz01 added a commit that referenced this pull request Aug 31, 2026
- Adds related issue (if any), and if any of the manual QA checkboxes
were selected.
- Adds a -v verbose mode that also outputs who is assigned to the PR, a
full link, and tags from the related issue

Examples:
```
jonathan@jonathans-macbook-pro:~/repos/fleet-2$ ./tools/oncall/oncall.sh prs
51893  2026-08-25T17:29:40Z         tested  prateek-0490     Batch scheduled query name lookups when processing result logs
51881  2026-08-25T16:25:40Z                 nonpunctual      Include script for printer configuration from CSV
51845  2026-08-25T04:20:44Z  49502  tested  rajendrachavan   Write a query and its labels in a single transaction
51731  2026-08-21T19:49:52Z         tested  prateek-0490     Validate software list order keys against an allowlist
51583  2026-08-19T19:34:15Z         tested  prateek-0490     Require a team selection when validating report run targets
51338  2026-08-17T05:23:53Z  50846          Dhvanit41        Hide the toast details panel when the payload is empty
51265  2026-08-14T17:54:28Z         tested  prateek-0490     Expand host script variables via the environment
51241  2026-08-14T14:32:34Z  50336  tested  andymFleet       50336 apple business stale fleet names
51178  2026-08-13T20:18:48Z                 moojomoore       Add macOS unlock user account action
51119  2026-08-13T05:28:14Z  50882          Dhvanit41        Return an error when refetching an Android host
51020  2026-08-12T00:46:05Z  40092          sjawhar          Support credentialProviderPolicy in Android app configuration
50943  2026-08-11T12:31:48Z  46773  tested  surajtripathy07  Add software custom targets warning to delete label modal
50898  2026-08-10T19:26:08Z  45100          tianrking        Recover vulnerability counts after interrupted table swaps
50836  2026-08-08T19:23:13Z  50300  tested  kitarp29         Adding the logic to make controls even when it's empty
50822  2026-08-08T01:35:19Z         tested  viewer12         Add Nexus Shell as a macOS Fleet-maintained app
50774  2026-08-07T15:14:11Z  50357  tested  Dhvanit41        Clear stale failure detail when an Android profile becomes verified
49816  2026-07-23T13:19:19Z         tested  sleepy-slothh    Fix Ubuntu OSV binary package matching
43774  2026-04-20T15:46:23Z                 BCTBB            Helm - Gateway API support
```

```
jonathan@jonathans-macbook-pro:~/repos/fleet-2$ ./tools/oncall/oncall.sh prs -v
51893  2026-08-25T17:29:40Z         tested  prateek-0490                       #51893  Batch scheduled query name lookups when processing result logs
51881  2026-08-25T16:25:40Z                 nonpunctual                        #51881  Include script for printer configuration from CSV
51845  2026-08-25T04:20:44Z  49502  tested  rajendrachavan   lucasmrod         #51845  Write a query and its labels in a single transaction                 bug, ~backend, ~released bug, #g-orchestration
51731  2026-08-21T19:49:52Z         tested  prateek-0490     juan-fdz-hawa     #51731  Validate software list order keys against an allowlist
51583  2026-08-19T19:34:15Z         tested  prateek-0490     juan-fdz-hawa     #51583  Require a team selection when validating report run targets
51338  2026-08-17T05:23:53Z  50846          Dhvanit41                          #51338  Hide the toast details panel when the payload is empty               bug, ~frontend, ~released bug, #g-auto-patching
51265  2026-08-14T17:54:28Z         tested  prateek-0490     georgekarrv       #51265  Expand host script variables via the environment
51241  2026-08-14T14:32:34Z  50336  tested  andymFleet       JordanMontgomery  #51241  50336 apple business stale fleet names                               bug, ~released bug, #g-apple-at-work
51178  2026-08-13T20:18:48Z                 moojomoore                         #51178  Add macOS unlock user account action
51119  2026-08-13T05:28:14Z  50882          Dhvanit41                          #51119  Return an error when refetching an Android host                      bug, ~released bug, #g-byod
51020  2026-08-12T00:46:05Z  40092          sjawhar                            #51020  Support credentialProviderPolicy in Android app configuration        ~feature fest, customer-pingali, #g-byod
50943  2026-08-11T12:31:48Z  46773  tested  surajtripathy07  lucasmrod         #50943  Add software custom targets warning to delete label modal            bug, ~released bug, #g-orchestration, customer-susanoo
50898  2026-08-10T19:26:08Z  45100          tianrking        juan-fdz-hawa     #50898  Recover vulnerability counts after interrupted table swaps           bug, ~released bug, ~community, #g-supply-chain, ~aging bug
50836  2026-08-08T19:23:13Z  50300  tested  kitarp29         lucasmrod         #50836  Adding the logic to make controls even when it's empty               bug, ~gitops, #g-orchestration
50822  2026-08-08T01:35:19Z         tested  viewer12         AdamBaali         #50822  Add Nexus Shell as a macOS Fleet-maintained app
50774  2026-08-07T15:14:11Z  50357  tested  Dhvanit41                          #50774  Clear stale failure detail when an Android profile becomes verified  bug, ~released bug, #g-byod
49816  2026-07-23T13:19:19Z         tested  sleepy-slothh                      #49816  Fix Ubuntu OSV binary package matching
43774  2026-04-20T15:46:23Z                 BCTBB                              #43774  Helm - Gateway API support
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added an optional verbose mode for pull request listings, showing
assignees, URLs, linked issue labels, and manual QA status.
  * Improved output formatting with aligned columns.
* **Bug Fixes**
* Unknown command-line arguments are now rejected with clearer usage
guidance.
  * Improved detection of linked issues in pull request descriptions.
* **Documentation**
  * Updated command usage information to describe the verbose option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@juan-fdz-hawa

Copy link
Copy Markdown
Contributor

Thanks for reporting this! I've created #52218 to keep track of this. Unfortunately, we will follow a different approach for fixing this, so I'll be closing this.

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.

3 participants