chore: G306: Expect WriteFile permissions to be 0600 or less (gosec)
parent
b6d375fcb7
commit
da1af6f096
|
@ -147,7 +147,7 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actually writing to changelog file
|
// Actually writing to changelog file
|
||||||
if err := os.WriteFile(output, []byte(changelogText), 0o644); err != nil {
|
if err := os.WriteFile(output, []byte(changelogText), 0o600); err != nil {
|
||||||
return fmt.Errorf("failed to write file %s: %w", output, err)
|
return fmt.Errorf("failed to write file %s: %w", output, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ func (a *action) generateRSTChangelog(output, version string, commits []conventi
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actually writing to changelog file
|
// Actually writing to changelog file
|
||||||
if err := os.WriteFile(output, []byte(changelogText), 0o644); err != nil {
|
if err := os.WriteFile(output, []byte(changelogText), 0o600); err != nil {
|
||||||
return fmt.Errorf("failed to write file %s: %w", output, err)
|
return fmt.Errorf("failed to write file %s: %w", output, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue