Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cli/docs/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const (
IncludeCachedPackages = "include-cached-packages"
LegacyPeerDeps = "legacy-peer-deps"
RunNative = "run-native"
MvnIncludePluginDeps = "mvn-include-plugin-deps"

// Unique git flags
gitPrefix = "git-"
Expand Down Expand Up @@ -227,7 +228,7 @@ var commandFlags = map[string][]string{
StaticSca, XrayLibPluginBinaryCustomPath, AnalyzerManagerCustomPath, AddSastRules,
},
CurationAudit: {
CurationOutput, WorkingDirs, Threads, RequirementsFile, InsecureTls, useWrapperAudit, UseIncludedBuilds, SolutionPath, DockerImageName, IncludeCachedPackages, LegacyPeerDeps, RunNative,
CurationOutput, WorkingDirs, Threads, RequirementsFile, InsecureTls, useWrapperAudit, UseIncludedBuilds, SolutionPath, DockerImageName, IncludeCachedPackages, MvnIncludePluginDeps, LegacyPeerDeps, RunNative,
},
GitCountContributors: {
InputFile, ScmType, ScmApiUrl, Token, Owner, RepoName, Months, DetailedSummary, InsecureTls, GitThreads, CacheValidity,
Expand Down Expand Up @@ -350,6 +351,7 @@ var flagsMap = map[string]components.Flag{
CurationOutput: components.NewStringFlag(OutputFormat, "Defines the output format of the command. Acceptable values are: table, json.", components.WithStrDefaultValue("table")),
SolutionPath: components.NewStringFlag(SolutionPath, "Path to the .NET solution file (.sln) to use when multiple solution files are present in the directory."),
IncludeCachedPackages: components.NewBoolFlag(IncludeCachedPackages, "When set to true, the system will audit cached packages. This configuration is mandatory for Curation on-demand workflows, which rely on package caching."),
MvnIncludePluginDeps: components.NewBoolFlag(MvnIncludePluginDeps, "[Maven] When set to true, Maven build-plugin transitive dependencies are included in the curation evaluation. Requires two additional Maven invocations (help:effective-pom, dependency:resolve-plugins) which may slow down the scan. By default only project dependencies are scanned."),
LegacyPeerDeps: components.NewBoolFlag(LegacyPeerDeps, "[npm] Pass --legacy-peer-deps to npm install to bypass peer-dependency version conflicts."),
RunNative: components.NewBoolFlag(RunNative, "[npm] Use the native npm client for dependency resolution. Reads Artifactory URL and repository from the project's .npmrc registry — no 'jf npm-config' required. Respects .npmrc and Volta configuration."),
binarySca: components.NewBoolFlag(Sca, fmt.Sprintf("Selective scanners mode: Execute SCA (Software Composition Analysis) sub-scan. Use --%s to run both SCA and Contextual Analysis. Use --%s --%s to to run SCA. Can be combined with --%s.", Sca, Sca, WithoutCA, Secrets)),
Expand Down
1 change: 1 addition & 0 deletions cli/scancommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ func getCurationCommand(c *components.Context) (*curation.CurationAuditCommand,
SetSolutionFilePath(c.GetStringFlagValue(flags.SolutionPath))
curationAuditCommand.SetDockerImageName(c.GetStringFlagValue(flags.DockerImageName))
curationAuditCommand.SetIncludeCachedPackages(c.GetBoolFlagValue(flags.IncludeCachedPackages))
curationAuditCommand.SetMvnIncludePluginDeps(c.GetBoolFlagValue(flags.MvnIncludePluginDeps))
curationAuditCommand.SetLegacyPeerDeps(c.GetBoolFlagValue(flags.LegacyPeerDeps))
curationAuditCommand.SetRunNative(c.GetBoolFlagValue(flags.RunNative))
return curationAuditCommand, nil
Expand Down
9 changes: 8 additions & 1 deletion commands/curation/curationaudit.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ type CurationAuditCommand struct {
parallelRequests int
dockerImageName string
includeCachedPackages bool
mvnIncludePluginDeps bool
audit.AuditParamsInterface
}

Expand Down Expand Up @@ -283,6 +284,11 @@ func (ca *CurationAuditCommand) SetIncludeCachedPackages(includeCachedPackages b
return ca
}

func (ca *CurationAuditCommand) SetMvnIncludePluginDeps(mvnIncludePluginDeps bool) *CurationAuditCommand {
ca.mvnIncludePluginDeps = mvnIncludePluginDeps
return ca
}

func (ca *CurationAuditCommand) Run() (err error) {
rootDir, err := os.Getwd()
if err != nil {
Expand Down Expand Up @@ -451,7 +457,8 @@ func (ca *CurationAuditCommand) getBuildInfoParamsByTech() (technologies.BuildIn
Args: ca.Args(),
InstallCommandArgs: ca.InstallCommandArgs(),
// Curation params
IsCurationCmd: true,
IsCurationCmd: true,
MvnIncludePluginDeps: ca.mvnIncludePluginDeps,
// Java params
IsMavenDepTreeInstalled: true,
UseWrapper: ca.UseWrapper(),
Expand Down
1 change: 1 addition & 0 deletions sca/bom/buildinfo/buildinfobom.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func GetTechDependencyTree(params technologies.BuildInfoBomGeneratorParams, arti
IsMavenDepTreeInstalled: params.IsMavenDepTreeInstalled,
UseWrapper: params.UseWrapper,
IsCurationCmd: params.IsCurationCmd,
MvnIncludePluginDeps: params.MvnIncludePluginDeps,
CurationCacheFolder: curationCacheFolder,
UseIncludedBuilds: params.UseIncludedBuilds,
}, tech)
Expand Down
3 changes: 2 additions & 1 deletion sca/bom/buildinfo/technologies/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ type BuildInfoBomGeneratorParams struct {
Args []string
InstallCommandArgs []string
// Curation params
IsCurationCmd bool
IsCurationCmd bool
MvnIncludePluginDeps bool
// Java params
IsMavenDepTreeInstalled bool
UseWrapper bool
Expand Down
1 change: 1 addition & 0 deletions sca/bom/buildinfo/technologies/java/deptreemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type DepTreeParams struct {
DepsRepo string
IsMavenDepTreeInstalled bool
IsCurationCmd bool
MvnIncludePluginDeps bool
CurationCacheFolder string
UseIncludedBuilds bool
}
Expand Down
Loading
Loading