diff --git a/.github/workflows/default_on_push.yml b/.github/workflows/default_on_push.yml index b390b3cd..5272fc22 100644 --- a/.github/workflows/default_on_push.yml +++ b/.github/workflows/default_on_push.yml @@ -14,6 +14,10 @@ on: tags: - '*.*.*' +permissions: + contents: read + packages: write + jobs: build-and-test-image: runs-on: ubuntu-20.04 diff --git a/.github/workflows/docs-preview-prepare.yml b/.github/workflows/docs-preview-prepare.yml index 975fb72f..003de47d 100644 --- a/.github/workflows/docs-preview-prepare.yml +++ b/.github/workflows/docs-preview-prepare.yml @@ -17,6 +17,9 @@ concurrency: # `pull_request` workflow is unreliable alone: Non-collaborator contributions lack access to secrets for security reasons. # A separate workflow (docs-preview-deploy.yml) handles the deploy after the potentially untrusted code is first run in this workflow. # See: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ +permissions: + contents: read + jobs: prepare-preview: name: 'Build Preview' diff --git a/.github/workflows/docs-production-deploy.yml b/.github/workflows/docs-production-deploy.yml index a1520f04..b32fa049 100644 --- a/.github/workflows/docs-production-deploy.yml +++ b/.github/workflows/docs-production-deploy.yml @@ -23,6 +23,8 @@ env: jobs: deploy: + permissions: + contents: write name: 'Deploy Docs' runs-on: ubuntu-20.04 steps: @@ -68,6 +70,8 @@ jobs: user_email: ${{ env.GIT_EMAIL }} add-version-to-docs: + permissions: + contents: write name: 'Update `versions.json` if necessary' runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/handle_stalled.yml b/.github/workflows/handle_stalled.yml index 2289a6e2..1972dc0d 100644 --- a/.github/workflows/handle_stalled.yml +++ b/.github/workflows/handle_stalled.yml @@ -4,8 +4,14 @@ on: schedule: - cron: "0 1 * * *" +permissions: + contents: read + jobs: stale: + permissions: + issues: write + pull-requests: write runs-on: ubuntu-20.04 steps: - name: Close stale issues diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index ca5501ef..bacf96b6 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,6 +7,9 @@ on: branches: - master +permissions: + contents: read + jobs: lint: runs-on: ubuntu-20.04 diff --git a/.github/workflows/scheduled_builds.yml b/.github/workflows/scheduled_builds.yml index c65aeecf..6f24a3cb 100644 --- a/.github/workflows/scheduled_builds.yml +++ b/.github/workflows/scheduled_builds.yml @@ -4,6 +4,9 @@ on: schedule: - cron: "0 0 * * 5" +permissions: + contents: read + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/test_merge_requests.yml b/.github/workflows/test_merge_requests.yml index ce493c0a..1612ba82 100644 --- a/.github/workflows/test_merge_requests.yml +++ b/.github/workflows/test_merge_requests.yml @@ -11,6 +11,9 @@ on: - 'Dockerfile' - 'setup.sh' +permissions: + contents: read + jobs: build-and-test: runs-on: ubuntu-20.04