From bbfd86ebfbef070bb544e76e596830ed25e95e91 Mon Sep 17 00:00:00 2001 From: Chris Sells Date: Sat, 11 Jul 2026 10:54:02 -0700 Subject: [PATCH] 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. --- tools/docsmint/docsmint.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/docsmint/docsmint.go b/tools/docsmint/docsmint.go index 2c24d1d8a..88232636f 100644 --- a/tools/docsmint/docsmint.go +++ b/tools/docsmint/docsmint.go @@ -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(",")