97 Commits

Author SHA1 Message Date
Alex Goodman
133d180eec
update gemspec glob to include named spec dirs
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-01-04 19:33:52 -05:00
Alex Goodman
7f4e8ab97d
Fix symlink resolutions for constituent paths (#304)
* bump stereoscope to pull in content API refactors

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

* incorporate symlink fixes

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

* with filetree.File() adjustments

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

* regress all-layers scope to not include dead-links + default tests to squashed scope

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

* restore all layers resolver glob behavior (custom + lazy link resolution)

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

* incorporate filetree link resolution options and restore no-follow dead link option for resolvers

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

* removed path from lower-level FileTree.File() calls

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

* bump stereoscope to pull in latest link resolution fixes

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

* bump doublestar to v2 for directory resolver

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-01-04 16:41:45 -05:00
Alex Goodman
d475e6280a
bump stereoscope to pull in content API refactors
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-01-04 14:07:14 -05:00
Dan Luhring
52e719dcb8
Create MockResolver and use to improve python cataloger tests
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-23 11:24:49 -05:00
Dan Luhring
13c289eb7e
Add tests for determining site packages root
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-23 08:22:31 -05:00
Dan Luhring
c1fa701602
Apply lint fix
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-22 17:46:33 -05:00
Dan Luhring
183b8f79d0
Handle site packages based on which egg file is parsed
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-22 17:41:27 -05:00
Alfredo Deza
d0d7e849c9 catalogers: Python runtime is not a Python package itself, ignore it
Signed-off-by: Alfredo Deza <adeza@anchore.com>
2020-12-22 10:59:43 -05:00
Zach Hill
7962002f81
Split dpk source into name and version (#297)
* Split dpk source into name and version

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

* update dpkg status source name parsing

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

Co-authored-by: Dan Luhring <luhring@users.noreply.github.com>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-18 14:08:19 -05:00
Alex Goodman
ea162f87f4
update dpkg license to include single-word entries (#298)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Co-authored-by: Dan Luhring <luhring@users.noreply.github.com>
2020-12-18 12:54:09 -05:00
Zach Hill
9adb57bcb5
Adds globs for .egg-info file for python detection as well as tests (#296)
* Adds globs for .egg-info file for python detection as well as tests

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

* Fix lint error

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

Co-authored-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-18 12:36:25 -05:00
Alex Goodman
45fed7c69b
break out packageEntry into a separate file
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-15 10:59:14 -05:00
Alex Goodman
e4a3e433b6
add content requested and refactor python cataloger to use it
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-15 10:59:14 -05:00
Alex Goodman
82c8a8e17b
add mem profile option and refactor python cataloger for batch requests
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-15 10:59:14 -05:00
Dan Luhring
737a81c38c
Sort generated CPEs by specificity (#289)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-11 12:08:39 -05:00
Alex Goodman
52bac6e2fd
Add enterprise upload capability (#285)
* add support to upload results to enterprise

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

* add package sbom upload

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

* add dockerfile support

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

* add manifest, index, and dockerfile import functions

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

* schema version to json output + enhance json schema generation

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

* modify package SBOM shape to be entire syft document + add etui updates

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

* add import image config and manifest support

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

* add config options for import to enterprise

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

* incorporate final stereoscope and client-go deps

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-09 22:20:53 -05:00
Alex Goodman
6f9ded60ed
Merge pull request #279 from anchore/enhance-java-cpe-by-group-id
Include CPEs with elements from POM GroupId fields
2020-12-02 07:50:31 -05:00
Dan Luhring
65cbacd135
Clarify python wheel parsing process (#281)
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-12-01 16:30:30 -05:00
Alex Goodman
2989d3d975
include CPEs with elementds from POM GroupId fields
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-12-01 08:00:49 -05:00
Alex Goodman
8a17bfb69f
generate json schema from struct definitions
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-20 15:47:10 -05:00
Alex Goodman
3aaa0e5566
move package purl and cpes (identities) to pkg.Package
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-19 11:25:51 -05:00
Alex Goodman
569a598df7
minimize pointer usage & order return types consistently
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-17 12:37:13 -05:00
Alex Goodman
c892c3609e
improve doc comments
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-17 12:37:13 -05:00
Alex Goodman
6f7a4fd3e4
move source metadata upstream and fix tests
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-17 12:37:12 -05:00
Alex Goodman
aa0d444fd4
fix tests to use location instead of file.Reference
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-17 12:37:12 -05:00
Alex Goodman
9668341a14
rename scope to source
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-17 12:37:11 -05:00
Dan Luhring
3e8bca6911
Rework Java archive name and version detection and clean up tests
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-17 08:35:10 -05:00
Dan Luhring
5afdd574a8
Update existing archive test cases to correct names and versions
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-17 08:35:10 -05:00
Dan Luhring
0ebe791acd
Add archive filename test case for failing example from #255
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-17 08:35:10 -05:00
Dan Luhring
6bde075cd3
Remove unused argument value
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:20:06 -05:00
Dan Luhring
f7be73dbcc
Fix package.json parsing for no licenses
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:12:13 -05:00
Dan Luhring
fc99538d78
Fix package.json parsing for multiple licenses objects
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:12:13 -05:00
Dan Luhring
4d4e242251
Fix package.json parsing for license object
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:12:12 -05:00
Dan Luhring
416afa015e
Add test for package.json with no licenses
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:11:46 -05:00
Dan Luhring
bd4c784a64
Add test for package.json multiple license objects
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 11:01:59 -05:00
Dan Luhring
624a090631
Add test for package.json license object
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-11-14 09:50:17 -05:00
Alex Goodman
7964c27bd8
add source to packages found by rpmdb cataloger
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-12 09:27:08 -05:00
Alex Goodman
2c82c7c0f0
Merge pull request #257 from anchore/enhance-deb-support
Enhance dpkg support
2020-11-11 13:12:29 -05:00
Alex Goodman
2a329002b8
enhance dpkg support by parsing md5sum and copyright file sources
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-11 11:06:34 -05:00
Alex Goodman
a6365886ad
add warning log level
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-10 15:09:41 -05:00
Alex Goodman
6aba2f48d4
split out rpmdb file processing to helper + lint fixes
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-06 10:44:27 -05:00
Alex Goodman
8095cd9980
add rpmdb file info to cataloger
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-06 07:21:23 -05:00
Alex Goodman
a52750bdd3
enhance alpine file discovery (#248)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-11-04 09:56:52 -05:00
Alex Goodman
232cd13035
update tests for enhanced java pkg pairings
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-10-30 10:44:45 -04:00
Alex Goodman
03dbfb8dfb
improve java name and version extraction as well as parent pkg pairing
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-10-30 08:12:25 -04:00
Alex Goodman
a5cba13ddf
enable more flexible java manifest structure (closer to the spec)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-10-29 16:26:04 -04:00
Alex Goodman
ab45be98b8
append java nested package names to the virtual path
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-10-29 13:52:34 -04:00
Alex Goodman
452426d1d6
Merge pull request #245 from anchore/update-java-cataloger-for-engine
Java cataloger miscellaneous fixes
2020-10-28 17:36:44 -04:00
Alex Goodman
2675891110
remove parent java package from json && add java manifest section parsing
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2020-10-28 17:19:06 -04:00
Dan Luhring
bffc4713a7
Update zip archive handling to match globs as expected (#244)
* Refactor zip file tests

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Add glob support for leading slashes

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Update zip testing to account for glob matching

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Ignore .DS_STORE

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Improve normalization of zip entry names

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Rename zip test helpers file

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
2020-10-28 16:50:40 -04:00