Repository: aquasecurity/starboard
Pull request #624 (2021-06-16 13:37:14)

chore: Rename ConfigAuditResult to ConfigAuditReportData
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>

codecov[bot]: # [Codecov](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity) Report
> Merging [#624](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity) (190eb80) into [main](https://codecov.io/gh/aquasecurity/starboard/commit/8a86fe4bb7203f2470094d59009f7864a47470f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity) (8a86fe4) will **decrease** coverage by `23.42%`.
> The diff coverage is `50.00%`.

[![Impacted file tree graph](https://codecov.io/gh/aquasecurity/starboard/pull/624/graphs/tree.svg?width=650&height=150&src=pr&token=qqTGKAJ0Wb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity)](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity)

```diff
@@             Coverage Diff             @@
##             main     #624       +/-   ##
===========================================
- Coverage   68.56%   45.14%   -23.43%     
===========================================
  Files          58       41       -17     
  Lines        4435     3591      -844     
===========================================
- Hits         3041     1621     -1420     
- Misses       1044     1871      +827     
+ Partials      350       99      -251     
```


| [Impacted Files](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity) | Coverage Δ | |
|---|---|---|
| [pkg/plugin/conftest/plugin.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL3BsdWdpbi9jb25mdGVzdC9wbHVnaW4uZ28=) | `86.87% <33.33%> (ø)` | |
| [pkg/plugin/polaris/plugin.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL3BsdWdpbi9wb2xhcmlzL3BsdWdpbi5nbw==) | `88.73% <40.00%> (-1.41%)` | :arrow_down: |
| [pkg/configauditreport/builder.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL2NvbmZpZ2F1ZGl0cmVwb3J0L2J1aWxkZXIuZ28=) | `79.00% <100.00%> (-7.00%)` | :arrow_down: |
| [pkg/kubehunter/scanner.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL2t1YmVodW50ZXIvc2Nhbm5lci5nbw==) | `0.00% <0.00%> (-80.51%)` | :arrow_down: |
| [pkg/plugin/factory.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL3BsdWdpbi9mYWN0b3J5Lmdv) | `0.00% <0.00%> (-80.49%)` | :arrow_down: |
| [pkg/configauditreport/scanner.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL2NvbmZpZ2F1ZGl0cmVwb3J0L3NjYW5uZXIuZ28=) | `0.00% <0.00%> (-70.77%)` | :arrow_down: |
| [pkg/vulnerabilityreport/scanner.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL3Z1bG5lcmFiaWxpdHlyZXBvcnQvc2Nhbm5lci5nbw==) | `0.00% <0.00%> (-70.54%)` | :arrow_down: |
| [pkg/operator/controller/vulnerabilityreport.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL29wZXJhdG9yL2NvbnRyb2xsZXIvdnVsbmVyYWJpbGl0eXJlcG9ydC5nbw==) | `0.00% <0.00%> (-68.04%)` | :arrow_down: |
| [pkg/operator/controller/configauditreport.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL29wZXJhdG9yL2NvbnRyb2xsZXIvY29uZmlnYXVkaXRyZXBvcnQuZ28=) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [pkg/kube/runnable\_job.go](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity#diff-cGtnL2t1YmUvcnVubmFibGVfam9iLmdv) | `0.00% <0.00%> (-64.39%)` | :arrow_down: |
| ... and [32 more](https://codecov.io/gh/aquasecurity/starboard/pull/624/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity). Last update [8a86fe4...190eb80](https://codecov.io/gh/aquasecurity/starboard/pull/624?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aquasecurity).


Patch:
diff --git a/pkg/apis/aquasecurity/v1alpha1/config_audit_types.go b/pkg/apis/aquasecurity/v1alpha1/config_audit_types.go
index 56d8d5c..43e55cd 100644
--- a/pkg/apis/aquasecurity/v1alpha1/config_audit_types.go
+++ b/pkg/apis/aquasecurity/v1alpha1/config_audit_types.go
@@ -30,7 +30,7 @@ type ConfigAuditReport struct {
 	metav1.TypeMeta   `json:",inline"`
 	metav1.ObjectMeta `json:"metadata,omitempty"`
 
-	Report ConfigAuditResult `json:"report"`
+	Report ConfigAuditReportData `json:"report"`
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -52,7 +52,7 @@ type ClusterConfigAuditReport struct {
 	metav1.TypeMeta   `json:",inline"`
 	metav1.ObjectMeta `json:"metadata,omitempty"`
 
-	Report ConfigAuditResult `json:"report"`
+	Report ConfigAuditReportData `json:"report"`
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -65,8 +65,7 @@ type ClusterConfigAuditReportList struct {
 	Items []ClusterConfigAuditReport `json:"items"`
 }
 
-// TODO Rename to ConfigAuditReportData
-type ConfigAuditResult struct {
+type ConfigAuditReportData struct {
 	UpdateTimestamp metav1.Time        `json:"updateTimestamp"`
 	Scanner         Scanner            `json:"scanner"`
 	Summary         ConfigAuditSummary `json:"summary"`
diff --git a/pkg/apis/aquasecurity/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/aquasecurity/v1alpha1/zz_generated.deepcopy.go
index 6ad5261..7de81a5 100644
--- a/pkg/apis/aquasecurity/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/aquasecurity/v1alpha1/zz_generated.deepcopy.go
@@ -290,40 +290,7 @@ func (in *ConfigAuditReport) DeepCopyObject() runtime.Object {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ConfigAuditReportList) DeepCopyInto(out *ConfigAuditReportList) {
-	*out = *in
-	out.TypeMeta = in.TypeMeta
-	in.ListMeta.DeepCopyInto(&out.ListMeta)
-	if in.Items != nil {
-		in, out := &in.Items, &out.Items
-		*out = make([]ConfigAuditReport, len(*in))
-		for i := range *in {
-			(*in)[i].DeepCopyInto(&(*out)[i])
-		}
-	}
-	return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigAuditReportList.
-func (in *ConfigAuditReportList) DeepCopy() *ConfigAuditReportList {
-	if in == nil {
-		return nil
-	}
-	out := new(ConfigAuditReportList)
-	in.DeepCopyInto(out)
-	return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ConfigAuditReportList) DeepCopyObject() runtime.Object {
-	if c := in.DeepCopy(); c != nil {
-		return c
-	}
-	return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ConfigAuditResult) DeepCopyInto(out *ConfigAuditResult) {
+func (in *ConfigAuditReportData) DeepCopyInto(out *ConfigAuditReportData) {
 	*out = *in
 	in.UpdateTimestamp.DeepCopyInto(&out.UpdateTimestamp)
 	out.Scanner = in.Scanner
@@ -351,16 +318,49 @@ func (in *ConfigAuditResult) DeepCopyInto(out *ConfigAuditResult) {
 	return
 }
 
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigAuditResult.
-func (in *ConfigAuditResult) DeepCopy() *ConfigAuditResult {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigAuditReportData.
+func (in *ConfigAuditReportData) DeepCopy() *ConfigAuditReportData {
 	if in == nil {
 		return nil
 	}
-	out := new(ConfigAuditResult)
+	out := new(ConfigAuditReportData)
 	in.DeepCopyInto(out)
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ConfigAuditReportList) DeepCopyInto(out *ConfigAuditReportList) {
+	*out = *in
+	out.TypeMeta = in.TypeMeta
+	in.ListMeta.DeepCopyInto(&out.ListMeta)
+	if in.Items != nil {
+		in, out := &in.Items, &out.Items
+		*out = make([]ConfigAuditReport, len(*in))
+		for i := range *in {
+			(*in)[i].DeepCopyInto(&(*out)[i])
+		}
+	}
+	return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigAuditReportList.
+func (in *ConfigAuditReportList) DeepCopy() *ConfigAuditReportList {
+	if in == nil {
+		return nil
+	}
+	out := new(ConfigAuditReportList)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ConfigAuditReportList) DeepCopyObject() runtime.Object {
+	if c := in.DeepCopy(); c != nil {
+		return c
+	}
+	return nil
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *ConfigAuditSummary) DeepCopyInto(out *ConfigAuditSummary) {
 	*out = *in
diff --git a/pkg/configauditreport/builder.go b/pkg/configauditreport/builder.go
index c72689a..0a308b7 100644
--- a/pkg/configauditreport/builder.go
+++ b/pkg/configauditreport/builder.go
@@ -133,7 +133,7 @@ type ReportBuilder struct {
 	controller       metav1.Object
 	podSpecHash      string
 	pluginConfigHash string
-	result           v1alpha1.ConfigAuditResult
+	data             v1alpha1.ConfigAuditReportData
 }
 
 func NewReportBuilder(scheme *runtime.Scheme) *ReportBuilder {
@@ -157,8 +157,8 @@ func (b *ReportBuilder) PluginConfigHash(hash string) *ReportBuilder {
 	return b
 }
 
-func (b *ReportBuilder) Data(result v1alpha1.ConfigAuditResult) *ReportBuilder {
-	b.result = result
+func (b *ReportBuilder) Data(data v1alpha1.ConfigAuditReportData) *ReportBuilder {
+	b.data = data
 	return b
 }
 
@@ -202,7 +202,7 @@ func (b *ReportBuilder) Get() (v1alpha1.ConfigAuditReport, error) {
 			Namespace: b.controller.GetNamespace(),
 			Labels:    labels,
 		},
-		Report: b.result,
+		Report: b.data,
 	}
 	err = controllerutil.SetControllerReference(b.controller, &report, b.scheme)
 	if err != nil {
diff --git a/pkg/configauditreport/plugin.go b/pkg/configauditreport/plugin.go
index 5a384eb..2cdeb23 100644
--- a/pkg/configauditreport/plugin.go
+++ b/pkg/configauditreport/plugin.go
@@ -26,8 +26,8 @@ type Plugin interface {
 	GetScanJobSpec(ctx starboard.PluginContext, obj client.Object) (corev1.PodSpec, []*corev1.Secret, error)
 
 	// ParseConfigAuditReportData is a callback to parse and convert logs of
-	// the container in a pod controlled by the scan job to v1alpha1.ConfigAuditResult.
-	ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditResult, error)
+	// the container in a pod controlled by the scan job to v1alpha1.ConfigAuditReportData.
+	ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditReportData, error)
 
 	// GetContainerName returns the name of the container in a pod created by a scan job
 	// to read logs from.
diff --git a/pkg/plugin/polaris/plugin.go b/pkg/plugin/polaris/plugin.go
index 2dc24b5..b31366c 100644
--- a/pkg/plugin/polaris/plugin.go
+++ b/pkg/plugin/polaris/plugin.go
@@ -315,13 +315,13 @@ func (p *plugin) GetContainerName() string {
 	return polarisContainerName
 }
 
-func (p *plugin) ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditResult, error) {
+func (p *plugin) ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditReportData, error) {
 	var report Report
 	err := json.NewDecoder(logsReader).Decode(&report)
 	if err != nil {
-		return v1alpha1.ConfigAuditResult{}, err
+		return v1alpha1.ConfigAuditReportData{}, err
 	}
-	return p.configAuditResultFrom(ctx, report.Results[0])
+	return p.configAuditReportDataFrom(ctx, report.Results[0])
 }
 
 func (p *plugin) sourceNameFrom(obj client.Object) string {
@@ -339,7 +339,7 @@ func (p *plugin) sourceNameFrom(obj client.Object) string {
 	)
 }
 
-func (p *plugin) configAuditResultFrom(ctx starboard.PluginContext, result Result) (v1alpha1.ConfigAuditResult, error) {
+func (p *plugin) configAuditReportDataFrom(ctx starboard.PluginContext, result Result) (v1alpha1.ConfigAuditReportData, error) {
 	var podChecks []v1alpha1.Check
 	containerChecks := make(map[string][]v1alpha1.Check)
 
@@ -370,15 +370,15 @@ func (p *plugin) configAuditResultFrom(ctx starboard.PluginContext, result Resul
 
 	imageRef, err := p.getImageRef(ctx)
 	if err != nil {
-		return v1alpha1.ConfigAuditResult{}, err
+		return v1alpha1.ConfigAuditReportData{}, err
 	}
 
 	version, err := starboard.GetVersionFromImageRef(imageRef)
 	if err != nil {
-		return v1alpha1.ConfigAuditResult{}, err
+		return v1alpha1.ConfigAuditReportData{}, err
 	}
 
-	return v1alpha1.ConfigAuditResult{
+	return v1alpha1.ConfigAuditReportData{
 		Scanner: v1alpha1.Scanner{
 			Name:    "Polaris",
 			Vendor:  "Fairwinds Ops",


Test patch:
diff --git a/itest/matcher/matcher_test.go b/itest/matcher/matcher_test.go
index 18b6839..01531b7 100644
--- a/itest/matcher/matcher_test.go
+++ b/itest/matcher/matcher_test.go
@@ -105,7 +105,7 @@ func TestConfigAuditReportMatcher(t *testing.T) {
 					},
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Scanner: v1alpha1.Scanner{
 					Name:    "Polaris",
 					Vendor:  "Fairwinds Ops",
diff --git a/pkg/configauditreport/builder_test.go b/pkg/configauditreport/builder_test.go
index 3b18020..ec96a87 100644
--- a/pkg/configauditreport/builder_test.go
+++ b/pkg/configauditreport/builder_test.go
@@ -31,7 +31,7 @@ func TestReportBuilder(t *testing.T) {
 		}).
 		PodSpecHash("xyz").
 		PluginConfigHash("nop").
-		Data(v1alpha1.ConfigAuditResult{}).
+		Data(v1alpha1.ConfigAuditReportData{}).
 		Get()
 
 	g.Expect(err).ToNot(HaveOccurred())
@@ -56,7 +56,7 @@ func TestReportBuilder(t *testing.T) {
 				starboard.LabelPluginConfigHash:  "nop",
 			},
 		},
-		Report: v1alpha1.ConfigAuditResult{},
+		Report: v1alpha1.ConfigAuditReportData{},
 	}))
 }
 
@@ -72,8 +72,8 @@ func (p *testPlugin) GetScanJobSpec(_ starboard.PluginContext, obj client.Object
 	return corev1.PodSpec{}, nil, nil
 }
 
-func (p *testPlugin) ParseConfigAuditReportData(_ starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditResult, error) {
-	return v1alpha1.ConfigAuditResult{}, nil
+func (p *testPlugin) ParseConfigAuditReportData(_ starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditReportData, error) {
+	return v1alpha1.ConfigAuditReportData{}, nil
 }
 
 func (p *testPlugin) GetContainerName() string {
diff --git a/pkg/configauditreport/io_test.go b/pkg/configauditreport/io_test.go
index e10c0c6..e37c856 100644
--- a/pkg/configauditreport/io_test.go
+++ b/pkg/configauditreport/io_test.go
@@ -32,7 +32,7 @@ func TestReadWriter(t *testing.T) {
 					"starboard.resource.namespace": "qa",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Summary: v1alpha1.ConfigAuditSummary{
 					WarningCount: 8,
 					DangerCount:  3,
@@ -60,7 +60,7 @@ func TestReadWriter(t *testing.T) {
 				},
 				ResourceVersion: "1",
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Summary: v1alpha1.ConfigAuditSummary{
 					WarningCount: 8,
 					DangerCount:  3,
@@ -82,7 +82,7 @@ func TestReadWriter(t *testing.T) {
 					"pod-spec-hash":                "h1",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Summary: v1alpha1.ConfigAuditSummary{
 					WarningCount: 8,
 					DangerCount:  3,
@@ -101,7 +101,7 @@ func TestReadWriter(t *testing.T) {
 					"pod-spec-hash":                "h2",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Summary: v1alpha1.ConfigAuditSummary{
 					WarningCount: 9,
 					DangerCount:  2,
@@ -130,7 +130,7 @@ func TestReadWriter(t *testing.T) {
 				},
 				ResourceVersion: "1",
 			},
-			Report: v1alpha1.ConfigAuditResult{
+			Report: v1alpha1.ConfigAuditReportData{
 				Summary: v1alpha1.ConfigAuditSummary{
 					WarningCount: 9,
 					DangerCount:  2,
@@ -151,7 +151,7 @@ func TestReadWriter(t *testing.T) {
 					starboard.LabelResourceNamespace: "my-namespace",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{},
+			Report: v1alpha1.ConfigAuditReportData{},
 		}, &v1alpha1.ConfigAuditReport{
 			ObjectMeta: metav1.ObjectMeta{
 				Namespace: "my-namespace",
@@ -162,7 +162,7 @@ func TestReadWriter(t *testing.T) {
 					starboard.LabelResourceNamespace: "my-namespace",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{},
+			Report: v1alpha1.ConfigAuditReportData{},
 		}).Build()
 
 		readWriter := configauditreport.NewReadWriter(client)
@@ -183,7 +183,7 @@ func TestReadWriter(t *testing.T) {
 					starboard.LabelResourceNamespace: "my-namespace",
 				},
 			},
-			Report: v1alpha1.ConfigAuditResult{},
+			Report: v1alpha1.ConfigAuditReportData{},
 		}, found)
 	})
 }
diff --git a/pkg/plugin/conftest/plugin.go b/pkg/plugin/conftest/plugin.go
index b0f236d..9551b03 100644
--- a/pkg/plugin/conftest/plugin.go
+++ b/pkg/plugin/conftest/plugin.go
@@ -196,7 +196,7 @@ func (p *plugin) GetContainerName() string {
 	return conftestContainerName
 }
 
-func (p *plugin) ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditResult, error) {
+func (p *plugin) ParseConfigAuditReportData(ctx starboard.PluginContext, logsReader io.ReadCloser) (v1alpha1.ConfigAuditReportData, error) {
 	var checkResults []CheckResult
 	err := json.NewDecoder(logsReader).Decode(&checkResults)
 
@@ -233,15 +233,15 @@ func (p *plugin) ParseConfigAuditReportData(ctx starboard.PluginContext, logsRea
 
 	imageRef, err := p.getImageRef(ctx)
 	if err != nil {
-		return v1alpha1.ConfigAuditResult{}, err
+		return v1alpha1.ConfigAuditReportData{}, err
 	}
 
 	version, err := starboard.GetVersionFromImageRef(imageRef)
 	if err != nil {
-		return v1alpha1.ConfigAuditResult{}, err
+		return v1alpha1.ConfigAuditReportData{}, err
 	}
 
-	return v1alpha1.ConfigAuditResult{
+	return v1alpha1.ConfigAuditReportData{
 		UpdateTimestamp: metav1.NewTime(p.clock.Now()),
 		Scanner: v1alpha1.Scanner{
 			Name:    "Conftest",
diff --git a/pkg/report/html_test.go b/pkg/report/html_test.go
index b0bd3c7..868b47f 100644
--- a/pkg/report/html_test.go
+++ b/pkg/report/html_test.go
@@ -3,124 +3,12 @@ package report
 import (
 	"testing"
 
+	"github.com/aquasecurity/starboard/pkg/apis/aquasecurity/v1alpha1"
 	"github.com/aquasecurity/starboard/pkg/report/templates"
-
-	"k8s.io/utils/pointer"
-
 	"github.com/stretchr/testify/assert"
-
-	"github.com/aquasecurity/starboard/pkg/apis/aquasecurity/v1alpha1"
-	starboard "github.com/aquasecurity/starboard/pkg/apis/aquasecurity/v1alpha1"
-)
-
-var (
-	sampleVulnsReports = []starboard.VulnerabilityReport{
-		{
-			Report: starboard.VulnerabilityScanResult{
-				Scanner: starboard.Scanner{
-					Name:    "Trivy",
-					Vendor:  "Aqua Security",
-					Version: "0.9.1",
-				},
-				Registry: starboard.Registry{
-					Server: "index.docker.io",
-				},
-				Artifact: starboard.Artifact{
-					Repository: "library/alpine",
-					Tag:        "3.10.2",
-				},
-				Summary: starboard.VulnerabilitySummary{
-					CriticalCount: 0,
-					MediumCount:   1,
-					LowCount:      1,
-					NoneCount:     0,
-					UnknownCount:  0,
-				},
-				Vulnerabilities: []starboard.Vulnerability{
-					{
-						VulnerabilityID:  "CVE-2019-1549",
-						Resource:         "openssl",
-						InstalledVersion: "1.1.1c-r0",
-						FixedVersion:     "1.1.1d-r0",
-						Severity:         starboard.SeverityMedium,
-						Title:            "openssl: information disclosure in fork()",
-						Links: []string{
-							"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
-						},
-					},
-					{
-						VulnerabilityID:  "CVE-2019-1547",
-						Resource:         "openssl",
-						InstalledVersion: "1.1.1c-r0",
-						FixedVersion:     "1.1.1d-r0",
-						Severity:         starboard.SeverityLow,
-						Title:            "openssl: side-channel weak encryption vulnerability",
-						Links: []string{
-							"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
-						},
-					},
-				}},
-		}}
-	sampleConfigAudits = []starboard.ConfigAuditReport{
-		{
-			Report: starboard.ConfigAuditResult{
-
-				Scanner: starboard.Scanner{
-					Name:    "Polaris",
-					Vendor:  "Fairwinds",
-					Version: "latest",
-				},
-				PodChecks: []starboard.Check{
-					{
-						ID:       "hostIPCSet",
-						Message:  "Host IPC is not configured",
-						Success:  true,
-						Severity: "error",
-						Category: "Security",
-					},
-					{
-						ID:       "hostNetworkSet",
-						Message:  "Host network is not configured",
-						Success:  true,
-						Severity: "warning",
-						Category: "Networking",
-					},
-				},
-				ContainerChecks: map[string][]starboard.Check{
-					"db": {
-						{
-							ID:       "cpuLimitsMissing",
-							Message:  "CPU limits are set",
-							Success:  true,
-							Severity: "warning",
-							Category: "Resources",
-						},
-						{
-							ID:       "cpuRequestsMissing",
-							Message:  "CPU requests are set",
-							Success:  true,
-							Severity: "warning",
-							Category: "Resources",
-						},
-					},
-				},
-			},
-		}}
+	"k8s.io/utils/pointer"
 )
 
-func TestHTMLReporter_GenerateReport(t *testing.T) {
-	t.Skip("Fix me - think of a better idea to test html report thoroughly enough")
-	//var workload = kube.Object{
-	//	Name: "csp-database",
-	//	Namespace: "aqua",
-	//	Kind: "Deployment",
-	//}
-	//assert.Contains(t, htmlReportStr, "cpuRequestsMissing")
-	//assert.Contains(t, htmlReportStr, "1.1.1c-r0")
-	//assert.Contains(t, htmlReportStr, "Trivy")
-	//assert.Contains(t, htmlReportStr, "index.docker.io")
-}
-
 func Test_topNVulnerabilitiesByScore(t *testing.T) {
 	testCases := []struct {
 		name           string
@@ -129,25 +17,25 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 	}{
 		{
 			name: "Should return top 5 vulnerabilities with count",
-			reports: []starboard.VulnerabilityReport{
+			reports: []v1alpha1.VulnerabilityReport{
 				{
-					Report: starboard.VulnerabilityScanResult{
-						Vulnerabilities: []starboard.Vulnerability{
+					Report: v1alpha1.VulnerabilityScanResult{
+						Vulnerabilities: []v1alpha1.Vulnerability{
 							{
 								VulnerabilityID: "CVE-2019-1549",
-								Severity:        starboard.SeverityCritical,
+								Severity:        v1alpha1.SeverityCritical,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1549",
 								Score:           pointer.Float64Ptr(8.2),
 							},
 							{
 								VulnerabilityID: "CVE-2019-1547",
-								Severity:        starboard.SeverityLow,
+								Severity:        v1alpha1.SeverityLow,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1547",
 								Score:           pointer.Float64Ptr(6.3),
 							},
 							{
 								VulnerabilityID: "CVE-2011-3374",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 								Score:           pointer.Float64Ptr(3.7),
 							},
@@ -155,35 +43,35 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 					},
 				},
 				{
-					Report: starboard.VulnerabilityScanResult{
-						Vulnerabilities: []starboard.Vulnerability{
+					Report: v1alpha1.VulnerabilityScanResult{
+						Vulnerabilities: []v1alpha1.Vulnerability{
 							{
 								VulnerabilityID: "CVE-2019-1548",
-								Severity:        starboard.SeverityCritical,
+								Severity:        v1alpha1.SeverityCritical,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1548",
 								Score:           pointer.Float64Ptr(9.1),
 							},
 							{
 								VulnerabilityID: "CVE-2019-1547",
-								Severity:        starboard.SeverityLow,
+								Severity:        v1alpha1.SeverityLow,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1547",
 								Score:           pointer.Float64Ptr(6.3),
 							},
 							{
 								VulnerabilityID: "CVE-2020-27350",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2020-27350",
 								Score:           pointer.Float64Ptr(5.7),
 							},
 							{
 								VulnerabilityID: "CVE-2011-3374",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 								Score:           pointer.Float64Ptr(3.7),
 							},
 							{
 								VulnerabilityID: "CVE-2011-3375",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 								Score:           pointer.Float64Ptr(3.6),
 							},
@@ -193,45 +81,45 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 			},
 			expectedOutput: []templates.VulnerabilityWithCount{
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2019-1548",
-						Severity:        starboard.SeverityCritical,
+						Severity:        v1alpha1.SeverityCritical,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1548",
 						Score:           pointer.Float64Ptr(9.1),
 					},
 					AffectedWorkloads: 1,
 				},
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2019-1549",
-						Severity:        starboard.SeverityCritical,
+						Severity:        v1alpha1.SeverityCritical,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1549",
 						Score:           pointer.Float64Ptr(8.2),
 					},
 					AffectedWorkloads: 1,
 				},
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2019-1547",
-						Severity:        starboard.SeverityLow,
+						Severity:        v1alpha1.SeverityLow,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1547",
 						Score:           pointer.Float64Ptr(6.3),
 					},
 					AffectedWorkloads: 2,
 				},
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2020-27350",
-						Severity:        starboard.SeverityMedium,
+						Severity:        v1alpha1.SeverityMedium,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2020-27350",
 						Score:           pointer.Float64Ptr(5.7),
 					},
 					AffectedWorkloads: 1,
 				},
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2011-3374",
-						Severity:        starboard.SeverityMedium,
+						Severity:        v1alpha1.SeverityMedium,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 						Score:           pointer.Float64Ptr(3.7),
 					},
@@ -241,25 +129,25 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 		},
 		{
 			name: "Should return 2 vulnerabilities with count when some input has nil scores",
-			reports: []starboard.VulnerabilityReport{
+			reports: []v1alpha1.VulnerabilityReport{
 				{
-					Report: starboard.VulnerabilityScanResult{
-						Vulnerabilities: []starboard.Vulnerability{
+					Report: v1alpha1.VulnerabilityScanResult{
+						Vulnerabilities: []v1alpha1.Vulnerability{
 							{
 								VulnerabilityID: "CVE-2019-1549",
-								Severity:        starboard.SeverityCritical,
+								Severity:        v1alpha1.SeverityCritical,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1549",
 								Score:           pointer.Float64Ptr(8.2),
 							},
 							{
 								VulnerabilityID: "CVE-2019-1547",
-								Severity:        starboard.SeverityLow,
+								Severity:        v1alpha1.SeverityLow,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1547",
 								Score:           nil,
 							},
 							{
 								VulnerabilityID: "CVE-2011-3374",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 								Score:           pointer.Float64Ptr(3.7),
 							},
@@ -267,29 +155,29 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 					},
 				},
 				{
-					Report: starboard.VulnerabilityScanResult{
-						Vulnerabilities: []starboard.Vulnerability{
+					Report: v1alpha1.VulnerabilityScanResult{
+						Vulnerabilities: []v1alpha1.Vulnerability{
 							{
 								VulnerabilityID: "CVE-2019-1548",
-								Severity:        starboard.SeverityCritical,
+								Severity:        v1alpha1.SeverityCritical,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1548",
 								Score:           nil,
 							},
 							{
 								VulnerabilityID: "CVE-2019-1547",
-								Severity:        starboard.SeverityLow,
+								Severity:        v1alpha1.SeverityLow,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1547",
 								Score:           nil,
 							},
 							{
 								VulnerabilityID: "CVE-2020-27350",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2020-27350",
 								Score:           nil,
 							},
 							{
 								VulnerabilityID: "CVE-2011-3374",
-								Severity:        starboard.SeverityMedium,
+								Severity:        v1alpha1.SeverityMedium,
 								PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 								Score:           pointer.Float64Ptr(3.7),
 							},
@@ -299,18 +187,18 @@ func Test_topNVulnerabilitiesByScore(t *testing.T) {
 			},
 			expectedOutput: []templates.VulnerabilityWithCount{
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2019-1549",
-						Severity:        starboard.SeverityCritical,
+						Severity:        v1alpha1.SeverityCritical,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2019-1549",
 						Score:           pointer.Float64Ptr(8.2),
 					},
 					AffectedWorkloads: 1,
 				},
 				{
-					Vulnerability: starboard.Vulnerability{
+					Vulnerability: v1alpha1.Vulnerability{
 						VulnerabilityID: "CVE-2011-3374",
-						Severity:        starboard.SeverityMedium,
+						Severity:        v1alpha1.SeverityMedium,
 						PrimaryLink:     "https://avd.aquasec.com/nvd/cve-2011-3374",
 						Score:           pointer.Float64Ptr(3.7),
 					},