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

[bug] deps.dev fails when package not found #2415

Closed
pxp928 opened this issue Jan 2, 2025 · 0 comments · Fixed by #2416
Closed

[bug] deps.dev fails when package not found #2415

pxp928 opened this issue Jan 2, 2025 · 0 comments · Fixed by #2416
Labels
bug Something isn't working

Comments

@pxp928
Copy link
Collaborator

pxp928 commented Jan 2, 2025

Describe the bug
deps.dev issue on latest release:

guac-depsdev-collector-1  | 2025-01-02T20:10:57.152Z    DEBUG   parser/parser.go:90     parsing document tree with root type: DEPS_DEV  {"guac-version": "v0.12.3", "documentHash": "sha256_74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b"}
guac-depsdev-collector-1  | panic: runtime error: invalid memory address or nil pointer dereference
guac-depsdev-collector-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x7f49a3]
guac-depsdev-collector-1  |
guac-depsdev-collector-1  | goroutine 16 [running]:
guac-depsdev-collector-1  |
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/assembler/helpers.PkgInputSpecToPurl(0x0)
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/assembler/helpers/purl.go:104 +0x83
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/ingestor/parser/deps_dev.(*depsDevParser).GetPredicates(0xc001181230, {0x33d1d3e?, 0x4?})
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/ingestor/parser/deps_dev/deps_dev.go:85 +0x1ff
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/ingestor/parser/common.(*GraphBuilder).CreateAssemblerInput(0x28?, {0x39dead0?, 0xc000a3d4a0?}, {0x57c3b60, 0x0, 0x0}, {{0x33df5dd, 0x8}, {0x33df5dd, 0x8}, ...})
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/ingestor/parser/common/graph_builder.go:41 +0x47
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/ingestor/parser.ParseDocumentTree({0x39dead0, 0xc000a3d4a0}, 0xc0088ae680, 0x0, 0x0
guac-depsdev-collector-1  | , 0x0, 0x0)
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/ingestor/parser/parser.go:97 +0x328
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/ingestor.Ingest.GetIngestor.func2(...)
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/ingestor/ingestor.go:173
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/ingestor.Ingest({0x39dead0, 0xc000a3d4a0}, 0xc0087b4f00, {0x7ffd0d1b7f54, 0x19}, {0x39a0960, 0x57553c0}, {0x39d9250?,
guac-depsdev-collector-1  | 0xc0014001e0?}, 0x0, ...)
guac-depsdev-collector-1  |
guac-depsdev-collector-1  | /home/runner/work/guac/guac/pkg/ingestor/ingestor.go:64
guac-depsdev-collector-1  |  +0x35f
guac-depsdev-collector-1  | github.com/guacsec/guac/cmd/guacone/cmd.init.func6.1(0x0?)
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/cmd/guacone/cmd/deps_dev.go:91 +0x7b
guac-depsdev-collector-1  | github.com/guacsec/guac/pkg/handler/collector.Collect({0x39dead0, 0xc000a3d4a0}, 0xc000a3d450, 0xc000bc6ff0)
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/pkg/handler/collector/collector.go:108 +0x3ae
guac-depsdev-collector-1  | github.com/guacsec/guac/cmd/guacone/cmd.init.func6.3()
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/cmd/guacone/cmd/deps_dev.go:128 +0x6c
guac-depsdev-collector-1  | created by github.com/guacsec/guac/cmd/guacone/cmd.init.func6 in goroutine 1
guac-depsdev-collector-1  |     /home/runner/work/guac/guac/cmd/guacone/cmd/deps_dev.go:126 +0x5a6
guac-guac-rest-1          | 2025-01-02T20:10:57.845Z    INFO    server/server.go:61     Request handled successfully   {"guac-version": "v0.12.3", "method": "GET", "path": "/healthz", "latency": "45.265µs"}
guac-depsdev-collector-1 exited with code 0

To Reproduce
Run docker-compose on latest released version (v0.12.3)

docker compose -f guac-demo-compose.yaml -p guac up --force-recreate

Ingest via:

go run ./cmd/guacone collect files ../guac-data/docs/spdx/spdx_vuln.json

Expected behavior
deps.dev should not error

GUAC version
v0.12.3

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 a pull request may close this issue.

1 participant