chore: G306: Expect WriteFile permissions to be 0600 or less (gosec)

main
sudo pacman -Syu 2022-07-03 22:00:35 +07:00 committed by sudo pacman -Syu
parent b6d375fcb7
commit da1af6f096
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
}
// 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)
}
@ -179,7 +179,7 @@ func (a *action) generateRSTChangelog(output, version string, commits []conventi
}
// 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)
}