ci: Add GitHub token permissions for workflows

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>
master
Varun Sharma 2022-07-04 13:48:23 -07:00 committed by GitHub
parent 6a40de444b
commit d28102ad75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 0 deletions

View File

@ -840,6 +840,9 @@ env:
zstd
zydis
permissions:
contents: read
jobs:
autobump:
if: github.repository == 'Homebrew/homebrew-core'

View File

@ -13,6 +13,9 @@ concurrency:
env:
HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1
permissions:
contents: read
jobs:
autopublish:
if: github.repository == 'Homebrew/homebrew-core'

View File

@ -26,6 +26,9 @@ env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
permissions:
contents: read
jobs:
prepare:
runs-on: ubuntu-latest

View File

@ -18,6 +18,9 @@ env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
permissions:
contents: read
jobs:
upload:
runs-on: ${{github.event.inputs.self_hosted == 'true' && 'linux-self-hosted-1' || 'ubuntu-latest'}}

View File

@ -10,6 +10,9 @@ concurrency:
group: recreate-linux-runners
cancel-in-progress: true
permissions:
contents: read
jobs:
recreate:
if: github.repository == 'Homebrew/homebrew-core'

View File

@ -12,6 +12,9 @@ concurrency:
group: remove-disabled-formulae
cancel-in-progress: true
permissions:
contents: read
jobs:
remove-disabled-formulae:
if: startsWith(github.repository, 'Homebrew/')

View File

@ -16,6 +16,9 @@ concurrency:
group: "tests-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
tap_syntax:
if: github.repository == 'Homebrew/homebrew-core'
@ -40,6 +43,8 @@ jobs:
id: formulae-detect
setup_tests:
permissions:
pull-requests: read
if: github.event_name == 'pull_request' && github.repository == 'Homebrew/homebrew-core'
runs-on: ubuntu-latest
needs: tap_syntax

View File

@ -6,6 +6,9 @@ concurrency:
group: "triage-${{ github.event.number }}"
cancel-in-progress: true
permissions:
contents: read
jobs:
triage:
runs-on: ubuntu-latest