Skip to content

fix(ci): authenticate frozen source checkouts - #136949

Merged
RomneyDa merged 2 commits into
extended-stable/2026.6.33from
fix/extended-stable-ci-checkout-auth
Sep 7, 2026
Merged

RomneyDa merged 2 commits into
extended-stable/2026.6.33from
fix/extended-stable-ci-checkout-auth

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Repairs the frozen 2026.6.35 candidate CI checkout boundary after anonymous Git reads began failing. Every manual checkout/fetch of github.repository now passes the job token as a process-only, repository-scoped HTTP header; no credentials are saved to origin or Git config, and redirects are disabled. This also covers the shared shallow-base recovery action, so a distant PR base cannot reintroduce the unauthenticated transport.

The three frozen Testbox preparation workflows fetch trusted main after their candidate checkout. Their origin URLs now end in .git, exactly matching the URL-scoped header. Workflow Sanity's three manual source checkouts and its later trusted-base fetch use the same boundary. Release-target verification now uses the authenticated GitHub commit API for its historical tag and candidate branch identity, rather than anonymous git ls-remote.

security-fast now preserves the candidate's exact scanner versions (pre-commit 4.2.0, pre-commit-hooks 6.0.0, zizmor 1.22.0) while using local system hooks built from immutable base zizmor policy. This removes its remote Git-hook initialization and forces hook Git transport to file only. The external ClawHub checkout remains untouched: the candidate token is intentionally not lent to another repository. actions/checkout paths remain untouched.

Evidence

  • Frozen 659df810 preflight and security-fast jobs have contents: read but no authenticated Git transport at .github/workflows/ci.yml:139 and :457.
  • Candidate PR runs fix(deps): update fast-uri security patches #136721, fix(plugins): allow intentional uninstall size drops #136903, fix(mcp): require owner for Claude permission replies #136924, and fix(agents): neutralize Anthropic refusal marker replacement #136935 consistently exit 128 before source checkout: fatal: could not read Username for https://github.com.
  • This PR's first ARM Testbox run exposed the same second-hop path: job 100514638783 failed at the uncredentialed refs/heads/main fetch in ci-check-arm-testbox.yml.
  • Exact-head replay job 100518016507 proves source checkout and shared base recovery now pass, then separately fails only when pre-commit tries to clone https://github.com/pre-commit/pre-commit-hooks.
  • Candidate zizmor-pre-commit v1.22.0 declares its zizmor==1.22.0 package dependency, and pre-commit-hooks 6.0.0 exports the detect-private-key executable. The candidate-native local hooks preserve their file filters, exclusions, policy arguments, and pins.
  • Release target validation follows established main repair ea947e7891a using GH_TOKEN + the same-repository commit API; security-fast follows established main network-free scanner repair 1b535dd2f4f without pulling unrelated CI machinery.
  • Git URL matching is exact: the guard asserts each Testbox origin URL and authentication header use https://github.com/${CHECKOUT_REPO}.git.

Validation

  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts (33 passed)
  • actionlint on ci.yml, workflow-sanity.yml, and all three Testbox workflows
  • ./node_modules/.bin/oxfmt --check on changed workflow/action/test files
  • Git URL-match assertion with the exact .git origin key
  • git diff --check
  • autoreview --mode local --base origin/extended-stable/2026.6.33 (no accepted finding output)

The replacement exact-head CI re-exercises security-fast without relying on a third-party Git clone or forwarding the repository token beyond openclaw/openclaw.

Follow-up: release cache tag authentication

Commit f95d46e649c closes the remaining same-repository read identified by ClawSweeper. Resolve release dist cache seeds now receives the ephemeral GitHub token and applies the established process-only, repository-scoped Git header plus redirect policy to its git ls-remote --tags invocation. It never persists credentials on origin; private frozen candidates can resolve beta/latest tag cache keys rather than silently skipping them. The workflow guard now makes that cache lookup part of the authenticated-read contract.

Verification: node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts --reporter=dot (33 passed), actionlint .github/workflows/ci-build-artifacts-testbox.yml, formatting, and git diff --check passed. check-changed --dry-run selected tooling; its actual Testbox delegation is unavailable locally because pnpm attempts a non-TTY modules purge before dispatch. Commit autoreview was invoked for f95d46e649c.

Follow-up delta: workflow +9/-1; test +12/-0. The test fails on the prior head because the cache-seed step has neither its token environment nor the scoped ls-remote header.

Current merge gate

