Skip to content

fix(release): add format validation, route inputs.name through env var, remove -f flags - #63

Open
KacperMalachowski wants to merge 1 commit into
kyma-project:mainfrom
KacperMalachowski:fix/release-shell-injection
Open

KacperMalachowski wants to merge 1 commit into
kyma-project:mainfrom
KacperMalachowski:fix/release-shell-injection

Conversation

@KacperMalachowski

Copy link
Copy Markdown

Summary

release.yaml had no validation of inputs.name and used it unquoted in git tag/git push with -f (force) flags, while BOT_TOKEN (contents: write) was live in the runner environment — the highest-risk caller identified in the security finding.

Changes:

  • Add a Validate release name format step that rejects any input not matching ^[0-9]+\.[0-9]+\.[0-9]+$ before checkout
  • Route github.event.inputs.name through env: RELEASE_NAME at the job level
  • Replace unquoted uses with "$RELEASE_NAME" in git tag and git push
  • Remove -f flags from git tag and git push origin (force-tagging without validation is unsafe)

Refs kyma/oci-image-builder#618

…r, remove -f flags

release.yaml had no validation of inputs.name and used it unquoted in
git tag/push with -f (force) flags. BOT_TOKEN was live in the runner
environment during execution.

- Add format validation step (x.y.z regex) before checkout
- Route github.event.inputs.name through env: RELEASE_NAME
- Remove -f from git tag and git push

Refs kyma/oci-image-builder#618

This branch is waiting to be deployed

1 waiting deployment
restricted — c73a31b4 Waiting Sep 30, 2026 by KacperMalachowski via select-environment #103
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.

1 participant