Skip to content

Commit

Permalink
Remove lint exclude for directory permissions
Browse files Browse the repository at this point in the history
This removes the linting exclusion for warning about directories being
created with too open of permissions. We only had one instance of a
directory being created with 755. This does not appear to be needed.
Permissions changed to 750 and golangci-lint exclusion for the warning
is now removed.

Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis committed Jun 18, 2021
1 parent 59c620c commit f8e5fda
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ issues:
# The following are being worked on to remove their exclusion. This list should be reduced or go away all together over time.
# If it is decided they will not be addressed they should be moved above this comment.
- Subprocess launch(ed with variable|ing should be audited)
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
- (G104|G307)
exclude-rules:
- linters:
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/repository/repository_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func createLocalTestProviderFile(t *testing.T, tmpDir, path, msg string) string

dst := filepath.Join(tmpDir, path)
// Create all directories in the standard layout
g.Expect(os.MkdirAll(filepath.Dir(dst), 0755)).To(Succeed())
g.Expect(os.MkdirAll(filepath.Dir(dst), 0750)).To(Succeed())
g.Expect(os.WriteFile(dst, []byte(msg), 0600)).To(Succeed())

return dst
Expand Down

0 comments on commit f8e5fda

Please sign in to comment.