Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enricher ¶
type Enricher struct {
// contains filtered or unexported fields
}
Enricher adds context and metadata to detections.
func NewEnricher ¶
func NewEnricher(cg *core.CallGraph, opts *OutputOptions) *Enricher
NewEnricher creates an enricher with the given callgraph and options.
func (*Enricher) EnrichAll ¶
func (e *Enricher) EnrichAll(detections []dsl.DataflowDetection, rule dsl.RuleIR) ([]*dsl.EnrichedDetection, error)
EnrichAll enriches multiple detections.
func (*Enricher) EnrichDetection ¶
func (e *Enricher) EnrichDetection(detection dsl.DataflowDetection, rule dsl.RuleIR) (*dsl.EnrichedDetection, error)
EnrichDetection transforms a raw detection into an enriched detection.
type OutputFormat ¶
type OutputFormat string
OutputFormat specifies the output format.
const ( FormatText OutputFormat = "text" FormatJSON OutputFormat = "json" FormatCSV OutputFormat = "csv" FormatSARIF OutputFormat = "sarif" )
type OutputOptions ¶
type OutputOptions struct {
Verbosity VerbosityLevel
Format OutputFormat
FailOn []string // Severities to fail on (empty = never fail)
ProjectRoot string // Project root for relative paths
ContextLines int // Lines of context around findings (default 3)
}
OutputOptions configures output behavior.
func NewDefaultOptions ¶
func NewDefaultOptions() *OutputOptions
NewDefaultOptions returns options with sensible defaults.
func (*OutputOptions) ShouldShowDebug ¶
func (o *OutputOptions) ShouldShowDebug() bool
ShouldShowDebug returns true if debug output should be displayed.
func (*OutputOptions) ShouldShowStatistics ¶
func (o *OutputOptions) ShouldShowStatistics() bool
ShouldShowStatistics returns true if statistics should be displayed.
type VerbosityLevel ¶
type VerbosityLevel int
VerbosityLevel controls output detail.
const ( // VerbosityDefault shows clean results only (no progress, no statistics). VerbosityDefault VerbosityLevel = iota // VerbosityVerbose adds statistics and summary info. VerbosityVerbose // VerbosityDebug adds timestamps and diagnostic messages. VerbosityDebug )
Click to show internal directories.
Click to hide internal directories.