Upload an SBOM
Check everything installed in an image, folder or machine, by hand or from CI.
An SBOM (software bill of materials) is a file listing every package in something you run. Free tools make one in seconds, and Tinfoil Hat checks every package in it against new advisories, the same way it checks your repos.
1. Make an SBOM
Tinfoil Hat reads CycloneDX or SPDX in JSON. Two common free tools:
Syft (an image, a folder or a whole machine):
syft nginx:1.27 -o cyclonedx-json > sbom.json
syft dir:/srv/app -o cyclonedx-json > sbom.jsonTrivy:
trivy image --format cyclonedx --output sbom.json nginx:1.27
trivy fs --format cyclonedx --output sbom.json /srv/appDocker Scout, cdxgen and most other SBOM tools work too, as long as they write CycloneDX or SPDX JSON.
2. Upload it
By hand: on Systems, press Upload SBOM on the system and pick the file. It's compressed in your browser before it's sent.
From CI or a script: press Upload Token on the system, store the token as a CI secret, then send the file after each build:
curl -fsS -X POST \
-H "Authorization: Bearer $TINFOIL_TOKEN" \
--data-binary @sbom.json \
"https://tinfoilhat.doneby.ai/api/sbom?name=api-image"Large SBOMs: gzip them first.
gzip -c sbom.json | curl -fsS -X POST \
-H "Authorization: Bearer $TINFOIL_TOKEN" \
--data-binary @- "https://tinfoilhat.doneby.ai/api/sbom?name=api-image"The name labels the SBOM on the system's card. Uploading again with the same name replaces that SBOM; a different name adds another, so one system can hold several images. Without a name, the name inside the SBOM is used.
What gets checked
- npm, PyPI, Go, RubyGems and Packagist packages, read from each package's purl.
- Server software such as nginx, PostgreSQL and Node.js, when the tool records a CPE for it (Syft does for many programs).
- Debian, Ubuntu and Alpine packages, when the distribution feeds are on. See Operating system packages.
- Not yet: other ecosystems such as Maven, Cargo or Red Hat packages. They're counted as "can't check yet" and never guessed.
Limits
- 4 MB per upload as sent, 25 MB unpacked. Gzip gets most SBOMs well under the limit.
- Up to 20,000 components per SBOM, and 96 updates per system per day.
- Each token belongs to one system. Creating a new token stops the old one; disconnecting the system stops it too.
Troubleshooting
- 401 unknown or revoked token: create a new token on the system and update your CI secret.
- 400 isn't a CycloneDX or SPDX JSON file: export JSON, not XML or SPDX tag-value.
- 413 too large: gzip the file (see above).
- 429 too many uploads today: upload on merges to main rather than on every push.
- Lots of "can't check yet": usually operating system packages with the distribution feeds off, or ecosystems we don't cover yet. See Operating system packages.
Still stuck? Email privacy@doneby.ai with what you tried and what happened.