Skip to content

Harden crates.io release publishing#9129

Open
Alb3e3 wants to merge 1 commit into
google:masterfrom
Alb3e3:harden-crates-release-publishing
Open

Harden crates.io release publishing#9129
Alb3e3 wants to merge 1 commit into
google:masterfrom
Alb3e3:harden-crates-release-publishing

Conversation

@Alb3e3

@Alb3e3 Alb3e3 commented Jun 10, 2026

Copy link
Copy Markdown

Summary:

  • reduce the release workflow GITHUB_TOKEN permissions from read-all to contents: read
  • replace the archived/third-party Rust publishing actions with rustup plus cargo publish
  • keep the crates.io token in Cargo's standard CARGO_REGISTRY_TOKEN environment variable, scoped to each publish step

Security rationale:
The release workflow has access to package registry credentials. Publishing the Rust crates directly with Cargo removes third-party GitHub Actions from the crates.io credential path and reduces the default GitHub token permissions used by the workflow.

Validation:

  • /tmp/actionlint-bin/actionlint .github/workflows/release.yml
  • CARGO_REGISTRY_TOKEN=dummy cargo publish --dry-run --manifest-path ./rust/flatbuffers/Cargo.toml
  • CARGO_REGISTRY_TOKEN=dummy cargo publish --dry-run --manifest-path ./rust/flexbuffers/Cargo.toml

@google-cla

google-cla Bot commented Jun 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the CI Continuous Integration label Jun 10, 2026
@Alb3e3 Alb3e3 force-pushed the harden-crates-release-publishing branch from 944b69f to d929276 Compare June 10, 2026 13:29
@Alb3e3 Alb3e3 marked this pull request as ready for review June 10, 2026 13:30
@Alb3e3 Alb3e3 requested a review from dbaileychess as a code owner June 10, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant