Skip to content

Commit

Permalink
github: set top-level read-only workflow permissions (#6775)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnacht committed Nov 9, 2023
1 parent be1d1c1 commit eb46b7d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -8,16 +8,18 @@ on:

permissions:
contents: read
security-events: write
pull-requests: read
actions: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 30

permissions:
security-events: write
pull-requests: read
actions: read

strategy:
fail-fast: false

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage.yml
@@ -1,5 +1,9 @@
name: codecov
on: [push, pull_request]

permissions:
contents: read

jobs:
upload:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lock.yml
Expand Up @@ -6,12 +6,14 @@ on:
- cron: '22 1 * * *'

permissions:
issues: write
pull-requests: write
contents: read

jobs:
lock:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: dessant/lock-threads@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -4,6 +4,9 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
release:
permissions:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/stale.yml
Expand Up @@ -5,6 +5,9 @@ on:
schedule:
- cron: "44 */2 * * *"

permissions:
contents: read

jobs:
stale:
runs-on: ubuntu-latest
Expand Down

0 comments on commit eb46b7d

Please sign in to comment.