Repository navigation
feat(security): gate on CISA KEV and keep previous majors patched #66
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Rebuild previous majors (security maintenance) | ||
|
|
||
| # Scheduled workflows only run on the default branch, so the weekly crons in a | ||
| # release/vN branch never fire. This job starts the maintenance branch's own | ||
| # build chain instead: php-base and nginx there, and php-base dispatches its | ||
| # downstream images on the same branch when it finishes. | ||
| # | ||
| # Which majors are maintained, from which branch and until when, lives in | ||
| # versions.json under release.maintenance. | ||
| on: | ||
| schedule: | ||
| - cron: '17 3 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: maintain-previous-majors | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: write | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new workflow grants actions: write workflow-wide so it can dispatch builds on release branches. Not blocking, but the scope should be narrowed. Move There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Set top-level |
||
|
|
||
| jobs: | ||
| dispatch: | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Start each maintained branch's build chain | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| TODAY=$(date -u +%F) | ||
| jq -r --arg today "$TODAY" ' | ||
| .release as $r | ||
| | $r.maintenance // {} | to_entries[] | ||
| | select((.key as $k | $r.supported_majors | index($k)) and .value.until >= $today) | ||
| | .value.branch' versions.json | while read -r BRANCH; do | ||
| for WF in build-php-base.yml build-nginx.yml; do | ||
| if gh run list --workflow "$WF" --branch "$BRANCH" --limit 20 --json status \ | ||
| --jq 'any(.[]; .status != "completed")' | grep -q true; then | ||
| echo "$WF@$BRANCH already running; skipped" | ||
| continue | ||
| fi | ||
| gh workflow run "$WF" --ref "$BRANCH" | ||
| echo "Dispatched $WF@$BRANCH" | tee -a "$GITHUB_STEP_SUMMARY" | ||
| done | ||
| done | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kev-gate runs scripts/security-watch.py, but the job's sparse checkout (line 854) does not fetch that file. This blocks the merge.
Add
scripts/security-watch.pyto the sparse-checkout list in the 'Checkout versions.json, CVE baseline and smoke-test scenario' step.