Repository navigation
fix(ci): isolate performance candidate trust - #127160
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 10:50 AM ET / 14:50 UTC. ClawSweeper reviewWhat this changesThe PR gates performance-run credentials, caches, trusted helper code, and report publication on the resolved target matching the default-branch workflow revision. Merge readinessKeep open for maintainer review. The patch cleanly centralizes candidate trust and removes candidate-owned helper execution, but its security boundary depends on the exact GitHub Actions semantics of Priority: P1 Review scores
Verification
How this fits togetherThe performance workflow resolves a requested benchmark revision, prepares its runtime, and optionally uses credentials or publishes reports. The new trust decision is propagated to benchmark, source-probe, and publishing jobs. flowchart LR
A[Performance trigger] --> B[Resolve benchmark target]
B --> C[Classify candidate trust]
C --> D[Stage trusted workflow helpers]
C --> E[Run benchmark jobs]
C --> F[Gate cache and credentials]
F --> G[Publish reports]
E --> G
Decision needed
Why: The resulting credential and publication gate is security-sensitive, while the authoritative GitHub Actions context contract could not be inspected from this review environment. Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch narrows the security boundary, but the external Actions context contract that underpins the new gate remains unverified. PR surfaceTests +194, Config +63. Total +257 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one canonical trust decision, after confirming that Do we have a high-confidence way to reproduce the issue? No live GitHub Actions reproduction was established; source tests directly execute trusted and noncanonical classifier inputs and the nested-action replacement path. Is this the best way to solve the issue? Likely yes: a single producer-owned trust fact propagated to every privileged consumer is preferable to separate downstream checks, pending confirmation of the Actions context contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 03d4b8a9c331. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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 (4 earlier review cycles)
|
d0bbce3 to
133f52d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
133f52d to
5d16daa
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
5d16daa to
100d997
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Resolves a problem where manually selected OpenClaw performance targets could run through candidate-owned setup code with repository cache access, while live OpenAI credentials and report-publishing credentials were not tied to the exact trusted workflow revision.
Related alerts:
Why This Change Was Made
The performance workflow now classifies the resolved candidate once and carries typed
secret_eligibleandcache_write_allowedfacts to every consumer. Only the canonical default-branch workflow revision is eligible for live credentials, cache restore, or app-token publication; arbitrary refs remain mock-only and cache-off.Workflow-owned helpers and local actions are checked out from the exact
github.workflow_shainto a separate harness before candidate code runs. Publisher artifact validation still completes before any app token is created, and the existing report paths, latest pointers, and tested-SHA identity are unchanged.Architectural owner:
.github/workflows/openclaw-performance.yml.Removed unsafe paths:
setup-node-envexecutionProduction LOC: +76 / -13, net +63. The positive delta implements the workflow trust boundary, explicit credential/cache authority, and trusted nested-action staging in both benchmark jobs; tests are +203 / -9.
User Impact
No product UI change. Maintainers can still benchmark arbitrary refs and receive the same artifacts, source summaries, comparison SHA, and report layout, but those candidate runs are secretless, mock-only, non-publishing, and unable to consume repository caches. Canonical scheduled and default-branch manual runs retain live and publication behavior.
Maintainer Decision
Accept the exact-head boundary. GitHub documents
github.workflow_shaas "the commit SHA for the workflow file"; scheduled workflows run only on the default branch at its latest commit, andworkflow_dispatchexposes the branch or tag that received the dispatch. The gate additionally requiresGITHUB_REFto be the repository default branch and the resolved candidate SHA to equalgithub.workflow_sha, so an arbitrarytarget_refcannot acquire cache, credential, or publication authority.Contract references:
Evidence
node scripts/run-vitest.mjs test/scripts/openclaw-performance-workflow.test.ts test/scripts/openclaw-performance-source-isolation.test.ts test/scripts/openclaw-performance-source-summary.test.ts test/scripts/kova-workflow-evidence.test.ts- 4 files, 64 tests passed.actionlint .github/workflows/openclaw-performance.yml- passed.git diff --check- passed.100d9974cd49found no actionable findings after the nested-action repair.actionlintpassed: https://github.com/openclaw/openclaw/actions/runs/32491298415