feat(e2e): WIF shim and PR authorization gate (#1604) - #1983
Conversation
Site previewPreview: https://ea0b4b48-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsCritical
Medium
Low
Info
Previous run (5)ReviewFindingsCritical
Medium
Low
Info
|
d085c41 to
561961d
Compare
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad Report — 6-agent parallel review
Agents: 2 claude-coder, 2 claude-researcher, 1 gemini, 1 cursor
Verified findings: 2 HIGH, 6 MEDIUM (inline), 7 LOW, 3 INFO
False positives removed: 5 (pagination, labeled+paths, ADR edits, DOCS_URL injection, concurrency collision)
Summary
The security architecture is well-designed — shim→trusted workflow via workflow_call@refs/heads/main, WIF bound by job_workflow_ref, two-layer authorization gate. ADR 0043 and docs are thorough.
HIGH items: (1) Backdated committer.date bypasses ok-to-test freshness — use server-side timestamps instead of git metadata. (2) gcloud projects describe fails without credentials on fresh runners — hardcode the WIF provider resource name to eliminate runtime dependency.
MEDIUM items: ERR trap needs diagnostics, shim missing path filter + top-level permissions: {}, test coverage gaps (CONTRIBUTOR assoc, trusted+label, resolve script), fragile two-pass resolve pattern, always() → !cancelled().
Not flagged (LOW): comment whitespace, action SHA pinning, timestamp string comparison, unused pr_author input, TOCTOU race, trusted author label cleanup, fork PR filtering.
561961d to
0dd7ec2
Compare
|
🤖 Finished Review · ✅ Success · Started 10:37 PM UTC · Completed 10:50 PM UTC |
0dd7ec2 to
abadff7
Compare
|
🤖 Review · Started 11:02 PM UTC |
…#1604) Introduce e2e_shim.yml (pull_request_target) calling trusted e2e.yml@main via workflow_call, with member/collaborator or fresh ok-to-test authorization, GCP WIF auth bound to job_workflow_ref, and hardcoded defaults for shared e2e infra. Partial progress toward secretless e2e: WIF replaces long-lived GCP keys; canonical project, SA, and WIF provider are workflow defaults (overridable via optional secrets). pull_request_target lets fork PRs inherit secrets/OIDC while the shim stays safe (no PR code checkout). Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
abadff7 to
20ecffe
Compare
|
🤖 Finished Review · ✅ Success · Started 11:13 PM UTC · Completed 11:25 PM UTC |
ralphbean
left a comment
There was a problem hiding this comment.
Previous findings addressed. One thing to sort out — see inline.
|
|
||
| e2e: | ||
| needs: gate | ||
| if: >- |
There was a problem hiding this comment.
This branch predates 6aef818, which added merge_group: and a Check for e2e-relevant changes step. That step lets us require e2e in branch protection — the workflow succeeds on PRs that don't touch e2e files instead of skipping.
After rebasing, it'd be worth thinking through how that fits with the shim. The shim's paths: filter prevents the workflow from firing on non-matching PRs, so we can't make e2e a required check. If we want that option, the shim could fire unconditionally and let the relevance check inside e2e.yml decide.
There was a problem hiding this comment.
I started working on this with the wrong assumptions and ended up with a solution that is far more comlex and cumbersome then what we actually needed. Opened PR #2106 to redo this with fresh approach
|
Superseded by #2106 |
|
🤖 Finished Retro · ✅ Success · Started 8:25 AM UTC · Completed 8:30 AM UTC |
Retro: PR #1983 —
|
Summary
Incremental step toward secretless e2e (#1604) — authorized runs without per-repo secrets/variables. This PR does not complete that goal; it delivers:
e2e_shim.ymlcalling trustede2e.yml@refs/heads/mainviaworkflow_callon same-repo PRsok-to-test; stale label removal + sticky comment)google-github-actions/auth@v3,job_workflow_reftrust boundary) — no SA JSON keysit-gcp-konflux-e2e-fullsendwhenE2E_GCP_PROJECT_IDsecret is unsete2e-gcp-setup.md,e2e-testing.md)Still required today:
E2E_GITHUB_SESSION,E2E_MINT_URL,E2E_GCP_WIF_PROVIDER,E2E_GCP_SERVICE_ACCOUNT, password/TOTP secrets. Fork PR e2e remains blocked.Closes #1604
Test plan
bash scripts/check-e2e-authorization_test.shpasses locallyworkflow_dispatchGCP auth againstit-gcp-konflux-e2e-fullsendok-to-testpost-pushok-to-testafter new push: label removed, e2e skipped