Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The workflow can test a commit other than the triggering SHA, while subsequent pushes to labeled fork PRs neither run cloud tests nor request renewed approval.
2 open issues
What changed in this PR
This PR enables maintainer-triggered ClickHouse Cloud integration tests for fork PRs, which cannot access cloud credentials through ordinary pull_request runs.
Changes:
- Adds a
tests:run-cloudlabel trigger for fork PRs while preserving in-repository, manual, and nightly runs. - Checks out the PR head commit for label-triggered runs.
- Restricts token permissions to read-only contents and disables checkout credential persistence.
| File | Description |
|---|---|
.github/workflows/test_cloud.yml |
Adds label-gated cloud testing and checkout controls for fork PRs. |
Review effort: Balanced
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4c2ef2d. Configure here.
ConnectorSec security review — head
|
|
regarding what @connectorsec flagged. I'm not sure whether this is too defensive or not. the contributor would have to push a malicious commit within a small window between having reviewed the code and adding the label. |
There was a problem hiding this comment.
🔵 Needs a closer look
A maintainer needs to validate the trust boundary for executing fork-controlled code with cloud credentials, including approval-label permissions and the cloud account’s isolation and privileges.
No open issues 🎉
2 resolved since last review
Review effort: Balanced


Summary
At the moment, fork PRs fail the
test_cloudworkflow because they don't set the cloud credentials. This PR enables runningtest_cloudon fork PRs via the maintainer labeltests:run-cloudand theallow-unsafe-pr-checkout: trueflag, similar to how clickhouse-go has set up their cloud tests (see run-tests-cloud.yml), but with some distinctions:test_cloudNote
Medium Risk
pull_request_targetwith unsafe fork checkout runs contributor code with cloud credentials; risk is mitigated by maintainer-only labeling and explicit checkout controls, but mis-labeling or insufficient review could expose secrets.Overview
Fork PRs can run ClickHouse cloud integration tests when a maintainer adds the
tests:run-cloudlabel, using apull_request_target+labeledtrigger so workflows can access cloud secrets (which ordinary forkpull_requestruns cannot).The
cloud_smt_testsjob is gated so it still runs for in-repo PRs, manual dispatch, and nightly schedule without the label; only labeled fork runs usepull_request_target.Checkout is adjusted for that path:
refpins to the PR head SHA at label time,allow-unsafe-pr-checkoutenables fork code with secrets (with maintainer review expectation), andpersist-credentials: false. Workflowpermissionsare set to read-only oncontents.Reviewed by Cursor Bugbot for commit 4c2ef2d. Bugbot is set up for automated code reviews on this repo. Configure here.