Skip to content

[main][cherry-pick] Fix(ci): restrict integration tests to trusted contributors or safe-to-test label#3806

Merged
prkalle merged 1 commit into
cloudfoundry:mainfrom
prkalle:fix/ci_sec_main
Jun 22, 2026
Merged

[main][cherry-pick] Fix(ci): restrict integration tests to trusted contributors or safe-to-test label#3806
prkalle merged 1 commit into
cloudfoundry:mainfrom
prkalle:fix/ci_sec_main

Conversation

@prkalle

@prkalle prkalle commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description of the Change

This PR is cherry-pick of #3805
This PR restricts integration tests to trusted contributors or safe-to-test label

Why Is This PR Valuable?

This PR improves the security posture of the integration test CI workflow by ensuring only trusted contributors can trigger test runs against repository infrastructure. It also reduces maintainer overhead by automatically signaling(by removing the safe-to-test label) when a PR needs re-approval after new commits are pushed.

Applicable Issues

List any applicable GitHub Issues here

How Urgent Is The Change?

Fairly urget

Other Relevant Parties

Who else is affected by the change?

…o-test label

Gate the get-sha job in tests-integration.yml so CI runs automatically
only for contributors with explicit repository write access (OWNER or
COLLABORATOR). All others require a maintainer to add the "safe-to-test"
label, which must be done via a labeled event — not checked by label
presence — eliminating any race condition on new commits.

Add remove-safe-to-test-label.yml to automatically strip the
safe-to-test label when a contributor pushes new commits, so a
maintainer must explicitly re-label before CI runs again on the
updated code.

Signed-off-by: Prem Kumar Kalle <prem.kalle@broadcom.com>

@anujc25 anujc25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@prkalle prkalle changed the title Fix(ci): restrict integration tests to trusted contributors or safe-to-test label [main][cherry-pick] Fix(ci): restrict integration tests to trusted contributors or safe-to-test label Jun 22, 2026
@prkalle prkalle merged commit d9741b8 into cloudfoundry:main Jun 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants