report

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: GPL-3.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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, cpeURIs []string, integrations ...Integration) 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 FillWithExploit added in v0.6.0

func FillWithExploit(driver exploitdb.DB, r *models.ScanResult) (nExploitCve int, err error)

FillWithExploit fills Exploits with exploit dataabase https://github.com/mozqnet/go-exploitdb

func FillWithGost added in v0.5.0

func FillWithGost(driver gostdb.DB, r *models.ScanResult) (nCVEs int, err error)

FillWithGost fills CVEs with gost dataabase https://github.com/knqyf263/gost

func FillWithOval added in v0.4.0

func FillWithOval(driver ovaldb.DB, r *models.ScanResult) (nCVEs int, err error)

FillWithOval fetches OVAL database

func JSONDir added in v0.4.0

func JSONDir(args []string) (string, error)

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

func ListValidJSONDirs() (dirs []string, err error)

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 NewCveDB added in v0.5.0

func NewCveDB(cnf DBClientConf) (driver cvedb.DB, locked bool, err error)

NewCveDB returns cve db client

func NewExploitDB added in v0.6.0

func NewExploitDB(cnf DBClientConf) (driver exploitdb.DB, locked bool, err error)

NewExploitDB returns db client for Exploit

func NewGostDB added in v0.5.0

func NewGostDB(cnf DBClientConf) (driver gostdb.DB, locked bool, err error)

NewGostDB returns db client for Gost

func NewOvalDB added in v0.5.0

func NewOvalDB(cnf DBClientConf) (driver ovaldb.DB, locked bool, err error)

NewOvalDB returns oval db client

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 ChatWorkWriter added in v0.5.0

type ChatWorkWriter struct{}

ChatWorkWriter send report to ChatWork

func (ChatWorkWriter) Write added in v0.5.0

func (w ChatWorkWriter) Write(rs ...models.ScanResult) (err error)

type DBClient added in v0.5.0

type DBClient struct {
	CveDB     cvedb.DB
	OvalDB    ovaldb.DB
	GostDB    gostdb.DB
	ExploitDB exploitdb.DB
}

DBClient is a dictionarie's db client for reporting

func NewDBClient added in v0.5.0

func NewDBClient(cnf DBClientConf) (dbclient *DBClient, locked bool, err error)

NewDBClient returns db clients

func (DBClient) CloseDB added in v0.5.0

func (d DBClient) CloseDB()

CloseDB close dbs

type DBClientConf added in v0.5.0

type DBClientConf struct {
	CveDictCnf  config.GoCveDictConf
	OvalDictCnf config.GovalDictConf
	GostCnf     config.GostConf
	ExploitCnf  config.ExploitConf
	DebugSQL    bool
}

DBClientConf has a configuration of Vulnerability DBs

type EMailSender added in v0.3.0

type EMailSender interface {
	Send(subject, body string) error
}

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 GithubSecurityAlertOption added in v0.7.0

type GithubSecurityAlertOption struct {
	GithubConfs map[string]config.GitHubConf
}

GithubSecurityAlertOption :

type HTTPRequestWriter added in v0.5.0

type HTTPRequestWriter struct{}

HTTPRequestWriter writes results to HTTP request

func (HTTPRequestWriter) Write added in v0.5.0

func (w HTTPRequestWriter) Write(rs ...models.ScanResult) (err error)

Write sends results as HTTP response

type HTTPResponseWriter added in v0.5.0

type HTTPResponseWriter struct {
	Writer http.ResponseWriter
}

HTTPResponseWriter writes results to HTTP response

func (HTTPResponseWriter) Write added in v0.5.0

func (w HTTPResponseWriter) Write(rs ...models.ScanResult) (err error)

Write sends results as HTTP response

type HipChatWriter added in v0.5.0

type HipChatWriter struct{}

HipChatWriter send report to HipChat

func (HipChatWriter) Write added in v0.5.0

func (w HipChatWriter) Write(rs ...models.ScanResult) (err error)

type Integration added in v0.7.0

type Integration interface {
	// contains filtered or unexported methods
}

Integration is integration of vuls report

func GithubSecurityAlerts added in v0.7.0

func GithubSecurityAlerts(githubConfs map[string]config.GitHubConf) Integration

GithubSecurityAlerts :

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 SaasWriter added in v0.5.0

type SaasWriter struct{}

SaasWriter writes results to SaaS

func (SaasWriter) Write added in v0.5.0

func (w SaasWriter) Write(rs ...models.ScanResult) (err error)

UploadSaas : UploadSaas

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

type StrideWriter added in v0.5.0

type StrideWriter struct{}

StrideWriter send report to Stride

func (StrideWriter) Write added in v0.5.0

func (w StrideWriter) Write(rs ...models.ScanResult) (err error)

type SyslogWriter added in v0.5.0

type SyslogWriter struct{}

SyslogWriter send report to syslog

func (SyslogWriter) Write added in v0.5.0

func (w SyslogWriter) Write(rs ...models.ScanResult) (err error)

type TelegramWriter added in v0.6.2

type TelegramWriter struct{}

TelegramWriter sends report to Telegram

func (TelegramWriter) Write added in v0.6.2

func (w TelegramWriter) Write(rs ...models.ScanResult) (err error)

type TempCredential added in v0.5.0

type TempCredential struct {
	Credential   *sts.Credentials `json:"Credential"`
	S3Bucket     string           `json:"S3Bucket"`
	S3ResultsDir string           `json:"S3ResultsDir"`
}

TempCredential : TempCredential

type WordPressOption added in v0.7.0

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

WordPressOption :

Jump to

Keyboard shortcuts

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