Skip to content

Gate SBOM package licenses - #116

Merged
BacchusJackson merged 2 commits into
mainfrom
license-gating
Nov 4, 2026
Merged

BacchusJackson merged 2 commits into
mainfrom
license-gating

Conversation

@BacchusJackson

Copy link
Copy Markdown
Member

This adds a license config section that fails Syft JSON and CycloneDX SBOMs when their packages use licenses you don't want.

license:
  enabled: true
  deny: [GPL-*, AGPL-*]   # case-insensitive globs
  allow: []               # when set, anything outside it fails
  denyUnknown: false      # fail packages with no license / NOASSERTION
  packageRiskAcceptance:
    - name: busybox
    - purl: pkg:apk/alpine/apk-tools
  • New pkg/license package, with an SPDX expression parser. OR passes when either side passes, AND needs both, and X WITH Y is denied with X unless the full WITH string is allowed. Several license entries on one package must all pass.
  • Syft JSON used to error on both list and validate. Now list prints package, version, type, and licenses, and validate and bundles run the license rules.
  • CycloneDX runs the license and vulnerability rules together, and reports both failures. Nested components are included.
  • New page: docs/licenses.md.

Test fixtures are trimmed Syft and CycloneDX SBOMs of alpine:3.20, made with the managed syft 1.55.0. The real binary on those SBOMs with deny: [GPL-*] exits 1 and names the 8 GPL packages.

This is stacked on #115 (VEX), because both add config sections. The diff includes that commit until #115 lands.

Fixes #103

🤖 Generated with Claude Code

validate --vex, GATECHECK_VEX, and the config's vex.files read OpenVEX
and CycloneDX VEX. Grype, CycloneDX, Trivy, and osv-scanner findings
marked not exploitable are dropped after the deny list, so they skip the
KEV, EPSS, and severity rules. Statements that name packages match by
package URL, and the latest statement wins.

Fixes #102
The license config section checks Syft JSON and CycloneDX components
against deny and allow glob patterns, with SPDX AND, OR, and WITH
expressions evaluated. denyUnknown fails packages with no license, and
packageRiskAcceptance skips packages by purl or name. Syft JSON now
lists its packages and validates with these rules instead of erroring.

Fixes #103
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Deploying gatecheck-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5d134d8
Status: ✅  Deploy successful!
Preview URL: https://245c4418.gatecheck-website.pages.dev
Branch Preview URL: https://license-gating.gatecheck-website.pages.dev

View logs

@BacchusJackson
BacchusJackson merged commit 5d134d8 into main Nov 4, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 5d134d82 Deployed Nov 4, 2026 by BacchusJackson via deploy #72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

License gating from SBOMs

1 participant