Exact-head CI now reaches the repaired manual checkout and base-recovery paths. Its remaining security-fast failure is solely the candidate's four [email protected] high advisories; #136721 supplies the targeted 4.1.4 lockfile/shrinkwrap repair. Merge #136949 first, then rerun #136721 and dependent candidate heads.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from 161efcb to 60dcea7 Compare September 3, 2026 03:47
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from 60dcea7 to 6e67cf0 Compare September 3, 2026 03:48
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review final head 6e67cf01b262ceddf34679adb81a34902b047c36 (same tree as prior review target; workflow-only auth repair)

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 2:20 AM ET / 06:20 UTC.

ClawSweeper review

What this changes

Authenticates frozen CI repository reads with temporary credentials and replaces remote security-hook initialization with locally installed, pinned scanners.

Merge readiness

✅ Ready for maintainer review

No blocking findings. The frozen release branch still needs this repair; all three earlier findings are addressed, and the supplied current checks show the former security-fast blocker passing. Maintainer-authored work remains protected from cleanup closure.

Priority: P1
Reviewed head: b0d0a4a93280b6a1b0f663fb3c4db5b67c470918

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, supported frozen-branch repair with prior findings resolved and no remaining blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Recorded checkout/base-recovery results and current successful CI checks support the changed workflow paths; no unresolved authority-boundary concern requires additional final-effect proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Recorded checkout/base-recovery results and current successful CI checks support the changed workflow paths; no unresolved authority-boundary concern requires additional final-effect proof.
Evidence reviewed 9 items Pinned patch and prior finding disposition: Inspected the introduced delta from a22c9fb to b0d0a4a. Testbox origins now match the .git credential scope, release identity checks use authenticated commit API reads, and release-cache tag lookup carries scoped authentication. Earlier f95d46e comparison was unavailable, so mechanical equivalence to that historical head is not independently asserted.
Credential and scanner boundaries: Read the checkout variants, shared base-fetch action, Testbox preparation, Workflow Sanity, scanner configuration, and check-shard fetch. Newly authenticated Git invocations scope headers to the repository and disable redirects without persisting credentials. security-fast uses exact-base PR policy and local system hooks; the separate ClawHub checkout receives no added token.
Regression coverage and current validation: The guards cover 18 manual CI source checkouts, Testbox URL equality, release API authentication, cache-tag authentication, and local scanner configuration. The maintainer reports 33 passing tests and actionlint after rebasing. Supplied current checks include successful preflight, security-fast, check-arm, build-artifacts, actionlint, and Windows tests. Independently ran diff whitespace validation; no tests or target code were executed.
Findings None None.
Security None None.

How this fits together

CI retrieves the selected source revision and comparison base before running checks and producing release artifacts. The changed workflows supply repository authentication and prepare the security scanners that inspect that source.

flowchart TD
  A[PR or release dispatch] --> B[Selected source revision]
  C[Read-only job token] --> D[Repository-scoped Git and API reads]
  B --> D
  D --> E[Source and comparison base]
  E --> F[Trusted scanner policy]
  F --> G[Security and workflow checks]
  E --> H[Test and build jobs]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +123, Config +130. Total +253 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 124 1 +123
Docs 0 0 0 0
Config 6 180 50 +130
Generated 0 0 0 0
Other 0 0 0 0
Total 7 304 51 +253

Review metrics

Metric Value Why it matters
Scanner execution contract 2 remote hooks replaced; 3 tool-version pins preserved Removes remote hook initialization while retaining the frozen candidate’s scanner baseline.

Technical review

Best possible solution:

Preserve the frozen branch’s checkout contracts and scanner versions while authenticating repository reads without leaving reusable credentials behind.

Do we have a high-confidence way to reproduce the issue?

Yes, for the frozen target: its unauthenticated Git reads match the recorded private-repository checkout failures. This review did not execute a reproduction or establish a current-main failure.

Is this the best way to solve the issue?

Yes, for this backport: it repairs the existing transport boundary and preserves scanner contracts without importing main’s broader CI redesign or persisting shared credentials.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7ab1c97cb7fe.

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P1: Repairs observed source-checkout failures blocking frozen release validation and dependent backport workflows.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Recorded checkout/base-recovery results and current successful CI checks support the changed workflow paths; no unresolved authority-boundary concern requires additional final-effect proof.

Evidence

