Skip to content

Commit

Permalink
ci: add minimum GitHub token permissions for workflows (#6236)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Kurmi <[email protected]>
  • Loading branch information
ashishkurmi authored Jan 11, 2023
1 parent 2745db1 commit eb07385
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ on:
schedule:
- cron: '0 23 * * 0'

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
pull_request:

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-20.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Tests

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit eb07385

Please sign in to comment.