Documentation
¶
Index ¶
- Constants
- Variables
- func CreateTestWorkspace(t *testing.T, sourceDir string) (string, func())
- func GetMsgToUserForCurationBlock(isCurationCmd bool, tech techutils.Technology, cmdOutput string) (msgToUser string)
- func GetScaExcludePattern(configProfile *xscservices.ConfigProfile, isRecursive bool, ...) string
- func LogExecutableVersion(executable string)
- func RunXrayDependenciesTreeScanGraph(scanGraphParams *scangraph.ScanGraphParams) (results []services.ScanResponse, err error)
- type BuildInfoBomGeneratorParams
Constants ¶
View Source
const (
// Visual Studio inner directory.
DotVsRepoSuffix = ".vs"
)
Variables ¶
View Source
var CurationErrorMsgToUserTemplate = "Failed to retrieve the dependencies tree for the %s project. Please contact your " +
"Artifactory administrator to verify pass-through for Curation audit is enabled for your project"
Functions ¶
func CreateTestWorkspace ¶
func GetMsgToUserForCurationBlock ¶
func GetMsgToUserForCurationBlock(isCurationCmd bool, tech techutils.Technology, cmdOutput string) (msgToUser string)
func GetScaExcludePattern ¶ added in v1.29.3
func GetScaExcludePattern(configProfile *xscservices.ConfigProfile, isRecursive bool, exclusions ...string) string
func LogExecutableVersion ¶
func LogExecutableVersion(executable string)
GetExecutableVersion gets an executable version and prints to the debug log if possible. Only supported for package managers that use "--version".
func RunXrayDependenciesTreeScanGraph ¶
func RunXrayDependenciesTreeScanGraph(scanGraphParams *scangraph.ScanGraphParams) (results []services.ScanResponse, err error)
Types ¶
type BuildInfoBomGeneratorParams ¶
type BuildInfoBomGeneratorParams struct {
XrayVersion string
Progress ioUtils.ProgressMgr
ExclusionPattern string
AllowPartialResults bool
// Artifactory Repository params
ServerDetails *config.ServerDetails
DependenciesRepository string
IgnoreConfigFile bool
InsecureTls bool
// Install params
SkipAutoInstall bool
InstallCommandName string
Args []string
InstallCommandArgs []string
// Curation params
IsCurationCmd bool
MvnIncludePluginDeps bool
ParallelRequests int
// OutputFormat is the --format flag value forwarded from the curation command.
// The zero value is treated as outFormat.Table by all renderers.
// Set by curation commands only; generic audit/scan commands leave this unset.
OutputFormat outFormat.OutputFormat
// Java params
IsMavenDepTreeInstalled bool
UseWrapper bool
UseIncludedBuilds bool
GradleExcludeTestDependencies bool
// Python params
PipRequirementsFile string
// Npm params
NpmIgnoreNodeModules bool
NpmOverwritePackageLock bool
NpmRunNative bool
NpmLegacyPeerDeps bool
// NpmForceLogsMax, when non-empty, is appended as --logs-max <value> to the install command.
// Leave empty unless ambient logs-max is known to be 0 — never override a nonzero setting.
NpmForceLogsMax string
// Yarn params
// YarnOverwriteYarnLock refreshes yarn.lock when older than package.json (mirrors NpmOverwritePackageLock).
// Curation sets this to true; audit/scan leave it false to trust the existing lockfile.
YarnOverwriteYarnLock bool
// Pnpm params
MaxTreeDepth string
// Docker params
DockerImageName string
// Hugging Face params
// HuggingFaceModel is the model/dataset reference to audit, e.g. "mcpotato/42-eicar-street:main".
// Set by the curation command's --hugging-face-model flag.
// When empty, BuildDependencyTree auto-discovers references from HFWorkingDirectory.
HuggingFaceModel string
// HFWorkingDirectory is the project root used for Hugging Face auto-discovery.
// Defaults to "." when empty.
HFWorkingDirectory string
// HFProjectName overrides the HF root-node name (falls back to the working
// directory basename when empty). Set by the curation command to a collision-free
// name when auditing multiple --working-dirs entries that share a basename.
HFProjectName string
// NuGet params
SolutionFilePath string
// Uv params
ScriptPath string
}
func (*BuildInfoBomGeneratorParams) SetConanProfile ¶
func (bbp *BuildInfoBomGeneratorParams) SetConanProfile(file string) *BuildInfoBomGeneratorParams
func (*BuildInfoBomGeneratorParams) SetNpmScope ¶
func (bbp *BuildInfoBomGeneratorParams) SetNpmScope(depType string) *BuildInfoBomGeneratorParams
Click to show internal directories.
Click to hide internal directories.