Commit graph

528 commits

Author SHA1 Message Date
Christopher Angelo Phillips
43c2d91f34
update log file permissions (#422)
Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
2021-09-21 12:14:38 -04:00
Christopher Angelo Phillips
fe00b3c314
Enhance version cmd with SYFT_VERSION (#420)
* update command to take in SYFT_VERSION

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

* add dynamic input to build command for ci

Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
2021-09-16 16:08:07 -04:00
Vijay Pillai
7c082c2162
Add more unit tests for new trimQuotes function (#416)
* add more unit tests for trimQuotes function

Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
2021-09-14 17:27:15 -04:00
Dan Palmer
83c6ee23a9
Update grype-db dependency, add some SLES tests (#413)
* Update grype-db dependency, add some SLES tests

Signed-off-by: Dan Palmer <dan.palmer@anchore.com>
2021-09-14 15:08:32 -04:00
Vijay Pillai
c272d8019e
Fix vulndb fuzzy constraint matching (#415)
Grype DB Builder was changed to use single quotes instead of double quotes for version constraints. This change broke constraint matching for vulndb records. This change fixes that by adding support for single quotes to the parseUnit function in grype/version/constraint_unit.go.

* Update constraint unit parser to remove single quotes as well as double quotes from a constraint unit. This will allow vulndb constratints to match again.
* Add unit test for quoted fuzzy constraints.

Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
2021-09-13 17:55:01 -04:00
Christopher Angelo Phillips
f3e3e832a8
bump syft to the newest 0.23.0 version - tidy mod (#414)
* bump syft to the newest 0.23.0 version - tidy mod
Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>

* update integration test to use new pointer
syft source.New() was changed to return a pointer
rather than value for 0.23.0 this commit updates our 
integration tests to reflect that change
Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
2021-09-13 16:46:41 -04:00
Zane Burstein
434a774106
Match against Alpine source packages (#407)
* Update go-version package and add test

This is being updated due to an issue that was encountered in the lessThanEqual constraint in go-version: https://github.com/anchore/go-version/pull/2. Was disovered while adding tests for apk origin package matching

Signed-off-by: Zane Burstein <zane.burstein@anchore.com>

* Added matching with source package for apk

This change allows grype to match with a packages source package for apk. Adds APKMetadata with OriginPackage, new matching logic in apk matchers, and tests

Signed-off-by: Zane Burstein <zane.burstein@anchore.com>
2021-09-09 07:42:11 -04:00
Zane Burstein
77b1da95fa
Merge pull request #411 from anchore/fix-goreleaser-install
Added goreleaser-install.sh and execution in make bootstrap target
2021-09-07 14:41:44 -07:00
Zane Burstein
d169d5292a Added goreleaser-install.sh and execution in make bootstrap target
Previous install of goreleaser v 0.160.0 was being done with curl command to https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh, but there have been changes to that script that broke bootstrap. Copied the shell script to repo and changed the checksum file name to goreleaser_checksums.txt

Signed-off-by: Zane Burstein <zane.burstein@anchore.com>
2021-09-07 14:20:13 -07:00
Alex Goodman
0ca54448d4
Revert "Add announcement for upcoming OSS meetup (#402)" (#405)
This reverts commit c6529822fa.

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-09-02 10:59:21 -04:00
Alex Goodman
423a7c6d2f
add integration test for MSRC matching (#403)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-09-02 09:30:22 -04:00
Samuel Dacanay
e6d16b7fdb Ensure that virtual path is reported for java archives. Improve logging, add a String() method too. And a test case for parsing
Signed-off-by: Samuel Dacanay <sam.dacanay@anchore.com>
2021-09-01 15:18:47 +01:00
Dan Luhring
c6529822fa
Add announcement for upcoming OSS meetup (#402)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-08-25 14:35:57 -04:00
Alex Goodman
5e564f3c67
Include full ELVersion in RPM source-indirection matching (#397)
* include source RPM release in version used for matching

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

* include package name and version searched by in search details

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-08-24 14:39:55 -04:00
Christopher Angelo Phillips
6252d970ed
(#374) - RPM Matcher - Package Name from Source Update (#382)
* update test to be table for future regression

Refactor test to assert on public contract of Match
Add base case as first table

TODO:
- Ask about buisness case of Public vs private method
- Add back second case regarding ignore source
- Add cases testing new regexp against variant package types

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

* add question for tests - base case passing

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

* update test to cover removed cases

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

* update with capture group names

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

* add failing test case for #376

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

* add version parse for indirect match

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

* remove debug and comments

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

* update regex based on PR feedback

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

* update matcher to use named capture groups

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

* add regression comment to test

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

* update to add back old case

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

* remove warning since we no longer will get multi

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

* remove wantErr

Signed-off-by: Christopher Phillips <cphillips918@gmail.com>
2021-08-23 18:50:47 -04:00
Keith Zantow
4e8794d610
Upgrade syft to 0.21.0 #385 (#396)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2021-08-23 15:15:42 -04:00
Alex Goodman
bef03f70b3
Bump untar file size threshold (#392)
* bump untar file size threshold

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

* adjust variable names and comments around copyWithLimits for tar processing

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-08-23 09:16:35 -04:00
Keith Zantow
096bc6e970
docs: wrong environment variable: SYFT_ (#387)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2021-08-18 16:41:10 -04:00
Alex Goodman
01a77d5c45
bump syft to v0.20.0 (#384)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-08-18 11:20:25 -04:00
Keith Zantow
7b044b1154
Add option to enable http registry connections #334 (#380)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2021-08-17 12:52:08 -04:00
Alex Goodman
fbc6bdfd8d
Update MSRC matching to include product ID in the suffix (#373)
* use squashed grype-db branch

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

* add more tests around the msrc matcher

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

* incorporate the grype-db updates for msrc

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-08-12 08:35:30 -04:00
Alex Goodman
729aec24a6
incorporate CPE generator enhancements from syft (#375)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-08-10 09:06:40 -04:00
Alex Goodman
4ba9ffe476
Merge pull request #371 from anchore/squash
Bump grype-db version to remove branch strategy
2021-07-22 09:40:20 -04:00
Alex Goodman
b9a4eaaed5
narrow schema validation exception handling
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-07-20 13:32:06 -04:00
Alex Goodman
c7f33a8e4f
bump grype-db version to use main branch
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-07-20 12:18:29 -04:00
Alex Goodman
283bd3be5f
Merge pull request #365 from xtreme-conor-nosal/cyclonedx-severity
Always include severity in cyclonedx ratings
2021-07-14 08:57:33 -04:00
Conor Nosal
a9238af741 Remove severity from CVSS ratings
omit empty scores
Fixes #366

Signed-off-by: Conor Nosal <cnosal@vmware.com>
2021-07-12 17:17:58 -07:00
Alex Goodman
beedcc0015
add test to ensure cyclonedx ratings include severity regardless of CVSS info
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-07-12 16:26:25 -04:00
Conor Nosal
f62012e2a5 Always include severity in cyclonedx ratings
Some feeds don't include CVSS but still report severity of a CVE

Fix #364

Signed-off-by: Conor Nosal <cnosal@vmware.com>
2021-07-12 09:17:16 -07:00
Alex Goodman
2ea0a3f495
Merge pull request #363 from anchore/update-slack
Update slack channels
2021-07-12 08:23:32 -04:00
Alex Goodman
2faefdf902
update slack channels
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-07-12 08:06:47 -04:00
Alex Goodman
05ade7bbbf
Revert "Add callout for OSS meetup (#346)" (#361)
This reverts commit 3f4efcaf9a.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2021-07-02 14:32:24 +00:00
Dan Luhring
a24db99682
Merge pull request #359 from anchore/catch-unclean-go-sum
Catch unclean go.sum files in pipeline
2021-07-01 16:38:45 -04:00
Dan Luhring
6647373e4d
Run go mod tidy
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 14:45:01 -04:00
Dan Luhring
ab85f428fa
Remove git checkout from tidy check
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 14:45:01 -04:00
Dan Luhring
81f68a1562
Modify tidy check to compare against git HEAD
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 14:45:01 -04:00
Dan Luhring
6f0b1995d0
Stop tidying go modules during bootstrap
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 14:45:01 -04:00
Dan Luhring
d981fbd185
Merge pull request #357 from anchore/fix-apk-nil-pointer-deref
Fix panic from distro nil pointer dereference
2021-07-01 14:44:16 -04:00
Dan Luhring
f4858fee44
Add test for nil distro
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 11:50:01 -04:00
Dan Luhring
85d1717734
Accept pointer for distro in GetByDistro
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-07-01 11:29:44 -04:00
Dan Luhring
787dfd8f02
Update syft to v0.19.0 (#352)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-06-30 11:09:44 -04:00
Dan Luhring
1714806a4c
Update syft to v0.18.0 (#351)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-06-29 21:34:26 +00:00
Dan Luhring
c5fc5f1c48
Show no value in table output for unknown fixes (#350)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-06-28 22:33:16 -04:00
Robin Li
b61e07f8c2
Modify Document struct Components tag to use lower case 'component'. (#344)
Because Grype scanner produces CycloneDX output with lower case component tags instead of upper case.

Signed-off-by: Robin Li <lrobin@vmware.com>

Co-authored-by: Robin Li <lrobin@vmware.com>
2021-06-25 10:05:59 -04:00
Dan Luhring
3f4efcaf9a
Add callout for OSS meetup (#346)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2021-06-24 11:44:29 -04:00
Alex Goodman
757f16023a
Merge pull request #337 from anchore/fix-inline-compare
Update inline comparison script to ignore RPM epoch
2021-06-16 12:38:51 -04:00
Alex Goodman
2d17d8fc41
update inline comparison script to ignore epoch
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-06-16 10:04:11 -04:00
Josh Soref
14b28ff79b
Spelling (#336)
Correct spelling errors
2021-06-16 13:55:29 +00:00
Alex Goodman
ceee408dfa
Merge pull request #331 from anchore/epoch-fix
Fix RPM epoch comparison logic
2021-06-16 09:30:55 -04:00
Alex Goodman
27c3437e26
ensure RPM epoch is optional
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-06-16 09:23:46 -04:00