Skip to content

ci(release): publish CycloneDX SBOM - #180

Open
KooshaPari wants to merge 2 commits into
mainfrom
fix/release-sbom-20260826
Open

ci(release): publish CycloneDX SBOM#180
KooshaPari wants to merge 2 commits into
mainfrom
fix/release-sbom-20260826

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Aug 26, 2026

Copy link
Copy Markdown
Owner

User description

Summary

  • generate a CycloneDX JSON SBOM from published Forge and HeliosLite release assets
  • upload the SBOM as a release asset using a pinned Anchore action
  • keep generated workflow and forge_ci source synchronized with focused assertions

Verification

  • cargo test -p forge_ci --test ci (8 passed)
  • cargo fmt --all -- --check (passed; nightly-only config warnings only)
  • cargo check -p forge_ci --locked (passed)
  • git diff --check (passed)
  • actionlint .github/workflows/release.yml (pre-existing SC2193/SC1075 findings at lines 153/156 only; no findings on this SBOM block)

PR #179 is intentionally untouched. This PR requires normal hosted review and CI before merge.


CodeAnt-AI Description

Publish a CycloneDX software bill of materials with every release

What Changed

  • Release workflows now collect Forge and HeliosLite assets after the build completes
  • A CycloneDX JSON software bill of materials is generated from those assets
  • The SBOM is attached to the GitHub release with a tag-specific filename

Impact

✅ Downloadable dependency inventory for every release
✅ Machine-readable release composition
✅ SBOM generation included in the release process

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Generate a CycloneDX SBOM from published Forge and HeliosLite assets and upload it to the release for machine-verifiable dependency evidence.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Copilot AI lite review requested due to automatic review settings August 26, 2026 03:15
@codeant-ai

codeant-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed cd677ce Aug 27, 2026 · 00:47 00:48
✅ Reviewed your PR c183f10 Aug 26, 2026 · 03:15 03:18

@codeant-ai

codeant-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai codeant-ai Bot added the size:M label Aug 26, 2026
@mergify mergify Bot added the rust label Aug 26, 2026
let release_build_job = ReleaseBuilderJob::new("${{ github.event.release.tag_name }}")
.release_id("${{ github.event.release.id }}");
let sbom_job = Job::new("Generate release SBOM")
.needs("build_release")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The SBOM job depends only on build_release, so it runs concurrently with attest_release_assets. The attestation job can download and attest the release assets before this job uploads the SBOM, producing a release whose newly generated SBOM is not covered by the release attestation. Make the attestation job depend on the SBOM job, or otherwise enforce the required upload-before-attestation ordering. [race condition]

Severity Level: Major ⚠️
- ⚠️ Release attestation can omit the generated CycloneDX SBOM.
- ⚠️ Consumers cannot verify provenance for the SBOM release asset.
- ❌ Release asset integrity coverage is incomplete.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/forge_ci/src/workflows/release_publish.rs
**Line:** 12:12
**Comment:**
	*Race Condition: The SBOM job depends only on `build_release`, so it runs concurrently with `attest_release_assets`. The attestation job can download and attest the release assets before this job uploads the SBOM, producing a release whose newly generated SBOM is not covered by the release attestation. Make the attestation job depend on the SBOM job, or otherwise enforce the required upload-before-attestation ordering.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +31 to +36
"artifact-name",
"forgecode-${{ github.event.release.tag_name }}.cdx.json",
)
.input(
"output-file",
"forgecode-${{ github.event.release.tag_name }}.cdx.json",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The release tag is interpolated directly into output-file. GitHub release tags may contain /, so a tag such as release/foo expands this to forgecode-release/foo.cdx.json; the nested parent directory is not created, causing SBOM output generation or release upload to fail. Use a filesystem-safe fixed output path and set the release asset name separately. [api mismatch]

Severity Level: Major ⚠️
- ❌ SBOM generation fails for slash-containing release tags.
- ❌ The release workflow cannot publish its SBOM asset.
- ⚠️ Release automation requires tag-name restrictions.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/forge_ci/src/workflows/release_publish.rs
**Line:** 31:36
**Comment:**
	*Api Mismatch: The release tag is interpolated directly into `output-file`. GitHub release tags may contain `/`, so a tag such as `release/foo` expands this to `forgecode-release/foo.cdx.json`; the nested parent directory is not created, causing SBOM output generation or release upload to fail. Use a filesystem-safe fixed output path and set the release asset name separately.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c183f10d20

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +200 to +201
--pattern "forge-*" \
--pattern "helioslite-*"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include forge_dbd assets in the SBOM input

The release build uploads forge_dbd-${{ matrix.target }} binaries and checksums, but this download selects only forge-* and helioslite-*; as gh release download --help defines --pattern as downloading only assets matching the glob, forge_dbd-* does not match either pattern. Consequently, the SBOM action scans none of the published daemon artifacts, leaving that shipped executable uncovered; add a forge_dbd-* pattern in both the workflow model and generated workflow.

Useful? React with 👍 / 👎.

@mergify mergify Bot added the rust label Aug 26, 2026
@github-actions github-actions Bot removed the rust label Aug 26, 2026
@mergify mergify Bot added the rust label Aug 26, 2026
@github-actions github-actions Bot removed the rust label Aug 26, 2026
@mergify mergify Bot added the rust label Aug 26, 2026
@codeant-ai

codeant-ai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 27, 2026
@socket-security

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants