fix: reduce chmod permissions for created files and directories (#2137)

quiet more security scanner issues: pass one of chmod restriction to remove group and other permissions

Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
Dave 2024-04-25 18:47:06 -04:00 committed by GitHub
parent 365ef92530
commit c8dd8e5ef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 36 additions and 35 deletions

View file

@ -251,7 +251,7 @@ func newMultipartFile(filePath, tag, purpose string) (*strings.Reader, *multipar
// Helper to create test files
func createTestFile(t *testing.T, name string, sizeMB int, option *config.ApplicationConfig) *os.File {
err := os.MkdirAll(option.UploadDir, 0755)
err := os.MkdirAll(option.UploadDir, 0750)
if err != nil {
t.Fatalf("Error MKDIR: %v", err)