Documentation ¶
Index ¶
- Constants
- Variables
- func AggregateMultipleRunsIntoSingle(runs []*sarif.Run, destination *sarif.Run)
- func ApplicabilityRuleIdToCve(sarifRuleId string) string
- func CheckIfFailBuild(results []services.ScanResponse) bool
- func ConvertSarifReportToString(report *sarif.Report) (sarifStr string, err error)
- func ConvertToSarifLevel(severity string) string
- func ConvertXrayScanToSimpleJson(results *Results, isMultipleRoots, includeLicenses, simplifiedOutput bool, ...) (formats.SimpleJsonResults, error)
- func CreateCodeFlow(threadFlows ...*sarif.ThreadFlow) *sarif.CodeFlow
- func CreateDummyPassingResult(ruleId string) *sarif.Result
- func CreateLocation(fileName string, startLine, startCol, endLine, endCol int, snippet string) *sarif.Location
- func CreateResultWithLocations(msg, ruleId, level string, locations ...*sarif.Location) *sarif.Result
- func CreateResultWithOneLocation(fileName string, startLine, startCol, endLine, endCol int, ...) *sarif.Result
- func CreateRunWithDummyResults(results ...*sarif.Result) *sarif.Run
- func CreateThreadFlow(locations ...*sarif.Location) *sarif.ThreadFlow
- func CreateXrayServiceManager(serviceDetails *config.ServerDetails) (*xray.XrayServicesManager, error)
- func CreateXrayServiceManagerAndGetVersion(serviceDetails *config.ServerDetails) (*xray.XrayServicesManager, string, error)
- func CveToApplicabilityRuleId(cveId string) string
- func ExtractRelativePath(resultPath string, projectRoot string) string
- func GenereateSarifReportFromResults(results *Results, isMultipleRoots, includeLicenses bool, ...) (report *sarif.Report, err error)
- func GetAnalyzerManagerDirAbsolutePath() (string, error)
- func GetAnalyzerManagerDownloadPath() (string, error)
- func GetAnalyzerManagerExecutable() (analyzerManagerPath string, err error)
- func GetAnalyzerManagerExecutableName() string
- func GetAnalyzerManagerVersion() string
- func GetFullLocationFileName(relative string, invocations []*sarif.Invocation) string
- func GetInvocationWorkingDirectory(invocation *sarif.Invocation) string
- func GetIssueIdentifier(cvesRow []formats.CveRow, issueId string) string
- func GetLocationEndColumn(location *sarif.Location) int
- func GetLocationEndLine(location *sarif.Location) int
- func GetLocationFileName(location *sarif.Location) string
- func GetLocationRelatedCodeFlowsFromResult(location *sarif.Location, result *sarif.Result) (codeFlows []*sarif.CodeFlow)
- func GetLocationSnippet(location *sarif.Location) string
- func GetLocationStartColumn(location *sarif.Location) int
- func GetLocationStartLine(location *sarif.Location) int
- func GetRelativeLocationFileName(location *sarif.Location, invocations []*sarif.Invocation) string
- func GetResultMsgText(result *sarif.Result) string
- func GetResultSeverity(result *sarif.Result) string
- func GetResultsLocationCount(runs ...*sarif.Run) (count int)
- func GetRuleFullDescription(rule *sarif.ReportingDescriptor) string
- func GetRunRules(run *sarif.Run) []*sarif.ReportingDescriptor
- func GetSeveritiesFormat(severity string) (string, error)
- func GetUniqueKey(vulnerableDependency, vulnerableVersion, xrayID string, fixVersionExist bool) string
- func GetViolatedLicenses(allowedLicenses []string, licenses []formats.LicenseRow) (violatedLicenses []formats.LicenseRow)
- func IsApplicableResult(result *sarif.Result) bool
- func IsEmptyScanResponse(results []services.ScanResponse) bool
- func NewFailBuildError() error
- func NewReport() (*sarif.Report, error)
- func ParseAnalyzerManagerError(scanner JasScanType, err error) error
- func PrepareIacs(iacs []*sarif.Run) []formats.SourceCodeRow
- func PrepareLicenses(licenses []services.License) ([]formats.LicenseRow, error)
- func PrepareSast(sasts []*sarif.Run) []formats.SourceCodeRow
- func PrepareSecrets(secrets []*sarif.Run) []formats.SourceCodeRow
- func PrepareViolations(violations []services.Violation, results *Results, ...) ([]formats.VulnerabilityOrViolationRow, []formats.LicenseRow, ...)
- func PrepareVulnerabilities(vulnerabilities []services.Vulnerability, results *Results, ...) ([]formats.VulnerabilityOrViolationRow, error)
- func PrintIacTable(iacs []*sarif.Run, entitledForIacScan bool) error
- func PrintJson(output interface{}) error
- func PrintLicensesTable(licenses []services.License, printExtended bool, scanType services.ScanType) error
- func PrintSarif(results *Results, isMultipleRoots, includeLicenses bool) error
- func PrintSastTable(sast []*sarif.Run, entitledForSastScan bool) error
- func PrintSecretsTable(secrets []*sarif.Run, entitledForSecretsScan bool) error
- func PrintViolationsTable(violations []services.Violation, results *Results, ...) error
- func PrintVulnerabilitiesTable(vulnerabilities []services.Vulnerability, results *Results, ...) error
- func ReadScanRunsFromFile(fileName string) (sarifRuns []*sarif.Run, err error)
- func SetAnalyzerManagerEnvVariables(serverDetails *config.ServerDetails) error
- func SetLocationFileName(location *sarif.Location, fileName string)
- func SetLocationSnippet(location *sarif.Location, snippet string)
- func SplitComponentId(componentId string) (string, string, string)
- func SplitScanResults(results []ScaScanResult) ([]services.Violation, []services.Vulnerability, []services.License)
- type AnalyzerManager
- type ApplicabilityStatus
- type AuditBasicParams
- func (abp *AuditBasicParams) AppendDependenciesForApplicabilityScan(directDependencies []string) *AuditBasicParams
- func (abp *AuditBasicParams) Args() []string
- func (abp *AuditBasicParams) DepsRepo() string
- func (abp *AuditBasicParams) DirectDependencies() []string
- func (abp *AuditBasicParams) ExcludeTestDependencies() bool
- func (abp *AuditBasicParams) IgnoreConfigFile() bool
- func (abp *AuditBasicParams) InsecureTls() bool
- func (abp *AuditBasicParams) InstallCommandArgs() []string
- func (abp *AuditBasicParams) InstallCommandName() string
- func (abp *AuditBasicParams) IsMavenDepTreeInstalled() bool
- func (abp *AuditBasicParams) OutputFormat() format.OutputFormat
- func (abp *AuditBasicParams) PipRequirementsFile() string
- func (abp *AuditBasicParams) Progress() ioUtils.ProgressMgr
- func (abp *AuditBasicParams) ServerDetails() (*config.ServerDetails, error)
- func (abp *AuditBasicParams) SetDepsRepo(depsRepo string) *AuditBasicParams
- func (abp *AuditBasicParams) SetExcludeTestDependencies(excludeTestDependencies bool) *AuditBasicParams
- func (abp *AuditBasicParams) SetIgnoreConfigFile(ignoreConfigFile bool) *AuditBasicParams
- func (abp *AuditBasicParams) SetInsecureTls(insecureTls bool) *AuditBasicParams
- func (abp *AuditBasicParams) SetInstallCommandArgs(installCommandArgs []string) *AuditBasicParams
- func (abp *AuditBasicParams) SetInstallCommandName(installCommandName string) *AuditBasicParams
- func (abp *AuditBasicParams) SetIsMavenDepTreeInstalled(isMavenDepTreeInstalled bool) *AuditBasicParams
- func (abp *AuditBasicParams) SetNpmScope(depType string) *AuditBasicParams
- func (abp *AuditBasicParams) SetOutputFormat(format format.OutputFormat) *AuditBasicParams
- func (abp *AuditBasicParams) SetPipRequirementsFile(requirementsFile string) *AuditBasicParams
- func (abp *AuditBasicParams) SetProgress(progress ioUtils.ProgressMgr)
- func (abp *AuditBasicParams) SetServerDetails(serverDetails *config.ServerDetails) *AuditBasicParams
- func (abp *AuditBasicParams) SetTechnologies(technologies []string) *AuditBasicParams
- func (abp *AuditBasicParams) SetUseWrapper(useWrapper bool) *AuditBasicParams
- func (abp *AuditBasicParams) Technologies() []string
- func (abp *AuditBasicParams) UseWrapper() bool
- type AuditNpmParams
- type AuditParams
- type ExtendedScanResults
- type JasScanType
- type Results
- type ResultsWriter
- func (rw *ResultsWriter) PrintScanResults() error
- func (rw *ResultsWriter) SetExtraMessages(messages []string) *ResultsWriter
- func (rw *ResultsWriter) SetIncludeLicenses(licenses bool) *ResultsWriter
- func (rw *ResultsWriter) SetIncludeVulnerabilities(includeVulnerabilities bool) *ResultsWriter
- func (rw *ResultsWriter) SetIsMultipleRootProject(isMultipleRootProject bool) *ResultsWriter
- func (rw *ResultsWriter) SetOutputFormat(f format.OutputFormat) *ResultsWriter
- func (rw *ResultsWriter) SetPrintExtendedTable(extendedTable bool) *ResultsWriter
- func (rw *ResultsWriter) SetScanType(scanType services.ScanType) *ResultsWriter
- func (rw *ResultsWriter) SetSimpleJsonError(jsonErrors []formats.SimpleJsonError) *ResultsWriter
- type SarifLevel
- type ScaScanResult
- type TableSeverity
Constants ¶
const ( EntitlementsMinVersion = "3.66.5" ApplicabilityFeatureId = "contextual_analysis" AnalyzerManagerZipName = "analyzerManager.zip" ErrFailedScannerRun = "failed to run %s scan. Exit code received: %s" )
const (
BaseDocumentationURL = "https://docs.jfrog-applications.jfrog.io/jfrog-security-features/"
)
const MissingCveScore = "0"
const (
NpmPackageTypeIdentifier = "npm://"
)
const (
SeverityDefaultValue = "Medium"
)
Variables ¶
var Severities = map[string]map[ApplicabilityStatus]*TableSeverity{ "Critical": { Applicable: {SeverityDetails: formats.SeverityDetails{Severity: "Critical", SeverityNumValue: 15}, /* contains filtered or unexported fields */}, ApplicabilityUndetermined: {SeverityDetails: formats.SeverityDetails{Severity: "Critical", SeverityNumValue: 14}, /* contains filtered or unexported fields */}, NotApplicable: {SeverityDetails: formats.SeverityDetails{Severity: "Critical", SeverityNumValue: 5}, /* contains filtered or unexported fields */}, }, "High": { Applicable: {SeverityDetails: formats.SeverityDetails{Severity: "High", SeverityNumValue: 13}, /* contains filtered or unexported fields */}, ApplicabilityUndetermined: {SeverityDetails: formats.SeverityDetails{Severity: "High", SeverityNumValue: 12}, /* contains filtered or unexported fields */}, NotApplicable: {SeverityDetails: formats.SeverityDetails{Severity: "High", SeverityNumValue: 4}, /* contains filtered or unexported fields */}, }, "Medium": { Applicable: {SeverityDetails: formats.SeverityDetails{Severity: "Medium", SeverityNumValue: 11}, /* contains filtered or unexported fields */}, ApplicabilityUndetermined: {SeverityDetails: formats.SeverityDetails{Severity: "Medium", SeverityNumValue: 10}, /* contains filtered or unexported fields */}, NotApplicable: {SeverityDetails: formats.SeverityDetails{Severity: "Medium", SeverityNumValue: 3}, /* contains filtered or unexported fields */}, }, "Low": { Applicable: {SeverityDetails: formats.SeverityDetails{Severity: "Low", SeverityNumValue: 9}, /* contains filtered or unexported fields */}, ApplicabilityUndetermined: {SeverityDetails: formats.SeverityDetails{Severity: "Low", SeverityNumValue: 8}, /* contains filtered or unexported fields */}, NotApplicable: {SeverityDetails: formats.SeverityDetails{Severity: "Low", SeverityNumValue: 2}, /* contains filtered or unexported fields */}, }, "Unknown": { Applicable: {SeverityDetails: formats.SeverityDetails{Severity: "Unknown", SeverityNumValue: 7}, /* contains filtered or unexported fields */}, ApplicabilityUndetermined: {SeverityDetails: formats.SeverityDetails{Severity: "Unknown", SeverityNumValue: 6}, /* contains filtered or unexported fields */}, NotApplicable: {SeverityDetails: formats.SeverityDetails{Severity: "Unknown", SeverityNumValue: 1}, /* contains filtered or unexported fields */}, }, }
Functions ¶
func AggregateMultipleRunsIntoSingle ¶ added in v2.41.5
func ApplicabilityRuleIdToCve ¶ added in v2.41.6
func CheckIfFailBuild ¶ added in v2.7.0
func CheckIfFailBuild(results []services.ScanResponse) bool
func ConvertSarifReportToString ¶ added in v2.44.0
func ConvertToSarifLevel ¶ added in v2.41.5
func ConvertXrayScanToSimpleJson ¶ added in v2.46.2
func CreateCodeFlow ¶ added in v2.44.0
func CreateCodeFlow(threadFlows ...*sarif.ThreadFlow) *sarif.CodeFlow
func CreateDummyPassingResult ¶ added in v2.44.0
func CreateLocation ¶ added in v2.44.0
func CreateResultWithLocations ¶ added in v2.44.0
func CreateResultWithOneLocation ¶ added in v2.44.0
func CreateRunWithDummyResults ¶ added in v2.44.0
func CreateThreadFlow ¶ added in v2.44.0
func CreateThreadFlow(locations ...*sarif.Location) *sarif.ThreadFlow
func CreateXrayServiceManager ¶ added in v2.41.5
func CreateXrayServiceManager(serviceDetails *config.ServerDetails) (*xray.XrayServicesManager, error)
func CreateXrayServiceManagerAndGetVersion ¶ added in v2.41.5
func CreateXrayServiceManagerAndGetVersion(serviceDetails *config.ServerDetails) (*xray.XrayServicesManager, string, error)
func CveToApplicabilityRuleId ¶ added in v2.41.6
func ExtractRelativePath ¶ added in v2.36.0
func GenereateSarifReportFromResults ¶ added in v2.44.0
func GetAnalyzerManagerDirAbsolutePath ¶ added in v2.34.1
func GetAnalyzerManagerDownloadPath ¶ added in v2.34.1
func GetAnalyzerManagerExecutable ¶ added in v2.41.0
func GetAnalyzerManagerExecutableName ¶ added in v2.34.1
func GetAnalyzerManagerExecutableName() string
func GetAnalyzerManagerVersion ¶ added in v2.41.5
func GetAnalyzerManagerVersion() string
func GetFullLocationFileName ¶ added in v2.44.0
func GetFullLocationFileName(relative string, invocations []*sarif.Invocation) string
func GetInvocationWorkingDirectory ¶ added in v2.41.5
func GetInvocationWorkingDirectory(invocation *sarif.Invocation) string
func GetIssueIdentifier ¶ added in v2.43.0
func GetLocationEndColumn ¶ added in v2.41.5
func GetLocationEndLine ¶ added in v2.41.5
func GetLocationFileName ¶ added in v2.41.5
func GetLocationRelatedCodeFlowsFromResult ¶ added in v2.41.5
func GetLocationSnippet ¶ added in v2.41.5
func GetLocationStartColumn ¶ added in v2.41.5
func GetLocationStartLine ¶ added in v2.41.5
func GetRelativeLocationFileName ¶ added in v2.41.6
func GetRelativeLocationFileName(location *sarif.Location, invocations []*sarif.Invocation) string
func GetResultMsgText ¶ added in v2.41.5
func GetResultSeverity ¶ added in v2.36.0
func GetResultsLocationCount ¶ added in v2.41.5
func GetRuleFullDescription ¶ added in v2.41.5
func GetRuleFullDescription(rule *sarif.ReportingDescriptor) string
func GetRunRules ¶ added in v2.41.5
func GetRunRules(run *sarif.Run) []*sarif.ReportingDescriptor
func GetSeveritiesFormat ¶ added in v2.32.0
func GetUniqueKey ¶ added in v2.40.0
func GetUniqueKey(vulnerableDependency, vulnerableVersion, xrayID string, fixVersionExist bool) string
GetUniqueKey returns a unique string key of format "vulnerableDependency:vulnerableVersion:xrayID:fixVersionExist"
func GetViolatedLicenses ¶ added in v2.46.2
func GetViolatedLicenses(allowedLicenses []string, licenses []formats.LicenseRow) (violatedLicenses []formats.LicenseRow)
func IsApplicableResult ¶ added in v2.41.6
func IsEmptyScanResponse ¶ added in v2.19.0
func IsEmptyScanResponse(results []services.ScanResponse) bool
func NewFailBuildError ¶ added in v2.7.0
func NewFailBuildError() error
func ParseAnalyzerManagerError ¶ added in v2.39.3
func ParseAnalyzerManagerError(scanner JasScanType, err error) error
func PrepareIacs ¶ added in v2.36.0
func PrepareIacs(iacs []*sarif.Run) []formats.SourceCodeRow
Prepare iacs for all non-table formats (without style or emoji)
func PrepareLicenses ¶ added in v2.12.2
func PrepareLicenses(licenses []services.License) ([]formats.LicenseRow, error)
func PrepareSast ¶ added in v2.41.5
func PrepareSast(sasts []*sarif.Run) []formats.SourceCodeRow
func PrepareSecrets ¶ added in v2.36.0
func PrepareSecrets(secrets []*sarif.Run) []formats.SourceCodeRow
Prepare secrets for all non-table formats (without style or emoji)
func PrepareViolations ¶ added in v2.12.2
func PrepareViolations(violations []services.Violation, results *Results, multipleRoots, simplifiedOutput bool) ([]formats.VulnerabilityOrViolationRow, []formats.LicenseRow, []formats.OperationalRiskViolationRow, error)
Prepare violations for all non-table formats (without style or emoji)
func PrepareVulnerabilities ¶ added in v2.12.2
func PrepareVulnerabilities(vulnerabilities []services.Vulnerability, results *Results, multipleRoots, simplifiedOutput bool) ([]formats.VulnerabilityOrViolationRow, error)
Prepare vulnerabilities for all non-table formats (without style or emoji)
func PrintIacTable ¶ added in v2.36.0
func PrintLicensesTable ¶ added in v2.1.0
func PrintLicensesTable(licenses []services.License, printExtended bool, scanType services.ScanType) error
PrintLicensesTable prints the licenses in a table. Set multipleRoots to true in case the given licenses array contains (or may contain) results of several projects or files (like in binary scan). In case multipleRoots is true, the field Component will show the root of each impact path, otherwise it will show the root's child. Set printExtended to true to print fields with 'extended' tag. If the scan argument is set to true, print the scan tables.
func PrintSarif ¶ added in v2.46.2
func PrintSastTable ¶ added in v2.41.5
func PrintSecretsTable ¶ added in v2.36.0
func PrintViolationsTable ¶
func PrintViolationsTable(violations []services.Violation, results *Results, multipleRoots, printExtended bool, scanType services.ScanType) error
PrintViolationsTable prints the violations in 4 tables: security violations, license compliance violations, operational risk violations and ignore rule URLs. Set multipleRoots to true in case the given violations array contains (or may contain) results of several projects or files (like in binary scan). In case multipleRoots is true, the field Component will show the root of each impact path, otherwise it will show the root's child. In case one (or more) of the violations contains the field FailBuild set to true, CliError with exit code 3 will be returned. Set printExtended to true to print fields with 'extended' tag. If the scan argument is set to true, print the scan tables.
func PrintVulnerabilitiesTable ¶
func PrintVulnerabilitiesTable(vulnerabilities []services.Vulnerability, results *Results, multipleRoots, printExtended bool, scanType services.ScanType) error
PrintVulnerabilitiesTable prints the vulnerabilities in a table. Set multipleRoots to true in case the given vulnerabilities array contains (or may contain) results of several projects or files (like in binary scan). In case multipleRoots is true, the field Component will show the root of each impact path, otherwise it will show the root's child. Set printExtended to true to print fields with 'extended' tag. If the scan argument is set to true, print the scan tables.
func ReadScanRunsFromFile ¶ added in v2.41.5
func SetAnalyzerManagerEnvVariables ¶ added in v2.33.0
func SetAnalyzerManagerEnvVariables(serverDetails *config.ServerDetails) error
func SetLocationFileName ¶ added in v2.41.5
func SetLocationSnippet ¶ added in v2.41.5
func SplitComponentId ¶ added in v2.27.0
SplitComponentId splits a Xray component ID to the component name, version and package type. In case componentId doesn't contain a version, the returned version will be an empty string. In case componentId's format is invalid, it will be returned as the component name and empty strings will be returned instead of the version and the package type. Examples:
- componentId: "gav://antparent:ant:1.6.5" Returned values: Component name: "antparent:ant" Component version: "1.6.5" Package type: "Maven"
- componentId: "generic://sha256:244fd47e07d1004f0aed9c156aa09083c82bf8944eceb67c946ff7430510a77b/foo.jar" Returned values: Component name: "foo.jar" Component version: "" Package type: "Generic"
- componentId: "invalid-comp-id" Returned values: Component name: "invalid-comp-id" Component version: "" Package type: ""
func SplitScanResults ¶ added in v2.29.2
func SplitScanResults(results []ScaScanResult) ([]services.Violation, []services.Vulnerability, []services.License)
Splits scan responses into aggregated lists of violations, vulnerabilities and licenses.
Types ¶
type AnalyzerManager ¶ added in v2.33.0
func (*AnalyzerManager) Exec ¶ added in v2.33.0
func (am *AnalyzerManager) Exec(configFile, scanCommand, workingDir string, serverDetails *config.ServerDetails) (err error)
func (*AnalyzerManager) ExecWithOutputFile ¶ added in v2.44.0
func (am *AnalyzerManager) ExecWithOutputFile(configFile, scanCommand, workingDir, outputFile string, serverDetails *config.ServerDetails) (err error)
type ApplicabilityStatus ¶ added in v2.41.5
type ApplicabilityStatus string
const ( Applicable ApplicabilityStatus = "Applicable" NotApplicable ApplicabilityStatus = "Not Applicable" ApplicabilityUndetermined ApplicabilityStatus = "Undetermined" NotScanned ApplicabilityStatus = "" )
func (ApplicabilityStatus) String ¶ added in v2.43.2
func (as ApplicabilityStatus) String() string
type AuditBasicParams ¶ added in v2.41.5
type AuditBasicParams struct {
// contains filtered or unexported fields
}
func (*AuditBasicParams) AppendDependenciesForApplicabilityScan ¶ added in v2.43.0
func (abp *AuditBasicParams) AppendDependenciesForApplicabilityScan(directDependencies []string) *AuditBasicParams
func (*AuditBasicParams) Args ¶ added in v2.41.5
func (abp *AuditBasicParams) Args() []string
func (*AuditBasicParams) DepsRepo ¶ added in v2.41.5
func (abp *AuditBasicParams) DepsRepo() string
func (*AuditBasicParams) DirectDependencies ¶ added in v2.41.5
func (abp *AuditBasicParams) DirectDependencies() []string
func (*AuditBasicParams) ExcludeTestDependencies ¶ added in v2.41.5
func (abp *AuditBasicParams) ExcludeTestDependencies() bool
func (*AuditBasicParams) IgnoreConfigFile ¶ added in v2.41.5
func (abp *AuditBasicParams) IgnoreConfigFile() bool
func (*AuditBasicParams) InsecureTls ¶ added in v2.41.5
func (abp *AuditBasicParams) InsecureTls() bool
func (*AuditBasicParams) InstallCommandArgs ¶ added in v2.46.0
func (abp *AuditBasicParams) InstallCommandArgs() []string
func (*AuditBasicParams) InstallCommandName ¶ added in v2.47.0
func (abp *AuditBasicParams) InstallCommandName() string
func (*AuditBasicParams) IsMavenDepTreeInstalled ¶ added in v2.47.0
func (abp *AuditBasicParams) IsMavenDepTreeInstalled() bool
func (*AuditBasicParams) OutputFormat ¶ added in v2.41.5
func (abp *AuditBasicParams) OutputFormat() format.OutputFormat
func (*AuditBasicParams) PipRequirementsFile ¶ added in v2.41.5
func (abp *AuditBasicParams) PipRequirementsFile() string
func (*AuditBasicParams) Progress ¶ added in v2.41.5
func (abp *AuditBasicParams) Progress() ioUtils.ProgressMgr
func (*AuditBasicParams) ServerDetails ¶ added in v2.41.5
func (abp *AuditBasicParams) ServerDetails() (*config.ServerDetails, error)
func (*AuditBasicParams) SetDepsRepo ¶ added in v2.41.5
func (abp *AuditBasicParams) SetDepsRepo(depsRepo string) *AuditBasicParams
func (*AuditBasicParams) SetExcludeTestDependencies ¶ added in v2.41.5
func (abp *AuditBasicParams) SetExcludeTestDependencies(excludeTestDependencies bool) *AuditBasicParams
func (*AuditBasicParams) SetIgnoreConfigFile ¶ added in v2.41.5
func (abp *AuditBasicParams) SetIgnoreConfigFile(ignoreConfigFile bool) *AuditBasicParams
func (*AuditBasicParams) SetInsecureTls ¶ added in v2.41.5
func (abp *AuditBasicParams) SetInsecureTls(insecureTls bool) *AuditBasicParams
func (*AuditBasicParams) SetInstallCommandArgs ¶ added in v2.46.0
func (abp *AuditBasicParams) SetInstallCommandArgs(installCommandArgs []string) *AuditBasicParams
func (*AuditBasicParams) SetInstallCommandName ¶ added in v2.47.0
func (abp *AuditBasicParams) SetInstallCommandName(installCommandName string) *AuditBasicParams
func (*AuditBasicParams) SetIsMavenDepTreeInstalled ¶ added in v2.47.0
func (abp *AuditBasicParams) SetIsMavenDepTreeInstalled(isMavenDepTreeInstalled bool) *AuditBasicParams
func (*AuditBasicParams) SetNpmScope ¶ added in v2.41.5
func (abp *AuditBasicParams) SetNpmScope(depType string) *AuditBasicParams
func (*AuditBasicParams) SetOutputFormat ¶ added in v2.41.5
func (abp *AuditBasicParams) SetOutputFormat(format format.OutputFormat) *AuditBasicParams
func (*AuditBasicParams) SetPipRequirementsFile ¶ added in v2.41.5
func (abp *AuditBasicParams) SetPipRequirementsFile(requirementsFile string) *AuditBasicParams
func (*AuditBasicParams) SetProgress ¶ added in v2.41.5
func (abp *AuditBasicParams) SetProgress(progress ioUtils.ProgressMgr)
func (*AuditBasicParams) SetServerDetails ¶ added in v2.41.5
func (abp *AuditBasicParams) SetServerDetails(serverDetails *config.ServerDetails) *AuditBasicParams
func (*AuditBasicParams) SetTechnologies ¶ added in v2.41.5
func (abp *AuditBasicParams) SetTechnologies(technologies []string) *AuditBasicParams
func (*AuditBasicParams) SetUseWrapper ¶ added in v2.41.5
func (abp *AuditBasicParams) SetUseWrapper(useWrapper bool) *AuditBasicParams
func (*AuditBasicParams) Technologies ¶ added in v2.41.5
func (abp *AuditBasicParams) Technologies() []string
func (*AuditBasicParams) UseWrapper ¶ added in v2.41.5
func (abp *AuditBasicParams) UseWrapper() bool
type AuditNpmParams ¶ added in v2.44.0
type AuditNpmParams struct { AuditParams // contains filtered or unexported fields }
func (AuditNpmParams) NpmIgnoreNodeModules ¶ added in v2.44.0
func (anp AuditNpmParams) NpmIgnoreNodeModules() bool
func (AuditNpmParams) NpmOverwritePackageLock ¶ added in v2.44.0
func (anp AuditNpmParams) NpmOverwritePackageLock() bool
func (AuditNpmParams) SetNpmIgnoreNodeModules ¶ added in v2.44.0
func (anp AuditNpmParams) SetNpmIgnoreNodeModules(ignoreNpmNodeModules bool) AuditNpmParams
func (AuditNpmParams) SetNpmOverwritePackageLock ¶ added in v2.44.0
func (anp AuditNpmParams) SetNpmOverwritePackageLock(overwritePackageLock bool) AuditNpmParams
type AuditParams ¶ added in v2.44.0
type AuditParams interface { DirectDependencies() []string AppendDependenciesForApplicabilityScan(directDependencies []string) *AuditBasicParams ServerDetails() (*config.ServerDetails, error) SetServerDetails(serverDetails *config.ServerDetails) *AuditBasicParams PipRequirementsFile() string SetPipRequirementsFile(requirementsFile string) *AuditBasicParams ExcludeTestDependencies() bool SetExcludeTestDependencies(excludeTestDependencies bool) *AuditBasicParams UseWrapper() bool SetUseWrapper(useWrapper bool) *AuditBasicParams InsecureTls() bool SetInsecureTls(insecureTls bool) *AuditBasicParams Technologies() []string SetTechnologies(technologies []string) *AuditBasicParams Progress() ioUtils.ProgressMgr SetProgress(progress ioUtils.ProgressMgr) Args() []string InstallCommandName() string InstallCommandArgs() []string SetNpmScope(depType string) *AuditBasicParams OutputFormat() format.OutputFormat DepsRepo() string SetDepsRepo(depsRepo string) *AuditBasicParams IgnoreConfigFile() bool SetIgnoreConfigFile(ignoreConfigFile bool) *AuditBasicParams IsMavenDepTreeInstalled() bool SetIsMavenDepTreeInstalled(isMavenDepTreeInstalled bool) *AuditBasicParams }
type ExtendedScanResults ¶ added in v2.33.0
type ExtendedScanResults struct { ApplicabilityScanResults []*sarif.Run SecretsScanResults []*sarif.Run IacScanResults []*sarif.Run SastScanResults []*sarif.Run EntitledForJas bool }
func (*ExtendedScanResults) IsIssuesFound ¶ added in v2.46.0
func (e *ExtendedScanResults) IsIssuesFound() bool
type JasScanType ¶ added in v2.41.5
type JasScanType string
const ( Applicability JasScanType = "Applicability" Secrets JasScanType = "Secrets" IaC JasScanType = "IaC" Sast JasScanType = "Sast" )
func (JasScanType) FormattedError ¶ added in v2.41.5
func (jst JasScanType) FormattedError(err error) error
func (JasScanType) String ¶ added in v2.43.2
func (jst JasScanType) String() string
type Results ¶ added in v2.46.0
type Results struct { ScaResults []ScaScanResult XrayVersion string ScaError error ExtendedScanResults *ExtendedScanResults JasError error }
func NewAuditResults ¶ added in v2.46.0
func NewAuditResults() *Results
func (*Results) GetScaScannedTechnologies ¶ added in v2.46.0
func (r *Results) GetScaScannedTechnologies() []coreutils.Technology
func (*Results) GetScaScansXrayResults ¶ added in v2.46.0
func (r *Results) GetScaScansXrayResults() (results []services.ScanResponse)
func (*Results) IsIssuesFound ¶ added in v2.46.0
func (*Results) IsMultipleProject ¶ added in v2.46.0
func (*Results) IsScaIssuesFound ¶ added in v2.46.0
type ResultsWriter ¶ added in v2.44.0
type ResultsWriter struct {
// contains filtered or unexported fields
}
func NewResultsWriter ¶ added in v2.44.0
func NewResultsWriter(scanResults *Results) *ResultsWriter
func (*ResultsWriter) PrintScanResults ¶ added in v2.44.0
func (rw *ResultsWriter) PrintScanResults() error
PrintScanResults prints the scan results in the specified format. Note that errors are printed only with SimpleJson format.
func (*ResultsWriter) SetExtraMessages ¶ added in v2.44.0
func (rw *ResultsWriter) SetExtraMessages(messages []string) *ResultsWriter
func (*ResultsWriter) SetIncludeLicenses ¶ added in v2.44.0
func (rw *ResultsWriter) SetIncludeLicenses(licenses bool) *ResultsWriter
func (*ResultsWriter) SetIncludeVulnerabilities ¶ added in v2.44.0
func (rw *ResultsWriter) SetIncludeVulnerabilities(includeVulnerabilities bool) *ResultsWriter
func (*ResultsWriter) SetIsMultipleRootProject ¶ added in v2.44.0
func (rw *ResultsWriter) SetIsMultipleRootProject(isMultipleRootProject bool) *ResultsWriter
func (*ResultsWriter) SetOutputFormat ¶ added in v2.44.0
func (rw *ResultsWriter) SetOutputFormat(f format.OutputFormat) *ResultsWriter
func (*ResultsWriter) SetPrintExtendedTable ¶ added in v2.44.0
func (rw *ResultsWriter) SetPrintExtendedTable(extendedTable bool) *ResultsWriter
func (*ResultsWriter) SetScanType ¶ added in v2.44.0
func (rw *ResultsWriter) SetScanType(scanType services.ScanType) *ResultsWriter
func (*ResultsWriter) SetSimpleJsonError ¶ added in v2.44.0
func (rw *ResultsWriter) SetSimpleJsonError(jsonErrors []formats.SimpleJsonError) *ResultsWriter
type SarifLevel ¶ added in v2.41.5
type SarifLevel string
type ScaScanResult ¶ added in v2.46.0
type ScaScanResult struct { Technology coreutils.Technology `json:"Technology"` WorkingDirectory string `json:"WorkingDirectory"` XrayResults []services.ScanResponse `json:"XrayResults,omitempty"` Descriptors []string `json:"Descriptors,omitempty"` IsMultipleRootProject *bool `json:"IsMultipleRootProject,omitempty"` }
func (ScaScanResult) HasInformation ¶ added in v2.46.0
func (s ScaScanResult) HasInformation() bool
type TableSeverity ¶ added in v2.43.2
type TableSeverity struct { formats.SeverityDetails // contains filtered or unexported fields }
func GetSeverity ¶ added in v2.32.0
func GetSeverity(severityTitle string, applicable ApplicabilityStatus) *TableSeverity
func (*TableSeverity) Emoji ¶ added in v2.43.2
func (s *TableSeverity) Emoji() string
func (*TableSeverity) NumValue ¶ added in v2.43.2
func (s *TableSeverity) NumValue() int