You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
internal/output: file lifecycle, SARIF and summary writers untested at package level #171
area: outputWriters and formatshelp wantedExtra attention is neededseverity: mediumEdge-case bugs, degraded behavior, meaningful maintenance costtestingTest coverage and test infrastructure
internal/output is 51% covered. The file lifecycle, SARIF and summary writers are reached only by main-package end-to-end tests, which flaked in this audit's run, so a writer regression has no fast isolated signal.
SARIF is consumed by GitHub code scanning (CI greps for dangling-cname, go.yml:131); a malformed document or unstable fingerprint passes until a downstream upload fails.
Suggested test cases
WriteSARIF with zero results: valid 2.1.0 document, empty results, rule still declared
Two takeovers on the same name with different kinds: distinct partialFingerprints; same input twice: byte-identical output
WriteSARIF to an unwritable path: error returned, no partial file
Summary/WriteSummaryFile: every verdict value renders; zero-processed scan; missing directory returns an error
CreateFile: new file created; symlink target written through; Close after a Write error leaves the original untouched; double Close is a no-op
SetDiff + Result: added/removed prefixes in text, JSONL and CSV; SetQuiet suppresses Info but not Error
Fixed in 77bc419: new internal/output/lifecycle_test.go covers the results-file lifecycle (commit, discard, double Close, missing dir, device target), WriteSARIF (empty run, rule dedupe and levels, distinct and stable fingerprints, byte-identical reruns, unwritable path), WriteSummaryFile for every verdict, the jsonl-only summary line, SetDiff in text, CSV and JSONL, and SetQuiet. Package coverage went from 61% to 94%. Verified on Windows (go test -race -shuffle=on) and on Linux via a cross-compiled test binary, plus golangci-lint.
area: outputWriters and formatshelp wantedExtra attention is neededseverity: mediumEdge-case bugs, degraded behavior, meaningful maintenance costtestingTest coverage and test infrastructure
Activity
TMHSDigital commentedon Nov 9, 2026
Fixed in 77bc419: new
internal/output/lifecycle_test.gocovers the results-file lifecycle (commit, discard, double Close, missing dir, device target), WriteSARIF (empty run, rule dedupe and levels, distinct and stable fingerprints, byte-identical reruns, unwritable path), WriteSummaryFile for every verdict, the jsonl-only summary line, SetDiff in text, CSV and JSONL, and SetQuiet. Package coverage went from 61% to 94%. Verified on Windows (go test -race -shuffle=on) and on Linux via a cross-compiled test binary, plus golangci-lint.test(output): cover file lifecycle, SARIF, summary and diff writers (T…