sbomify is a Software Bill of Materials (SBOM) management platform that can be self-hosted or accessed through app.sbomify.com. The platform provides a centralized location to upload and manage your SBOMs, allowing you to share them with stakeholders or make them publicly accessible.
The sbomify backend integrates with our github actions module to automatically generate SBOMs from lock files and docker files.
For more information, see sbomify.com.
- Be compatible with both CycloneDX and SPDX SBOM formats
- Be compatible with Project Koala / Transparency Exchange API (TEA)
For information about cutting new releases, see RELEASE.md.
- Python 3.12+
- Poetry
- Docker (for running PostgreSQL and Minio)
- Bun (for JavaScript development)
The API documentation is available at:
- Interactive API docs (Swagger UI):
http://localhost:8000/api/v1/docs - OpenAPI specification:
http://localhost:8000/api/v1/openapi.json
These endpoints are available when running the development server.
- Copy
.env.exampleto.envand adjust values as needed:
cp .env.example .env- You can run the application in two ways:
docker compose -f docker-compose.yml -f docker-compose.dev.yml build
docker compose -f docker-compose.yml -f docker-compose.dev.yml upAlternatively you can run the following script to start the development environment:
./bin/start_development_environment.shThis will start all required services:
- PostgreSQL database for data storage
- MinIO S3-compatible storage (accessible at
http://localhost:9001) - Django development server
The fastest way to log in to the development server is to create a superuser account:
docker compose \
-f docker-compose.yml \
-f docker-compose.dev.yml exec \
-e DJANGO_SUPERUSER_USERNAME=sbomifyadmin \
-e DJANGO_SUPERUSER_PASSWORD=sbomifyadmin \
-e DJANGO_SUPERUSER_EMAIL=admin@sbomify.com \
sbomify-backend \
poetry run python manage.py createsuperuser \
--noinputGo to http://localhost:8000/admin and log in with the superuser account you just created.
After that you can go to http://localhost:8000/ to access the web interface.
- Start required services in Docker:
# Start both PostgreSQL and MinIO
docker compose up sbomify-db sbomify-minio sbomify-createbuckets -d- Install dependencies:
poetry install
bun install # for JavaScript dependencies- Run migrations:
poetry run python manage.py migrate- Start the development servers:
# In one terminal, start Django
poetry run python manage.py runserver
# In another terminal, start Vite
bun run devThe application uses Vite for JavaScript development. The following environment variables control the development servers:
# Vite development settings
DJANGO_VITE_DEV_MODE=True
DJANGO_VITE_DEV_SERVER_PORT=5170
DJANGO_VITE_DEV_SERVER_HOST=http://localhost
# Static and development server settings
STATIC_URL=/static/
DEV_JS_SERVER=http://127.0.0.1:5170
WEBSITE_BASE_URL=http://127.0.0.1:8000
VITE_API_BASE_URL=http://127.0.0.1:8000/api/v1
VITE_WEBSITE_BASE_URL=http://127.0.0.1:8000These settings are preconfigured in the .env.example file.
The application uses S3-compatible storage for storing files and assets. In development, we use Minio as a local S3 replacement.
- When running with Docker Compose, everything is configured automatically
- When running locally (Django outside Docker):
- Make sure Minio is running via Docker:
docker compose up sbomify-minio sbomify-createbuckets -d - Set
AWS_S3_ENDPOINT_URL=http://localhost:9000in your.env - The required buckets (
sbomify-mediaandsbomify-sboms) will be created automatically
- Make sure Minio is running via Docker:
You can access the Minio console at:
http://localhost:9001- Default credentials: minioadmin/minioadmin
poetry run coverage run -m pytest --pdb -x -s
poetry run coverage reportFor frontend JS work, setting up JS tooling is required.
curl -fsSL https://bun.sh/install | bashIn the project folder at the same level as package.json:
bun installFor JavaScript/TypeScript linting:
# Check for linting issues (used in CI and can be run locally)
bun lint
# Fix linting issues automatically (local development only)
bun lint-fixbun run dev- Docker and Docker Compose
- S3-compatible storage (like MinIO)
- PostgreSQL database
- Auth0 account for authentication (Note: Migration to Keycloak is planned)
- Reverse proxy (e.g., Nginx) for production deployments
The application uses two Docker Compose files:
docker-compose.yml: Base configuration with development defaultsdocker-compose.prod.yml: Production overrides that:- Remove development-specific settings
- Add production-specific configurations
- Configure proper restart policies
- Remove exposed ports except for the web interface
- Remove development volume mounts
For production deployments, it's strongly recommended to put a reverse proxy (such as Nginx) in front of the application server. This provides:
- SSL/TLS termination
- Better security
- Static file serving
- Load balancing (if needed)
- Request buffering
- Gzip compression
Note: The application is planned to migrate from Auth0 to Keycloak. See #1 for details.
Create a "Regular Web Application" in Auth0 with the following settings:
| Setting | Value |
|---|---|
| APPLICATION LOGIN URI | https://[yourdomain] |
| ALLOWED CALLBACK URLs | https://[yourdomain]/complete/auth0 |
| ALLOWED LOGOUT URLs | https://[yourdomain] |
| ALLOWED WEB ORIGINS | https://[yourdomain] |
Create a .env file with the following variables:
# Database
POSTGRES_PASSWORD=<secure-password>
# Security
SECRET_KEY=<django-secret-key>
# Auth0
SOCIAL_AUTH_AUTH0_DOMAIN=<your-auth0-domain>
SOCIAL_AUTH_AUTH0_KEY=<your-auth0-client-id>
SOCIAL_AUTH_AUTH0_SECRET=<your-auth0-client-secret>
# Storage (MinIO/S3)
AWS_ACCESS_KEY_ID=<your-s3-access-key>
AWS_SECRET_ACCESS_KEY=<your-s3-secret-key>
# Application
APP_BASE_URL=https://[your-domain]- Build and start the production stack:
# Build the images
docker compose -f docker-compose.yml -f docker-compose.prod.yml build
# Start the stack
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d- Create a superuser account (first time only):
docker compose exec sbomify-backend poetry run python manage.py createsuperuser- The application will be available at
http://[your-domain]:8000
curl -v -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
--data-binary @cyclonedx-format-sbom-file.json \
https://[your-domain]/api/v1/sboms/artifact/cyclonedx/<component-id>curl -v -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
--data-binary @spdx-format-sbom-file.json \
https://[your-domain]/api/v1/sboms/artifact/spdx/<component-id># Take DB backup
docker compose exec sbomify-db pg_dump -U sbomify sbomify > backup.sql
# Restore DB from backup
cat backup.sql | docker compose exec -T sbomify-db psql -U sbomify sbomifyFor sbom formats, models for new versions can be generated using
datamodel-codegen which is installed as a dev dependency.
poetry run datamodel-codegen \
--url https://github.com/CycloneDX/specification/raw/refs/tags/1.6/schema/bom-1.6.schema.json \
--output-model-type pydantic_v2.BaseModel \
--use-standard-collections \
--use-subclass-enum \
--use-double-quotes \
--use-schema-description \
--target-python-version 3.10 \
--use-annotated \
--output cyclonedx