Versions in this module Expand all Collapse all v0 v0.5.0 May 11, 2026 v0.4.0 May 5, 2026 v0.2.0 May 3, 2026 v0.1.2 Jul 4, 2026 Changes in this version + type SymbolResult struct + Body string + EndLine int + File string + Kind string + StartLine int + Symbol string + func GetSymbolBody(filePath, fqn string) (SymbolResult, error) + func SearchBySymbol(filePath, nameFragment, kind string) ([]SymbolResult, error) v0.1.1 Jun 25, 2026 Changes in this version + var Version = strings.TrimSpace(versionFile) + func BuildFusedPrompt(basePrompt string, sastFindings []Finding) string + func CalculateLLMConfidence(responseJSON string, finding Finding) float64 + func CalculateStaticConfidence(finding Finding, rule StaticRule) float64 + func CalculateTaintConfidence(source, sink string, sanitizers []string) float64 + func ComputeConfidenceStats(findings []Finding) (avg float64, highCount, lowCount int) + func DetectLanguage(path string) string + func FilterFindings(ctx context.Context, provider Provider, findings []Finding, ...) ([]Finding, []FilterResult, error) + func GenerateSARIF(findings []Finding, version string) string + func SecurityConcerns() []string + func ToContractFinding(f Finding) reviewcontracts.Finding + func ToContractFindings(findings []Finding) []reviewcontracts.Finding + func ToContractInlineComment(c InlineComment) reviewcontracts.InlineComment + func ToContractInlineComments(comments []InlineComment) []reviewcontracts.InlineComment + func ToContractResult(r *Result) *reviewcontracts.Result + type AutoFix struct + func NewAutoFix(provider Provider) *AutoFix + func (af *AutoFix) SuggestFixes(ctx context.Context, findings []Finding, diff string) ([]FixSuggestion, error) + type ConcernSpec struct + Enabled bool + MinConfidence float64 + SystemPrompt string + Type ConcernType + func DefaultConcerns() []ConcernSpec + func RouteConcerns(diff string, allConcerns []ConcernSpec) []ConcernSpec + type ConcernType string + const ConcernCorrectness + const ConcernMaintainability + const ConcernPerformance + const ConcernSecurity + const ConcernStyle + const ConcernTestCoverage + type ConfidenceBreakdown struct + High []Finding + Low []Finding + Medium []Finding + func BuildConfidenceBreakdown(findings []Finding) *ConfidenceBreakdown + type Convention struct + Description string + FilePattern string + Name string + Pattern string + Severity Severity + func ConventionsFromStrings(rules []string) []Convention + type ConventionChecker struct + func NewConventionChecker(conventions []Convention) *ConventionChecker + func (cc *ConventionChecker) Check(diff string) []Finding + type DedupConfig struct + MergeDistance int + SameFileOnly bool + SimilarityThreshold float64 + func NewDedupConfig() DedupConfig + type DedupResult struct + Duplicates []DuplicateGroup + Unique []Finding + func DeduplicateFindings(findings []Finding, config DedupConfig) DedupResult + type DuplicateGroup struct + Duplicates []Finding + Reason string + Representative Finding + type FilterConfig struct + BatchSize int + ConfidenceThreshold float64 + MaxParallel int + MinSeverity Severity + func DefaultFilterConfig() FilterConfig + type FilterResult struct + Confidence float64 + Confirmed bool + Finding Finding + Reasoning string type Finding + Confidence float64 + SASTSource bool + func FromContractFinding(f reviewcontracts.Finding) Finding + type FixPipeline struct + func NewFixPipeline() *FixPipeline + func (p *FixPipeline) AddRule(rule FixRule) + func (p *FixPipeline) GenerateFixes(findings []Finding) []FixSuggestion + type FixRule struct + Generator func(Finding) FixSuggestion + MatchFn func(Finding) bool + type FixSuggestion struct + Category string + Confidence float64 + Description string + EstimatedEffort string + Explanation string + Finding *Finding + FindingID string + FixCode string + FixedCode string + Priority int + Severity string + Title string + func (f FixSuggestion) String() string + type MemoryBridge struct + func NewMemoryBridge(source MemorySource, opts ...MemoryBridgeOption) *MemoryBridge + func (b *MemoryBridge) EnrichContext(ctx context.Context, findings []string) (string, error) + func (b *MemoryBridge) RecallSimilar(ctx context.Context, concern string, limit int) ([]MemoryResult, error) + func (b *MemoryBridge) StoreFindings(ctx context.Context, findings []Finding) error + type MemoryBridgeOption func(*MemoryBridge) + func WithMaxContextTokens(n int) MemoryBridgeOption + func WithMemoryEnabled(enabled bool) MemoryBridgeOption + type MemoryResult struct + Content string + ID string + Score float64 + Tags []string + type MemorySource interface + Recall func(ctx context.Context, query string, limit int) ([]MemoryResult, error) + Store func(ctx context.Context, key, content string, tags []string) error type Option + func WithPreAnalysis(enabled bool) Option type Result + ConfidenceBreakdown *ConfidenceBreakdown + SASTFusion *SASTFusionResult + func ReviewIncrementalWithContext(ctx context.Context, base, head string, state *IncrementalState, ...) (*Result, error) + type SASTCheck struct + Check func(source string, filePath string) []SASTFinding + Description string + ID string + Languages []string + Name string + Pattern string + Severity string + func (c *SASTCheck) AppliesTo(filePath string) bool + type SASTFinding struct + CheckID string + Confidence float64 + Evidence string + File string + Line int + Message string + Rule string + Severity string + type SASTFusion struct + MaxEvidenceLen int + MaxFindings int + func NewSASTFusion() *SASTFusion + func (sf *SASTFusion) FormatSASTForPrompt(findings []Finding) string + type SASTFusionResult struct + Confirmed []Finding + Dismissed []Finding + Unaddressed []Finding + func TrackSASTOutcome(sastFindings []Finding, llmFindings []Finding) SASTFusionResult + type SASTIntegration struct + func NewSASTIntegration() *SASTIntegration + func (s *SASTIntegration) Analyze(source string, filePath string) []SASTFinding + func (s *SASTIntegration) BuildReviewPrompt(sastFindings []SASTFinding, diff string) string + type SSATaintAnalyzer struct + Env []string + MaxFindings int + func NewSSATaintAnalyzer() *SSATaintAnalyzer + func (a *SSATaintAnalyzer) AnalyzePackages(dir string, patterns ...string) ([]Finding, error) + type StaticAnalyzer struct + Rules []StaticRule + func NewStaticAnalyzer() *StaticAnalyzer + func (sa *StaticAnalyzer) Analyze(diff string, language string) []Finding + func (sa *StaticAnalyzer) AnalyzeFile(content string, language string) []Finding + func (sa *StaticAnalyzer) AnalyzeFileWithPath(content string, language string, path string) []Finding + type StaticRule struct + Antipattern *regexp.Regexp + CWE string + Category string + Description string + Fix string + ID string + Language string + Name string + Pattern *regexp.Regexp + Severity string type Stats + AverageConfidence float64 + HighConfidenceCount int + LowConfidenceCount int + type TaintAnalyzer struct + func NewTaintAnalyzer() *TaintAnalyzer + func (ta *TaintAnalyzer) AnalyzeDiff(rawDiff string) []Finding + func (ta *TaintAnalyzer) AnalyzeSource(source string, filePath string) []Finding + type TaintFinding struct + CWE string + File string + Fix string + Line int + Message string + Severity string + Sink string + SinkType string + Source string + Variable string v0.1.0 May 2, 2026 Changes in this version + const FilterAdded + const FilterDiffContext + const FilterFile + const FilterNone + var ErrContextCancelled = errors.New("sight: context cancelled") + var ErrEmptyDiff = errors.New("sight: empty diff; nothing to review") + var ErrNoProvider = errors.New("sight: no provider configured; use WithProvider()") + func CustomChecksToConcerns(checks []CustomCheck) []review.Concern + func EvalSummary(results []EvalResult) (passed, failed int, rate float64) + func LoadProjectRules(dir string) string + type ChatOpts struct + MaxTokens int + Model string + System string + Temperature float64 + type CustomCheck struct + Enabled bool + Languages []string + Name string + Prompt string + Severity string + func LoadChecks(dir string) ([]CustomCheck, error) + func LoadChecksFromRepo(repoDir string) ([]CustomCheck, error) + type Description struct + ChangeType string + Changes []string + Risk string + Summary string + TestPlan string + Title string + func Describe(ctx context.Context, rawDiff string, opts ...Option) (*Description, error) + type EvalCase struct + DenyFindings []EvalDenial + Diff string + ExpectFindings []EvalExpectation + Name string + type EvalDenial struct + Concern string + MessageContains string + type EvalExpectation struct + Concern string + File string + MessageContains string + MinSeverity string + type EvalResult struct + Case string + Failures []string + Findings []Finding + Passed bool + func RunEval(ctx context.Context, suite *EvalSuite, opts ...Option) ([]EvalResult, error) + type EvalSuite struct + Cases []EvalCase + func LoadEvalSuite(path string) (*EvalSuite, error) + func ParseEvalSuite(data []byte) (*EvalSuite, error) + type FileChange struct + Content string + Diff string + OldPath string + Path string + type FileConfig struct + Concerns []string + Exclude []string + FailOn string + GitContext *bool + MaxTokens int + Model string + Parallel *bool + Prompts map[string]string + Reflection *bool + func LoadConfigFile(dir string) (*FileConfig, error) + type FilterMode = comment.FilterMode + type Finding struct + CWE string + Concern string + EndLine int + File string + Fix string + Line int + Message string + Reasoning string + Severity Severity + type ImproveResult struct + Improvements []Improvement + TokensUsed int + func Improve(ctx context.Context, rawDiff string, opts ...Option) (*ImproveResult, error) + type Improvement struct + After string + Before string + Category string + Description string + EndLine int + File string + Line int + Reasoning string + type IncrementalState struct + func NewIncrementalState(lastSHA string) *IncrementalState + func (s *IncrementalState) LastReviewedSHA() string + func (s *IncrementalState) SetLastReviewedSHA(sha string) + type InlineComment struct + Body string + EndLine int + Path string + StartLine int + Suggestion string + type Message struct + Content string + Role string + type Option interface + var CI Option = optFunc(func(c *config) { ... }) + var Quick Option = optFunc(func(c *config) { ... }) + var SecurityFocus Option = optFunc(func(c *config) { ... }) + var Thorough Option = optFunc(func(c *config) { ... }) + func ApplyFileConfig(fc *FileConfig) []Option + func WithConcerns(concerns ...string) Option + func WithContextLines(n int) Option + func WithCustomChecks(dir string) Option + func WithCustomChecksFromRepo(repoDir string) Option + func WithExclude(patterns ...string) Option + func WithFailOn(sev Severity) Option + func WithFilterMode(mode FilterMode) Option + func WithGitContext(enabled bool) Option + func WithMaxTokens(n int) Option + func WithMinScore(n int) Option + func WithModel(model string) Option + func WithParallel(enabled bool) Option + func WithProjectRules(rules string) Option + func WithProvider(p Provider) Option + func WithReflection(enabled bool) Option + func WithSymbols(enabled bool) Option + type PRSource struct + Number int + Owner string + Repo string + type Provider interface + Chat func(ctx context.Context, messages []Message, opts ChatOpts) (*Response, error) + type Response struct + Content string + TokensUsed int + type Result struct + Comments []InlineComment + FailOn Severity + Findings []Finding + Report string + Stats Stats + func Review(ctx context.Context, diff string, opts ...Option) (*Result, error) + func ReviewIncremental(ctx context.Context, base, head string, state *IncrementalState, ...) (*Result, error) + func (r *Result) Failed() bool + func (r *Result) MaxSeverity() Severity + type Reviewer struct + func NewReviewer(opts ...Option) *Reviewer + func (r *Reviewer) Review(ctx context.Context, rawDiff string) (*Result, error) + func (r *Reviewer) ReviewFiles(ctx context.Context, files []FileChange) (*Result, error) + type Severity int + const SeverityCritical + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + func ParseSeverity(s string) Severity + func (s Severity) AtLeast(threshold Severity) bool + func (s Severity) String() string + type Stats struct + ByConcern map[string]int + BySeverity map[Severity]int + DurationPerConcern map[string]time.Duration + FilesReviewed int + FindingsTotal int + HunksAnalyzed int + TokensUsed int