Settings
bughunt needs no settings. A bughunt.toml in the repo's top folder changes its defaults for that repo.
[scan]
ignore_rules = ["detected-private-key"]
ignore_paths = ["^fuzz/seeds/", "^examples/"]
baseline = "bughunt-baseline.json"
[api]
path_prefix = "/api/"
public = ["status"]
skip = ["payments"]
[fuzz]
seconds = 120
ignore_paths = ["^vendor/"]
c_flags = ["src/codec.c", "-Iinclude"]
java_classpath = ["build/classes"]
[[fuzz.target]]
name = "decode"
run = ["sh", "fuzz/run_decode.sh", "{seconds}", "{corpus}"]
Every key is optional. A misspelt key stops the run with an error naming it, so a typo cannot silently do nothing.
[scan]
| Key | What it does |
|---|---|
ignore_rules | Patterns for rule names to leave out, on top of the built-in style rules. |
ignore_paths | Patterns for paths that are not shipped code. |
baseline | The file of reviewed findings, as a plain path inside the repo. See the baseline. |
[api]
Read from the folder you run bughunt api in. These apply when the description is made from a routes listing.
| Key | What it does |
|---|---|
path_prefix | Only routes under this prefix are described (default /api/). |
public | Patterns for controllers that need no login on purpose, so they are not reported. |
skip | Patterns for routes never to call. |
[fuzz]
| Key | What it does |
|---|---|
seconds | Seconds per target when --seconds is not given (default 60). |
ignore_paths | Patterns for paths never searched for targets: vendored code, examples. |
c_flags | Extra compiler arguments for C and C++ targets: the project's sources, include folders, libraries. |
java_classpath | The project's compiled classes and jars, for Java targets. |
[[fuzz.target]] | A target given as its own command: name, run, and optionally build, engine and env. See your own fuzzer. |
Patterns
Patterns are regular expressions matched anywhere in the name or path. ^fuzz/seeds/ matches paths that start with that folder; private-key matches any rule with those words in its name.
A settings file cannot hide findings quietly
Whatever a repo's settings leave out is counted in every report (left out: …), and --all shows it.
For scan, the settings can only leave findings out and name a baseline inside the repo; nothing in them is run. The commands under [[fuzz.target]] are run by fuzz and audit, which run the repo's code anyway.
Options for every command
| Option | What it does |
|---|---|
--format text|markdown|html|json|sarif | How the report is written. See Reports. |
--output FILE | Write the report to a file instead of the terminal. |
--out-dir DIR | Where logs and raw tool output go (default ~/.cache/bughunt/out; also BUGHUNT_OUT). |
--config FILE | Use this settings file instead of the repo's. |