Documentation
¶
Overview ¶
Package config provides shared configuration types and validation helpers for pipeleek. This package centralizes common configuration patterns across all platform scanners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMaxArtifactSize ¶
ParseMaxArtifactSize parses a human-readable size string (e.g., "500MB", "1GB") into bytes.
func ValidateThreadCount ¶
ValidateThreadCount validates that the thread count is within acceptable bounds.
func ValidateToken ¶
ValidateToken validates that a token is not empty.
func ValidateURL ¶
ValidateURL validates that a string is a valid URL.
Types ¶
type CommonScanOptions ¶
type CommonScanOptions struct {
// ConfidenceFilter filters results by confidence level
ConfidenceFilter []string
// MaxScanGoRoutines controls the number of concurrent scanning threads
MaxScanGoRoutines int
// TruffleHogVerification enables/disables TruffleHog credential verification
TruffleHogVerification bool
// Artifacts enables/disables artifact scanning
Artifacts bool
// MaxArtifactSize is the maximum size of artifacts to scan (in bytes)
MaxArtifactSize int64
// Owned filters to only owned repositories
Owned bool
// HitTimeout is the maximum time to wait for hit detection per scan item
HitTimeout time.Duration
}
CommonScanOptions contains configuration fields that are shared across all platform scanners. This helps reduce duplication and ensures consistency in option handling.
func DefaultCommonScanOptions ¶
func DefaultCommonScanOptions() CommonScanOptions
DefaultCommonScanOptions returns sensible default values for common scan options.