config

package
v0.0.0-...-6c96cb7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServerFuzzConfig

func ValidateServerFuzzConfig(cfg *Config) error

ValidateServerFuzzConfig checks that server fuzz configs have exactly one harness target. All-harness configs (no server targets) are always valid.

Types

type CampaignConfig

type CampaignConfig struct {
	Name         string   `toml:"name"`
	Timeout      Duration `toml:"timeout"`
	ExecTimeout  Duration `toml:"exec_timeout"`
	MaxInputSize int      `toml:"max_input_size"`
	// DictFile is an optional path to an AFL-format token dictionary fed to
	// the mutator's dict_overwrite/dict_insert strategies.
	DictFile string `toml:"dict_file"`
	// Dicts is an optional inline list of dictionary tokens, applied in
	// addition to DictFile and any comparator-derived defaults.
	Dicts []string `toml:"dicts"`
	// WarmupRounds runs the full corpus through worker 0 this many times
	// before the main fuzzing loop, stabilising flaky coverage edges.
	WarmupRounds int `toml:"warmup_rounds"`
}

CampaignConfig controls the fuzzing campaign.

type ComparatorConfig

type ComparatorConfig struct {
	Type     string   `toml:"type"`
	Script   string   `toml:"script"`
	Binary   string   `toml:"binary"`
	Args     []string `toml:"args"`
	BuildCmd string   `toml:"build_cmd"`
	Env      []string `toml:"env"`
}

ComparatorConfig selects the output comparison strategy.

type Config

type Config struct {
	Campaign    CampaignConfig    `toml:"campaign"`
	Corpus      CorpusConfig      `toml:"corpus"`
	Targets     []TargetConfig    `toml:"target"`
	Comparator  ComparatorConfig  `toml:"comparator"`
	InputFilter InputFilterConfig `toml:"input_filter"`
}

Config is the top-level campaign configuration.

func Load

func Load(path string) (*Config, error)

Load reads and parses a TOML config file.

type CorpusConfig

type CorpusConfig struct {
	SeedDir     string `toml:"seed_dir"`
	CorpusDir   string `toml:"corpus_dir"`
	FindingsDir string `toml:"findings_dir"`
}

CorpusConfig specifies corpus directories.

type Duration

type Duration struct {
	time.Duration
}

Duration wraps time.Duration for TOML string unmarshaling.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

type InputFilterConfig

type InputFilterConfig struct {
	Binary    string   `toml:"binary"`
	Args      []string `toml:"args"`
	BuildCmd  string   `toml:"build_cmd"`
	Env       []string `toml:"env"`
	Transform bool     `toml:"transform"`
}

InputFilterConfig configures an optional external input filter process. The filter receives each generated input via shared memory and responds with accept or reject before the input is sent to any fuzz target.

type TargetConfig

type TargetConfig struct {
	Name     string   `toml:"name"`
	Language string   `toml:"language"`
	Binary   string   `toml:"binary"`
	Args     []string `toml:"args"`
	BuildCmd string   `toml:"build_cmd"`
	Env      []string `toml:"env"`
	Type     string   `toml:"type"` // "harness" (default) | "server"
}

TargetConfig describes one fuzz target.

func (*TargetConfig) IsServer

func (t *TargetConfig) IsServer() bool

IsServer reports whether this target is a long-running server (no pipe protocol).

Jump to

Keyboard shortcuts

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