codex/codex-rs/shell-command/src
viyatb-oai 1c5ca2a979 Support remote credential masking with Zsh shell snapshots (#54432)
## Why

Remote credential masking previously supported only Bash commands without login startup or shell snapshots, leaving Zsh commands with unmasked credentials.

## What changed

- Enable masking for Zsh login commands using shell snapshots on Linux and macOS.
- Capture trusted startup profiles per launch, bind the credential broker to the resulting environment, and replace credentials and supported aliases with placeholders before snapshot replay.
- Preserve explicit environment overrides, credential unsets, and launcher-managed proxy settings during replay.
- Warn and fall back to unmasked startup when a snapshot cannot safely replay credentials; stop execution if protected snapshot restoration fails.

## Testing

Extend remote execution tests for inherited and profile-defined credentials, overrides, destination changes, and unsupported-profile fallback. Add a Zsh scenario snapshot showing a credential placeholder in command output.

GitOrigin-RevId: 83193d6cbc05f3deb0d6d0b9ae80974b353ce900
History 2026-10-15 22:25:58 +00:00
..
command_safety Avoid false URL-launch detections in literal PowerShell commands (#54076) 2026-10-14 19:47:50 +00:00
bash.rs Retire the untrusted approval policy (#39630) 2026-08-20 07:03:02 +00:00
lib.rs Extract reusable Bash and Zsh startup scripts (#45749) 2026-09-15 18:06:03 +00:00
parse_command.rs Fail closed on unsafe config and sed parsing (#39700) 2026-08-20 11:52:46 +00:00
powershell.rs Retire the untrusted approval policy (#39630) 2026-08-20 07:03:02 +00:00
shell_detect.rs Add a bubblewrap backend for sandbox integrity checks (#51840) 2026-10-07 21:50:48 +00:00
shell_snapshot.rs Support remote credential masking with Zsh shell snapshots (#54432) 2026-10-15 22:25:58 +00:00
shell_snapshot_capture.rs Expose originating tool call metadata in command environments (#52119) 2026-10-08 13:45:19 +00:00
shell_snapshot_credentials.rs Support remote credential masking with Zsh shell snapshots (#54432) 2026-10-15 22:25:58 +00:00
shell_snapshot_exports.rs Remove the patched zsh shell execution backend (#52160) 2026-10-08 16:19:09 +00:00
shell_snapshot_literals.rs Harden credential handling in shell snapshots and replay (#44040) 2026-09-09 04:00:10 +00:00
shell_snapshot_render.rs Support remote credential masking with Zsh shell snapshots (#54432) 2026-10-15 22:25:58 +00:00
shell_snapshot_restore.rs Support remote credential masking with Zsh shell snapshots (#54432) 2026-10-15 22:25:58 +00:00
shell_snapshot_tests.rs Expose originating tool call metadata in command environments (#52119) 2026-10-08 13:45:19 +00:00
startup.rs Extract reusable Bash and Zsh startup scripts (#45749) 2026-09-15 18:06:03 +00:00