Repository navigation
fix(ci): fetch security scan history during authenticated checkout - #136232
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 6:27 AM ET / 10:27 UTC. ClawSweeper reviewWhat this changesThe PR makes the security workflow obtain a pull request’s full scan history during authenticated checkout, then removes the redundant post-cleanup fetch and updates its tests and fixtures. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this maintainer-owned, protected PR open. No branch-introduced correctness defect was found; the final head still needs its normal hosted workflow completion, and the pinned checkout action contract could not be independently retrieved in this review environment. Priority: P2 Review scores
Verification
How this fits togetherThe security-fast GitHub Actions job prepares a Git history range for TruffleHog before scanning a pull request. Checkout fetches the range while temporary authentication is available, then the scanner consumes it after credentials are removed. flowchart LR
A[Pull request event] --> B[Calculate scan depth]
B --> C[Authenticated checkout]
C --> D[Credentials removed]
D --> E[Resolve scan base]
E --> F[TruffleHog scan]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +102, Config -2. Total +100 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the single checkout-owned history path once the exact-head security workflow confirms that the pinned action fetches the required range before credential cleanup. Do we have a high-confidence way to reproduce the issue? Yes: the checked-in guard constructs a synthetic pull-request merge and demonstrates that depth two lacks the required range while the calculated depth includes it. Is this the best way to solve the issue? Yes, with one remaining external-contract check: moving the existing bounded fetch into checkout is the clean owner-boundary repair, but hosted CI should confirm the pinned action’s actual lifecycle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2a8e760b020a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Release triage on The remaining Node failure in CI attempt 1 is a sibling-fixture migration: The separate UI shard failure is at |
|
The next exact-head failure is a different Git bootstrap boundary. On The earlier UI failure is now reproduced intermittently on unchanged |
|
Merged via squash.
|
Reuse the authenticated security-history checkout repair from #136232. Wait for rendered Android model labels and align the plaintext bootstrap fixture with its existing manual TLS preference. Retain bounded Windows termination diagnostics and both primary and cleanup failures without changing process-tree acceptance or shutdown deadlines.
…penclaw#136232) * fix(ci): fetch security scan history during authenticated checkout * test(ci): align Git history guards with checkout ownership
* feat(control-ui): add human mentions and temporary inbox Bind explicit composer selections to authorized human profiles and deliver recipient-owned Inbox entries only after a fresh canonical user-message commit. Carry selections through first sends, queues, recovery, and native transcript mirrors without treating replay or rewritten content as a new mention. Reuse existing profile/session visibility and Web Push owners. Keep the Inbox, dismissals, and delivery dedupe bounded and process-local; no SQLite schema or migration change. Add an optional default-off browser notification category. Document the API, temporary retention, retry semantics, and notification limits. Refs #135645. * refactor(gateway): keep active-leaf response helper private The responder is now called only inside its admission owner. Remove the obsolete export while preserving its response shape and control flow. This clears the production and full-tree unused-export guard. * refactor(mentions): consolidate visibility and commit ownership Reuse profile session filters instead of fabricating recipient clients. Derive request types from the wire schema, reuse sanitized input, carry one Codex persistence receipt, and let Inbox rows own their navigation target. Preserve current permissions, replay fencing, and explicit dismissal. No schema, migration, configuration, or protocol changes. * test: fix cache restore and sidebar navigation fixtures Seed only historical declaration chunks outside the final cache inventory, so the portable restore still proves every owned output byte. Reuse the test-only repair from upstream 5e6117d. Wait for committed routes before interacting with the Inbox after navigation, while preserving every click and scope/dismissal check. Capture diagnostics before closing the browser on failure. Co-authored-by: ruel225 <[email protected]> * fix(ci): align checkout history and fixture readiness Reuse the authenticated security-history checkout repair from #136232. Wait for rendered Android model labels and align the plaintext bootstrap fixture with its existing manual TLS preference. Retain bounded Windows termination diagnostics and both primary and cleanup failures without changing process-tree acceptance or shutdown deadlines. * fix: publish real profile changes and stabilize CI fixtures Emit profile invalidations only after an effective state write, through the existing synchronous transaction and post-commit owner. Keep shared Gateway test config at its owner and carry explicit model config across preparation. Reuse the bounded subprocess helper for complete CLI JSON. Preserve the alias regression cases in their existing owning test suite. This repair adds no schema, Gateway configuration, protocol, or dependency. * perf(control-ui): keep inbox state behind its lazy owner Create mention state with the application-owned Inbox controller, retain it across presenter remounts, and dispose it with that owner. Keep dismissal identity policy in the dismissal store so startup does not load the full Inbox projection. Preserve authorization, persistence, and size limits. Co-authored-by: ruel225 <[email protected]> * perf(control-ui): load compact menu styles with their renderer Keep shared sidebar and chat-header compact menu styles with the module that renders them instead of the startup shell. Preserve all declarations and the existing startup size limit. Co-authored-by: ruel225 <[email protected]> * fix(ci): account for the human mentions schema owner Keep the registry inventory check aligned with the additional reviewed human-mentions module. No runtime or generated protocol change. * refactor(control-ui): import mention type from its protocol owner Use the same public type directly instead of the chat re-export. This also resolves the adjacent-import conflict with current main without changing emitted JavaScript or pulling unrelated changes into the PR. * refactor(control-ui): keep dismissal types with their owner Remove the type cycle between Inbox entries and dismissal storage by moving the two dismissal types to the existing dismissal owner and updating internal imports. Preserve runtime imports and behavior. * refactor(gateway): apply request handler overrides once --------- Co-authored-by: ruel225 <[email protected]>
…5853) * feat(control-ui): add human mentions and temporary inbox Bind explicit composer selections to authorized human profiles and deliver recipient-owned Inbox entries only after a fresh canonical user-message commit. Carry selections through first sends, queues, recovery, and native transcript mirrors without treating replay or rewritten content as a new mention. Reuse existing profile/session visibility and Web Push owners. Keep the Inbox, dismissals, and delivery dedupe bounded and process-local; no SQLite schema or migration change. Add an optional default-off browser notification category. Document the API, temporary retention, retry semantics, and notification limits. Refs openclaw#135645. * refactor(gateway): keep active-leaf response helper private The responder is now called only inside its admission owner. Remove the obsolete export while preserving its response shape and control flow. This clears the production and full-tree unused-export guard. * refactor(mentions): consolidate visibility and commit ownership Reuse profile session filters instead of fabricating recipient clients. Derive request types from the wire schema, reuse sanitized input, carry one Codex persistence receipt, and let Inbox rows own their navigation target. Preserve current permissions, replay fencing, and explicit dismissal. No schema, migration, configuration, or protocol changes. * test: fix cache restore and sidebar navigation fixtures Seed only historical declaration chunks outside the final cache inventory, so the portable restore still proves every owned output byte. Reuse the test-only repair from upstream 670a5b5. Wait for committed routes before interacting with the Inbox after navigation, while preserving every click and scope/dismissal check. Capture diagnostics before closing the browser on failure. Co-authored-by: ruel225 <[email protected]> * fix(ci): align checkout history and fixture readiness Reuse the authenticated security-history checkout repair from openclaw#136232. Wait for rendered Android model labels and align the plaintext bootstrap fixture with its existing manual TLS preference. Retain bounded Windows termination diagnostics and both primary and cleanup failures without changing process-tree acceptance or shutdown deadlines. * fix: publish real profile changes and stabilize CI fixtures Emit profile invalidations only after an effective state write, through the existing synchronous transaction and post-commit owner. Keep shared Gateway test config at its owner and carry explicit model config across preparation. Reuse the bounded subprocess helper for complete CLI JSON. Preserve the alias regression cases in their existing owning test suite. This repair adds no schema, Gateway configuration, protocol, or dependency. * perf(control-ui): keep inbox state behind its lazy owner Create mention state with the application-owned Inbox controller, retain it across presenter remounts, and dispose it with that owner. Keep dismissal identity policy in the dismissal store so startup does not load the full Inbox projection. Preserve authorization, persistence, and size limits. Co-authored-by: ruel225 <[email protected]> * perf(control-ui): load compact menu styles with their renderer Keep shared sidebar and chat-header compact menu styles with the module that renders them instead of the startup shell. Preserve all declarations and the existing startup size limit. Co-authored-by: ruel225 <[email protected]> * fix(ci): account for the human mentions schema owner Keep the registry inventory check aligned with the additional reviewed human-mentions module. No runtime or generated protocol change. * refactor(control-ui): import mention type from its protocol owner Use the same public type directly instead of the chat re-export. This also resolves the adjacent-import conflict with current main without changing emitted JavaScript or pulling unrelated changes into the PR. * refactor(control-ui): keep dismissal types with their owner Remove the type cycle between Inbox entries and dismissal storage by moving the two dismissal types to the existing dismissal owner and updating internal imports. Preserve runtime imports and behavior. * refactor(gateway): apply request handler overrides once --------- Co-authored-by: ruel225 <[email protected]>
Why
The security-fast job can fail before running its scanners: checkout removes temporary credentials as requested, then a separate PR-history fetch reaches GitHub without authentication. This happened on #136205 in run 33613960320, job 100195389239, where Git exited 128 with an authentication challenge. The log does not establish why that public request was challenged.
Change
Calculate the existing validated PR commit count plus two before checkout and pass it to the pinned checkout action. That action now acquires the complete bounded scan range while it owns authentication, then removes credentials as before. Delete the redundant later fetch and its unused merge-SHA environment value.
Non-PR depth remains two. Event ref/SHA selection, manual target checkout, scan base/head, scanner pins, permissions, and
persist-credentials: falseare unchanged. The removed supplemental fetch's 120-second deadline does not transfer to checkout; the existing checkout lifecycle and 20-minute job deadline apply. There is no new credential scope or authentication fallback.Verification
A real local Git fixture creates a three-commit PR and synthetic merge. The regression fails before the change because the initial depth-two checkout contains only two of the four required range commits; it passes with the complete range afterward. Six targeted security cases pass, including invalid commit counts and unchanged non-PR defaults.
The original two complete canonical owner suites passed 244 tests, with two existing Linux-only tests skipped on macOS. Expanded verification across all three Git-owner suites passed 448 tests with 88 unchanged native platform skips. A subsequent mechanical lint cleanup passed 22 affected cases; these selected cases do not replace the full-suite result. Changed-code checks and the full workflow checker pass, including actionlint and zizmor. The first workflow-check attempt used system Python 3.9 and could not install the unchanged pre-commit pin; rerunning the same checker with the existing Python 3.14 passed without changing pins.
Direct inspection of pinned
actions/checkoutconfirms authentication wraps its fetch and is removed infinallywhen persistence is disabled. The local fixture does not reproduce GitHub's remote authentication challenge or claim to execute the Actions runner; exact-head CI remains required.Workflow delta: +17/-19 (net -2). Tests and support: +155/-53 (net +102). This is a CI correctness repair, not a performance result.
Follow-up from hosted CI
The first candidate security-fast job passed on GitHub Actions (run 33615893519, job 100201497622). The Linux Git test shard then found three stale tests still selecting the deleted supplemental-fetch step. Remove those obsolete cases and unused fixture inputs; the new first-checkout range and invalid-depth guards cover the replacement owner.
The expanded macOS suites exposed a fixture portability gap: publisher scenarios expected
timeoutwithout using the stub already supplied to related fixture families. Extend that existing provision to publishers. Production deadlines, assertions and platform skips stay unchanged. Nearby changed-file lint fixes preserve expected values and ordering.ClawSweeper's final-head September 2 review found no code defect and requested hosted workflow confirmation because its environment could not retrieve the pinned checkout source. The maintainer and independent review inspected that source directly. Final head
04c51bf8fb7062da1e12fd2b1f545a641f76c004now passes CI run 33618909815, attempt 2: 184 passing checks and 23 appropriate skips. Attempt 1 passed checkout and TruffleHog but failed while pre-commit fetched its separate public hook repository; the ordinary failed-job retry passed without source, credentials or scanner changes. This completes the review's requested rank-up proof. Final isolated Codex review also found no actionable P0 defect.