Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d21008a427
ℹ️ 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".
| try { | ||
| await runActiveAgentsInstallScript(candidate.repoRoot, candidate.installScriptPath); | ||
| } catch (error) { |
There was a problem hiding this comment.
Require consent before executing workspace install script
maybeAutoUpdateActiveAgentsExtension executes candidate.installScriptPath directly from the opened workspace as soon as it finds a higher vscode/guardex-active-agents/package.json version, which means startup can run arbitrary Node.js code from a repo without an explicit confirmation step. In a trusted workspace, a malicious repository can ship those two files and trigger local code execution automatically; this update path should require a user prompt (or verify a trusted source) before running any workspace script.
Useful? React with 👍 / 👎.
| function stageWorktreeForCommit(worktreePath) { | ||
| runGitCommand(worktreePath, ['add', '-A', '--', '.', `:(exclude)${LOCK_FILE_RELATIVE}`]); | ||
| } |
There was a problem hiding this comment.
Exclude AGENT.lock when staging selected session commits
stageWorktreeForCommit excludes only .omx/state/agent-file-locks.json from git add -A, but Guardex worktrees also use a root-level AGENT.lock telemetry file that the rest of this feature intentionally treats as non-user work (for example, session activity collection filters it out). In managed worktrees, the “Commit Selected Session” action will therefore stage and commit AGENT.lock unexpectedly.
Useful? React with 👍 / 👎.
| echo "[gitguardex-shim] Missing gx CLI in PATH." >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Avoid hard-failing hooks when Guardex CLI is absent
The hook shim exits non-zero when neither gx nor gitguardex is installed, so any repo using this hooks path will have Git operations blocked even though the repo contract allows Guardex to be disabled via GUARDEX_ON=0. Because this script never checks the repo toggle before exiting, it can prevent commits/pushes in environments that intentionally turned Guardex off.
Useful? React with 👍 / 👎.
Automated by gx branch finish (PR flow).