Repository navigation
CI: Check every allow-list's DNS records - #384
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Scheduled discovery, artifact fan-in, and production Slack delivery require a maintainer-run post-merge test_notification dispatch because local mocks cannot verify these GitHub-hosted integrations.
No open issues 🎉
What changed in this PR
Addresses #383 by extending DNS validation to every harden-runner allow-list, including bot-specific lists, and checking proposed changes before merge.
Changes:
- Discovers lists per commit and checks them through a dynamic matrix at the default branch and latest distinct release.
- Adds pull request checks that fail on invalid records and warn on indeterminate results, without using secrets or sending Slack notifications.
- Collects scheduled/manual results through artifacts, reports incomplete checks, and updates documentation for discovery and notifications.
The scheduled Slack path still needs a manual test dispatch after merge.
| File | Description |
|---|---|
| README.md | Updates the workflow overview and Slack notification behavior. |
| .github/workflows/allow-list-dns-check.yaml | Adds discovery, matrix checks, artifact-based reporting, and isolated pull request runs. |
| .github/harden-runner/README.md | Documents allow-list naming rules and daily and pull request DNS coverage. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Antagonistic review by agent: 1 finding(s) for the human reviewer.
Discovery and the pull-request checks look sound, but scheduled/manual reruns can fail artifact uploads and report stale DNS results.
Antagonistic round 1 of 3. Revision requested from Code Monkey.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
The DNS check named two lists, each with its own pair of jobs, so the three bot agent lists went unchecked and every new list needed a workflow edit. A discovery job now treats every *.txt file under .github/harden-runner/ as a list, at the default branch and at the latest release when that is a different commit, and a dynamic matrix checks each with harden-runner-block-action in filter mode. Matrix outputs do not fan in, so each leg uploads its result as an artifact and the report compares them with the discovered lists. A failed discovery, no list at the default branch, a check that did not complete and a list with no result all report as failures. Summary and Slack carry one line per list and ref, named by its path below harden-runner/. The workflow also runs on pull requests that change a list or the workflow. It checks the lists at the head commit and fails on any record that does not resolve, warning only on records with no verdict. That path uses no secret or environment, posts nothing to Slack and checks nothing out. Discovered paths must match a strict pattern and reach scripts through env. Pull requests get their own concurrency group, so they never cancel the scheduled run. Review round 1: a re-run of a scheduled or dispatched run reuses the run ID, so a re-run leg's result artifact collided with the earlier attempt's and the report could read the stale result. The upload now sets overwrite, so a re-run leg replaces its result and legs not re-run keep theirs. Co-authored-by: Copilot <[email protected]> Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
c0930c3 to
fe26a18
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Validation remains incomplete because artifact fan-in and Slack reporting require a maintainer’s post-merge dispatch to verify all refs and lists, and neither that end-to-end evidence nor live PR-matrix results are available.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
The automatic list discovery, pull-request checks, and scheduled notification handling look sound in the reviewed diff. No actionable defects found.
Antagonistic round 2 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
eb5ed23
into
lfreleng-actions:main
Closes #383
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLIeb1180aebf52015b0ed180056f997d868877cda8uvx zizmor --persona auditor --offline .github/workflows/allow-list-dns-check.yamluvx gitlint --commits eb1180aebf52015b0ed180056f997d868877cda8..HEADgit log --raw --format=%h eb1180aebf52015b0ed180056f997d868877cda8..HEADprek run --files .github/harden-runner/README.md .github/workflows/allow-list-dns-check.yaml README.mdThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
Round 2 of revision, on its base.
Makes
.github/workflows/allow-list-dns-check.yamlfind its allow-lists itself (every*.txtunder.github/harden-runner/, at any depth), so the three bot agent lists are now checked and a new list needs no workflow edit. It also checks lists on pull requests that change a list or the workflow.What it does
discoverjob lists the allow-lists at the default branch, and again at the latest release when the release points at a different commit. A dynamic matrix then runsharden-runner-block-actioninfiltermode on each list, pinned to its commit. Each leg uploads its result as an artifact, because matrix outputs do not fan in. The report compares those results with the discovered lists. These count as failures in the summary and the Slack message: a failed discovery, no list at the default branch, a check that did not complete, and a list with no result. There is one line per list and ref, named by its path belowharden-runner/.pull_requestwith a paths filter. It checks the lists at the head commit and fails on records that definitively do not resolve. Indeterminate records only warn. This path uses no secret or environment, does not post to Slack, and checks nothing out. Discovered paths must match a strict pattern and reach scripts throughenv. Each pull request has its own concurrency group..github/harden-runner/README.mdandREADME.mdare updated.This round
No code change. The one open thread (result artifacts colliding on a re-run) was fixed in round 1:
Upload resultsetsoverwrite: true. I checked the fix again on this head and reviewed the whole workflow once more. I found nothing else to change.Checks run
prek run --fileson the three changed files: exit 0 (actionlint, yamllint, markdownlint, reuse, codespell and the others passed)zizmor --persona auditor --offlineon the workflow: exit 0, no findingsgitlinton the commit: exit 0Still to verify after merge
A fork pull request cannot trigger the schedule or dispatch paths. After merge, a maintainer should dispatch the workflow once with
test_notificationon. Confirm that all five lists appear in the summary and in the Slack message, at both the default branch and the latest release. This pull request's own Part 2 run shows the pull request path on its checks.