Repository navigation
Conversation
ModeSevenIndustrialSolutions
requested review from
a team
and
a balanced review from Copilot
October 8, 2026 10:37
ModeSevenIndustrialSolutions
marked this pull request as draft
October 8, 2026 11:12
ModeSevenIndustrialSolutions
force-pushed
the
fix/linting-uv-release-host
branch
from
October 8, 2026 11:13
b1b2d5a to
fb510c1
Compare
1 task
ModeSevenIndustrialSolutions
force-pushed
the
fix/linting-uv-release-host
branch
from
October 12, 2026 13:40
fb510c1 to
ee18225
Compare
harden_runner_egress: 'block' has never worked in this workflow. It passed its newline-separated harden_runner_allowed_endpoints input straight to harden-runner, whose agent splits allowed-endpoints on single spaces, so the whole list arrived as one malformed entry and every host outside the agent's implicit set was refused. Running the ci.skip self-test under 'block' showed it: setup-uv's manifest fetch from raw.githubusercontent.com was dropped although the list named the host, and the plan job failed before linting anything. Load the list as this repository's other reusable workflows do: harden-runner-block-action fetches the organisation allow-list, pinned by a new harden_runner_allowlist input to a commit of the '.github' repository, and publishes it space-separated. It also drops entries that do not resolve, which would otherwise make harden-runner abandon 'block' while reporting success. The organisation list already carries every host this workflow's own jobs reach, including releases.astral.sh, and harden-runner allows the Actions service and cache hosts itself. This removes harden_runner_allowed_endpoints. Its only consumer, tailscale-openstack-bastion-action, does not set it. The default egress policy stays 'audit'. The ci.skip self-test now runs under 'block', so the loader and the organisation list are proven on every pull request. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Move every other reusable workflow to the same pins the linting workflow now uses, so all of them load one organisation allow-list through one version of the loader. - The .github allow-list moves from v0.16.4 to v0.17.1, which adds the Codecov upload hosts (lfreleng-actions/.github#266), the Gradle checksum host and the Yarn Berry release host. The list only gained entries over that range. - harden-runner-block-action moves from v0.12.2 to v0.13.1. v0.13.0 adds 'invalid_records', whose default 'filter' drops entries that do not resolve; without it harden-runner abandons 'block' while still reporting success. v0.13.1 publishes step outputs from the main step. No caller here sets the newly reserved variable names or reads the action's outputs. - The README and autolabeler inputs tables named v0.16.0 as the default, which was already stale; they now name v0.17.1. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
fix/linting-uv-release-host
branch
from
October 12, 2026 13:43
ee18225 to
45f9b19
Compare
ModeSevenIndustrialSolutions
added a commit
to modeseven-lfreleng-actions/generic-workflows
that referenced
this pull request
Oct 12, 2026
Hooks declared 'language: system' run the project's own tools: cargo fmt and clippy need the toolchain rust-toolchain.toml pins, and eslint, prettier and tsc need the project's node_modules. Repositories list them under ci.skip because pre-commit.ci cannot prepare them, and this workflow could not either. standalone-linting-action v0.7.0 and v0.8.0 added that preparation. Move the executor pin from v0.6.0 to v0.8.0 and forward its five new inputs (rust_toolchain_setup, rust_components, node_setup, node_version, node_install_scripts) with the executor's defaults, so 'auto' prepares a project that tracks a Cargo.toml or package.json and leaves every other repository as it was. The plan job validates the values to the executor's own rules, so a typo fails once before any hook rather than once per lint job. The rules live in the input_rules region as verdict functions, which tests/test-locate-rules.sh extracts and drives with table fixtures (38 new cases, accepted and hostile forms alike). Two self-test jobs run fixture projects through the workflow with every toolchain input at its default, selecting each fixture's ci.skip hooks: - tests/fixtures/rust pins toolchain 1.90.0, minimal profile, and its cargo fmt / clippy hooks run with RUSTUP_AUTO_INSTALL=0, so they pass only when the executor installed that toolchain and the forwarded rustfmt and clippy components. - tests/fixtures/node pins prettier in its lockfile, and its hook runs 'npx --no-install prettier', so it passes only after the executor's frozen install. Egress is unchanged here: lfreleng-actions#65 moves block mode onto the organisation allow-list, which already carries the Rust, Yarn and Corepack hosts these steps reach. docs/linting.md gains a Project toolchains section, including the cost split_hooks multiplies (one install per lint job) and the timeout a large project may need. Copilot review: both findings addressed. The validation moved into the extracted region with permanent fixtures, and the fixture jobs demonstrate both preparation paths end to end. Closes: lfreleng-actions#66 Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Copilot review of this pull request raised: - Await the agent before the hardening verdict. harden-runner's pre-step polls for the agent's status file for about nine seconds, then succeeds whether or not the agent came up. With the organisation allow-list the agent can still be resolving entries when that window closes, so the gate failed 'block' jobs on runners about to be monitored. A new harden_runner_await, in both extracted harden_check copies, waits up to 60 seconds more on a GitHub-hosted runner where harden-runner wrote the agent's configuration. Without that configuration no agent is coming and the verdict is immediate. The comment claiming the pre-step blocks until the agent starts is corrected, and fixtures cover the wait, its bound and its skips. - Keep audit mode independent of the allow-list. The loader's pre phase fetches the list and validates it over DNS, so an outage failed default 'audit' calls that never use the list. A step 'if:' cannot skip a pre phase without 'pre-if', but continue-on-error covers it, so the loader is now fatal under 'block' alone. - Rephrase the self-test comment in linting-action.yaml as a clear conditional. - Pin a loader that filters unresolvable entries: addressed by the move to harden-runner-block-action v0.13.1 in the earlier commits. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
added a commit
to modeseven-lfreleng-actions/generic-workflows
that referenced
this pull request
Oct 12, 2026
Hooks declared 'language: system' run the project's own tools: cargo fmt and clippy need the toolchain rust-toolchain.toml pins, and eslint, prettier and tsc need the project's node_modules. Repositories list them under ci.skip because pre-commit.ci cannot prepare them, and this workflow could not either. standalone-linting-action v0.7.0 and v0.8.0 added that preparation. Move the executor pin from v0.6.0 to v0.8.0 and forward its five new inputs (rust_toolchain_setup, rust_components, node_setup, node_version, node_install_scripts) with the executor's defaults, so 'auto' prepares a project that tracks a Cargo.toml or package.json and leaves every other repository as it was. The plan job validates the values to the executor's own rules, so a typo fails once before any hook rather than once per lint job. The rules live in the input_rules region as verdict functions, which tests/test-locate-rules.sh extracts and drives with table fixtures (38 new cases, accepted and hostile forms alike). tests/test-lint-plan.sh adds a wiring check per input: declared with the executor's default, forwarded verbatim to the executor step, and handed to the plan job's validation. Two self-test jobs run fixture projects through the workflow with every toolchain input at its default, selecting each fixture's ci.skip hooks: - tests/fixtures/rust pins toolchain 1.90.0, minimal profile, and its cargo fmt / clippy hooks run with RUSTUP_AUTO_INSTALL=0, so they pass only when the executor installed that toolchain and the forwarded rustfmt and clippy components. - tests/fixtures/node pins prettier in its lockfile, and its hook runs 'npx --no-install prettier', so it passes only after the executor's frozen install. Egress is unchanged here: lfreleng-actions#65 moves block mode onto the organisation allow-list, which already carries the Rust, Yarn and Corepack hosts these steps reach. docs/linting.md gains a Project toolchains section, including the cost split_hooks multiplies (one install per lint job) and the timeout a large project may need. Copilot review: all findings addressed. The validation moved into the extracted region with permanent fixtures; the fixture jobs demonstrate both preparation paths end to end; and because the executor shares the workflow's defaults, so those jobs alone could not see a dropped forwarding line, the wiring check pins the executor's with: block directly. Closes: lfreleng-actions#66 Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
tykeal
approved these changes
Oct 14, 2026
ModeSevenIndustrialSolutions
added a commit
to modeseven-lfreleng-actions/generic-workflows
that referenced
this pull request
Oct 15, 2026
Hooks declared 'language: system' run the project's own tools: cargo fmt and clippy need the toolchain rust-toolchain.toml pins, and eslint, prettier and tsc need the project's node_modules. Repositories list them under ci.skip because pre-commit.ci cannot prepare them, and this workflow could not either. standalone-linting-action v0.7.0 and v0.8.0 added that preparation. Move the executor pin from v0.6.0 to v0.8.0 and forward its five new inputs (rust_toolchain_setup, rust_components, node_setup, node_version, node_install_scripts) with the executor's defaults, so 'auto' prepares a project that tracks a Cargo.toml or package.json and leaves every other repository as it was. The plan job validates the values to the executor's own rules, so a typo fails once before any hook rather than once per lint job. The rules live in the input_rules region as verdict functions, which tests/test-locate-rules.sh extracts and drives with table fixtures (38 new cases, accepted and hostile forms alike). tests/test-lint-plan.sh adds a wiring check per input: declared with the executor's default, forwarded verbatim to the executor step, and handed to the plan job's validation. Two self-test jobs run fixture projects through the workflow with every toolchain input at its default, selecting each fixture's ci.skip hooks: - tests/fixtures/rust pins toolchain 1.90.0, minimal profile, and its cargo fmt / clippy hooks run with RUSTUP_AUTO_INSTALL=0, so they pass only when the executor installed that toolchain and the forwarded rustfmt and clippy components. - tests/fixtures/node pins prettier in its lockfile, and its hook runs 'npx --no-install prettier', so it passes only after the executor's frozen install. Egress is unchanged here: lfreleng-actions#65 moved block mode onto the organisation allow-list, which already carries the Rust, Node.js and Yarn hosts these steps reach, including for the ci.skip self-test that now runs under 'block'. docs/linting.md gains a Project toolchains section, including the cost split_hooks multiplies (one install per lint job) and the timeout a large project may need. Copilot review: all findings addressed. The validation moved into the extracted region with permanent fixtures; the fixture jobs demonstrate both preparation paths end to end; and because the executor shares the workflow's defaults, so those jobs alone could not see a dropped forwarding line, the wiring check pins the executor's with: block directly. Closes: lfreleng-actions#66 Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
harden_runner_egress: 'block'has never worked in the reusable linting workflow.harden_runner_allowed_endpointsstraight to harden-runner. The agent splitsallowed-endpointson single spaces (config.go:strings.Split(allowedEndpoints, " ")), so the whole list arrived as one malformed entry.blockrefused every host outside the agent's implicit set.releases.astral.shto the default list and ran theci.skipself-test underblock. The plan job then failed atSet up uv: the manifest fetch fromraw.githubusercontent.comwas Dropped (per StepSecurity), although the list named that host. The runtime config showedallowed_endpointswith\nseparators.The missing
releases.astral.shwas real, but secondary.Changes
1.
Fix(linting): Load the org allow-list for blocklinting.yamlnow loads its list the way the other reusables here do (release, semantic-pull-request, autolabeler, clear-action-cache, release-drafter):harden-runner-block-actionstep (v0.13.1) runs before harden-runner in both the plan and lint jobs. It fetches the organisation allow-list in its pre hook and publishes it space-separated asCONNECTION_ALLOW_LIST. With its defaultinvalid_records: filter(new in v0.13.0), it also drops entries that don't resolve, which would otherwise make harden-runner abandonblockwhile still reporting success.harden_runner_allowlist: the same name andconfiggrammar the sibling reusables use. It defaults tolfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt, pinned by commit SHA to.githubv0.17.1, which includes the Codecov hosts from Fix(allow-list): Add Codecov upload hosts .github#266.strategy.job-index == 0), following the action's README.harden_runner_allowed_endpoints: this is a breaking interface change. Its only consumer, CI(lint): Run ci.skip hooks via reusable linting tailscale-openstack-bastion-action#108, doesn't set it.audit. Makingblockthe default, as the siblings do, would change behaviour for every caller and deserves its own decision.ci.skipjob runs underblock, so the loader and the organisation list are proven on every pull request.docs/linting.md(Runner section and inputs table) describes the new mechanism, and records why the old one failed.2.
Chore(actions): Bump harden-runner allow-list pinsMoves every other reusable workflow (autolabeler, clear-action-cache, release, release-drafter, semantic-pull-request) to the same pins, so all of them load one organisation list through one loader version:
.githubv0.16.4→v0.17.1. Over that range the list only gained entries: Codecov (Fix(allow-list): Add Codecov upload hosts .github#266), the Gradle checksum host and the Yarn Berry release host.harden-runner-block-actionv0.12.2→v0.13.1. This brings the unresolvable-entry filtering to the siblings too. No caller sets the newly reserved variable names (HARDEN_RUNNER_EGRESS_POLICY,GH_TELEMETRY) or reads the action's outputs, so the v0.13 changes need nothing else.docs/autolabeler.mdinputs tables named.githubv0.16.0as the default, which was already stale; they now namev0.17.1.3.
Fix(linting): Address Copilot review feedbackblockjobs on runners that were about to be monitored. This was seen intermittently on this PR'sci.skipself-test. A newharden_runner_await, in both extractedharden_checkcopies, waits up to 60 s more, but only on a GitHub-hosted runner where harden-runner wrote/home/agent/agent.json, which it does just before starting the agent. Runners with no agent coming (ubuntu-slim, containers, self-hosted) get their verdict immediately.continue-on-error: ${{ inputs.harden_runner_egress != 'block' }}, so a.githubor DNS outage can't fail defaultauditcalls, which don't use the list. A stepif:can't skip the loader'sprephase (nopre-if), butcontinue-on-errorcovers it. Underblocka load failure still stops the job.linting-action.yamlis reworded for clarity.Coverage of the organisation list
Every host the workflow's own jobs reached in StepSecurity data (#61's self-test, and the first consumer's run) is in the organisation list at
v0.17.1:releases.astral.sh,astral.sh, PyPI,raw.githubusercontent.com,github.comandapi.github.com. The hand-rolled list's remaining entries are covered by harden-runner's implicit set (agent.go:*.actions.githubusercontent.com,codeload.github.com,productionresultssa*.blob.core.windows.net) or by*.githubusercontent.comin the organisation list.Validation
tests/test-lint-plan.sh(175),tests/test-locate-rules.sh(112, including five newharden_runner_awaitfixtures) andtests/test-relax-matches.sh(52) all pass.actionlintpasses on the changed workflows.prekon the changed files,zizmor --persona auditor(online, all workflows; no new findings), the aislop gate (clean againstmain) andmarkdown-table-fixerall pass.Linting (self, ci.skip)jobs, which run the branch's own copy underblock. On pull requests, the semantic-pull-request and autolabeler self-tests exercise the new pins too; the release, release-drafter and clear-action-cache workflows only run on push or dispatch, so their pin bump is first exercised after merge.