Skip to content

Feat: Expose all harden-runner allow-list inputs - #187

Merged
ModeSevenIndustrialSolutions merged 4 commits into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-186
Nov 2, 2026
Merged

ModeSevenIndustrialSolutions merged 4 commits into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-186

Conversation

@lf-releng-code-monkey-bot

Copy link
Copy Markdown
Contributor

Closes #186

Authored by an AI agent; human review required
Command Exit
bash tests/test-harden-runner-inputs.sh 0
bash tests/test-harden-runner-inputs.sh <scratch copy with codeql extra_endpoints removed> 1
bash tests/test-harden-runner-inputs.sh <base zizmor.yaml> 1
prek run --files .github/workflows/{action-pin-audit,codeql,openssf-scorecard,package-hardening-audit,sonarqube-cloud,sonatype-lifecycle,zizmor}.yaml 0
prek run --files .pre-commit-config.yaml tests/test-harden-runner-inputs.sh .github/workflows/zizmor.yaml 0
prek run --files .github/workflows/testing.yaml 0
prek run --files README.md docs/BRIEF.md 0
uvx zizmor@1.31.1 --persona auditor --offline .github/workflows/ 0
bash tests/workflow-steps.sh 0
bash tests/python-warning-steps.sh 0
aislop scan --base 77e25ba7f074c3062c4848ea1e2e519b29b96982 --json . 0
git log --raw --format=%h 77e25ba7f074c3062c4848ea1e2e519b29b96982..HEAD 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; a maintainer must act on any finding that remains after that, and reviews every round before merge.


Gives every reusable workflow that loads its egress allow-list through lfreleng-actions/harden-runner-block-action the same five harden_runner_* inputs the other *-workflows repositories carry, and passes each one through on every block-action step. A caller can then merge its organisation's own supplemental list (for example ONAP's registry.nordix.org), follow that list unpinned when it lives in the caller's own organisation, or add inline endpoints for a short-lived fix.

Commits

  1. Feat: Expose all harden-runner allow-list inputs: adds harden_runner_supplemental_allowlist, harden_runner_supplemental_unpinned (boolean) and harden_runner_extra_endpoints directly after harden_runner_allowlist in action-pin-audit, codeql, openssf-scorecard, package-hardening-audit, sonarqube-cloud, sonatype-lifecycle and zizmor. The descriptions are copied word for word from rust-workflows. Every block-action step (8 in total; zizmor.yaml has two) now passes supplemental_config, supplemental_required, supplemental_unpinned and extra_endpoints in the reference form. Existing allow_list_summary lines are unchanged.
  2. Test: Add harden-runner input drift check: adds tests/test-harden-runner-inputs.sh as a byte-for-byte copy of the generic-workflows script (blob d40caed1, verified with git hash-object). It is a non-executable file, run by a new repo: local prek hook through bash.
  3. Test: Exercise allow-list inputs in self-test: passes the three new inputs on the zizmor-self leg of testing.yaml, which calls zizmor.yaml in block mode and goes through both of its block-action steps. testing.yaml runs on workflow_dispatch only, so this leg runs on dispatch, not on this pull request. The drift check is the check that runs on pull requests.
  4. Docs: Describe the egress allow-list inputs: adds an Egress allow-list section to README.md, linked from Usage, and lists all five inputs in docs/BRIEF.md's shared input vocabulary.

Left unchanged

Validation

  • bash tests/test-harden-runner-inputs.sh reports 7 workflow(s) expose and pass every input ✅ and Mutants of action-pin-audit.yaml caught: 15/15.
  • Mutation: I copied the workflows to a scratch directory, deleted extra_endpoints from codeql.yaml's block-action step, and ran the check on the copy. It exits 1 with jobs.analyze.steps[0] does not pass extra_endpoints and 1 problem(s) across 7 workflow(s) ❌. Run on zizmor.yaml as it is on the base commit, the check reports 11 problems and exits 1.
  • prek run --files <changed files> passes for every commit. That includes yamllint, actionlint, zizmor, check-jsonschema, gha-workflow-linter, markdownlint, write-good, reuse, shellcheck and the new drift-check hook.
  • zizmor --persona auditor --offline .github/workflows/ (v1.31.1) reports no findings.
  • bash tests/workflow-steps.sh (112 cases) and bash tests/python-warning-steps.sh (36 cases) pass.
  • aislop scan --base <base> returns an empty diagnostics array.

Points a reviewer may question

  • The three with: values on zizmor-self grant nothing new. lfreleng-actions// is the calling organisation, so it may stay unpinned, and it resolves to the organisation list the baseline already loads. github.com:443 is already on that list. I could not run the dispatched leg here.
  • The README's cross-organisation example uses the placeholder 'other-org//<path>@<commit-sha>' and not a real coordinate. It points to the block-action README for the grammar and does not restate it.
  • The drift check is a verbatim copy, so its style follows generic-workflows and not this repository. Any change to it belongs upstream first.
  • This repository has no .gitlint title-max-length, so subjects are kept to 50 characters.

lf-releng-code-monkey-bot Bot and others added 4 commits November 1, 2026 23:44
Give every reusable workflow that loads its egress allow-list through
harden-runner-block-action the three inputs it lacked:
harden_runner_supplemental_allowlist,
harden_runner_supplemental_unpinned and harden_runner_extra_endpoints.
Pass each through, with harden_runner_allowlist, on every block-action
step, in the form the other '*-workflows' repositories use.

A caller can then merge its organisation's own supplemental list,
follow that list unpinned when it lives in the caller's organisation,
or add inline endpoints for a short-lived fix. Naming a supplemental
list sets supplemental_required, so a missing list fails the job at
load time rather than at the first blocked connection.

The block-action pin is already v0.15.0 on main, so no pin moves here.
The openssf-scorecard scan job keeps its fixed list; only its summary
job loads the allow-list. Default egress policies and baseline
allow-list pins are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Add tests/test-harden-runner-inputs.sh, the check shared verbatim by
every '*-workflows' repository. For each workflow_call workflow with a
harden-runner-block-action step it fails when one of the five
harden_runner_* inputs is missing, mistyped or carries the wrong
default, when a block-action step omits a pass-through setting or
passes one in another form, or when the action is not pinned at
v0.15.0. It then mutates a copy of one clean workflow fifteen ways and
expects each mutant to fail, so it cannot pass vacuously.

The file is not executable; a local prek hook runs it through bash,
with PyYAML supplied by 'language: python', whenever a workflow or the
script changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Pass the three new harden-runner inputs on the zizmor-self leg of
testing.yaml, which calls zizmor.yaml in block mode, so a dispatched
run loads a supplemental list unpinned and an inline endpoint through
both of that lane's block-action steps.

Neither grants anything new: 'lfreleng-actions//' is the calling
organisation, so it may follow its default branch, and it resolves to
the organisation list the baseline already loads; github.com:443 is
already on that list, so the action reports it as redundant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Add an Egress allow-list section to the README, linked from Usage,
that describes the five harden_runner_* inputs once: an organisation
following its own supplemental list unpinned, a cross-organisation
list that must be pinned, the job failure a missing named list causes,
inline endpoints as a short-term fix, and the supplemental_source and
supplemental_sha outputs as the audit trail for an unpinned list.

List all five inputs in docs/BRIEF.md's shared input vocabulary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Dependamerge
Approved this pull request ✅

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 00448bc into lfreleng-actions:main Nov 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Expose all harden-runner allow-list inputs

1 participant