Commit graph

49 commits

Author SHA1 Message Date
Zach Hill
a7cbe3a26c
fix: adds ignore rules for kernel-headers indirect matches (#1787)
* fix: adds ignore rules for kernel-headers indirect matches

Adds ignoring of kernel-headers indirect matches on kernel vulns
since the kernel-headers package does not have the kernel code in it
that kernel vulns are actually referring to.

Adds a config value to control this ignore behavior that defaults to
enabling the ignore rules.

Fixes: 1762

* Adds ignore rule support for match types and upstream package names.
* Adds default ignore rules for kernel-headers indirect matches on kernel
for rpms.

Signed-off-by: Zach Hill <zach@anchore.com>

* chore: add match-upstream-kernel-headers config to README.md

Signed-off-by: Zach Hill <zach@anchore.com>

* chore: update match labels

Signed-off-by: Keith Zantow <kzantow@gmail.com>

---------

Signed-off-by: Zach Hill <zach@anchore.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Co-authored-by: Keith Zantow <kzantow@gmail.com>
2024-04-15 13:29:19 -07:00
Keith Zantow
f664c59997
chore(test): update quality test grype db (#1726) 2024-02-23 10:01:42 -05:00
Weston Steimel
63a5788cb2
test(quality): bump label dataset and images (#1712)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2024-02-13 13:38:04 -05:00
Alex Goodman
3e0aa00242
Fix matching when RPM modularity is a factor (#1679)
* allow for RPM modularity to be optional

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* use latest syft from main

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* bump syft

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* remove lint ignores for CPEs

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* update snapshot tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* update tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: treat oraclelinux default appstream rpm modularity as missing for now

For oraclelinux, the default stream of an installed appstream package does not currently set
the MODULARITYLABEL property in the rpm metadata; however, in their advisory data they do specify
modularity information, so this ends up in a case where the vuln entries have modularity but the
packages coming from the sbom won't, so for now we need to treat the constraint as satisfied when the
modularity label from an oraclelinux package is "".

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

* test: add new appstream images to quality gate and bump labels

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

* chore: bump quality gate labels

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
Co-authored-by: Weston Steimel <weston.steimel@anchore.com>
2024-01-26 09:18:11 -05:00
Weston Steimel
a4bced1602
chore: bump to syft v0.98.0 in quality gate tests (#1623)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-11-30 09:22:34 -05:00
Weston Steimel
2cbc64cc4f
chore: bump vulnerability match label dataset (#1606)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-11-16 18:06:46 -05:00
Christopher Angelo Phillips
401d67cd96
feat: add custom maven comparator (#1571)
This PR takes the recommendation from #1526 and adapts the go-mvn-version to be used as a custom comparator for matching against packages that have the JavaPkg type. Packages of type JavaPkg will no longer use the stock matcher.
---------
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-10-27 14:24:56 -04:00
Alex Goodman
13ed926f78
bump labels to latest (#1525)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-09-27 14:47:45 +00:00
William Murphy
d94c384a97
fix: correctly guess tool comparison (#1516)
Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-09-25 09:29:24 -04:00
Weston Steimel
d6657e2498
chore: bump quality gate to use syft v0.89.0 (#1479)
Signed-off-by: Weston Steimel <weston.steimel@proton.me>
2023-09-06 17:51:51 +00:00
Alex Goodman
21250d258a
chore: pin the vulnerability DB used in quality gate testing (#1470)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-08-28 15:46:59 -04:00
Alex Goodman
0fd0c56d9a
bump vml labels (#1462)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-08-24 18:27:54 +00:00
Weston Steimel
487d038bfb
chore: bump to syft v0.87.1 in quality gate (#1442)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-08-18 06:10:22 -04:00
William Murphy
0e7c72af59
chore: Init submodule if missing (#1439)
Previously, if a user cloned grype without passing
"--recurse-submodules", the makefile under test/quality would fail to
initialize the submodule, resulting in unexpected behavior. Always
initialize the submodule if it's misisng.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-08-17 10:05:45 -04:00
William Murphy
1c084c44b0
chore: use latest yardstick (#1438)
Include changes to gate.py to correctly guess that local builds of grype
are considered the changed version, not the latest release.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-08-16 09:25:19 -04:00
Weston Steimel
74a7a67b73
chore: use syft v0.86.1 in the quality gate tests (#1418)
* chore: use syft v0.86.1 in the quality gate tests

This ensures the CPE dict enhancements are taken into account for
future quality gate comparisons

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

* fix: bump runner to use larger disk

Signed-off-by: Christopher Phillips <cphillips918@gmail.com>

---------

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
Signed-off-by: Christopher Phillips <cphillips918@gmail.com>
Co-authored-by: Christopher Phillips <cphillips918@gmail.com>
2023-08-04 16:48:21 -04:00
Weston Steimel
13feb5bf96
chore: bump quality gate label dataset (#1404)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-07-27 15:17:06 +01:00
William Murphy
5ee6bf4563
chore: in quality tests, only colorize quality output if in a tty (#1398)
Permit piping "make validate" (from test/quality) to a file without filling it with control
characters.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-07-24 10:10:06 -04:00
Weston Steimel
03d18a5de4
chore: bump yardstick to address PyYAML cython compatibility issues (#1394)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-07-18 12:54:19 -04:00
Alex Goodman
ebd4643930
Port UI to bubbletea (#1385)
* initial port to bubbletea

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* remove jotframe UI

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* add bubbletea component tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* update main.go refs to cmd package

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* move goreleaser build dir to cmd

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* upgrade yardstick for grype source installs and fix post-ui tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* ensure stable severity map in UI component test

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* add windows support for tui

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-07-13 17:13:48 +00:00
Weston Steimel
74a7185340
chore: bump quality gate labels and images (#1374)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-07-05 11:05:07 -04:00
Weston Steimel
a37940f699
chore: bump the quality gate labels (#1369)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-06-29 14:59:52 +00:00
Weston Steimel
2cd2998d0e
chore: update quality gate labels and add keycloak (#1255)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-04-24 12:38:46 +01:00
Weston Steimel
b2bd709e6d
chore: update quality gate dataset (#1206)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-31 13:16:59 +01:00
Weston Steimel
b996cbe29b
fix: by-cpe pivot by vuln metadata rather than vulnerability record (#1188)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-20 14:39:46 +00:00
Weston Steimel
52f724f785
feat: disable CPE-based matching by default for javascript (#1180)
* feat: disable CPE-based matching by default for javascript

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

* chore: bump vuln match label dataset

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

---------

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-14 16:34:41 +00:00
Weston Steimel
c3fc8cba63
chore: bump vuln match quality dataset (#1174)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-13 19:36:26 +00:00
Weston Steimel
6a46070cb1
fix: correct APK CPE version comparison logic (#1165)
Previously, the -r{buildindex} suffix of APK package versions were
treated as pre-release versions per the fuzzy matcher logic; however,
these should be treated as equivalent to the release version for the
purposes of collecting CPE-based matches for APK packages.

We may want to make a similar change in syft to generate cleaner CPE
versions for APK packages, but making the change in grype corrects
behaviour for previously-generated SBOMs as well.

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-08 14:36:56 +00:00
Weston Steimel
adad97628e
chore: bump quality gate labels and syft version (#1156)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-03-02 20:06:38 +00:00
Weston Steimel
18cce64f4a
chore: bump quality gate (#1133)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-02-14 16:54:36 +00:00
Weston Steimel
e1d24077a8
chore: add new images to quality gate (#1106)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-01-30 10:10:40 -05:00
Weston Steimel
899f8e3697
chore: bump yardstick for better quality gate filtering (#1101)
* chore: bump yardstick to 5bac4ade31ae337eae28cb8070740fe746776d0c

Better date-based filtering for oracle and amazon advisories

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

* chore: bump vulnerability-match-labels

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

---------

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-01-27 16:22:34 -05:00
Alex Goodman
e3cda98f0f
bump yardstick to 2d30ea7429d0a59020e0176bba1b3b6b8b01b08a (#1095)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2023-01-26 21:04:52 +00:00
Weston Steimel
7c5a066d08
chore: update grype quality gate (#1085)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-01-25 23:13:05 +00:00
Keith Zantow
b01678d192
chore: update yardstick to diagnose intermittent failures (#1054) 2023-01-09 17:44:08 -05:00
Keith Zantow
04a84a4440
fix: orient by cve merging (#1046) 2023-01-04 13:41:10 -05:00
Weston Steimel
ea05be970a
chore: add GitLab Community Edition image to quality gate (#1035)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-12-13 10:08:46 -05:00
Keith Zantow
2c94031e1e
fix: Exclude binary packages that have overlap by file ownership relationship (#1024) 2022-12-12 15:59:47 -05:00
Keith Zantow
2ace4c0b11
docs: update quality gate docs (#1032) 2022-12-12 15:59:25 -05:00
Alex Goodman
a869480f89
Optionally orient results by CVE (#1020)
Co-authored-by: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com>
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
2022-12-08 15:22:40 -05:00
Weston Steimel
ef82b33465
chore: bump yardstick to latest commit (#1027) 2022-12-07 20:14:45 -05:00
Weston Steimel
3183c0b58b
chore: update quality gate with latest label data (#1016)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-11-25 18:59:20 +00:00
Weston Steimel
62bc369452
chore: bump quality gate images and label data (#995)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-11-15 10:26:03 -05:00
Weston Steimel
e33b1203a1
feat: consider well-known false-positive generating CPE target SW components in match filtering logic (#961)
Enhances the CPE target software component match filtering logic to consider ecosystems which aren't currently supported by
syft cataloging but are well-known sources of false-positives. This currently adds support for filtering various
permutations of `wordpress`, `joomla`, and `drupal`

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-11-02 20:21:14 +00:00
Weston Steimel
a2ab617cef
chore: grype quality pipeline latest label updates and images (#976)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-11-01 21:20:49 +00:00
Weston Steimel
4cda526992
implement v5 db schema to support improved matching between rpm appstream modules (#944)
Adds support for a `package_qualifiers` column to allow evaluating package matches to vulnerabilities based on more than just version constraints. Currently adds an rpm-modularity qualifier in order to support matching to correct app stream module in order to reduce false positives within rpm-based distro ecosystems. In order to prevent an increase in false positive matches for previous versions of grype using the v4 schema, this change (along with the vulnerability source driver parser updates) requires bumping the schema to v5.

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
2022-10-18 00:34:47 +01:00
Weston Steimel
cd634961e6
expand quality gate image set to include rpm appstreams-related images (#952)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-10-10 17:10:10 +01:00
Weston Steimel
539e64204a
chore: add more quality gate images (#950)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-10-06 15:01:49 +01:00
Alex Goodman
d4587ddeec
Add in-depth quality gate checks (#949)
* add in-depth quality gate checks

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* add quality tests to PR checks

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2022-10-05 16:26:26 -04:00