Skip to content

Commit bba7494

Browse files
committed
docs: update XSS detector scope
Document the new DOM sink coverage for innerHTML, srcdoc,\ninsertAdjacentHTML, document.write, and React\ndangerouslySetInnerHTML, and clarify the JSON policy.
1 parent 32b09f3 commit bba7494

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

docs/bug-detectors.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ _Disable with:_ `--disableBugDetectors=ssrf` in CLI mode; or when using Jest in
136136
137137
## Cross-Site Scripting (XSS)
138138
139-
Detects active XSS payloads that survive common HTML sanitizers and HTML
140-
responses. The built-in detector validates return values from `sanitize-html`
141-
and `xss`, and inspects `http`/`http2` HTML responses for executable markup such
142-
as inline scripts, event handlers, `srcdoc`, and `javascript:` URLs.
139+
Detects active XSS payloads that survive common HTML sanitizers, server-side
140+
HTML responses, and instrumented DOM-writing sinks. The built-in detector
141+
validates return values from `sanitize-html` and `xss`, inspects `http`/`http2`
142+
HTML responses, and instruments `innerHTML`, `outerHTML`, `srcdoc`,
143+
`insertAdjacentHTML`, `document.write`, `document.writeln`, and React's
144+
`dangerouslySetInnerHTML` data structure.
143145
144146
_Configuration:_ Additional sanitizer functions can be registered in the
145147
[custom hooks](./fuzz-settings.md#customhooks--arraystring) file.
@@ -152,9 +154,10 @@ getBugDetectorConfiguration("xss")
152154
?.setMaxCapturedBodyBytes(256 * 1024);
153155
```
154156
155-
_Scope:_ The detector currently covers server-side HTML output and sanitizer
156-
return values. DOM property sinks such as `innerHTML` still require dedicated
157-
instrumentation and are not part of this built-in detector yet.
157+
_Scope:_ The detector covers sanitizer outputs, HTML response sinks, and the DOM
158+
sinks listed above. It does not treat `application/json` as an XSS sink by
159+
default; JSON-driven XSS is instead caught once poisoned data reaches an
160+
instrumented DOM sink.
158161
159162
_Disable with:_ `--disableBugDetectors=xss` in CLI mode; or when using Jest in
160163
`.jazzerjsrc.json`:

0 commit comments

Comments
 (0)