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:
parent
abb0357f77
commit
bbfd86ebfb
1 changed files with 3 additions and 0 deletions
|
|
@ -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(",")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue