Skip to content

Commit

Permalink
ci: add minimum GitHub token permissions for workflows (psf#6236)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
  • Loading branch information
ashishkurmi authored and matthewarmand committed May 10, 2023
1 parent 03de46e commit f95218d
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
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
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
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 f95218d

Please sign in to comment.