Skip to content

Commit 9100b9b

Browse files
committed
command injection: add documentation
1 parent b5a6b7e commit 9100b9b

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

docs/fuzz-settings.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,33 @@ hooking point not being available). Check the section
190190
[Verbose logging](#verbose-logging) for information on how to enable this
191191
option.
192192

193+
## Bug Detectors
194+
195+
Bug detectors are one of the key features when fuzzing memory-safe languages. In
196+
Jazzer.js, they can detect some of the most common vulnerabilities in JavaScript
197+
code. Built-in bug detectors are enabled by default, but can be disabled by
198+
adding the `--disable_bug_detectors=<pattern>` flag to the project
199+
configuration. For example, to disable all built-in bug detectors, add
200+
`--disable_bug_detectors='.*'` to the project configuration.
201+
202+
Following built-in bug detectors are available in Jazzer.js:
203+
204+
| Bug Detector | Description |
205+
| ------------------- | ----------------------------------------------------------- |
206+
| `command-injection` | Hooks all functions of the built-in module `child_process`. |
207+
208+
For implementation details see
209+
[../packages/bug-detectors/internal](../packages/bug-detectors/internal).
210+
211+
### Writing Custom Bug Detectors
212+
213+
Users can write their own bug detectors using the
214+
[custom hooks feature](#custom-hooks). Use the function `reportFinding` to
215+
report a finding from your bug detector---it makes sure that the finding escapes
216+
all try/catch blocks along the way and is definitely reported. Beware that
217+
`reportFinding` will only report the first finding from any of the bug detectors
218+
and all subsequent findings will be ignored.
219+
193220
## Verbose logging
194221

195222
To enable verbose logging in Jazzer.js, add either `-v`, or `--verbose` to the

0 commit comments

Comments
 (0)