Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidMssgFormat indicates that the check message has an invalid format. ErrInvalidMssgFmt = errors.New("Invalid message format") // ErrInvalidReportRplcFmt indicates that the format of the configured replacing // URL for vulcan-results is invalid. ErrInvalidReportRplcFmt = errors.New("Invalid report replace string format") // ErrInvalidReport indicates that a report URL or data is invalid. ErrInvalidReport = errors.New("Invalid report data") )
Functions ¶
This section is empty.
Types ¶
type CheckMessage ¶
type CheckMessage struct { ID string `json:"id"` AgentID string `json:"agent_id"` ChecktypeID string `json:"checktype_id"` ChecktypeName string `json:"checktype_name"` Status string `json:"status"` Target string `json:"target"` Options string `json:"options"` Webhook string `json:"webhook"` Score float64 `json:"score"` Progress float64 `json:"progress"` Raw string `json:"raw"` Report string `json:"report"` DeletedAt string `json:"deleted_at"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` ScanID string `json:"scan_id"` QueueName string `json:"queue_name"` Tag string `json:"tag"` }
CheckMessage is the information of the check that comes inside the Notification.
type CheckProcessor ¶
type CheckProcessor struct {
// contains filtered or unexported fields
}
CheckProcessor is a QueueProcessor implementation for vulcan check messages.
func NewCheckProcessor ¶
func NewCheckProcessor(notifier notify.Notifier, store store.VulnStore, resultsClient results.Client, reportURLReplaceConfig string, maxEventAge int, logger *log.Logger) (*CheckProcessor, error)
NewCheckProcessor builds a new Check Processor
func (*CheckProcessor) ProcessMessage ¶
func (p *CheckProcessor) ProcessMessage(m string) error
ProcessMessage processes a vulcan check message
type FindingNotification ¶
type FindingNotification struct { TargetID string `json:"target_id"` Target string `json:"target"` IssueID string `json:"issue_id"` FindingID string `json:"finding_id"` CheckID string `json:"check_id"` ChecktypeName string `json:"checktype_name"` CheckTypeOptions string `json:"checktype_options"` Tag string `json:"tag"` Time time.Time `json:"time"` Vulnerability vulnerability `json:"vulnerability"` }
FindingNotification is the data that's notified when a new finding occurs.
type Notification ¶
type Notification struct { Type string `json:"Type"` MessageID string `json:"MessageId"` TopicArn string `json:"TopicArn"` Subject string `json:"Subject"` Message string `json:"Message"` Timestamp string `json:"Timestamp"` SignatureVersion string `json:"SignatureVersion"` Signature string `json:"Signature"` SigningCertURL string `json:"SigningCertURL"` UnsubscribeURL string `json:"UnsubscribeURL"` }
Notification is the message received in the queue from the Vulcan Core SNS topic.
type ResourceGroup ¶
type ResourceGroup struct { Name string `json:"name"` Attributes []string `json:"attributes"` Resources []map[string]string `json:"resources"` }
ResourceGroup reprents a resource in a vulndb finding.
type Resources ¶
type Resources []ResourceGroup
Resources defines the shape of the resources of a vulnerability that will be stored in a vulndb finding.
func VulnResourcesFromReportResources ¶
func VulnResourcesFromReportResources(vulnresources []report.ResourcesGroup) Resources
VulnResourcesFromReportResources populates vulnd db resources from vulcan vulnerability resources.