What I checked:

  • Pinned patch and prior finding disposition: Inspected the introduced delta from a22c9fb to b0d0a4a. Testbox origins now match the .git credential scope, release identity checks use authenticated commit API reads, and release-cache tag lookup carries scoped authentication. Earlier f95d46e comparison was unavailable, so mechanical equivalence to that historical head is not independently asserted. (.github/workflows/ci-build-artifacts-testbox.yml:95, b0d0a4a93280)
  • Credential and scanner boundaries: Read the checkout variants, shared base-fetch action, Testbox preparation, Workflow Sanity, scanner configuration, and check-shard fetch. Newly authenticated Git invocations scope headers to the repository and disable redirects without persisting credentials. security-fast uses exact-base PR policy and local system hooks; the separate ClawHub checkout receives no added token. (.github/workflows/ci.yml:515, b0d0a4a93280)
  • Regression coverage and current validation: The guards cover 18 manual CI source checkouts, Testbox URL equality, release API authentication, cache-tag authentication, and local scanner configuration. The maintainer reports 33 passing tests and actionlint after rebasing. Supplied current checks include successful preflight, security-fast, check-arm, build-artifacts, actionlint, and Windows tests. Independently ran diff whitespace validation; no tests or target code were executed. (test/scripts/ci-workflow-guards.test.ts:371, b0d0a4a93280)
  • Current main versus frozen target: Current main retains authenticated release-reference API validation and local scanner preparation, with substantially newer surrounding CI machinery. This PR targets extended-stable/2026.6.33, whose pinned base lacks the introduced repair. The latest release object was unavailable locally, so no shipped-version equivalence is claimed. (.github/workflows/ci.yml:948, 7ab1c97cb7fe)
  • Related repair is merged and distinct: The supplied GitHub snapshot identifies fix(deps): update fast-uri security patches #136721 as the merged fast-uri dependency repair at the current pinned base. It resolves the historical dependency-audit failure, not the checkout-authentication defect. The latest maintainer comment explicitly confirms the rebase onto that merge. (a22c9fb41ed0)
  • Private-key scanner dependency contract: The patch directly installs pre-commit-hooks 6.0.0. Its package entry points export detect-private-key; its hook manifest applies that executable to text files, matching the replacement hook. (setup.cfg:47)

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-09-03T03:54:22.102Z sha 6e67cf01b262ceddf34679adb81a34902b047c36 :: blocked before merge. :: [P1] Match the Testbox header URL to its origin
  • reviewed 2026-09-03T04:04:11.171Z sha dc50286 :: blocked before merge. :: [P1] Authenticate release-target ls-remote checks
  • reviewed 2026-09-03T04:19:07.786Z sha 9d1c5f4 :: blocked before merge. :: [P1] Authenticate the release-cache tag lookup
  • reviewed 2026-09-03T04:35:51.618Z sha f95d46e :: blocked before merge. :: none
  • reviewed 2026-09-03T23:52:31.168Z sha f95d46e :: blocked before merge. :: none
  • reviewed 2026-09-07T06:14:55.232Z sha b0d0a4a :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from 6e67cf0 to dc50286 Compare September 3, 2026 03:57
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review exact head dc50286. Addressed P1: all three Testbox origins and header scopes now exactly use https://github.com/${CHECKOUT_REPO}.git; guard verifies that relation. Also covered shared shallow-base recovery and Workflow Sanity same-repo manual fetches.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 3, 2026
@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from dc50286 to e3645f7 Compare September 3, 2026 04:08
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review exact head e3645f791c2102d79d703f141488dc388e24ed31. Addressed P1: historical/candidate release identity uses authenticated same-repository commit API (GH_TOKEN), not anonymous git ls-remote; guard covers both. Existing Testbox URL/header equality correction remains.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from e3645f7 to 9d1c5f4 Compare September 3, 2026 04:10
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review exact head 9d1c5f4. Addressed P1 release ref lookup with established authenticated commit API. Also replaced the confirmed third-party public hook clone with candidate-native local system hooks preserving candidate scanner pins and trusted base policy; hook Git is file-only and no repo token leaves openclaw/openclaw.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head: f95d46e649c.

The release-cache tag lookup now has its own ephemeral, URL-scoped Git authentication invocation and redirects disabled; credentials are not persisted to origin. The CI workflow guard covers this ls-remote path. Focused guard test (33 passed), actionlint, format, and diff checks passed. Please review this exact head.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 3, 2026
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review exact current head; please confirm only current actionable findings and rank-up moves.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-ci-checkout-auth branch from f95d46e to b0d0a4a Compare September 7, 2026 06:08
@RomneyDa

RomneyDa commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Rebased mechanically onto extended-stable/2026.6.33 at a22c9fb after merged #136721; the checkout-auth patch is unchanged. Focused workflow guard (33/33), actionlint, and diff check passed.

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 7, 2026
@RomneyDa
RomneyDa merged commit 91b225e into extended-stable/2026.6.33 Sep 7, 2026
82 checks passed
@RomneyDa
RomneyDa deleted the fix/extended-stable-ci-checkout-auth branch September 7, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant