Repository navigation
test(ci): scope workflow credentials and pin actions - #15006
Merged
google-oss-prow[bot] merged 2 commits intoOct 21, 2026
Merged
google-oss-prow[bot] merged 2 commits into
google-oss-prow[bot] merged 2 commits into
Conversation
Signed-off-by: Jeff Spahr <spahrj@gmail.com>
Contributor Report for @jeffspahr
|
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Broad changes to credential and publication boundaries require maintainer review of hosted integration evidence.
No open issues 🎉
What changed in this PR
Hardens Kubeflow Pipelines CI credentials and action dependencies while preserving build, publication, and metadata workflows.
Changes:
- Declares explicit token permissions, disables checkout credential persistence, and pins external actions.
- Separates read-only builds from publication, adding checksum-verified package handoff.
- Adds regression coverage and documents the staged repository-settings rollout.
| File | Description |
|---|---|
| docs/agents/ci.md | Documents credential boundaries and rollout. |
| .github/workflows/validate-generated-files.yml | Scopes permissions and hardens checkouts. |
| .github/workflows/upgrade-test.yml | Declares caller permissions and pins actions. |
| .github/workflows/stale.yml | Restricts defaults and pins stale action. |
| .github/workflows/sdk-yapf.yml | Applies read-only checkout hardening. |
| .github/workflows/sdk-upgrade.yml | Applies read-only checkout hardening. |
| .github/workflows/sdk-isort.yml | Applies read-only checkout hardening. |
| .github/workflows/sdk-docformatter.yml | Applies read-only checkout hardening. |
| .github/workflows/runtime-base-images.yml | Hardens producer credentials and action references. |
| .github/workflows/readthedocs-builds.yml | Applies read-only checkout hardening. |
| .github/workflows/python-syntax.yml | Pins actions and disables persisted credentials. |
| .github/workflows/publish-packages.yml | Separates builds from checksum-verified PyPI publication. |
| .github/workflows/presubmit-backend.yml | Applies read-only checkout hardening. |
| .github/workflows/pre-commit.yml | Pins checkout, Python, and pre-commit actions. |
| .github/workflows/pr-gate.yml | Reduces issue permissions and pins actions. |
| .github/workflows/osv-scanner.yml | Pins Python setup. |
| .github/workflows/legacy-v2-api-integration-tests.yml | Scopes credentials and removes test token exposure. |
| .github/workflows/kubeflow-pipelines-manifests.yml | Applies read-only checkout hardening. |
| .github/workflows/kfp-webhooks.yml | Scopes reusable builds and hardens actions. |
| .github/workflows/kfp-sdk-unit-tests.yml | Applies read-only checkout hardening. |
| .github/workflows/kfp-sdk-tests.yml | Applies read-only checkout hardening. |
| .github/workflows/kfp-sdk-client-tests.yml | Scopes reusable builds and hardens actions. |
| .github/workflows/kfp-kubernetes-native-migration-tests.yaml | Scopes reusable builds and hardens actions. |
| .github/workflows/kfp-kubernetes-library-test.yml | Applies read-only checkout hardening. |
| .github/workflows/image-builds.yml | Removes ambient token and pins build actions. |
| .github/workflows/image-builds-release.yml | Declares publication permissions without inherited secrets. |
| .github/workflows/image-builds-master.yml | Declares publication permissions without inherited secrets. |
| .github/workflows/go-image-digests.yml | Hardens checkout. |
| .github/workflows/gh-workflow-approve.yml | Removes contents scope and pins scripting actions. |
| .github/workflows/frontend.yml | Scopes permissions and pins setup actions. |
| .github/workflows/e2e-test.yml | Scopes reusable builds and hardens checkouts. |
| .github/workflows/e2e-test-frontend.yml | Scopes credentials and pins integration actions. |
| .github/workflows/docs.yml | Hardens checkouts and pins artifact upload. |
| .github/workflows/docs-freshness.yml | Scopes credentials and pins setup actions. |
| .github/workflows/create-manifest.yml | Removes OIDC scope and pins promotion actions. |
| .github/workflows/contributor-report.yml | Hardens trusted checkout and pins Python setup. |
| .github/workflows/compiler-tests.yml | Applies read-only checkout hardening. |
| .github/workflows/codeql.yml | Narrows permissions and pins scanning actions. |
| .github/workflows/ci-scripts-tests.yml | Pins setup actions and hardens checkouts. |
| .github/workflows/ci-passed-stale-revoke.yml | Pins trusted checkout. |
| .github/workflows/ci-health-report.yml | Hardens report checkout. |
| .github/workflows/ci-checks.yml | Removes issue-write scope and pins actions. |
| .github/workflows/check-uv-lock.yml | Scopes credentials and pins dependency tooling. |
| .github/workflows/check-requirements-txt.yml | Scopes credentials and pins dependency tooling. |
| .github/workflows/build-tools-images.yml | Separates PR builds from trusted publication. |
| .github/workflows/build-and-push.yml | Separates read-only dry runs from publishing. |
| .github/workflows/arm64-presubmit.yml | Declares caller and smoke permissions. |
| .github/workflows/api-server-tests.yml | Scopes reusable builds and hardens checkouts. |
| .github/resources/scripts/workflow_permissions_test.py | Guards permissions, caller contracts, and action pins. |
| .github/resources/scripts/release_image_validation_test.py | Updates checkout expectations. |
| .github/resources/scripts/publish_packages_workflow_test.py | Tests publication isolation and artifact integrity. |
| .github/resources/scripts/maintainer_tools_workflow_test.py | Tests split build paths and promotion gates. |
| .github/resources/scripts/image_publication_permissions_test.py | Tests dry-run and publication permission boundaries. |
| .github/resources/scripts/docker_registry_mirror_test.py | Tracks extracted tooling build steps. |
| .github/resources/scripts/ci_image_artifacts_test.py | Uses structural workflow assertions. |
| .github/resources/scripts/ci_base_workflows_test.py | Accepts pinned Python action references. |
| .github/resources/scripts/artifact_workflow_test_support.py | Supports dependency-result expressions. |
| .github/resources/scripts/artifact_workflow_test_support_test.py | Covers skipped dependency results. |
| .github/resources/scripts/artifact_download_callers_test.py | Allows checksum-verified publisher downloads. |
| .github/actions/upload-artifact-with-retry/action.yml | Pins both upload attempts. |
| .github/actions/test-and-report/action.yml | Pins cache and Python actions. |
| .github/actions/setup-python/action.yml | Pins Python and uv setup. |
| .github/actions/setup-python-pip-cache/action.yml | Pins Python and cache actions. |
| .github/actions/junit-summary/action.yml | Pins Python setup. |
| .github/actions/download-artifact-with-retry/action.yml | Pins both download attempts. |
| .github/actions/create-cluster/action.yml | Pins cache and cluster actions. |
| .github/actions/build-tools-images/action.yml | Shares native tooling builds and evidence collection. |
| .github/actions/arm64-smoke/action.yml | Pins smoke-evidence upload. |
Review effort: Balanced
Signed-off-by: Jeff Spahr <spahrj@gmail.com>
Collaborator
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zazulam 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Several CI workflows inherit the repository's default token permissions instead of declaring what they need. Some dry-run and PR build paths also receive publishing scopes, and most checkouts leave a token available to later build commands. This increases the impact of compromised build code or an action dependency. Simply lowering the repository default would also break reusable image publication callers that do not explicitly allow their callees' permissions.
Changes
Validation
Rollout
Repository settings are unchanged. Merge and validate these workflow changes before changing settings. Before lowering the repository token default, minimally backport the required image-build/publication caller permissions to supported release branches (including
release-2.18) and validate their CI and release dry runs. SHA-policy enforcement and an action allowlist require release-ref and transitive-dependency compatibility checks. A protected PyPI environment remains a coordinated follow-up because its identity must match the external Trusted Publisher configuration.Checklist: