Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Targets []string `yaml:"targets" json:"targets"`
EnableSAST bool `yaml:"enable_sast" json:"enable_sast"`
EnableSCA bool `yaml:"enable_sca" json:"enable_sca"`
EnableSecrets bool `yaml:"enable_secrets" json:"enable_secrets"`
Workers int `yaml:"workers" json:"workers"`
MaxFileSize int64 `yaml:"max_file_size" json:"max_file_size"`
OutputFormat string `yaml:"output_format" json:"output_format"`
OutputFile string `yaml:"output_file" json:"output_file"`
MinSeverity Severity `yaml:"min_severity" json:"min_severity"`
ExcludePaths []string `yaml:"exclude_paths" json:"exclude_paths"`
IncludeRuleIDs []string `yaml:"include_rule_ids" json:"include_rule_ids"`
ExcludeRuleIDs []string `yaml:"exclude_rule_ids" json:"exclude_rule_ids"`
SecretsRulesDir string `yaml:"secrets_rules_dir" json:"secrets_rules_dir"`
DisableRedaction bool `yaml:"disable_redaction" json:"disable_redaction"`
ValidateSecrets bool `yaml:"validate_secrets" json:"validate_secrets"`
Offline bool `yaml:"offline" json:"offline"`
Languages []string `yaml:"languages" json:"languages"`
AIModel string `yaml:"ai_model" json:"ai_model"`
AIFilterSecrets bool `yaml:"ai_filter_secrets" json:"ai_filter_secrets"`
AISCAReachability bool `yaml:"ai_sca_reachability" json:"ai_sca_reachability"`
BaselineFile string `yaml:"baseline_file" json:"baseline_file"`
Quiet bool `yaml:"quiet" json:"quiet"`
}
type Finding ¶
type Finding struct {
ID string `json:"id"`
Type ScanType `json:"type"`
RuleID string `json:"rule_id"`
RuleName string `json:"rule_name"`
Severity Severity `json:"severity"`
Confidence string `json:"confidence,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
FilePath string `json:"file_path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
Snippet string `json:"snippet,omitempty"`
PackageName string `json:"package_name,omitempty"`
PackageVersion string `json:"package_version,omitempty"`
Ecosystem string `json:"ecosystem,omitempty"`
FixedVersion string `json:"fixed_version,omitempty"`
CVE string `json:"cve,omitempty"`
CVSSScore float64 `json:"cvss_score,omitempty"`
Advisory string `json:"advisory_url,omitempty"`
Redacted string `json:"redacted,omitempty"`
Entropy float64 `json:"entropy,omitempty"`
CWE []string `json:"cwe,omitempty"`
References []string `json:"references,omitempty"`
Tags []string `json:"tags,omitempty"`
Fingerprint string `json:"fingerprint"`
Timestamp time.Time `json:"timestamp"`
}
func (*Finding) ComputeFingerprint ¶
func (f *Finding) ComputeFingerprint()
ComputeFingerprint sets a deduplication hash. Changes when file path or line changes.
type ScanMetrics ¶
type ScanResult ¶
type ScanResult struct {
Findings []Finding `json:"findings"`
Metrics ScanMetrics `json:"metrics"`
Duration time.Duration `json:"duration_ms"`
ScanTypes []ScanType `json:"scan_types"`
}
Click to show internal directories.
Click to hide internal directories.