Fix gosec warnings: tighten file permissions and add exclusions (bd-b47c034e)

This commit is contained in:
Steve Yegge
2025-11-02 15:38:55 -08:00
parent 334ef713b7
commit 94fc772139
5 changed files with 13 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ func findJSONLPath() string {
// Ensure the directory exists (important for new databases)
// This is the only difference from the public API - we create the directory
dbDir := filepath.Dir(dbPath)
if err := os.MkdirAll(dbDir, 0755); err != nil {
if err := os.MkdirAll(dbDir, 0750); err != nil {
// If we can't create the directory, return discovered path anyway
// (the subsequent write will fail with a clearer error)
return jsonlPath