Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from alcideio/html_viewer
Browse files Browse the repository at this point in the history
Html viewer
  • Loading branch information
gadinaor authored Oct 24, 2020
2 parents f62b0d2 + 66d8030 commit 8fc3e0e
Show file tree
Hide file tree
Showing 30 changed files with 17,040 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
version: v0.9.0
cluster_name: iskan
node_image: kindest/node:${{ matrix.config.kubever }}
node_image: kindest/node:v1.19.1
wait: 5m

- name: Coverage
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,23 @@ helm-delete: ##@Helm Delete Installation
helm -n alcide-iskan delete iskan

#
# HTML Viewer
#
viewer-deps: ##@HTMLViewer Launch Dev Server for development
cd htmlviewer && npm install

viewer-dev: ##@HTMLViewer Launch Dev Server for development
cd htmlviewer && npm run dev

#
# 1. Get alcide builder NPMJS token from 1password
# 2. export NODE_AUTH_TOKEN=<The Token>
viewer-release: ##@HTMLViewer Launch Dev Server for development
cd htmlviewer &&\
npm clean-install &&\
npm run prod &&\
npm publish --access public
#
# RELEASE
#

Expand Down
4 changes: 2 additions & 2 deletions cmd/scan_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func NewCommandScanCluster() *cobra.Command {
}
_, err = o.Write(data)
return err
case "advisor-html":
case "html":
advisorReport := scanner.GetAdvisorReport()
r := report.HtmlReport{
Report: advisorReport,
Expand All @@ -150,7 +150,7 @@ func NewCommandScanCluster() *cobra.Command {
flags := cmd.Flags()

flags.StringVar(&clusterContext, "cluster-context", "", "Cluster Context .use 'kubectl config get-contexts' to list available contexts")
flags.StringVarP(&format, "format", "f", "json", "Output format. Supported formats: json | yaml")
flags.StringVarP(&format, "format", "f", "json", "Output format. Supported formats: json | yaml | html")
flags.StringVarP(&outfile, "outfile", "o", "alcide-iskan.report", "Output file name. Use '-' to output to stdout")
flags.StringVarP(&vulAPIConfig, "api-config", "c", "", "The Vulnerability API configuration file name")
flags.StringVarP(&reportConfig, "report-config", "r", "", "The Report configuration file name")
Expand Down
20 changes: 20 additions & 0 deletions htmlviewer/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
[ "@babel/preset-env", {
"modules": false,
"targets": {
"browsers": [
"last 2 Chrome versions",
"last 2 Firefox versions",
"last 2 Safari versions",
"last 2 iOS versions",
"last 1 Android version",
"last 1 ChromeAndroid version",
"ie 11"
]
}
} ],
"@babel/preset-react"
],
"plugins": [ "@babel/plugin-proposal-class-properties" ]
}
26 changes: 26 additions & 0 deletions htmlviewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/dist
/public

/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions htmlviewer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<img src="https://github.com/alcideio/iskan/raw/master/iskan.png" alt="skan" width="160"/>

###### iskan is Kubernetes Native Image Vulnerability Scanner by [Alcide](https://www.alcide.io)

See [https://github.com/alcideio/iskan](https://github.com/alcideio/iskan)
Loading

0 comments on commit 8fc3e0e

Please sign in to comment.