You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: redact absolute home-directory paths from default machine-readable outputs #282
Local-first CLIs often embed absolute paths (/Users/…, /home/…) in JSON/SARIF when reporting file locations. Sharing vg scan / vg report artifacts then leaks usernames and machine layout. Default machine-readable output should prefer repo-relative paths (or a stable redaction) so artifacts are shareable without scrubbing by hand. Determinism: same tree → same relative paths.
What to do
Inventory default JSON/SARIF/report fields that currently emit absolute paths under the scan root’s home prefix.
Prefer paths relative to the scan/build root in defaults; keep an explicit opt-in only if absolute paths are required for a documented CI case.
Add a focused test: home-prefixed fixture paths do not appear in default machine-readable output.
Problem. Absolute paths under $HOME in default JSON/SARIF/report artifacts leak usernames and machine layout when artifacts are shared.
Approach. Prefer paths relative to the scan/build root in default machine-readable outputs. Only keep an absolute-path opt-in if a documented CI consumer requires it. Same tree → same relative path strings (determinism).
Where to audit. SARIF artifactLocation.uri / finding location fields (src/core-open/formatters/sarif.ts), scan JSON finding locations, and any report writer that joins os.homedir() or absolute path.resolve results into emitted artifacts.
Acceptance. Fixture under a home-like absolute root must not emit that home prefix in default JSON/SARIF. Messages must not dump secrets. Do not rewrite operator-facing TTY paths if relative form would confuse local debugging — scope this to machine-readable defaults.
Activity
vibgrate-team commentedon Oct 3, 2026
Spec notes for implementers
Problem. Absolute paths under
$HOMEin default JSON/SARIF/report artifacts leak usernames and machine layout when artifacts are shared.Approach. Prefer paths relative to the scan/build root in default machine-readable outputs. Only keep an absolute-path opt-in if a documented CI consumer requires it. Same tree → same relative path strings (determinism).
Where to audit. SARIF
artifactLocation.uri/ findinglocationfields (src/core-open/formatters/sarif.ts), scan JSON finding locations, and any report writer that joinsos.homedir()or absolutepath.resolveresults into emitted artifacts.Acceptance. Fixture under a home-like absolute root must not emit that home prefix in default JSON/SARIF. Messages must not dump secrets. Do not rewrite operator-facing TTY paths if relative form would confuse local debugging — scope this to machine-readable defaults.