Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set finer-grain workflow permissions #1163

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

jrhemstad
Copy link
Collaborator

Description

closes #919

In following with better security best practices, we don't want to rely on the default GHA_TOKEN permissions.

Instead, we want to set the least permissive permissions at the workflow level, and then set higher permissions at individual jobs that need them.

Most jobs need id-token: write for https://github.com/aws-actions/configure-aws-credentials for sccache configuration.

@jrhemstad
Copy link
Collaborator Author

Hey @diogoteles08, finally got around to addressing this. Would you mind taking a look?

@jarmak-nv
Copy link
Collaborator

I think we'll need to update https://github.com/NVIDIA/cccl/blob/main/.github/workflows/triage_rotation.yml as well.

I think it just needs issue:write but not 100% certain.

@jrhemstad jrhemstad marked this pull request as ready for review November 29, 2023 19:22
@jrhemstad jrhemstad requested review from a team as code owners November 29, 2023 19:22
Copy link
Collaborator

@jarmak-nv jarmak-nv left a comment

Choose a reason for hiding this comment

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

🔒 Looks good

@jrhemstad jrhemstad merged commit 72ab111 into NVIDIA:main Nov 29, 2023
518 checks passed
wmaxey pushed a commit that referenced this pull request Dec 1, 2023
* Set workflow read permissions and per-job write permissions.

* set pull-requests read at workflow level.

* Set contents read at job level.

* Explicitly set job-level read permissions.

* Add permissions to verify-devcontainers.
wmaxey added a commit that referenced this pull request Dec 1, 2023
* Avoid batch benchmarks

* Relax minimal benchmarking time

* Don't benchmark small problem sizes

* Reduce sort workloads

* Split benchmarks into shards

* Fewer histogram benchmarks

* Fewer seg sort benchmarks

* Think about P0 algorithms

* Extra print

* Next round of simplification

* Do not treat segmented problems as P0

* Fewer workloads for memcpy

* Better workload filter

* Do not stop on first bench failure

* Update nvbench

* Remove draft automation + reduce permissions (#1154)

* Set finer-grain workflow permissions (#1163)

* Set workflow read permissions and per-job write permissions.

* set pull-requests read at workflow level.

* Set contents read at job level.

* Explicitly set job-level read permissions.

* Add permissions to verify-devcontainers.

---------

Co-authored-by: Georgy Evtushenko <[email protected]>
Co-authored-by: Ben Jarmak <[email protected]>
Co-authored-by: Jake Hemstad <[email protected]>
@diogoteles08
Copy link

Hey @diogoteles08, finally got around to addressing this. Would you mind taking a look?

Hey @jrhemstad! Took a look and it looks good! Thanks for addressing this =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

CI: set minimal permissions on GitHub Workflow
4 participants