Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

228 - support for go list -deps #238

Closed
wants to merge 3 commits into from

Conversation

SirMaster
Copy link

@SirMaster SirMaster commented May 28, 2021

This is an initial look into allowing go list -deps to be supported, go list -deps -json gives us the specific dependencies that will be used at runtime for a binary of go. By allowing a user to use go list -deps -json ./... | nancy sleuth we give control to them by allowing them to choose what to check for vulenerabilities.

This pull request makes the following changes:

  • Additional support to slurp in the result stream of go list -deps -json

It relates to the following issue #s:

cc @bhamail / @DarthHater

Note created a draft PR first to confirm code changes first, if all is good will do documentation changes as well in a full PR.

@DarthHater
Copy link
Member

@dnwe , the infallible @SirMaster has cranked this out, if you wouldn't mind taking a gander.

@dnwe
Copy link

dnwe commented Jun 17, 2021

@SirMaster I gave this a quick test on Go 1.16, but it looks like it's not currently extracting the module deps from the the input json. Building from your branch and giving it the -deps -json output nancy reports that it didn't scan any modules

$ go list -deps -json ./... | ./nancy sleuth
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Summary                     ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━┫
┃ Audited Dependencies    ┃ 0 ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━┫
┃ Vulnerable Dependencies ┃ 0 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━┛

@DarthHater
Copy link
Member

Closing in favor of #247

@DarthHater DarthHater closed this Sep 16, 2021
@DarthHater DarthHater deleted the sonatype-nancy-228-support-go-list-deps branch September 16, 2021 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggested go list -m json all vulnerability checks swathes of dependencies that never end up in a binary
3 participants