Skip to Content

CLI Reference

Entry point: securebench (module securebench.cli:main).

securebench run

Run a tester YAML benchmark-pack harness.

securebench run --config PATH [options]

Arguments

ArgumentRequiredDescription
--config PATHyesPath to tester YAML file

Options

OptionDefaultDescription
--env-file PATH.envDotenv file loaded before run (securebench.env.load_env_file)
--limit NnoneProcess first N compiled tasks only
--output-dir PATHfrom YAMLOverride run.output_dir
--resumeoffKeep valid lines in existing candidates.jsonl; skip completed task_id
--quietoffUse NullProgressReporter
--show-command-outputoffInclude sandbox stdout/stderr snippets in progress
--show-agent-outputoffStream Codex agent messages; write agent-trace.log

Exit codes

CodeMeaning
0Run completed; summary printed to stdout
1Error (ConfigError, ImportError, OSError, ValueError) — message on stdout
2Unknown subcommand (argparse)

Success output

securebench: run_id=<id> total=<n> verification=<status> verified=<n> passed=<n> output=<path>

verification is complete, partial, or pending (aggregate — see Architecture).

Module invocation

Equivalent to the installed script:

python -m securebench.cli run --config PATH

Environment loading

load_env_file() parses KEY=VALUE lines:

  • Supports optional export prefix
  • Strips single/double quotes from values
  • Does not override existing environment variables unless override=True (CLI uses default override=False)
  • Missing env file is silently ignored (returns {})

Python equivalent

from securebench.env import load_env_file from securebench.tester_config import load_tester_config from securebench.tester_run import run_tester_config, with_tester_overrides load_env_file(".env") config = load_tester_config("path/to/tester.yaml") config = with_tester_overrides(config, output_dir="runs/custom") summary = run_tester_config(config, limit=1, resume=False)
Last updated on