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
4 changes: 4 additions & 0 deletions .github/workflows/close-needs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
schedule:
- cron: "0 0 * * *"

permissions: {} # none

jobs:
build:
if: github.repository_owner == 'php'
runs-on: ubuntu-latest
permissions:
issues: write
sashashura marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Close old issues that need feedback
uses: dwieeb/needs-reply@v2
Expand Down
5 changes: 5 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,15 @@ on:
schedule:
- cron: "0 0 * * *"

permissions: {} # none

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
5 changes: 5 additions & 0 deletions .github/workflows/close-stale-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ on:
schedule:
- cron: "0 0 * * *"

permissions: {} # none

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
5 changes: 5 additions & 0 deletions .github/workflows/remove-needs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ on:
types:
- created

permissions: {} # none

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