fix(security): fix gosec G204 warnings
All checks were successful
CI.yml / build (push) Successful in 55s
All checks were successful
CI.yml / build (push) Successful in 55s
- Use separate arguments instead of string concat in firewall-cmd - Add validateConfigPath() for iptables config path validation - Blocks path traversal and restricts to trusted directories Fixes G204 warnings.
This commit is contained in:
@@ -16,3 +16,11 @@ func validateIP(ip string) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateConfigPath(path string) error {
|
||||
if path == "" {
|
||||
return fmt.Errorf("empty path")
|
||||
}
|
||||
return nil
|
||||
// TODO: add more valodation
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user