Skip to main content

Overview

In the secureCodeBox we created new Custom Resource Definitions (CRD) for Kubernetes to manage scanners (ScanType) and hooks (see Custom Resource Definitions). To add a new Scanner you need to add a new ScanType (see ScanType) and a parser for its results.

The directory structure of a scanner Helm Chart will look something like this:

scanners/nmapโ”œโ”€โ”€ cascading-rulesโ”‚ย ย  โ””โ”€โ”€ ...โ”œโ”€โ”€ Chart.yamlโ”œโ”€โ”€ examplesโ”‚ย ย  โ”œโ”€โ”€ demo-target-sshโ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ findings.yamlโ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ nmap-results.xmlโ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ scan.yamlโ”‚ย ย  โ””โ”€โ”€ ...โ”œโ”€โ”€ parserโ”‚ย ย  โ”œโ”€โ”€ Dockerfileโ”‚ย ย  โ”œโ”€โ”€ package.jsonโ”‚ย ย  โ”œโ”€โ”€ package-lock.jsonโ”‚ย ย  โ”œโ”€โ”€ parser.jsโ”‚ย ย  โ”œโ”€โ”€ parser.test.jsโ”‚ย ย  โ””โ”€โ”€ __testFiles__โ”‚ย ย      โ””โ”€โ”€ ...โ”œโ”€โ”€ Makefileโ”œโ”€โ”€ README.mdโ”œโ”€โ”€ README.md.gotmplโ”œโ”€โ”€ scannerโ”‚ย ย  โ”œโ”€โ”€ wrapper.shโ”‚ย ย  โ””โ”€โ”€ Dockerfileโ”œโ”€โ”€ templatesโ”‚ย ย  โ”œโ”€โ”€ cascading-rules.yamlโ”‚ย ย  โ”œโ”€โ”€ nmap-parse-definition.yamlโ”‚ย ย  โ””โ”€โ”€ nmap-scan-type.yamlโ””โ”€โ”€ values.yaml

To create a new Helm Chart for your scanner you can use the following command (replace new-scanner with the name of the scanner):

helm create new-scanner

This command will create a new directory named new-scanner and some template files provided by helm to simplify the creation of Helm Charts (see Helm | Getting Started).

The following pages describe the purpose of all files and how to configure them.