cdxgen: New version does not find pnpm lock files

Using --recurse does not find the pnpm-lock.yaml file which is placed in /frontend. Even though the --recurse should find the file https://github.com/CycloneDX/cdxgen/blob/450d3bcd54d93854c9cbf1781962f8e584505681/lib/cli/index.js#L2409. However, when setting --no-install-deps the file is found. This is not preferred when running multiple projects in a single repository as for other projects we may want to install deps (gradle).

Any suggestions how to workaround this?

The command I ran: CDXGEN_DEBUG_MODE=true cdxgen --recurse . The output seems to be different from CDXGEN_DEBUG_MODE=true CDXGEN_SECURE_MODE=true cdxgen --recurse . Using the secure mode detects the path. Why is this different?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Ah, thanks! Seems to be working as expected now, the issue can be closed 😃

Thank you @konstantinas1. Yes, that logic needs some improvement. We need to test both auto-install and non-install use cases.

The goal is to make cdxgen perform up to 2 (configurable) npm installations provided there are no lock files present.

Looking forward to your PR!

I think my setup is fine, path is also correctly set. I am running cdxgen 11.1.8. It really seems like cdxgen is just not looking for the file.

CDXGEN_DEBUG_MODE=debug cdxgen $(pwd)
Scanning /Users/konstantin/Documents/GitHub/my-app
Performing babel-based package usage analysis with source code at /Users/konstantin/Documents/GitHub/my-app
Executing 'pnpm install' in /Users/konstantin/Documents/GitHub/my-app/frontend
pnpm install has failed. Generated SBOM will be empty or with a lower precision.