Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions central/graphql/resolvers/policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/graph-gophers/graphql-go"
"github.com/stackrox/rox/central/graphql/resolvers/loaders"
"github.com/stackrox/rox/central/metrics"
policyUtils "github.com/stackrox/rox/central/policy/utils"
v1 "github.com/stackrox/rox/generated/api/v1"
"github.com/stackrox/rox/generated/storage"
pkgMetrics "github.com/stackrox/rox/pkg/metrics"
mitreUtils "github.com/stackrox/rox/pkg/mitre/utils"
"github.com/stackrox/rox/pkg/policyutils"
"github.com/stackrox/rox/pkg/search"
"github.com/stackrox/rox/pkg/search/paginated"
Expand Down Expand Up @@ -330,7 +330,7 @@ func (resolver *policyResolver) LatestViolation(ctx context.Context, args RawQue

func (resolver *policyResolver) FullMitreAttackVectors(_ context.Context) ([]*mitreAttackVectorResolver, error) {
return resolver.root.wrapMitreAttackVectors(
policyUtils.GetFullMitreAttackVectors(resolver.root.mitreStore, resolver.data),
mitreUtils.GetFullMitreAttackVectors(resolver.root.mitreStore, resolver.data),
)
}

Expand Down
4 changes: 2 additions & 2 deletions central/notifiers/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"text/template"

"github.com/pkg/errors"
"github.com/stackrox/rox/central/policy/utils"
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/images/types"
"github.com/stackrox/rox/pkg/mitre/datastore"
mitreUtils "github.com/stackrox/rox/pkg/mitre/utils"
"github.com/stackrox/rox/pkg/readable"
"github.com/stackrox/rox/pkg/set"
"github.com/stackrox/rox/pkg/stringutils"
Expand Down Expand Up @@ -125,7 +125,7 @@ func FormatAlert(alert *storage.Alert, alertLink string, funcMap template.FuncMa
funcMap["valuePrinter"] = valuePrinter
}

fullMitreVectors, err := utils.GetFullMitreAttackVectors(mitreStore, alert.GetPolicy())
fullMitreVectors, err := mitreUtils.GetFullMitreAttackVectors(mitreStore, alert.GetPolicy())
if err != nil {
log.Errorf("Could not get MITRE details for alert %s: %v", alert.GetId(), err)
}
Expand Down
4 changes: 2 additions & 2 deletions central/policy/service/service_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
notifierDataStore "github.com/stackrox/rox/central/notifier/datastore"
notifierProcessor "github.com/stackrox/rox/central/notifier/processor"
"github.com/stackrox/rox/central/policy/datastore"
policyUtils "github.com/stackrox/rox/central/policy/utils"
"github.com/stackrox/rox/central/reprocessor"
"github.com/stackrox/rox/central/role/resources"
"github.com/stackrox/rox/central/sensor/service/connection"
Expand All @@ -41,6 +40,7 @@ import (
"github.com/stackrox/rox/pkg/grpc/authz/user"
"github.com/stackrox/rox/pkg/logging"
mitreDS "github.com/stackrox/rox/pkg/mitre/datastore"
mitreUtils "github.com/stackrox/rox/pkg/mitre/utils"
"github.com/stackrox/rox/pkg/policies"
"github.com/stackrox/rox/pkg/protoconv"
"github.com/stackrox/rox/pkg/sac"
Expand Down Expand Up @@ -266,7 +266,7 @@ func (s *serviceImpl) GetPolicyMitreVectors(ctx context.Context, request *v1.Get
return nil, err
}

fullVectors, err := policyUtils.GetFullMitreAttackVectors(s.mitreStore, policy)
fullVectors, err := mitreUtils.GetFullMitreAttackVectors(s.mitreStore, policy)
if err != nil {
return nil, errors.Wrapf(err, "fetching MITRE ATT&CK vectors for policy %q", request.GetId())
}
Expand Down
File renamed without changes.