Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
refactor: Rename from risky to starboard (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
  • Loading branch information
danielpacak authored Mar 27, 2020
1 parent 7de82f3 commit 1d6c0dc
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 37 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ OCTANT_PLUGINS_DIR = ~/.config/octant/plugins

.PHONY: build
build:
go build -o bin/octant-risky-plugin cmd/octant-risky-plugin/main.go
go build -mod=vendor -o bin/octant-starboard-plugin cmd/octant-starboard-plugin/main.go

deploy: build
mkdir -p $(OCTANT_PLUGINS_DIR)
cp -vi bin/octant-risky-plugin $(OCTANT_PLUGINS_DIR)
cp -vi bin/octant-starboard-plugin $(OCTANT_PLUGINS_DIR)

.PHONY: uninstall
uninstall:
rm -i $(OCTANT_PLUGINS_DIR)/octant-risky-plugin
rm -i $(OCTANT_PLUGINS_DIR)/octant-starboard-plugin
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
octant-starboard-plugin
Copyright 2019-2020 Aqua Security Software Ltd.

This product includes software developed by Aqua Security (https://aquasec.com).
58 changes: 39 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
[![Build Actions][build-action-img]][build-action]
[![License][license-img]][license]

# Octant Risky Plugin
# Octant Starboard Plugin

This is an [Octant][octant] plugin for [kubectl risky][kubectl-risky] which provides visibility into
vulnerabilities of Kubernetes workloads discovered by [Trivy][trivy] scanner.
This is an [Octant][octant] plugin for [Starboard][starboard] which provides visibility into vulnerability assessment
reports for Kubernetes workloads stored as [custom security resources][k8s-security-crds].

## Install

Expand All @@ -21,23 +21,39 @@ Then, in an environment authenticated against your Kubernetes cluster, run `octa

### List vulnerabilities of unmanaged [Pod][k8s-pod]

This is equivalent of `kubectl get vulnerabilities -l risky.workload.kind=Pod -l risky.workload.name=nginx -o yaml`,
assuming that `kubectl risky scan pod/nginx` was run and saved a scan report as an instance of
the `vulnerabilities.aquasecurity.github.com` [custom resource][k8s-custom-resources].
This is equivalent of

```
kubectl get vulnerabilities \
-l starboard.workload.kind=Pod \
-l starboard.workload.name=nginx \
-o yaml
```

assuming that `kubectl starboard find vulnerabilities pod/nginx` command was run and the vulnerabilities report saved
as a `vulnerabilities.aquasecurity.github.com` resource.

![](./docs/images/pod_vulnerabilities.png)

### Show vulnerabilities summary

Shows the summary of vulnerabilities found in the Pod within the **Status** card.
Shows the summary of vulnerabilities found in the Pod within the *Status* card.

![](./docs/images/pod_vulnerabilities_summary.png)

### List vulnerabilities of [Deployment][k8s-deployment]

This is equivalent of `kubectl get vulnerabilities -l risky.workload.kind=Deployment -l risky.workload.name=nginx -o yaml`,
assuming that `kubectl risky scan deployments/nginx` was run and saved a scan report as an instance of
the `vulnerabilities.aquasecurity.github.com` [custom resource][k8s-custom-resources].
This is equivalent of

```
kubectl get vulns
-l starboard.workload.kind=Deployment \
-l starboard.workload.name=nginx \
-o yaml
```

assuming that `kubectl starboard find vulns deployments/nginx` command was run and the vulnerabilities report saved
as a `vulnerabilities.aquasecurity.github.com` resource.

![](./docs/images/deployment_vulnerabilities.png)

Expand All @@ -46,18 +62,22 @@ the `vulnerabilities.aquasecurity.github.com` [custom resource][k8s-custom-resou
Run the following command to remove the plugin:

```
rm -f ~/.config/octant/plugins/octant-risky-plugin
rm -f ~/.config/octant/plugins/octant-starboard-plugin
```

[release-img]: https://img.shields.io/github/release/aquasecurity/octant-risky-plugin.svg
[release]: https://github.com/aquasecurity/octant-risky-plugin/releases
[build-action-img]: https://github.com/aquasecurity/octant-risky-plugin/workflows/build/badge.svg
[build-action]: https://github.com/aquasecurity/octant-risky-plugin/actions
[license-img]: https://img.shields.io/github/license/aquasecurity/octant-risky-plugin.svg
[license]: https://github.com/aquasecurity/octant-risky-plugin/blob/master/LICENSE
## License

This repository is available under the [Apache License 2.0][license].

[release-img]: https://img.shields.io/github/release/aquasecurity/octant-starboard-plugin.svg
[release]: https://github.com/aquasecurity/octant-starboard-plugin/releases
[build-action-img]: https://github.com/aquasecurity/octant-starboard-plugin/workflows/build/badge.svg
[build-action]: https://github.com/aquasecurity/octant-starboard-plugin/actions
[license-img]: https://img.shields.io/github/license/aquasecurity/octant-starboard-plugin.svg
[license]: https://github.com/aquasecurity/octant-starboard-plugin/blob/master/LICENSE
[octant]: https://octant.dev/
[kubectl-risky]: https://github.com/aquasecurity/kubectl-risky
[starboard]: https://github.com/aquasecurity/starboard
[trivy]: https://github.com/aquasecurity/trivy
[k8s-custom-resources]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
[k8s-security-crds]: https://github.com/aquasecurity/k8s-security-crds
[k8s-pod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/
[k8s-deployment]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ package main

import (
"fmt"
"log"
"os"
"strconv"
"time"

security "github.com/aquasecurity/k8s-security-crds/pkg/apis/aquasecurity/v1alpha1"
"github.com/aquasecurity/octant-risky-plugin/pkg/data"
"github.com/aquasecurity/octant-risky-plugin/pkg/view"
"github.com/aquasecurity/octant-starboard-plugin/pkg/data"
"github.com/aquasecurity/octant-starboard-plugin/pkg/view"
"github.com/pkg/errors"
"github.com/vmware-tanzu/octant/pkg/plugin"
"github.com/vmware-tanzu/octant/pkg/plugin/service"
"github.com/vmware-tanzu/octant/pkg/view/component"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime/schema"
"log"
"os"
"strconv"
"time"
)

const (
pluginName = "risky"
pluginDescription = "Kubernetes-native risk explorer plugin"
pluginName = "starboard"
pluginDescription = "Kubernetes-native security"
)

var (
Expand Down Expand Up @@ -116,7 +117,6 @@ func createVulnerabilitiesTab(reports []data.ContainerImageScanReport) *componen

flexLayout.AddSections(items)


return component.NewTabWithContents(*flexLayout)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/aquasecurity/octant-risky-plugin
module github.com/aquasecurity/octant-starboard-plugin

go 1.13

Expand Down
11 changes: 6 additions & 5 deletions pkg/data/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"encoding/json"
"fmt"
"sort"
"strings"

security "github.com/aquasecurity/k8s-security-crds/pkg/apis/aquasecurity/v1alpha1"
"github.com/vmware-tanzu/octant/pkg/plugin/service"
"github.com/vmware-tanzu/octant/pkg/store"
"golang.org/x/xerrors"
"sort"
"strings"
)

const (
Expand All @@ -20,9 +21,9 @@ const (
)

const (
labelWorkloadKind = "risky.workload.kind"
labelWorkloadName = "risky.workload.name"
labelContainerName = "risky.container.name"
labelWorkloadKind = "starboard.workload.kind"
labelWorkloadName = "starboard.workload.name"
labelContainerName = "starboard.container.name"
)

const (
Expand Down
1 change: 1 addition & 0 deletions pkg/view/image_scan_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package view

import (
"fmt"

sec "github.com/aquasecurity/k8s-security-crds/pkg/apis/aquasecurity/v1alpha1"
"github.com/vmware-tanzu/octant/pkg/view/component"
)
Expand Down

0 comments on commit 1d6c0dc

Please sign in to comment.