-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support scanning license files in golang packages over the network #1630
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deitch
force-pushed
the
golang-licenses
branch
4 times, most recently
from
March 2, 2023 20:52
a601f15
to
da16e28
Compare
I do not understand why the CLI tests fail. 🤷♂️ |
deitch
force-pushed
the
golang-licenses
branch
3 times, most recently
from
March 10, 2023 07:52
2a56d83
to
7df5d43
Compare
deitch
changed the title
support for scanning license files in golang packages
support for scanning license files in golang packages on the Internet
Mar 23, 2023
I rebased this on main after #1645 merged in. This needs the option added to enable finding modules on the Internet, but should be useful as a basis. |
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Actually, I mostly managed to get it in place. Still needs some help. |
Signed-off-by: Keith Zantow <kzantow@gmail.com>
kzantow
changed the title
support for scanning license files in golang packages on the Internet
Support scanning license files in golang packages over the network
Mar 23, 2023
kzantow
reviewed
Mar 23, 2023
wagoodman
reviewed
Mar 24, 2023
Signed-off-by: Keith Zantow <kzantow@gmail.com> Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
…od module caching Signed-off-by: Keith Zantow <kzantow@gmail.com>
wagoodman
reviewed
Apr 13, 2023
wagoodman
reviewed
Apr 13, 2023
wagoodman
reviewed
Apr 13, 2023
wagoodman
reviewed
Apr 13, 2023
wagoodman
reviewed
Apr 13, 2023
Signed-off-by: Avi Deitcher <avi@deitcher.net>
wagoodman
reviewed
Apr 13, 2023
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
wagoodman
approved these changes
Apr 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
🥳 |
spiffcs
added a commit
that referenced
this pull request
Apr 17, 2023
* main: (35 commits) Fix kernel cataloger test fixtures (#1742) feat: Support scanning license files in golang packages over the network (#1630) Add package-to-file location evidence relationships (#1698) Add Linux Kernel cataloger (#1694) Add annotations for evidence on package locations (#1723) add format make target (#1733) Update tests to not fail on Mac M1's. (#1730) chore(deps): update bootstrap tools to latest versions (#1728) Add support for nar files. (#1727) add highlevel details about catalogers (#1726) chore(deps): bump golang.org/x/net from 0.8.0 to 0.9.0 (#1722) chore(deps): update stereoscope to e95d60a265e384df29b7a139f5c5402d6ad72e06 (#1721) feat: gradle lockfile support (#1719) chore(deps): bump github.com/docker/docker (#1715) chore(deps): bump golang.org/x/mod from 0.9.0 to 0.10.0 (#1713) chore(deps): bump golang.org/x/term from 0.6.0 to 0.7.0 (#1714) chore(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#1716) chore(deps): bump peter-evans/create-pull-request from 4 to 5 (#1712) chore: update tools-golang to v0.5.0 (#1717) Add Nix cataloger (#1696) ... Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This was referenced Apr 18, 2023
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
…ork (anchore#1630) Signed-off-by: Avi Deitcher <avi@deitcher.net> Signed-off-by: Keith Zantow <kzantow@gmail.com> Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Co-authored-by: Keith Zantow <kzantow@gmail.com> Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1056
As discussed with @kzantow
This checks in
$GOPATH/pkg/
for a package@version, and, if it finds it, reads the licenses from there. If not found, it falls back to reading the package from the internet via the official go proxy https://proxy.golang.orgIn addition, it has two new CLI flags:
go-fetch bool
and--go-proxy string
. Thefetch
is supposed to enable fetching over the Internet, default tofalse
; theproxy
is supposed to override the default.The CLI flags are not wired up, as I could not quite figure out how to pass them all the way through to the go cataloger. I managed to get them onto the
app *config.Application
, but there is a bunch of steps down. Some pointers would be helpful.