commands

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuditError = ExitStatusError{/* contains filtered or unexported fields */}

Functions

func ShowReport

func ShowReport(output io.Writer, report audit.AuditResult) error

Types

type AuditCommand

type AuditCommand struct {
	Database string `long:"database" description:"path to report database" value-name:"PATH" default:"./database.db"`
	Manifest string `long:"manifest" description:"path to manifest" required:"true" value-name:"PATH"`
}

func (*AuditCommand) Execute

func (command *AuditCommand) Execute(args []string) error

type BoshScanCommand

type BoshScanCommand struct {
	Director struct {
		URL         string   `long:"director-url" description:"BOSH Director URL" value-name:"URL" required:"true"`
		Deployments []string `long:"bosh-deployment" description:"BOSH Deployment" value-name:"DEPLOYMENT_NAME" required:"true"`

		CACert string `long:"ca-cert" description:"Director CA certificate path" value-name:"CA_CERT"`

		Client       string `long:"client" description:"Username or UAA client" value-name:"CLIENT"`
		ClientSecret string `long:"client-secret" description:"Password or UAA client secret" value-name:"CLIENT_SECRET"`
	} `group:"Director & Deployment"`

	FileRegexes scantron.FileMatch `group:"File Content Check"`

	Database string `long:"database" description:"location of database where scan output will be stored" value-name:"PATH" default:"./database.db"`
}

func (*BoshScanCommand) Execute

func (command *BoshScanCommand) Execute(args []string) error

type DirectScanCommand

type DirectScanCommand struct {
	Address    string `long:"address" description:"Address of machine to scan" value-name:"ADDRESS" required:"true"`
	Username   string `long:"username" description:"Username of machine to scan" value-name:"USERNAME" required:"true"`
	Password   string `long:"password" description:"Password of machine to scan" value-name:"PASSWORD" required:"true"`
	PrivateKey string `long:"private-key" description:"Private key of machine to scan" value-name:"PATH"`
	Database   string `long:"database" description:"location of database where scan output will be stored" value-name:"PATH" default:"./database.db"`
	OSName     string `long:"os-name" description:"Name of stemcell OS of machine to scan" value-name:"STRING" required:"true"`

	FileRegexes scantron.FileMatch `group:"File Content Check"`
}

func (*DirectScanCommand) Execute

func (command *DirectScanCommand) Execute(args []string) error

type ExitStatusError

type ExitStatusError struct {
	// contains filtered or unexported fields
}

func (ExitStatusError) Error

func (e ExitStatusError) Error() string

func (ExitStatusError) ExitStatus

func (e ExitStatusError) ExitStatus() int

type GenerateManifestCommand

type GenerateManifestCommand struct {
	Database string `long:"database" description:"path to report database" value-name:"PATH" default:"./database.db"`
}

func (*GenerateManifestCommand) Execute

func (command *GenerateManifestCommand) Execute(args []string) error

type ReportCommand

type ReportCommand struct {
	Database      string `long:"database" description:"path to report database" required:"true" value-name:"DB PATH"`
	CsvExportPath string `long:"csv" description:"path to csv output" value-name:"CSV PATH"`
}

func (*ReportCommand) Execute

func (command *ReportCommand) Execute(args []string) error

type ScantronCommand

type ScantronCommand struct {
	Debug bool `long:"debug" description:"Show debug logs in output"`

	BoshScan         BoshScanCommand         `command:"bosh-scan" description:"Scan all of the machines in a BOSH deployment"`
	DirectScan       DirectScanCommand       `command:"direct-scan" description:"Scan a single machine"`
	Audit            AuditCommand            `command:"audit" description:"Audit a scan report for unexpected hosts, processes, and ports"`
	GenerateManifest GenerateManifestCommand `command:"generate-manifest" description:"Generate a audit manifest from the last report"`
	Report           ReportCommand           `command:"report" description:"Generate a human readable report from the given database"`
}
var Scantron ScantronCommand

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL