Skip to content

Prevent arbitrary code execution hack scripts - #4846

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
bexxmodd:security-fix-hack-scripts
May 13, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
bexxmodd:security-fix-hack-scripts

Conversation

@bexxmodd

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
A bad local ombre can execute arbitrary code in the context of the developer or CI running the script.

Instead

  • hack/update-protos.sh: Use secure, repository-local PROTOC_CACHE_DIR to prevent TOCTOU vulnerabilities.
  • hack/update-clientset.sh: Use secure temporary report file location and add cleanup trap.
  • hack/verify-docker-build.sh: Use absolute path for build-and-push.sh to prevent untrusted search path execution.

Does this PR introduce a user-facing change?:

NONE

- hack/update-protos.sh: Use secure, repository-local PROTOC_CACHE_DIR to prevent TOCTOU vulnerabilities.
- hack/update-clientset.sh: Use secure temporary report file location and add cleanup trap.
- hack/verify-docker-build.sh: Use absolute path for build-and-push.sh to prevent untrusted search path execution.

BUG=511042093
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels May 13, 2026
@k8s-ci-robot
k8s-ci-robot requested review from rikatz and thockin May 13, 2026 19:59
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 13, 2026
@bexxmodd bexxmodd changed the title wSecure hack scripts against LPE and untrusted search paths Prevent arbitrary code execution hack scripts May 13, 2026
@rikatz

rikatz commented May 13, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve
thanks!

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 13, 2026
@kflynn

kflynn commented May 13, 2026

Copy link
Copy Markdown
Contributor

Thanks @bexxmodd!

/approve
/unhold

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bexxmodd, kflynn, rikatz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
k8s-ci-robot merged commit a627ea3 into kubernetes-sigs:main May 13, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants