Documentation
¶
Overview ¶
Package app assembles the scanner for the CLI and HTTP API
Index ¶
- Variables
- func AnalyzerOptions(cfg config.Config) map[string]map[string]any
- func BuildLLMClient(cfg config.LLMConfig, selectedAnalyzers []string) analyzer.LLMClient
- func ClientOptions(cfg config.Config) client.Options
- func NewRuntimeExecutor(cfg config.RuntimeConfig) (analyzer.RuntimeExecutor, error)
- func ReadCapped(path string, max int64) ([]byte, error)
- func ScanOptions(cfg config.Config) (scanner.Options, error)
- type Preparer
Constants ¶
This section is empty.
Variables ¶
var MaxStaticSnapshotBytes int64 = 100 << 20
MaxStaticSnapshotBytes caps snapshots, baselines, and client configs that are read whole. It is a variable so tests can exercise the boundary without creating a 100 MiB fixture.
Functions ¶
func AnalyzerOptions ¶
AnalyzerOptions builds each analyzer's option map. Generic analyzer_options override values from typed sections.
func BuildLLMClient ¶
BuildLLMClient returns nil until configuration or analyzer selection opts in. Environment credentials alone never enable billed calls. After opt-in, missing credentials return a client that makes the required analyzer fail explicitly.
func ClientOptions ¶
ClientOptions converts scanner configuration into connection settings. Snapshot capture and full scans share it so timeouts and private-network policy cannot drift between commands.
func NewRuntimeExecutor ¶
func NewRuntimeExecutor(cfg config.RuntimeConfig) (analyzer.RuntimeExecutor, error)
NewRuntimeExecutor builds the configured sandbox or reports why it is unavailable
func ReadCapped ¶
ReadCapped reads a whole file and rejects content larger than max
Types ¶
type Preparer ¶
type Preparer struct {
// contains filtered or unexported fields
}
Preparer builds the shared analysis context for each target kind, then attaches optional LLM and runtime backends. Scanner options, not the preparer, set the target-specific filesystem root.
func NewPreparer ¶
NewPreparer builds the preparer for a configuration
func NewSandboxOnlyPreparer ¶
NewSandboxOnlyPreparer prevents host execution. An optional snapshot supplies the declared surface without starting the target.