Fix gosec security warnings (bd-57)
- Changed file permissions from 0644 → 0600 for JSONL exports and config files - Changed directory permissions from 0755 → 0750 in all test code - Updated .golangci.yml with proper exclusions for false positives - Reduced gosec warnings from 102 to 22 (all remaining are acceptable) Closes bd-57 Amp-Thread-ID: https://ampcode.com/threads/T-f754d957-9e42-4e74-861e-57235c7e6436 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -28,7 +28,7 @@ func dialTestConn(t *testing.T, socketPath string) net.Conn {
|
||||
func TestConnectionLimits(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
dbPath := filepath.Join(tmpDir, ".beads", "test.db")
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0755); err != nil {
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0750); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ func TestConnectionLimits(t *testing.T) {
|
||||
func TestRequestTimeout(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
dbPath := filepath.Join(tmpDir, ".beads", "test.db")
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0755); err != nil {
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0750); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ func TestMemoryPressureDetection(t *testing.T) {
|
||||
|
||||
tmpDir := t.TempDir()
|
||||
dbPath := filepath.Join(tmpDir, ".beads", "test.db")
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0755); err != nil {
|
||||
if err := os.MkdirAll(filepath.Dir(dbPath), 0750); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user