Help us shape the future of Go! Take the 2026 Go Developer Survey

scan

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildScanMinVersion                       = "3.37.0"
	BuildScanIncludeVulnerabilitiesMinVersion = "3.40.0"
)
View Source
const (
	BypassArchiveLimitsMinXrayVersion = "3.59.0"
)
View Source
const (
	DockerScanMinXrayVersion = "3.40.0"
)

Variables

This section is empty.

Functions

func ConditionalUploadDefaultScanFunc

func ConditionalUploadDefaultScanFunc(serverDetails *config.ServerDetails, fileSpec *spec.SpecFiles, threads int, scanOutputFormat format.OutputFormat) error

Types

type BuildScanCommand

type BuildScanCommand struct {
	// contains filtered or unexported fields
}

func NewBuildScanCommand

func NewBuildScanCommand() *BuildScanCommand

func (*BuildScanCommand) CommandName

func (bsc *BuildScanCommand) CommandName() string

func (*BuildScanCommand) Run

func (bsc *BuildScanCommand) Run() (err error)

Scan published builds with Xray

func (*BuildScanCommand) ServerDetails

func (bsc *BuildScanCommand) ServerDetails() (*config.ServerDetails, error)

func (*BuildScanCommand) SetBuildConfiguration

func (bsc *BuildScanCommand) SetBuildConfiguration(buildConfiguration *build.BuildConfiguration) *BuildScanCommand

func (*BuildScanCommand) SetFailBuild

func (bsc *BuildScanCommand) SetFailBuild(failBuild bool) *BuildScanCommand

func (*BuildScanCommand) SetIncludeViolations added in v1.28.0

func (bsc *BuildScanCommand) SetIncludeViolations(include bool) *BuildScanCommand

func (*BuildScanCommand) SetIncludeVulnerabilities

func (bsc *BuildScanCommand) SetIncludeVulnerabilities(include bool) *BuildScanCommand

func (*BuildScanCommand) SetOutputFormat

func (bsc *BuildScanCommand) SetOutputFormat(format outputFormat.OutputFormat) *BuildScanCommand

func (*BuildScanCommand) SetPrintExtendedTable

func (bsc *BuildScanCommand) SetPrintExtendedTable(printExtendedTable bool) *BuildScanCommand

func (*BuildScanCommand) SetRescan

func (bsc *BuildScanCommand) SetRescan(rescan bool) *BuildScanCommand

func (*BuildScanCommand) SetServerDetails

func (bsc *BuildScanCommand) SetServerDetails(server *config.ServerDetails) *BuildScanCommand

func (*BuildScanCommand) SetTriggerScanRetries added in v1.22.0

func (bsc *BuildScanCommand) SetTriggerScanRetries(triggerRetries int) *BuildScanCommand

type DockerScanCommand

type DockerScanCommand struct {
	ScanCommand
	// contains filtered or unexported fields
}

func NewDockerScanCommand

func NewDockerScanCommand() *DockerScanCommand

func (*DockerScanCommand) CommandName

func (dsc *DockerScanCommand) CommandName() string

func (*DockerScanCommand) Run

func (dsc *DockerScanCommand) Run() (err error)

func (*DockerScanCommand) SetImageTag

func (dsc *DockerScanCommand) SetImageTag(imageTag string) *DockerScanCommand

type FileContext

type FileContext func(string) parallel.TaskFunc

type ScanCommand

type ScanCommand struct {
	// contains filtered or unexported fields
}

func NewScanCommand

func NewScanCommand() *ScanCommand

func (*ScanCommand) CommandName

func (scanCmd *ScanCommand) CommandName() string

func (*ScanCommand) GenerateBinarySbom added in v1.24.0

func (scanCmd *ScanCommand) GenerateBinarySbom(cmdType utils.CommandType, targetResults *results.TargetResults, includeSbom bool, threadId int) (deprecatedGraph *xrayClientUtils.BinaryGraphNode)

func (*ScanCommand) Run

func (scanCmd *ScanCommand) Run() (err error)

func (*ScanCommand) RunAndRecordResults added in v1.3.0

func (scanCmd *ScanCommand) RunAndRecordResults(cmdType utils.CommandType, recordResFunc func(scanResults *results.SecurityCommandResults) error) (err error)

func (*ScanCommand) RunBinaryJasScans added in v1.20.0

func (scanCmd *ScanCommand) RunBinaryJasScans(cmdType utils.CommandType, msi string, secretValidation bool, targetResults *results.TargetResults, targetCompId string, graphScanResults *services.ScanResponse, jasFileProducerConsumer *utils.SecurityParallelRunner, scanThreadId int) (err error)

func (*ScanCommand) RunBinaryScaScan added in v1.20.0

