Skip to content

Harden Java PR CI: gate self-hosted (credentialed) jobs behind an approval environment - #4462

Open
kyy8-L wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
kyy8-L:harden/self-hosted-fork-approval
Open

kyy8-L wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
kyy8-L:harden/self-hosted-fork-approval

Conversation

@kyy8-L

@kyy8-L kyy8-L commented Oct 22, 2026

Copy link
Copy Markdown

What

The Java PR workflow runs java_build, java_unit_tests and the integration
(smoke / full) jobs on the self-hosted [self-hosted, it] runners. Those runners
hold Google Cloud credentials for the cloud-teleport-testing project — the IT
steps pass --it-project="cloud-teleport-testing" and there is no
google-github-actions/auth step, so the credentials come from the runner
itself. These jobs execute PR code (./cicd/run-build, run-unit-tests,
run-it-*), and nothing restricts fork pull requests, so a PR's code runs on the
credentialed runner.

Change

Add environment: fork-ci-approval to java_build. Every other self-hosted
it job transitively needs: java_build, so a single approval gate at the root
holds the whole chain until a maintainer approves the current commit.

To activate: in repo settings, add required reviewers to the
fork-ci-approval environment. Until that is configured the environment imposes
no gate, so merging this PR is behavior-neutral (safe to merge first, configure
after).

Notes

  • This mirrors the per-run approval pattern used elsewhere in the org (e.g.
    tflite-micro) for running fork code on privileged runners.
  • If you'd prefer to gate each self-hosted job individually, or to restrict these
    jobs to same-repository PRs instead, happy to adjust.

🤖 Generated with Claude Code

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@google-cla

google-cla Bot commented Oct 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kyy8-L
kyy8-L force-pushed the harden/self-hosted-fork-approval branch from 259de83 to ce42389 Compare October 22, 2026 05:51
…roval environment

The Java PR workflow runs java_build, java_unit_tests and the integration
(smoke/full) jobs on the self-hosted [self-hosted, it] runners, which hold Google
Cloud credentials for the cloud-teleport-testing project (the IT steps pass
--it-project=cloud-teleport-testing with no google-github-actions/auth step, so
the runner itself provides the credentials). These jobs run PR code
(./cicd/run-build, run-unit-tests, run-it-*) with no gate restricting fork PRs,
so a pull request's code executes on the credentialed runner.

Add `environment: fork-ci-approval` to java_build. Every other self-hosted `it`
job transitively `needs: java_build`, so one approval gate at the root holds the
whole chain until a maintainer approves the current commit. Configure required
reviewers on the fork-ci-approval environment to activate it; until then the
environment imposes no gate, so this change is behavior-neutral.
@kyy8-L
kyy8-L force-pushed the harden/self-hosted-fork-approval branch from ce42389 to b6b893c Compare October 22, 2026 05:53
@kyy8-L

kyy8-L commented Oct 22, 2026

Copy link
Copy Markdown
Author

@googlebot I signed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant