Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/workflows/claude-org-wide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issue_comment:
types: [created]

permissions:
contents: read

jobs:
check-trigger:
name: "Check trigger phrase and eligibility"
Expand All @@ -13,6 +16,11 @@ jobs:
outputs:
triggered: ${{ steps.check.outputs.triggered }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "Check for trigger phrase"
id: check
env:
Expand All @@ -33,6 +41,11 @@ jobs:
outputs:
repos: ${{ steps.list.outputs.repos }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "List all public repositories in the organization"
id: list
env:
Expand Down Expand Up @@ -66,6 +79,11 @@ jobs:
- repo: phpstan/vim-phpstan
- repo: phpstan/.github
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "Get default branch of target repository"
id: default-branch
env:
Expand All @@ -75,7 +93,7 @@ jobs:
echo "branch=$default_branch" >> "$GITHUB_OUTPUT"

- name: "Checkout target repository"
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
repository: ${{ matrix.repo }}
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}
Expand All @@ -93,7 +111,7 @@ jobs:
echo "${delimiter}" >> "$GITHUB_OUTPUT"

- name: "Run Claude Code on repository"
uses: anthropics/claude-code-action@v1
uses: anthropics/claude-code-action@35a9e0292d36f1186f5d842b14eb575074e8b450 # v1.0.57
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: "--model claude-opus-4-6"
Expand Down Expand Up @@ -141,7 +159,7 @@ jobs:

- name: "Upload PR URL artifact"
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pr-url-${{ steps.repo-name.outputs.sanitized }}
path: /tmp/pr-url.txt
Expand All @@ -154,8 +172,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "Download all PR URL artifacts"
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: pr-url-*
path: pr-urls
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/claude-react-on-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: claude-pr-reactions-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: false

permissions:
contents: read

jobs:
check-trigger:
name: "Check trigger phrase"
Expand All @@ -22,6 +25,11 @@ jobs:
outputs:
triggered: ${{ steps.check.outputs.triggered }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "Check for trigger phrase"
id: check
env:
Expand All @@ -45,11 +53,16 @@ jobs:
pull-requests: write

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: "Checkout"
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: "React to feedback"
uses: anthropics/claude-code-action@v1
uses: anthropics/claude-code-action@35a9e0292d36f1186f5d842b14eb575074e8b450 # v1.0.57
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
trigger_phrase: "@phpstan-bot"
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts
- name: Check workflow files
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
Expand All @@ -29,15 +34,20 @@
security-events: write # Required for codeql-action/upload-sarif to upload SARIF files.
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts
- name: Run octoscan
id: octoscan
uses: synacktiv/action-octoscan@v1
uses: synacktiv/action-octoscan@6b1cf2343893dfb9e5f75652388bd2dc83f456b0 # v1.0.0
with:
filter_triggers: ''

- name: Upload SARIF file to GitHub
uses: github/codeql-action/upload-sarif@v4
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
with:
sarif_file: "${{steps.octoscan.outputs.sarif_output}}"
category: octoscan
Expand All @@ -49,16 +59,21 @@
permissions:
security-events: write # Required for codeql-action/upload-sarif to upload SARIF files.
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run Poutine
uses: boostsecurityio/poutine-action@v0.15.2
uses: boostsecurityio/poutine-action@84c0a0d32e8d57ae12651222be1eb15351429228 # v0.15.2

- name: Upload poutine SARIF file
uses: github/codeql-action/upload-sarif@v4
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
with:
sarif_file: results.sarif
category: poutine
Expand All @@ -70,13 +85,18 @@
permissions:
security-events: write # Required for codeql-action/upload-sarif to upload SARIF files.
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7.3.0
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
enable-cache: false

Expand All @@ -86,7 +106,7 @@
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v4.31.9
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
with:
sarif_file: results.sarif
category: zizmor
Expand Down
Loading