Revert "Allow outside contributors to run CI with secrets when approved"#1786
Revert "Allow outside contributors to run CI with secrets when approved"#1786
Conversation
|
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant User as Contributor
participant GH as GitHub Platform
participant CI as CI Runner (Tests Workflow)
participant Repo as Repository
participant Secrets as GitHub Secrets
participant API as External APIs (OpenAI/BB)
User->>GH: Push PR / Add Label
GH->>CI: NEW: Trigger on 'pull_request' event
Note over CI: Determine Changes & Labels
CI->>CI: CHANGED: Read labels directly from github.event
CI->>Repo: CHANGED: Standard checkout (no head_sha ref required)
alt PR is from internal branch (Same Repo)
CI->>Secrets: Access OPENAI_API_KEY / ANTHROPIC_API_KEY
Secrets-->>CI: Return Secrets
rect rgb(5, 46, 22)
Note right of CI: Run Integration / E2E / Evals
CI->>API: Execute tests with API keys
API-->>CI: Results
end
else NEW: PR is from a FORK
rect rgb(127, 29, 29)
Note right of CI: Security Boundary
CI->>CI: Skip Integration, E2E, and Eval jobs
Note over CI: Condition: head.repo.full_name != github.repository
end
end
CI-->>GH: Report Status
GH-->>User: Show Check Results
Greptile SummaryThis PR reverts #1782, removing the two-step Key changes:
Security considerations: With a Confidence Score: 4/5
Sequence DiagramsequenceDiagram
participant Fork as Fork/External PR
participant Repo as Same-Repo PR
participant GH as GitHub Actions
participant CI as ci.yml
note over Fork,CI: After this revert (pull_request trigger)
Fork->>GH: Opens/updates PR
GH->>CI: Triggers (pull_request event, NO secrets passed)
CI->>CI: run-build, run-lint, core-unit-tests (runs, no secrets needed)
CI->>CI: server-integration-tests / e2e / evals
CI-->>Fork: Skipped (head.repo.full_name != github.repository guard)
Repo->>GH: Opens/updates PR
GH->>CI: Triggers (pull_request event, secrets available)
CI->>CI: run-build, run-lint, core-unit-tests (runs)
CI->>CI: server-integration-tests / e2e / evals
CI-->>Repo: Runs with secrets (head.repo == github.repository ✓)
note over Fork,CI: Before this revert (workflow_run two-step gate)
Fork->>GH: Opens/updates PR
GH->>GH: ensure-contributor-is-trusted-to-run-ci.yml (BLOCKED pending approval)
GH-->>GH: Maintainer approves workflow run
GH->>CI: Triggers via workflow_run (with secrets after approval)
CI-->>Fork: Runs all jobs WITH secrets
Last reviewed commit: d6ace82 |
Reverts #1782
Summary by cubic
Reverts the approval-based CI for external contributors. CI now runs on pull_request and blocks secrets for forked PRs by skipping integration, E2E, and eval jobs.
Written for commit d6ace82. Summary will update on new commits. Review in cubic