Skip to content

Commit

Permalink
Set github actions permissions
Browse files Browse the repository at this point in the history
As suggested by OpenSSF restrict actions permission as needed.
Our actions only need read access to checkout the repo.

Signed-off-by: Marcus Brandenburger <[email protected]>
  • Loading branch information
mbrandenburger committed May 16, 2024
1 parent 3ee9e20 commit 171d000
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
defaults:
run:
shell: bash
permissions: {}
permissions:
contents: read
jobs:
check-md-only:
name: This job was triggered
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
paths-ignore:
- '**.md'
- '.github/workflows/**'

permissions:
contents: read

env:
DOCKER_REGISTRY: 'ghcr.io'
PUSH_TO_MAIN: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand Down

0 comments on commit 171d000

Please sign in to comment.