app

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package app assembles the scanner for the CLI and HTTP API

Index

Constants

This section is empty.

Variables

View Source
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

func AnalyzerOptions(cfg config.Config) map[string]map[string]any

AnalyzerOptions builds each analyzer's option map. Generic analyzer_options override values from typed sections.

func BuildLLMClient

func BuildLLMClient(cfg config.LLMConfig, selectedAnalyzers []string) analyzer.LLMClient

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

func ClientOptions(cfg config.Config) client.Options

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

func ReadCapped(path string, max int64) ([]byte, error)

ReadCapped reads a whole file and rejects content larger than max

func ScanOptions

func ScanOptions(cfg config.Config) (scanner.Options, error)

ScanOptions builds shared scanner options from configuration. The caller sets the target-specific root and build-time scanner version.

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

func NewPreparer(cfg config.Config) *Preparer

NewPreparer builds the preparer for a configuration

func NewSandboxOnlyPreparer

func NewSandboxOnlyPreparer(cfg config.Config, snapshotPath string) *Preparer

NewSandboxOnlyPreparer prevents host execution. An optional snapshot supplies the declared surface without starting the target.

func (*Preparer) Prepare

func (p *Preparer) Prepare(ctx context.Context, target model.Target) (*analyzer.AnalysisContext, func(), error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL