fix(signals): redact /var/ paths in the manifest public-safe guard#1749
Conversation
isFocusManifestPublicSafe (the public-output safety gate for contributor-issue drafts and decision packs) lists local-filesystem path prefixes that must mirror the canonical PUBLIC_UNSAFE_PATTERN in redaction.ts, which redacts /Users/, /home/, /root/, /var/, and /tmp/. This guard still omits /var/, so a manifest string containing a /var/ path — /var/log/..., /var/folders/..., or a CI workspace under /var/ — passes as public-safe and leaks a local filesystem path into public output. Add /var/ to the path alternatives so the guard matches the canonical set exactly. Extends the existing path regression test with a /var/ case. No linked issue: a one-line, self-evident security fix that completes the canonical path parity, no behavior change beyond closing the leak, no API/schema/DB change.
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-06-29 21:47:56 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1749 +/- ##
=======================================
Coverage 95.59% 95.59%
=======================================
Files 204 204
Lines 22316 22316
Branches 8067 8067
=======================================
Hits 21332 21332
Misses 408 408
Partials 576 576
🚀 New features to boost your workflow:
|
The bug
isFocusManifestPublicSafe— the public-output safety gate used by contributor-issue drafts (src/services/contributor-issue-draft.ts) and decision packs (src/services/decision-pack.ts) — lists local-filesystem path prefixes that must mirror the canonicalPUBLIC_UNSAFE_PATTERNinsrc/signals/redaction.ts:/Users//home//root//tmp//var/So a manifest string containing a
/var/path —/var/log/...,/var/folders/...(macOS temp), or a CI workspace under/var/— passes as public-safe and leaks a local filesystem path into public output.The fix
Add
/var/to the path alternatives so the guard matches the canonical set exactly. One-line regex change; the forbidden-term list is untouched. This completes the canonical path parity for this guard.Tests
Extends the existing path regression test with a
/var/log/build.logcase (the test previously covered/Users/,/home/,/root/,/tmp/, and both Windows forms). Full local gate green; codecov patch covers the changed line; OpenAPI unchanged.No linked issue: a one-line, self-evident security fix — no behavior change beyond closing the leak, no API/schema/DB change.