From d9386c68a93696d57334c5809d5480c1bf4d1224 Mon Sep 17 00:00:00 2001 From: Ashish Kurmi Date: Sun, 2 Oct 2022 13:23:26 -0700 Subject: [PATCH] ci: add minimum GitHub token permissions for workflows Signed-off-by: Ashish Kurmi --- .github/workflows/lock.yaml | 6 ++++++ .github/workflows/tests.yaml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index cd89f67c9d..b15b26c1a8 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -7,8 +7,14 @@ on: schedule: - cron: '0 0 * * *' +permissions: + contents: read + jobs: lock: + permissions: + issues: write # for dessant/lock-threads to lock issues + pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v3 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 674fb8b73b..1e888601a0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,6 +16,9 @@ on: - 'docs/**' - '*.md' - '*.rst' +permissions: + contents: read + jobs: tests: name: ${{ matrix.name }}