Documentation ¶
Index ¶
- Constants
- type AllAuth
- type AssetGroup
- type AssignmentGroup
- type BasicAuth
- type CERF
- type CISAssignments
- type Category
- type CloudIP
- type Config
- type DBConfig
- type DBLog
- type DatabaseConnection
- type Detection
- type DetectionInfo
- type DetectionStatus
- type Device
- type DeviceGroup
- type DeviceInfo
- type EncryptionConfig
- type ExceptionType
- type Finding
- type GeneratedDatabaseConnection
- type Host
- type Ignore
- type Job
- type JobConfig
- type JobConfigAudit
- type JobHistory
- type JobRegistration
- type JobSchedule
- type KeyValue
- type LogConfig
- type LogType
- type Match
- type OauthAuth
- type OperatingSystemType
- type Organization
- type Permission
- type QueryData
- type Result
- type Scan
- type ScanSummary
- type Session
- type Solution
- type Source
- type SourceConfig
- type Tag
- type TagKey
- type TagMap
- type Ticket
- type TicketSummary
- type User
- type Vulnerability
- type VulnerabilityInfo
- type VulnerabilityMatch
- type VulnerabilityReference
- type VulnerabilityReferenceInfo
- type WebAppConfig
Constants ¶
const ( JobStatusPending = 1 JobStatusInProgress = 2 JobStatusCompleted = 3 JobStatusError = 4 JobStatusCancelled = 5 )
Job statuses noinspection GoUnusedConst,GoUnusedConst,GoUnusedConst,GoUnusedConst
const ( ScanQUEUED = "queued" ScanPROCESSING = "processing" ScanPAUSED = "paused" ScanFINISHED = "finished" ScanERRORED = "error" ScanSTOPPED = "stopped" ScanCANCELED = "canceled" )
Normalized Scan Statuses
const ( // Vulnerable denotes that the vulnerability is not fixed Vulnerable = "vulnerable" // Exceptioned denotes that the vulnerability can be ignored Exceptioned = "exceptioned" // Fixed denotes that the vulnerability is no longer present Fixed = "fixed" // DeadHost denotes that the vulnerability exists on a host that is no longer online DeadHost = "dead host" )
const ( // DeviceRunning denotes that the device is online DeviceRunning = "running" // DeviceStopped denotes that the device is offline but still exists DeviceStopped = "stopped" // DeviceDecommed denotes that the device no longer exists DeviceDecommed = "decommissioned" )
const ( // Exception delineates an entry in an ignore table that is an exception Exception = iota // FalsePositive delineates an entry in an ignore table that is a false positive FalsePositive // DecommAsset delineates an entry in an ignore table that is a decommissioned asset DecommAsset )
Ignore Types
const ( // RescanExceptions is a constant that dictates the type of rescan job is currently running. This controls, for example, the types of tickets collected RescanExceptions = "EXCEPTIONS" // RescanPassive is a constant that dictates the type of rescan job is currently running. This controls, for example, the types of tickets collected RescanPassive = "PASSIVE" // RescanNormal is a constant that dictates the type of rescan job is currently running. This controls, for example, the types of tickets collected RescanNormal = "NORMAL" // RescanDecommission is a constant that dictates the type of rescan job is currently running. This controls, for example, the types of tickets collected RescanDecommission = "DECOMMISSIONED" )
const ( // MSType corresponds to a vendor reference that is a Microsoft Security bulletin MSType = "ms" // CVEType corresponds to a vendor reference that is a Common Vulnerability Exposure CVEType = "cve" // CVEPrefix is used to find the prefix as a substring in the title of a reference CVEPrefix = "cve-" )
Reference Types string to filter references coming from Nexpose/Qualys api
const ( // CVE is the ID that corresponds to a CVE entry in the VulnerabilityReference table CVE = 0 // MS is the ID that corresponds to a MS entry in the VulnerabilityReference table MS = 1 // Vendor is the ID that corresponds to a generic entry in the VulnerabilityReference table Vendor = 2 )
Reference Types Enum
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllAuth ¶
AllAuth is used as a container for all authentication methods. It is useful for the API which often has to deal with source configs generically
type AssetGroup ¶
AssetGroup defines the interface
type AssignmentGroup ¶
type AssignmentGroup interface { DBCreatedDate() (param time.Time) DBUpdatedDate() (param *time.Time) GroupName() (param string) IPAddress() (param string) OrganizationID() (param string) SourceID() (param int) }
AssignmentGroup defines the interface
type BasicAuth ¶
type BasicAuth struct { Username string `json:"Username,omitempty"` Password string `json:"Password,omitempty"` }
BasicAuth is used to parse the authentication information from the AuthInfo field in the SourceConfig database
type CISAssignments ¶
type CISAssignments interface { AssignmentGroup() (param string) BundleID() (param *string) CloudAccountID() (param *string) OrganizationID() (param string) RuleHash() (param *string) RuleRegex() (param *string) }
CISAssignments defines the interface
type Category ¶
type Category interface { Category() (param string) ID() (param string) ParentCategoryID() (param *string) }
Category defines the interface
type CloudIP ¶
type CloudIP interface { IP() string Region() string State() string MAC() string InstanceID() string }
CloudIP defines the interface
type Config ¶
type Config interface { DBConfig EncryptionConfig LogConfig WebAppConfig }
Config holds all the configurations from within app.json to avoid giving the entire application access to the entire configuration, we use interfaces that implement a subset of the methods within the Config interface
type DBConfig ¶
type DBConfig interface { DBPath() string DBPort() string DBUsername() string DBPassword() string DBSchema() string }
DBConfig defines an interface which contains methods for building connection strings
type DBLog ¶
type DBLog interface { CreateDate() (param time.Time) Error() (param string) ID() (param int) JobHistoryID() (param string) Log() (param string) TypeID() (param int) }
DBLog defines the interface
type DatabaseConnection ¶
type DatabaseConnection interface { GeneratedDatabaseConnection GetDeviceByAssetOrgID(_AssetID string, OrgID string) (Device, error) GetDeviceByIP(_IP string, _OrgID string) (Device, error) //GetDeviceByIPMACAndRegion(_IP string, _MAC string, _Region string, _OrgID string) (Device, error) GetDeviceByCloudSourceIDAndIP(_IP string, _CloudSourceID string, _OrgID string) (Device, error) GetDeviceByScannerSourceID(_IP string, _GroupID int, _OrgID string) (Device, error) GetDeviceByInstanceID(_InstanceID string, _OrgID string) (Device, error) GetDevicesBySourceID(_SourceID string, _OrgID string) ([]Device, error) GetDevicesByCloudSourceID(_CloudSourceID string, _OrgID string) ([]Device, error) GetDetection(_SourceDeviceID string, _VulnerabilityID string) (Detection, error) GetDetectionBySourceVulnID(_SourceDeviceID string, _SourceVulnerabilityID string) (Detection, error) GetDetectionsForDevice(_DeviceID string) ([]Detection, error) GetDetectionsAfter(after time.Time, orgID string) (detections []Detection, err error) GetVulnReferences(vulnInfoID string, sourceID string) (references []VulnerabilityReference, err error) GetVulnRef(vulnInfoID string, sourceID string, reference string) (existing VulnerabilityReference, err error) GetVulnBySourceVulnID(_SourceVulnID string) (vulnerability Vulnerability, err error) }
DatabaseConnection holds a combination of the generated stored procedure calls and hand-written database calls
type Detection ¶
type Detection interface { ID() string VulnerabilityID() string Status() string ActiveKernel() *int Detected() (*time.Time, error) TimesSeen() int Proof() string Port() int Protocol() string Device() (Device, error) Vulnerability() (Vulnerability, error) }
Detection defines the interface
type DetectionInfo ¶
type DetectionInfo interface { ID() string OrganizationID() string SourceID() string DeviceID() string VulnerabilityID() string AlertDate() time.Time Proof() string DetectionStatusID() int TimesSeen() int Port() int Protocol() string ActiveKernel() *int }
DetectionInfo defines the interface
type DetectionStatus ¶
DetectionStatus defines the interface
type Device ¶
type Device interface { // ID is the ID of the device as reported by the backend database of Aegis ID() string // SourceID is the ID of the device as reported by the scanner SourceID() *string OS() string HostName() string MAC() string IP() string Vulnerabilities(ctx context.Context) (param <-chan Detection, err error) // Region is the area that the device is stored in (if the device is a cloud device) Region() *string // InstanceID identifies which instance a device is (the the device is a cloud device) InstanceID() *string }
Device defines the interface
type DeviceGroup ¶
DeviceGroup defines the interface
type DeviceInfo ¶
type DeviceInfo interface { // ID is the ID of the device as reported by the backend database of Aegis ID() string // SourceID is the ID of the device as reported by the scanner SourceID() *string // ScannerSourceID is the id of the source (vulnerability scanner) that found the device ScannerSourceID() *string OS() string HostName() string MAC() string IP() string // Region is the area that the device is stored in (if the device is a cloud device) Region() *string GroupID() *int // InstanceID identifies which instance a device is (the the device is a cloud device) InstanceID() *string State() *string }
DeviceInfo defines the interface
type EncryptionConfig ¶
type EncryptionConfig interface {
EncryptionKey() string
}
EncryptionConfig defines an interface which returns methods for encryption / decryption
type ExceptionType ¶
ExceptionType defines the interface
type Finding ¶
type Finding interface { // ID corresponds to a vulnerability ID ID() string // DeviceID corresponds to the entity violating the rule DeviceID() string // AccountID corresponds to the cloud account that the entity lies within AccountID() string // ScanID corresponds to the assessment that found the finding ScanID() int Summary() string VulnerabilityTitle() string Priority() string // String extracts relevant information from the finding String() string BundleID() string }
Finding holds information pertaining to a CIS scanner
type GeneratedDatabaseConnection ¶
type GeneratedDatabaseConnection interface { connection.DatabaseConnection CleanUp() (id int, affectedRows int, err error) CreateAssetGroup(inOrgID string, _GroupID int, _ScannerSourceID string) (id int, affectedRows int, err error) CreateAssetWithIPInstanceID(_State string, _IP string, _MAC string, _SourceID string, _InstanceID string, _Region string, _OrgID string, _OS string, _OsTypeID int) (id int, affectedRows int, err error) CreateCategory(_Category string) (id int, affectedRows int, err error) CreateDBLog(_User string, _Command string, _Endpoint string) (id int, affectedRows int, err error) CreateDetection(_OrgID string, _SourceID string, _DeviceID string, _VulnID string, _AlertDate time.Time, _Proof string, _Port int, _Protocol string, _DetectionStatusID int, _TimesSeen int) (id int, affectedRows int, err error) CreateDetectionActiveKernel(_OrgID string, _SourceID string, _DeviceID string, _VulnID string, _AlertDate time.Time, _Proof string, _Port int, _Protocol string, _ActiveKernel int, _DetectionStatusID int, _TimesSeen int) (id int, affectedRows int, err error) CreateDetectionWithIgnore(_OrgID string, _SourceID string, _DeviceID string, _VulnID string, _IgnoreID string, _AlertDate time.Time, _Proof string, _Port int, _Protocol string, _DetectionStatusID int, _TimesSeen int) (id int, affectedRows int, err error) CreateDetectionWithIgnoreActiveKernel(_OrgID string, _SourceID string, _DeviceID string, _VulnID string, _IgnoreID string, _AlertDate time.Time, _Proof string, _Port int, _Protocol string, _ActiveKernel int, _DetectionStatusID int, _TimesSeen int) (id int, affectedRows int, err error) CreateDevice(_AssetID string, _SourceID string, _Ip string, _Hostname string, _MAC string, _GroupID int, _OrgID string, _OS string, _OSTypeID int) (id int, affectedRows int, err error) CreateException(inSourceID string, inOrganizationID string, inTypeID int, inVulnerabilityID string, inDeviceID string, inDueDate time.Time, inApproval string, inActive bool, inPort string, inCreatedBy string) (id int, affectedRows int, err error) CreateJobConfig(_JobID int, _OrganizationID string, _PriorityOverride int, _Continuous bool, _WaitInSeconds int, _MaxInstances int, _AutoStart bool, _CreatedBy string, _DataInSourceID string, _DataOutSourceID string) (id int, affectedRows int, err error) CreateJobHistory(_JobID int, _ConfigID string, _StatusID int, _Priority int, _Identifier string, _CurrentIteration int, _Payload string, _ThreadID string, _PulseDate time.Time, _CreatedBy string) (id int, affectedRows int, err error) CreateJobHistoryWithParentID(_JobID int, _ConfigID string, _StatusID int, _Priority int, _Identifier string, _CurrentIteration int, _Payload string, _ThreadID string, _PulseDate time.Time, _CreatedBy string, _ParentID string) (id int, affectedRows int, err error) CreateOrganization(_Code string, _Description string, _TimeZoneOffset float32, _UpdatedBy string) (id int, affectedRows int, err error) CreateScanSummary(_SourceID string, _OrgID string, _ScanID string, _ScanStatus string, _ScanClosePayload string, _ParentJobID string) (id int, affectedRows int, err error) CreateSourceConfig(_Source string, _SourceID string, _OrganizationID string, _Address string, _Port string, _Username string, _Password string, _PrivateKey string, _ConsumerKey string, _Token string, _Payload string) (id int, affectedRows int, err error) CreateTag(_DeviceID string, _TagKeyID string, _Value string) (id int, affectedRows int, err error) CreateTagKey(_KeyValue string) (id int, affectedRows int, err error) CreateTagMap(_TicketingSourceID string, _TicketingTag string, _CloudSourceID string, _CloudTag string, _Options string, _OrganizationID string) (id int, affectedRows int, err error) CreateTicket(_Title string, _Status string, _DetectionID string, _OrganizationID string, _DueDate time.Time, _UpdatedDate time.Time, _ResolutionDate time.Time) (id int, affectedRows int, err error) CreateTicketingJob(GroupID int, OrgID string, ScanStartDate string) (id int, affectedRows int, err error) CreateUser(_Username string, _FirstName string, _LastName string, _Email string) (id int, affectedRows int, err error) CreateUserPermissions(_UserID string, _OrgID string) (id int, affectedRows int, err error) CreateUserSession(_UserID string, _OrgID string, _SessionKey string) (id int, affectedRows int, err error) CreateVulnInfo(_SourceVulnID string, _Title string, _SourceID string, _CVSSScore float32, _CVSS3Score float32, _Description string, _Solution string, _Software string, _DetectionInformation string) (id int, affectedRows int, err error) CreateVulnInfoNoCVSS3(_SourceVulnID string, _Title string, _SourceID string, _CVSSScore float32, _Description string, _Solution string, _Software string, _DetectionInformation string) (id int, affectedRows int, err error) CreateVulnRef(_VulnInfoID string, _SourceID string, _Reference string, _RefType int) (id int, affectedRows int, err error) DeleteIgnoreForDevice(_sourceID string, _devID string, _orgID string) (id int, affectedRows int, err error) DeleteSessionByToken(_SessionKey string) (id int, affectedRows int, err error) DeleteTagMap(_TicketingSourceID string, _TicketingTag string, _CloudSourceID string, _CloudTag string, _OrganizationID string) (id int, affectedRows int, err error) DeleteUserByUsername(_Username string) (id int, affectedRows int, err error) DisableIgnore(inSourceID string, inDevID string, inOrgID string, inVulnID string, inPortID string, inUpdatedBy string) (id int, affectedRows int, err error) DisableJobConfig(_ID string, _UpdatedBy string) (id int, affectedRows int, err error) DisableOrganization(_ID string, _UpdatedBy string) (id int, affectedRows int, err error) DisableSource(_ID string, _OrgID string, _UpdatedBy string) (id int, affectedRows int, err error) GetAllExceptions(_offset int, _limit int, _sourceID string, _orgID string, _typeID int, _vulnID string, _devID string, _dueDate time.Time, _port string, _approval string, _active bool, _dBCreatedDate time.Time, _dBUpdatedDate time.Time, _updatedBy string, _createdBy string, _sortField string, _sortOrder string) ([]Ignore, error) GetAllJobConfigs(_OrgID string) ([]JobConfig, error) GetAllJobConfigsWithOrder(_offset int, _limit int, _configID string, _jobid int, _dataInSourceConfigID string, _dataOutSourceConfigID string, _priorityOverride int, _continuous bool, _Payload string, _waitInSeconds int, _maxInstances int, _autoStart bool, _OrgID string, _updatedBy string, _createdBy string, _sortField string, _sortOrder string, _updatedDate time.Time, _createdDate time.Time, _lastJobStart time.Time, _ID string) ([]JobConfig, error) GetAssetGroup(inOrgID string, _GroupID int, _ScannerSourceID string) (AssetGroup, error) GetAssetGroupsByCloudSource(inOrgID string, inCloudSourceID string) ([]AssetGroup, error) GetAssignmentGroupByIP(_SourceID string, _OrganizationID string, _IP string) ([]AssignmentGroup, error) GetAssignmentGroupByOrgIP(_OrganizationID string, _IP string) ([]AssignmentGroup, error) GetAutoStartJobs() ([]JobConfig, error) GetCISAssignments(_OrganizationID string) ([]CISAssignments, error) GetCancelledJobs() ([]JobHistory, error) GetCategoryByName(_Name string) ([]Category, error) GetDetectionInfo(_DeviceID string, _VulnerabilityID string) (DetectionInfo, error) GetDetectionInfoAfter(_After time.Time, _OrgID string) ([]DetectionInfo, error) GetDetectionInfoBySourceVulnID(_SourceDeviceID string, _SourceVulnerabilityID string) (DetectionInfo, error) GetDetectionStatusByID(_ID int) (DetectionStatus, error) GetDetectionStatusByName(_Name string) (DetectionStatus, error) GetDetectionStatuses() ([]DetectionStatus, error) GetDetectionsInfoForDevice(_DeviceID string) ([]DetectionInfo, error) GetDeviceInfoByAssetOrgID(inAssetID string, inOrgID string) (DeviceInfo, error) GetDeviceInfoByCloudSourceIDAndIP(_IP string, _CloudSourceID string, _OrgID string) (DeviceInfo, error) GetDeviceInfoByGroupIP(inIP string, inGroupID int, inOrgID string) (DeviceInfo, error) GetDeviceInfoByIP(_IP string, _OrgID string) (DeviceInfo, error) GetDeviceInfoByIPMACAndRegion(_IP string, _MAC string, _Region string, _OrgID string) (DeviceInfo, error) GetDeviceInfoByInstanceID(_InstanceID string, _OrgID string) (DeviceInfo, error) GetDeviceInfoByScannerSourceID(_IP string, _GroupID int, _OrgID string) (DeviceInfo, error) GetDevicesInfoByCloudSourceID(_CloudSourceID string, _OrgID string) ([]DeviceInfo, error) GetDevicesInfoBySourceID(_SourceID string, _OrgID string) ([]DeviceInfo, error) GetExceptionByVulnIDOrg(_DeviceID string, _VulnID string, _OrgID string) (Ignore, error) GetExceptionTypes() ([]ExceptionType, error) GetExceptionsDueNext30Days() ([]CERF, error) GetExceptionsLength(inSourceID string, inOrgID string, inTypeID int, inVulnID string, inDevID string, inDueDate time.Time, inPort string, inApproval string, inActive bool, inDBCreatedDate time.Time, inDBUpdatedDate time.Time, inUpdatedBy string, inCreatedBy string) (QueryData, error) GetJobByID(_ID int) (JobRegistration, error) GetJobConfig(_ID string) (JobConfig, error) GetJobConfigAudit(inJobConfigID string, inOrgID string) ([]JobConfigAudit, error) GetJobConfigByID(_ID string, _OrgID string) (JobConfig, error) GetJobConfigByJobHistoryID(_JobHistoryID string) (JobConfig, error) GetJobConfigByOrgIDAndJobID(_OrgID string, _JobID int) ([]JobConfig, error) GetJobConfigLength(_configID string, _jobID int, _dataInSourceConfigID string, _dataOutSourceConfigID string, _priorityOverride int, _continuous bool, _Payload string, _waitInSeconds int, _maxInstances int, _autoStart bool, _OrgID string, _updatedBy string, _createdBy string, _updatedDate time.Time, _createdDate time.Time, _lastJobStart time.Time, _ID string) (QueryData, error) GetJobHistories(_offset int, _limit int, _jobID int, _jobconfig string, _status int, _Payload string, _OrgID string) ([]JobHistory, error) GetJobHistoryByID(_ID string) (JobHistory, error) GetJobHistoryLength(_jobid int, _jobconfig string, _status int, _Payload string, _orgid string) (QueryData, error) GetJobQueueByStatusID(_StatusID int) ([]JobHistory, error) GetJobs() ([]JobRegistration, error) GetJobsByStruct(_Struct string) (JobRegistration, error) GetLeafOrganizationsForUser(_UserID string) ([]Organization, error) GetLogTypes() ([]LogType, error) GetLogsByParams(_MethodOfDiscovery string, _jobType int, _logType int, _jobHistoryID string, _fromDate time.Time, _toDate time.Time, _OrgID string) ([]DBLog, error) GetMatchedVulns() ([]VulnerabilityMatch, error) GetOperatingSystemType(_OS string) (OperatingSystemType, error) GetOrganizationByCode(Code string) (Organization, error) GetOrganizationByID(ID string) (Organization, error) GetOrganizations() ([]Organization, error) GetPendingActiveRescanJob(_OrgID string) ([]JobHistory, error) GetPermissionByUserOrgID(_UserID string, _OrgID string) (Permission, error) GetPermissionOfLeafOrgByUserID(_UserID string) (Permission, error) GetRecentlyUpdatedScanSummaries(_OrgID string) ([]ScanSummary, error) GetScanSummariesBySourceName(_OrgID string, _SourceName string) ([]ScanSummary, error) GetScanSummary(_SourceID string, _OrgID string, _ScanID string) (ScanSummary, error) GetScanSummaryBySourceKey(_SourceKey string) (ScanSummary, error) GetScheduledJobsToStart(_LastChecked time.Time) ([]JobSchedule, error) GetSessionByToken(_SessionKey string) (Session, error) GetSourceByID(_ID string) (Source, error) GetSourceByName(_Source string) (Source, error) GetSourceConfigByID(_ID string) (SourceConfig, error) GetSourceConfigByNameOrg(_Source string, _OrgID string) ([]SourceConfig, error) GetSourceConfigByOrgID(_OrgID string) ([]SourceConfig, error) GetSourceConfigBySourceID(_OrgID string, _SourceID string) ([]SourceConfig, error) GetSourceInsByJobID(inJob int, inOrgID string) ([]SourceConfig, error) GetSourceOauthByOrgURL(_URL string, _OrgID string) (SourceConfig, error) GetSourceOauthByURL(_URL string) (SourceConfig, error) GetSourceOutsByJobID(inJob int, inOrgID string) ([]SourceConfig, error) GetSources() ([]Source, error) GetTagByDeviceAndTagKey(_DeviceID string, _TagKeyID string) (Tag, error) GetTagKeyByID(_ID string) (TagKey, error) GetTagKeyByKey(_KeyValue string) (TagKey, error) GetTagMapsByOrg(_OrganizationID string) ([]TagMap, error) GetTagMapsByOrgCloudSourceID(_CloudID string, _OrganizationID string) ([]TagMap, error) GetTagsForDevice(_DeviceID string) ([]Tag, error) GetTicketByDeviceIDVulnID(inDeviceID string, inVulnID string, inOrgID string) (TicketSummary, error) GetTicketByTitle(_Title string, _OrgID string) (TicketSummary, error) GetUnfinishedScanSummariesBySourceOrgID(_SourceID string, _OrgID string) ([]ScanSummary, error) GetUnmatchedVulns(_SourceID int) ([]VulnerabilityInfo, error) GetUserAnyOrg(_ID string) (User, error) GetUserByID(_ID string, _OrgID string) (User, error) GetUserByUsername(_Username string) (User, error) GetUsersByOrg(_OrgID string) ([]User, error) GetVulnInfoByID(_ID string) (VulnerabilityInfo, error) GetVulnInfoBySource(_Source string) ([]VulnerabilityInfo, error) GetVulnInfoBySourceID(_SourceID string) ([]VulnerabilityInfo, error) GetVulnInfoBySourceVulnID(_SourceVulnID string) (VulnerabilityInfo, error) GetVulnInfoBySourceVulnIDSourceID(_SourceVulnID string, _SourceID string, _Modified time.Time) (VulnerabilityInfo, error) GetVulnRefInfo(_VulnInfoID string, _SourceID string, _Reference string) (VulnerabilityReferenceInfo, error) GetVulnRefInfoVendor(_VulnInfoID string, _SourceID string) ([]VulnerabilityReferenceInfo, error) GetVulnReferencesInfo(_VulnInfoID string, _SourceID string) ([]VulnerabilityReferenceInfo, error) GetVulnReferencesInfoBySourceAndRef(_SourceID string, _Reference string) ([]VulnerabilityReferenceInfo, error) HasDecommissioned(_devID string, _sourceID string, _orgID string) (Ignore, error) HasExceptionOrFalsePositive(_sourceID string, _vulnID string, _devID string, _orgID string, _port string, _OS string) ([]Ignore, error) HasIgnore(inSourceID string, inVulnID string, inDevID string, inOrgID string, inPort string, inMostCurrentDetection time.Time) (Ignore, error) PulseJob(_JobHistoryID string) (id int, affectedRows int, err error) SaveAssignmentGroup(_SourceID string, _OrganizationID string, _IpAddress string, _GroupName string) (id int, affectedRows int, err error) SaveIgnore(_SourceID string, _OrganizationID string, _TypeID int, _VulnerabilityID string, _DeviceID string, _DueDate time.Time, _Approval string, _Active bool, _port string) (id int, affectedRows int, err error) SaveScanSummary(_ScanID string, _ScanStatus string) (id int, affectedRows int, err error) SetScheduleLastRun(_ID string) (id int, affectedRows int, err error) UpdateAssetIDOsTypeIDOfDevice(_ID string, _AssetID string, _ScannerSourceID string, _GroupID int, _OS string, _HostName string, _OsTypeID int, _OrgID string) (id int, affectedRows int, err error) UpdateDetectionTimesSeen(_DeviceID string, _VulnID string, _TimesSeen int, _StatusID int) (id int, affectedRows int, err error) UpdateExpirationDateByCERF(_CERForm string, _OrganizationID string, _DueDate time.Time) (id int, affectedRows int, err error) UpdateInstanceIDOfDevice(_ID string, _InstanceID string, _CloudSourceID string, _State string, _Region string, _OrgID string) (id int, affectedRows int, err error) UpdateJobConfig(_ID string, _DataInSourceID string, _DataOutSourceID string, _Autostart bool, _PriorityOverride int, _Continuous bool, _WaitInSeconds int, _MaxInstances int, _UpdatedBy string, _OrgID string) (id int, affectedRows int, err error) UpdateJobConfigLastRun(_ID string, _LastRun time.Time) (id int, affectedRows int, err error) UpdateJobHistory(_ID string, _Status int, _ConfigID string, _Payload string, _UpdatedBy string) (id int, affectedRows int, err error) UpdateJobHistoryStatus(_ID string, _Status int) (id int, affectedRows int, err error) UpdateJobHistoryStatusDetailed(_ID string, _Status int, _UpdatedBy string) (id int, affectedRows int, err error) UpdateOrganization(_ID string, _Description string, _TimezoneOffset float32, _UpdatedBy string) (id int, affectedRows int, err error) UpdatePermissionsByUserOrgID(_UserID string, _OrgID string, _Admin bool, _Manager bool, _Reader bool, _Reporter bool) (id int, affectedRows int, err error) UpdateSourceConfig(_ID string, _OrgID string, _Address string, _Username string, _Password string, _PrivateKey string, _ConsumerKey string, _Token string, _Port string, _Payload string, _UpdatedBy string) (id int, affectedRows int, err error) UpdateSourceConfigToken(_ID string, _Token string) (id int, affectedRows int, err error) UpdateStateOfDevice(_ID string, _State string, _OrgID string) (id int, affectedRows int, err error) UpdateTag(_DeviceID string, _TagKeyID string, _Value string) (id int, affectedRows int, err error) UpdateTagMap(_TicketingSourceID string, _TicketingTag string, _CloudSourceID string, _CloudTag string, _Options string, _OrganizationID string) (id int, affectedRows int, err error) UpdateTicket(_Title string, _Status string, _OrganizationID string, _UpdatedDate time.Time, _ResolutionDate time.Time) (id int, affectedRows int, err error) UpdateUserByID(_ID string, _FirstName string, _LastName string, _Email string, _Disabled bool) (id int, affectedRows int, err error) UpdateVulnByID(_ID string, _SourceVulnID string, _Title string, _SourceID string, _CVSSScore float32, _CVSS3Score float32, _Description string, _Solution string, _Software string, _DetectionInformation string) (id int, affectedRows int, err error) UpdateVulnByIDNoCVSS3(_ID string, _SourceVulnID string, _Title string, _SourceID string, _CVSSScore float32, _Description string, _Solution string, _Software string, _DetectionInformation string) (id int, affectedRows int, err error) UpdateVulnInfoID(_VulnInfoID string, _VulnID string, _MatchConfidence int, _MatchReasons string) (id int, affectedRows int, err error) }
GeneratedDatabaseConnection outlines all the stored procedures used by the application. This interface can be used to mock the connection for the purpose of testing
type Host ¶
type Host struct { Path string `json:"Host,omitempty"` Porticus int `json:"Port,omitempty"` Verify bool `json:"VerifyTLS,omitempty"` TimeDelay int `json:"Delay,omitempty"` ConcurrencyLimit int `json:"Concurrency,omitempty"` RetryLimit int `json:"Retries,omitempty"` CacheTTLSeconds *int `json:"CacheTTLSeconds,omitempty"` *BasicAuth }
Host is a struct that contains all of the important information for a host that is going to be authenticated to including funneling information and tuning
func (*Host) Concurrency ¶
Concurrency indicates the maximum number of concurrent requests to make at a time against this asset
func (*Host) Delay ¶
Delay returns the time delay to use when accessing the api endpoints for this asset
type Ignore ¶
type Ignore interface { DeviceID() (param string) DueDate() (param *time.Time) ID() (param string) OrganizationID() (param string) VulnerabilityID() (param string) Approval() (param string) Active() (param bool) Port() (param string) TypeID() (param int) SourceID() string CreatedBy() (param *string) UpdatedBy() (param *string) DBCreatedDate() (param time.Time) DBUpdatedDate() (param *time.Time) }
Ignore defines the interface
type Job ¶
type Job interface {
Process(ctx context.Context, id string, appconfig Config, db DatabaseConnection, lstream log.Logger, payload string, jobConfig JobConfig, inSource []SourceConfig, outSource []SourceConfig) (err error)
}
Job specifies the interface required by job implementations in order to execute properly through the dispatcher
type JobConfig ¶
type JobConfig interface { Active() (param bool) AutoStart() (param bool) Continuous() (param bool) CreatedBy() (param string) CreatedDate() (param time.Time) DataInSourceConfigID() (param *string) DataOutSourceConfigID() (param *string) ID() (param string) JobID() (param int) LastJobStart() (param *time.Time) MaxInstances() (param int) //Organization() (param Organization) OrganizationID() (param string) Payload() (param *string) PriorityOverride() (param *int) UpdatedBy() (param *string) UpdatedDate() (param *time.Time) WaitInSeconds() (param int) }
JobConfig defines the interface
type JobConfigAudit ¶
JobConfigAudit holds information for the JobConfigAudit table in the database. It holds all the information that a job config has with some additional metadata
type JobHistory ¶
type JobHistory interface { ConfigID() (param string) CreatedDate() (param time.Time) CurrentIteration() (param *int) ID() (param string) Identifier() (param *string) JobID() (param int) ParentJobID() (param *string) Payload() (param string) Priority() (param int) PulseDate() (param *time.Time) StatusID() (param int) ThreadID() (param *string) UpdatedDate() (param *time.Time) MaxInstances() int }
JobHistory defines the interface
type JobRegistration ¶
type JobRegistration interface { CreatedBy() (param string) CreatedDate() (param time.Time) GoStruct() (param string) ID() (param int) Priority() (param int) UpdatedBy() (param *string) UpdatedDate() (param *time.Time) }
JobRegistration defines the interface
type JobSchedule ¶
type JobSchedule interface { ConfigID() (param string) ID() (param string) Payload() (param *string) }
JobSchedule defines the interface
type LogConfig ¶
type LogConfig interface { LogPath() string LogFile() bool LogConsole() bool LogDB() bool LogMQ() bool DebugLogs() bool PreserveFileLogs() bool }
LogConfig defines an interface which returns the methods for logging configurations for the application
type Match ¶
Match is an interface that holds a device/vulnerability combination, where a vulnerability scanner found the vulnerability on the device
type OauthAuth ¶
type OauthAuth struct { PrivateKey string `json:"PrivateKey,omitempty"` ConsumerKey string `json:"ConsumerKey,omitempty"` Token string `json:"Token,omitempty"` }
OauthAuth is used to parse the authentication information from the AuthInfo field in the SourceConfig database
type OperatingSystemType ¶
type OperatingSystemType interface { ID() (param int) Type() (param string) Match() (param string) Priority() (param int) }
OperatingSystemType defines the interface
type Organization ¶
type Organization interface { Code() (param string) Created() (param time.Time) Description() (param *string) EncryptionKey() (param *string) ID() (param string) ParentOrgID() (param *string) Payload() (param string) TimeZoneOffset() (param float32) Updated() (param *time.Time) }
Organization defines the interface
type Permission ¶
type Permission interface { Admin() (param bool) Manager() (param bool) OrgID() (param string) ParentOrgPermission() (param Permission) Reader() (param bool) Reporter() (param bool) UserID() (param string) }
Permission defines the interface
type Scan ¶
Scan is an interface that captures important information regarding the scan that is created inside of a scanner
type ScanSummary ¶
type ScanSummary interface { CreatedDate() (param time.Time) OrgID() (param string) ParentJobID() (param string) ScanClosePayload() (param string) ScanStatus() (param string) Source() (param string) SourceID() (param string) SourceKey() (param *string) TemplateID() (param *string) UpdatedDate() (param *time.Time) }
ScanSummary defines the interface
type Session ¶
type Session interface { IsDisabled() (param bool) OrgID() (param string) SessionKey() (param string) UserID() (param string) }
Session defines the interface
type Source ¶
type Source interface { DBCreatedDate() (param time.Time) DBUpdatedDate() (param *time.Time) ID() (param string) Source() (param string) SourceTypeID() (param int) }
Source defines the interface
type SourceConfig ¶
type SourceConfig interface { Address() (param string) AuthInfo() (param string) DBCreatedDate() (param time.Time) DBUpdatedDate() (param *time.Time) ID() (param string) OrganizationID() (param string) Payload() (param *string) Port() (param string) Source() (param string) SourceID() (param string) }
SourceConfig defines the interface
type Tag ¶
type Tag interface { DeviceID() (param string) ID() (param string) TagKeyID() (param int) Value() (param string) }
Tag defines the interface
type TagMap ¶
type TagMap interface { CloudSourceID() (param string) CloudTag() (param string) ID() (param string) Options() (param string) TicketingSourceID() (param string) TicketingTag() (param string) }
TagMap defines the interface
type Ticket ¶
type Ticket interface { AlertDate() (param *time.Time) AssignedTo() (param *string) AssignmentGroup() (param *string) CERF() (param string) CERFExpirationDate() (param time.Time) CVEReferences() (param *string) CVSS() (param *float32) CloudID() (param string) Configs() (param string) CreatedDate() (param *time.Time) DBCreatedDate() (param time.Time) DBUpdatedDate() (param *time.Time) Description() (param *string) DeviceID() (param string) DueDate() (param *time.Time) HostName() (param *string) ID() (param int) IPAddress() (param *string) Labels() (param *string) LastChecked() (param *time.Time) MacAddress() (param *string) MethodOfDiscovery() (param *string) OSDetailed() (param *string) OperatingSystem() (param *string) OrgCode() (param *string) OrganizationID() (param string) Priority() (param *string) Project() (param *string) ReportedBy() (param *string) ResolutionDate() (param *time.Time) ResolutionStatus() (param *string) ScanID() (param int) ServicePorts() (param *string) Solution() (param *string) Status() (param *string) Summary() (param *string) TicketType() (param *string) Title() (param string) UpdatedDate() (param *time.Time) VendorReferences() (param *string) VulnerabilityID() (param string) VulnerabilityTitle() (param *string) }
Ticket defines the interface
type TicketSummary ¶
type TicketSummary interface { DetectionID() (param string) DueDate() (param time.Time) OrganizationID() (param string) ResolutionDate() (param *time.Time) Status() (param string) Title() (param string) UpdatedDate() (param *time.Time) }
TicketSummary defines the interface
type User ¶
type User interface { Email() (param string) FirstName() (param string) ID() (param string) IsDisabled() (param bool) LastName() (param string) Username() (param *string) }
User defines the interface
type Vulnerability ¶
type Vulnerability interface { ID() string SourceID() string Name() string Description() string CVSS2() float32 CVSS3() *float32 Updated() time.Time Solutions(ctx context.Context) (<-chan Solution, error) References(ctx context.Context) (<-chan VulnerabilityReference, error) Software() string DetectionInformation() string }
Vulnerability defines the interface
type VulnerabilityInfo ¶
type VulnerabilityInfo interface { CVEs() (param []VulnerabilityReference) CVSS3Score() (param *float32) CVSSScore() (param float32) Created() (param *time.Time) Description() (param string) DetectionInformation() (param *string) ID() (param string) NeedsUpdate() (param bool) Software() (param *string) Solution() (param string) SourceID() (param string) SourceVulnID() (param string) Title() (param string) Updated() (param *time.Time) Vendors() (param []VulnerabilityReference) VulnerabilityID() (param *string) }
VulnerabilityInfo defines the interface
type VulnerabilityMatch ¶
type VulnerabilityMatch interface { FirstID() (param string) FirstTitle() (param string) MatchConfidence() (param int) MatchReason() (param string) SecondID() (param string) SecondTitle() (param string) VulnerabilityID() (param string) }
VulnerabilityMatch defines the interface
type VulnerabilityReference ¶
type VulnerabilityReference interface {
Reference() (param string)
}
VulnerabilityReference defines the interface
Source Files ¶
- auth.go
- config.go
- constants.go
- generated.interface.go
- interface.assetgroup.go
- interface.assignmentgroup.go
- interface.category.go
- interface.cerf.go
- interface.cisassignments.go
- interface.cloudip.go
- interface.dblog.go
- interface.detection.go
- interface.detectioninfo.go
- interface.detectionstatus.go
- interface.device.go
- interface.devicegroup.go
- interface.deviceinfo.go
- interface.exceptiontype.go
- interface.finding.go
- interface.go
- interface.ignore.go
- interface.job.go
- interface.jobconfig.go
- interface.jobconfigaudit.go
- interface.jobhistory.go
- interface.jobregistration.go
- interface.jobschedule.go
- interface.keyvalue.go
- interface.logtype.go
- interface.match.go
- interface.operatingsystemtype.go
- interface.organization.go
- interface.permission.go
- interface.querydata.go
- interface.result.go
- interface.scan.go
- interface.scansummary.go
- interface.session.go
- interface.solution.go
- interface.source.go
- interface.sourceconfig.go
- interface.tag.go
- interface.tagkey.go
- interface.tagmap.go
- interface.ticket.go
- interface.ticketsummary.go
- interface.user.go
- interface.vulnerability.go
- interface.vulnerabilityinfo.go
- interface.vulnerabilitymatch.go
- interface.vulnerabilityreference.go
- interface.vulnerabilityreferenceinfo.go