fix(security): Change access rights on generated directories
Ppengrep complains, it is right.
This commit is contained in:
@@ -95,7 +95,7 @@ func (chart *HelmChart) SaveTemplates(templateDir string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
servicename := template.Servicename
|
servicename := template.Servicename
|
||||||
if err := os.MkdirAll(filepath.Join(templateDir, servicename), 0o755); err != nil {
|
if err := os.MkdirAll(filepath.Join(templateDir, servicename), 0o600); err != nil {
|
||||||
fmt.Println(utils.IconFailure, err)
|
fmt.Println(utils.IconFailure, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ func (chart *HelmChart) SaveTemplates(templateDir string) {
|
|||||||
// if the name is a path, create the directory
|
// if the name is a path, create the directory
|
||||||
if strings.Contains(name, string(filepath.Separator)) {
|
if strings.Contains(name, string(filepath.Separator)) {
|
||||||
name = filepath.Join(templateDir, name)
|
name = filepath.Join(templateDir, name)
|
||||||
err := os.MkdirAll(filepath.Dir(name), 0o755)
|
err := os.MkdirAll(filepath.Dir(name), 0o600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(utils.IconFailure, err)
|
fmt.Println(utils.IconFailure, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
@@ -173,7 +173,7 @@ func Convert(config ConvertOptions, dockerComposeFile ...string) error {
|
|||||||
os.RemoveAll(config.OutputDir)
|
os.RemoveAll(config.OutputDir)
|
||||||
|
|
||||||
// create the chart directory
|
// create the chart directory
|
||||||
if err := os.MkdirAll(templateDir, 0o755); err != nil {
|
if err := os.MkdirAll(templateDir, 0o600); err != nil {
|
||||||
fmt.Println(utils.IconFailure, err)
|
fmt.Println(utils.IconFailure, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user