feat(kustomize): allow deterministic renderer selection - #7655
Open
lokesh0186 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Lokesh Chauhan <lokesh0186@gmail.com>
lokesh0186
requested a deployment
to
scan-security
August 21, 2026 13:30 — with
GitHub Actions
Waiting
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.
Allow deterministic Kustomize implementation selection
Closes #7600
Summary
Add a closed
--kustomize-command {auto,kubectl,kustomize}option, with matchingCKV_KUSTOMIZE_COMMANDand YAMLkustomize-commandconfiguration.autopreserves Checkov's existing kubectl-first behavior.kubectlselects onlykubectl kustomize.kustomizeselects only standalonekustomize build.Configuration precedence
The implementation follows Checkov's existing configargparse precedence:
The default remains
auto, so existing users retain current behavior.Failure behavior
A missing or unusable explicitly selected implementation is reported as an invalid invocation and normally exits 2. Checkov's existing
--no-fail-on-crashoption changes the shell exit to 0 while retaining the diagnostic; the documentation and tests state this interaction explicitly.An explicitly selected implementation that starts but exits nonzero is never replaced by the other implementation.
Relationship to #7615
This change controls which Kustomize implementation is selected. It does not change build-error reporting.
I tested this branch on top of #7615's current head. Explicitly selected build failures continue to produce parsing-error evidence, and no fallback to the other implementation occurs.
Tests
Added native tests for:
--show-configand--create-config;--no-fail-on-crashinteraction;Existing Kustomize/config suites, pre-commit hooks, import-linter, mypy, package build, and clean-wheel import smoke pass.