Skip to content

Generate and publish a CycloneDX SBOM for every release build in .github/workflows/ci.yml #690

Description

@Jagadeeshftw

Description

.github/dependabot.yml keeps pnpm-lock.yaml current, but there is no generated software bill of materials artifact for a given release commit, so answering "exactly which package versions shipped in production build X" requires reconstructing it from the lockfile after the fact. Add a CI step that generates a CycloneDX SBOM from pnpm-lock.yaml on release builds and uploads it as a build artifact.

Requirements and context

  • Add an SBOM-generation step (e.g. @cyclonedx/cyclonedx-npm) to .github/workflows/ci.yml, gated to release/tag builds so every PR does not pay the cost
  • Upload the resulting SBOM as a GitHub Actions artifact attached to the workflow run
  • Add a small verification script asserting the generated SBOM is well-formed JSON and includes the expected root package
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested execution

Fork the repo and create a branch

git checkout -b feature/sbom-generation

Implement changes

  • Update/Write: .github/workflows/ci.yml
  • Update/Write: scripts/verify-sbom.ts
  • Add/Update tests: scripts/verify-sbom.ts
  • Add documentation: README.md
  • Include clear code comments and TS types
  • Validate security assumptions

Test and commit

  • Run tests: pnpm test
  • Cover edge cases
  • Include test output and security notes

Example commit message

feat: generate CycloneDX SBOM on release builds

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Labels

GrantFox OSSGrantFox open-source programMaybe RewardedGrantFox: potentially rewarded contributionOfficial Campaign | FWC26GrantFox official campaign issuebackendBackend / API worksecuritySecurity hardening / audit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions