Conversation
every scan on an interactive terminal now runs under the live dashboard, after the picker or straight away when scan flags are given. the gate, shouldDashboard, requires stdin and stdout to both be ttys with a usable window size and TERM != dumb; -no-tui, -api, -silent, pipes, and zero-size ptys fall back to the plain streaming output unchanged. while the alt screen is up, the engine's console chrome goes to io.Discard via the new output.SetWriter and charmbracelet/log is buffered, then replayed to stderr once the terminal is restored. finishRun (notify, reports, summary) runs after the dashboard closes. quitting mid-scan returns tui.ErrQuit and aborts without partial reports. tui.Run no longer reads the scan error while the scan goroutine may still be writing it (a data race); it waits on a buffered channel when the scan is done and returns ErrQuit otherwise. `w` now writes a report: tui.Config.WriteReport runs off the ui goroutine with every finding seen so far, and sif writes it as json to the -json path or sif-report-<timestamp>.json. the footer reports the path or error. the summary screen is now interactive: findings sorted worst-first below the totals, j/k/g/G to move, enter to open the detail, s and / to narrow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| type ScanFunc func(ctx context.Context, sink event.Sink) error | ||
|
|
||
| // ErrQuit is returned by Run when the user quit the dashboard before the scan | ||
| // finished. The scan context is cancelled; callers should treat the run as |
There was a problem hiding this comment.
[misspell] reported by reviewdog 🐶
"cancelled" is a misspelling of "canceled"
| // error, if any, is returned once the ui has torn down. | ||
| // the event stream, and blocks until the program exits. If the scan already | ||
| // finished, its error is returned. If the user quit mid-scan, the scan context | ||
| // is cancelled and Run returns ErrQuit straight away instead of blocking on |
There was a problem hiding this comment.
[misspell] reported by reviewdog 🐶
"cancelled" is a misspelling of "canceled"
| ## the dashboard | ||
|
|
||
| > the live dashboard is a complete, tested component (`tui.Run`); auto-launching it as the picker's run screen is landing incrementally. today the picker configures the scan and runs it with sif's standard streaming output. | ||
| ### when it opens |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD024/no-duplicate-heading Multiple headings with the same content [Context: "when it opens"]
| > the live dashboard is a complete, tested component (`tui.Run`); auto-launching it as the picker's run screen is landing incrementally. today the picker configures the scan and runs it with sif's standard streaming output. | ||
| ### when it opens | ||
|
|
||
| the dashboard is the default view for any scan on an interactive terminal — after the picker, or straight away when scan flags are given. it only opens when stdin and stdout are both terminals with a usable size (and `TERM` isn't `dumb`); otherwise sif falls back to its normal streaming output: |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 295]
| - `-silent`, `-api`, or piped stdin/stdout → plain output | ||
| - `-no-tui` → plain output (also skips the picker) | ||
|
|
||
| while the dashboard is up, sif's console chrome is suppressed (the dashboard shows the same findings); warnings and errors are buffered and printed when it closes. after you quit, the usual run steps — notify, `-sarif`/`-markdown`/`-json` reports and the run summary — happen on the normal screen. quitting mid-scan aborts the run without writing partial reports. |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 363]
| while the dashboard is up, sif's console chrome is suppressed (the dashboard shows the same findings); warnings and errors are buffered and printed when it closes. after you quit, the usual run steps — notify, `-sarif`/`-markdown`/`-json` reports and the run summary — happen on the normal screen. quitting mid-scan aborts the run without writing partial reports. | ||
|
|
||
| the dashboard is a pure consumer of sif's scan event stream (`internal/event`). the scan engine runs in a background goroutine and emits events — target started, scanner started, each finding, scanner done, target done, run done — which the dashboard renders live. the engine does not know the tui exists; the tui is just one `event.Sink` among the console and report writers. quitting the dashboard cancels the scan context (reports still flush on the way out). | ||
| the dashboard is a pure consumer of sif's scan event stream (`internal/event`). the scan engine runs in a background goroutine and emits events — target started, scanner started, each finding, scanner done, target done, run done — which the dashboard renders live. the engine does not know the tui exists; the tui is just one `event.Sink` among the console and report writers. quitting the dashboard before the scan finishes cancels it. |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 436]
| | `enter` | expand the selected finding (target, module, evidence) | | ||
| | `c` | copy the selected finding's url | | ||
| | `w` | write a report now | | ||
| | `w` | write a json report of every finding so far (to the `-json` path if given, else `sif-report-<timestamp>.json` in the current directory) | |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 145]
| | --- | --- | | ||
| | `j` / `k` / `↑` / `↓` | move through the findings | | ||
| | `g` / `G` | jump to the first / last finding | | ||
| | `enter` | open the selected finding's detail (target, module, evidence); `enter` again closes it | |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 100]
| ### -i, --interactive / -pick / --no-tui | ||
|
|
||
| control the interactive scan picker. by default, running `sif <url>` (or `-u <url>`) with no scan flags on an interactive terminal opens a menu to choose scans from; see [the tui guide](tui.md). `-i` (alias `-pick`) forces the picker open even when scan flags are set; `--no-tui` disables it so sif runs with exactly the flags given: | ||
| control the interactive tui (the scan picker and the live dashboard). by default, running `sif <url>` (or `-u <url>`) with no scan flags on an interactive terminal opens a menu to choose scans from; see [the tui guide](tui.md). `-i` (alias `-pick`) forces the picker open even when scan flags are set; `--no-tui` disables both the picker and the live dashboard so sif runs with exactly the flags given and prints its normal streaming output: |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 441]
| ``` | ||
|
|
||
| the picker never opens under `-silent`, `-api`, or when stdin/stdout is piped, so pipelines are unaffected. | ||
| on an interactive terminal every scan runs under the live dashboard. neither the picker nor the dashboard opens under `-silent`, `-api`, or when stdin/stdout is piped or isn't a usable terminal, so pipelines are unaffected. |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 223]
| with no scan flags on a terminal, sif opens an interactive picker: a grouped checklist of scans (recon, web vulns, info, intel), each showing its flag and a one-line description, with presets (`quick`, `recon`, `web`, `full`, `passive`) on `p` and a live "equivalent command" line so you can graduate to flags. your last selection is remembered. | ||
|
|
||
| it stays out of pipelines: any scan flag present runs directly, and `-silent`/`-api`/piped stdin or stdout never open it. force it on with `-i` (or `-pick`), off with `-no-tui`. see [docs/tui.md](docs/tui.md) for the full keybindings. | ||
| it stays out of pipelines: any scan flag present runs directly, and `-silent`/`-api`/piped stdin or stdout never open it. force it on with `-i` (or `-pick`), off with `-no-tui`. |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 177]
| it stays out of pipelines: any scan flag present runs directly, and `-silent`/`-api`/piped stdin or stdout never open it. force it on with `-i` (or `-pick`), off with `-no-tui`. see [docs/tui.md](docs/tui.md) for the full keybindings. | ||
| it stays out of pipelines: any scan flag present runs directly, and `-silent`/`-api`/piped stdin or stdout never open it. force it on with `-i` (or `-pick`), off with `-no-tui`. | ||
|
|
||
| scans on an interactive terminal run under a live dashboard that streams findings as they land and ends on a browsable summary (`j`/`k` to move, `enter` for detail, `w` to write a report). anything non-interactive gets the plain streaming output, and `-no-tui` turns the dashboard off. see [docs/tui.md](docs/tui.md) for the full keybindings. |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD013/line-length Line length [Expected: 80; Actual: 342]
pr summary13 files changed (+494 -37)
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
what
shouldDashboardrequires stdin and stdout to both be ttys, a non-zero window size, andTERM != dumb.-no-tui,-api,-silent, pipes and zero-size ptys fall back to the normal streaming output.io.Discardthrough the newoutput.SetWriter.charmbracelet/logoutput is buffered and replayed to stderr afterwards.finishRun(notify, reports, summary) runs after the dashboard closes. Quitting mid-scan returnstui.ErrQuitand aborts without partial reports.wwrites a report. It was a placeholder before.tui.Config.WriteReportruns async with every finding seen so far: json goes to the-jsonpath, or tosif-report-<timestamp>.jsonif none was given. The footer shows the path or the error.j/k/g/Gmove,enteropens the detail,sand/narrow the list.tui.RunreadscanErrwhile the scan goroutine could still be writing it. It now uses a buffered done channel.verification
go test -race ./...passes. New tests cover the gate table (including zero-size pty andTERM=dumb), summary navigation, thewsuccess/error/unwired paths, anddashboardReportwriting json.jandenteropened the detail,wwrote a report,qexited 0, and no console chrome leaked into the alt screen.🤖 Generated with Claude Code