Skip to content

Conversation

varunsh-coder
Copy link
Contributor

This PR adds minimum token permissions for the GITHUB_TOKEN using https://github.com/step-security/secure-workflows.

GitHub recommends defining minimum GITHUB_TOKEN permissions for securing GitHub Actions workflows

This project is part of the top 100 critical projects as per OpenSSF (https://github.com/ossf/wg-securing-critical-projects), so fixing the token permissions to improve security.

Signed-off-by: Varun Sharma varunsh@stepsecurity.io

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>
copybara-service bot pushed a commit that referenced this pull request Jul 13, 2022
Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>

Closes #6106

RELNOTES=n/a
PiperOrigin-RevId: 460729188
copybara-service bot pushed a commit to google/jimfs that referenced this pull request Sep 3, 2025
- google/truth#1413
- google/auto#1900
- #401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802304800
copybara-service bot pushed a commit to google/truth that referenced this pull request Sep 3, 2025
- #1413
- google/auto#1900
- google/jimfs#401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802304800
copybara-service bot pushed a commit to google/auto that referenced this pull request Sep 3, 2025
- google/truth#1413
- #1900
- google/jimfs#401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802304800
copybara-service bot pushed a commit to google/jimfs that referenced this pull request Sep 3, 2025
- google/truth#1413
- google/auto#1900
- #401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802346694
copybara-service bot pushed a commit to google/truth that referenced this pull request Sep 3, 2025
- #1413
- google/auto#1900
- google/jimfs#401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802346694
copybara-service bot pushed a commit to google/auto that referenced this pull request Sep 3, 2025
- google/truth#1413
- #1900
- google/jimfs#401

Compare cl/460733976 from google/guava#6106. I notice that that earlier CL also added a `permissions` section for the `test` job, both for reading (for `actions/checkout`) and for writing (for `styfle/cancel-workflow-action`, which apparently [we probably shouldn't be using nowadays](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#:~:text=You%20probably%20don%27t%20need%20to%20install%20this%20custom%20action) and which [might not even need the explicit permissions](https://github.com/styfle/cancel-workflow-action/blob/main/README.md#advanced-token-permissions)?). I'm not worrying about that for now, but that offers further evidence that I have no idea what I'm doing here.

RELNOTES=n/a
PiperOrigin-RevId: 802346694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant