fix: used int when needed octal for permission check

This commit is contained in:
2026-05-20 13:27:08 -06:00
parent 41fdffb95c
commit b79f77ea42
+2 -2
View File
@@ -61,8 +61,8 @@ func (c *Config) loadToken(path string) error {
return fmt.Errorf("failed to stat env file: %v", err) return fmt.Errorf("failed to stat env file: %v", err)
} }
if info.Mode().Perm() != 0640 { if info.Mode().Perm() != 0o640 {
return fmt.Errorf("env file perms not secure, expected 0600 got %o", info.Mode().Perm()) return fmt.Errorf("env file perms not secure, expected 0640 got %o", info.Mode().Perm())
} }
//#nosec G304 -- config is known path //#nosec G304 -- config is known path
data, err := os.ReadFile(path) data, err := os.ReadFile(path)