Skip to content

Commit

Permalink
Principle of least privilege for workflow tokens (#3360)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwille authored Jan 3, 2025
1 parent 045b08f commit 6215747
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-frontends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master, release/** ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-ilspy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ on:
pull_request:
branches: [ master, release/** ]

permissions:
contents: read

jobs:
Build:
permissions:
packages: write # for dotnet nuget push
runs-on: windows-2022
strategy:
fail-fast: false
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ on:
pull_request:
branches: [ master, release/** ]

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
security-events: write # for github/codeql-action/analyze to upload SARIF results

name: Analyze
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/generate-bom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Generate BOM
on:
workflow_dispatch:

permissions:
contents: read

jobs:
build:

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
lock:
permissions:
issues: write # for dessant/lock-threads to lock issues
runs-on: ubuntu-latest
steps:
- uses: dessant/[email protected]
Expand Down

0 comments on commit 6215747

Please sign in to comment.