Skip to content

Enhancement: redact absolute home-directory paths from default machine-readable outputs #282

Closed

Description

@vibgrate-team

Context

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

  1. Inventory default JSON/SARIF/report fields that currently emit absolute paths under the scan root’s home prefix.
  2. 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.
  3. Add a focused test: home-prefixed fixture paths do not appear in default machine-readable output.

Acceptance

  • Default machine-readable outputs omit absolute home-directory prefixes
  • Deterministic relative paths for identical inputs
  • Test coverage; DCO; no secrets in messages

Activity

  1. added
    enhancement
    on Sep 28, 2026
  2. vibgrate-team commented on Oct 3, 2026

    @vibgrate-team
    ContributorAuthor

    Spec notes for implementers

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions