mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
detect Ubuntu Pro/ESM extended support (#5028)
Mirrors the existing RHEL `ExtendedSupport` detector for Ubuntu so grype can auto-enable its ESM distro channel on Pro/ESM-enabled scans. `findUbuntuFeatures` sets `linux.Release.ExtendedSupport` when the scanned OS is Ubuntu and any of these hold: - an uncommented apt source (classic `.list` or DEB822 `.sources`, or the ubuntu-advantage auth entry) referencing `esm.ubuntu.com` - an enabled `esm-infra`/`esm-apps` service in the ubuntu-advantage `status.json` cache - an installed dpkg package whose version carries an `[~+]esm` pocket suffix (the usual in-image signal, since containers are rarely Pro-attached) The package fallback reads `s.Artifacts.Packages` from the `DetectFeatures` SBOM callback, which runs after package cataloging, so no new plumbing was needed. Conservative by design: plain Ubuntu and disabled/commented ESM evidence stay false. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Written by ubuntu-pro-client
|
||||
deb https://esm.ubuntu.com/fips/ubuntu focal main
|
||||
# deb-src https://esm.ubuntu.com/fips/ubuntu focal main
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"_schema_version": "0.1",
|
||||
"attached": true,
|
||||
"execution_status": "success",
|
||||
"services": [
|
||||
{
|
||||
"name": "esm-apps",
|
||||
"description": "Expanded Security Maintenance for Applications",
|
||||
"available": "yes",
|
||||
"entitled": "yes",
|
||||
"status": "disabled"
|
||||
},
|
||||
{
|
||||
"name": "esm-infra",
|
||||
"description": "Expanded Security Maintenance for Infrastructure",
|
||||
"available": "yes",
|
||||
"entitled": "yes",
|
||||
"status": "disabled"
|
||||
},
|
||||
{
|
||||
"name": "fips",
|
||||
"description": "NIST-certified FIPS crypto packages",
|
||||
"available": "yes",
|
||||
"entitled": "yes",
|
||||
"status": "enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user