diff --git a/pkg/k8s/commands/cluster.go b/pkg/k8s/commands/cluster.go index 1fec319e6449..9d29e43b9dc9 100644 --- a/pkg/k8s/commands/cluster.go +++ b/pkg/k8s/commands/cluster.go @@ -23,7 +23,7 @@ func clusterRun(ctx context.Context, opts flag.Options, cluster k8s.Cluster) err var err error switch opts.Format { case types.FormatCycloneDX: - artifacts, err = trivyk8s.New(cluster, log.Logger).ListBomInfo(ctx) + artifacts, err = trivyk8s.New(cluster, log.Logger).ListClusterBomInfo(ctx) if err != nil { return xerrors.Errorf("get k8s artifacts with node info error: %w", err) }