Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0db76a4
CI: use pull_request_target so review-checklist runs on fork PRs
brtnfld Jun 6, 2026
e83156d
CI: replace pull_request_target with safe two-workflow pattern for fo…
brtnfld Jun 8, 2026
70a1a1b
review-checklist: fix prAuthor crash and stale comment for workflow_r…
brtnfld Jun 8, 2026
32c43d0
CI: revert to pull_request_target, drop two-workflow pattern
brtnfld Jun 8, 2026
4f0d6ba
CI: add zizmor workflow for GitHub Actions security analysis
brtnfld Jun 8, 2026
f841e32
CI: run zizmor via pip instead of third-party action
brtnfld Jun 8, 2026
8add688
CI: fix codeql-action pin to commit SHA (was tag object SHA)
brtnfld Jun 8, 2026
29d99d6
CI: add persist-credentials: false to review-checklist checkout
brtnfld Jun 8, 2026
2199d6f
CI: hash-pin zizmor pip install; suppress expected pull-request-targe…
brtnfld Jun 8, 2026
af25267
CI: update actions to Node.js 24 ahead of June 16 deprecation
brtnfld Jun 8, 2026
5a20031
CI: fix pip hash-pinning syntax — hash must be in requirements file
brtnfld Jun 8, 2026
219303b
CI: zizmor step continue-on-error so SARIF upload always runs
brtnfld Jun 8, 2026
4d7ddc5
review-checklist: skip pull_request_review on fork PRs (read-only token)
brtnfld Jun 8, 2026
82e2541
review-checklist: route reviews through workflow_run for fork PR support
brtnfld Jun 8, 2026
d08bb8a
review-checklist: simplify to pull_request_target only, drop gather w…
brtnfld Jun 8, 2026
492721e
review-checklist: auto-check approval boxes on review via workflow_run
brtnfld Jun 9, 2026
2da8bc9
Merge branch 'develop' into fix/review-checklist-fork-prs
hyoklee Jun 9, 2026
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
4 changes: 0 additions & 4 deletions .github/scripts/review-checklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ module.exports = async function run({ github, context, core }) {
// Covers: hdf5.h (umbrella), H5*public.h / H5*develop.h (per-module),
// VFD driver headers included by hdf5.h, and VOL connector headers.
//
// NOTE: Fork PRs (head.repo != base.repo) are intentionally excluded.
// They run with a read-only token and cannot post comments or request
// reviewers. Fork coverage would require a pull_request_target job.
//
// NOTE: Team owners (@org/team) in CODEOWNERS are not supported.
// Only individual GitHub logins are handled. If teams are added,
// extend parsing and reviewer requests to use team_reviewers.
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/review-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ name: Review Checklist
#
# Reviewer lists are derived entirely from .github/CODEOWNERS — no duplication.
# To add an area or change owners, edit only CODEOWNERS.
#
# Uses pull_request_target so the workflow runs with the base repo's full token
# even for fork PRs. The checkout and script execution always use the base
# branch (develop), never the fork's code — this is the safe posture for
# pull_request_target.

on:
pull_request:
pull_request_target:
types: [opened, synchronize, reopened]
branches: [develop]
pull_request_review:
Expand All @@ -25,12 +30,13 @@ permissions:
jobs:
checklist:
runs-on: ubuntu-latest
# Only run on PRs targeting develop from within the same repo (not forks).
# For review events, only run on approvals targeting develop.
# Run on all PRs targeting develop, including those from forks.
# pull_request_target always executes this workflow from the base repo
# (HDFGroup/hdf5) with a full write token — it never runs code from the
# fork. For review events, only run on approvals targeting develop.
if: |
github.event.pull_request.base.ref == 'develop' &&
github.event.pull_request.head.repo.full_name == github.repository &&
(github.event_name == 'pull_request' ||
(github.event_name == 'pull_request_target' ||
(github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'))

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: zizmor

# Static security analysis for GitHub Actions workflows.
# Findings appear as inline annotations on PRs and in the Security tab.
# Runs zizmor directly via pip to avoid a third-party action dependency.

on:
push:
branches: [develop]
paths: ['.github/**']
pull_request:
branches: [develop]
paths: ['.github/**']

permissions: {}

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:

Check warning

Code scanning / zizmor

action's hash pin has mismatched or missing version comment: points to commit 34e114876b0b Warning

action's hash pin has mismatched or missing version comment: points to commit 34e114876b0b
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
persist-credentials: false
- run: pip install zizmor==1.25.2
- run: zizmor --format sarif . > zizmor-results.sarif
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: github/codeql-action/upload-sarif@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
if: always()
with:
sarif_file: zizmor-results.sarif
category: zizmor
Loading