Giter VIP home page Giter VIP logo

Comments (6)

siewer avatar siewer commented on June 24, 2024 1

@coderpatros so the proper way to achieve my goal is to

  1. Cd desired location
  2. Npm install
  3. Cyclonedx-bom
  4. Cd project root
  5. Cyclonedx-npm -a desiredlocation/bom.xml

And iterate through all packages?

from cyclonedx-node-module.

siewer avatar siewer commented on June 24, 2024 1

@stevespringett I am not an expert in field of npm projects. It happen to me multiple times that I have encountered multi module project where running npm install && cyclonedx-bom in root directory produced me an empty bom while running cyclonedx-bom on separate modules provide results
try this repo for example: https://github.com/lerna/lerna
running npm install && cyclonedx-bom in root directory produce bom.xml with 62 lines

while running npm install && cyclonedx-bom in utils/log-packed produce 873 lines bom.xml

combining them with @coderpatros tip result in 921 bom.xml combined

PS @coderpatros this works, thank You!

from cyclonedx-node-module.

coderpatros avatar coderpatros commented on June 24, 2024

Hi @siewer it works the other way around.

When you invoke cyclonedx-bom -a /tmp/lerna/bom.xml it is appending /tmp/lerna/bom.xml to the newly generated SBOM.

from cyclonedx-node-module.

coderpatros avatar coderpatros commented on June 24, 2024

That should do it.

Although a comma separated list should work for the last step too.

from cyclonedx-node-module.

stevespringett avatar stevespringett commented on June 24, 2024

@siewer I'm curious why this approach is being taken. When generating BOMs, transitive dependencies will be included, so normally, there isn't a need to create BOMs for every package, unless of course that is the requirement.

from cyclonedx-node-module.

coderpatros avatar coderpatros commented on June 24, 2024

For any future visitors to this issue. You shouldn't normally need this for a single Node.js project. But might need it for mono repos where you want to create a consolidated view for the entire repo.

Another really good use case is where you are generating an SBOM for server and client side dependencies. i.e. .NET for server side and JS client side.

from cyclonedx-node-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.