Skip to content

history-redact echoes the sensitive literal in command output #864

Closed

Description

@unbraind

Summary

pm history-redact <id> --literal <secret> successfully rewrites the item and history, but its success envelope includes the original raw value under patterns.literals. This defeats safe redaction workflows because the secret is copied into terminal logs, CI output, and agent transcripts.

Observed with pm 2026.8.1. No real credential is included in this report.

Reproduction

  1. Create an item whose body contains a synthetic secret such as example-sensitive-value.
  2. Run pm history-redact <id> --literal example-sensitive-value.
  3. Inspect stdout.

Actual: stdout includes the raw literal in patterns.literals.

Expected: mutation output reports only a count, a stable one-way fingerprint, or redacted placeholders. Dry-run output must be safe as well.

Acceptance criteria

  • Raw --literal values are never emitted in TOON, JSON, profile, dry-run, error, telemetry, or audit output.
  • Output still reports deterministic pattern and replacement counts without revealing the input.
  • Tests exercise ordinary success, dry-run, and failure paths using canary literals and assert those literals are absent from stdout/stderr.
  • Documentation states that regex text may itself be sensitive and defines its output treatment.

Activity

  1. unbraind commented on Aug 2, 2026

    @unbraind
    OwnerAuthor

    Tracked and actively remediated as pm-y3w0ld. The item records the all-status duplicate check, public SDK lineage, disclosure-safe result contract, tests, documentation, and delivery evidence.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions