Repository navigation
feat(security-context): add drop-all-and-add helper with RuntimeDefault seccomp - #229
Merged
AndreyPavlovFlant merged 1 commit intoOct 28, 2026
Conversation
…lt seccomp Add helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_and_add_runtime_default. It returns the same securityContext as the existing *_drop_all_and_add helper plus seccompProfile RuntimeDefault, for containers that must run as root with extra capabilities, where pss_restricted_flexible would allow privilege escalation. Modules no longer have to append seccompProfile by hand after the include. Signed-off-by: Denis Tarabrin <denis.tarabrin@flant.com>
tarabrind
marked this pull request as ready for review
October 28, 2026 13:09
AndreyPavlovFlant
approved these changes
Oct 28, 2026
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.
What
Adds
helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_and_add_runtime_default.It returns the same
securityContextashelm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_and_add, plusseccompProfile: RuntimeDefault:Why
Containers that must run as root with extra capabilities currently have no helper that also sets the RuntimeDefault seccomp profile:
*_drop_all_and_addhas noseccompProfile, so modules append it by hand after theinclude.*_pss_restricted_flexiblesetsseccompProfile, but for root (runAsNonRoot: false) it setsallowPrivilegeEscalation: true, which weakens the context.seccompProfilecannot be combined with the pod security context helpers, as each of them emits its ownsecurityContextblock.The first user is
hubble-relayin thecilium-hubblemodule of Deckhouse (root withDAC_OVERRIDE).Changes
charts/helm_lib/templates/_module_security_context.tpl.tests/templatesandtests/tests.charts/helm_lib/README.mdregenerated withmake doc/build.1.72.32->1.72.33.Testing
make tests/unit: 88 suites, 457 tests passed, including the new one.