Skip to content

feat(signals): redact /var/ paths on the public-safety boundary#1457

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/signals-redact-var-paths
Jun 28, 2026
Merged

feat(signals): redact /var/ paths on the public-safety boundary#1457
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/signals-redact-var-paths

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extends the canonical PUBLIC_UNSAFE_PATTERN in redaction.ts to treat /var/ local paths as unsafe on public GitHub surfaces.
  • Closes the gap where /root/ was already redacted but macOS/Linux /var/folders/... and /var/log/... paths could leak through isPublicSafeText.

Related: #1307 (slice), #1418

Test plan

  • npx vitest run test/unit/redaction.test.ts
  • Assert /var/log/... and /var/folders/... are rejected

@kiannidev
kiannidev requested a review from JSONbored as a code owner June 26, 2026 10:23
@dosubot dosubot Bot added the size:XS label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.38%. Comparing base (9e1c351) to head (1805afd).
⚠️ Report is 100 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1457   +/-   ##
=======================================
  Coverage   95.38%   95.38%           
=======================================
  Files         201      201           
  Lines       21598    21598           
  Branches     7807     7807           
=======================================
  Hits        20601    20601           
  Misses        416      416           
  Partials      581      581           
Files with missing lines Coverage Δ
src/signals/redaction.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 26, 2026
Extend the canonical PUBLIC_UNSAFE_PATTERN so /var/ local paths are blocked on public GitHub surfaces alongside /root/ and /tmp/.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev force-pushed the feat/signals-redact-var-paths branch from 1ed8a39 to 1805afd Compare June 26, 2026 22:20
@loopover-orb

loopover-orb Bot commented Jun 27, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review — closed

2 files · 1 AI reviewers · 1 blocker · readiness 66/100 · CI green · unknown

🛑 Closed — Readiness score is below the configured threshold — Address the short explicit PR panel actions, then re-run the gate.

Review summary
This change correctly extends the shared public-safety regex so absolute `/var/...` paths are rejected by `isPublicSafeText`, matching the existing treatment for other local filesystem roots. The test update covers both a common Linux service path and the macOS `/var/folders/...` shape, so the new branch is exercised directly. The change is small, localized, and consistent with the existing canonical boundary design.

Why this is blocked

  • Readiness score is below the configured threshold — Address the short explicit PR panel actions, then re-run the gate.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewers, synthesized
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Review load ✅ 20/20 Readiness component derived from cached public PR metadata and labels; size label size:XS.
Validation evidence ❌ 5/25 Cached preflight status is hold.
Open PR queue ❌ 3/10 24 open PR(s), 14 likely reviewable, 10 unlinked.
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 3213 PR(s), 48 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Nits — 3 non-blocking
  • nit: `test/unit/redaction.test.ts:42` could include an embedded sentence form such as `failed at /var/log/app.log` so the new case mirrors the existing inline `/root/` coverage, though the regex is already unanchored and the current assertions prove the core behavior.
  • In `test/unit/redaction.test.ts:42`, consider making one `/var/` assertion an inline log/message string to document the exact public-surface leak scenario this is preventing.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 3213 PR(s), 48 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Fix blocker.
  • Expect slower review.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Review details

Generated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative.

This change correctly extends the shared public-safety regex so absolute `/var/...` paths are rejected by `isPublicSafeText`, matching the existing treatment for other local filesystem roots. The test update covers both a common Linux service path and the macOS `/var/folders/...` shape, so the new branch is exercised directly. The change is small, localized, and consistent with the existing canonical boundary design.

Nits (2)

  • nit: `test/unit/redaction.test.ts:42` could include an embedded sentence form such as `failed at /var/log/app.log` so the new case mirrors the existing inline `/root/` coverage, though the regex is already unanchored and the current assertions prove the core behavior.
  • In `test/unit/redaction.test.ts:42`, consider making one `/var/` assertion an inline log/message string to document the exact public-surface leak scenario this is preventing.

🟩 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.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 27, 2026
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jun 27, 2026
@loopover-orb loopover-orb Bot added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 27, 2026
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jun 28, 2026
@dosubot dosubot Bot added the lgtm label Jun 28, 2026
@JSONbored
JSONbored merged commit 8e6015c into JSONbored:main Jun 28, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 28, 2026
@loopover-orb loopover-orb Bot added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants