Skip to content

[P3][cli] Sanitize CLI get/scan output against terminal escape injection #37

Description

@cevheri

Summary

CLI get/scan print raw bytes to terminal. Untrusted binary values can inject ANSI escape sequences (terminal control / social engineering).

Audit ID: Section 4 Low — Wave 3
Location: src/cli/run.ts:125

Fix

  • Default: hex-encode non-printable bytes or use JSON.stringify on UTF-8 safe subset.
  • Flag --raw for power users who want literal output.

Acceptance criteria

  • Safe default output for untrusted data.
  • Test with \x1b sequence in value.
  • Changeset (CLI UX).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliPre-announcement auditbugSomething isn't workingpriority/lowPre-announcement audit

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions