fortify

package
v1.358.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 42 Imported by: 3

Documentation

Index

Constants

View Source
const ReportsDirectory = "fortify"

ReportsDirectory defines the subfolder for the Fortify reports which are generated

Variables

This section is empty.

Functions

func ConvertFprToSarif added in v1.195.0

func ConvertFprToSarif(sys System, projectVersion *models.ProjectVersion, resultFilePath string, filterSet *models.FilterSet) (format.SARIF, format.SARIF, error)

ConvertFprToSarif converts the FPR file contents into SARIF format

func CreateCustomReport added in v1.148.0

func CreateCustomReport(data FortifyReportData, issueGroups []*models.ProjectVersionIssueGroup) reporting.ScanReport

func Parse added in v1.195.0

func Parse(sys System, projectVersion *models.ProjectVersion, data []byte, filterSet *models.FilterSet) (format.SARIF, format.SARIF, error)

Parse parses the FPR file

func WriteCustomReports added in v1.148.0

func WriteCustomReports(scanReport reporting.ScanReport) ([]piperutils.Path, error)

func WriteGzipSarif added in v1.266.0

func WriteGzipSarif(sarif format.SARIF, fileName string) ([]piperutils.Path, error)

func WriteJSONReport added in v1.176.0

func WriteJSONReport(jsonReport FortifyReportData) ([]piperutils.Path, error)

func WriteSarif added in v1.195.0

func WriteSarif(sarif format.SARIF, fileName string) ([]piperutils.Path, error)

Types

type Abstract added in v1.195.0

type Abstract struct {
	XMLName xml.Name `xml:"Abstract"`
	Text    string   `xml:",innerxml"`
}

Abstract

type Action added in v1.195.0

type Action struct {
	XMLName    xml.Name `xml:"Action"`
	Type       string   `xml:"type,attr"`
	ActionData string   `xml:",innerxml"`
}

Action

type AnalysisInfo added in v1.195.0

type AnalysisInfo struct {
	Context                Context
	ReplacementDefinitions ReplacementDefinitions `xml:"ReplacementDefinitions"`
	Trace                  []Trace                `xml:"Trace"`
}

AnalysisInfo

type Attribute added in v1.195.0

type Attribute struct {
	XMLName xml.Name `xml:"Attribute"`
	Name    string   `xml:"name"`
	Value   string   `xml:"value"`
}

Attribute

type Build added in v1.195.0

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 added in v1.195.0

type Capability struct {
	XMLName    xml.Name  `xml:"Capability"`
	Name       string    `xml:"Name"`
	Expiration string    `xml:"Expiration"`
	Attribute  Attribute `xml:"Attribute"`
}

Capability

type ClassInfo added in v1.195.0

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 float64  `xml:"DefaultSeverity"`
}

ClassInfo

type Context added in v1.195.0

type Context struct {
	XMLName   xml.Name                          `xml:"Context"`
	ContextId string                            `xml:"id,attr,omitempty"`
	Function  Function                          `xml:"Function"`
	FDSL      FunctionDeclarationSourceLocation `xml:"FunctionDeclarationSourceLocation"`
}

Context

type ContextPool added in v1.195.0

type ContextPool struct {
	XMLName xml.Name  `xml:"ContextPool"`
	Context []Context `xml:"Context"`
}

ContextPool These structures are relevant to the ContextPool object

type CreatedTS added in v1.195.0

type CreatedTS struct {
	XMLName xml.Name `xml:"CreatedTS"`
	Date    string   `xml:"date,attr"`
	Time    string   `xml:"time,attr"`
}

CreatedTS

type CustomDescription added in v1.195.0

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 added in v1.195.0

type Def struct {
	XMLName  xml.Name `xml:"Def"`
	DefKey   string   `xml:"key,attr"`
	DefValue string   `xml:"value,attr"`
}

Def

type Description added in v1.195.0

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 added in v1.195.0

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 added in v1.195.0

type Entry struct {
	XMLName xml.Name `xml:"Entry"`
	NodeRef NodeRef  `xml:"NodeRef,omitempty"`
	Node    Node     `xml:"Node,omitempty"`
}

Entry

type Error added in v1.195.0

type Error struct {
	XMLName      xml.Name `xml:"Error"`
	ErrorCode    string   `xml:"code,attr"`
	ErrorMessage string   `xml:",innerxml"`
}

Error

type Explanation added in v1.195.0

type Explanation struct {
	XMLName xml.Name `xml:"Explanation"`
	Text    string   `xml:",innerxml"`
}

Explanation

type FVDL added in v1.195.0

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       `xml:"CreatedTS"`
	Uuid            UUID            `xml:"UUID"`
	Build           Build           `xml:"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 added in v1.195.0

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 added in v1.195.0

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 FilterResult added in v1.195.0

type FilterResult struct {
	XMLName xml.Name `xml:"FilterResult"`
}

FilterResult

type FortifyReportData added in v1.148.0

type FortifyReportData struct {
	ToolName                            string                  `json:"toolName"`
	ToolInstance                        string                  `json:"toolInstance"`
	ProjectID                           int64                   `json:"projectID"`
	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"`
	IsSpotChecksPerCategoryAudited      bool                    `json:"isSpotChecksPerCategoryAudited"`
	URL                                 string                  `json:"url"`
	SpotChecksCategories                *[]SpotChecksAuditCount `json:"spotChecksCategories"`
}

func CreateJSONReport added in v1.176.0

func CreateJSONReport(reportData FortifyReportData, spotChecksCountByCategory []SpotChecksAuditCount, serverURL string) FortifyReportData

type Function added in v1.195.0

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 added in v1.195.0

type FunctionCall struct {
	XMLName        xml.Name       `xml:"FunctionCall"`
	SourceLocation SourceLocation `xml:"SourceLocation"`
	Function       Function       `xml:"Function"`
}

FunctionCall

type FunctionDeclarationSourceLocation added in v1.195.0

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 added in v1.195.0

type FunctionEntry struct {
	XMLName        xml.Name       `xml:"FunctionEntry"`
	SourceLocation SourceLocation `xml:"SourceLocation"`
	Function       Function       `xml:"Function"`
}

FunctionEntry

type Group added in v1.195.0

type Group struct {
	XMLName xml.Name `xml:"Group"`
	Name    string   `xml:"name,attr"`
	Data    string   `xml:",innerxml"`
}

Group

type InstanceInfo added in v1.195.0

type InstanceInfo struct {
	XMLName          xml.Name `xml:"InstanceInfo"`
	InstanceID       string   `xml:"InstanceID"`
	InstanceSeverity float64  `xml:"InstanceSeverity"`
	Confidence       string   `xml:"Confidence"`
}

InstanceInfo

type Knowledge added in v1.195.0

type Knowledge struct {
	XMLName xml.Name `xml:"Knowledge"`
	Facts   []Fact   `xml:"Fact"`
}

Knowledge

type LOC added in v1.195.0

type LOC struct {
	XMLName  xml.Name `xml:"LOC"`
	LocType  string   `xml:"type,attr"`
	LocValue string   `xml:",innerxml"`
}

LOC

type LicenseInfo added in v1.195.0

type LicenseInfo struct {
	XMLName    xml.Name     `xml:"LicenseInfo"`
	Metadata   []Metadata   `xml:"Metadata"`
	Capability []Capability `xml:"Capability"`
}

LicenseInfo

type LocationDef added in v1.195.0

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 added in v1.195.0

type MachineInfo struct {
	XMLName  xml.Name `xml:"MachineInfo"`
	Hostname string   `xml:"Hostname"`
	Username string   `xml:"Username"`
	Platform string   `xml:"Platform"`
}

MachineInfo

type Metadata added in v1.195.0

type Metadata struct {
	XMLName xml.Name `xml:"Metadata"`
	Name    string   `xml:"name"`
	Value   string   `xml:"value"`
}

Metadata

type Node added in v1.195.0

type Node struct {
	XMLName        xml.Name       `xml:"Node"`
	IsDefault      string         `xml:"isDefault,attr,omitempty"`
	NodeLabel      string         `xml:"label,attr,omitempty"`
	ID             int            `xml:"id,attr,omitempty"`
	SourceLocation SourceLocation `xml:"SourceLocation"`
	Action         Action         `xml:"Action,omitempty"`
	Reason         Reason         `xml:"Reason,omitempty"`
	Knowledge      Knowledge      `xml:"Knowledge,omitempty"`
}

Node

type NodeRef added in v1.195.0

type NodeRef struct {
	XMLName xml.Name `xml:"NodeRef"`
	RefId   int      `xml:"id,attr"`
}

NodeRef

type Primary added in v1.195.0

type Primary struct {
	XMLName xml.Name `xml:"Primary"`
	Entry   []Entry  `xml:"Entry"`
}

Primary

type ProgramData added in v1.195.0

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 added in v1.195.0

type Properties struct {
	XMLName        xml.Name   `xml:"Properties"`
	PropertiesType string     `xml:"type,attr"`
	Property       []Property `xml:"Property"`
}

Properties

type Property added in v1.195.0

type Property struct {
	XMLName xml.Name `xml:"Property"`
	Name    string   `xml:"name"`
	Value   string   `xml:"value"`
}

Property

type Reason added in v1.195.0

type Reason struct {
	XMLName xml.Name `xml:"Reason"`
	Rule    Rule     `xml:"Rule,omitempty"`
	Trace   Trace    `xml:"Trace,omitempty"`
}

Reason

type Recommendations added in v1.195.0

type Recommendations struct {
	XMLName xml.Name `xml:"Recommendations"`
	Text    string   `xml:",innerxml"`
}

Recommendations

type Reference added in v1.195.0

type Reference struct {
	XMLName xml.Name `xml:"Reference"`
	Title   string   `xml:"Title"`
	Author  string   `xml:"Author"`
}

Reference

type ReplacementDefinitions added in v1.195.0

type ReplacementDefinitions struct {
	XMLName     xml.Name      `xml:"ReplacementDefinitions"`
	Def         []Def         `xml:"Def"`
	LocationDef []LocationDef `xml:"LocationDef"`
}

ReplacementDefinitions

type Rule added in v1.195.0

type Rule struct {
	XMLName xml.Name `xml:"Rule"`
	RuleID  string   `xml:"ruleID,attr"`
}

Rule

type RuleInfo added in v1.195.0

type RuleInfo struct {
	XMLName       xml.Name `xml:"Rule"`
	RuleID        string   `xml:"id,attr"`
	MetaInfoGroup []Group  `xml:"MetaInfo>Group,omitempty"`
}

RuleInfo

type RulePack added in v1.195.0

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 ScanTime added in v1.195.0

type ScanTime struct {
	XMLName xml.Name `xml:"ScanTime"`
	Value   int      `xml:"value,attr"`
}

ScanTime

type SinkInstance added in v1.195.0

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 added in v1.195.0

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 added in v1.195.0

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 added in v1.195.0

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 added in v1.176.0

type SpotChecksAuditCount struct {
	Audited int    `json:"audited"`
	Total   int    `json:"total"`
	Type    string `json:"type"`
}

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)
	GetAllIssueDetails(projectVersionId int64) ([]*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, proxyUrl 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) GetAllIssueDetails added in v1.214.0

func (sys *SystemInstance) GetAllIssueDetails(projectVersionId int64) ([]*models.ProjectVersionIssue, error)

GetAllIssueDetails returns the details of all issues of the project with id projectVersionId

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 added in v1.195.0

func (sys *SystemInstance) GetIssueComments(parentId int64) ([]*models.IssueAuditComment, error)

GetIssueComments returns the details of an issue comments with its unique parentId

func (*SystemInstance) GetIssueDetails added in v1.195.0

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 TaintFlag added in v1.195.0

type TaintFlag struct {
	XMLName       xml.Name `xml:"TaintFlag"`
	TaintFlagName string   `xml:"name,attr"`
}

TaintFlag

type TaintFlags added in v1.195.0

type TaintFlags struct {
	XMLName   xml.Name    `xml:"TaintFlags"`
	TaintFlag []TaintFlag `xml:"TaintFlag"`
}

TaintFlags

type Tip added in v1.195.0

type Tip struct {
	XMLName xml.Name `xml:"Tip"`
	Tip     string   `xml:",innerxml"`
}

Tip

type Trace added in v1.195.0

type Trace struct {
	XMLName xml.Name `xml:"Trace"`
	Primary Primary  `xml:"Primary"`
}

Trace

type UUID added in v1.195.0

type UUID struct {
	XMLName xml.Name `xml:"UUID"`
	Uuid    string   `xml:",innerxml"`
}

UUIF

type UnifiedNodePool added in v1.195.0

type UnifiedNodePool struct {
	XMLName xml.Name `xml:"UnifiedNodePool"`
	Node    []Node   `xml:"Node"`
}

UnifiedNodePool These structures are relevant to the UnifiedNodePool object

type Vulnerabilities added in v1.195.0

type Vulnerabilities struct {
	XMLName       xml.Name        `xml:"Vulnerabilities"`
	Vulnerability []Vulnerability `xml:"Vulnerability"`
}

Vulnerabilities These structures are relevant to the Vulnerabilities object

type Vulnerability added in v1.195.0

type Vulnerability struct {
	XMLName      xml.Name     `xml:"Vulnerability"`
	ClassInfo    ClassInfo    `xml:"ClassInfo"`
	InstanceInfo InstanceInfo `xml:"InstanceInfo"`
	AnalysisInfo AnalysisInfo `xml:"AnalysisInfo>Unified"`
}

Vulnerability

Jump to

Keyboard shortcuts

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