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
1 change: 1 addition & 0 deletions .github/workflows/build-rust-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:

permissions:
contents: read
id-token: write
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider scoping id-token: write to the specific job that requires it rather than at the workflow level.

This makes OIDC tokens available to every job. To follow least-privilege, only enable id-token: write in the permissions block of the specific jobs that actually need it, keeping the workflow-wide permissions minimal.

Suggested implementation:

permissions:
  contents: read

jobs:
  # Build wheels for Linux

To fully implement least-privilege, add a permissions block to the specific job(s) that actually require OIDC, for example:

jobs:
  some-job-that-needs-oidc:
    permissions:
      id-token: write
      contents: read
    steps:
      ...

Adjust the job name and permissions according to the actual job in this workflow that uses OIDC (e.g. for cloud auth/deploy). Other jobs should omit id-token: write.


jobs:
# Build wheels for Linux
Expand Down
Loading