Documentation ¶
Index ¶
- Variables
- func CheckIfAzureContainerExists() error
- func CheckIfBucketExists() error
- func EnsureUUIDs(configPath string, results models.ScanResults) error
- func FillCveInfo(dbclient DBClient, r *models.ScanResult, cpeNames []string) error
- func FillCveInfos(dbclient DBClient, rs []models.ScanResult, dir string) ([]models.ScanResult, error)
- func FillWithOval(driver ovaldb.DB, r *models.ScanResult) (err error)
- func JSONDir(args []string) (string, error)
- func ListValidJSONDirs() (dirs []string, err error)
- func LoadScanResults(jsonDir string) (results models.ScanResults, err error)
- func NewCveDB(cType, cURL, cPath string, debug bool) (driver cvedb.DB, err error)
- func NewOvalDB(oType, oURL, oPath string, debug bool) (driver ovaldb.DB)
- func RunTui(results models.ScanResults) subcommands.ExitStatus
- type AzureBlobWriter
- type DBClient
- type EMailSender
- type EMailWriter
- type LocalFileWriter
- type ResultWriter
- type S3Writer
- type SlackWriter
- type StdoutWriter
Constants ¶
This section is empty.
Variables ¶
var CveClient cvedictClient
CveClient is api client of CVE disctionary service.
Functions ¶
func CheckIfAzureContainerExists ¶ added in v0.1.5
func CheckIfAzureContainerExists() error
CheckIfAzureContainerExists check the existence of Azure storage container
func CheckIfBucketExists ¶ added in v0.1.5
func CheckIfBucketExists() error
CheckIfBucketExists check the existence of S3 bucket
func EnsureUUIDs ¶ added in v0.5.0
func EnsureUUIDs(configPath string, results models.ScanResults) error
EnsureUUIDs generate a new UUID of the scan target server if UUID is not assigned yet. And then set the generated UUID to config.toml and scan results.
func FillCveInfo ¶ added in v0.4.0
func FillCveInfo(dbclient DBClient, r *models.ScanResult, cpeNames []string) error
FillCveInfo fill scanResult with cve info.
func FillCveInfos ¶ added in v0.4.0
func FillCveInfos(dbclient DBClient, rs []models.ScanResult, dir string) ([]models.ScanResult, error)
FillCveInfos fills CVE Detailed Information
func FillWithOval ¶ added in v0.4.0
func FillWithOval(driver ovaldb.DB, r *models.ScanResult) (err error)
FillWithOval fetches OVAL database, and then set to fields.
func JSONDir ¶ added in v0.4.0
JSONDir returns If there is an arg, check if it is a valid format and return the corresponding path under results. If arg passed via PIPE (such as history subcommand), return that path. Otherwise, returns the path of the latest directory
func ListValidJSONDirs ¶ added in v0.4.0
ListValidJSONDirs returns valid json directory as array Returned array is sorted so that recent directories are at the head
func LoadScanResults ¶ added in v0.4.0
func LoadScanResults(jsonDir string) (results models.ScanResults, err error)
LoadScanResults read JSON data
func RunTui ¶
func RunTui(results models.ScanResults) subcommands.ExitStatus
RunTui execute main logic
Types ¶
type AzureBlobWriter ¶ added in v0.1.5
type AzureBlobWriter struct{}
AzureBlobWriter writes results to AzureBlob
func (AzureBlobWriter) Write ¶ added in v0.1.5
func (w AzureBlobWriter) Write(rs ...models.ScanResult) (err error)
Write results to Azure Blob storage
type DBClient ¶ added in v0.5.0
DBClient is a dictionarie's db client for reporting
type EMailSender ¶ added in v0.3.0
EMailSender is interface of sending e-mail
func NewEMailSender ¶ added in v0.3.0
func NewEMailSender() EMailSender
NewEMailSender creates emailSender
type EMailWriter ¶ added in v0.2.0
type EMailWriter struct{}
EMailWriter send mail
func (EMailWriter) Write ¶ added in v0.2.0
func (w EMailWriter) Write(rs ...models.ScanResult) (err error)
type LocalFileWriter ¶ added in v0.2.0
type LocalFileWriter struct {
CurrentDir string
}
LocalFileWriter writes results to a local file.
func (LocalFileWriter) Write ¶ added in v0.2.0
func (w LocalFileWriter) Write(rs ...models.ScanResult) (err error)
type ResultWriter ¶
type ResultWriter interface {
Write(...models.ScanResult) error
}
ResultWriter Interface
type S3Writer ¶ added in v0.1.5
type S3Writer struct{}
S3Writer writes results to S3
func (S3Writer) Write ¶ added in v0.1.5
func (w S3Writer) Write(rs ...models.ScanResult) (err error)
Write results to S3 http://docs.aws.amazon.com/sdk-for-go/latest/v1/developerguide/common-examples.title.html
type SlackWriter ¶
type SlackWriter struct{}
SlackWriter send report to slack
func (SlackWriter) Write ¶
func (w SlackWriter) Write(rs ...models.ScanResult) (err error)
type StdoutWriter ¶ added in v0.1.5
type StdoutWriter struct{}
StdoutWriter write to stdout
func (StdoutWriter) Write ¶ added in v0.1.5
func (w StdoutWriter) Write(rs ...models.ScanResult) error
func (StdoutWriter) WriteScanSummary ¶ added in v0.2.0
func (w StdoutWriter) WriteScanSummary(rs ...models.ScanResult)
WriteScanSummary prints Scan summary at the end of scan