diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ff460e8197f..843e1e1a8e4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,8 +10,18 @@ on: paths-ignore: - 'docs/**' +permissions: + contents: read + jobs: analyse: + permissions: + # for github/codeql-action/init to get workflow details + actions: read + # for actions/checkout to fetch code + contents: read + # for github/codeql-action/analyze to upload SARIF results + security-events: write name: Analyse runs-on: ubuntu-20.04 if: ${{ github.actor != 'renovate[bot]' && github.actor != 'camperbot' }} diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 227b59d27e2..9d29a16e5ae 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -2,8 +2,16 @@ name: 'Pull Request Labeler' on: - pull_request_target +permissions: + contents: read + jobs: triage: + permissions: + # for actions/labeler to determine modified files + contents: read + # for actions/labeler to add labels to PRs + pull-requests: write runs-on: ubuntu-20.04 steps: - uses: actions/labeler@v4 diff --git a/.github/workflows/node.js-tests-upcoming.yml b/.github/workflows/node.js-tests-upcoming.yml index 8834b970277..4b6870bc5ee 100644 --- a/.github/workflows/node.js-tests-upcoming.yml +++ b/.github/workflows/node.js-tests-upcoming.yml @@ -9,6 +9,10 @@ on: # run this Action every 14 days - cron: '0 * */14 * *' workflow_dispatch: + +permissions: + contents: read + jobs: lint: name: Lint diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index 1fb3ea950bd..0733218d9d7 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -4,6 +4,10 @@ on: branches-ignore: - 'renovate/**' pull_request: + +permissions: + contents: read + jobs: lint: name: Lint