Skip to content

CI: Check every allow-list's DNS records - #384

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-383
Nov 23, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-383

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #383

Authored by an AI agent; human review required
Command Exit
uvx zizmor --persona auditor --offline .github/workflows/allow-list-dns-check.yaml 0
uvx gitlint --commits eb1180aebf52015b0ed180056f997d868877cda8..HEAD 0
git log --raw --format=%h eb1180aebf52015b0ed180056f997d868877cda8..HEAD 0
prek run --files .github/harden-runner/README.md .github/workflows/allow-list-dns-check.yaml README.md 0

The github-code-monkey-bot workflow 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.yaml find its allow-lists itself (every *.txt under .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

  • Daily and by dispatch: a discover job 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 runs harden-runner-block-action in filter mode 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 below harden-runner/.
  • Pull requests: pull_request with 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 through env. Each pull request has its own concurrency group.
  • Docs: the workflow header, .github/harden-runner/README.md and README.md are updated.

This round

No code change. The one open thread (result artifacts colliding on a re-run) was fixed in round 1: Upload result sets overwrite: 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 --files on the three changed files: exit 0 (actionlint, yamllint, markdownlint, reuse, codespell and the others passed)
  • zizmor --persona auditor --offline on the workflow: exit 0, no findings
  • gitlint on the commit: exit 0

Still 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_notification on. 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The fork PR cannot validate scheduled/dispatch artifact aggregation or production Slack notifications, leaving complete list/ref coverage dependent on maintainer verification after merge.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit eb5ed23 into lfreleng-actions:main Nov 23, 2026
39 of 41 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-383 branch November 23, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI and tests updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Check every allow-list's DNS records

2 participants