diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ce2ff30..4b35abf 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -10,6 +10,7 @@ on: - "!main" permissions: + actions: read contents: read pull-requests: write security-events: write diff --git a/go.mod b/go.mod index b7f90dd..8193662 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/go-sql-driver/mysql v1.11.0 github.com/goccy/go-json v0.12.0 github.com/gofiber/fiber/v3 v3.7.0 - github.com/gorilla/websocket v1.5.3 + github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4 github.com/lib/pq v1.12.3 github.com/prometheus/client_golang v1.25.0 github.com/prometheus/client_model v0.6.3 diff --git a/go.sum b/go.sum index 4e551da..8c6157b 100644 --- a/go.sum +++ b/go.sum @@ -119,6 +119,8 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4 h1:PYKzliEgITjLJoJqbV90S0YRaG8LNAsICH6fp6MApC0= +github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.4 h1:ZrN80XjMzpRYk+2FxMDy2A2zz0d5QjJ7GMFSkZLj12A= diff --git a/pkg/scanner/scanner_test.go b/pkg/scanner/scanner_test.go index 6d955b7..882d670 100644 --- a/pkg/scanner/scanner_test.go +++ b/pkg/scanner/scanner_test.go @@ -364,12 +364,6 @@ func (m *resultStore) GetScanResult(context.Context, string, string, string) (*m return m.scan, nil } -func (m *resultStore) saved() []*metadata.ScanResult { - m.mu.Lock() - defer m.mu.Unlock() - return append([]*metadata.ScanResult(nil), m.savedResults...) -} - func TestScanPackage_InfrastructureErrorIsMarked(t *testing.T) { store := &stubMetadataStore{} mgr := newTestManager(t, store)