Harden GitHub Workflows security

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>

Closes GH-9440.
This commit is contained in:
Alex 2022-08-28 18:20:03 +02:00 committed by Christoph M. Becker
parent a1b23be6bf
commit 1d45ca58c8
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
6 changed files with 28 additions and 0 deletions

View file

@ -4,10 +4,16 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
build:
if: github.repository_owner == 'php'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Close old issues that need feedback
uses: dwieeb/needs-reply@v2

View file

@ -4,10 +4,16 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
stale:
if: github.repository_owner == 'php'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v4
with:

View file

@ -4,10 +4,16 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
stale:
if: github.repository_owner == 'php'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v4
with:

View file

@ -3,6 +3,8 @@ on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch: ~
permissions:
contents: read
jobs:
GENERATE_MATRIX:
name: Generate Matrix

View file

@ -17,6 +17,8 @@ on:
pull_request:
branches:
- '**'
permissions:
contents: read
jobs:
LINUX_X64:
strategy:

View file

@ -5,10 +5,16 @@ on:
types:
- created
permissions:
contents: read
jobs:
build:
if: "github.repository_owner == 'php' && contains(github.event.issue.labels.*.name, 'Status: Needs Feedback') && github.event.issue.user.login == github.event.sender.login"
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with: