feat(zsh-fork): update patch to support command origins#12053
feat(zsh-fork): update patch to support command origins#12053
Conversation
b393a36 to
4acb5cd
Compare
4acb5cd to
4784ac2
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4784ac20bf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| git clone "$ZSH_REMOTE" "$ZSH_SRC_DIR" | ||
| fi | ||
|
|
||
| git -C "$ZSH_SRC_DIR" fetch --depth 1 origin "$ZSH_COMMIT" |
There was a problem hiding this comment.
Honor ZSH_REMOTE when fetching existing clones
The script advertises ZSH_REMOTE as an override, but the fetch step is hardcoded to origin. If ZSH_SRC_DIR already exists and origin points elsewhere (or lacks the pinned commit), the build fails or fetches from the wrong upstream. This makes the documented override ineffective for common existing-clone workflows.
Useful? React with 👍 / 👎.
|
discussed with @nornagon-openai offline, will close for now and let execve trigger whenever it's triggered, and rely on execpolicy approvals and persistence to shore things up. much safer to do it this way. there could be a followup here though if users get confused in a scenario like this:
|
Summary
Update the zsh patch to support associating commands by
origin, plus a reproducible local build script.This PR is intentionally scoped to artifact/tooling only:
build-patched-zsh.shto build that patched zsh at a pinned upstream commit (found this helpful when developing locally)Motivation
To support zsh-based execve interception, we need to figure out whether commands were run as part of startup scripts or whether they were actually model-generated commands.
What’s in this PR
1) Patch update for zsh exec wrapper support
Key additions in the patch:
This allows us to skip approvals when running startup scripts (i.e.
~/.zlogin, etc. ) while still intercepting model-generated subcommand execs.2) Build helper for patched zsh
Script behavior:
This provides a repeatable local flow for producing the patched zsh binary. Found this helpful when developing locally.