Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/rust-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ jobs:
- name: install rust
run: rustup set profile default && rustup install
# Use OIDC for updating existing crates
- uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe #v1.0.4
id: auth
# - uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe #v1.0.4
# id: auth
# - name: Publish
# env:
# CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
# run:
# cargo publish
# # # OR # # #
# Use API Token ONLY for creating a new crate
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 issue (security): Consider implications of switching from OIDC to a long-lived API token

Using a static CRATES_IO_TOKEN instead of the OIDC-based rust-lang/crates-io-auth-action introduces a long-lived secret where there was previously an ephemeral credential. If this is required (e.g., due to environment/OIDC limitations), please ensure the token is minimally scoped, easy to rotate, and that this persistent secret dependency is documented. If OIDC is still an option, consider keeping it as the default and using the token only as a fallback to reduce exposure.

run:
cargo publish
# # # OR # # #
# # Use API Token ONLY for creating a new crate
# - name: Publish
# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
# run:
# cargo publish
Loading