Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wagoodman
Copy link
Contributor

Should prevent panics on malformed input to scope:

grype -vv -o json --fail-on medium dir://tests/python
[0000] DEBUG Application config:
configpath: ""
presenteropt: 1
output: json
scopeopt: 1
scope: Squashed
quiet: false
log:
  structured: false
  levelopt: debug
  level: ""
  filelocation: ""
clioptions:
  configpath: ""
  verbosity: 2
db:
  dir: /Users/alfredo/Library/Caches/grype/db
  updateurl: https://toolbox-data.anchore.io/grype/databases/listing.json
  autoupdate: true
dev:
  profilecpu: false
checkforappupdate: true
failon: medium
failonseverity: 3
[0000] DEBUG No new grype update available
[0000]  INFO cataloging image from-lib=syft
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1a1b756]
goroutine 16 [running]:
github.com/anchore/syft/syft.Catalog(0x7ffeefbff8e3, 0x12, 0x1, 0x0, 0x0, 0x0, 0x20a8ac0, 0xc00029d0a0)
	/Users/alfredo/go/pkg/mod/github.com/anchore/[email protected]/syft/lib.go:37 +0x3d6
github.com/anchore/grype/cmd.startWorker.func1.2(0xc000225ee0, 0x7ffeefbff8e3, 0x12, 0xc0001402a0, 0xc0001402a8, 0xc0001402b0, 0xc0001e93d0, 0xc00010ab40)
	/Users/alfredo/python/grype/cmd/root.go:183 +0x82
created by github.com/anchore/grype/cmd.startWorker.func1
	/Users/alfredo/python/grype/cmd/root.go:181 +0x227`

@wagoodman wagoodman added the bug Something isn't working label Sep 25, 2020
@wagoodman wagoodman self-assigned this Sep 25, 2020
Copy link
Contributor

@luhring luhring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:khannnnnn:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants