Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type ActionID
- type AddBody
- type Assignee
- type AssignmentGroupResponse
- type CF
- type ConfigJira
- type ConnectorJira
- func (connector *ConnectorJira) AssignmentGroupExists(groupName string) (exists bool, err error)
- func (connector *ConnectorJira) CreateTicket(ticket domain.Ticket) (sourceID int, sourceKey string, err error)
- func (connector *ConnectorJira) DeleteTicket(id string) (err error)
- func (connector *ConnectorJira) GetAdditionalTicketsForDecomDevices(tickets []domain.Ticket) (relatedTickets <-chan domain.Ticket, err error)
- func (connector *ConnectorJira) GetAdditionalTicketsForVulnPerDevice(tickets []domain.Ticket) (relatedTickets <-chan domain.Ticket, err error)
- func (connector *ConnectorJira) GetByCustomJQL(JQL string) (tickets []domain.Ticket, err error)
- func (connector *ConnectorJira) GetByCustomJQLChan(JQL string) (ticketChan <-chan domain.Ticket)
- func (connector *ConnectorJira) GetCERFExpirationUpdates(startDate time.Time) (cerfs map[string]time.Time, err error)
- func (connector *ConnectorJira) GetCountOfTicketsInStatus(status string, orgCode string) (count int, err error)
- func (connector *ConnectorJira) GetEditableFields(id string) (err error)
- func (connector *ConnectorJira) GetFieldMap(in string) *Field
- func (connector *ConnectorJira) GetFieldMapName(in string) (out string)
- func (connector *ConnectorJira) GetFieldsForProject(project string, includeNonMappables bool) (fields []string, err error)
- func (connector *ConnectorJira) GetOpenTicketsByGroupID(methodOfDiscovery string, orgCode string, groupID string) (tickets <-chan domain.Ticket, err error)
- func (connector *ConnectorJira) GetProject() string
- func (connector *ConnectorJira) GetStatusMap(in string) string
- func (connector *ConnectorJira) GetTicket(sourceKey string) (ticket domain.Ticket, err error)
- func (connector *ConnectorJira) GetTicketsByClosedStatus(orgCode string, methodOfDiscovery string, startDate time.Time) (tix <-chan domain.Ticket)
- func (connector *ConnectorJira) GetTicketsByDeviceIDVulnID(methodOfDiscovery string, orgCode string, deviceID string, vulnID string, ...) (tickets <-chan domain.Ticket, err error)
- func (connector *ConnectorJira) GetTicketsForRescan(cerfs []domain.CERF, MethodOfDiscovery string, OrgCode string, ...) (tickets <-chan domain.Ticket, err error)
- func (connector *ConnectorJira) GetTicketsUpdatedSince(since time.Time, orgCode string, methodOfDiscovery string) <-chan domain.Ticket
- func (connector *ConnectorJira) Transition(ticket domain.Ticket, toStatus string, comment string, assignTo string) (err error)
- func (connector *ConnectorJira) UpdateTicket(ticket domain.Ticket, comment string) (SourceID int, SourceKey string, err error)
- type Field
- type FieldList
- type FieldStruct
- type Issue
- func (ji *Issue) AlertDate() (param *time.Time)
- func (ji *Issue) AlertDateOrDefault() (param time.Time)
- func (ji *Issue) AssignedTo() (param *string)
- func (ji *Issue) AssignedToOrDefault() (param string)
- func (ji *Issue) AssignmentGroup() (param *string)
- func (ji *Issue) AssignmentGroupOrDefault() (param string)
- func (ji *Issue) CERF() (param string)
- func (ji *Issue) CERFExpirationDate() (param time.Time)
- func (ji *Issue) CVEReferences() (param *string)
- func (ji *Issue) CVEReferencesOrDefault() (param string)
- func (ji *Issue) CVSS() (param *float32)
- func (ji *Issue) CVSSOrDefault() (param float32)
- func (ji *Issue) CloudID() (param string)
- func (ji *Issue) Configs() (param string)
- func (ji *Issue) CreatedDate() (param *time.Time)
- func (ji *Issue) CreatedDateOrDefault() (param time.Time)
- func (ji *Issue) DBCreatedDate() (param time.Time)
- func (ji *Issue) DBUpdatedDate() (param *time.Time)
- func (ji *Issue) DBUpdatedDateOrDefault() (param time.Time)
- func (ji *Issue) Description() (param *string)
- func (ji *Issue) DescriptionOrDefault() (param string)
- func (ji *Issue) DeviceID() (param string)
- func (ji *Issue) DueDate() (param *time.Time)
- func (ji *Issue) DueDateOrDefault() (param time.Time)
- func (ji *Issue) GroupID() (param string)
- func (ji *Issue) HostName() (param *string)
- func (ji *Issue) HostNameOrDefault() (param string)
- func (ji *Issue) ID() (param int)
- func (ji *Issue) IPAddress() (param *string)
- func (ji *Issue) IPAddressOrDefault() (param string)
- func (ji *Issue) Labels() (param *string)
- func (ji *Issue) LabelsOrDefault() (param string)
- func (ji *Issue) LastChecked() (param *time.Time)
- func (ji *Issue) LastCheckedOrDefault() (param time.Time)
- func (ji *Issue) MacAddress() (param *string)
- func (ji *Issue) MacAddressOrDefault() (param string)
- func (ji *Issue) MethodOfDiscovery() (param *string)
- func (ji *Issue) MethodOfDiscoveryOrDefault() (param string)
- func (ji *Issue) OSDetailed() (param *string)
- func (ji *Issue) OSDetailedOrDefault() (param string)
- func (ji *Issue) OperatingSystem() (param *string)
- func (ji *Issue) OperatingSystemOrDefault() (param string)
- func (ji *Issue) OrgCode() (param *string)
- func (ji *Issue) OrgCodeOrDefault() (param string)
- func (ji *Issue) OrganizationID() (param string)
- func (ji *Issue) Packages() (param *string)
- func (ji *Issue) PackagesOrDefault() (param string)
- func (ji *Issue) Priority() (param *string)
- func (ji *Issue) PriorityOrDefault() (param string)
- func (ji *Issue) Project() (param *string)
- func (ji *Issue) ProjectOrDefault() (param string)
- func (ji *Issue) ReportedBy() (param *string)
- func (ji *Issue) ReportedByOrDefault() (param string)
- func (ji *Issue) ResolutionDate() (param *time.Time)
- func (ji *Issue) ResolutionDateOrDefault() (param time.Time)
- func (ji *Issue) ResolutionStatus() (param *string)
- func (ji *Issue) ResolutionStatusOrDefault() (param string)
- func (ji *Issue) ScanID() (param int)
- func (ji *Issue) ServicePorts() (param *string)
- func (ji *Issue) ServicePortsOrDefault() (param string)
- func (ji *Issue) SetAlertDate(val time.Time)
- func (ji *Issue) SetAssignedTo(val string)
- func (ji *Issue) SetAssignmentGroup(val string)
- func (ji *Issue) SetCERF(val string)
- func (ji *Issue) SetCERFExpirationDate(val time.Time)
- func (ji *Issue) SetCVEReferences(val string)
- func (ji *Issue) SetCVSS(val float32)
- func (ji *Issue) SetCloudID(val string)
- func (ji *Issue) SetConfigs(val string)
- func (ji *Issue) SetCreatedDate(val time.Time)
- func (ji *Issue) SetDBCreatedDate(val time.Time)
- func (ji *Issue) SetDBUpdatedDate(val time.Time)
- func (ji *Issue) SetDescription(val string)
- func (ji *Issue) SetDeviceID(val string)
- func (ji *Issue) SetDueDate(val time.Time)
- func (ji *Issue) SetGroupID(val string)
- func (ji *Issue) SetHostName(val string)
- func (ji *Issue) SetID(val int)
- func (ji *Issue) SetIPAddress(val string)
- func (ji *Issue) SetLabels(val string)
- func (ji *Issue) SetLastChecked(val time.Time)
- func (ji *Issue) SetMacAddress(val string)
- func (ji *Issue) SetMethodOfDiscovery(val string)
- func (ji *Issue) SetOSDetailed(val string)
- func (ji *Issue) SetOperatingSystem(val string)
- func (ji *Issue) SetOrgCode(val string)
- func (ji *Issue) SetOrganizationID(val string)
- func (ji *Issue) SetPackages(val string)
- func (ji *Issue) SetPriority(val string)
- func (ji *Issue) SetProject(val string)
- func (ji *Issue) SetReportedBy(val string)
- func (ji *Issue) SetResolutionDate(val time.Time)
- func (ji *Issue) SetResolutionStatus(val string)
- func (ji *Issue) SetScanID(val int)
- func (ji *Issue) SetServicePorts(val string)
- func (ji *Issue) SetSolution(val string)
- func (ji *Issue) SetStatus(val string)
- func (ji *Issue) SetSummary(val string)
- func (ji *Issue) SetTicketType(val string)
- func (ji *Issue) SetTitle(val string)
- func (ji *Issue) SetUpdatedDate(val time.Time)
- func (ji *Issue) SetVendorReferences(val string)
- func (ji *Issue) SetVulnerabilityID(val string)
- func (ji *Issue) SetVulnerabilityTitle(val string)
- func (ji *Issue) Solution() (param *string)
- func (ji *Issue) SolutionOrDefault() (param string)
- func (ji *Issue) Status() (param *string)
- func (ji *Issue) StatusOrDefault() (param string)
- func (ji *Issue) Summary() (param *string)
- func (ji *Issue) SummaryOrDefault() (param string)
- func (ji *Issue) TicketType() (param *string)
- func (ji *Issue) TicketTypeOrDefault() (param string)
- func (ji *Issue) Title() (param string)
- func (ji *Issue) UpdatedDate() (param *time.Time)
- func (ji *Issue) UpdatedDateOrDefault() (param time.Time)
- func (ji *Issue) VendorReferences() (param *string)
- func (ji *Issue) VendorReferencesOrDefault() (param string)
- func (ji *Issue) VulnerabilityID() (param string)
- func (ji *Issue) VulnerabilityTitle() (param *string)
- func (ji *Issue) VulnerabilityTitleOrDefault() (param string)
- type PayloadJira
- type Query
- type Request
- type Results
- type Schema
- type Status
- type Transition
- type TransitionField
- type TransitionPayload
- type Update
- type UpdateObjects
- type ValueField
Constants ¶
const ( // DateFormatJira is used to parse the string dates that JIRA returns from API requests DateFormatJira = "2006-01-02T15:04:05.999-0700" // DateOnlyJira is used to set the date of JIRA tickets where more fine-grained dates is not needed DateOnlyJira = "2006-01-02" // QueryDateTimeFormatJira is the format of dates in a JQL QueryDateTimeFormatJira = "2006/01/02 15:04" )
const ( // MaxThreads defines the amount of threads create API calls for JIRA MaxThreads = 25 // StatusReopened is the status of a ticket which a scanner confirmed its vulnerability still exists after it was marked resolved StatusReopened = "Reopened" // StatusClosedRemediated is the status of a ticket which was marked resolved, and had the vulnerability resolution confirmed by a scanner StatusClosedRemediated = "Closed-Remediated" // StatusClosedFalsePositive is the status of a ticket which has the vulnerability confirmed to be a false positive StatusClosedFalsePositive = "Closed-False-Positive" // StatusClosedDecommissioned is the status of a ticket for a vulnerability on a device that is no longer active StatusClosedDecommissioned = "Closed-Decommission" // StatusOpen is the status of a ticket which has not had any remediation steps taken StatusOpen = "Open" // StatusInProgress is the status of a ticket which is in the process of remediation StatusInProgress = "In-Progress" // StatusResolvedException is the status of a ticket which does not need to have the vulnerability remediated but not confirmed by a scanner StatusResolvedException = "Resolved-Exception" // StatusClosedException is the status of a ticket which does not need to have the vulnerability remediated StatusClosedException = "Closed-Exception" // StatusResolvedDecom is the status of a ticket for a vulnerability on a device that is no longer active but not confirmed by a scanner StatusResolvedDecom = "Resolved-Decommissioned" // StatusResolvedRemediated is the status of a ticket which was marked resolved but not confirmed by a scanner StatusResolvedRemediated = "Resolved-Remediated" // StatusResolvedFalsePositive is the status of a ticket which has the vulnerability confirmed to be a false positive but not verified by a scanner StatusResolvedFalsePositive = "Resolved-FalsePositive" // StatusClosedCerf is the status of a ticket that was closed due to an associated CERF (Candidate Exception Request Form) StatusClosedCerf = "Closed-CERF" // StatusClosedError is StatusClosedError = "Closed-Error" )
Const for status maps These are used as KEYS to grab the equivalent mapped status from the JIRA payload
const Unassigned = "Unassigned"
Unassigned holds the string value of the assignee of a ticket that has yet to be assigned
Variables ¶
var MappableFields = []string{
backendMOD,
backendSummary,
backendHostname,
backendIPAddress,
backendMACAddress,
backendServicePort,
backendDescription,
backendSolution,
backendVRRPriority,
backendScanDate,
backendAssignmentGroup,
backendResolutionDate,
backendOperatingSystem,
backendVulnerability,
backendCVSS,
backendVulnerabilityID,
backendGroupID,
backendDeviceID,
backendScanID,
backendOrg,
backendCERF,
backendCERFExpiration,
backendCVEReferences,
backendVendorReferences,
backendOSDetailed,
backendConfig,
backendLastChecked,
backendCloudID,
}
MappableFields contains a list of all custom fields used by Aegis that may need to be mapped to a different name for a field that uses custom fields with different names
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { ActionID string `xml:"id,attr"` TransitionName string `xml:"name,attr"` TransitionDetails Results `xml:"results>unconditional-result"` }
Action is a member of Status and must be exported in order to be marshaled
type ActionID ¶
type ActionID struct {
ID string `xml:"id,attr"`
}
ActionID is a member of Action and must be exported in order to be marshaled
type AddBody ¶
type AddBody struct {
Body string `json:"body" structs:"body"`
}
AddBody is used in UpdateObjects and must be exported in order to be marshaled
type Assignee ¶
type Assignee struct {
Name string `json:"name,omitempty"`
}
Assignee is used in FieldStruct and must be exported in order to be marshaled
type AssignmentGroupResponse ¶
type AssignmentGroupResponse struct {
Name string `json:"name"`
}
AssignmentGroupResponse is a member of assignmentGroupResponseWrapper and must be exported in order to be marshaled
type CF ¶
type CF struct { Value interface{} `json:"value,omitempty"` ID int `json:"id,omitempty"` Self string `json:"self,omitempty"` Name interface{} `json:"name,omitempty"` }
CF is used for parsing custom field information from the JIRA API back to the JIRA driver
type ConfigJira ¶
type ConfigJira interface {
EncryptionKey() string
}
ConfigJira is an interface that defines the fields that JIRA requires from the app config
type ConnectorJira ¶
type ConnectorJira struct { CERFs sync.Map Fields map[string]*Field Resolutions map[string]*jira.Resolution Statuses map[string]*jira.Status IssueTypes map[string]jira.IssueType TransitionMap map[string]map[string][]workflowTransition // contains filtered or unexported fields }
ConnectorJira is the struct that is used to make API calls against JIRA
func ConnectJira ¶
func ConnectJira(api string, user string, password string, lstream logger) (connector *ConnectorJira, err error)
ConnectJira creates a JIRA connection using basic authentication
func NewJiraConnector ¶
func NewJiraConnector(ctx context.Context, lstream logger, config domain.SourceConfig) (connector *ConnectorJira, token string, err error)
NewJiraConnector creates a new JIRA connector for interacting with a JIRA system it attempts to use Oauth if the information is present in the source config. If not, basic authentication is used
func (*ConnectorJira) AssignmentGroupExists ¶
func (connector *ConnectorJira) AssignmentGroupExists(groupName string) (exists bool, err error)
AssignmentGroupExists checks to see if the input string is a valid assignment group in JIRA
func (*ConnectorJira) CreateTicket ¶
func (connector *ConnectorJira) CreateTicket(ticket domain.Ticket) (sourceID int, sourceKey string, err error)
CreateTicket returns the source id and source key of the newly created ticket for logging in the database
func (*ConnectorJira) DeleteTicket ¶
func (connector *ConnectorJira) DeleteTicket(id string) (err error)
DeleteTicket delete the ticket in JIRA corresponding to the id parameter. Used by the JIRA tool
func (*ConnectorJira) GetAdditionalTicketsForDecomDevices ¶
func (connector *ConnectorJira) GetAdditionalTicketsForDecomDevices(tickets []domain.Ticket) (relatedTickets <-chan domain.Ticket, err error)
GetAdditionalTicketsForDecomDevices gets the additional tickets by looking for all the tickets for the decommed devices(except those with "Closed-Remediated".
func (*ConnectorJira) GetAdditionalTicketsForVulnPerDevice ¶
func (connector *ConnectorJira) GetAdditionalTicketsForVulnPerDevice(tickets []domain.Ticket) (relatedTickets <-chan domain.Ticket, err error)
GetAdditionalTicketsForVulnPerDevice gets the additional tickets for the Vulns that have been scanned on all devices
func (*ConnectorJira) GetByCustomJQL ¶
func (connector *ConnectorJira) GetByCustomJQL(JQL string) (tickets []domain.Ticket, err error)
GetByCustomJQL returns the tickets that JIRA returns for a JQL statement. Not used by the application but is useful for testing
func (*ConnectorJira) GetByCustomJQLChan ¶
func (connector *ConnectorJira) GetByCustomJQLChan(JQL string) (ticketChan <-chan domain.Ticket)
GetByCustomJQLChan returns the tickets that JIRA returns for a JQL statement onto a channel
func (*ConnectorJira) GetCERFExpirationUpdates ¶
func (connector *ConnectorJira) GetCERFExpirationUpdates(startDate time.Time) (cerfs map[string]time.Time, err error)
GetCERFExpirationUpdates returns a map relating CERF tickets to their expiration date. It only grabs tickets that expire after the startDate parameter
func (*ConnectorJira) GetCountOfTicketsInStatus ¶
func (connector *ConnectorJira) GetCountOfTicketsInStatus(status string, orgCode string) (count int, err error)
GetCountOfTicketsInStatus returns the amount of tickets in a given status. Used by the API to populate dashboard information
func (*ConnectorJira) GetEditableFields ¶
func (connector *ConnectorJira) GetEditableFields(id string) (err error)
GetEditableFields is not used by the project, but is useful for debugging as it prints the editable JIRA fields
func (*ConnectorJira) GetFieldMap ¶
func (connector *ConnectorJira) GetFieldMap(in string) *Field
GetFieldMap returns the custom project field equivalent to the backend field name
func (*ConnectorJira) GetFieldMapName ¶
func (connector *ConnectorJira) GetFieldMapName(in string) (out string)
GetFieldMapName returns the custom project field name equivalent to the backend field name
func (*ConnectorJira) GetFieldsForProject ¶
func (connector *ConnectorJira) GetFieldsForProject(project string, includeNonMappables bool) (fields []string, err error)
GetFieldsForProject only returns the field allowed by the mappable_fields dictated in the jira payload. It is used by the API TODO should we just return the list of mappable fields in the connector payload? do we need to confirm with the API that the fields exist for the project?
func (*ConnectorJira) GetOpenTicketsByGroupID ¶
func (connector *ConnectorJira) GetOpenTicketsByGroupID(methodOfDiscovery string, orgCode string, groupID string) (tickets <-chan domain.Ticket, err error)
GetOpenTicketsByGroupID returns tickets with an open status for an organization/method of discovery within a specified group For CIS tickets the entity ID is stored in the deviceID field, the ruleHash is stored in the vulnerabilityID field and the cloudAccountID is stored in the group ID
func (*ConnectorJira) GetProject ¶
func (connector *ConnectorJira) GetProject() string
GetProject returns the project that a JIRA connection is pointing to (defined in the JIRA source config payload)
func (*ConnectorJira) GetStatusMap ¶
func (connector *ConnectorJira) GetStatusMap(in string) string
GetStatusMap returns the mapped status to the status provided in the parameter. This is required as a JIRA project will have their own custom statuses that do not match the statuses defined in the application
func (*ConnectorJira) GetTicket ¶
func (connector *ConnectorJira) GetTicket(sourceKey string) (ticket domain.Ticket, err error)
GetTicket returns a domain object containing information of the JIRA ticket relating to the SourceKey
func (*ConnectorJira) GetTicketsByClosedStatus ¶
func (connector *ConnectorJira) GetTicketsByClosedStatus(orgCode string, methodOfDiscovery string, startDate time.Time) (tix <-chan domain.Ticket)
GetTicketsByClosedStatus retrieves closed exception and closed false positive tickets
func (*ConnectorJira) GetTicketsByDeviceIDVulnID ¶
func (connector *ConnectorJira) GetTicketsByDeviceIDVulnID(methodOfDiscovery string, orgCode string, deviceID string, vulnID string, statuses map[string]bool, port int, protocol string) (tickets <-chan domain.Ticket, err error)
GetTicketsByDeviceIDVulnID returns tickets with the device and vulnerability id provided in the parameters
func (*ConnectorJira) GetTicketsForRescan ¶
func (connector *ConnectorJira) GetTicketsForRescan(cerfs []domain.CERF, MethodOfDiscovery string, OrgCode string, Algorithm string) (tickets <-chan domain.Ticket, err error)
GetTicketsForRescan returns tickets for the rescan job. The type of rescan job is defined in Algorithm, and controls the tickets that are returned
func (*ConnectorJira) GetTicketsUpdatedSince ¶
func (connector *ConnectorJira) GetTicketsUpdatedSince(since time.Time, orgCode string, methodOfDiscovery string) <-chan domain.Ticket
GetTicketsUpdatedSince get's all tickets that have been updated after the since date passed in
func (*ConnectorJira) Transition ¶
func (connector *ConnectorJira) Transition(ticket domain.Ticket, toStatus string, comment string, assignTo string) (err error)
Transition changes the status of the ticket in JIRA (corresponding to the ticket parameter) to the parameter status
func (*ConnectorJira) UpdateTicket ¶
func (connector *ConnectorJira) UpdateTicket(ticket domain.Ticket, comment string) (SourceID int, SourceKey string, err error)
UpdateTicket takes a ticket of an input. The equivalent JIRA ticket is pulled. The difference between the two tickets is calculated, and a payload is generated that transforms the existing JIRA issue into the issue that was passed as a parameter
type Field ¶
type Field struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Custom bool `json:"custom,omitempty"` Orderable bool `json:"orderable,omitempty"` Searchable bool `json:"searchable,omitempty"` ClauseNames []string `json:"clauseNames,omitempty"` Schema Schema `json:"schema,omitempty"` }
Field is used for parsing field information from the JIRA API
type FieldList ¶
type FieldList struct { UpdatedDate *time.Time `json:"updateddate,omitempty"` ResolutionDate string `json:"resolutiondate,omitempty"` Project *string `json:"project,omitempty"` Summary *string `json:"summary,omitempty"` ProposedExpiration *time.Time `json:"proposedexpiration,omitempty"` ReportedBy *ValueField `json:"reportedby,omitempty"` Priority *ValueField `json:"priority,omitempty"` MACAddress *string `json:"macaddress,omitempty"` Hostname *string `json:"hostname,omitempty"` GroupID int32 `json:"groupid,omitempty"` ScanID string `json:"scanid,omitempty"` VulnerabilityID string `json:"vulnerabilityid,omitempty"` CreatedDate *time.Time `json:"created,omitempty"` Labels *[]string `json:"labels,omitempty"` CerfLink string `json:"cerflink,omitempty"` DeviceID string `json:"deviceid,omitempty"` AssignedTo *Assignee `json:"assignee,omitempty"` AssetsAffected *string `json:"assetsaffected,omitempty"` ScanErrata *string `json:"scanerrata,omitempty"` ResolutionStatus *string `json:"resolutionstatus,omitempty"` DueDate *time.Time `json:"duedate,omitempty"` AlertDate *time.Time `json:"alertdate,omitempty"` ServicePorts *string `json:"serviceports,omitempty"` TicketType *string `json:"issuetype,omitempty"` AssignmentGroup *Assignee `json:"assignmentgroup,omitempty"` MethodOfDiscovery *ValueField `json:"methodofdiscovery,omitempty"` VulnerabilityTitle *string `json:"vulnerabilitytitle,omitempty"` CveReferences *string `json:"cve_references,omitempty"` IPAddress *string `json:"ipaddress,omitempty"` ID int32 `json:"id,omitempty"` Title string `json:"title,omitempty"` Status *string `json:"status,omitempty"` OperatingSystem *ValueField `json:"operatingsystem,omitempty"` CVSS *ValueField `json:"cvss,omitempty"` OrganizationID int32 `json:"organizationid,omitempty"` OrgCode *string `json:"org,omitempty"` Description *string `json:"description,omitempty"` VendorReferences *string `json:"vendor_references,omitempty"` Solution *string `json:"solution,omitempty"` LastChecked *time.Time `json:"lastchecked,omitempty"` }
FieldList is a member of updateBlock and must be exported in order to be marshaled
type FieldStruct ¶
type FieldStruct struct { ReopenReason string `json:"customfield_11360,omitempty"` ResolutionDate string `json:"customfield_11364,omitempty"` Assignee *Assignee `json:"assignee,omitempty"` }
FieldStruct is used in createTransitionPayload and must be exported in order to be marshaled
type Issue ¶
type Issue struct { Issue *jira.Issue // contains filtered or unexported fields }
Issue holds the issue returned from JIRA and implements the domain.Ticket interface
func (*Issue) AlertDateOrDefault ¶
AlertDateOrDefault gets the AlertDate parameter from the Ticket struct
func (*Issue) AssignedTo ¶
AssignedTo gets the AssignedTo parameter from the Ticket struct
func (*Issue) AssignedToOrDefault ¶
AssignedToOrDefault gets the AssignedTo parameter from the Ticket struct
func (*Issue) AssignmentGroup ¶
AssignmentGroup gets the AssignmentGroup parameter from the Ticket struct
func (*Issue) AssignmentGroupOrDefault ¶
AssignmentGroupOrDefault gets the AssignmentGroup parameter from the Ticket struct
func (*Issue) CERFExpirationDate ¶
CERFExpirationDate gets the CERFExpirationDate parameter from the Ticket struct
func (*Issue) CVEReferences ¶
CVEReferences gets the CVEReferences parameter from the Ticket struct
func (*Issue) CVEReferencesOrDefault ¶
CVEReferencesOrDefault gets the CVEReferences parameter from the Ticket struct
func (*Issue) CVSSOrDefault ¶
CVSSOrDefault gets the CVSS parameter from the Ticket struct
func (*Issue) CreatedDate ¶
CreatedDate gets the CreatedDate parameter from the Ticket struct
func (*Issue) CreatedDateOrDefault ¶
CreatedDateOrDefault gets the CreatedDate parameter from the Ticket struct
func (*Issue) DBCreatedDate ¶
DBCreatedDate gets the DBCreatedDate parameter from the Ticket struct
func (*Issue) DBUpdatedDate ¶
DBUpdatedDate gets the DBUpdatedDate parameter from the Ticket struct
func (*Issue) DBUpdatedDateOrDefault ¶
DBUpdatedDateOrDefault gets the DBUpdatedDate parameter from the Ticket struct
func (*Issue) Description ¶
Description gets the Description parameter from the Ticket struct
func (*Issue) DescriptionOrDefault ¶
DescriptionOrDefault gets the Description parameter from the Ticket struct
func (*Issue) DueDateOrDefault ¶
DueDateOrDefault gets the DueDate parameter from the Ticket struct
func (*Issue) HostNameOrDefault ¶
HostNameOrDefault gets the HostName parameter from the Ticket struct
func (*Issue) IPAddressOrDefault ¶
IPAddressOrDefault gets the IPAddress parameter from the Ticket struct
func (*Issue) LabelsOrDefault ¶
LabelsOrDefault gets the Labels parameter from the Ticket struct
func (*Issue) LastChecked ¶
LastChecked gets the LastChecked parameter from the Ticket struct
func (*Issue) LastCheckedOrDefault ¶
LastCheckedOrDefault gets the LastChecked parameter from the Ticket struct
func (*Issue) MacAddress ¶
MacAddress gets the MacAddress parameter from the Ticket struct
func (*Issue) MacAddressOrDefault ¶
MacAddressOrDefault gets the MacAddress parameter from the Ticket struct
func (*Issue) MethodOfDiscovery ¶
MethodOfDiscovery gets the MethodOfDiscovery parameter from the Ticket struct
func (*Issue) MethodOfDiscoveryOrDefault ¶
MethodOfDiscoveryOrDefault gets the MethodOfDiscovery parameter from the Ticket struct
func (*Issue) OSDetailed ¶
OSDetailed gets the OSDetailed parameter from the Ticket struct
func (*Issue) OSDetailedOrDefault ¶
OSDetailedOrDefault gets the OSDetailed parameter from the Ticket struct
func (*Issue) OperatingSystem ¶
OperatingSystem gets the OperatingSystem parameter from the Ticket struct
func (*Issue) OperatingSystemOrDefault ¶
OperatingSystemOrDefault gets the OperatingSystem parameter from the Ticket struct
func (*Issue) OrgCodeOrDefault ¶
OrgCodeOrDefault gets the OrgCode parameter from the Ticket struct
func (*Issue) OrganizationID ¶
OrganizationID gets the OrganizationID parameter from the Ticket struct The OrganizationID is a database field, and is not relevant to JIRA tickets
func (*Issue) PackagesOrDefault ¶
PackagesOrDefault gets the Packages parameter from the Ticket struct
func (*Issue) PriorityOrDefault ¶
PriorityOrDefault gets the Priority parameter from the Ticket struct
func (*Issue) ProjectOrDefault ¶
ProjectOrDefault gets the Project parameter from the Ticket struct
func (*Issue) ReportedBy ¶
ReportedBy gets the ReportedBy parameter from the Ticket struct
func (*Issue) ReportedByOrDefault ¶
ReportedByOrDefault gets the ReportedBy parameter from the Ticket struct
func (*Issue) ResolutionDate ¶
ResolutionDate gets the ResolutionDate parameter from the Ticket struct
func (*Issue) ResolutionDateOrDefault ¶
ResolutionDateOrDefault gets the ResolutionDate parameter from the Ticket struct
func (*Issue) ResolutionStatus ¶
ResolutionStatus gets the ResolutionStatus parameter from the Ticket struct
func (*Issue) ResolutionStatusOrDefault ¶
ResolutionStatusOrDefault gets the ResolutionStatus parameter from the Ticket struct
func (*Issue) ServicePorts ¶
ServicePorts gets the ServicePorts parameter from the Ticket struct
func (*Issue) ServicePortsOrDefault ¶
ServicePortsOrDefault gets the ServicePorts parameter from the Ticket struct
func (*Issue) SetAlertDate ¶
SetAlertDate sets the AlertDate parameter from the Ticket struct
func (*Issue) SetAssignedTo ¶
SetAssignedTo sets the AssignedTo parameter from the Ticket struct
func (*Issue) SetAssignmentGroup ¶
SetAssignmentGroup sets the AssignmentGroup parameter from the Ticket struct
func (*Issue) SetCERFExpirationDate ¶
SetCERFExpirationDate sets the CERFExpirationDate parameter from the Ticket struct
func (*Issue) SetCVEReferences ¶
SetCVEReferences sets the CVEReferences parameter from the Ticket struct
func (*Issue) SetCloudID ¶
SetCloudID sets the CloudID parameter from the Ticket struct
func (*Issue) SetConfigs ¶
SetConfigs sets the Configs parameter from the Ticket struct
func (*Issue) SetCreatedDate ¶
SetCreatedDate sets the CreatedDate parameter from the Ticket struct
func (*Issue) SetDBCreatedDate ¶
SetDBCreatedDate sets the DBCreatedDate parameter from the Ticket struct
func (*Issue) SetDBUpdatedDate ¶
SetDBUpdatedDate sets the DBUpdatedDate parameter from the Ticket struct
func (*Issue) SetDescription ¶
SetDescription sets the Description parameter from the Ticket struct
func (*Issue) SetDeviceID ¶
SetDeviceID sets the DeviceID parameter from the Ticket struct
func (*Issue) SetDueDate ¶
SetDueDate sets the DueDate parameter from the Ticket struct
func (*Issue) SetGroupID ¶
SetGroupID sets the GroupID parameter from the Ticket struct
func (*Issue) SetHostName ¶
SetHostName sets the HostName parameter from the Ticket struct
func (*Issue) SetIPAddress ¶
SetIPAddress sets the IPAddress parameter from the Ticket struct
func (*Issue) SetLastChecked ¶
SetLastChecked sets the LastChecked parameter from the Ticket struct
func (*Issue) SetMacAddress ¶
SetMacAddress sets the MacAddress parameter from the Ticket struct
func (*Issue) SetMethodOfDiscovery ¶
SetMethodOfDiscovery sets the MethodOfDiscovery parameter from the Ticket struct
func (*Issue) SetOSDetailed ¶
SetOSDetailed sets the OSDetailed parameter from the Ticket struct
func (*Issue) SetOperatingSystem ¶
SetOperatingSystem sets the OperatingSystem parameter from the Ticket struct
func (*Issue) SetOrgCode ¶
SetOrgCode sets the OrgCode parameter from the Ticket struct
func (*Issue) SetOrganizationID ¶
SetOrganizationID sets the OrganizationID parameter from the Ticket struct
func (*Issue) SetPackages ¶
SetPackages sets the Packages parameter from the Ticket struct
func (*Issue) SetPriority ¶
SetPriority sets the Priority parameter from the Ticket struct
func (*Issue) SetProject ¶
SetProject sets the Project parameter from the Ticket struct
func (*Issue) SetReportedBy ¶
SetReportedBy sets the ReportedBy parameter from the Ticket struct
func (*Issue) SetResolutionDate ¶
SetResolutionDate sets the ResolutionDate parameter from the Ticket struct
func (*Issue) SetResolutionStatus ¶
SetResolutionStatus sets the ResolutionStatus parameter from the Ticket struct
func (*Issue) SetServicePorts ¶
SetServicePorts sets the ServicePorts parameter from the Ticket struct
func (*Issue) SetSolution ¶
SetSolution sets the Solution parameter from the Ticket struct
func (*Issue) SetSummary ¶
SetSummary sets the Summary parameter from the Ticket struct
func (*Issue) SetTicketType ¶
SetTicketType sets the TicketType parameter from the Ticket struct
func (*Issue) SetUpdatedDate ¶
SetUpdatedDate sets the UpdatedDate parameter from the Ticket struct
func (*Issue) SetVendorReferences ¶
SetVendorReferences sets the VendorReferences parameter from the Ticket struct
func (*Issue) SetVulnerabilityID ¶
SetVulnerabilityID sets the VulnerabilityID parameter from the Ticket struct
func (*Issue) SetVulnerabilityTitle ¶
SetVulnerabilityTitle sets the VulnerabilityTitle parameter from the Ticket struct
func (*Issue) SolutionOrDefault ¶
SolutionOrDefault gets the Solution parameter from the Ticket struct
func (*Issue) StatusOrDefault ¶
StatusOrDefault gets the Status parameter from the Ticket struct
func (*Issue) SummaryOrDefault ¶
SummaryOrDefault gets the Summary parameter from the Ticket struct
func (*Issue) TicketType ¶
TicketType gets the TicketType parameter from the Ticket struct
func (*Issue) TicketTypeOrDefault ¶
TicketTypeOrDefault gets the TicketType parameter from the Ticket struct
func (*Issue) UpdatedDate ¶
UpdatedDate gets the UpdatedDate parameter from the Ticket struct
func (*Issue) UpdatedDateOrDefault ¶
UpdatedDateOrDefault gets the UpdatedDate parameter from the Ticket struct
func (*Issue) VendorReferences ¶
VendorReferences gets the VendorReferences parameter from the Ticket struct
func (*Issue) VendorReferencesOrDefault ¶
VendorReferencesOrDefault gets the VendorReferences parameter from the Ticket struct
func (*Issue) VulnerabilityID ¶
VulnerabilityID gets the VulnerabilityID parameter from the Ticket struct
func (*Issue) VulnerabilityTitle ¶
VulnerabilityTitle gets the VulnerabilityTitle parameter from the Ticket struct
func (*Issue) VulnerabilityTitleOrDefault ¶
VulnerabilityTitleOrDefault gets the VulnerabilityTitle parameter from the Ticket struct
type PayloadJira ¶
type PayloadJira struct { Project string `json:"project"` // Mappable fields is used by the UI to discern which JIRA fields can be mapped to a field supplied by a cloud provider MappableFields []string `json:"mappable_fields,omitempty"` // Maps the Aegis name for a status to the JIRA-specific name for a status StatusMap map[string]string `json:"status_map"` // Maps the Aegis name for a field to the JIRA-specific name for a field FieldMap map[string]string `json:"field_map"` }
PayloadJira contains the structure of the JSON fields that need to be loaded from the JIRA source config
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request contains the fields required to make a JIRA API call and process the result
type Results ¶
type Results struct {
DestinationStatusID string `xml:"step,attr"`
}
Results in a member of Action and must be exported in order to be marshaled
type Schema ¶
type Schema struct { Type string `json:"type,omitempty"` Custom string `json:"custom,omitempty"` CustomID int `json:"customId,omitempty"` }
Schema is used in field and must be exported in order to be marshaled
type Status ¶
type Status struct { StatusName string `xml:"name,attr"` StatusID string `xml:"id,attr"` Actions []Action `xml:"actions>action"` CommonActions []ActionID `xml:"actions>common-action"` }
Status is a member of workflow and must be exported in order to be marshaled
type Transition ¶
type Transition struct { ID string `json:"id" structs:"id"` Name string `json:"name" structs:"name"` To Status `json:"to" structs:"status"` Fields map[string]TransitionField `json:"fields" structs:"fields"` }
Transition is used in transitionResult and must be exported in order to be marshaled
type TransitionField ¶
TransitionField is used in Transition and must be exported in order to be marshaled
type TransitionPayload ¶
type TransitionPayload struct { ID string `json:"id" structs:"id"` Assignee *string `json:"assignee,omitempty"` Unknowns tcontainer.MarshalMap }
TransitionPayload is used in createTransitionPayload and must be exported in order to be marshaled
type Update ¶
type Update struct {
Comment []UpdateObjects `json:"comment,omitempty" structs:"comment" `
}
Update is used in createTransitionPayload and must be exported in order to be marshaled
type UpdateObjects ¶
type UpdateObjects struct {
Add AddBody `json:"add,omitempty" structs:"add" `
}
UpdateObjects is used in Update and must be exported in order to be marshaled
type ValueField ¶
type ValueField struct { Value string `json:"value,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` }
ValueField is a member of FieldList and must be exported in order to be marshaled