A simple Python Flask web application demonstrating SBOM (Software Bill of Materials) generation using CycloneDX and signing using cosign ans STaaS.
.
├── app.py # Flask dummy application
├── requirements.txt # Python dependencies
├── .github/workflows/sbom.yml # GitHub Action for SBOM generation and signing
└── README.md # This file
The project includes a GitHub Action that automatically generates an SBOM (Software Bill of Materials) file using CycloneDX whenever code is pushed to the main branch or a pull request is created.
The .github/workflows/sbom.yml workflow:
- Checks out the repository
- Sets up Python 3.11
- Installs dependencies from
requirements.txt - Generates a CycloneDX SBOM
- Signs the SBOM using STaaS
- Signs the SBOM using cosign
- Uploads the SBOM as a workflow artifact
The generated SBOM is retained for 90 days and can be downloaded from the Actions tab.
Fork the repository. Create a free account in STaaS
and generate an API token. Then, navigate in your repository, go to Settings,
Secrets and variables, Actions and set a new Repository secret with name STAAS_API_KEY