fix: add nosec annotations for gosec lint warnings

This commit is contained in:
Steve Yegge
2025-11-25 18:22:05 -08:00
parent 9fc0285987
commit ddced40153
4 changed files with 9 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ func AppendDeletion(path string, record DeletionRecord) error {
}
// Open file for appending (create if not exists)
f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) // #nosec G304 - controlled path
f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) // #nosec G302,G304 - controlled path, 0644 needed for git
if err != nil {
return fmt.Errorf("failed to open deletions file for append: %w", err)
}