Skip to content

Commit

Permalink
ci: add minimum GitHub token permissions for workflows
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 julianlam committed Oct 6, 2022
1 parent 177d904 commit fe0020f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ defaults:
run:
shell: bash

permissions:
contents: read

jobs:
test:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
name: Lint and test
strategy:
fail-fast: false
Expand Down Expand Up @@ -194,6 +200,8 @@ jobs:
parallel: true

finish:
permissions:
checks: write # for coverallsapp/github-action to create new checks
needs: test
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit fe0020f

Please sign in to comment.