Merge pull request #12063 from Homebrew/workflow-permissions

workflows: reduce GITHUB_TOKEN permissions
This commit is contained in:
Bo Anderson 2021-09-16 15:15:55 +01:00 committed by GitHub
commit e3b760289f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 0 deletions

View File

@ -9,6 +9,8 @@ on:
release: release:
types: types:
- published - published
permissions:
contents: read
jobs: jobs:
ubuntu: ubuntu:
if: startsWith(github.repository, 'Homebrew/') if: startsWith(github.repository, 'Homebrew/')

View File

@ -8,6 +8,8 @@ on:
- Library/Homebrew/extend/os/diagnostic.rb - Library/Homebrew/extend/os/diagnostic.rb
- Library/Homebrew/extend/os/mac/diagnostic.rb - Library/Homebrew/extend/os/mac/diagnostic.rb
- Library/Homebrew/os/mac/xcode.rb - Library/Homebrew/os/mac/xcode.rb
permissions:
contents: read
env: env:
HOMEBREW_DEVELOPER: 1 HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1

View File

@ -10,6 +10,9 @@ on:
- cron: "0 0 * * *" - cron: "0 0 * * *"
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
tapioca: tapioca:
if: github.repository == 'Homebrew/brew' if: github.repository == 'Homebrew/brew'

View File

@ -7,6 +7,8 @@ on:
- master - master
schedule: schedule:
- cron: "0 0 * * *" - cron: "0 0 * * *"
permissions:
contents: read
jobs: jobs:
spdx: spdx:
if: github.repository == 'Homebrew/brew' if: github.repository == 'Homebrew/brew'

View File

@ -6,6 +6,9 @@ on:
- master - master
pull_request: pull_request:
permissions:
contents: read
env: env:
HOMEBREW_DEVELOPER: 1 HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1

View File

@ -12,6 +12,8 @@ on:
schedule: schedule:
- cron: "0 */3 * * *" # every 3 hours - cron: "0 */3 * * *" # every 3 hours
permissions:
concurrency: triage-${{ github.ref }} concurrency: triage-${{ github.ref }}
jobs: jobs:

View File

@ -18,6 +18,9 @@ on:
- cron: "0 0 * * *" - cron: "0 0 * * *"
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
update-manpage: update-manpage:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -8,6 +8,10 @@ on:
description: Pull request number description: Pull request number
required: true required: true
permissions:
contents: read
pull-requests: read
jobs: jobs:
vendor-gems: vendor-gems:
if: > if: >