fix: used int when needed octal for permission check
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user