Skip to content

ci: attest build provenance for CLI binaries#8379

Merged
siketyan merged 1 commit intobiomejs:mainfrom
siketyan:ci/attest-build-provenance
Dec 8, 2025
Merged

ci: attest build provenance for CLI binaries#8379
siketyan merged 1 commit intobiomejs:mainfrom
siketyan:ci/attest-build-provenance

Conversation

@siketyan
Copy link
Copy Markdown
Member

@siketyan siketyan commented Dec 7, 2025

Summary

Generates a build provenance for CLI binaries in a release, using the actions/attest-build-provenance action. Users now can verify the binaries using gh CLI to ensure they're really built on GitHub Actions. It's similar to npm's provenance feature, but for CLI binaries.

ref: https://docs.github.com/en/actions/how-tos/secure-your-work/use-artifact-attestations/use-artifact-attestations

Test Plan

Fingers crossed on the next release

Docs

N/A

@siketyan siketyan requested review from a team December 7, 2025 06:39
@siketyan siketyan self-assigned this Dec 7, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 7, 2025

⚠️ No Changeset found

Latest commit: e523e51

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 7, 2025

Walkthrough

This change adds build provenance attestation to the release workflows. GitHub Actions permissions are extended with attestations: write and id-token: write access. Attest-build-provenance steps are inserted into multiple build jobs across both release.yml and release_cli.yml, executing after binary copying but before artefact uploads. These steps generate provenance attestations for the biome binaries.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding build provenance attestation for CLI binaries using GitHub Actions.
Description check ✅ Passed The description clearly explains the purpose (verifying CLI binaries were built on GitHub Actions), references the attest-build-provenance action, and provides relevant documentation links.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

12-12: Workflow-level attestation permissions added.

Adding attestations: write and id-token: write at the workflow level simplifies configuration, though this grants these permissions to all jobs. Since neither build-wasm nor build-js-api use these permissions, consider whether job-level scoping (as done in release_cli.yml) would be more security-conscious.

Alternatively, this is acceptable if you prefer simplicity over strict least-privilege here.

Also applies to: 14-14

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d71924e and e523e51.

📒 Files selected for processing (2)
  • .github/workflows/release.yml (3 hunks)
  • .github/workflows/release_cli.yml (4 hunks)
🔇 Additional comments (6)
.github/workflows/release_cli.yml (4)

67-70: Job-level permissions explicitly scoped.

The permissions block correctly restricts access to what's needed for attestation generation. Good practice for security.


151-154: Consistent permissions across build jobs.

Matching the permissions from the earlier build job is appropriate for consistency.


188-191: Attest step placement is correct.

The step is positioned between binary copying and artifact upload, which is the right place for provenance generation.


124-127: Action version is current and compatible with Depot runners.

The actions/attest-build-provenance@v3.0.0 is the latest available version. It works properly with Depot's managed runners, provided the job grants the required permissions (id-token: write and attestations: write) and the runner can request GitHub OIDC tokens—both of which Depot runners support.

.github/workflows/release.yml (2)

181-184: Attest step in standard build job looks good.

Placement and configuration mirror the CLI workflow. The build-binaries job correctly inherits the necessary permissions from the workflow level.


239-242: Ensure build artifacts are accessible to the attest action from containerized build steps.

The attest-build-provenance action runs in the job context after containerized build steps complete. Verify that ./dist/biome-* artifacts built inside the Docker container are accessible to the action—container outputs must be mounted or copied to the host job filesystem. OIDC token access is not constrained by containerization since the action operates outside the container.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This workflow is currently unused, it's here for backup

@siketyan siketyan merged commit efdd6f6 into biomejs:main Dec 8, 2025
3 checks passed
l0ngvh pushed a commit to l0ngvh/biome that referenced this pull request Dec 21, 2025
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.

2 participants