Command in CodeBuild completes without an error or SBOM
I am running v10.3.4 within a CodeBuild project using node v20.
When I run the command, it installs cdxgen and completes the cdxgen command without error but there is no bom.json file and not quite too sure why.
This has worked with the v9.9.0 but I wanted to take advantage of the v10 container features.
Any tips on what I can do to debug this issue?
buildspec:
phases:
install:
runtime-versions:
nodejs: 20
commands:
- npm install -g @cyclonedx/[email protected]
build:
commands:
- echo "Starting dependency discovery"
- FETCH_LICENSE=true cdxgen -t universal --spec-version 1.4 -o bom.json
CodeBuild output
[Container] 2024/04/10 12:39:35.750817 Running command npm install -g @cyclonedx/[email protected]
[...snip...]
[Container] 2024/04/10 12:39:46.592614 Phase complete: INSTALL State: SUCCEEDED
[...snip...]
[Container] 2024/04/10 12:39:46.667296 Running command echo "Starting dependency discovery"
Starting dependency discovery
[Container] 2024/04/10 12:39:46.671004 Running command FETCH_LICENSE=true cdxgen -t universal --spec-version 1.4 -o bom.json
[Container] 2024/04/10 12:41:30.227032 Running command aws s3 cp bom.json "s3://<bucket_name>/bom.json"
The user-provided path bom.json does not exist.
@erinmcgill not sure. Could you perhaps pass an absolute path to cdxgen and also run it by setting the environment variable CDXGEN_DEBUG_MODE=debug?
Thanks so much for the suggestion - I'll give that a shot!
@erinmcgill What was the issue? Could you contribute to the docs to help other codebuild users?
I haven't reached the source of the issue yet - I was looking to see how I can turn on debugging so I can get there.