diff --git a/cmd/api/src/api/v2/agi.go b/cmd/api/src/api/v2/agi.go index 1c1f8c6621..1003c62756 100644 --- a/cmd/api/src/api/v2/agi.go +++ b/cmd/api/src/api/v2/agi.go @@ -431,7 +431,7 @@ func (s Resources) getAssetGroupMembers(response http.ResponseWriter, request *h } else if assetGroup, err := s.DB.GetAssetGroup(request.Context(), int32(assetGroupID)); err != nil { api.HandleDatabaseError(request, response, err) return agMembers, err - } else if assetGroupNodes, err := s.GraphQuery.GetAssetGroupNodes(request.Context(), assetGroup.Tag); err != nil { + } else if assetGroupNodes, err := s.GraphQuery.GetAssetGroupNodes(request.Context(), assetGroup.Tag, assetGroup.SystemGroup); err != nil { api.WriteErrorResponse(request.Context(), api.BuildErrorResponse(http.StatusInternalServerError, fmt.Sprintf("Graph error fetching nodes for asset group ID %v: %v", assetGroup.ID, err), request), response) return agMembers, err } else if agMembers, err = parseAGMembersFromNodes(assetGroupNodes, assetGroup.Selectors, int(assetGroup.ID)).SortBy(sortByColumns); err != nil { @@ -520,16 +520,14 @@ func parseAGMembersFromNodes(nodes graph.NodeSet, selectors model.AssetGroupSele if node.Kinds.ContainsOneOf(azure.Entity) { if tenantID, err := node.Properties.Get(azure.TenantID.String()).String(); err != nil { - log.Warnf("%s is missing for node %d, skipping AG Membership...", azure.TenantID.String(), node.ID) - continue + log.Warnf("%s is missing for node %d", azure.TenantID.String(), node.ID) } else { agMember.EnvironmentKind = azure.Tenant.String() agMember.EnvironmentID = tenantID } } else if node.Kinds.ContainsOneOf(ad.Entity) { if domainSID, err := node.Properties.Get(ad.DomainSID.String()).String(); err != nil { - log.Warnf("%s is missing for node %d, skipping AG Membership...", ad.DomainSID.String(), node.ID) - continue + log.Warnf("%s is missing for node %d", ad.DomainSID.String(), node.ID) } else { agMember.EnvironmentKind = ad.Domain.String() agMember.EnvironmentID = domainSID diff --git a/cmd/api/src/api/v2/agi_internal_test.go b/cmd/api/src/api/v2/agi_internal_test.go index 6bb86bbd2e..734faf841c 100644 --- a/cmd/api/src/api/v2/agi_internal_test.go +++ b/cmd/api/src/api/v2/agi_internal_test.go @@ -100,7 +100,7 @@ func TestParseAGMembersFromNodes_(t *testing.T) { func TestParseAGMembersFromNodes_MissingNodeProperties(t *testing.T) { nodes := graph.NodeSet{ - // the parse fn should handle nodes with missing name and missing properties with warnings and no output + // the parse fn should handle nodes with missing name and missing properties with warnings 1: &graph.Node{ ID: 1, Kinds: graph.Kinds{ad.Entity, ad.Domain}, @@ -125,5 +125,5 @@ func TestParseAGMembersFromNodes_MissingNodeProperties(t *testing.T) { SystemSelector: false, }}, 1) - require.Equal(t, 0, len(members)) + require.Equal(t, 2, len(members)) } diff --git a/cmd/api/src/api/v2/agi_test.go b/cmd/api/src/api/v2/agi_test.go index 66a6f30961..e94e6faead 100644 --- a/cmd/api/src/api/v2/agi_test.go +++ b/cmd/api/src/api/v2/agi_test.go @@ -1211,7 +1211,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{}, fmt.Errorf("GetAssetGroupNodes fail")) }, Test: func(output apitest.Output) { @@ -1228,7 +1228,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1278,7 +1278,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1314,7 +1314,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1355,7 +1355,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1398,7 +1398,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1433,7 +1433,7 @@ func TestResources_ListAssetGroupMembers(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1574,7 +1574,7 @@ func TestResources_ListAssetGroupMembersCount(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{}, fmt.Errorf("GetAssetGroupNodes fail")) }, Test: func(output apitest.Output) { @@ -1591,7 +1591,7 @@ func TestResources_ListAssetGroupMembersCount(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, @@ -1627,7 +1627,7 @@ func TestResources_ListAssetGroupMembersCount(t *testing.T) { GetAssetGroup(gomock.Any(), gomock.Any()). Return(assetGroup, nil) mockGraph.EXPECT(). - GetAssetGroupNodes(gomock.Any(), gomock.Any()). + GetAssetGroupNodes(gomock.Any(), gomock.Any(), gomock.Any()). Return(graph.NodeSet{ 1: &graph.Node{ ID: 1, diff --git a/cmd/api/src/daemons/datapipe/analysis.go b/cmd/api/src/daemons/datapipe/analysis.go index 00d7ef92c2..b76f928c93 100644 --- a/cmd/api/src/daemons/datapipe/analysis.go +++ b/cmd/api/src/daemons/datapipe/analysis.go @@ -21,7 +21,6 @@ import ( "errors" "fmt" - "github.com/specterops/bloodhound/analysis" adAnalysis "github.com/specterops/bloodhound/analysis/ad" "github.com/specterops/bloodhound/dawgs/graph" "github.com/specterops/bloodhound/log" @@ -92,7 +91,7 @@ func RunAnalysisOperations(ctx context.Context, db database.Database, graphDB gr stats.LogStats() } - if err := agi.RunAssetGroupIsolationCollections(ctx, db, graphDB, analysis.GetNodeKindDisplayLabel); err != nil { + if err := agi.RunAssetGroupIsolationCollections(ctx, db, graphDB); err != nil { collectedErrors = append(collectedErrors, fmt.Errorf("asset group isolation collection failed: %w", err)) agiFailed = true } diff --git a/cmd/api/src/queries/graph.go b/cmd/api/src/queries/graph.go index d6a6acf3f9..fc8b94cd43 100644 --- a/cmd/api/src/queries/graph.go +++ b/cmd/api/src/queries/graph.go @@ -24,7 +24,6 @@ import ( "fmt" "net/http" "net/url" - "slices" "sort" "strconv" "strings" @@ -132,7 +131,7 @@ func BuildEntityQueryParams(request *http.Request, queryName string, pathDelegat type Graph interface { GetAssetGroupComboNode(ctx context.Context, owningObjectID string, assetGroupTag string) (map[string]any, error) - GetAssetGroupNodes(ctx context.Context, assetGroupTag string) (graph.NodeSet, error) + GetAssetGroupNodes(ctx context.Context, assetGroupTag string, isSystemGroup bool) (graph.NodeSet, error) GetAllShortestPaths(ctx context.Context, startNodeID string, endNodeID string, filter graph.Criteria) (graph.PathSet, error) SearchNodesByName(ctx context.Context, nodeKinds graph.Kinds, nameQuery string, skip int, limit int) ([]model.SearchResult, error) SearchByNameOrObjectID(ctx context.Context, searchValue string, searchType string) (graph.NodeSet, error) @@ -154,9 +153,9 @@ type GraphQuery struct { Cache cache.Cache SlowQueryThreshold int64 // Threshold in milliseconds DisableCypherComplexityLimit bool - EnableCypherMutations bool - cypherEmitter format.Emitter - strippedCypherEmitter format.Emitter + EnableCypherMutations bool + cypherEmitter format.Emitter + strippedCypherEmitter format.Emitter } func NewGraphQuery(graphDB graph.Database, cache cache.Cache, cfg config.Configuration) *GraphQuery { @@ -223,42 +222,20 @@ func (s *GraphQuery) GetAssetGroupComboNode(ctx context.Context, owningObjectID }) } -func (s *GraphQuery) GetAssetGroupNodes(ctx context.Context, assetGroupTag string) (graph.NodeSet, error) { +func (s *GraphQuery) GetAssetGroupNodes(ctx context.Context, assetGroupTag string, isSystemGroup bool) (graph.NodeSet, error) { var ( assetGroupNodes graph.NodeSet err error ) - return assetGroupNodes, s.Graph.ReadTransaction(ctx, func(tx graph.Transaction) error { - if assetGroupNodes, err = ops.FetchNodeSet(tx.Nodes().Filterf(func() graph.Criteria { - filters := []graph.Criteria{ - query.KindIn(query.Node(), azure.Entity, ad.Entity), - query.Or( - query.StringContains(query.NodeProperty(common.SystemTags.String()), assetGroupTag), - query.StringContains(query.NodeProperty(common.UserTags.String()), assetGroupTag), - ), - } - return query.And(filters...) - })); err != nil { + err = s.Graph.ReadTransaction(ctx, func(tx graph.Transaction) error { + if assetGroupNodes, err = agi.FetchAssetGroupNodes(tx, assetGroupTag, isSystemGroup); err != nil { return err - } else { - for _, node := range assetGroupNodes { - // We need to filter out nodes that do not contain an exact tag match - var ( - systemTags, _ = node.Properties.Get(common.SystemTags.String()).String() - userTags, _ = node.Properties.Get(common.UserTags.String()).String() - allTags = append(strings.Split(systemTags, " "), strings.Split(userTags, " ")...) - ) - - if !slices.Contains(allTags, assetGroupTag) { - assetGroupNodes.Remove(node.ID) - } else { - node.Properties.Set("type", analysis.GetNodeKindDisplayLabel(node)) - } - } - return nil } + return nil }) + + return assetGroupNodes, err } func (s *GraphQuery) GetAllShortestPaths(ctx context.Context, startNodeID string, endNodeID string, filter graph.Criteria) (graph.PathSet, error) { diff --git a/cmd/api/src/queries/graph_integration_test.go b/cmd/api/src/queries/graph_integration_test.go index 02813468d9..f169f502d8 100644 --- a/cmd/api/src/queries/graph_integration_test.go +++ b/cmd/api/src/queries/graph_integration_test.go @@ -295,13 +295,13 @@ func TestGetAssetGroupNodes(t *testing.T) { }, func(harness integration.HarnessDetails, db graph.Database) { graphQuery := queries.NewGraphQuery(db, cache.Cache{}, config.Configuration{}) - tierZeroNodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.TierZeroTag) + tierZeroNodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.TierZeroTag, true) require.Nil(t, err) - customGroup1Nodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.CustomTag1) + customGroup1Nodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.CustomTag1, false) require.Nil(t, err) - customGroup2Nodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.CustomTag2) + customGroup2Nodes, err := graphQuery.GetAssetGroupNodes(context.Background(), harness.AssetGroupNodesHarness.CustomTag2, false) require.Nil(t, err) require.True(t, tierZeroNodes.Contains(harness.AssetGroupNodesHarness.GroupB)) diff --git a/cmd/api/src/queries/mocks/graph.go b/cmd/api/src/queries/mocks/graph.go index c02f45b1fd..7a6368472c 100644 --- a/cmd/api/src/queries/mocks/graph.go +++ b/cmd/api/src/queries/mocks/graph.go @@ -135,18 +135,18 @@ func (mr *MockGraphMockRecorder) GetAssetGroupComboNode(arg0, arg1, arg2 interfa } // GetAssetGroupNodes mocks base method. -func (m *MockGraph) GetAssetGroupNodes(arg0 context.Context, arg1 string) (graph.NodeSet, error) { +func (m *MockGraph) GetAssetGroupNodes(arg0 context.Context, arg1 string, arg2 bool) (graph.NodeSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAssetGroupNodes", arg0, arg1) + ret := m.ctrl.Call(m, "GetAssetGroupNodes", arg0, arg1, arg2) ret0, _ := ret[0].(graph.NodeSet) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAssetGroupNodes indicates an expected call of GetAssetGroupNodes. -func (mr *MockGraphMockRecorder) GetAssetGroupNodes(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockGraphMockRecorder) GetAssetGroupNodes(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAssetGroupNodes", reflect.TypeOf((*MockGraph)(nil).GetAssetGroupNodes), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAssetGroupNodes", reflect.TypeOf((*MockGraph)(nil).GetAssetGroupNodes), arg0, arg1, arg2) } // GetEntityByObjectId mocks base method. diff --git a/cmd/api/src/services/agi/agi.go b/cmd/api/src/services/agi/agi.go index 083556f800..cbb72cf5bb 100644 --- a/cmd/api/src/services/agi/agi.go +++ b/cmd/api/src/services/agi/agi.go @@ -19,7 +19,10 @@ package agi import ( "context" + "slices" + "strings" + "github.com/specterops/bloodhound/analysis" "github.com/specterops/bloodhound/dawgs/graph" "github.com/specterops/bloodhound/dawgs/ops" "github.com/specterops/bloodhound/dawgs/query" @@ -36,7 +39,38 @@ type AgiData interface { CreateAssetGroupCollection(ctx context.Context, collection model.AssetGroupCollection, entries model.AssetGroupCollectionEntries) error } -func RunAssetGroupIsolationCollections(ctx context.Context, db AgiData, graphDB graph.Database, kindGetter func(*graph.Node) string) error { +func FetchAssetGroupNodes(tx graph.Transaction, assetGroupTag string, isSystemGroup bool) (graph.NodeSet, error) { + var ( + assetGroupNodes graph.NodeSet + tagPropertyStr = common.SystemTags.String() + err error + ) + + if !isSystemGroup { + tagPropertyStr = common.UserTags.String() + } + + if assetGroupNodes, err = ops.FetchNodeSet(tx.Nodes().Filterf(func() graph.Criteria { + return query.And( + query.KindIn(query.Node(), ad.Entity, azure.Entity), + query.StringContains(query.NodeProperty(tagPropertyStr), assetGroupTag), + ) + })); err != nil { + return graph.NodeSet{}, err + } else { + // tags are space seperated, so we have to loop and remove any that are not exact matches + for _, node := range assetGroupNodes { + tags, _ := node.Properties.Get(tagPropertyStr).String() + if !slices.Contains(strings.Split(tags, " "), assetGroupTag) { + assetGroupNodes.Remove(node.ID) + } + } + } + + return assetGroupNodes, err +} + +func RunAssetGroupIsolationCollections(ctx context.Context, db AgiData, graphDB graph.Database) error { defer log.Measure(log.LevelInfo, "Asset Group Isolation Collections")() if assetGroups, err := db.GetAllAssetGroups(ctx, "", model.SQLFilter{}); err != nil { @@ -44,18 +78,7 @@ func RunAssetGroupIsolationCollections(ctx context.Context, db AgiData, graphDB } else { return graphDB.WriteTransaction(ctx, func(tx graph.Transaction) error { for _, assetGroup := range assetGroups { - if assetGroupNodes, err := ops.FetchNodes(tx.Nodes().Filterf(func() graph.Criteria { - tagPropertyStr := common.SystemTags.String() - - if !assetGroup.SystemGroup { - tagPropertyStr = common.UserTags.String() - } - - return query.And( - query.KindIn(query.Node(), ad.Entity, azure.Entity), - query.StringContains(query.NodeProperty(tagPropertyStr), assetGroup.Tag), - ) - })); err != nil { + if assetGroupNodes, err := FetchAssetGroupNodes(tx, assetGroup.Tag, assetGroup.SystemGroup); err != nil { return err } else { var ( @@ -65,16 +88,18 @@ func RunAssetGroupIsolationCollections(ctx context.Context, db AgiData, graphDB } ) - for idx, node := range assetGroupNodes { + idx := 0 + for _, node := range assetGroupNodes { if objectID, err := node.Properties.Get(common.ObjectID.String()).String(); err != nil { log.Errorf("Node %d that does not have valid %s property", node.ID, common.ObjectID) } else { entries[idx] = model.AssetGroupCollectionEntry{ ObjectID: objectID, - NodeLabel: kindGetter(node), + NodeLabel: analysis.GetNodeKindDisplayLabel(node), Properties: node.Properties.Map, } } + idx++ } // Enter a collection, even if it's empty to signal that we did do a tagging/collection run diff --git a/cmd/ui/src/utils.ts b/cmd/ui/src/utils.ts index fdb6579f39..6c93c0caeb 100644 --- a/cmd/ui/src/utils.ts +++ b/cmd/ui/src/utils.ts @@ -25,7 +25,7 @@ import { isLink, isNode } from 'src/ducks/graph/utils'; import { Glyph } from 'src/rendering/programs/node.glyphs'; import { store } from 'src/store'; -const IGNORE_401_LOGOUT = ['/api/v2/login', '/api/v2/logout', '/api/v2/features'] +const IGNORE_401_LOGOUT = ['/api/v2/login', '/api/v2/logout', '/api/v2/features']; export const getDatesInRange = (startDate: Date, endDate: Date) => { const date = new Date(startDate.getTime()); diff --git a/packages/go/analysis/go.mod b/packages/go/analysis/go.mod index 07f6010adc..b56c4506d8 100644 --- a/packages/go/analysis/go.mod +++ b/packages/go/analysis/go.mod @@ -21,7 +21,7 @@ go 1.21 require ( github.com/RoaringBitmap/roaring v1.3.0 github.com/bloodhoundad/azurehound/v2 v2.0.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/mock v0.2.0 ) diff --git a/packages/go/analysis/go.sum b/packages/go/analysis/go.sum index 825742456a..5f1ca3c69e 100644 --- a/packages/go/analysis/go.sum +++ b/packages/go/analysis/go.sum @@ -7,7 +7,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/packages/go/bomenc/go.mod b/packages/go/bomenc/go.mod index 9230c24b52..580d23fe3e 100644 --- a/packages/go/bomenc/go.mod +++ b/packages/go/bomenc/go.mod @@ -1,3 +1,19 @@ +// Copyright 2024 Specter Ops, Inc. +// +// Licensed under the Apache License, Version 2.0 +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + module github.com/specterops/bloodhound/bomenc go 1.21.3 @@ -9,6 +25,9 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/packages/go/bomenc/go.sum b/packages/go/bomenc/go.sum index 53f41df4ba..df75b7807b 100644 --- a/packages/go/bomenc/go.sum +++ b/packages/go/bomenc/go.sum @@ -1,12 +1,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/packages/go/cache/go.mod b/packages/go/cache/go.mod index 18f5b42f51..d02a6fee36 100644 --- a/packages/go/cache/go.mod +++ b/packages/go/cache/go.mod @@ -1,17 +1,17 @@ // Copyright 2023 Specter Ops, Inc. -// +// // Licensed under the Apache License, Version 2.0 // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // SPDX-License-Identifier: Apache-2.0 module github.com/specterops/bloodhound/cache @@ -20,7 +20,7 @@ go 1.21 require ( github.com/hashicorp/golang-lru v0.6.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( diff --git a/packages/go/cache/go.sum b/packages/go/cache/go.sum index caaa23039d..faab3ea4f0 100644 --- a/packages/go/cache/go.sum +++ b/packages/go/cache/go.sum @@ -4,6 +4,6 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/packages/go/crypto/go.mod b/packages/go/crypto/go.mod index 13e9d72d4c..0a8dbe79bb 100644 --- a/packages/go/crypto/go.mod +++ b/packages/go/crypto/go.mod @@ -29,7 +29,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/stretchr/testify v1.9.0 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect diff --git a/packages/go/crypto/go.sum b/packages/go/crypto/go.sum index cb70c46d47..a743df069d 100644 --- a/packages/go/crypto/go.sum +++ b/packages/go/crypto/go.sum @@ -5,7 +5,7 @@ github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a h1:N9zuLhTvBSRt0g github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig= github.com/shirou/gopsutil/v3 v3.23.5 h1:5SgDCeQ0KW0S4N0znjeM/eFHXXOKyv2dVNgRq/c9P6Y= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= diff --git a/packages/go/cypher/go.mod b/packages/go/cypher/go.mod index 4dd1b14df6..62ae46041e 100644 --- a/packages/go/cypher/go.mod +++ b/packages/go/cypher/go.mod @@ -22,7 +22,7 @@ require ( cuelang.org/go v0.5.0 github.com/antlr4-go/antlr/v4 v4.13.0 github.com/jackc/pgtype v1.14.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( @@ -42,7 +42,7 @@ require ( golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/net v0.26.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/text v0.17.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/packages/go/cypher/go.sum b/packages/go/cypher/go.sum index 915b6cad71..1fbe1a8dd9 100644 --- a/packages/go/cypher/go.sum +++ b/packages/go/cypher/go.sum @@ -120,8 +120,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -175,7 +174,7 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= diff --git a/packages/go/cypher/models/pgsql/identifiers_test.go b/packages/go/cypher/models/pgsql/identifiers_test.go index 6f5488eeda..d4589d05c7 100644 --- a/packages/go/cypher/models/pgsql/identifiers_test.go +++ b/packages/go/cypher/models/pgsql/identifiers_test.go @@ -1,3 +1,19 @@ +// Copyright 2024 Specter Ops, Inc. +// +// Licensed under the Apache License, Version 2.0 +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pgsql import ( diff --git a/packages/go/cypher/models/pgsql/test/testcase.go b/packages/go/cypher/models/pgsql/test/testcase.go index 6ea8a0546f..4c369d567c 100644 --- a/packages/go/cypher/models/pgsql/test/testcase.go +++ b/packages/go/cypher/models/pgsql/test/testcase.go @@ -1,3 +1,19 @@ +// Copyright 2024 Specter Ops, Inc. +// +// Licensed under the Apache License, Version 2.0 +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package test import ( diff --git a/packages/go/cypher/models/pgsql/translate/format.go b/packages/go/cypher/models/pgsql/translate/format.go index 48cadc775c..fa7b511797 100644 --- a/packages/go/cypher/models/pgsql/translate/format.go +++ b/packages/go/cypher/models/pgsql/translate/format.go @@ -1,3 +1,19 @@ +// Copyright 2024 Specter Ops, Inc. +// +// Licensed under the Apache License, Version 2.0 +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package translate import ( diff --git a/packages/go/dawgs/drivers/pg/util.go b/packages/go/dawgs/drivers/pg/util.go index 77dd10a34e..e3e75581ad 100644 --- a/packages/go/dawgs/drivers/pg/util.go +++ b/packages/go/dawgs/drivers/pg/util.go @@ -1,3 +1,19 @@ +// Copyright 2024 Specter Ops, Inc. +// +// Licensed under the Apache License, Version 2.0 +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + package pg import "github.com/specterops/bloodhound/dawgs/graph" diff --git a/packages/go/dawgs/go.mod b/packages/go/dawgs/go.mod index 0b1f5d6417..f4fcc66836 100644 --- a/packages/go/dawgs/go.mod +++ b/packages/go/dawgs/go.mod @@ -27,7 +27,7 @@ require ( github.com/neo4j/neo4j-go-driver/v5 v5.9.0 github.com/specterops/bloodhound/cypher v0.0.0-00010101000000-000000000000 github.com/specterops/bloodhound/log v0.0.0-00010101000000-000000000000 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/mock v0.2.0 ) @@ -50,9 +50,9 @@ require ( github.com/rs/zerolog v1.29.1 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/sync v0.7.0 // indirect + golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/text v0.17.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/packages/go/dawgs/go.sum b/packages/go/dawgs/go.sum index 2c359f36ec..22a3a252bf 100644 --- a/packages/go/dawgs/go.sum +++ b/packages/go/dawgs/go.sum @@ -60,19 +60,18 @@ github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/packages/go/errors/go.mod b/packages/go/errors/go.mod index ac8712ce00..42af88d396 100644 --- a/packages/go/errors/go.mod +++ b/packages/go/errors/go.mod @@ -18,7 +18,7 @@ module github.com/specterops/bloodhound/errors go 1.21 -require github.com/stretchr/testify v1.8.4 +require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/packages/go/errors/go.sum b/packages/go/errors/go.sum index 3ee4af40e7..982327c4a7 100644 --- a/packages/go/errors/go.sum +++ b/packages/go/errors/go.sum @@ -14,8 +14,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/packages/go/lab/go.mod b/packages/go/lab/go.mod index fc8df5ef12..f7ea99a45a 100644 --- a/packages/go/lab/go.mod +++ b/packages/go/lab/go.mod @@ -18,7 +18,7 @@ module github.com/specterops/bloodhound/lab go 1.21 -require github.com/stretchr/testify v1.8.4 +require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/packages/go/lab/go.sum b/packages/go/lab/go.sum index 3ee4af40e7..982327c4a7 100644 --- a/packages/go/lab/go.sum +++ b/packages/go/lab/go.sum @@ -14,8 +14,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/packages/go/openapi/doc/openapi.json b/packages/go/openapi/doc/openapi.json index a5972a6c2d..8f9b8b787f 100644 --- a/packages/go/openapi/doc/openapi.json +++ b/packages/go/openapi/doc/openapi.json @@ -4225,6 +4225,13 @@ "schema": { "$ref": "#/components/schemas/api.params.predicate.filter.string" } + }, + { + "name": "scope", + "in": "query", + "schema": { + "$ref": "#/components/schemas/api.params.predicate.filter.contains" + } } ], "responses": { diff --git a/packages/go/schemagen/go.mod b/packages/go/schemagen/go.mod index 02db695238..4040737bc9 100644 --- a/packages/go/schemagen/go.mod +++ b/packages/go/schemagen/go.mod @@ -36,9 +36,9 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/stretchr/testify v1.9.0 // indirect golang.org/x/net v0.26.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/text v0.17.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/packages/go/schemagen/go.sum b/packages/go/schemagen/go.sum index 27649b1ccb..306f65160e 100644 --- a/packages/go/schemagen/go.sum +++ b/packages/go/schemagen/go.sum @@ -41,12 +41,10 @@ github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b/go.mod h1 github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/packages/go/slicesext/go.mod b/packages/go/slicesext/go.mod index 87271cbd8b..a3257cffb2 100644 --- a/packages/go/slicesext/go.mod +++ b/packages/go/slicesext/go.mod @@ -18,7 +18,7 @@ module github.com/specterops/bloodhound/slicesext go 1.21 -require github.com/stretchr/testify v1.8.4 +require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/packages/go/slicesext/go.sum b/packages/go/slicesext/go.sum index 3ee4af40e7..982327c4a7 100644 --- a/packages/go/slicesext/go.sum +++ b/packages/go/slicesext/go.sum @@ -14,8 +14,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/packages/go/stbernard/go.mod b/packages/go/stbernard/go.mod index 7acb2cfc56..7495f0cdd2 100644 --- a/packages/go/stbernard/go.mod +++ b/packages/go/stbernard/go.mod @@ -23,7 +23,7 @@ require ( github.com/gofrs/uuid v4.4.0+incompatible github.com/specterops/bloodhound/log v0.0.0-00010101000000-000000000000 github.com/specterops/bloodhound/slicesext v0.0.0-00010101000000-000000000000 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 golang.org/x/mod v0.17.0 ) diff --git a/packages/go/stbernard/go.sum b/packages/go/stbernard/go.sum index d0ee2a3ec4..b41d07097e 100644 --- a/packages/go/stbernard/go.sum +++ b/packages/go/stbernard/go.sum @@ -25,8 +25,7 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=