Commit graph

106 commits

Author SHA1 Message Date
Keith Zantow
4dfd9d76d1
feat: update to Syft 1.11.0 (#2047) 2024-08-09 14:32:05 -04:00
anchore-actions-token-generator[bot]
406d196726
chore(deps): update Syft to v1.10.0 (#2019) 2024-07-30 13:18:54 -04:00
Alex Goodman
e5b341b87a
add skopeo to managed utilities (#1915)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-06-06 18:58:34 +00:00
Alex Goodman
621eeddcce
Update syft to 1.4.2-0.20240528141306-ac34808b9c55 (#1895)
* update to latest syft

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

* fix tests related to syft bump

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-05-28 15:06:16 +00:00
Christopher Angelo Phillips
57af1c34cb
chore: update syft to latest v1.1.1 (#1784)
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
2024-04-04 11:52:02 -04:00
Keith Zantow
77e00feb42
chore: update syft source providers (#1727) 2024-02-27 20:47:51 -05:00
anchore-actions-token-generator[bot]
b9cf0e5cf8
chore(deps): update Syft to v0.105.0 (#1714)
* chore(deps): update Syft to v0.105.0

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix tests

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

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-02-14 22:09:50 +00:00
William Murphy
396cc0aea7
Bump Syft in Grype to pull in unmarshaling fix (#1703)
* WIP: package builds but tests do not

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* WIP: some unit tests compile

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* WIP: unit tests compile but do not pass

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* Units passing with some changes to syft

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* fix: excludes plus bad sbom should not suppress error

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* add conan entry v2 package test

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* bump syft again

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* chore: fix compiler error in integration tests

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* chore: remove erlang OTP from package types that must be seen in test image

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* bump syft version used

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

---------

Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-02-07 14:28:48 -05:00
William Murphy
73cb5f6647
chore: break assumption that syft cpe.CPE is wfn.Attributes (#1675)
* chore: break assumption that syft cpe.CPE is wfn.Attributes

Previously, Syft's cpe.CPE type was an alias for wfn.Attributes. Fix a
couple places where Grype's compilation depended on that fact, since it
will stop being true in the next Syft release.

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* chore: fix linter

Signed-off-by: Will Murphy <will.murphy@anchore.com>

---------

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2024-01-25 14:24:01 +00:00
Alex Goodman
4569a5ffa6
upgrade syft with latest SBOM creation API (#1662)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-01-17 12:33:09 -05:00
Dan Luhring
474030cc62
fix: distro FP data not applied correctly (#1603)
* fix: distro FP data not applied correctly

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>

* fix: apply FP data to apk subpackages

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>

---------

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-01-04 13:12:18 -05:00
Alex Goodman
21958a43b5
Incorporate format API changes from syft (#1582)
* incorporate changes from anchore/syft#2228

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

* fix testing utils to use syft SBOM

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-11-02 15:25:48 -04:00
Alex Goodman
156c081d3e
Incorporate Syft java detection improvements (#1555)
* incorporate anchore/syft#2220

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

* incorporate .net core improvements

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-10-20 13:34:36 -04:00
Weston Steimel
25762b7e3b
feat: disable CPE-based matching for GHSA ecosystems by default (#1412)
* feat: disable CPE-based matching for GHSA ecosystems by default

Disables CPE-based matching for ecosystems which are covered by GitHub
Security Advisories.  Also adds a separate rust matcher and related
configuration to allow configuring CPE-based matching off for it while
still leaving it on for the stock matcher.

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

* chore: use --by-cve with quality gate comparison

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

* chore: add rust auditable binary match integration test

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

---------

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-10-12 09:07:33 -04:00
anchore-actions-token-generator[bot]
7e5df38029
chore(deps): update Syft to v0.93.0 (#1550)
* chore(deps): update Syft to v0.93.0

Signed-off-by: GitHub <noreply@github.com>

* fix test to account for go pkg stdlib

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

---------

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: wagoodman <wagoodman@users.noreply.github.com>
2023-10-10 18:26:34 +00:00
William Murphy
2f405f0680
fix: use PEP440 for Python package version comparison (#1510)
Previously, grype used fuzzy matcher for Python packages, since
there are cases in PEP440 that are not strictly semver. Switch to a
library that does PEP440 parsing and comparison for python version 
constraints.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-09-22 13:32:48 -04:00
Alex Goodman
18241e8986
Upgrade syft to v0.91.0 (#1508)
* bump syft to main

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

* upgdate cyclonedx presenter fixtures (bump from cdx 1.4 to 1.5)

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

* update cyclonedx schema

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

* allow for pkg type exceptions for github actions and workflows

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

* update cyclonedx json schema from v1.4 to v1.5

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

* bump to syft v0.91.0

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

* upgrade go-setup action to v4

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

* remove asset upload from release workflow

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-09-20 16:39:23 -04:00
Puerco
b952d3808c
Ignore/add match results based on OpenVEX documents (#1397)
* go.mod: Pull OpenVEX go modules

This commit pulls the OpenVEX libraries into the grype source.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Add generic VEX processor package

This commit adds a generic VEX processor package. It is implementation
agnostic. It has a single option for now: The documents used to load
the VEX data.

The processor has a single method: ApplyVEX() which takes a set of scan
results and applies VEX data to them. For now, the only modification that
is done is filtering of results, that is moving results to the ignored list
as a response to VEX documents.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* vex: Add OpenVEX processor implementation

This commit adds an openvex implementation of the vex processor.
It also wires the VEX processor to use it as default.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Table presenter: Highligt results suppressed by VEX

This commit marks results suppressed by VEX when presenting them
to the user.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Define  VEX status constants

This commit defines a set of local constants of each of the VEX statuses
based on the openvex constants.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Add VexStatus to ignore rules

This commit modifies the ignore rules structure to support defining a vex
status. Any rules defining vex are ignored by the standard ignore rules
processing as they will be handled by the VEX processor.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Add IgnoreRule HasConditions method

Adds a new HasConditions method to the IgnoreRule object to check if the rule is empty.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Control VEX filtering through IgnoreRules

This commit modifies how the vex processor is controlled. The processor now
takes a list of IgnoreRules which can act on the VEX status in addition to
the regular rule parameters.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* vex: Allow rules to match on VEX justification

This commit expands the ingore rules to also work on vex the
justification of not_affected statements.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Use go-vex merge implementation

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Add OpenVEX matcher to matcher list

This commit adds a new entry to the matchers: An openvex matcher

This matcher is used when openvex augments results, moving matches
from the ignore list to the active results.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Add vex.AugmentMatches() to the vex processor

This commit adds a new AugmentMatches() phase to the VEX processor.

This new step goes throught the configured ignore rules and acts on any
that have `affected` or `under_investigtion` as status.

The purpose of this rule is to move matches back from the ignored matches
list to the active results when a statement with either of those statuses
apply to ignored matches.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Parse context identifiers using GGC

This commit modifies the identifier synthesizer function to parse references
using GGCR. It also adds a simple test.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Bump funlen linter to 73

This commit bumps the maximum function length to 73 to accomodate
the new flag in AddFlags()

Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>

* Add VEX testing to matchers test

This commit adds a new test and fixtures to test the VEX matchers
along the rest of the matchers in TestMatchByImage(). As the VEX
matchers operate on previously ignored matches a new loop was added
to the test to accomodate the different testing model.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* add vex status and justification to ignored rule json model

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

* nit rename + add TODO question about augmenting ignored matches

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

* nit document comment updates + common variable extraction

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

* migrate legacy matcher function to vulnerability matcher object

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

* update tui to respond to ignored and dropped matches

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

* migrate vex processing to vulnerability match object

Based on Alex's previous caommit

Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* Migrate VEX options and app config from legacy CLI

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

* update table snapshot tests with suppressed vex entries

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

* add tests for match.Matches.Diff()

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

* add tests for vex processor

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

* fix linting and restore global funlen rule

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

* remove grpc pin

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

* always return remaining and ignroed matches from matcher object

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

* Add VEX documentation to main README

This commit adds a VEX section to the main Grype README. It adds
an example document and details on how vex rules can be written.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>

---------

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-09-13 15:26:12 -04:00
William Murphy
7ff37a0310
feat: filter out packages owned by OS packages (#1387)
For example, if the rpm "python3-rpm" is installed, it brings a python
package called "rpm" with it, which is just python bindings to RPM. But
this python package is part of "python3-rpm", and should not be matched
against directly. Only apply this deduplication strategy on distros with 
a comprehensive enough vulnerability feed that we don't expect false 
negatives from it.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-08-18 15:43:42 -04:00
anchore-actions-token-generator[bot]
51223cd0b1
chore(deps): update Syft to v0.87.1 (#1432) 2023-08-17 15:39:41 -04:00
anchore-actions-token-generator[bot]
c97048baa1
chore(deps): update Syft to v0.86.1 (#1410)
* chore(deps): update Syft to v0.86.0

Signed-off-by: GitHub <noreply@github.com>

* fix python package metadata shape

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

* account for new metadatas added in syft

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

* bump syft to unreleased but fixed version

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

---------

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: wagoodman <wagoodman@users.noreply.github.com>
2023-07-31 17:58:36 +00:00
William Murphy
e347e03f4d
Refactor integ test to table test (#1390)
To make it easier to see which tests fail if there's a failure.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
2023-07-18 11:27:46 -04:00
Olivier Boudet
9050883715
feat(outputs): allow to set multiple outputs (#648) (#1346)
* feat(outputs): allow to set multiple outputs (#648)

Signed-off-by: Olivier Boudet <o.boudet@gmail.com>
Signed-off-by: Olivier Boudet <olivier.boudet@cooperl.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* feat(outputs): allow to set multiple outputs (#648)

review

Signed-off-by: Olivier Boudet <olivier.boudet@cooperl.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* use syft format writter pattern and de-emphasize presenter package

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

---------

Signed-off-by: Olivier Boudet <o.boudet@gmail.com>
Signed-off-by: Olivier Boudet <olivier.boudet@cooperl.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-07-11 17:37:17 +00:00
Alex Goodman
64e9c9c0d3
Port to new syft source API (#1376)
* port to new syft source API

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

* fix linting

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2023-07-06 09:01:49 -04:00
Weston Steimel
844711285b
feat: add package info to search by for all match details (#1339)
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2023-06-06 19:32:50 +01:00
Alex Goodman
852a208417
bump syft to pre-release of v0.81.0 (#1310)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2023-05-22 14:17:34 +00:00
anchore-actions-token-generator[bot]
f9df952a2d
chore(deps): update Syft to v0.80.0 (#1276) 2023-05-07 13:57:12 -04:00
William Murphy
f0a09c0b9a
Install skopeo during bootstrap (#1260)
The "make integration" target assumes that skopeo will be available on
PATH, but this wasn't documented. Install it during bootstrap when other
utilities are installed. (See ./test/integration/utils_test.go:50).
Include a sample skopeo policy.json, otherwise skopeo will look for a
missing policy doc a /etc/containers/policy.json and exit with an error.
The sample policy document matches the one included by default with
"brew install skopeo".

Signed-off-by: Will Murphy <will.murphy@anchore.com>
Co-authored-by: Will Murphy <will.murphy@anchore.com>
2023-04-28 10:10:29 -04:00
anchore-actions-token-generator[bot]
b9fa68e3a9
chore(deps): update Syft to v0.78.0 (#1242)
* chore(deps): update Syft to v0.78.0

Signed-off-by: GitHub <noreply@github.com>

* fix test location references and package types

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

---------

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Co-authored-by: kzantow <kzantow@users.noreply.github.com>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
2023-04-19 17:38:06 +00:00
dependabot[bot]
147f5cf92f
chore(deps): bump github.com/anchore/syft from 0.75.0 to 0.76.0 (#1207)
* chore(deps): bump github.com/anchore/syft from 0.75.0 to 0.76.0

Bumps [github.com/anchore/syft](https://github.com/anchore/syft) from 0.75.0 to 0.76.0.
- [Release notes](https://github.com/anchore/syft/releases)
- [Changelog](https://github.com/anchore/syft/blob/main/.goreleaser.yaml)
- [Commits](https://github.com/anchore/syft/compare/v0.75.0...v0.76.0)

---
updated-dependencies:
- dependency-name: github.com/anchore/syft
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update ParseInput signature with new syft version

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>

* fix: update integration tests

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
2023-04-03 10:48:33 -04:00
Christopher Angelo Phillips
5754360376
Grype Release Pipeline Update (#1147)
- Remove old apple signing flow in favor of [quill](https://github.com/anchore/quill)
- Update changelog generation to be in sync with syft's flow
- Remove old goreleaser docker workflow in favor of single file
- Remove individual bootstrap options in favor of single bootstrap action
- Update release and validation workflows to use trigger based approach seen in syft
- Update golangci.yaml to be equivalent to syft patterns
- Remove unused Dockerfile.dev
- Remove docker-compose development cycle
- Add organized test-fixture Makefile targets

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
2023-03-03 21:17:44 +00:00
Maxim Zhiburt
b88e961159
Add the total types of vulnerabilities in Grype output (#946)
* Add the total types of vulnerabilities in Grype output

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Albert Simon <simon.albert75@gmail.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2023-03-03 20:38:29 +00:00
anchore-actions-token-generator[bot]
88de2ae82b
chore: update Syft to v0.66.2 (#1060) 2023-01-18 12:50:46 -05:00
Keith Zantow
04a84a4440
fix: orient by cve merging (#1046) 2023-01-04 13:41:10 -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
788ca5cf75
chore: update digest for test fixture dockerfile (#1015)
* chore: update digest for test fixture dockerfile

The previous digest was specifically for i386.  The updated digest should use the manifest to determine the correct platform to use based on the client.

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

* chore: add digesst on archlinux test fixture image

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
2022-11-25 15:42:43 +00:00
Christopher Angelo Phillips
3e0af43383
chore: pin dependencies (#994) 2022-11-14 21:23:42 +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
Keith Zantow
ba73ab362a
Add support for scanning RPM files (#917) 2022-09-09 14:56:37 -04:00
Chapman Pendery
d5b825e40b
feat: extract use cpes in matching logic to be configurable (#911) 2022-09-06 09:55:35 -04:00
Christopher Angelo Phillips
991d16879a
update grype to use syft v0.52.0 (#838) 2022-07-22 16:12:18 +00:00
Zac Medico
30943e032b
add Gentoo matching support (#813)
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
2022-07-19 09:37:21 -04:00
Christopher Angelo Phillips
addbd07b4f
Add new matcher files for golang => remove main module FP matches (#829) 2022-07-18 13:14:03 -04:00
artsv79
2233736e98
add DBCloser. Clients can aviod db connection leak if vulnerability db is loaded many times (#825) 2022-07-12 09:54:42 -04:00
Christopher Angelo Phillips
cb6bddfeeb
bump syft version to v0.51.0 (#822) 2022-07-11 15:15:12 -04:00
cpendery
e2fff6c22f
feat: implement grype db diff command (#812)
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
Co-authored-by: Weston Steimel <weston.steimel@anchore.com>
Co-authored-by: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com>
2022-07-11 09:46:59 -04:00
Christopher Angelo Phillips
0e0a9d9e7a
update syft to v0.50.0 (#818) 2022-07-06 14:48:21 +00:00
Weston Steimel
44032c514c
Finalize v4 Grype schema (#803)
* initial v4 schema setup

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

* update v3 => v4 for unit tests

-- did NOT update
    - grype/db/v3/*

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>

* use nullable string in sqlite so null values get represented correctly

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

* add missing unit test case for dotnet

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

* Add db writer function for calling sqlite vacuum

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

* adding normalization of package names at database adapter layer

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

* refactor namespaces for v4

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

* update v4 stuff to use sqlite fork

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

* Namespace should satisfy Stringer interface

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

* normalize CPEs before comparison

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

* vulnerability exclusion => vulnerability match exclusion

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

* updates to vulnerability match exclusion models

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

* add initial vulnerability match exclusion store unit tests

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

* make vuln match exclusion constraints nullable

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

* move vuln match namespace into constraints object and refactor

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

* check db match constraints to ensure there aren't any unknown fields and add json hints

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

* ensure we only keep compatible match exclusion constraints

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

* use omitempty on all match exclusion structs

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

* remove db v4 schema resolver and namespace types

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

* rename Vacuum to Close

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

* lint fixes + remove panic on vuln provider creation

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

* WIP match exclusions

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

* build list of ignore rules from v4 db records

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

* quick attempt at a new uber object

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

* just pass around the full object for now to quickly get to a usable state

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

* fix panic when no vuln db loaded

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

* use interfaces for db.store function signatures

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

* Flatten the match exclusion constraint model to simplify logic

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

* updating some tests

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

* fix panic when no db update possible

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

* more tests

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

* WIP fixing match exclusion constraint usability and json mapping logic

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

* add v4 db diff logic (excluding vulnerability_match_exclusion data for now)

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

* lint fix

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

* update integration tests

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

* nvd -> nvd:cpe namespace updates

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

* ensure test store uses v4 normalized names

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

* set the grype db update url to staging for v4

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

* prevent more segfaults on database open

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

* add continue when unable to load ignore rules

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

* remove db.Status from the Store object

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

* fix compare_sbom_input_vs_lib_test.go

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

* remove staging endpoint now that v4 is published

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

Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
2022-07-05 19:03:16 +01:00
cpendery
90df6815e6
feat: add diffing 2 databases to v3 store functionality (#789) 2022-06-28 14:22:37 -04:00
Christopher Angelo Phillips
0703bae977
update grype to latest syft patch v0.48.1 (#790) 2022-06-17 15:45:33 +00:00