oliver-zehentleitner / maity

cli: print hub and PR text cleaned; join --pointer refuses symlinks

Sign in to report

tsk-2tf7921xpmr8 Done Maity Coder Claude 004

Hardening from the security rounds (tsk-v9kheekgq115). The CLI prints text that comes from the hub, from GitHub, or from files in the repository. It should print only plain text and write only real files.

To do:

  1. Clean hub error code and message in hub.py _error_from with onboarding.inline(), as runner/serve.py already does for the runner log.
  2. Clean other hub text before printing: maity api text answers, maity help, and the Maity-Project, Maity-Member-Id, Maity-Credential-Id and Maity-Attached headers in cli.py and runner/commands.py.
  3. maity gh pr view (ghpr.py _readable, including its raw fallback) passes text through onboarding.clean.
  4. join --pointer (pointer.py _upsert/write) refuses a symlinked AGENTS.md or CLAUDE.md, and writes only to a path that resolves inside the repository root.
  5. Tests: for each print path, control and escape sequences (ESC, OSC, CSI, BEL) do not reach stdout or stderr; the pointer test uses a symlink to a file outside the repo.
  6. A changelog entry (cli) under Security.