ci(e2e): withhold live messaging secrets from target refs#4862
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Complex PR? Review this PR in Change Stack to move by importance, not file order. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR gates live messaging provider credentials (Telegram, Discord, Slack tokens and channel IDs) behind a "trusted ref" expression in the nightly E2E workflow. The workflow now conditionally passes real secrets or empty strings based on whether the event is a scheduled run or a trusted dispatch. Tests are updated to verify this gating behavior and validate coverage expectations. ChangesTrusted-ref gating for live messaging secrets
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Selective E2E Results — ✅ All requested jobs passedRun: 27037445257
|
Selective E2E Results — ✅ All requested jobs passedRun: 27038983770
|
Summary
Prevent selective nightly E2E dispatches with an explicit target ref from receiving live messaging provider secrets. The messaging providers job now opts into live secrets only on trusted refs and blanks each live Slack, Discord, and Telegram secret for target-ref dispatches.
Changes
messaging_live_secretsin.github/workflows/nightly-e2e.yamlwith the same trusted-ref predicate used for Docker Hub credentials.workflow_dispatchsuppliesinputs.target_ref.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Targeted checks run:
npx vitest run test/e2e-script-workflow.test.ts test/validate-e2e-coverage.test.ts --testTimeout 60000npm run checksSigned-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Security Improvements
Tests