Skip to content

Commit

Permalink
build: minimize required github actions workflow permisson
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangalsterer committed Oct 24, 2023
1 parent d3f1628 commit 5f2c2f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
pull_request:
branches:
- 'main'

permissions:
contents: read

jobs:
ci:
strategy:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ permissions:

jobs:
pre_snyk:
permissions:
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
Expand All @@ -36,7 +34,6 @@ jobs:
needs: pre_snyk
if: ${{ needs.pre_snyk.outputs.any_changed == 'true' }}
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5f2c2f8

Please sign in to comment.