crates.io: Trusted Publishing

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Rust developers publishing crates via GitHub Actions can drop API tokens and secrets entirely, removing a credential-leak risk from their CI/CD pipeline today.

Read this as

crates.io, the website where Rust programmers share ready-made code packages, has adopted a system called Trusted Publishing. Instead of storing secret passwords (API tokens) to upload packages, developers can now tell crates.io which GitHub repository to trust directly. This closes a common way attackers steal credentials. The first release from a new package must still be done manually.

crates.io has shipped Trusted Publishing, copied from PyPI's approach, eliminating GitHub Actions secrets and API tokens for Rust package releases. The security benefit is real but modest: a supply-chain attack surface is removed for teams publishing from CI/CD. There is one gap versus PyPI, no 'pending publisher', so first releases stay manual. Teams maintaining many Rust crates gain the most.

crates.io now supports Trusted Publishing: instead of API tokens in GitHub Actions secrets, developers configure a trusted GitHub repository directly on crates.io, which authenticates CI/CD publishes via OIDC-style trust rather than stored credentials. Adopters of PyPI's equivalent will recognise the model. Limitation: no PyPI-style 'pending publisher', so a crate's first release must be published manually before Trusted Publishing can be configured for subsequent releases.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

crates.io PyPI Rust GitHub Actions GitHub

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading