Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertCxIACJSONToSarif(sys System, serverURL string, scanResults *[]ScanResult, scan *Scan) (format.SARIF, error)
- func ConvertCxJSONToSarif(sys System, serverURL string, scanResults *[]ScanResult, _ ScanSASTMetadata, ...) (format.SARIF, error)
- func ConvertCxSASTJSONToSarif(sys System, serverURL string, scanResults *[]ScanResult, scan *Scan) (format.SARIF, error)
- func CreateCustomReport(data *map[string]interface{}, insecure, neutral []string) reporting.ScanReport
- func WriteCustomReports(scanReport reporting.ScanReport, projectName, projectID string) ([]piperutils.Path, error)
- func WriteIACSarif(sarif format.SARIF) ([]piperutils.Path, error)
- func WriteJSONHeaderReport(jsonReport CheckmarxOneReportData, engine string) ([]piperutils.Path, error)
- func WriteSASTSarif(sarif format.SARIF) ([]piperutils.Path, error)
- type Application
- type ApplicationRule
- type AuthToken
- type CheckmarxOneReportData
- type Finding
- type Group
- type IACFindingInfo
- type LowPerQuery
- type Preset
- type Project
- type ProjectConfigurationSetting
- type Query
- type ReportStatus
- type ResultsPredicates
- type Scan
- type ScanConfiguration
- type ScanIACMetadata
- type ScanMetadata
- type ScanResult
- type ScanResultData
- type ScanResultDetails
- type ScanResultNodes
- type ScanSASTMetadata
- type ScanStatusDetails
- type ScanSummary
- type ScanSummaryCounters
- type Status
- type System
- type SystemInstance
- func (sys *SystemInstance) CreateApplication(appname string) (Application, error)
- func (sys *SystemInstance) CreateProject(projectName string, groupIDs []string) (Project, error)
- func (sys *SystemInstance) CreateProjectInApplication(projectName, applicationID string, groupIDs []string) (Project, error)
- func (sys *SystemInstance) DownloadReport(reportUrl string) ([]byte, error)
- func (sys *SystemInstance) GetApplicationByID(appId string) (Application, error)
- func (sys *SystemInstance) GetApplicationByName(name string) (Application, error)
- func (sys *SystemInstance) GetApplicationsByName(name string, limit uint64) ([]Application, error)
- func (sys *SystemInstance) GetGroupByID(groupID string) (Group, error)
- func (sys *SystemInstance) GetGroupByName(groupName string) (Group, error)
- func (sys *SystemInstance) GetGroups() ([]Group, error)
- func (sys *SystemInstance) GetIACFindingInfo(r ScanResult) (IACFindingInfo, error)
- func (sys *SystemInstance) GetIACPresetIDByName(name string) (string, error)
- func (sys *SystemInstance) GetIACPresetNameByID(id string) (string, error)
- func (sys *SystemInstance) GetIACQueryFamily(family string) (map[string]IACFindingInfo, error)
- func (sys *SystemInstance) GetLastScans(projectID, branch string, limit int) ([]Scan, error)
- func (sys *SystemInstance) GetLastScansByStatus(projectID, branch string, limit int, status []string) ([]Scan, error)
- func (sys *SystemInstance) GetProjectByID(projectID string) (Project, error)
- func (sys *SystemInstance) GetProjectConfiguration(projectID string) ([]ProjectConfigurationSetting, error)
- func (sys *SystemInstance) GetProjects() ([]Project, error)
- func (sys *SystemInstance) GetProjectsByName(projectName string) ([]Project, error)
- func (sys *SystemInstance) GetProjectsByNameAndGroup(projectName, groupID string) ([]Project, error)
- func (sys *SystemInstance) GetQueries() ([]Query, error)
- func (sys *SystemInstance) GetReportStatus(reportID string) (ReportStatus, error)
- func (sys *SystemInstance) GetResultsPredicates(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
- func (sys *SystemInstance) GetScan(scanID string) (Scan, error)
- func (sys *SystemInstance) GetScanConfiguration(projectID, scanID string) (map[string]string, error)
- func (sys *SystemInstance) GetScanIACMetadata(scanID string) (ScanIACMetadata, error)
- func (sys *SystemInstance) GetScanMetadata(scan *Scan) (ScanMetadata, error)
- func (sys *SystemInstance) GetScanResults(scanID string, limit uint64) ([]ScanResult, error)
- func (sys *SystemInstance) GetScanSASTMetadata(scanID string) (ScanSASTMetadata, error)
- func (sys *SystemInstance) GetScanSASTMetadatas(scanIDs []string) ([]ScanSASTMetadata, error)
- func (sys *SystemInstance) GetScanSummary(scanID string) (ScanSummary, error)
- func (sys *SystemInstance) GetScanWorkflow(scanID string) ([]WorkflowLog, error)
- func (sys *SystemInstance) GetUploadURI() (string, error)
- func (sys *SystemInstance) GetVersion() (VersionInfo, error)
- func (sys *SystemInstance) LoadIACHelpLinks(path string) error
- func (sys *SystemInstance) RequestNewReport(scanID, projectID, branch, reportType string, engines []string) (string, error)
- func (sys *SystemInstance) RequestNewReportV2(scanID, reportType string, engines []string) (string, error)
- func (sys *SystemInstance) ScanProject(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, ...) (Scan, error)
- func (sys *SystemInstance) ScanProjectGit(projectID, repoUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (sys *SystemInstance) ScanProjectZip(projectID, sourceUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (sys *SystemInstance) SetProjectBranch(projectID, branch string, allowOverride bool) error
- func (sys *SystemInstance) SetProjectIACFileFilter(projectID, filter string, allowOverride bool) error
- func (sys *SystemInstance) SetProjectIACPreset(projectID, presetName string, allowOverride bool) error
- func (sys *SystemInstance) SetProjectLanguageMode(projectID, languageMode string, allowOverride bool) error
- func (sys *SystemInstance) SetProjectSASTFileFilter(projectID, filter string, allowOverride bool) error
- func (sys *SystemInstance) SetProjectSASTPreset(projectID, presetName string, allowOverride bool) error
- func (sys *SystemInstance) UpdateApplication(app *Application) error
- func (sys *SystemInstance) UpdateProject(project *Project) error
- func (sys *SystemInstance) UpdateProjectConfiguration(projectID string, settings []ProjectConfigurationSetting) error
- func (sys *SystemInstance) UploadProjectSourceCode(projectID string, zipFile string) (string, error)
- type VersionInfo
- type WorkflowLog
Constants ¶
const IACDefaultBlankPreset = "all checks"
const ReportsDirectory = "checkmarxOne"
ReportsDirectory defines the subfolder for the Checkmarx reports which are generated
Variables ¶
var ConfigurationKeys = struct {
SAST sastConfigKeys
IAC iacConfigKeys
}{
SAST: sastConfigKeys{
PresetName: "scan.config.sast.presetName",
Incremental: "scan.config.sast.incremental",
LanguageMode: "scan.config.sast.languageMode",
FileFilter: "scan.config.sast.filter",
},
IAC: iacConfigKeys{
PresetID: "scan.config.kics.presetId",
FileFilter: "scan.config.kics.filter",
},
}
this is a convenience object to facilitate accessing configuration settings from the code
Functions ¶
func ConvertCxIACJSONToSarif ¶ added in v1.520.0
func ConvertCxJSONToSarif ¶
func ConvertCxJSONToSarif(sys System, serverURL string, scanResults *[]ScanResult, _ ScanSASTMetadata, scan *Scan) (format.SARIF, error)
ConvertCxJSONToSarif is the entrypoint for the Parse function
func ConvertCxSASTJSONToSarif ¶ added in v1.520.0
func CreateCustomReport ¶
func CreateCustomReport(data *map[string]interface{}, insecure, neutral []string) reporting.ScanReport
func WriteCustomReports ¶
func WriteCustomReports(scanReport reporting.ScanReport, projectName, projectID string) ([]piperutils.Path, error)
func WriteIACSarif ¶ added in v1.520.0
func WriteIACSarif(sarif format.SARIF) ([]piperutils.Path, error)
WriteSarif writes a json file to disk as a .sarif if it respects the specification declared in format.SARIF
func WriteJSONHeaderReport ¶
func WriteJSONHeaderReport(jsonReport CheckmarxOneReportData, engine string) ([]piperutils.Path, error)
func WriteSASTSarif ¶ added in v1.520.0
func WriteSASTSarif(sarif format.SARIF) ([]piperutils.Path, error)
WriteSarif writes a json file to disk as a .sarif if it respects the specification declared in format.SARIF
Types ¶
type Application ¶
type Application struct {
ApplicationID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Criticality uint `json:"criticality"`
Rules []ApplicationRule `json:"rules"`
Tags map[string]string `json:"tags"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
func (*Application) AddRule ¶
func (a *Application) AddRule(ruletype, value string)
func (*Application) AssignProject ¶
func (a *Application) AssignProject(project *Project)
func (*Application) GetRuleByType ¶
func (a *Application) GetRuleByType(ruletype string) *ApplicationRule
type ApplicationRule ¶
type AuthToken ¶
type AuthToken struct {
TokenType string `json:"token_type"`
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
}
AuthToken - Structure to store OAuth2 token Updated for Cx1
type CheckmarxOneReportData ¶
type CheckmarxOneReportData struct {
ToolName string `json:"toolName"`
ToolVersion string `json:"toolVersion"`
ProjectName string `json:"projectName"`
ProjectID string `json:"projectID"`
ScanID string `json:"scanID"`
ApplicationName string `json:"applicationName"`
ApplicationID string `json:"applicationID"`
GroupName string `json:"groupName"`
GroupID string `json:"groupID"`
DeepLink string `json:"deepLink"`
Preset string `json:"preset"`
ScanType string `json:"scanType"`
Findings *[]Finding `json:"findings"`
}
func CreateJSONHeaderReport ¶
func CreateJSONHeaderReport(data *map[string]interface{}, engine string) CheckmarxOneReportData
type Finding ¶ added in v1.301.0
type Finding struct {
ClassificationName string `json:"classificationName"`
Total int `json:"total,omitempty"`
Audited *int `json:"audited,omitempty"`
Confirmed int `json:"confirmed,omitempty"`
LowPerQuery *[]LowPerQuery `json:"categories,omitempty"`
}
type IACFindingInfo ¶ added in v1.520.0
type LowPerQuery ¶
type Project ¶
type Project struct {
ProjectID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Groups []string `json:"groups"`
Applications []string `json:"applicationIds"`
Tags map[string]string `json:"tags"`
RepoUrl string `json:"repoUrl"`
MainBranch string `json:"mainBranch"`
Origin string `json:"origin"`
Criticality int `json:"criticality"`
}
Project - Project Structure Updated for Cx1
type ProjectConfigurationSetting ¶
type ProjectConfigurationSetting struct {
Key string `json:"key"`
Name string `json:"name"`
Category string `json:"category"`
OriginLevel string `json:"originLevel"`
Value string `json:"value"`
ValueType string `json:"valuetype"`
ValueTypeParams string `json:"valuetypeparams"`
AllowOverride bool `json:"allowOverride"`
}
New for Cx1 These settings are higher-level settings that define how an engine should run, for example "multi-language" mode or setting a preset.
type ReportStatus ¶
type ReportStatus struct {
ReportID string `json:"reportId"`
Status string `json:"status"`
ReportURL string `json:"url"`
}
ReportStatus - ReportStatus Structure Updated for Cx1
type ResultsPredicates ¶
type Scan ¶
type Scan struct {
ScanID string `json:"id"`
Status string `json:"status"`
StatusDetails []ScanStatusDetails `json:"statusDetails"`
Branch string `json:"branch"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
ProjectID string `json:"projectId"`
ProjectName string `json:"projectName"`
UserAgent string `json:"userAgent"`
Initiator string `json:"initiator"`
Tags map[string]string `json:"tags"`
Metadata struct {
Type string `json:"type"`
Configs []ScanConfiguration `json:"configs"`
} `json:"metadata"`
Engines []string `json:"engines"`
SourceType string `json:"sourceType"`
SourceOrigin string `json:"sourceOrigin"`
}
Scan - Scan Structure updated for Cx1
func (*Scan) GetStatusDetails ¶ added in v1.520.0
func (s *Scan) GetStatusDetails(engine string) *ScanStatusDetails
func (*Scan) IsIncremental ¶
type ScanConfiguration ¶
type ScanConfiguration struct {
ScanType string `json:"type"`
Values map[string]string `json:"value"`
}
New for Cx1: ScanConfiguration - list of key:value pairs used to configure the scan for each scan engine This is specifically for scan-level configurations like "is incremental" and scan tags
type ScanIACMetadata ¶ added in v1.520.0
type ScanMetadata ¶
type ScanMetadata struct {
IAC *ScanIACMetadata
SAST *ScanSASTMetadata
}
func (ScanMetadata) TotalFiles ¶ added in v1.520.0
func (s ScanMetadata) TotalFiles() int
func (ScanMetadata) TotalLOC ¶ added in v1.520.0
func (s ScanMetadata) TotalLOC() int
type ScanResult ¶
type ScanResult struct {
Type string
ResultID string `json:"id"`
AlternateID string
SimilarityID string
Status string
State string
Severity string
CreatedAt string `json:"created"`
FirstFoundAt string
FoundAt string
FirstScanId string
Description string
Data ScanResultData
VulnerabilityDetails ScanResultDetails
}
type ScanResultData ¶
type ScanResultData struct {
QueryID scanresultQueryID
QueryName string // SAST and IaC
Group string // SAST and IaC
ResultHash string // only SAST
LanguageName string // only SAST
Nodes []ScanResultNodes // only SAST
Platform string // only IAC
Line int // only IAC
Filename string // only IAC
Value string // only IAC
ExpectedValue string // only IAC
}
type ScanResultDetails ¶
type ScanResultDetails struct {
CweId maybeStringInt // empty for kics results, pending case 283343
Compliances []string
}
type ScanResultNodes ¶
type ScanSASTMetadata ¶ added in v1.520.0
type ScanStatusDetails ¶
type ScanStatusDetails struct {
Name string `json:"name"`
Status string `json:"status"`
Details string `json:"details"`
}
Cx1: StatusDetails - details of each engine type's scan status for a multi-engine scan
type ScanSummary ¶
type ScanSummary struct {
TenantID string
ScanID string
SASTCounters ScanSummaryCounters
IACCounters ScanSummaryCounters `json:"kicsCounters"`
}
Very simplified for now
func (*ScanSummary) TotalCount ¶
func (s *ScanSummary) TotalCount() uint64
type ScanSummaryCounters ¶ added in v1.520.0
type ScanSummaryCounters struct {
//QueriesCounters []?
//SinkFileCounters []?
LanguageCounters []struct {
Language string
Counter uint64
}
ComplianceCounters []struct {
Compliance string
Counter uint64
}
SeverityCounters []struct {
Severity string
Counter uint64
}
StatusCounters []struct {
Status string
Counter uint64
}
StateCounters []struct {
State string
Counter uint64
}
TotalCounter uint64
FilesScannedCounter uint64
}
type Status ¶
type Status struct {
ID int `json:"id"`
Name string `json:"name"`
Details ScanStatusDetails `json:"details"`
}
Status - Status Structure
type System ¶
type System interface {
DownloadReport(reportID string) ([]byte, error)
GetReportStatus(reportID string) (ReportStatus, error)
RequestNewReport(scanID, projectID, branch, reportType string, engines []string) (string, error)
CreateApplication(appname string) (Application, error)
GetApplicationByName(appname string) (Application, error)
GetApplicationByID(appId string) (Application, error)
UpdateApplication(app *Application) error
GetScan(scanID string) (Scan, error)
GetScanConfiguration(projectID, scanID string) (map[string]string, error)
GetScanMetadata(scan *Scan) (ScanMetadata, error)
GetScanSASTMetadata(scanID string) (ScanSASTMetadata, error)
GetScanSASTMetadatas(scanIDs []string) ([]ScanSASTMetadata, error)
GetScanIACMetadata(scanID string) (ScanIACMetadata, error)
GetScanResults(scanID string, limit uint64) ([]ScanResult, error)
GetScanSummary(scanID string) (ScanSummary, error)
GetResultsPredicates(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
GetScanWorkflow(scanID string) ([]WorkflowLog, error)
GetLastScans(projectID, branch string, limit int) ([]Scan, error)
GetLastScansByStatus(projectID, branch string, limit int, status []string) ([]Scan, error)
ScanProject(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
ScanProjectZip(projectID, sourceUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
ScanProjectGit(projectID, repoUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
UpdateProject(project *Project) error
UploadProjectSourceCode(projectID string, zipFile string) (string, error)
CreateProject(projectName string, groupIDs []string) (Project, error)
CreateProjectInApplication(projectName, applicationID string, groupIDs []string) (Project, error)
//GetPresets() ([]Preset, error)
GetProjectByID(projectID string) (Project, error)
GetProjectsByName(projectName string) ([]Project, error)
GetProjectsByNameAndGroup(projectName, groupID string) ([]Project, error)
GetProjects() ([]Project, error)
GetQueries() ([]Query, error)
//GetShortDescription(scanID int, pathID int) (ShortDescription, error)
GetGroups() ([]Group, error)
GetGroupByName(groupName string) (Group, error)
GetGroupByID(groupID string) (Group, error)
SetProjectBranch(projectID, branch string, allowOverride bool) error
SetProjectLanguageMode(projectID, languageMode string, allowOverride bool) error
SetProjectSASTPreset(projectID, presetName string, allowOverride bool) error
SetProjectSASTFileFilter(projectID, filter string, allowOverride bool) error
SetProjectIACPreset(projectID, presetName string, allowOverride bool) error
SetProjectIACFileFilter(projectID, filter string, allowOverride bool) error
GetIACPresetNameByID(presetID string) (string, error)
GetIACPresetIDByName(presetName string) (string, error)
GetIACFindingInfo(r ScanResult) (IACFindingInfo, error)
LoadIACHelpLinks(url string) error
GetProjectConfiguration(projectID string) ([]ProjectConfigurationSetting, error)
UpdateProjectConfiguration(projectID string, settings []ProjectConfigurationSetting) error
GetVersion() (VersionInfo, error)
}
System is the interface abstraction of a specific SystemIns
type SystemInstance ¶
type SystemInstance struct {
APIKey string // New for Cx1
// contains filtered or unexported fields
}
SystemInstance is the client communicating with the Checkmarx backend
func NewSystemInstance ¶
func NewSystemInstance(client piperHttp.Uploader, serverURL, iamURL, tenant, APIKey, client_id, client_secret string) (*SystemInstance, error)
NewSystemInstance returns a new Checkmarx client for communicating with the backend Updated for Cx1
func (*SystemInstance) CreateApplication ¶
func (sys *SystemInstance) CreateApplication(appname string) (Application, error)
func (*SystemInstance) CreateProject ¶
func (sys *SystemInstance) CreateProject(projectName string, groupIDs []string) (Project, error)
CreateProject creates a new project in the Checkmarx backend Updated for Cx1
func (*SystemInstance) CreateProjectInApplication ¶ added in v1.308.0
func (sys *SystemInstance) CreateProjectInApplication(projectName, applicationID string, groupIDs []string) (Project, error)
func (*SystemInstance) DownloadReport ¶
func (sys *SystemInstance) DownloadReport(reportUrl string) ([]byte, error)
DownloadReport downloads the report addressed by reportID and returns the XML contents
func (*SystemInstance) GetApplicationByID ¶ added in v1.308.0
func (sys *SystemInstance) GetApplicationByID(appId string) (Application, error)
func (*SystemInstance) GetApplicationByName ¶
func (sys *SystemInstance) GetApplicationByName(name string) (Application, error)
func (*SystemInstance) GetApplicationsByName ¶
func (sys *SystemInstance) GetApplicationsByName(name string, limit uint64) ([]Application, error)
func (*SystemInstance) GetGroupByID ¶
func (sys *SystemInstance) GetGroupByID(groupID string) (Group, error)
New for Cx1
func (*SystemInstance) GetGroupByName ¶
func (sys *SystemInstance) GetGroupByName(groupName string) (Group, error)
New for Cx1
func (*SystemInstance) GetGroups ¶
func (sys *SystemInstance) GetGroups() ([]Group, error)
Updated for Cx1
func (*SystemInstance) GetIACFindingInfo ¶ added in v1.520.0
func (sys *SystemInstance) GetIACFindingInfo(r ScanResult) (IACFindingInfo, error)
func (*SystemInstance) GetIACPresetIDByName ¶ added in v1.520.0
func (sys *SystemInstance) GetIACPresetIDByName(name string) (string, error)
func (*SystemInstance) GetIACPresetNameByID ¶ added in v1.520.0
func (sys *SystemInstance) GetIACPresetNameByID(id string) (string, error)
func (*SystemInstance) GetIACQueryFamily ¶ added in v1.520.0
func (sys *SystemInstance) GetIACQueryFamily(family string) (map[string]IACFindingInfo, error)
func (*SystemInstance) GetLastScans ¶
func (sys *SystemInstance) GetLastScans(projectID, branch string, limit int) ([]Scan, error)
func (*SystemInstance) GetLastScansByStatus ¶
func (*SystemInstance) GetProjectByID ¶
func (sys *SystemInstance) GetProjectByID(projectID string) (Project, error)
GetProjectByID returns the project addressed by projectID from the Checkmarx backend which the user has access to Updated for Cx1
func (*SystemInstance) GetProjectConfiguration ¶
func (sys *SystemInstance) GetProjectConfiguration(projectID string) ([]ProjectConfigurationSetting, error)
func (*SystemInstance) GetProjects ¶
func (sys *SystemInstance) GetProjects() ([]Project, error)
GetProjects returns the projects defined in the Checkmarx backend which the user has access to
func (*SystemInstance) GetProjectsByName ¶
func (sys *SystemInstance) GetProjectsByName(projectName string) ([]Project, error)
GetProjectsByNameAndGroup returns the project addressed by project name from the Checkmarx backend which the user has access to Updated for Cx1
func (*SystemInstance) GetProjectsByNameAndGroup ¶
func (sys *SystemInstance) GetProjectsByNameAndGroup(projectName, groupID string) ([]Project, error)
GetProjectsByNameAndGroup returns the project addressed by project name from the Checkmarx backend which the user has access to Updated for Cx1
func (*SystemInstance) GetQueries ¶
func (sys *SystemInstance) GetQueries() ([]Query, error)
func (*SystemInstance) GetReportStatus ¶
func (sys *SystemInstance) GetReportStatus(reportID string) (ReportStatus, error)
GetReportStatus returns the status of the report generation process
func (*SystemInstance) GetResultsPredicates ¶
func (sys *SystemInstance) GetResultsPredicates(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
func (*SystemInstance) GetScan ¶
func (sys *SystemInstance) GetScan(scanID string) (Scan, error)
GetScans returns all scan status on the project addressed by projectID
func (*SystemInstance) GetScanConfiguration ¶ added in v1.520.0
func (sys *SystemInstance) GetScanConfiguration(projectID, scanID string) (map[string]string, error)
func (*SystemInstance) GetScanIACMetadata ¶ added in v1.520.0
func (sys *SystemInstance) GetScanIACMetadata(scanID string) (ScanIACMetadata, error)
func (*SystemInstance) GetScanMetadata ¶
func (sys *SystemInstance) GetScanMetadata(scan *Scan) (ScanMetadata, error)
func (*SystemInstance) GetScanResults ¶
func (sys *SystemInstance) GetScanResults(scanID string, limit uint64) ([]ScanResult, error)
func (*SystemInstance) GetScanSASTMetadata ¶ added in v1.520.0
func (sys *SystemInstance) GetScanSASTMetadata(scanID string) (ScanSASTMetadata, error)
func (*SystemInstance) GetScanSASTMetadatas ¶ added in v1.520.0
func (sys *SystemInstance) GetScanSASTMetadatas(scanIDs []string) ([]ScanSASTMetadata, error)
func (*SystemInstance) GetScanSummary ¶
func (sys *SystemInstance) GetScanSummary(scanID string) (ScanSummary, error)
func (*SystemInstance) GetScanWorkflow ¶
func (sys *SystemInstance) GetScanWorkflow(scanID string) ([]WorkflowLog, error)
func (*SystemInstance) GetUploadURI ¶
func (sys *SystemInstance) GetUploadURI() (string, error)
New for Cx1
func (*SystemInstance) GetVersion ¶ added in v1.328.0
func (sys *SystemInstance) GetVersion() (VersionInfo, error)
func (*SystemInstance) LoadIACHelpLinks ¶ added in v1.520.0
func (sys *SystemInstance) LoadIACHelpLinks(path string) error
func (*SystemInstance) RequestNewReport ¶
func (sys *SystemInstance) RequestNewReport(scanID, projectID, branch, reportType string, engines []string) (string, error)
RequestNewReport triggers the generation of a report for a specific scan addressed by scanID
func (*SystemInstance) RequestNewReportV2 ¶ added in v1.405.0
func (sys *SystemInstance) RequestNewReportV2(scanID, reportType string, engines []string) (string, error)
Use the new V2 Report API to generate a PDF report
func (*SystemInstance) ScanProject ¶
func (sys *SystemInstance) ScanProject(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
func (*SystemInstance) ScanProjectGit ¶
func (sys *SystemInstance) ScanProjectGit(projectID, repoUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
func (*SystemInstance) ScanProjectZip ¶
func (sys *SystemInstance) ScanProjectZip(projectID, sourceUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
func (*SystemInstance) SetProjectBranch ¶
func (sys *SystemInstance) SetProjectBranch(projectID, branch string, allowOverride bool) error
func (*SystemInstance) SetProjectIACFileFilter ¶ added in v1.520.0
func (sys *SystemInstance) SetProjectIACFileFilter(projectID, filter string, allowOverride bool) error
func (*SystemInstance) SetProjectIACPreset ¶ added in v1.520.0
func (sys *SystemInstance) SetProjectIACPreset(projectID, presetName string, allowOverride bool) error
func (*SystemInstance) SetProjectLanguageMode ¶
func (sys *SystemInstance) SetProjectLanguageMode(projectID, languageMode string, allowOverride bool) error
func (*SystemInstance) SetProjectSASTFileFilter ¶ added in v1.520.0
func (sys *SystemInstance) SetProjectSASTFileFilter(projectID, filter string, allowOverride bool) error
func (*SystemInstance) SetProjectSASTPreset ¶ added in v1.520.0
func (sys *SystemInstance) SetProjectSASTPreset(projectID, presetName string, allowOverride bool) error
func (*SystemInstance) UpdateApplication ¶
func (sys *SystemInstance) UpdateApplication(app *Application) error
func (*SystemInstance) UpdateProject ¶ added in v1.365.0
func (sys *SystemInstance) UpdateProject(project *Project) error
func (*SystemInstance) UpdateProjectConfiguration ¶
func (sys *SystemInstance) UpdateProjectConfiguration(projectID string, settings []ProjectConfigurationSetting) error
func (*SystemInstance) UploadProjectSourceCode ¶
func (sys *SystemInstance) UploadProjectSourceCode(projectID string, zipFile string) (string, error)
type VersionInfo ¶ added in v1.328.0
type VersionInfo struct {
CxOne string `json:"CxOne"`
KICS string `json:"KICS"`
SAST string `json:"SAST"`
}
func (VersionInfo) CheckCxOne ¶ added in v1.405.0
func (v VersionInfo) CheckCxOne(version string) int