
Overview
Supply Chain Security Tools – Store saves software bills of materials (SBoMs) to a database and allows you to query for image, source, package, and vulnerability relationships. It integrates with Supply Chain Security Tools – Scan to automatically store the resulting source and image vulnerability reports. It accepts any CycloneDX input and outputs in both human-readable and machine-readable formats, including JSON, text, and CycloneDX.
Prerequisites
- Ensure to complete the TAP install with OOTB test and scan, refer to steps here
- postgres database (optional) – By default, Postgres database and an API backend is created during the installation of tanzu packages. If you are planning to use an external postgres DB refer to doc
- insight CLI, Grype
- Service accounts and access token
insight CLI and Grype
Install insight CLI
- Login to Tanzu network and download the tarball based on your operating system, for this demo I choose insight-1.0.1_darwin_amd64 for mac
Grype
- refer to github page to get the install steps
Service accounts and access token
You can create two types of service accounts, In this demo, I have used Read-write service account.
- Read-only service account – only able to use
GET
API requests
(OR)
2. Read-write service account – full access to the API requests
Access Token:
To retrieve the read-write access token run the following command:
Setting the access token:
- When using the CLI, you’ll need to set the
METADATA_STORE_ACCESS_TOKEN
environment variable, or use the--access-token
flag.
Connection to database:
The connection to the Store requires TLS encryption. Follow the instructions below to set up the TLS connection depending on which type of service is being used: For this demo, I have used LoadBalancer.
- Using
LoadBalancer
- Using
NodePort
— commonly used with local clusters such as kind, or minikube
LoadBalancer
- If you are using a
LoadBalancer
configuration, you need to find the external IP of themetadata-store-app
service using below command:
- Add the IP entry mapping to
metadata-store-app.metadata-store.svc.cluster.local
in /etc/hosts like shown below:
The CA certificate is generated by cert manager. Run the following command to get the CA certificate:
insight CLI configuration
Though the data can be added by posting CycloneDX files using many methods, In this demo I will be adding it through Insight CLI:
Generate a CycloneDX File
To use Grype to scan an image and generate an image report in CycloneDX format.
Demo Video: