Skip to content

SBOM- ERR error="failed to load package: no Go files in /builds/platform/<project_repo>" #702

Description

@narasimman-elu

$ cyclonedx-gomod "${go_mode:0:3}" -json -output reports/go-sbom.cyclonedx.json $GO_SBOM_OPTS

The command can be refered in to-be-continiuos sbom-generation

This command expects the go mod files and go files on the same directory and is not working for standard go folder structures like below

ERR error="failed to load modules: not a go module"

.
├── go.mod
├── cmd/myapp/main.go
├── internal/foo/foo.go

I would have expected the cylonedx-gomad command detect the go mod files from anywhere in the GO_PROJECT_DIR and execute the command for all go files recursively.
configuring this variable GO_SBOM_OPTS still fails if this variable is configure with single directory path or with multiple directory path, then it throws command expects

ERR error="too many arguments (expected 1, got 2)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions