Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Workflows security hardening #9440

Closed
wants to merge 15 commits into from
Closed
6 changes: 6 additions & 0 deletions .github/workflows/close-needs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/close-stale-feature-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/close-stale-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch: ~
permissions:
contents: read
jobs:
GENERATE_MATRIX:
name: Generate Matrix
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
pull_request:
branches:
- '**'
permissions:
contents: read
jobs:
LINUX_X64:
strategy:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/remove-needs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down