Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxFileBytes = 8 << 20
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Paths []string
Include []string
Exclude []string
Aggressive bool
FailOn domain.Confidence
LLM LLMConfig
Write bool
Backup string
MaxFileBytes int64
DisabledRules []string
Gofmt bool
LayerB bool
LayerBStrength string
AstWASM map[string]string // lang -> local .wasm path
AstExt map[string]string // ".rs" -> "rust"
NFKC bool
ForceText bool
ForceKind string // auto|text|image|container
Logger *slog.Logger
Progress ports.Progress
}
Config is the CLI-facing engine configuration. Cobra/Viper must not leak in.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine orchestrates walk, detect, merge, and clean.
type LLMConfig ¶
type LLMConfig struct {
Mode string
Model string
Endpoint string
Timeout time.Duration
APIKey string
}
LLMConfig selects an optional language-model adapter.
type Result ¶
type Result struct {
FilesScanned int
FilesSkipped int
Findings []domain.Finding
Patches []domain.Patch
DryRun bool
Score domain.Score
After *domain.Score
Leftover []domain.Finding
Streamed bool
TextFiles int `json:"text_files,omitempty" yaml:"text_files,omitempty"`
ImageFiles int `json:"image_files,omitempty" yaml:"image_files,omitempty"`
DocFiles int `json:"doc_files,omitempty" yaml:"doc_files,omitempty"`
DetectorHits map[string]int `json:"detector_hits,omitempty" yaml:"detector_hits,omitempty"`
LayerA int `json:"layer_a"`
LayerFiles int `json:"layer_files"`
LayerB int `json:"layer_b"`
LayerBOpt int `json:"layer_b_optional,omitempty"`
LayerBFiles []string `json:"layer_b_files,omitempty"`
}
Result is the outcome of Scan or Clean.
func (Result) ShouldFail ¶
func (r Result) ShouldFail(failOn domain.Confidence) bool
ShouldFail reports whether findings meet FailOn.
type RuleInfo ¶
type RuleInfo struct {
ID string `json:"id" yaml:"id"`
Family string `json:"family" yaml:"family"`
Severity string `json:"severity" yaml:"severity"`
Confidence string `json:"confidence" yaml:"confidence"`
Clean string `json:"clean" yaml:"clean"`
Description string `json:"description" yaml:"description"`
}
RuleInfo is a public view of an embedded rule spec.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
detect/origin
Package origin detects soft AI-origin heuristics (not SynthID verification).
|
Package origin detects soft AI-origin heuristics (not SynthID verification). |
|
layerb
Package layerb plans best-effort rewrites against token-sampling watermarks (Kirchenbauer / SynthID-Text).
|
Package layerb plans best-effort rewrites against token-sampling watermarks (Kirchenbauer / SynthID-Text). |
|
Package rewrite implements the Layer B text rewrite hook (WR rewrite_text.py).
|
Package rewrite implements the Layer B text rewrite hook (WR rewrite_text.py). |
|
Package webaudit audits URLs from a sitemap (WR audit_website.py), SSRF-safe.
|
Package webaudit audits URLs from a sitemap (WR audit_website.py), SSRF-safe. |
Click to show internal directories.
Click to hide internal directories.