Skip to content

fix(db): scrub /root/ and /var/ paths from product-usage metadata#1459

Open
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:fix/product-usage-root-var-paths
Open

fix(db): scrub /root/ and /var/ paths from product-usage metadata#1459
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:fix/product-usage-root-var-paths

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extends PRODUCT_USAGE_LOCAL_PATH in repositories.ts to redact /root/ and /var/ absolute paths before product-usage events are persisted.
  • Aligns the telemetry scrubber with the canonical public boundary (/root/ already redacted elsewhere; /var/ was missing here).

Related: #1418 (single-surface slice)

Test plan

  • npx vitest run test/unit/product-usage.test.ts -t "redacts sensitive metadata"
  • Metadata fixture includes /root/work/... and /var/log/... paths; persisted JSON must not contain them

@kiannidev kiannidev requested a review from JSONbored as a code owner June 26, 2026 10:24
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown

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 (e7d9bf1).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1459   +/-   ##
=======================================
  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/db/repositories.ts 96.12% <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 - worth 0.5x multiplier. label Jun 26, 2026
Extend the product-usage local-path redactor so telemetry metadata cannot persist /root/ or /var/ absolute paths in D1.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev kiannidev force-pushed the fix/product-usage-root-var-paths branch from 4a997d1 to e7d9bf1 Compare June 26, 2026 22:20
@gittensory-orb

gittensory-orb Bot commented Jun 27, 2026

Copy link
Copy Markdown

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review — safe to merge

2 files · 1 AI reviewers · no blockers · readiness 66/100 · CI green · blocked

✅ Approved — safe to merge

Signal Result Evidence
Code review ✅ No blockers 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 48 open PR(s), 9 likely reviewable, 39 unlinked.
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 3059 PR(s), 55 issue(s).
Gate result ✅ Passing No configured blocker found.
Nits — 2 non-blocking
  • Repository config was not parsed
  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
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: 3059 PR(s), 55 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.

🟩 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

@gittensory-orb gittensory-orb Bot added the gittensor Gittensor contributor context label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix - worth 0.5x multiplier. gittensor Gittensor contributor context size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants