validation

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBashScriptContent added in v0.1.0

func ValidateBashScriptContent(content string) error

ValidateBashScriptContent validates bash script content

func ValidateBashScriptFilename added in v0.1.0

func ValidateBashScriptFilename(filename string) error

ValidateBashScriptFilename validates a bash script filename

func ValidateBashScriptName added in v0.1.0

func ValidateBashScriptName(name string) error

ValidateBashScriptName validates a bash script name

func ValidateCommand added in v0.1.0

func ValidateCommand(command string) error

ValidateCommand validates a command string for execution This performs basic sanitization to prevent common attacks

func ValidateCommandName

func ValidateCommandName(name string) error

ValidateCommandName validates a saved command name

func ValidateEnvVarName added in v0.1.0

func ValidateEnvVarName(name string) error

ValidateEnvVarName validates an environment variable name

func ValidateEnvVarValue added in v0.1.0

func ValidateEnvVarValue(value string) error

ValidateEnvVarValue validates an environment variable value

func ValidateHostname

func ValidateHostname(hostname string) error

ValidateHostname validates a hostname according to RFC 1123

func ValidateIPAddress

func ValidateIPAddress(ip string) error

ValidateIPAddress validates an IPv4 or IPv6 address

func ValidateIPOrHostname

func ValidateIPOrHostname(value string) error

ValidateIPOrHostname validates either an IP address or hostname

func ValidatePort

func ValidatePort(port int) error

ValidatePort validates a port number

func ValidateSSHPrivateKey

func ValidateSSHPrivateKey(keyData string) error

ValidateSSHPrivateKey validates that a string is a valid SSH private key

func ValidateUsername

func ValidateUsername(username string) error

ValidateUsername validates a Unix username

func ValidateVaultAddress added in v0.3.0

func ValidateVaultAddress(address string) error

ValidateVaultAddress validates a Vault server address to prevent SSRF attacks Only allows HTTPS URLs with valid public hostnames/IPs

func ValidateVaultGroupName added in v0.3.0

func ValidateVaultGroupName(group string) error

ValidateVaultGroupName validates a Vault group name

func ValidateVaultSecretName added in v0.3.0

func ValidateVaultSecretName(name string) error

ValidateVaultSecretName validates a Vault secret name to prevent path traversal

func ValidateVaultSecretPath added in v0.3.0

func ValidateVaultSecretPath(path string) error

ValidateVaultSecretPath validates a Vault secret path component to prevent path traversal

Types

This section is empty.

Jump to

Keyboard shortcuts

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