fix: exclude CI/CD trust-boundary repos from skip-review Tide queries#1214
Conversation
|
Hi @FelixPhipps. Thanks for your PR. I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
…eries The three bot Tide queries (github-actions[bot], octo-sts[bot], renovate[bot]) used orgs: [cert-manager] with no excludedRepos, making cert-manager/testing itself eligible for automatic bot merges without any human review. A compromised bot identity with label-write access could self-apply skip-review, merge an arbitrary config/jobs/** file, and have config-updater write a malicious prow-trusted periodic into the live job-config ConfigMap — giving the attacker control of every secret mounted in the trusted cluster. Add excludedRepos: [cert-manager/testing, cert-manager/infrastructure, cert-manager/renovate-config] to all three bot queries so automatic merges can never bypass human review on repositories that form the CI/CD trust boundary. Fixes CWE-863 / CWE-284. Tracked as VC-53840. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: felix.phipps <felix.phipps@cyberark.com>
c16c71f to
2e73894
Compare
|
/ok-to-test |
There was a problem hiding this comment.
Pull request overview
This PR tightens Tide’s “skip-review” auto-merge scope for bot-authored PRs in the cert-manager org by excluding repositories that form the CI/CD trust boundary, reducing the risk of unattended merges into sensitive configuration repos.
Changes:
- Added
excludedReposfor thegithub-actions[bot]Tide query to excludecert-manager/testing,cert-manager/infrastructure, andcert-manager/renovate-config. - Added the same
excludedReposexclusions for theocto-sts[bot]Tide query. - Added the same
excludedReposexclusions for therenovate[bot]Tide query.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wallrj-cyberark
left a comment
There was a problem hiding this comment.
Review Summary
The change is correct and well-scoped. Adding excludedRepos to the three bot Tide queries closes the gap where cert-manager/testing, cert-manager/infrastructure, and cert-manager/renovate-config were eligible for automatic no-review merges by bot-authored PRs carrying skip-review. This mirrors the existing excludedRepos mechanism already used by the default org-wide query (which excludes cert-manager/cert-manager).
All three excluded repos confirmed to exist. The YAML structure and indentation are consistent with the surrounding config.
Observations
-
Defence-in-depth follow-ups: this PR addresses the Tide query scope. Additional hardening measures — such as restricting which Secrets a
cluster: prow-trustedjob can mount (viaValidatingAdmissionPolicyor similar), or splittingconfig-updater'sjob-configso trusted-cluster jobs require a separate merge path — could be considered as follow-up work. -
Commit message style: the
fix:conventional-commit prefix is used by Renovate on this repo but not by human-authored commits (recent examples: "Fix cert-manager master required checks", "Make K8s 1.36 the primary version"). Consider dropping the prefix to match the prevailing style — though this is a minor nit. -
Maintenance note: if a fourth bot identity is later added to Tide with
skip-reviewsemantics, the sameexcludedReposblock will need to be duplicated. The inline comments make this clear, which helps.
|
Tagging the authors and approvers of the original PRs that introduced the bot skip-review Tide queries being modified here:
This PR adds @FelixPhipps — the PR description mentions "Ran a Go scope validator against both configs". Could you link to or describe this tool? It's not clear whether this is an existing utility or something you wrote ad hoc, and it would help reviewers understand the test evidence. |
There was a problem hiding this comment.
/lgtm
This makes a lot of sense! Thanks @FelixPhipps!
@wallrj-cyberark Small tool that I wrote ad-hoc specifically for this, parses config.yaml and checks whether each bot Tide query has excludedRepos covering the three trust-boundary repos. |
wallrj-cyberark
left a comment
There was a problem hiding this comment.
LGTM — the change correctly narrows the bot skip-review Tide queries to exclude CI/CD trust-boundary repos.
|
As a future improvement, it would be worth integrating the scope validator into |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wallrj, wallrj-cyberark The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@FelixPhipps: Updated the
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
Testing