MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / ValidateInputFile

Function ValidateInputFile

cmd/gosqlx/internal/validate/security.go:139–142  ·  view source on GitHub ↗

ValidateInputFile performs comprehensive security validation on a file path. This is the primary security entry point for file validation. It creates a SecurityValidator with default settings and validates the given file path. Security checks performed: 1. Path traversal prevention (../ sequences)

(path string)

Source from the content-addressed store, hash-verified

137//
138// ValidateInputFile performs comprehensive security validation on a file path
139func ValidateInputFile(path string) error {
140 validator := NewSecurityValidator()
141 return validator.Validate(path)
142}
143
144// Validate performs comprehensive security checks on a file path.
145//

Calls 2

ValidateMethod · 0.95
NewSecurityValidatorFunction · 0.85