ci: add SAST, SBOM generation, and supply-chain attestation#47
ci: add SAST, SBOM generation, and supply-chain attestation#47
Conversation
- SpotBugs now runs the FindSecBugs detector plugin so CWE-style security rules are enforced alongside the existing bug-pattern checks - New CodeQL workflow runs security-extended + security-and-quality queries on push, PR, and weekly schedule - CycloneDX Maven plugin generates per-module CycloneDX 1.6 BOMs (bom.json + bom.xml) attached as artifacts during the package phase - Release workflow generates GitHub build-provenance and SBOM attestations for each published jar and uploads SBOMs to the GitHub release
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
This PR strengthens the repository’s supply-chain security posture by adding automated SAST scanning (SpotBugs + FindSecBugs, plus CodeQL) and generating CycloneDX SBOMs that are then used to create GitHub supply-chain attestations during releases.
Changes:
- Configure SpotBugs to run the FindSecBugs detector plugin (security-focused SpotBugs rules).
- Add CycloneDX SBOM generation (CycloneDX 1.6, JSON+XML) during the Maven
packagephase for each module. - Extend the release workflow to generate build provenance + SBOM attestations and upload SBOMs as release assets; add a new CodeQL workflow for security scanning.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pom.xml |
Adds FindSecBugs to SpotBugs configuration and centralizes CycloneDX plugin configuration/version via pluginManagement. |
mjml-java-core/pom.xml |
Enables CycloneDX plugin for the core module so per-module SBOMs are produced. |
mjml-java-resolvers/pom.xml |
Enables CycloneDX plugin for the resolvers module so per-module SBOMs are produced. |
mjml-java-spring/pom.xml |
Enables CycloneDX plugin for the spring module so per-module SBOMs are produced. |
.github/workflows/release.yml |
Adds build provenance + SBOM attestations and uploads SBOM artifacts to the GitHub Release. |
.github/workflows/codeql.yml |
Adds a CodeQL workflow running security-extended and security-and-quality query suites on push/PR and a weekly schedule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <configuration> | ||
| <projectType>library</projectType> | ||
| <schemaVersion>1.6</schemaVersion> | ||
| <includeBomSerialNumber>true</includeBomSerialNumber> |
The serial number was a per-build UUID that made bom.json/bom.xml diff on every build even when dependencies didn't change. Disabling it makes SBOMs reproducible across builds, so attestations are stable and review diffs only show real dependency changes.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rules are enforced alongside the existing bug-pattern checks
on push, PR, and weekly schedule
(bom.json + bom.xml) attached as artifacts during the package phase
for each published jar and uploads SBOMs to the GitHub release