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

Function ValidateFileAccess

cmd/gosqlx/cmd/input_utils.go:252–255  ·  view source on GitHub ↗

ValidateFileAccess checks if we can read the file and it meets size requirements Now uses enhanced security validation with path traversal and symlink checks

(path string)

Source from the content-addressed store, hash-verified

250// ValidateFileAccess checks if we can read the file and it meets size requirements
251// Now uses enhanced security validation with path traversal and symlink checks
252func ValidateFileAccess(path string) error {
253 // Use the enhanced security validator from internal package
254 return validate.ValidateInputFile(path)
255}
256
257// expandFileArgs is a lowercase alias for ExpandFileArgs for backward compatibility
258func expandFileArgs(args []string) ([]string, error) {

Callers 2

formatFileMethod · 0.70
TestValidateFileAccessFunction · 0.70

Calls 1

ValidateInputFileFunction · 0.92

Tested by 1

TestValidateFileAccessFunction · 0.56