ci: annotate gosec G705 false positive in docsmint nav splice

CI's golangci-lint v2.10.1 carries a newer gosec with taint-analysis rule
G705 (XSS), which flags directory-listing-derived strings flowing into
the docs.json write. Not a web-output sink: this developer tool writes
the repo's own docs.json with %q-quoted slugs the same pipeline
generates. Verified 0 issues under the exact CI linter version.
This commit is contained in:
Chris Sells 2026-07-11 10:54:02 -07:00
commit bbfd86ebfb

View file

@ -182,6 +182,9 @@ func spliceCLINav(docsJSONPath string, pages []string) error {
var b strings.Builder
b.WriteString("[\n")
for i, p := range pages {
// #nosec G705: not a web-output sink — this developer tool writes the
// repo's own docs.json; entries are %q-quoted slugs derived from the
// staging tree's filenames, which the same pipeline generates.
fmt.Fprintf(&b, "%s%q", entryIndent, p)
if i < len(pages)-1 {
b.WriteString(",")