fuzz

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: 8 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 fuzz generates schema-driven payloads for a tool's declared JSON Schema input. Payloads use inert markers rather than destructive commands or real hosts, and a seed makes them reproducible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CanaryFile

type CanaryFile struct {
	ID      string
	RelPath string
}

CanaryFile is one planted canary a payload can aim at: its ID, so a canary_hit can be traced back to the payload that targeted it, and its path relative to CanaryHome

type Case

type Case struct {
	Tool      string
	Property  string
	Arguments map[string]any
	Payload   Payload
}

Case is one full set of tool arguments with exactly one property carrying a fuzz payload; every other required property is filled with a benign value so the tool is likely to actually accept the call

func Generate

func Generate(tool model.ToolInfo, seed int64, opts Options) []Case

Generate produces one Case per (fuzzable property x applicable class), sorted by property name and class so the output order is stable

type Class

type Class string

Class identifies a payload family

const (
	ClassPathTraversal      Class = "path_traversal"
	ClassCommandInjection   Class = "command_injection"
	ClassShellMetacharacter Class = "shell_metacharacters"
	ClassFileURI            Class = "file_uri"
	ClassTemplateInjection  Class = "template_injection"
	ClassUnicodeEdge        Class = "unicode_edge_case"
	ClassOversized          Class = "oversized_input"
)

type Options

type Options struct {
	// CanaryFiles are the real planted canary files (see
	// internal/runtime/canary) that path_traversal and file_uri payloads
	// target when available
	CanaryFiles []CanaryFile
	// CanaryHome is where the sandbox plants those files inside the container
	CanaryHome string
}

Options steers payload targets so they never point outside scanner-owned infrastructure

type Payload

type Payload struct {
	Class  Class
	Marker string
	Value  any
	// Canary is the ID of the planted canary this payload was aimed at,
	// empty when it aimed at none. A canary_hit observation names the
	// canary that fired; without knowing which one a payload targeted,
	// any hit read as proof that whatever payload happened to be running
	// had worked.
	Canary string
}

Payload is one injected value and the marker that identifies it in output

Jump to

Keyboard shortcuts

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