Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Colors has ansi color list Colors = []string{ "\033[32m", "\033[33m", "\033[36m", "\033[35m", "\033[31m", "\033[34m", } // ResetColor is reset color ResetColor = "\033[0m" )
Functions ¶
Types ¶
type Config ¶
type Config struct {
Debug bool
DebugSQL bool
Lang string
EMail smtpConf
Slack SlackConf
Default ServerInfo
Servers map[string]ServerInfo
CveDictionaryURL string `valid:"url"`
CvssScoreOver float64
IgnoreUnscoredCves bool
AssumeYes bool
SSHExternal bool
ContainersOnly bool
SkipBroken bool
HTTPProxy string `valid:"url"`
ResultsDir string
CveDBType string
CveDBPath string
CacheDBPath string
FormatXML bool
FormatJSON bool
FormatOneLineText bool
FormatShortText bool
FormatFullText bool
GZIP bool
AwsProfile string
AwsRegion string
S3Bucket string
AzureAccount string
AzureKey string
AzureContainer string
}
Config is struct of Configuration
var Conf Config
Conf has Configuration
func (Config) ValidateOnConfigtest ¶ added in v0.2.0
ValidateOnConfigtest validates
func (Config) ValidateOnPrepare ¶ added in v0.2.0
ValidateOnPrepare validates configuration
func (Config) ValidateOnReport ¶ added in v0.2.0
ValidateOnReport validates configuration
func (Config) ValidateOnScan ¶ added in v0.2.0
ValidateOnScan validates configuration
func (Config) ValidateOnTui ¶ added in v0.2.0
ValidateOnTui validates configuration
type JSONLoader ¶
type JSONLoader struct {
}
JSONLoader loads configuration
func (JSONLoader) Load ¶
func (c JSONLoader) Load(path, sudoPass, keyPass string) (err error)
Load load the configuraiton JSON file specified by path arg.
type ServerInfo ¶
type ServerInfo struct {
ServerName string
User string
Host string
Port string
KeyPath string
KeyPassword string
CpeNames []string
DependencyCheckXMLPath string
// Container Names or IDs
Containers []string
IgnoreCves []string
// Optional key-value set that will be outputted to JSON
Optional [][]interface{}
// For CentOS, RHEL, Amazon
Enablerepo string
// used internal
LogMsgAnsiColor string // DebugLog Color
Container Container
Distro Distro
}
ServerInfo has SSH Info, additional CPE packages to scan.
func (ServerInfo) GetServerName ¶ added in v0.1.7
func (s ServerInfo) GetServerName() string
GetServerName returns ServerName if this serverInfo is about host. If this serverInfo is abount a container, returns containerID@ServerName
func (ServerInfo) IsContainer ¶ added in v0.1.4
func (s ServerInfo) IsContainer() bool
IsContainer returns whether this ServerInfo is about container
func (*ServerInfo) SetContainer ¶ added in v0.1.4
func (s *ServerInfo) SetContainer(d Container)
SetContainer set container
type SlackConf ¶
type SlackConf struct {
HookURL string `valid:"url"`
Channel string `json:"channel"`
IconEmoji string `json:"icon_emoji"`
AuthUser string `json:"username"`
NotifyUsers []string
Text string `json:"text"`
UseThisTime bool
}
SlackConf is slack config
type TOMLLoader ¶
type TOMLLoader struct {
}
TOMLLoader loads config
func (TOMLLoader) Load ¶
func (c TOMLLoader) Load(pathToToml, keyPass string) error
Load load the configuraiton TOML file specified by path arg.