actually fixes issue 2
This commit is contained in:
@@ -61,7 +61,7 @@ func (c *Config) loadToken(path string) error {
|
||||
return fmt.Errorf("failed to stat env file: %v", err)
|
||||
}
|
||||
|
||||
if info.Mode().Perm() != 0600 {
|
||||
if info.Mode().Perm() != 0640 {
|
||||
return fmt.Errorf("env file perms not secure, expected 0600 got %o", info.Mode().Perm())
|
||||
}
|
||||
//#nosec G304 -- config is known path
|
||||
|
||||
@@ -54,7 +54,7 @@ func defaultCfgMap() map[string]string {
|
||||
|
||||
func TestReadConfig(t *testing.T) {
|
||||
cfgMap := defaultCfgMap()
|
||||
path := writeConfigFiles(t, cfgMap, 0600)
|
||||
path := writeConfigFiles(t, cfgMap, 0640)
|
||||
|
||||
cfg, err := ReadConfig(path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user