Skip to content

Commit

Permalink
sec
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Jun 3, 2024
1 parent 3b3e1cc commit a4d6f54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cloud/common/deploy/image/inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func BuildWrappedImage(args *BuildWrappedImageArgs) (string, error) {
}

buildContext := fmt.Sprintf("%s/build-%s", os.TempDir(), args.ServiceName)
err = os.MkdirAll(buildContext, os.ModePerm)
err = os.MkdirAll(buildContext, 0o750)
if err != nil {
return "", err
}
Expand Down
7 changes: 4 additions & 3 deletions cloud/common/deploy/provider/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func createTerraformStackForNitricProvider(req *deploymentspb.DeploymentUpReques
// modules dir
modulesDir := filepath.Join(parentDir)

err = os.MkdirAll(modulesDir, os.ModePerm)
err = os.MkdirAll(modulesDir, 0o750)
if err != nil {
return err
}
Expand All @@ -151,7 +151,8 @@ func createTerraformStackForNitricProvider(req *deploymentspb.DeploymentUpReques
}
defer data.Close()

out, err := os.Create(filepath.Join(path))
//#nosec G304 -- path unpacking known modules embedded fs
out, err := os.Create(path)
if err != nil {
return err
}
Expand All @@ -161,7 +162,7 @@ func createTerraformStackForNitricProvider(req *deploymentspb.DeploymentUpReques
return err
}

return os.MkdirAll(filepath.Join(path), 0o755)
return os.MkdirAll(path, 0o750)
})
if err != nil {
return err
Expand Down

0 comments on commit a4d6f54

Please sign in to comment.