fix: critical security hardening (6 fixes)#16
Merged
Conversation
1. YAML size limit: Add 1MB file size validation to LoadConfig and LoadScenario to prevent OOM via oversized/malicious YAML files. 2. Exec probe command blocklist: Block dangerous executables (shells, curl, wget, nc, python, etc.) from exec probes to prevent RCE via user-supplied scenario YAML files. 3. Exec probe audit logging: Log every exec probe invocation at WARN level via slog for security monitoring and forensics. 4. Netshoot image pinning: Replace nicolaka/netshoot:latest with nicolaka/netshoot:v0.13 to prevent supply chain attacks via mutable image tags. 5. K8s client configuration fix: Eliminate dual config build in NewKubernetesClient (previously called buildK8sConfig and newK8sClientSet independently, creating two separate configs). Now uses single config source of truth. 6. NET_ADMIN hardening: Harden ephemeral container security context by dropping ALL capabilities except NET_ADMIN, setting readOnlyRootFilesystem, runAsNonRoot, runAsUser=1000, and allowPrivilegeEscalation=false.
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.
YAML size limit: Add 1MB file size validation to LoadConfig and LoadScenario to prevent OOM via oversized/malicious YAML files.
Exec probe command blocklist: Block dangerous executables (shells, curl, wget, nc, python, etc.) from exec probes to prevent RCE via user-supplied scenario YAML files.
Exec probe audit logging: Log every exec probe invocation at WARN level via slog for security monitoring and forensics.
Netshoot image pinning: Replace nicolaka/netshoot:latest with nicolaka/netshoot:v0.13 to prevent supply chain attacks via mutable image tags.
K8s client configuration fix: Eliminate dual config build in NewKubernetesClient (previously called buildK8sConfig and newK8sClientSet independently, creating two separate configs). Now uses single config source of truth.
NET_ADMIN hardening: Harden ephemeral container security context by dropping ALL capabilities except NET_ADMIN, setting readOnlyRootFilesystem, runAsNonRoot, runAsUser=1000, and allowPrivilegeEscalation=false.