Repository navigation
docs(issues): add issue specification for #2323 - #2335
josecelano merged 35 commits into
Conversation
Set related-pr to torrust#2335, tick the EPIC torrust#1840 sub-issue checkpoint, and log both in the progress log.
Set related-pr to torrust#2335, tick the EPIC torrust#1840 sub-issue checkpoint, and log both in the progress log.
913ebaf to
874f1a1
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical runner security and workflow reliability issues, plus documentation inconsistencies, remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (4)
What changed in this PR
This spec-only PR documents moving the Test (Docker) job to a Hetzner self-hosted runner under EPIC #1840.
Changes:
- Adds the issue specification, implementation plan, risks, and acceptance criteria.
- Records benchmarks, cost analysis, server setup, and runner installation.
- Links issue #2323 in the EPIC and updates the spellcheck dictionary.
| File | Description |
|---|---|
project-words.txt |
Adds Falkenstein. |
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/runner-server-setup.md |
Documents Hetzner server provisioning. |
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/runner-agent-installation.md |
Documents runner registration and verification. |
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/larger-runner-vs-self-hosted-cost-analysis.md |
Preserves the cost comparison. |
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/ISSUE.md |
Defines the plan, risks, scenarios, and acceptance criteria. |
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/benchmark-results.md |
Records workflow baseline measurements. |
docs/issues/open/1840-improve-pr-workflow-performance-epic/EPIC.md |
Adds issue #2323 as a subissue. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 874f1a1aeb494b0bc60e7809ae528bc8b1698c8e (round 1). Recomputed from the bytes at this head.
Three docs(issues) commits (fa99e831, b75bc68d, 874f1a1a) on the develop tip a39935ca, 7 files, +1127/−0. They add the folder-style spec for #2323 (ISSUE.md plus the baseline, the earlier cost analysis, and the server-setup and runner-agent logs), EPIC #1840 row 15 with a log line, and Falkenstein in the dictionary. The spec moves the container.yaml test job to a persistent self-hosted Hetzner runner. The runner is registered with label torrust-hetzner but no workflow uses it yet. Publishing stays on GitHub-hosted runners, and the workflow change is deferred to T5.
Security model and AC4. Several parts of the model hold at this head:
container.yamltriggers onpull_request, notpull_request_target.- The
testjob references no secret. - The Docker Hub credentials appear only in the publish jobs, through
dockerhub-torrust.
The accepted risk is where it fails. It describes the exposure as cache tampering on a host that holds no credentials. The setup the folder records, a persistent runner with runner in the docker group, gives any fork-PR job that reaches the label root-equivalent control of the host that survives into later jobs. That includes access to the runner registration and to later push jobs, which gate publishing (F1). On AC4, the spec offers timeout-minutes as the bound on queued jobs. It only bounds a running job, and the fallback is still Open Question 6 (F2).
Benchmark. The evidence holds the 30 most recent successful Container push runs on develop (2026-09-15 to 2026-09-24T08:41Z). Their Test (Docker) median is 2497.5 s (41.6 min), with a range of 26.0 to 51.0 min. The doc's 37 min median comes from 25 runs (22 pull_request, 3 push) between 2026-09-23 15:12 and 2026-09-24 08:41. The capture holds exactly those 3 push runs; the 22 PR runs are not in it. The different medians reflect different windows and events, not a contradiction:
- The three overlapping runs (2330 to 2681 s) sit inside the doc's range.
- The two runs the build table names (
35972579291,35976748146) match its build-step values to the second (2067 s, 2408 s). - The window's third run has E2E steps of 450 s, the doc's maximum.
The other numbers recompute: the minute conversions, 86%, compile 15.5 to 18.6 min, export 4.9 to 12.1 min, 4 of 6 third-party misses at 3.7 to 4.9 min, and the PR wall-clock table. The one-minute sentence does not (F3).
Findings
- F1 Major: the accepted security model understates the exposure.
- F2 Minor:
timeout-minutesis presented as a queue bound. - F3 Minor: "about one minute" does not recompute.
- F4 Minor: the recorded runner output cannot come from its command.
- F5 Nit: a stale "To be recorded in T2" cell.
F2 to F4 each put a false statement into the merged tree, so they block alongside F1.
Checked, no finding
- Copilot OPS-001, PERSISTENT-RUNNER-PRIVILEGE, DOC-002, DOC-001: all four hold on the merits. They are carried as F2, F1, F3 and F4; each finding says how.
- Frontmatter:
- fields and types match the template and the #2333 spec;
spec-pathis the file's own path,branchis the head ref, andrelated-pris 2335;- all seven
related-artifactsexist at head (the draft and the ADR included); last-updated-utc17:05 is not later than the last author time, 17:10:04Z.
- Section spine: every template section is present. The conditional Disposable Verification Scripts section is absent, as in #2333. Extras: Alternatives Considered, Post-Switch Scenarios, Open Questions.
- Cost analysis:
- the 2026-09-16 provenance note is present and all prices are dated;
- 4-core 378 × 22 × $0.012 = $99.8, 8-core $133.1 (doc ~$132), 16-core $206.4 (doc ~$208);
- the €/$ pairs are consistent at about 1.086;
- "about a third": €69.49 ≈ $75 against ~$200, i.e. 0.38.
- Setup logs:
- no address, password, key or token; the only dotted quad is the firewall's
0.0.0.0/0, a CIDR like::/0, not an address; - the
<runner-ip>and<TOKEN>conventions are stated; - the runner tarball's 64-hex SHA-256 is recorded, so "hash-verified" is shown rather than just claimed;
- the
config.sh/svc.shforms and the unit name are consistent; - the repository-level rationale matches across the PR body, ISSUE.md and the log.
- no address, password, key or token; the only dotted quad is the firewall's
- Background:
21017bb6is an ancestor of the base, and the three workflows are unchanged since. The 90-min timeout,paths-ignore, publish cache scopes and runner-load table matchcontainer.yamland the 12:22Z issue comment. - EPIC #1840: row 15 matches its siblings and the actor is "GitHub Copilot".
last-updated-utcwas not bumped, as with sibling edits since 2026-06-09. Falkensteinsits betweenErrnoandFreebox, matching the file's byte order.- Links and structure: 20 relative links resolve, with no fragments; tables are well-formed; no continuation line starts with
#. - Hygiene:
- three Conventional subjects, with author and committer times in order;
- no AI-attribution trailer (word-boundary grep of the commit messages): 0 hits;
- no banned token;
merge-treeis clean; the result tree equals the head tree.
Research triggered by Copilot finding F2 on PR torrust#2335: fork-PR code gains root through the docker group and can persistently compromise a self-hosted runner. Record why GitHub-hosted runners avoid this, why approval policies, CODEOWNERS, and rootless Docker do not bound the risk, how others isolate runners, and the alternatives (remote builder, GitHub larger runners, managed VM-isolated runners).
Set related-pr to torrust#2335, tick the EPIC torrust#1840 sub-issue checkpoint, and log both in the progress log.
Research triggered by Copilot finding F2 on PR torrust#2335: fork-PR code gains root through the docker group and can persistently compromise a self-hosted runner. Record why GitHub-hosted runners avoid this, why approval policies, CODEOWNERS, and rootless Docker do not bound the risk, how others isolate runners, and the alternatives (remote builder, GitHub larger runners, managed VM-isolated runners).
48bc2a6 to
5c4c685
Compare
Record the Copilot and reviewer findings from review round 1, their dispositions, current-tree verification, reply URLs, and the resolution of all nine threads.
Rerun the fixed audit validator, which now checks all nine rows including the Copilot findings that keep their reviewer-provided IDs.
Set related-pr to torrust#2335, tick the EPIC torrust#1840 sub-issue checkpoint, and log both in the progress log.
938a40f to
320d07c
Compare
Research triggered by Copilot finding F2 on PR torrust#2335: fork-PR code gains root through the docker group and can persistently compromise a self-hosted runner. Record why GitHub-hosted runners avoid this, why approval policies, CODEOWNERS, and rootless Docker do not bound the risk, how others isolate runners, and the alternatives (remote builder, GitHub larger runners, managed VM-isolated runners).
Record the Copilot and reviewer findings from review round 1, their dispositions, current-tree verification, reply URLs, and the resolution of all nine threads.
Rerun the fixed audit validator, which now checks all nine rows including the Copilot findings that keep their reviewer-provided IDs.
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 320d07c956d80e680a7b43ecbdd9f663754c61ad (round 2). Recomputed from the bytes at this head.
Since round 1. The branch was rebased onto the current develop tip dee5ec21 (merge-base dee5ec21; force-pushes at 07:38:40Z and 10:59:46Z). range-diff shows the three round-1 commits patch-identical. Eleven commits follow: five fixes (one per round-1 concern), the security research, the design-status pivot, the runner removal, the audit record, the validator fix and its re-run. 14 commits, 11 files, +1795/−6. 48bc2a60, the head the replies cite, is no longer on the branch.
Round-1 closure. All nine threads are closed on the merits at this head, each by the commit its reply names; all nine are resolved (GraphQL).
- OPS-001 / F2: closed.
timeout-minutes"bounds only execution time"; AC4, M5, T8, the single-point-of-failure risk and OQ6 require offline detection, alerting and a fallback; no sentence offers the timeout as a queue bound (c17e3543). - PERSISTENT-RUNNER-PRIVILEGE / F1: closed. The risk bullet is "(rejected)" and names each element of the exposure: root-equivalent persistent control through
docker, the readable registration, laterpush-job tokens, the fakeableneeds:gate, and themain/releases/**events. The status note puts T4 onward on hold (45b58066). The sections the note leaves unchanged now contradict the bullet (F7). - DOC-002 / F3: closed. 3.4–7.5 min, median 3.6, recomputes from 203/450/218 s. The remainder is 35–57 s in the three captured runs. Run
35972794173is in the file's tables but not in the captured job data, so its 59 s is unverifiable, though consistent with the file's 37 min and 1974 s (12d350f6). - DOC-001 / F4: closed. The query emits name,
.os, status,.busy | tostringand labels, joined by two spaces; the recorded line is a possible output (5e66f33b). - F5: closed. "Open (Open Question 1)" (
840a8935).
New material and status. The research states the approval-policy, CODEOWNERS and rootless-Docker limits correctly. Its GitHub-hosted isolation and public-repository billing statements agree with ISSUE.md. Two statements do not hold (F10, F11), and the ~200 USD estimate does not survive the folder's own baseline (F9). The newest status the tree states matches the #2323 comment of 09:18Z (runner stopped, then removed; server to be deleted), but several places still present the runner as registered and online (F6).
The audit record has one row and one detail entry per finding (9). Every source review ID and URL matches the review comments. Every resolution subject is in the range and touches its concern. The validator exits 0 (rows: 9, log_entries: 8, failures: 0). The verification fields cite the rewritten head, and the runner entry is stale (F8). The validator change is a legitimate ride-along under AGENTS.md "Commit history and PR scope": its own fix(pr-reviews) commit.
Findings
- F6 Minor: the runner is still presented as registered and online after its removal. Blocks.
- F7 Minor: the unchanged design sections still accept the risk the Risks bullet rejects. Does not block on its own; the status note scopes them.
- F8 Minor: the audit's verification cites a head that no longer exists, and the runner entry no longer reproduces. Blocks.
- F9 Minor: ~200 USD/month does not recompute from the baseline. Does not block; it is a labelled estimate.
- F10 Minor:
RUNsteps cannot reach the host Docker daemon, as alternative A in the same file says. Blocks. - F11 Nit: "even on ephemeral runners".
- F12 Suggestion: fail on unparsed Findings rows.
Checked, no finding
- Frontmatter:
spec-path,branchandrelated-pr2335 are unchanged; all sevenrelated-artifactsexist at head. - Links: 31 relative links and 1 fragment resolve; tables are well-formed.
- No address, hostname, token or key; the only dotted quad is the firewall's
0.0.0.0/0. No banned token. - Dictionary:
Falkensteinis in byte order; no other change. - Round-1 head to this head over the five files: every hunk traces to a reply or to the status and removal record. The cost analysis is byte-identical, and nothing on round 1's checked list regressed.
- Cost analysis arithmetic: 378 × 13 × 0.042 = 206.4; €69.49 ≈ $75 against ~$200 is 0.38.
container.yamlatdee5ec21triggers on pushes todevelop/main/releases/**/*and PRs todevelop/main, as the risk bullet says.- Validator:
FINDING_IDmatches all four reviewer IDs. Theprocess-pr-reviewlinked artifacts need no update. SKILL.md 1.2 → 1.3 describes the accepted ID forms. - Hygiene:
- 14 Conventional subjects, each with a body.
- Author times ascend; committer times are 09:30:04–09:30:14Z (the rebase).
- No AI-attribution trailer (word-boundary grep): 0 hits.
merge-treeis clean, and the result tree equals the head tree.
Add tracking rows and detail entries for reviewer findings F6 to F12 (review 5317648676), all fixed, with reply URLs, and a Processing Log entry. The validator reports 16 rows and no failures.
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 225f2656cdab8e2bf92926bfc13bab8ec5618ec7 (round 3). Recomputed from the bytes at this head.
Since round 2. The branch was rebased onto develop 0f1dcd28, and the merge-base is that tip. It was force-pushed at 12:03:10Z, then 225f2656 was pushed at 12:21Z. 26 commits, 11 files, +2139/−6. range-diff against 320d07c9 shows the 14 round-2 commits patch-identical. Twelve new commits follow: the reversal (106f007b, pushed while the PR was a draft), three T9/re-registration records, six round-2 fixes, the audit refresh, and the round-2 record. Over the PR's files, every hunk since round 2 traces to a reply, the reversal, or a control record.
Round-2 closure. 16 of 16 threads are resolved (GraphQL).
- F6: closed. Every runner-state statement is true at its own stamp. The newest (runner log step 8, T3, the research's "Current state (2026-09-26)") matches the captured runner list field by field:
torrust-runner-01, Linux, online, not busy, 2.337.0, the four labels. The Progress Log still has no removal line (F15). - F7: not closed; re-raised. The ISSUE.md sections round 2 listed now agree, but the research's Implications and the setup log still state the rejection.
- F8: closed. The template asks for
<COMMAND_OR_INSPECTION_AND_RESULT>with no SHA. The runner entry's values match the capture; the format does not (F17). - F9: closed. (546.5 + 218 + 60) s + 1089.5/4 s = 18.3 min; × 0.042 × 378 = $290, × 433 = $332. The 4 vCPU / 16 GB premise cites its source and date, and all four places agree.
- F10: closed. The host/build split matches
container.yaml: hadolintdocker run(71-76),contrib/(112) andcargo run(117-131) run on the host; the Buildx build is at 80 and 98-106. No compose file mounts the socket or runs privileged. - F11: closed (intro, 7-11).
- F12: closed (see the validator paragraph).
Reversal and controls.
- The captures confirm
approval_policy=all_external_contributors,two_factor_requirement_enabled= true, 4 filled seats ("all 4 members remain"), and the runner online and idle. - The tree only asserts two things: the 3 removed outside collaborators, and the 406/118/5 profile (source given as the GraphQL API by author association; no query).
- T5(c)-(e) and T8 are planned, not in place:
container.yamlis unchanged (runs-on: ubuntu-latest, 56), and no text claims otherwise. AC7, M7 and OQ7 agree. - The impact bound the controls claim does not follow from the spec's own premises (F13).
Status: last-updated-utc 10:48 falls between the newest log line (09:46) and the last ISSUE.md commit (11:12Z). No T-row is on hold. Checkpoint 369 matches T3, EPIC row 15 matches, and the newest #2323 comment (08:12Z) agrees with the tree.
Audit and validator. 16 rows and 16 detail entries. Every source review ID and URL matches its comment, and every resolution subject is in range and touches its concern. The 13 log stamps are ordered, and none is later than the commit that carries it.
- The validator, run from the head tree, exits 0:
rows: 16, log_entries: 13, failures: 0. - F12 exercise on scratch copies: a padded
| F13 |row, a lowercase| copilot-1 |row and a short| FIXED | RESOLVED |row each exit 1 with "Findings row does not parse as a tracking row". A full-width| FIXED |row exits 1 on "tracking rows and detail entries differ", becauseFIXEDmatches the ID pattern. 988d3bfais a legitimate ride-along under AGENTS.md "Commit history and PR scope": it has its ownfix(pr-reviews)commit. SKILL.md's failure list lags it (F18).
Findings
- F13 Major: an implant holding a
developpush job's cache token can write the publish jobs' cache scopes, so "at most fake a test result" does not hold. Blocks. - F7 Minor (re-raise): the research's Implications and the setup log still state the rejection. Does not block on its own.
- F14 Suggestion: route Dependabot by the PR author, not
github.actor. - F15 Nit: the Progress Log has no line for the runner removal.
- F16 Nit: AC5 dates the reversal 2026-09-24.
- F17 Nit: an audit verification line that neither form of its command produces.
- F18 Nit: SKILL.md's failure list omits the new check.
Checked, no finding
- Frontmatter,
spec-path,branch,related-pr; all related artifacts exist at head. - 42 relative links and 4 fragments resolve.
Falkensteinandcgbosseare in byte order; the file is sorted.- No address, server hostname, token or key. The only dotted quad is the firewall's
0.0.0.0/0. No banned token. - 26 Conventional subjects, each with a body. Author times ascend; committer times are 11:52:57-11:53:12Z (the rebase), then 12:21:10Z.
- AI-attribution trailer: none.
merge-treeis clean, and the result tree equals the head tree.- The cost analysis's provenance note flags the 2-core premise. No "200 USD" remains outside the dated Progress Log.
- The
process-pr-reviewskill-link:markers need no update.
Orchestrator's server checks. Gate of record at 225f2656c on the current develop base 0f1dcd287 (pre-commit profile + clippy-allow-reasons, nightly): passed, 72 s wall, ALLOW_RC 0, DIFF_CHECK_OK. Round-3 lane wall 823 s. Control captures used by the lane were taken at 2026-09-26T12:38Z from the repository and organisation APIs (fork-PR approval policy, 2FA requirement, runner list). CI at this head at 12:57Z: 14 success, 2 skipped, Test (Docker) (release) still in progress.
… cache The accepted security model claimed an implant on the persistent runner could at most fake a test result, because T5(c) removed only the publish jobs' container-release cache link. A GitHub cache scope is a key name, not a producer identity: an implant holding a later develop push job's cache token can write the publish jobs' own scopes, and develop is the default branch, so its entries are readable from main and releases/** too. Require the publish image builds to import and export no type=gha cache (T5(c), AC3, M3), correct the impact bound and the state-poisoning mitigation, and align the research Decision summary.
The research's Implications section and the server-setup log still stated the 2026-09-24 rejection as the standing conclusion. Scope the Implications to that position with a pointer to the 2026-09-25 Decision, and record the acceptance with controls in the setup log.
T5(d) selected Dependabot PRs by github.actor, which becomes the maintainer (or an agent with a maintainer's credentials) when they update a Dependabot branch from develop, a routine event here; the test job would then run Dependabot's dependency change on the self-hosted runner. Select by github.event.pull_request.user.login instead, which stays dependabot[bot] across later pushes, and add the maintainer-updated case to M7.
The Progress Log went from stopping the runner (2026-09-24) to re-registering it (2026-09-26) without recording the 2026-09-25 removal, which the status note, the T3 row, the installation log, and the audit all record. Add the entry.
AC5 asked the ADR to record 'the 2026-09-24 reversal', while every other place dates the reversal 2026-09-25 and ADRs to create also requires the 2026-09-24 rejection. Use the same wording as ADRs to create.
fix(pr-reviews): fail on unparsed audit Findings rows added two validator failures (an unparsed Findings data row, a missing Findings section) that the skill's 'It fails when:' list did not name. Add them so the skill and the script describe the same contract.
Log the round-3 design changes (publish builds without GitHub Actions cache; Dependabot routing by PR author) in the Progress Log and bump last-updated-utc.
… audit PERSISTENT-RUNNER-PRIVILEGE's verification quoted a three-field runner line that neither the bare gh api command (JSON) nor the recorded five-field query produces. Cite the query recorded in runner-agent-installation.md step 4 and quote its actual output, re-run on 2026-09-26.
Add tracking rows and detail entries for reviewer findings F13 to F18 and the F7 re-raise (recorded as F7-R3) from review 5325974064, all fixed, with reply URLs, and a Processing Log entry. The validator reports 23 rows and no failures.
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 973478fc9c3dc669041d9a6654f38d7bda8f5002 (round 4). Recomputed from the bytes at this head.
Since round 3. Nine commits on top of 225f2656 (an ancestor of this head); the merge-base is still 0f1dcd28. 35 commits, 11 files, +2283/−6 in total. Against round 3: 5 files, +163/−19. There are seven fixes (one per round-3 finding) and two record commits (the #2323 Progress Log and the PR #2335 audit). container.yaml is unchanged, so the F13 fix lives in the spec. Every hunk traces to a reply or a record commit.
Round-3 closure. Each reply names a commit in the delta, and each commit touches only its concern.
- F13: closed. T5(c) (320): "their image builds import and export no GitHub Actions (
type=gha) cache". AC3 (412-413): "notype=ghacache-from". M3 (447): "imports no GitHub Actions cache". The state-poisoning bullet namescontainer-publish-dev/container-publish-release(516-519). No cache scope is now both writable fromdevelopand read by a publish build, and the change is pinned by a task row and an AC. The bound's new premise opens F19. - F7 (re-raise): closed. research:344 "These implications follow from the 2026-09-24 position"; setup log 272-273 "then accepted with controls on 2026-09-25 (T9)".
- F14: closed. T5(d) routes on
github.event.pull_request.user.login == 'dependabot[bot]'; M7 (451) adds the maintainer-updated case. - F15: closed. The 2026-09-25 07:35 removal entry (397) sits between 06:23 and 16:18.
- F16: closed. AC5 (420): "the 2026-09-24 rejection and the 2026-09-25 reversal".
- F17: closed. The audit (113) quotes the five-field line the runner log's query prints; it matches the runner list recaptured at 13:45Z.
- F18: closed. SKILL.md 211-212 names both failures. On scratch copies, a padded row and a missing section each exit 1 with those messages.
Audit and validator.
- 23 tracking rows and 23 detail entries. The seven new ones are F13-F18 and the re-raise recorded as
F7-R3(RE_RAISE_OF:F7, reviewer ID F7). - Source review ID 5325974064 and the Source/Reply URLs match the comments. Severities match the brackets, and all 23 threads are resolved.
- Every resolution subject is in range and touches its concern. Every
Current-tree verificationstring reproduces at this head (whitespace-normalised).default_branch=developperpr.json. - 14 log stamps are ordered; the new 13:31 entry is carried by a commit authored at 13:32:11Z.
- The validator, run from the head tree, exits 0:
rows: 23, log_entries: 14, failures: 0.
Findings
- F19 Minor: the rewritten bound "an implant can at most fake test results" still does not follow from its own premise.
coverage.yamlrestores the same cache ondeveloppushes and holdsCODECOV_TOKEN. Blocks.
Checked, no finding
- The nine subjects are Conventional, each with a body. Author times do not decrease.
- AI-attribution trailer: none. No banned token.
- The only dotted quad is
0.0.0.0/0. merge-treeis clean, and the result tree equals the head tree.- 44 relative links and 5 fragments resolve.
project-words.txtis untouched. last-updated-utc13:24 equals the newest log line and is not later than its commit (13:25:49Z).- The recaptured approval policy, org 2FA and runner state are unchanged.
deployment.yamlanddeployment-packages.yamlrestore no cache, as the F13 reply says.
Orchestrator's server checks. Gate of record at 973478fc9 on the current develop base 0f1dcd287 (pre-commit profile + clippy-allow-reasons, nightly): passed, 71 s wall, ALLOW_RC 0, DIFF_CHECK_OK (round-3 head 225f2656c: same result). The delta since round 3 is documentation only, so no crate build was recomputed. F19 was recomputed independently against coverage.yaml on develop (push trigger on develop, sccache with the GitHub Actions backend, CODECOV_TOKEN in the same job) before posting. Round-3 lane wall 823 s, round-4 addendum 386 s. CI at this head at posting: success 14, skipped 2, in_progress 1.
| risk. | ||
|
|
||
| What a compromise can reach is limited by keeping publishing and releases on GitHub-hosted | ||
| runners whose image builds use no GitHub Actions cache (T5(c), T5(e)), so an implant can at most |
There was a problem hiding this comment.
[Minor][F19] "At most fake test results" still overreaches: other secret-holding jobs restore the same cache
The F13 fix is right for the publish builds. The bound (504-509) now rests on this premise: "an implant can use a later develop push job's cache token to write any cache scope, and develop is the default branch, so its entries are readable from every branch". Under that premise, every job that restores a GitHub Actions cache reads implant-writable entries, and T5(c) excludes only the publish image builds.
The job that breaks the bound. In coverage.yaml:
- it runs on pushes to
develop(8-10), in thecoverageenvironment (18); - it compiles through sccache with the GitHub Actions backend (38-46,
SCCACHE_GHA_ENABLED=true); - it passes
secrets.CODECOV_TOKENin the same job (66).
A poisoned sccache object for a build script, proc macro or test binary runs inside that job. The implant therefore reaches a repository secret, not only a test result.
Jobs that stay within the bound. testing.yaml (sccache GHA backend; type=gha at 209-210) and docs-lint.yaml (rust-cache) restore the same cache but hold no repository secret, so they stay within "fake test results".
Suggested fix.
- State this as a residual risk beside the AI-agent path ("… and run code in jobs that restore a GitHub Actions cache written from
develop, today the Coverage job and its Codecov token"). - Or extend T5 to take secret-holding jobs off the GitHub Actions cache, as T5(c) does for publishing.
This blocks because the security model states a limit that its own premise, one sentence later, does not give.
There was a problem hiding this comment.
Noting for the record: this thread is the one finding of round 4 and it is unresolved at the merged head 4fd1876cc (the dismissal message's "all findings addressed and threads resolved" was written for rounds 1–3). As the dismissal states, it carries to the implementation PR for #2323: the bound "an implant can at most fake test results" needs either the residual-risk sentence for coverage.yaml (sccache GHA backend + CODECOV_TOKEN in one job on develop pushes) or an extension of T5 to secret-holding jobs.
All findings from this review are addressed and their threads are resolved; see docs/pr-reviews/pr-2335-review/PR-REVIEW.md for the per-finding record. The blocking findings (round 2: F6, F8, F10; round 3: F13) are fixed in their own commits. Dismissing so this spec-only PR can merge in queue order and avoid repeated workflow runs. Further feedback is welcome and will be handled in the implementation PR.
|
ACK 973478f |
…ings 3e89461 docs(pr-reviews): record PR #2344 round 2 thread resolution (Jose Celano) b20eb55 docs(pr-reviews): record PR #2344 review round 2 (Jose Celano) 740f6ed docs(pr-reviews): make PR #2344 audit verifications reproducible at head (Jose Celano) 6123dea test(dev-tools): require exactly one skill fallback query block (Jose Celano) 5213cf1 docs(pr-reviews): bump process-pr-review to 1.4 for the post-merge changes (Jose Celano) b785bad docs(pr-reviews): record PR #2344 thread resolution (Jose Celano) fbd7c64 docs(pr-reviews): add PR #2344 review audit (Jose Celano) ddbe1ef docs(pr-reviews): use N/A for unreassigned reviewer IDs in PR #2339 audit (Jose Celano) c84e05b docs(issues): cite the #2333 evidence correction by its finding reference (Jose Celano) 5f3a7f3 docs(pr-reviews): point PR #2334 audit to the archived #2333 spec (Jose Celano) b56c04e docs(pr-reviews): cover post-merge follow-ups for PRs without an audit (Jose Celano) 777faf7 test(dev-tools): document fallback-query extraction and evidence-window intent (Jose Celano) 75fa474 docs(pr-reviews): add PR #2339 post-merge review audit (Jose Celano) c92d5b3 chore(issues): archive closed issue #2333 spec to docs/issues/closed (Jose Celano) 67496cd docs(pr-reviews): apply the post-merge workflow to findings unprocessed at merge (Jose Celano) 70e8821 docs(issues): record the exact #2333 evidence commands (Jose Celano) 79e827e test(dev-tools): pin review-thread query fields and explicit nulls (Jose Celano) Pull request description: ## Summary Post-merge follow-up for PR #2339 (#2333, EPIC #2278 order 4). PR #2339 merged with three non-blocking inline findings from review 5310586223 still unprocessed. The maintainer approved handling them here: <#2339 (comment)>. - **F1** (Suggestion): no test pinned that the live query requests `line` and `resolvedBy`, so a dropped field would read back as `null`, indistinguishable from GitHub's "unknown". A new test requires both fields at thread level next to `path`, and a second test requires the `fetch-review-threads` skill's fallback query to match the tool's query token for token, so AC1's parity no longer holds only by hand. - **F2** (Suggestion): the two explicit-null tests indexed a `serde_json::Value`, which also yields `Null` for a missing key. They now use `Value::get(...) == Some(&Value::Null)`. - **F3** (Nit): evidence steps V1-V4 omitted the pipes and `jq` filters that produced their observed blocks. They now record the commands exactly as run, with a dated correction note. Also in this PR: - `process-pr-review` (version 1.4; `develop` meanwhile used 1.3 for PR #2335's changes) now states that findings submitted before merge but unprocessed when the pull request merged follow the post-merge workflow. This PR is the first case of it. - #2333 closure bookkeeping: its spec is archived under `docs/issues/closed/`, and EPIC #2278 marks order 4 and AC2 `DONE`, completing Phase 1. - The PR #2339 audit record (`docs/pr-reviews/pr-2339-review/PR-REVIEW.md`) was added after the three #2339 threads received their follow-up replies, because its rows cite those reply URLs. ## Commits - `test(dev-tools): pin review-thread query fields and explicit nulls` (F1, F2) - `docs(issues): record the exact #2333 evidence commands` (F3) - `docs(pr-reviews): apply the post-merge workflow to findings unprocessed at merge` - `chore(issues): archive closed issue #2333 spec to docs/issues/closed` - `docs(pr-reviews): add PR #2339 post-merge review audit` Review round 1 of this PR (Copilot review 5325624421 and da2ce7 review 5325898273; audit `docs/pr-reviews/pr-2344-review/PR-REVIEW.md`): - `test(dev-tools): document fallback-query extraction and evidence-window intent` (audit F1, F2) - `docs(pr-reviews): cover post-merge follow-ups for PRs without an audit` (audit F3) - `docs(pr-reviews): point PR #2334 audit to the archived #2333 spec` (audit F4) - `docs(issues): cite the #2333 evidence correction by its finding reference` (audit F5) - `docs(pr-reviews): use N/A for unreassigned reviewer IDs in PR #2339 audit` (audit F6) - `docs(pr-reviews): add PR #2344 review audit` - `docs(pr-reviews): record PR #2344 thread resolution` After rebasing onto `develop` with PR #2335: - `docs(pr-reviews): bump process-pr-review to 1.4 for the post-merge changes` Review round 2 of this PR (da2ce7 reviews 5326065019 and 5326267066; audit F7-F9): - `test(dev-tools): require exactly one skill fallback query block` (audit F7) - `docs(pr-reviews): make PR #2344 audit verifications reproducible at head` (audit F8, F9) - `docs(pr-reviews): record PR #2344 review round 2` - `docs(pr-reviews): record PR #2344 round 2 thread resolution` ## Validation - `cargo test --package github-review-threads`: 15 unit (was 13) and 7 CLI tests pass on stable Rust 1.98.1; clippy with `-D warnings` and nightly `rustfmt --check` are clean. - Mutants run in the working tree and restored before committing: dropping `line` from the tool query fails the query-field and parity tests; dropping it from the skill fallback fails the parity test; adding `skip_serializing_if` to `ShownThread`'s `resolved_by` and `line` fails both explicit-null tests. - The corrected V1-V4 evidence steps, re-run verbatim against PR #2320, reproduced every recorded block. - The pre-commit hook (including `linter all`) passed on every commit; the pre-push hook passed. ## After merge The three PR #2339 threads stay open until this PR merges, then receive replies citing the merge and are resolved, and the PR #2339 audit rows move to `FIXED`. Related to #2333 Related to #2278 ACKs for top commit: josecelano: ACK 3e89461 Tree-SHA512: 4bfbcf39ca8b0af0c49dbec57f84e11350233bbd06f321aceb7c8c225c5e2caebc2ff6ccfd4dc3e635f9dae4b740f16800ecd734d88bda1d57b9326f48ab1013
… Hetzner runner 57053de docs(pr-reviews): record PR #2352 thread resolutions (Jose Celano) d34ef30 docs(pr-reviews): add PR #2352 review audit (Jose Celano) 4f22e84 ci(testing): branch docker-e2e routing on the event name (Jose Celano) 03f39a3 docs(issues): record #2323 code-change timing and end-to-end checks (Jose Celano) 70ca853 docs(ci): add the self-hosted runner setup and operations guide (Jose Celano) ed98446 docs(issues): record #2323 self-hosted runner timings (Jose Celano) 6b8074f docs(issues): record the first #2323 self-hosted run (Jose Celano) 9801934 docs(issues): record the #2323 runner OOM fix (Jose Celano) 72bd143 docs(issues): record the #2323 runner Docker prune timer (Jose Celano) 7d9ce41 docs(issues): record libssl-dev on the #2323 runner host (Jose Celano) 93f15b4 docs(adrs): cover Dependabot branch pushes in the runner ADR (Jose Celano) f523e8d ci(container): run the container test job on the Hetzner runner (Jose Celano) 2d1c199 docs(issues): align #2323 spec with the runner ADR (Jose Celano) 7082029 docs(adrs): add ADR for the self-hosted Hetzner container runner (Jose Celano) Pull request description: ## Summary Implementation PR for #2323 (EPIC #1840): run the `container.yaml` `Test (Docker)` job, and the `testing.yaml` `docker-e2e` job, on the persistent self-hosted Hetzner runner `torrust-runner-01`, under the controls agreed in the spec (#2335). Result so far: this PR's `Test (Docker)` job runs on the Hetzner runner in 14 min 31 s (partly warm) and 2 min 15 s (fully warm), against the 37-minute baseline median. ## What is included - **T4, ADR** `docs/adrs/20260926142648_adopt_self_hosted_hetzner_runner_for_container_tests.md`: cost rationale, the 2026-09-24 rejection and 2026-09-25 reversal with the contribution data, the six controls the decision depends on, runner layout, cache strategy, offline handling, revisit conditions, and alternatives. Registered in `docs/adrs/index.md`. - **Spec alignment** in `docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/ISSUE.md`: the seven open questions answered, `docker-e2e` added as T5(f), offline alerting replaced by queued-check visibility plus a manual fallback (AC4, M5), task and acceptance status, and the progress log. - **T5, workflow change set:** - `container.yaml` `test` runs on `[self-hosted, torrust-hetzner]` for PRs targeting `develop` and pushes to `develop` in `torrust/torrust-tracker`. Dependabot PRs (selected by PR author, not `github.actor`), PRs to `main`, pushes to `main` and `releases/**`, and runs in forks stay on `ubuntu-latest`. - On the self-hosted runner, jobs use the default `docker` Buildx driver (local layers and cache mounts), keep host-side Cargo builds in a persistent `CARGO_TARGET_DIR` outside the cleaned workspace, and write no GitHub Actions cache (no `type=gha`, `rust-cache`, or `sccache`). - `publish_development` and `publish_release` import and export no GitHub Actions cache, because a job holding a `develop` cache token could write any scope they read. - `testing.yaml` `docker-e2e` follows the same rules and also keeps pushes to `dependabot/` branches on `ubuntu-latest`, because those branches live in this repository and trigger it without approval. - **T6, first validation** (`manual-verification-evidence.md`, V1): the first run on the runner was killed by an out-of-memory condition (8 parallel `rustc` on 16 GB without swap), which also stopped the runner service. Fixed with a 16 GB swap file and a `Restart=on-failure` drop-in; the re-run passed. - **T7, timings** (`benchmark-results.md`): partly warm and fully warm runs on the same commit, with host cache and disk usage. - **T8, guide** `docs/self-hosted-runner.md`, listed in `docs/index.md`: which jobs use the runner, the security rules, the setup from an empty server to a registered runner, and operations (status checks, offline recovery and fallback, cache cleanup, agent updates, server rebuild). - **Server setup log** (`runner-server-setup.md`, steps 9 to 12): `libssl-dev`, the daily Docker prune timer, swap, and the restart drop-in. The two setup logs keep the history and point to the guide for the current procedure. ## Validation - `./contrib/dev-tools/git/hooks/pre-commit.sh` passed for every commit (includes `linter all`, `cargo machete`, and doc tests). - `actionlint` (official container image) reports no expression or type errors in the two changed workflows; its shellcheck notes are the same 10 that `develop` already has. - Hosted evidence: `Container` run 36298632207 on this PR, attempts 2 and 3, both on `torrust-runner-01`; the `Docker E2E` job was skipped as expected for a PR to `develop`. ## After merge These scenarios can only be verified after the merge or with later PRs, so this PR does not close #2323: - M2 and M3: the first `develop` push runs `test` on the runner, and the publish job builds with no GitHub Actions cache. - M4 and M6: timing of a PR that changes application code. - M7: a Dependabot PR runs on `ubuntu-latest`, also after a maintainer updates it from `develop`. - M5: the offline-runner scenario, at a quiet time. A final docs PR records that evidence and closes #2323. Related to #2323 ACKs for top commit: josecelano: ACK 57053de Tree-SHA512: 6c19ede2d563d7a22ff4dce35e8d658013208080aa3c1e7de09546e99620032f763b42d7c292f7b784e3101cdaa093fd7fff0ef683e4ebc1f72812f36a15c8a9
|
A finding from the 2026-09-26 recomputation of the friction register on #2003, re-checked at The audit record. The unrecorded round. The round-4 review 5326108018 was submitted at 13:54:39Z and dismissed at 14:06:46Z, with the same message as three earlier reviews. It is cited nowhere in the audit. The finding it raised. Its one finding, F19, disputes the bound at The applicable paragraph. An audit row for F19, recorded through that workflow, would reconcile the record. |


Status: persistent self-hosted runner, accepted with controls
This spec-only PR plans to run the
container.yamlTest (Docker)job on a persistent self-hosted runner on a Hetzner server. Copilot finding PERSISTENT-RUNNER-PRIVILEGE and reviewer finding F1 showed that fork-PR code running on such a runner gains root on the host through thedockergroup and can persistently compromise the runner, and a fork PR can reach any registered runner by adding its own workflow. On 2026-09-24 the maintainer ruled that unacceptable, researched alternatives, and removed the runner.On 2026-09-25, after reviewing the contribution profile with @cgbosse (last 12 months: 406 PRs from members, 118 from Dependabot, 5 from external contributors), the maintainers decided to keep the persistent runner and accept the exposure on the basis of likelihood, with controls on every path by which unreviewed code could reach the runner:
main, and pushes tomainandreleases/**stay on GitHub-hosted runners (T5);AI agents acting with a maintainer's credentials remain a residual path. GitHub larger runners stay the fallback. T9 was completed on 2026-09-26, and the runner was then registered again (T3); no workflow in
developtargets it yet.self-hosted-runner-security-research.mdrecords the research and the decision.What is included
docs/issues/open/2323-1840-hetzner-self-hosted-ci-runner/ISSUE.md: the specification, with a design-status note, background, cost comparison, scope, plan, post-switch scenarios, acceptance criteria, and risks.benchmark-results.md: T1 baseline from 25 recent successfulContainerruns and 6 job logs.Test (Docker)median 37 min; workspace compile 15.5-18.6 min; GitHub cache export 5-12 min per job; the repository cache is over its 10 GB allowance;Security Scan(28-29 min) is the next critical path when it runs. This baseline applies to any of the alternatives.self-hosted-runner-security-research.md: the security research described above.larger-runner-vs-self-hosted-cost-analysis.md: the earlier cost analysis (2026-09-16), with a provenance note. ISSUE.md derives the larger-runner cost from the T1 baseline instead (about 290 to 330 USD per month on a 16-core runner).runner-server-setup.mdandrunner-agent-installation.md: logs of the Hetzner server preparation and runner registration, including the stop, the removal, and the re-registration. No IP addresses or secrets are recorded.docs/pr-reviews/pr-2335-review/PR-REVIEW.md: review audit for this PR.docs/issues/open/1840-improve-pr-workflow-performance-epic/EPIC.md: subissue row 15 for Free Github Runner Bottleneck delays #2323.project-words.txt: addsFalkensteinandcgbosse..github/skills/dev/pr-reviews/process-pr-review/: the audit validator now checks reviewer-provided finding IDs such asOPS-001, which it silently skipped before, and fails on a Findings row it cannot parse.Review follow-up
Reviews are processed through the repository's
process-pr-reviewworkflow and recorded indocs/pr-reviews/pr-2335-review/PR-REVIEW.md. All 23 threads are replied to and resolved.Round 1 (Copilot review 5307823915 and reviewer review 5310557886):
Round 2 (reviewer review 5317648676):
Round 3 (reviewer review 5325974064):
developjob's cache token could write any cache scope, anddevelopentries are readable from every branch.github.actor.Validation
./contrib/dev-tools/git/hooks/pre-commit.shpassed for every commit (includeslinter all,cargo machete, and doc tests).Related to #2323