fix(security): fix gosec G204 warnings
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:
d3m0k1d
2026-01-11 22:41:27 +03:00
parent 41ff13fa66
commit 7c0bdc2dfa
3 changed files with 60 additions and 11 deletions

View File

@@ -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
}