-
Notifications
You must be signed in to change notification settings - Fork 25
ci: set minimum amount of permission needed for each workflow #54
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
Changes from 2 commits
a44fd20
6591d1f
75a98b8
ac0f4bf
09efccf
1aad873
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ jobs: | |
| golang: | ||
| name: Bump the Golang version | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: none # Permissions are set with an application token | ||
|
Comment on lines
+10
to
+11
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📣 The application token is included when needed, and it remains possible to start the job. We might have to wait for an actual update to confirm this though: https://github.com/slackapi/slack-cli/actions/runs/14578846863/job/40890875279
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 More notes on these permissions are included in the |
||
| steps: | ||
| - name: Gather credentials | ||
| id: credentials | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,8 @@ jobs: | |
| execute: | ||
| name: Start tests | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: none | ||
|
Comment on lines
+20
to
+21
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📣 Permissions are handled within CircleCI for this workflow: |
||
| steps: | ||
| - name: Trigger CircleCI 'local' workflow | ||
| if: ${{ github.event.inputs.status == 'false' }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ jobs: | |
| check-headers: | ||
| name: Check that license headers are in place | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
|
Comment on lines
+13
to
+14
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📣 This is enough to cause the https://github.com/slackapi/slack-cli/actions/runs/14578766377/job/40890636282?pr=54 |
||
| steps: | ||
| - uses: actions/checkout@v4.2.2 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,8 @@ jobs: | |
| config-sync: | ||
| name: Sync docs to docs site repo | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
Comment on lines
+20
to
+21
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📣 Checking out the repo is all that's required with the default token! An application token helps with other permissions. Testing after the changes of #52- |
||
| steps: | ||
| - name: Generate a GitHub token | ||
| id: ghtoken | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| changelog - a log of changes | ||
|
|
||
| 1. commit this file for testing a license workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📣 "write" contents are required to delete a release:
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token