integrations

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 14 Imported by: 4

README

integrations

Build Status Go Report Card GoDoc License PRs Welcome

integrations

Documentation

Index

Constants

View Source
const (
	// AWS is a string that identifies the connection is an AWS connection
	AWS = "AWS"

	// Azure is a string that identifies the connection is an Azure connection
	Azure = "Azure"
)
View Source
const (
	// Nexpose identifies the connection as a Nexpose connection
	Nexpose = "Nexpose"

	// Qualys identifies the connection as a Qualys connection
	Qualys = "Qualys"
)
View Source
const (
	// Dome9 delineates that the CIS scanner connects to Dome9
	Dome9 = "Dome9"
)
View Source
const (
	// JIRA identifies the connection as a JIRA connection
	JIRA = "JIRA"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CISScanner

type CISScanner interface {
	RescanBundle(bundleID int, cloudAccountID string) (findings []domain.Finding, err error)
}

CISScanner finds compliance violations within a cloud service

func GetCISScanner

func GetCISScanner(scannerID string, ms domain.DatabaseConnection, sourceConfig domain.SourceConfig, appConfig config, lstream logger) (client CISScanner, err error)

GetCISScanner returns a struct that implements the TicketingEngine interface

type CloudServiceConnection

type CloudServiceConnection interface {
	GetAllTagNames() (tagNames []string, err error)
	GetIPTagMapping() (ipToKeyToValue map[domain.CloudIP]map[string]string, err error)
	IPAddresses() (ips []domain.CloudIP, err error)
}

CloudServiceConnection defines the methods that are required to grab tag information from a cloud service provider

func GetCloudServiceConnection

func GetCloudServiceConnection(ms domain.DatabaseConnection, cloudServiceID string, config domain.SourceConfig, appconfig config, lstream logger) (connection CloudServiceConnection, err error)

GetCloudServiceConnection returns a struct that implements the CloudServiceConnection interface

type TicketingEngine

type TicketingEngine interface {
	CreateTicket(ticket domain.Ticket) (sourceID int, sourceKey string, err error)
	UpdateTicket(ticket domain.Ticket, comment string) (sourceID int, sourceKey string, err error)
	Transition(ticket domain.Ticket, status string, comment string, Assignee string) (err error)

	GetTicket(sourceKey string) (ticket domain.Ticket, err error)
	GetTicketsByClosedStatus(orgCode string, methodOfDiscovery string, startDate time.Time) (tix <-chan domain.Ticket)
	GetTicketsUpdatedSince(since time.Time, orgCode string, methodOfDiscovery string) <-chan domain.Ticket
	GetTicketsForRescan(cerfs []domain.CERF, methodOfDiscovery string, orgCode string, algorithm string) (issues <-chan domain.Ticket, err error)
	GetTicketsByDeviceIDVulnID(methodOfDiscovery string, orgCode string, deviceID string, vulnID string, statuses map[string]bool, port int, protocol string) (issues <-chan domain.Ticket, err error)
	GetCERFExpirationUpdates(startDate time.Time) (cerfs map[string]time.Time, err error)
	GetOpenTicketsByGroupID(methodOfDiscovery string, orgCode string, groupID string) (tickets <-chan domain.Ticket, err error)

	GetAdditionalTicketsForVulnPerDevice(tickets []domain.Ticket) (issues <-chan domain.Ticket, err error)
	GetAdditionalTicketsForDecomDevices(tickets []domain.Ticket) (issues <-chan domain.Ticket, err error)

	AssignmentGroupExists(groupName string) (exists bool, err error)

	GetStatusMap(backendStatus string) (equivalentTicketStatus string)
}

TicketingEngine defines the methods required for the application to interact with a ticketing website, such as JIRA or service now

func GetEngine

func GetEngine(ctx context.Context, engineID string, db domain.DatabaseConnection, lstream logger, appconfig vulnScannerConfig, config domain.SourceConfig) (eng TicketingEngine, err error)

GetEngine returns a struct that implements the TicketingEngine interface

type Vscanner

type Vscanner interface {
	Detections(ctx context.Context, groupsIDs []string) (detections <-chan domain.Detection, err error)
	Discovery(ctx context.Context, matches []domain.Match) (scanID <-chan domain.Scan)
	ScanResults(ctx context.Context, payload []byte) (detections <-chan domain.Detection, err error)
	Scan(ctx context.Context, detections []domain.Match) (scanID <-chan domain.Scan, err error)
	Scans(ctx context.Context, payloads <-chan []byte) (scans <-chan domain.Scan)
	KnowledgeBase(ctx context.Context, since *time.Time) (vulnerabilities <-chan domain.Vulnerability)
}

Vscanner is the interface for the scanner implementations

func NewVulnScanner

func NewVulnScanner(ctx context.Context, scannerID string, db domain.DatabaseConnection, lstream logger, appconfig vulnScannerConfig, config domain.SourceConfig) (scanner Vscanner, err error)

NewVulnScanner returns a struct that implements the VulnerabilityScanner interface NewVulnScanner expects that the passed source config has the authentication details encrypted Expected fields encrypted for Basic Auth: password Expected fields encrypted for Oauth: private key, consumer key, token

Jump to

Keyboard shortcuts

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