security

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeInput

func SanitizeInput(input string) string

SanitizeInput sanitizes input strings by replacing potentially dangerous characters

func ValidateCommandInput

func ValidateCommandInput(input string) error

ValidateCommandInput validates command inputs for injection attacks

func ValidateContainerImage

func ValidateContainerImage(image string) error

ValidateContainerImage validates a container image reference

func ValidateFilePath

func ValidateFilePath(path string) error

ValidateFilePath validates a file path for security

func ValidateHelmReleaseName

func ValidateHelmReleaseName(name string) error

ValidateHelmReleaseName validates a Helm release name

func ValidateK8sLabel

func ValidateK8sLabel(key, value string) error

ValidateK8sLabel validates a Kubernetes label key and value

func ValidateK8sResourceName

func ValidateK8sResourceName(name string) error

ValidateK8sResourceName validates a Kubernetes resource name

func ValidateNamespace

func ValidateNamespace(namespace string) error

ValidateNamespace validates a Kubernetes namespace

func ValidatePromQLQuery

func ValidatePromQLQuery(query string) error

ValidatePromQLQuery validates a PromQL query for basic security

func ValidateURL

func ValidateURL(url string) error

ValidateURL validates a URL for basic security

func ValidateYAMLContent

func ValidateYAMLContent(content string) error

ValidateYAMLContent validates YAML content for basic security

Types

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

ValidationError represents a validation error

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL