Documentation ¶
Index ¶
- Constants
- func ConvertFprToSarif(sys System, project *models.Project, projectVersion *models.ProjectVersion, ...) (format.SARIF, error)
- func CreateCustomReport(data FortifyReportData, issueGroups []*models.ProjectVersionIssueGroup) reporting.ScanReport
- func Parse(sys System, project *models.Project, projectVersion *models.ProjectVersion, ...) (format.SARIF, error)
- func WriteCustomReports(scanReport reporting.ScanReport) ([]piperutils.Path, error)
- func WriteJSONReport(jsonReport FortifyReportData) ([]piperutils.Path, error)
- func WriteSarif(sarif format.SARIF) ([]piperutils.Path, error)
- type Abstract
- type Action
- type AnalysisInfo
- type Attribute
- type Build
- type Capability
- type ClassInfo
- type Context
- type ContextPool
- type CreatedTS
- type CustomDescription
- type Def
- type Description
- type EngineData
- type Entry
- type Error
- type Explanation
- type FVDL
- type Fact
- type File
- type FilterResult
- type FortifyReportData
- type Function
- type FunctionCall
- type FunctionDeclarationSourceLocation
- type FunctionEntry
- type Group
- type InstanceInfo
- type Knowledge
- type LOC
- type LicenseInfo
- type LocationDef
- type MachineInfo
- type Metadata
- type Node
- type NodeRef
- type Primary
- type ProgramData
- type Properties
- type Property
- type Reason
- type Recommendations
- type Reference
- type ReplacementDefinitions
- type Rule
- type RuleInfo
- type RulePack
- type ScanTime
- type SinkInstance
- type Snippet
- type SourceInstance
- type SourceLocation
- type SpotChecksAuditCount
- type System
- type SystemInstance
- func (sys *SystemInstance) AuthenticateRequest(req runtime.ClientRequest, formats strfmt.Registry) error
- func (sys *SystemInstance) CommitProjectVersion(id int64) (*models.ProjectVersion, error)
- func (sys *SystemInstance) CreateProjectVersion(version *models.ProjectVersion) (*models.ProjectVersion, error)
- func (sys *SystemInstance) CreateProjectVersionIfNotExist(projectName, projectVersionName, description string) (*models.ProjectVersion, error)
- func (sys *SystemInstance) DownloadReportFile(endpoint string, reportID int64) ([]byte, error)
- func (sys *SystemInstance) DownloadResultFile(endpoint string, projectVersionID int64) ([]byte, error)
- func (sys *SystemInstance) GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, ...) (*models.SavedReport, error)
- func (sys *SystemInstance) GetArtifactsOfProjectVersion(id int64) ([]*models.Artifact, error)
- func (sys *SystemInstance) GetFilterSetByDisplayName(issueFilterSelectorSet *models.IssueFilterSelectorSet, name string) *models.IssueFilterSelector
- func (sys *SystemInstance) GetFilterSetOfProjectVersionByTitle(id int64, title string) (*models.FilterSet, error)
- func (sys *SystemInstance) GetIssueComments(parentId int64) ([]*models.IssueAuditComment, error)
- func (sys *SystemInstance) GetIssueDetails(projectVersionId int64, issueInstanceId string) ([]*models.ProjectVersionIssue, error)
- func (sys *SystemInstance) GetIssueFilterSelectorOfProjectVersionByName(id int64, names []string, options []string) (*models.IssueFilterSelectorSet, error)
- func (sys *SystemInstance) GetIssueStatisticsOfProjectVersion(id int64) ([]*models.IssueStatistics, error)
- func (sys *SystemInstance) GetProjectByName(projectName string, autoCreate bool, projectVersionName string) (*models.Project, error)
- func (sys *SystemInstance) GetProjectIssuesByIDAndFilterSetGroupedBySelector(id int64, filter, filterSetGUID string, ...) ([]*models.ProjectVersionIssueGroup, error)
- func (sys *SystemInstance) GetProjectVersionAttributesByProjectVersionID(id int64) ([]*models.Attribute, error)
- func (sys *SystemInstance) GetProjectVersionDetailsByProjectIDAndVersionName(id int64, versionName string, autoCreate bool, projectName string) (*models.ProjectVersion, error)
- func (sys *SystemInstance) GetReportDetails(id int64) (*models.SavedReport, error)
- func (sys *SystemInstance) LookupOrCreateProjectVersionDetailsForPullRequest(projectID int64, masterProjectVersion *models.ProjectVersion, ...) (*models.ProjectVersion, error)
- func (sys *SystemInstance) MergeProjectVersionStateOfPRIntoMaster(downloadEndpoint, uploadEndpoint string, ...) error
- func (sys *SystemInstance) ProjectVersionCopyCurrentState(sourceID, targetID int64) error
- func (sys *SystemInstance) ProjectVersionCopyFromPartial(sourceID, targetID int64) error
- func (sys *SystemInstance) ProjectVersionCopyPermissions(sourceID, targetID int64) error
- func (sys *SystemInstance) ReduceIssueFilterSelectorSet(issueFilterSelectorSet *models.IssueFilterSelectorSet, names []string, ...) *models.IssueFilterSelectorSet
- func (sys *SystemInstance) SetProjectVersionAttributesByProjectVersionID(id int64, attributes []*models.Attribute) ([]*models.Attribute, error)
- func (sys *SystemInstance) UploadResultFile(endpoint, file string, projectVersionID int64) error
- type TaintFlag
- type TaintFlags
- type Tip
- type Trace
- type UUID
- type UnifiedNodePool
- type Vulnerabilities
- type Vulnerability
Constants ¶
const ReportsDirectory = "fortify"
ReportsDirectory defines the subfolder for the Fortify reports which are generated
Variables ¶
This section is empty.
Functions ¶
func ConvertFprToSarif ¶
func ConvertFprToSarif(sys System, project *models.Project, projectVersion *models.ProjectVersion, resultFilePath string, filterSet *models.FilterSet) (format.SARIF, error)
ConvertFprToSarif converts the FPR file contents into SARIF format
func CreateCustomReport ¶
func CreateCustomReport(data FortifyReportData, issueGroups []*models.ProjectVersionIssueGroup) reporting.ScanReport
func Parse ¶
func Parse(sys System, project *models.Project, projectVersion *models.ProjectVersion, data []byte, filterSet *models.FilterSet) (format.SARIF, error)
Parse parses the FPR file
func WriteCustomReports ¶
func WriteCustomReports(scanReport reporting.ScanReport) ([]piperutils.Path, error)
func WriteJSONReport ¶
func WriteJSONReport(jsonReport FortifyReportData) ([]piperutils.Path, error)
func WriteSarif ¶
func WriteSarif(sarif format.SARIF) ([]piperutils.Path, error)
Types ¶
type Action ¶
type Action struct { XMLName xml.Name `xml:"Action"` Type string `xml:"type,attr"` ActionData string `xml:",innerxml"` }
Action
type AnalysisInfo ¶
type AnalysisInfo struct { Context Context ReplacementDefinitions ReplacementDefinitions `xml:"ReplacementDefinitions"` Trace []Trace `xml:"Trace"` }
AnalysisInfo
type Attribute ¶
type Attribute struct { XMLName xml.Name `xml:"Attribute"` Name string `xml:"name"` Value string `xml:"value"` }
Attribute
type Build ¶
type Build struct { XMLName xml.Name `xml:"Build"` Project string `xml:"Project"` Version string `xml:"Version"` Label string `xml:"Label"` BuildID string `xml:"BuildID"` NumberFiles int `xml:"NumberFiles"` Locs []LOC `xml:"LOC"` JavaClassPath string `xml:"JavaClasspath"` SourceBasePath string `xml:"SourceBasePath"` SourceFiles []File `xml:"SourceFiles>File"` Scantime ScanTime `xml:"ScanTime"` }
These structures are relevant to the Build object The Build object transports all build and scan related information
type Capability ¶
type Capability struct { XMLName xml.Name `xml:"Capability"` Name string `xml:"Name"` Expiration string `xml:"Expiration"` Attribute Attribute `xml:"Attribute"` }
Capability
type ClassInfo ¶
type ClassInfo struct { XMLName xml.Name `xml:"ClassInfo"` ClassID string `xml:"ClassID"` Kingdom string `xml:"Kingdom,omitempty"` Type string `xml:"Type"` Subtype string `xml:"Subtype,omitempty"` AnalyzerName string `xml:"AnalyzerName"` DefaultSeverity string `xml:"DefaultSeverity"` }
ClassInfo
type Context ¶
type Context struct { XMLName xml.Name `xml:"Context"` ContextId string `xml:"id,attr,omitempty"` Function Function FDSL FunctionDeclarationSourceLocation }
Context
type ContextPool ¶
ContextPool These structures are relevant to the ContextPool object
type CreatedTS ¶
type CreatedTS struct { XMLName xml.Name `xml:"CreatedTS"` Date string `xml:"date,attr"` Time string `xml:"time,attr"` }
CreatedTS
type CustomDescription ¶
type CustomDescription struct { XMLName xml.Name `xml:"CustomDescription"` ContentType string `xml:"contentType,attr"` RuleID string `xml:"ruleID,attr"` Explanation Explanation `xml:"Explanation"` Recommendations Recommendations `xml:"Recommendations"` References []Reference `xml:"References>Reference"` }
CustomDescription
type Def ¶
type Def struct { XMLName xml.Name `xml:"Def"` DefKey string `xml:"key,attr"` DefValue string `xml:"value,attr"` }
Def
type Description ¶
type Description struct { XMLName xml.Name `xml:"Description"` ContentType string `xml:"contentType,attr"` ClassID string `xml:"classID,attr"` Abstract Abstract `xml:"Abstract"` Explanation Explanation `xml:"Explanation"` Recommendations Recommendations `xml:"Recommendations"` Tips []Tip `xml:"Tips>Tip,omitempty"` References []Reference `xml:"References>Reference"` CustomDescription CustomDescription `xml:"CustomDescription,omitempty"` }
Description These structures are relevant to the Description object
type EngineData ¶
type EngineData struct { XMLName xml.Name `xml:"EngineData"` EngineVersion string `xml:"EngineVersion"` RulePacks []RulePack `xml:"RulePacks>RulePack"` Properties []Properties `xml:"Properties"` CLArguments []string `xml:"CommandLine>Argument"` Errors []Error `xml:"Errors>Error"` MachineInfo MachineInfo `xml:"MachineInfo"` FilterResult FilterResult `xml:"FilterResult"` RuleInfo []RuleInfo `xml:"RuleInfo>Rule"` LicenseInfo LicenseInfo `xml:"LicenseInfo"` }
EngineData These structures are relevant to the EngineData object
type Entry ¶
type Entry struct { XMLName xml.Name `xml:"Entry"` NodeRef NodeRef `xml:"NodeRef,omitempty"` Node Node `xml:"Node,omitempty"` }
Entry
type Error ¶
type Error struct { XMLName xml.Name `xml:"Error"` ErrorCode string `xml:"code,attr"` ErrorMessage string `xml:",innerxml"` }
Error
type Explanation ¶
Explanation
type FVDL ¶
type FVDL struct { XMLName xml.Name `xml:"FVDL"` Xmlns string `xml:"xmlns,attr"` XmlnsXsi string `xml:"xsi,attr"` Version string `xml:"version,attr"` XsiType string `xml:"type,attr"` Created CreatedTS Uuid UUID Build Build Vulnerabilities Vulnerabilities `xml:"Vulnerabilities"` ContextPool ContextPool `xml:"ContextPool"` UnifiedNodePool UnifiedNodePool `xml:"UnifiedNodePool"` Description []Description `xml:"Description"` Snippets []Snippet `xml:"Snippets>Snippet"` ProgramData ProgramData `xml:"ProgramData"` EngineData EngineData `xml:"EngineData"` }
FVDL This struct encapsulates everyting in the FVDL document
type Fact ¶
type Fact struct { XMLName xml.Name `xml:"Fact"` Primary string `xml:"primary,attr"` Type string `xml:"type,attr,omitempty"` FactData string `xml:",innerxml"` }
Fact
type File ¶
type File struct { XMLName xml.Name `xml:"File"` FileSize int `xml:"size,attr"` FileTimestamp string `xml:"timestamp,attr"` FileLoc int `xml:"loc,attr,omitempty"` FileType string `xml:"type,attr"` Encoding string `xml:"encoding,attr"` Name string `xml:"Name"` Locs []LOC `xml:",any,omitempty"` }
File
type FortifyReportData ¶
type FortifyReportData struct { ToolName string `json:"toolName"` ToolInstance string `json:"toolInstance"` ProjectName string `json:"projectName"` ProjectVersion string `json:"projectVersion"` ProjectVersionID int64 `json:"projectVersionID"` Violations int `json:"violations"` CorporateTotal int `json:"corporateTotal"` CorporateAudited int `json:"corporateAudited"` AuditAllTotal int `json:"auditAllTotal"` AuditAllAudited int `json:"auditAllAudited"` SpotChecksTotal int `json:"spotChecksTotal"` SpotChecksAudited int `json:"spotChecksAudited"` SpotChecksGap int `json:"spotChecksGap"` Suspicious int `json:"suspicious"` Exploitable int `json:"exploitable"` Suppressed int `json:"suppressed"` AtleastOneSpotChecksCategoryAudited bool `json:"atleastOneSpotChecksCategoryAudited"` URL string `json:"url"` SpotChecksCategories *[]SpotChecksAuditCount `json:"spotChecksCategories"` }
func CreateJSONReport ¶
func CreateJSONReport(reportData FortifyReportData, spotChecksCountByCategory []SpotChecksAuditCount, serverURL string) FortifyReportData
type Function ¶
type Function struct { XMLName xml.Name `xml:"Function"` FunctionName string `xml:"name,attr"` FunctionNamespace string `xml:"namespace,attr"` FunctionEnclosingClass string `xml:"enclosingClass,attr"` }
Function
type FunctionCall ¶
type FunctionCall struct { XMLName xml.Name `xml:"FunctionCall"` SourceLocation SourceLocation `xml:"SourceLocation"` Function Function `xml:"Function"` }
FunctionCall
type FunctionDeclarationSourceLocation ¶
type FunctionDeclarationSourceLocation struct { XMLName xml.Name `xml:"FunctionDeclarationSourceLocation"` FDSLPath string `xml:"path,attr"` FDSLLine string `xml:"line,attr"` FDSLLineEnd string `xml:"lineEnd,attr"` FDSLColStart string `xml:"colStart,attr"` FDSLColEnd string `xml:"colEnd,attr"` }
FunctionDeclarationSourceLocation
type FunctionEntry ¶
type FunctionEntry struct { XMLName xml.Name `xml:"FunctionEntry"` SourceLocation SourceLocation `xml:"SourceLocation"` Function Function `xml:"Function"` }
FunctionEntry
type Group ¶
type Group struct { XMLName xml.Name `xml:"Group"` Name string `xml:"name,attr"` Data string `xml:",innerxml"` }
Group
type InstanceInfo ¶
type InstanceInfo struct { XMLName xml.Name `xml:"InstanceInfo"` InstanceID string `xml:"InstanceID"` InstanceSeverity string `xml:"InstanceSeverity"` Confidence string `xml:"Confidence"` }
InstanceInfo
type LOC ¶
type LOC struct { XMLName xml.Name `xml:"LOC"` LocType string `xml:"type,attr"` LocValue string `xml:",innerxml"` }
LOC
type LicenseInfo ¶
type LicenseInfo struct { XMLName xml.Name `xml:"LicenseInfo"` Metadata []Metadata `xml:"Metadata"` Capability []Capability `xml:"Capability"` }
LicenseInfo
type LocationDef ¶
type LocationDef struct { XMLName xml.Name `xml:"LocationDef"` Path string `xml:"path,attr"` Line int `xml:"line,attr"` LineEnd int `xml:"lineEnd,attr"` ColStart int `xml:"colStart,attr"` ColEnd int `xml:"colEnd,attr"` Key string `xml:"key,attr"` }
LocationDef
type MachineInfo ¶
type MachineInfo struct { XMLName xml.Name `xml:"MachineInfo"` Hostname string `xml:"Hostname"` Username string `xml:"Username"` Platform string `xml:"Platform"` }
MachineInfo
type Metadata ¶
type Metadata struct { XMLName xml.Name `xml:"Metadata"` Name string `xml:"name"` Value string `xml:"value"` }
Metadata
type Node ¶
type Node struct { XMLName xml.Name `xml:"Node"` IsDefault string `xml:"isDefault,attr,omitempty"` NodeLabel string `xml:"label,attr,omitempty"` SourceLocation SourceLocation `xml:"SourceLocation"` Action Action `xml:"Action,omitempty"` Reason Reason `xml:"Reason,omitempty"` Knowledge Knowledge `xml:"Knowledge,omitempty"` }
Node
type ProgramData ¶
type ProgramData struct { XMLName xml.Name `xml:"ProgramData"` Sources []SourceInstance `xml:"Sources>SourceInstance"` Sinks []SinkInstance `xml:"Sinks>SinkInstance"` CalledWithNoDef []Function `xml:"CalledWithNoDef>Function"` }
ProgramData These structures are relevant to the ProgramData object
type Properties ¶
type Properties struct { XMLName xml.Name `xml:"Properties"` PropertiesType string `xml:"type,attr"` Property []Property `xml:"Property"` }
Properties
type Property ¶
type Property struct { XMLName xml.Name `xml:"Property"` Name string `xml:"name"` Value string `xml:"value"` }
Property
type Reason ¶
type Reason struct { XMLName xml.Name `xml:"Reason"` Rule Rule `xml:"Rule,omitempty"` Trace Trace `xml:"Trace,omitempty"` }
Reason
type Recommendations ¶
type Recommendations struct { XMLName xml.Name `xml:"Recommendations"` Text string `xml:",innerxml"` }
Recommendations
type Reference ¶
type Reference struct { XMLName xml.Name `xml:"Reference"` Title string `xml:"Title"` Author string `xml:"Author"` }
Reference
type ReplacementDefinitions ¶
type ReplacementDefinitions struct { XMLName xml.Name `xml:"ReplacementDefinitions"` Def []Def `xml:"Def"` LocationDef []LocationDef `xml:"LocationDef"` }
ReplacementDefinitions
type RuleInfo ¶
type RuleInfo struct { XMLName xml.Name `xml:"Rule"` RuleID string `xml:"id,attr"` MetaInfoGroup []Group `xml:"MetaInfo>Group,omitempty"` }
RuleInfo
type RulePack ¶
type RulePack struct { XMLName xml.Name `xml:"RulePack"` RulePackID string `xml:"RulePackID"` SKU string `xml:"SKU"` Name string `xml:"Name"` Version string `xml:"Version"` MAC string `xml:"MAC"` }
RulePack
type SinkInstance ¶
type SinkInstance struct { XMLName xml.Name `xml:"SinkInstance"` RuleID string `xml:"ruleID,attr"` FunctionCall FunctionCall `xml:"FunctionCall,omitempty"` SourceLocation SourceLocation `xml:"SourceLocation,omitempty"` }
SinkInstance
type Snippet ¶
type Snippet struct { XMLName xml.Name `xml:"Snippet"` SnippetId string `xml:"id,attr"` File string `xml:"File"` StartLine int `xml:"StartLine"` EndLine int `xml:"EndLine"` Text string `xml:"Text"` }
Snippet These structures are relevant to the Snippets object
type SourceInstance ¶
type SourceInstance struct { XMLName xml.Name `xml:"SourceInstance"` RuleID string `xml:"ruleID,attr"` FunctionCall FunctionCall `xml:"FunctionCall,omitempty"` FunctionEntry FunctionEntry `xml:"FunctionEntry,omitempty"` SourceLocation SourceLocation `xml:"SourceLocation,omitempty"` TaintFlags TaintFlags `xml:"TaintFlags"` }
SourceInstance
type SourceLocation ¶
type SourceLocation struct { XMLName xml.Name `xml:"SourceLocation"` Path string `xml:"path,attr"` Line int `xml:"line,attr"` LineEnd int `xml:"lineEnd,attr"` ColStart int `xml:"colStart,attr"` ColEnd int `xml:"colEnd,attr"` ContextId string `xml:"contextId,attr"` Snippet string `xml:"snippet,attr"` }
SourceLocation
type SpotChecksAuditCount ¶
type System ¶
type System interface { GetProjectByName(name string, autoCreate bool, projectVersion string) (*models.Project, error) GetProjectVersionDetailsByProjectIDAndVersionName(id int64, name string, autoCreate bool, projectName string) (*models.ProjectVersion, error) GetProjectVersionAttributesByProjectVersionID(id int64) ([]*models.Attribute, error) SetProjectVersionAttributesByProjectVersionID(id int64, attributes []*models.Attribute) ([]*models.Attribute, error) CreateProjectVersionIfNotExist(projectName, projectVersionName, description string) (*models.ProjectVersion, error) LookupOrCreateProjectVersionDetailsForPullRequest(projectID int64, masterProjectVersion *models.ProjectVersion, pullRequestName string) (*models.ProjectVersion, error) CreateProjectVersion(version *models.ProjectVersion) (*models.ProjectVersion, error) ProjectVersionCopyFromPartial(sourceID, targetID int64) error ProjectVersionCopyCurrentState(sourceID, targetID int64) error ProjectVersionCopyPermissions(sourceID, targetID int64) error CommitProjectVersion(id int64) (*models.ProjectVersion, error) MergeProjectVersionStateOfPRIntoMaster(downloadEndpoint, uploadEndpoint string, masterProjectID, masterProjectVersionID int64, pullRequestName string) error GetArtifactsOfProjectVersion(id int64) ([]*models.Artifact, error) GetFilterSetOfProjectVersionByTitle(id int64, title string) (*models.FilterSet, error) GetIssueFilterSelectorOfProjectVersionByName(id int64, names []string, options []string) (*models.IssueFilterSelectorSet, error) GetFilterSetByDisplayName(issueFilterSelectorSet *models.IssueFilterSelectorSet, name string) *models.IssueFilterSelector GetProjectIssuesByIDAndFilterSetGroupedBySelector(id int64, filter, filterSetGUID string, issueFilterSelectorSet *models.IssueFilterSelectorSet) ([]*models.ProjectVersionIssueGroup, error) ReduceIssueFilterSelectorSet(issueFilterSelectorSet *models.IssueFilterSelectorSet, names []string, options []string) *models.IssueFilterSelectorSet GetIssueStatisticsOfProjectVersion(id int64) ([]*models.IssueStatistics, error) GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, projectName, projectVersionName, reportFormat string) (*models.SavedReport, error) GetReportDetails(id int64) (*models.SavedReport, error) GetIssueDetails(projectVersionId int64, issueInstanceId string) ([]*models.ProjectVersionIssue, error) GetIssueComments(parentId int64) ([]*models.IssueAuditComment, error) UploadResultFile(endpoint, file string, projectVersionID int64) error DownloadReportFile(endpoint string, reportID int64) ([]byte, error) DownloadResultFile(endpoint string, projectVersionID int64) ([]byte, error) }
System is the interface abstraction of a specific SystemInstance
type SystemInstance ¶
type SystemInstance struct {
// contains filtered or unexported fields
}
SystemInstance is the specific instance
func NewSystemInstance ¶
func NewSystemInstance(serverURL, apiEndpoint, authToken string, timeout time.Duration) *SystemInstance
NewSystemInstance - creates an returns a new SystemInstance
func NewSystemInstanceForClient ¶
func NewSystemInstanceForClient(clientInstance *ff.Fortify, httpClientInstance *piperHttp.Client, serverURL, authToken string, requestTimeout time.Duration) *SystemInstance
NewSystemInstanceForClient - creates a new SystemInstance
func (*SystemInstance) AuthenticateRequest ¶
func (sys *SystemInstance) AuthenticateRequest(req runtime.ClientRequest, formats strfmt.Registry) error
AuthenticateRequest authenticates the request
func (*SystemInstance) CommitProjectVersion ¶
func (sys *SystemInstance) CommitProjectVersion(id int64) (*models.ProjectVersion, error)
CommitProjectVersion commits the project version with the provided id
func (*SystemInstance) CreateProjectVersion ¶
func (sys *SystemInstance) CreateProjectVersion(version *models.ProjectVersion) (*models.ProjectVersion, error)
CreateProjectVersion creates the project version with the provided details
func (*SystemInstance) CreateProjectVersionIfNotExist ¶
func (sys *SystemInstance) CreateProjectVersionIfNotExist(projectName, projectVersionName, description string) (*models.ProjectVersion, error)
CreateProjectVersionIfNotExist creates a new ProjectVersion if it does not already exist. If the projectName also does not exist, it will create that as well.
func (*SystemInstance) DownloadReportFile ¶
func (sys *SystemInstance) DownloadReportFile(endpoint string, reportID int64) ([]byte, error)
DownloadReportFile downloads a report file from Fortify backend
func (*SystemInstance) DownloadResultFile ¶
func (sys *SystemInstance) DownloadResultFile(endpoint string, projectVersionID int64) ([]byte, error)
DownloadResultFile downloads a result file from Fortify backend
func (*SystemInstance) GenerateQGateReport ¶
func (sys *SystemInstance) GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, projectName, projectVersionName, reportFormat string) (*models.SavedReport, error)
GenerateQGateReport returns the issue statistics related to the project version addressed with id
func (*SystemInstance) GetArtifactsOfProjectVersion ¶
func (sys *SystemInstance) GetArtifactsOfProjectVersion(id int64) ([]*models.Artifact, error)
GetArtifactsOfProjectVersion returns the list of artifacts related to the project version addressed with id
func (*SystemInstance) GetFilterSetByDisplayName ¶
func (sys *SystemInstance) GetFilterSetByDisplayName(issueFilterSelectorSet *models.IssueFilterSelectorSet, name string) *models.IssueFilterSelector
GetFilterSetByDisplayName returns the set identified by the provided name or nil
func (*SystemInstance) GetFilterSetOfProjectVersionByTitle ¶
func (sys *SystemInstance) GetFilterSetOfProjectVersionByTitle(id int64, title string) (*models.FilterSet, error)
GetFilterSetOfProjectVersionByTitle returns the filter set with the given title related to the project version addressed with id, if no title is provided the default filter set will be returned
func (*SystemInstance) GetIssueComments ¶
func (sys *SystemInstance) GetIssueComments(parentId int64) ([]*models.IssueAuditComment, error)
GetIssueComments returns the details of an issue comments with its unique parentId
func (*SystemInstance) GetIssueDetails ¶
func (sys *SystemInstance) GetIssueDetails(projectVersionId int64, issueInstanceId string) ([]*models.ProjectVersionIssue, error)
GetIssueDetails returns the details of an issue with its issueInstanceId and projectVersionId
func (*SystemInstance) GetIssueFilterSelectorOfProjectVersionByName ¶
func (sys *SystemInstance) GetIssueFilterSelectorOfProjectVersionByName(id int64, names []string, options []string) (*models.IssueFilterSelectorSet, error)
GetIssueFilterSelectorOfProjectVersionByName returns the groupings with the given names related to the project version addressed with id
func (*SystemInstance) GetIssueStatisticsOfProjectVersion ¶
func (sys *SystemInstance) GetIssueStatisticsOfProjectVersion(id int64) ([]*models.IssueStatistics, error)
GetIssueStatisticsOfProjectVersion returns the issue statistics related to the project version addressed with id
func (*SystemInstance) GetProjectByName ¶
func (sys *SystemInstance) GetProjectByName(projectName string, autoCreate bool, projectVersionName string) (*models.Project, error)
GetProjectByName returns the project identified by the name provided autoCreate and projectVersion parameters only used if autoCreate=true
func (*SystemInstance) GetProjectIssuesByIDAndFilterSetGroupedBySelector ¶
func (sys *SystemInstance) GetProjectIssuesByIDAndFilterSetGroupedBySelector(id int64, filter, filterSetGUID string, issueFilterSelectorSet *models.IssueFilterSelectorSet) ([]*models.ProjectVersionIssueGroup, error)
GetProjectIssuesByIDAndFilterSetGroupedBySelector returns issues of the project version addressed with id filtered with the respective set and grouped by the issue filter selector grouping
func (*SystemInstance) GetProjectVersionAttributesByProjectVersionID ¶
func (sys *SystemInstance) GetProjectVersionAttributesByProjectVersionID(id int64) ([]*models.Attribute, error)
GetProjectVersionAttributesByProjectVersionID returns the project version attributes of the project version identified by the id
func (*SystemInstance) GetProjectVersionDetailsByProjectIDAndVersionName ¶
func (sys *SystemInstance) GetProjectVersionDetailsByProjectIDAndVersionName(id int64, versionName string, autoCreate bool, projectName string) (*models.ProjectVersion, error)
GetProjectVersionDetailsByProjectIDAndVersionName returns the project version details of the project version identified by the id and project versionname projectName parameter is only used if autoCreate=true
func (*SystemInstance) GetReportDetails ¶
func (sys *SystemInstance) GetReportDetails(id int64) (*models.SavedReport, error)
GetReportDetails returns the details of the report addressed with id
func (*SystemInstance) LookupOrCreateProjectVersionDetailsForPullRequest ¶
func (sys *SystemInstance) LookupOrCreateProjectVersionDetailsForPullRequest(projectID int64, masterProjectVersion *models.ProjectVersion, pullRequestName string) (*models.ProjectVersion, error)
LookupOrCreateProjectVersionDetailsForPullRequest looks up a project version for pull requests or creates it from scratch
func (*SystemInstance) MergeProjectVersionStateOfPRIntoMaster ¶
func (sys *SystemInstance) MergeProjectVersionStateOfPRIntoMaster(downloadEndpoint, uploadEndpoint string, masterProjectID, masterProjectVersionID int64, pullRequestName string) error
MergeProjectVersionStateOfPRIntoMaster merges the PR project version's fpr result file into the master project version
func (*SystemInstance) ProjectVersionCopyCurrentState ¶
func (sys *SystemInstance) ProjectVersionCopyCurrentState(sourceID, targetID int64) error
ProjectVersionCopyCurrentState copies the project version state of sourceID into the new project version addressed by targetID
func (*SystemInstance) ProjectVersionCopyFromPartial ¶
func (sys *SystemInstance) ProjectVersionCopyFromPartial(sourceID, targetID int64) error
ProjectVersionCopyFromPartial copies parts of the source project version to the target project version identified by their ids
func (*SystemInstance) ProjectVersionCopyPermissions ¶
func (sys *SystemInstance) ProjectVersionCopyPermissions(sourceID, targetID int64) error
ProjectVersionCopyPermissions copies the authentication entity of the project version addressed by sourceID to the one of targetID
func (*SystemInstance) ReduceIssueFilterSelectorSet ¶
func (sys *SystemInstance) ReduceIssueFilterSelectorSet(issueFilterSelectorSet *models.IssueFilterSelectorSet, names []string, options []string) *models.IssueFilterSelectorSet
ReduceIssueFilterSelectorSet filters the set to the relevant filter display names
func (*SystemInstance) SetProjectVersionAttributesByProjectVersionID ¶
func (sys *SystemInstance) SetProjectVersionAttributesByProjectVersionID(id int64, attributes []*models.Attribute) ([]*models.Attribute, error)
SetProjectVersionAttributesByProjectVersionID sets the project version attributes of the project version identified by the id
func (*SystemInstance) UploadResultFile ¶
func (sys *SystemInstance) UploadResultFile(endpoint, file string, projectVersionID int64) error
UploadResultFile uploads a fpr file to the fortify backend
type TaintFlags ¶
type TaintFlags struct { XMLName xml.Name `xml:"TaintFlags"` TaintFlag []TaintFlag `xml:"TaintFlag"` }
TaintFlags
type UnifiedNodePool ¶
UnifiedNodePool These structures are relevant to the UnifiedNodePool object
type Vulnerabilities ¶
type Vulnerabilities struct { XMLName xml.Name `xml:"Vulnerabilities"` Vulnerability []Vulnerability `xml:"Vulnerability"` }
Vulnerabilities These structures are relevant to the Vulnerabilities object
type Vulnerability ¶
type Vulnerability struct { XMLName xml.Name `xml:"Vulnerability"` ClassInfo ClassInfo `xml:"ClassInfo"` InstanceInfo InstanceInfo `xml:"InstanceInfo"` AnalysisInfo AnalysisInfo `xml:"AnalysisInfo>Unified"` }