audit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Associates a technology with another of a different type in the structure. Docker is not present, as there is no docker-config command and, consequently, no docker.yaml file we need to operate on.

Functions

func RunAudit

func RunAudit(auditParams *AuditParams) (results *xrayutils.Results, err error)

Runs an audit scan based on the provided auditParams. Returns an audit Results object containing all the scan results. If the current server is entitled for JAS, the advanced security results will be included in the scan results.

func SetResolutionRepoIfExists

func SetResolutionRepoIfExists(params xrayutils.AuditParams, tech coreutils.Technology) (err error)

Verifies the existence of depsRepo. If it doesn't exist, it searches for a configuration file based on the technology type. If found, it assigns depsRepo in the AuditParams.

Types

type AuditCommand

type AuditCommand struct {
	IncludeVulnerabilities bool
	IncludeLicenses        bool
	Fail                   bool
	PrintExtendedTable     bool

	AuditParams
	// contains filtered or unexported fields
}

func NewGenericAuditCommand

func NewGenericAuditCommand() *AuditCommand

func (*AuditCommand) CommandName

func (auditCmd *AuditCommand) CommandName() string

func (*AuditCommand) CreateXrayGraphScanParams

func (auditCmd *AuditCommand) CreateXrayGraphScanParams() *services.XrayGraphScanParams

func (*AuditCommand) Run

func (auditCmd *AuditCommand) Run() (err error)

func (*AuditCommand) SetAnalyticsMetricsService added in v1.1.0

func (auditCmd *AuditCommand) SetAnalyticsMetricsService(analyticsMetricsService *xrayutils.AnalyticsMetricsService) *AuditCommand

func (*AuditCommand) SetFail

func (auditCmd *AuditCommand) SetFail(fail bool) *AuditCommand

func (*AuditCommand) SetIncludeLicenses

func (auditCmd *AuditCommand) SetIncludeLicenses(include bool) *AuditCommand

func (*AuditCommand) SetIncludeVulnerabilities

func (auditCmd *AuditCommand) SetIncludeVulnerabilities(include bool) *AuditCommand

func (*AuditCommand) SetPrintExtendedTable

func (auditCmd *AuditCommand) SetPrintExtendedTable(printExtendedTable bool) *AuditCommand

func (*AuditCommand) SetProject

func (auditCmd *AuditCommand) SetProject(project string) *AuditCommand

func (*AuditCommand) SetTargetRepoPath

func (auditCmd *AuditCommand) SetTargetRepoPath(repoPath string) *AuditCommand

func (*AuditCommand) SetWatches

func (auditCmd *AuditCommand) SetWatches(watches []string) *AuditCommand

type AuditParams

type AuditParams struct {
	*xrayutils.AuditBasicParams
	// contains filtered or unexported fields
}

func NewAuditParams

func NewAuditParams() *AuditParams

func (*AuditParams) FixableOnly

func (params *AuditParams) FixableOnly() bool

func (*AuditParams) InstallFunc

func (params *AuditParams) InstallFunc() func(tech string) error

func (*AuditParams) MinSeverityFilter

func (params *AuditParams) MinSeverityFilter() string

func (*AuditParams) SetDepsRepo

func (params *AuditParams) SetDepsRepo(depsRepo string) *AuditParams

func (*AuditParams) SetFixableOnly

func (params *AuditParams) SetFixableOnly(fixable bool) *AuditParams

func (*AuditParams) SetGraphBasicParams

func (params *AuditParams) SetGraphBasicParams(gbp *xrayutils.AuditBasicParams) *AuditParams

func (*AuditParams) SetInstallFunc

func (params *AuditParams) SetInstallFunc(installFunc func(tech string) error) *AuditParams

func (*AuditParams) SetMinSeverityFilter

func (params *AuditParams) SetMinSeverityFilter(minSeverityFilter string) *AuditParams

func (*AuditParams) SetThirdPartyApplicabilityScan

func (params *AuditParams) SetThirdPartyApplicabilityScan(includeThirdPartyDeps bool) *AuditParams

func (*AuditParams) SetWorkingDirs

func (params *AuditParams) SetWorkingDirs(workingDirs []string) *AuditParams

func (*AuditParams) SetXrayGraphScanParams

func (params *AuditParams) SetXrayGraphScanParams(xrayGraphScanParams *services.XrayGraphScanParams) *AuditParams

func (*AuditParams) WorkingDirs

func (params *AuditParams) WorkingDirs() []string

func (*AuditParams) XrayGraphScanParams

func (params *AuditParams) XrayGraphScanParams() *services.XrayGraphScanParams

func (*AuditParams) XrayVersion

func (params *AuditParams) XrayVersion() string

type DependencyTreeResult added in v1.1.0

type DependencyTreeResult struct {
	FlatTree     *xrayCmdUtils.GraphNode
	FullDepTrees []*xrayCmdUtils.GraphNode
	DownloadUrls map[string]string
}

func GetTechDependencyTree

func GetTechDependencyTree(params xrayutils.AuditParams, tech coreutils.Technology) (depTreeResult DependencyTreeResult, err error)

Directories

Path Synopsis
jas
iac
sca
go
npm

Jump to

Keyboard shortcuts

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