diff --git a/README.md b/README.md index a543e1c..1583e33 100644 --- a/README.md +++ b/README.md @@ -85,11 +85,15 @@ You must have a working [Node.js] environment. - VulnerabilityReports ![](./docs/images/lens_vulnerability_report.png) + + ![](./docs/images/lens_workload_vulnerabilities.png) - ConfigAuditReports ![](./docs/images/lens_configaudit_report.png) - CISKubeBenchReports + ![](./docs/images/lens_ciskubebench_report.png) + [lens]: https://github.com/lensapp/lens [starboard]: https://github.com/aquasecurity/starboard [starboard-crds]: https://aquasecurity.github.io/starboard/latest/crds/ diff --git a/docs/images/lens_ciskubebench_report.png b/docs/images/lens_ciskubebench_report.png new file mode 100644 index 0000000..698711b Binary files /dev/null and b/docs/images/lens_ciskubebench_report.png differ diff --git a/docs/images/lens_workload_vulnerabilities.png b/docs/images/lens_workload_vulnerabilities.png new file mode 100644 index 0000000..195ab79 Binary files /dev/null and b/docs/images/lens_workload_vulnerabilities.png differ diff --git a/src/ciskubebenchreports/cisresults-list.scss b/src/ciskubebenchreports/cisresults-list.scss index efe962e..b6a09e4 100644 --- a/src/ciskubebenchreports/cisresults-list.scss +++ b/src/ciskubebenchreports/cisresults-list.scss @@ -14,6 +14,28 @@ &.status { flex-grow: 0.2; } + + .Badge { + &.status-FAIL { + color: white; + background-color: #cc1814; + } + + &.status-WARN { + color: white; + background-color: #ffa500; + } + + &.status-INFO { + color: white; + background-color: #515456; + } + + &.status-PASS { + color: white; + background-color: #00b09b; + } + } } } diff --git a/src/ciskubebenchreports/cisresults-list.tsx b/src/ciskubebenchreports/cisresults-list.tsx index 7146e4b..7b26a00 100644 --- a/src/ciskubebenchreports/cisresults-list.tsx +++ b/src/ciskubebenchreports/cisresults-list.tsx @@ -6,7 +6,6 @@ import {CISResult} from "./types"; const { Component: { Table, - TableHead, TableRow, TableCell, DrawerTitle, @@ -33,7 +32,9 @@ export class CISResultsList extends React.Component { {results[index].test_number} {this.renderDescription(results[index])} - {results[index].status} + + + ) } @@ -45,11 +46,6 @@ export class CISResultsList extends React.Component {
- - Number - Description - Status - { results.map((result, index) => this.getTableRow(index)) } diff --git a/src/ciskubebenchreports/types.ts b/src/ciskubebenchreports/types.ts index 97c41a5..b4ed51f 100644 --- a/src/ciskubebenchreports/types.ts +++ b/src/ciskubebenchreports/types.ts @@ -1,4 +1,5 @@ import {Renderer} from "@k8slens/extensions"; +import {Scanner} from "../starboard/types"; export class CISSection { id: string; @@ -27,29 +28,8 @@ export class CISKubeBenchReport extends Renderer.K8sApi.KubeObject { static namespaced = false static apiBase = "/apis/aquasecurity.github.io/v1alpha1/ciskubebenchreports" - kind: string - apiVersion: string - metadata: { - name: string; - namespace: string; - selfLink: string; - uid: string; - resourceVersion: string; - creationTimestamp: string; - labels: { - [key: string]: string; - }; - annotations: { - [key: string]: string; - }; - } - report: { - scanner: { - name: string; - vendor: string; - version: string; - } + scanner: Scanner summary: { failCount: number; infoCount: number;