Documentation
¶
Index ¶
- type CommaSeparatedString
- type GlobalOptions
- type GradleOptions
- type PluginResult
- type PythonOptions
- type ResolverMetadata
- type SCAPlugin
- type SCAPluginOptions
- func (o *SCAPluginOptions) WithAllProjects(allProjects bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithAllowOutOfSync(allowOutOfSync bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithExclude(exclude []string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithExcludePaths(excludePaths []string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithFailFast(failFast bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithForceIncludeWorkspacePackages(forceIncludeWorkspacePackages bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithForceSingleGraph(forceSingleGraph bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithGradleAllSubProjects(all bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithGradleConfigurationMatching(pattern string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithGradleInitScript(initScript string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithGradleSkipWrapper(skipWrapper bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithGradleSubProject(subProject string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithIncludeDev(includeDev bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithNoBuildIsolation(noBuildIsolation bool) *SCAPluginOptions
- func (o *SCAPluginOptions) WithProjectName(projectName string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithRawFlags(rawflags string) *SCAPluginOptions
- func (o *SCAPluginOptions) WithTargetFile(targetFile string) *SCAPluginOptions
- type SCAResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommaSeparatedString ¶ added in v0.22.0
type CommaSeparatedString []string
CommaSeparatedString is a custom type that parses comma-separated values.
func (*CommaSeparatedString) UnmarshalText ¶ added in v0.22.0
func (c *CommaSeparatedString) UnmarshalText(text []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
type GlobalOptions ¶
type GlobalOptions struct {
TargetFile *string `arg:"--target-file"`
AllProjects bool `arg:"--all-projects"`
IncludeDev bool `arg:"--dev,-d"`
Exclude CommaSeparatedString `arg:"--exclude"`
ExcludePaths CommaSeparatedString `arg:"--exclude-paths"`
FailFast bool `arg:"--fail-fast"`
AllowOutOfSync bool // Derived from --strict-out-of-sync (inverted); parsed in NewPluginOptionsFromRawFlags.
ForceSingleGraph bool `arg:"--force-single-graph"`
ForceIncludeWorkspacePackages bool `arg:"--internal-uv-workspace-packages"`
ProjectName *string `arg:"--project-name"`
RawFlags []string
}
GlobalOptions contains options that apply globally across all SCA plugins.
type GradleOptions ¶ added in v1.9.0
type GradleOptions struct {
// ConfigurationMatching is a regex to select only matching Gradle configurations.
ConfigurationMatching string `arg:"--configuration-matching"`
// SubProject restricts scanning to a single named Gradle sub-project.
SubProject string `arg:"--gradle-sub-project"`
// AllSubProjects scans all sub-projects in a multi-project build.
AllSubProjects bool `arg:"--all-sub-projects"`
// InitScript overrides the built-in init script with a user-supplied path.
InitScript string `arg:"--init-script"`
// SkipWrapper bypasses gradlew discovery and forces use of the gradle command.
SkipWrapper bool `arg:"--gradle-skip-wrapper"`
}
GradleOptions contains Gradle-specific options for dependency graph generation.
type PluginResult ¶ added in v0.32.1
type PythonOptions ¶
type PythonOptions struct {
NoBuildIsolation bool `arg:"--no-build-isolation"`
}
PythonOptions contains Python-specific options for dependency graph generation.
type ResolverMetadata ¶ added in v1.9.1
type SCAPlugin ¶
type SCAPlugin interface {
BuildDepGraphsFromDir(ctx context.Context, log logger.Logger, dir string, options *SCAPluginOptions) (*PluginResult, error)
GetName() string
}
SCAPlugin defines the interface for SCA plugins that build dependency graphs from a directory containing project files.
type SCAPluginOptions ¶
type SCAPluginOptions struct {
Global GlobalOptions
Python PythonOptions
Gradle GradleOptions
}
SCAPluginOptions contains configuration options for SCA plugins, including global settings and language-specific options.
func NewPluginOptions ¶
func NewPluginOptions() *SCAPluginOptions
func NewPluginOptionsFromRawFlags ¶ added in v0.19.0
func NewPluginOptionsFromRawFlags(rawFlags []string) (*SCAPluginOptions, error)
func (*SCAPluginOptions) WithAllProjects ¶ added in v0.3.0
func (o *SCAPluginOptions) WithAllProjects(allProjects bool) *SCAPluginOptions
func (*SCAPluginOptions) WithAllowOutOfSync ¶ added in v0.32.3
func (o *SCAPluginOptions) WithAllowOutOfSync(allowOutOfSync bool) *SCAPluginOptions
func (*SCAPluginOptions) WithExclude ¶ added in v0.22.0
func (o *SCAPluginOptions) WithExclude(exclude []string) *SCAPluginOptions
func (*SCAPluginOptions) WithExcludePaths ¶ added in v1.15.0
func (o *SCAPluginOptions) WithExcludePaths(excludePaths []string) *SCAPluginOptions
func (*SCAPluginOptions) WithFailFast ¶ added in v0.32.3
func (o *SCAPluginOptions) WithFailFast(failFast bool) *SCAPluginOptions
func (*SCAPluginOptions) WithForceIncludeWorkspacePackages ¶ added in v0.32.3
func (o *SCAPluginOptions) WithForceIncludeWorkspacePackages(forceIncludeWorkspacePackages bool) *SCAPluginOptions
func (*SCAPluginOptions) WithForceSingleGraph ¶ added in v0.32.3
func (o *SCAPluginOptions) WithForceSingleGraph(forceSingleGraph bool) *SCAPluginOptions
func (*SCAPluginOptions) WithGradleAllSubProjects ¶ added in v1.9.0
func (o *SCAPluginOptions) WithGradleAllSubProjects(all bool) *SCAPluginOptions
func (*SCAPluginOptions) WithGradleConfigurationMatching ¶ added in v1.9.0
func (o *SCAPluginOptions) WithGradleConfigurationMatching(pattern string) *SCAPluginOptions
func (*SCAPluginOptions) WithGradleInitScript ¶ added in v1.9.0
func (o *SCAPluginOptions) WithGradleInitScript(initScript string) *SCAPluginOptions
func (*SCAPluginOptions) WithGradleSkipWrapper ¶ added in v1.9.0
func (o *SCAPluginOptions) WithGradleSkipWrapper(skipWrapper bool) *SCAPluginOptions
func (*SCAPluginOptions) WithGradleSubProject ¶ added in v1.9.0
func (o *SCAPluginOptions) WithGradleSubProject(subProject string) *SCAPluginOptions
func (*SCAPluginOptions) WithIncludeDev ¶ added in v0.17.3
func (o *SCAPluginOptions) WithIncludeDev(includeDev bool) *SCAPluginOptions
func (*SCAPluginOptions) WithNoBuildIsolation ¶ added in v0.13.0
func (o *SCAPluginOptions) WithNoBuildIsolation(noBuildIsolation bool) *SCAPluginOptions
func (*SCAPluginOptions) WithProjectName ¶ added in v1.3.0
func (o *SCAPluginOptions) WithProjectName(projectName string) *SCAPluginOptions
func (*SCAPluginOptions) WithRawFlags ¶ added in v0.18.0
func (o *SCAPluginOptions) WithRawFlags(rawflags string) *SCAPluginOptions
func (*SCAPluginOptions) WithTargetFile ¶
func (o *SCAPluginOptions) WithTargetFile(targetFile string) *SCAPluginOptions
type SCAResult ¶
type SCAResult struct {
DepGraph *depgraph.DepGraph `json:"depGraph,omitempty"`
ProjectDescriptor identity.ProjectDescriptor `json:"projectDescriptor"`
ResolverMetadata *ResolverMetadata `json:"meta,omitempty"`
Error error `json:"error,omitempty"`
}
SCAResult represents the result of a Software Composition Analysis (SCA), containing the dependency graph and associated project descriptor.