Locks down permissions to the job level with least privledge we can get away with

This commit is contained in:
Trenton H
2026-02-13 08:44:27 -08:00
parent 8db1c4e08b
commit 6b3e36eee6
13 changed files with 73 additions and 13 deletions

View File

@@ -7,13 +7,14 @@ on:
branches:
- main
- dev
permissions:
contents: read
permissions: {}
jobs:
pr_opened_or_reopened:
name: pr_opened_or_reopened
runs-on: ubuntu-24.04
permissions:
# release-drafter reads its config file from the repo
contents: read
# write permission is required for autolabeler
pull-requests: write
if: github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request.user.login != 'dependabot'