Skip to content

Environment Variables

VariableTypeDescription
VITIATE_FUZZ1Enables fuzzing mode. Each fuzz() call becomes a supervisor and enters the mutation-driven fuzz loop. Also set internally by the npx vitiate CLI.
VITIATE_OPTIMIZE1Enables corpus minimization mode. Replays all corpus entries, runs set cover, and deletes redundant cached entries.

When neither is set, fuzz() runs in regression mode - replaying saved corpus entries as test cases.

VariableTypeDescription
VITIATE_FUZZ_TIMEintegerTotal fuzzing time in seconds. Overrides fuzzTimeMs from code and -max_total_time from CLI.
VITIATE_FUZZ_EXECSintegerMaximum fuzzing iterations. Overrides fuzzExecs from code and -runs from CLI.
VITIATE_DEBUG1Enable debug output (logs mode, coverage map size, and internal state).
VITIATE_MAX_CRASHESintegerMaximum crashes to collect before stopping. Overrides maxCrashes from code.

These are set by Vitiate internally. Do not set them manually unless building a custom runner.

VariableTypeDescription
VITIATE_SUPERVISOR1Indicates the process is a supervised child worker. Set by the supervisor.
VITIATE_SHMEMstringShared memory handle for coverage map. Set by the supervisor.

fuzz, regression, and optimize subcommands

Section titled “fuzz, regression, and optimize subcommands”

Configuration is resolved in this order (highest priority first):

  1. CLI flags (--fuzz-time, --fuzz-execs, --max-crashes)
  2. Environment variables (VITIATE_FUZZ_TIME, VITIATE_FUZZ_EXECS, VITIATE_MAX_CRASHES)
  3. Per-test FuzzOptions in code
  4. Plugin-level fuzz defaults
  5. Built-in defaults

For the libFuzzer-compatible CLI, environment variables take highest priority to match libFuzzer conventions:

  1. Environment variables (VITIATE_FUZZ_TIME, VITIATE_FUZZ_EXECS)
  2. CLI flags (-max_total_time, -runs)
  3. Per-test FuzzOptions in code
  4. Plugin-level fuzz defaults
  5. Built-in defaults