fix(review): close post-merge security and evidence gaps - #369
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
monkey1sai
left a comment
There was a problem hiding this comment.
Final adversarial review
Verdict: no BLOCKER, HIGH, or MEDIUM finding in this follow-up PR scope.
- Requirements/scope: the diff is limited to the two post-merge fixes from #359 and remains based on current
main@b9c88bf; nodocs/plans, A4, or Claude Code branch/worktree content is included. - Security/correctness: origin validation rejects option-shaped values and raw query/fragment markers before relative/rooted/SCP/URI classification; safe relative mirrors remain covered.
- Evidence integrity: tracked Hi-Fi PNGs are read-only baselines, current actual/diff files go to ignored
_output, dimensions are checked before pixelmatch, and all five captures enforcediffPixelRatio <= 0.01. - Commit binding: CI order is functional producer -> Hi-Fi -> target-commit validator. Local replay against
e21e22f06569fd081017691caa5525d075c7cb51passed and left the tracked tree clean. - Independent review: Terra xhigh APPROVE; Sol max APPROVE; coordinator final adjudication APPROVE.
Evidence reviewed: PS7 and PS5.1 rebuild suites PASS; functional contract PASS; governance PASS; typecheck and targeted lint PASS; Playwright functional 1/1 and Hi-Fi 4/4 PASS; GitNexus compare LOW with 0 affected processes; local PR preflight PASS; GitHub CI and Agent Governance SUCCESS.
Residuals: CodeRabbit did not run because its external review quota was rate-limited, not because of a code finding. The inherited partial-service-stop recovery limitation remains documented and is not expanded by this PR.
There was a problem hiding this comment.
Pull request overview
This PR is a targeted post-merge follow-up to #359, applying two late review fixes on top of origin/main: a credential-leak hardening in the test-deploy origin validator, and an integrity upgrade to the Hi-Fi E2E visual-evidence flow. It does not touch product UI or docs/plans authority.
Changes:
- Hardens
Assert-TestDeployOriginUrlSafeto reject option-shaped (-…) origins and any?/#before URI/SCP/rooted/relative classification, closing the relative-origin credential bypass (e.g.repo.git?access_token=…) while still allowing safe relative mirrors (.\repo-mirror\…git). - Reworks the Hi-Fi spec to route actual/diff screenshots into gitignored
artifacts/e2e/_output/, treat tracked golden PNGs as read-only baselines, and enforce a ≤1% pixelmatch diff gate via a sharedcaptureHifiVisualEvidencehelper. - Reorders CI so the Hi-Fi runtime slice runs before the commit-bound binding validator, and updates the governing test (
test-functional-runtime-result.ps1) plus origin-validation tests to lock the new ordering and evidence contract.
Verification performed during review:
pixelmatch(7.1.0) andpngjs(7.0.0) are declared dependencies; the old lowercaseartifactDirbinding is fully removed (new names usebaselineArtifactDir/outputArtifactDir), and exactly onepage.screenshot(call remains, satisfying the new assertion.- CI step order (producer → hifi → validator) matches the
IndexOfassertions;artifacts/e2e/_output/is gitignored (artifacts/e2e/.gitignore:4) and the five tracked baselines exist and are force-tracked. - The origin-validator refactor preserves prior reject behavior (the removed inline
?/#checks are now covered by the earlier global check) with no regression for safe origins.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
web-viewer-sample/e2e/hifi-token-authority.spec.ts |
Adds captureHifiVisualEvidence helper: writes actual/diff to _output, reads tracked baselines, enforces ≤1% pixel-diff gate |
scripts/lib/rebuild-test-deploy.ps1 |
Moves --prefix and ?/# origin rejection to the front of Assert-TestDeployOriginUrlSafe, closing the relative-origin credential bypass |
scripts/tests/test-rebuild-test-deploy.ps1 |
Adds safe relative-mirror case and unsafe relative query/fragment credential-bypass cases |
scripts/tests/test-functional-runtime-result.ps1 |
Locks new producer→hifi→validator ordering and asserts the _output/pixelmatch/single-screenshot evidence contract |
.github/workflows/ci.yml |
Reorders the Hi-Fi runtime slice to run before the binding validator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
8db52e7before two late review fixes were pushed. This PR contains only those post-merge fixes on top of currentorigin/main@b9c88bf.?/#markers before URI, SCP-like, rooted-path, or relative-path classification. This closes relative-origin credential bypasses such asrepo.git?access_token=...while preserving safe relative mirrors such as.\repo-mirror\AI-BIM-governance.git.artifacts/e2e/_output/; tracked golden PNGs are read-only baselines and every capture enforces a <=1% pixel-diff gate.docs/planscontent is changed. Currentdocs/plansremains the sole product authority. No A4 worktree/branch code and no Claude Code branch/worktree code was read into, cherry-picked into, or modified by this PR.Scope / conflict review
origin/main@b9c88bf, including merged #359 and #363274c56f,e21e22fdocs/plans/*; no docs delta in this follow-upAI Coding Governance
docs/plansproduct authority plus existing deploy-security and functional-evidence contractsdetect_changes(scope=compare, base_ref=origin/main)= LOW; 5 files, 0 affected processesFrontend Verification
Expected machine scope is
gate_infrastructure_only: this PR changes a Playwright evidence producer, not product UI source. It does not claim frontend or design-system completion./ui,#conv,#/demo-control,#/kit— regression evidence onlyconv-refreshPOST /api/external/ifc-ready,GET /api/external/ifc-readystream_conv_fixture_001npx playwright test --config=playwright.functional-runtime.config.ts;npx playwright test e2e/hifi-token-authority.spec.ts --config=playwright.config.tsartifacts/e2e/functional-runtime/conv-history.png,conv-history-trace.zip, andartifacts/e2e/_output/hifi-token-authority/*-{actual,diff}.pnggate_infrastructure_only; no product visual source changeddocs/plans/design-system-reference.manifest.jsonremains unchanged_outputactual/diff pairs; tracked baseline bytes remain unchangedDeploy Path Verification
scripts/lib/rebuild-test-deploy.ps1validation hardened; canonical wrapper/deploy path unchangedscripts/tests/test-rebuild-test-deploy.ps1Validation
pwsh -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/tests/test-rebuild-test-deploy.ps1— PASS.powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/tests/test-rebuild-test-deploy.ps1— PASS.pwsh -NoProfile -NonInteractive -File scripts/tests/test-functional-runtime-result.ps1— RED before the golden-protection implementation, then PASS.pwsh -NoProfile -NonInteractive -File scripts/tests/test-agent-governance-check.ps1— PASS.npm run typecheck— PASS.e2e/hifi-token-authority.spec.ts— PASS.npm run build:ui— PASS.e21e22f06569fd081017691caa5525d075c7cb51.unified-home=0; remaining four screens0.00130425to0.00135091, all below0.01.verify-functional-runtime-result.ps1 -TargetCommit e21e22f06569fd081017691caa5525d075c7cb51 -AllowUntrackedArtifacts— PASS after producer and Hi-Fi; tracked working tree remained clean.git diff --check origin/main...HEAD— PASS.Known Risks
rvt-ifc-usdc-lineageruntime or canonical real-MinIO#/pipelinebrowser E2E.