ci(e2e): wire CF mint secrets into behaviour job - #5181
Conversation
Expose TEST_*_PEM and Cloudflare credentials to make behaviour-test so temp CF Worker mint deploys can authenticate in CI (fullsend-ai#5167). Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 1:31 PM UTC · Completed 1:39 PM UTC |
PR Summary by QodoWire Cloudflare mint secrets into CI behaviour job
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Site previewPreview: https://50b4a04c-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Code Review by Qodo
1.
|
Review of #5181 —
|
| Dimension | Result |
|---|---|
| Correctness | ✅ No findings — env var names match issue spec, YAML structure valid, no consumers expected yet (follow-up #5109) |
| Security | ✅ Two low-severity observations (see below) — follows established security model |
| Intent & coherence | ✅ Mechanical wiring change, explicitly authorized by #5167 |
| Style & conventions | ✅ Follows existing KEY: ${{ secrets.KEY }} pattern |
| Documentation | ✅ No staleness — secrets are already documented in e2e-testing guide |
| Cross-repo contracts | ⏭ Skipped — no exported interfaces or API surfaces modified |
Low-severity observations
-
[permission-expansion].github/workflows/e2e.yml:258— Adding 8 secrets to the behaviour job expands the blast radius if the e2e gate is ever bypassed. TheTEST_*_PEMsecrets are private keys for 6 test GitHub Apps with permissions includingadministration:writeon test pool orgs. This follows the established pattern (GCP secrets are already exposed here) and the gate authorization is the accepted control, but the expanded surface is worth noting. -
[secret-exposure].github/workflows/e2e.yml:265—CLOUDFLARE_API_TOKENis also used insite-deploy.ymlfor production site deployments (a trusted context). If the same token is used for both production deploys and e2e testing, a gate bypass would grant access to production Cloudflare Workers. Consider verifying this is a separate, test-scoped Cloudflare token — or minting one if not.
Protected paths detected — this PR modifies files under one or more
protected paths. The review agent cannot approve PRs that touch these paths.
A human reviewer must approve this PR.Protected files in this PR:
.github/workflows/e2e.yml
Labels: PR modifies e2e CI workflow to wire mint-related secrets into the behaviour test job.
|
Reviewed this alongside the broader CF mint rollout chain (#5111 → #5167/this PR → #5109 → #5115 → #5116). No other open PR currently depends on this one — the downstream work is still at the issue stage — but flagging two things before merge given the secrets involved: 1. Please confirm The 6
If it's the same account/token that prod will eventually use, a leak here would mean an attacker could deploy a malicious Worker at the actual public token-issuing mint, not just a test sandbox — worth being explicit about that before this lands. 2. The The "Upload behaviour debug artifacts" step runs unconditionally on failure and uploads Worth applying the same kind of secret-redaction treatment that |
Keep CLOUDFLARE_* env var names for Wrangler/mint deploy, but source values from TEST_CLOUDFLARE_* repo secrets so behaviour CI does not share the production site-deploy credentials. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks @waynesun09 — addressed both points: 1. Cloudflare secret scope — Updated the behaviour job to read from 2. Debug-artifact exfiltration — Follow-up filed: #5221 |
|
🤖 Finished Retro · ✅ Success · Started 7:20 PM UTC · Completed 7:27 PM UTC |
|
PR #5181 wired Cloudflare mint secrets into the e2e behaviour job. The review agent correctly identified both key security concerns (permission expansion and potential production secret sharing) but rated them Two proposals target the agents repo security sub-agent to close the gaps for future similar PRs:
Proposals filed |
Summary
Wire the existing repo secrets for CF mint BT (
TEST_*_PEMand Cloudflare credentials) into thebehaviourjob somake behaviour-testcan deploy a temporary Worker mint in CI. This is workflow wiring only (prerequisite for #5109).Related Issue
Fixes #5167
Changes
TEST_FULLSEND_PEM,TEST_TRIAGE_PEM,TEST_CODER_PEM,TEST_REVIEW_PEM,TEST_RETRO_PEM,TEST_PRIORITIZE_PEM,CLOUDFLARE_ACCOUNT_ID, andCLOUDFLARE_API_TOKENto the "Run behaviour tests" step env in.github/workflows/e2e.ymlpull_request_target+ gate job)Testing
make lintpasses (stage changes first, then run)Checklist
!for breaking changes)Made with Cursor