Skip to content

Commit

Permalink
chore(ci): Add permissions to some workflows/jobs (#11393)
Browse files Browse the repository at this point in the history
We should work towards ensuring we have the minimum permissions running
for the workflows we execute.

It is difficult to find good documentation on exactly what permissions
are required.
  • Loading branch information
Josh-Walker-GM authored Aug 29, 2024
1 parent 1aebcc3 commit bf709ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
security-events: write

jobs:
analyze:
name: 🔬 Analyze
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/require-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# No top level permissions are required for this workflow
permissions: {}

jobs:
require-milestone:
name: 🚩 Require milestone
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/require-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# No top level permissions are required for this workflow
permissions: {}

jobs:
require-release-label:
name: 🏷 Require release label
runs-on: ubuntu-latest
permissions:
issues: read
pull-requests: read
steps:
- uses: mheap/github-action-required-labels@v5
with:
Expand Down

0 comments on commit bf709ab

Please sign in to comment.