Documentation ¶
Index ¶
- func CompareGrades(grade1, grade2 string) bool
- func EnabledAudits() map[string]AuditInterface
- type Audit
- func (audit *Audit) GetDescription() string
- func (audit *Audit) GetFlagSet() *flag.FlagSet
- func (audit *Audit) GetHelpFlag() *bool
- func (audit *Audit) GetName() string
- func (audit *Audit) GetSubCommands() []cli.Command
- func (audit *Audit) Init(helpFlagName string, helpFlagDescription string)
- func (audit *Audit) Process()
- type AuditInterface
- type AuditResult
- type AuditScanHandler
- type AuditType
- type Discovery
- type Host
- type PortScan
- type PortTarget
- type PortTargetGroup
- type SSHAudit
- type SSLAudit
- type ScanType
- type Status
- type Target
- type TargetGroup
- type Vulnerability
- type VulnerabilityTargetGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareGrades ¶ added in v0.11.0
CompareGrades checks whether grade1 is less than "<" grade2. Returns true if grade1 < grade2 else return false.
Example:
CompareGrades("B", "A+") => true since Grade B < Grade A+ CompareGrades("A", "C") => false since Grade A > Grade C CompareGrades("A", "A") => false since Grade B == Grade B CompareGrades("B+", "A-") => true since Grade B+ < Grade A-
func EnabledAudits ¶ added in v0.11.0
func EnabledAudits() map[string]AuditInterface
Types ¶
type Audit ¶
type Audit struct {
// contains filtered or unexported fields
}
func (*Audit) GetDescription ¶
func (*Audit) GetFlagSet ¶
func (*Audit) GetHelpFlag ¶
func (*Audit) GetSubCommands ¶
type AuditInterface ¶ added in v0.11.0
type AuditInterface interface { Load(input interface{}) error Scan() ([]*AuditResult, error) }
type AuditResult ¶ added in v0.11.0
type AuditResult struct { Type string // type of audit e.g. "SSL", "SSH" Status Status // status of the audit e.g "PASS", "ERROR", "FAIL" StatusMessage string // message of the audit }
func Run ¶ added in v0.11.0
func Run(inputFile string) ([]*AuditResult, error)
type AuditScanHandler ¶ added in v0.11.0
type AuditScanHandler func(results []*AuditResult, err error)
type Discovery ¶ added in v0.11.0
type Discovery struct { Type string `mapstructure:"type"` Targets []string `mapstructure:"targets"` ResourceTypes []string `mapstructure:"resource_types"` Regions []string `mapstructure:"regions"` Tags map[string]string `mapstructure:"tags"` Properties map[string]string `mapstructure:"properties"` TargetProperty string `mapstructure:"target_property"` DNSZones []string `mapstructure:"dns_zones"` DNSRecordTypes []string `mapstructure:"dns_record_types"` }
type Host ¶ added in v0.11.0
type Host struct { Host string `mapstructure:"host"` Public bool `mapstructure:"public"` StartNew bool `mapstructure:"start_new"` FromCache bool `mapstructure:"from_cache"` MaxAge int `mapstructure:"max_age"` IgnoreMismatch bool `mapstructure:"ignore_mismatch"` Threshold string `mapstructure:"threshold"` ScanInfo *sslscan.AnalyzeInfo // scan information ScanInfoError error // contains an error if an error occured while scanning host }
func (*Host) Result ¶ added in v0.11.0
func (host *Host) Result() []*AuditResult
type PortScan ¶ added in v0.11.0
type PortScan struct {
PortTargetGroups []*PortTargetGroup
}
func (*PortScan) Scan ¶ added in v0.11.0
func (ps *PortScan) Scan() ([]*AuditResult, error)
Scan scans hosts
type PortTarget ¶ added in v0.11.0
type PortTarget struct { Host string Group *PortTargetGroup ScanInfo []nmap.Port ScanInfoError error }
PortTarget holds information about a host to be scanned
func (*PortTarget) Result ¶ added in v0.11.0
func (t *PortTarget) Result() []*AuditResult
Result constructs results output for a given port scan
func (*PortTarget) Scan ¶ added in v0.11.0
func (t *PortTarget) Scan()
Scan performs a port scan on a host
type PortTargetGroup ¶ added in v0.11.0
type PortTargetGroup struct { Timeout string `mapstructure:"timeout"` AllowList []string `mapstructure:"allowlist"` BlockList []string `mapstructure:"blocklist"` Discovery *Discovery `mapstructure:"discovery"` CommonPortsPath struct { TCP string `mapstructure:"tcp"` UDP string `mapstructure:"udp"` } `mapstructure:"common_ports_path"` }
func (*PortTargetGroup) Scan ¶ added in v0.11.0
func (tg *PortTargetGroup) Scan() ([]*AuditResult, error)
type SSHAudit ¶ added in v0.11.0
type SSHAudit struct {
TargetGroups []*TargetGroup
}
func (*SSHAudit) Scan ¶ added in v0.11.0
func (ssh *SSHAudit) Scan() ([]*AuditResult, error)
type SSLAudit ¶ added in v0.11.0
type SSLAudit struct {
Hosts []*Host
}
func (*SSLAudit) Scan ¶ added in v0.11.0
func (ssl *SSLAudit) Scan() ([]*AuditResult, error)
type ScanType ¶ added in v0.11.0
type ScanType func(ctx context.Context, target *PortTarget) ([]nmap.Port, error)
type Target ¶ added in v0.11.0
type Target struct { Host string Group *TargetGroup StandardScanInfo *sshaudit.StandardServerAuditInfo PolicyScanInfo *sshaudit.PolicyServerAuditInfo ScanInfoError error }
func (*Target) Result ¶ added in v0.11.0
func (target *Target) Result() []*AuditResult
type TargetGroup ¶ added in v0.11.0
type TargetGroup struct { Port int `mapstructure:"port"` AuditType string `mapstructure:"audit_type"` PolicyName string `mapstructure:"policy_name"` Threshold string `mapstructure:"threshold"` Discovery *Discovery `mapstructure:"discovery"` }
func (*TargetGroup) Scan ¶ added in v0.11.0
func (tg *TargetGroup) Scan(api *sshaudit.Client) ([]*AuditResult, error)
type Vulnerability ¶ added in v0.14.0
type Vulnerability struct {
// contains filtered or unexported fields
}
func (*Vulnerability) Load ¶ added in v0.14.0
func (vs *Vulnerability) Load(input interface{}) error
func (*Vulnerability) Scan ¶ added in v0.14.0
func (vs *Vulnerability) Scan() ([]*AuditResult, error)
type VulnerabilityTargetGroup ¶ added in v0.14.0
type VulnerabilityTargetGroup struct { Discovery *Discovery `mapstructure:"discovery"` VulnerabilityTemplates []string `mapstructure:"vulnerability_templates"` Threshold string `mapstructure:"threshold` }
func (*VulnerabilityTargetGroup) Result ¶ added in v0.14.0
func (tg *VulnerabilityTargetGroup) Result(n *nuclei.Nuclei) []*AuditResult
func (*VulnerabilityTargetGroup) Scan ¶ added in v0.14.0
func (tg *VulnerabilityTargetGroup) Scan() ([]*AuditResult, error)
Click to show internal directories.
Click to hide internal directories.