/lx-vsm-py

Primary LanguagePythonMIT LicenseMIT

LX-VSM-PY

What is it?

This is a python based CLI to submit project information, including a CycloneDX compliant SBOM, to your LeanIX VSM workspace via the Service Discovery API.

When should I use it?

Primarily used for submitting an SBOM during your CI/CD pipeline, but can be used to submit additional data during various stages of development and deployment, such as version numbers, testing results, code quality, and deployment times.

How does it work?

Assuming your python packages are on your system $PATH variable, this can be run like any other bash tool just by calling lx-vsm-py. Arguments can be seen by running lx-vsm-py --help. This script uses the arguments to authenticate with your workspace to submit the other arguments and (optional) SBOM to the Service Discovery API. See the next section for detailed instructions.

How do I use it?

  1. Clone this repository to your computer
  2. Run python setup.py sdist && pip install dist/lx-vsm-py-1.0.tar.gz to build and install this utility to your local python installation globally.
  3. Add a file to your python project called lx-vsm-py.sh with the following contents:
cyclonedx-py -e -F --format json -o sbom.json && lx-vsm-py --sbom-path sbom.json --api-token $VSM_TOKEN --region us --host demo-us
  1. Update the region, host, and api-token for your instance of VSM
  2. Run ./lx-vsm-py.sh to update your service in VSM

License

This project is licensed under the MIT License

Contact

Start with the VSM Documentation, or feel free to contact LeanIX Support for anything else.