func (scanCmd *ScanCommand) RunBinaryScaScan(fileTarget string, cmdResults *results.SecurityCommandResults, targetResults *results.TargetResults, deprecatedGraph *xrayClientUtils.BinaryGraphNode, scanThreadId int) (targetCompId string, graphScanResults *services.ScanResponse, err error)

func (*ScanCommand) RunScan added in v1.12.4

func (scanCmd *ScanCommand) RunScan(cmdType utils.CommandType) (cmdResults *results.SecurityCommandResults)

func (*ScanCommand) ServerDetails

func (scanCmd *ScanCommand) ServerDetails() (*config.ServerDetails, error)

func (*ScanCommand) SetBaseRepoPath added in v1.14.0

func (scanCmd *ScanCommand) SetBaseRepoPath(artifactoryRepoPath string) *ScanCommand

func (*ScanCommand) SetBomGenerator added in v1.20.0

func (scanCmd *ScanCommand) SetBomGenerator(bomGenerator bom.SbomGenerator) *ScanCommand

func (*ScanCommand) SetBypassArchiveLimits

func (scanCmd *ScanCommand) SetBypassArchiveLimits(bypassArchiveLimits bool) *ScanCommand

func (*ScanCommand) SetCustomAnalyzerManagerPath added in v1.26.4

func (scanCmd *ScanCommand) SetCustomAnalyzerManagerPath(customPath string) *ScanCommand

func (*ScanCommand) SetFail

func (scanCmd *ScanCommand) SetFail(fail bool) *ScanCommand

func (*ScanCommand) SetFixableOnly

func (scanCmd *ScanCommand) SetFixableOnly(fixable bool) *ScanCommand

func (*ScanCommand) SetIncludeLicenses

func (scanCmd *ScanCommand) SetIncludeLicenses(include bool) *ScanCommand

func (*ScanCommand) SetIncludeSbom added in v1.16.0

func (scanCmd *ScanCommand) SetIncludeSbom(include bool) *ScanCommand

func (*ScanCommand) SetIncludeVulnerabilities

func (scanCmd *ScanCommand) SetIncludeVulnerabilities(include bool) *ScanCommand

func (*ScanCommand) SetMinSeverityFilter

func (scanCmd *ScanCommand) SetMinSeverityFilter(minSeverityFilter severityutils.Severity) *ScanCommand

func (*ScanCommand) SetOutputDir added in v1.26.1

func (scanCmd *ScanCommand) SetOutputDir(outputDir string) *ScanCommand

func (*ScanCommand) SetOutputFormat

func (scanCmd *ScanCommand) SetOutputFormat(format format.OutputFormat) *ScanCommand

func (*ScanCommand) SetPrintExtendedTable

func (scanCmd *ScanCommand) SetPrintExtendedTable(printExtendedTable bool) *ScanCommand

func (*ScanCommand) SetProgress

func (scanCmd *ScanCommand) SetProgress(progress ioUtils.ProgressMgr)

func (*ScanCommand) SetProject

func (scanCmd *ScanCommand) SetProject(project string) *ScanCommand

func (*ScanCommand) SetScaScanStrategy added in v1.20.0

func (scanCmd *ScanCommand) SetScaScanStrategy(scanStrategy scan.SbomScanStrategy) *ScanCommand

func (*ScanCommand) SetScansToPerform added in v1.24.0

func (scanCmd *ScanCommand) SetScansToPerform(scansToPerform []utils.SubScanType) *ScanCommand

func (*ScanCommand) SetSecretValidation added in v1.10.0

func (scanCmd *ScanCommand) SetSecretValidation(validateSecrets bool) *ScanCommand

func (*ScanCommand) SetServerDetails

func (scanCmd *ScanCommand) SetServerDetails(server *config.ServerDetails) *ScanCommand

func (*ScanCommand) SetSpec

func (scanCmd *ScanCommand) SetSpec(spec *spec.SpecFiles) *ScanCommand

func (*ScanCommand) SetTargetNameOverride added in v1.12.0

func (scanCmd *ScanCommand) SetTargetNameOverride(targetName string) *ScanCommand

func (*ScanCommand) SetThreads

func (scanCmd *ScanCommand) SetThreads(threads int) *ScanCommand

func (*ScanCommand) SetWatches

func (scanCmd *ScanCommand) SetWatches(watches []string) *ScanCommand

func (*ScanCommand) SetXrayVersion added in v1.13.2

func (scanCmd *ScanCommand) SetXrayVersion(xrayVersion string) *ScanCommand

func (*ScanCommand) SetXscVersion added in v1.13.2

func (scanCmd *ScanCommand) SetXscVersion(xscVersion string) *ScanCommand

Jump to

Keyboard shortcuts

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