How do I generate and store SBOMs for Makefiles artifacts?

In today's software development landscape, generating and storing Software Bill of Materials (SBOMs) for artifacts built with Makefiles is essential for ensuring compliance, security, and transparency in your software supply chain. An SBOM provides a detailed list of components, libraries, and dependencies of your software, which can help organizations track vulnerabilities and maintain security standards. Below is an example of how to generate and store SBOMs for Makefiles artifacts.

# Example Makefile all: app app: main.o utils.o gcc -o app main.o utils.o main.o: main.c utils.h gcc -c main.c utils.o: utils.c utils.h gcc -c utils.c # Command to generate SBOM using Syft sbom: syft packages dir:. --output json > sbom.json

SBOM Software Bill of Materials Makefiles software supply chain security compliance dependencies vulnerability tracking generate SBOM store SBOM