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

Fix length issues #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix length issues #1

wants to merge 1 commit into from

Conversation

inari06
Copy link

@inari06 inari06 commented Feb 22, 2023

Issues:

/tmp ./spdx-sbom-generator -p ironclad/harbor -o /tmp/bom
INFO[2023-02-21T18:00:14-08:00] Starting to generate SPDX ...
INFO[2023-02-21T18:00:14-08:00] Running generator for Module Manager: `yarn` with output `/tmp/bom/bom-yarn.spdx`
INFO[2023-02-21T18:00:14-08:00] Current Language Version 1.22.19
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
spdx-sbom-generator/internal/modules/yarn.appendNestedDependencies(0xc00352a000, 0x1210, 0x1362, 0x1210, 0x1362, 0x0)
	/github/workspace/internal/modules/yarn/handler.go:372 +0x8ba
spdx-sbom-generator/internal/modules/yarn.(*yarn).ListModulesWithDeps(0xc0000b8190, 0x7ff7bfefebc9, 0xf, 0x0, 0x0, 0x1, 0x1, 0x1920720)
	/github/workspace/internal/modules/yarn/handler.go:154 +0xdf
spdx-sbom-generator/internal/modules.(*Manager).Run(0xc002f62000, 0x4, 0x1955d89)
	/github/workspace/internal/modules/modules.go:94 +0x14d
spdx-sbom-generator/internal/handler.(*spdxHandler).Run(0xc002f64000, 0x7, 0x7ff7bfefebc9)
	/github/workspace/internal/handler/spdx.go:73 +0x2ee
main.generate(0x2255c80, 0xc002f0f180, 0x0, 0x4)
	/github/workspace/cmd/generator/generator.go:105 +0x433
github.com/spf13/cobra.(*Command).execute(0x2255c80, 0xc0000b8010, 0x4, 0x4, 0x2255c80, 0xc0000b8010)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x2255c80, 0x0, 0x0, 0x0)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
	/github/workspace/cmd/generator/generator.go:37 +0x5d
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/spdx/spdx-sbom-generator/pkg/modules/yarn.appendNestedDependencies({0xc003680000, 0x1210, 0x1?})
	/tmp/spdx-sbom-generator/pkg/modules/yarn/handler.go:397 +0x752
github.com/spdx/spdx-sbom-generator/pkg/modules/yarn.(*yarn).ListModulesWithDeps(0xc000022190?, {0x7ff7bfefeba5, 0x14}, {0x16?, 0xc00315f9b0?})
	/tmp/spdx-sbom-generator/pkg/modules/yarn/handler.go:169 +0x85
github.com/spdx/spdx-sbom-generator/pkg/modules.(*Manager).Run(0xc000022230)
	/tmp/spdx-sbom-generator/pkg/modules/modules.go:102 +0x15a
github.com/spdx/spdx-sbom-generator/pkg/handler.(*spdxHandler).Run(0xc0030dc000)
	/tmp/spdx-sbom-generator/pkg/handler/spdx.go:88 +0x309
main.generate(0x1fc8ea0, {0x17e1cc2?, 0x4?, 0x4?})
	/tmp/spdx-sbom-generator/cmd/generator/generator.go:121 +0x373
github.com/spf13/cobra.(*Command).execute(0x1fc8ea0, {0xc000128010, 0x4, 0x4})
	/Users/nari.mulakala/work/gowork/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x1fc8ea0)
	/Users/nari.mulakala/work/gowork/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/nari.mulakala/work/gowork/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
	/tmp/spdx-sbom-generator/cmd/generator/generator.go:39 +0x65

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.

1 participant