AI codebase review

fix: sanitise snapshot follow mode; least-privilege CI token

The scan-info view printed the snapshot's "follow" metadata string
unsanitised (the canvas filter was the only defence). The CI workflow
ran with the repository's default GITHUB_TOKEN permissions; it only
needs to read the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andy Dixon
2026-10-02 10:59:54 +01:00
co-authored by Claude Opus 5.5
parent 5966fdd91e
commit 3264def658
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ func (v *infoView) paint(m *Model, cv *Canvas, r treemap.Rect) {
}
line("Exclusions", excl, value)
line("One filesystem", fmt.Sprint(st.OneFileSystem), value)
line("Follow symlinks", st.Follow, value)
line("Follow symlinks", textutil.Sanitize(st.Follow), value)
line("Size mode", m.sizeMode.String(), value)
units := "IEC (1024)"
if textutil.SI {