Skip to content

fix(sandbox): match the Codex plugin script under any numeric version - #302

Merged
furedea merged 2 commits into
mainfrom
fix/codex-plugin-version
Oct 23, 2026
Merged

furedea merged 2 commits into
mainfrom
fix/codex-plugin-version

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

概要

Codex プラグインのバージョンが上がるたびに excludedCommands が合わなくなる問題を直す.excludedCommands のバージョン部分を * にし,guard_command.py が厳密なパス(Path.home() で展開した絶対パス.引用符付きのリテラル ~ は node が cwd 相対で解決するため拒否)だけを許可する.

変更前後

項目 変更前 変更後
excludedCommands node "/Users/kaito/.claude/plugins/cache/openai-codex/codex/1.0.3/scripts/codex-companion.mjs" * node "~/.claude/plugins/cache/openai-codex/codex/*/scripts/codex-companion.mjs" *
guard のパス検査 ファイル名が codex-companion.mjs なら許可 <home>/.claude/plugins/cache/openai-codex/codex/<数字>.<数字>.<数字>/scripts/codex-companion.mjs(Path.home() で展開した絶対パス)だけ許可
拒否するもの なし ..,別ディレクトリ,別ファイル,数字でないバージョン

確認事項

  • ドキュメント上,excludedCommands は Bash(...) の権限ルールと同じ構文で,途中の * に対応すると読める.ただし sandbox.excludedCommands の設定リファレンス本体は読めず,先頭の ~/ の展開についても記載がない.
  • そのため,switch 後に親が実際の呼び出しで,~/ と途中の * が合うことを確かめる.

受け入れ条件

  • guard のテストを先に書き,失敗を確認してから実装した
  • 正しいバージョンの絶対パスを許可し,引用符付きのリテラル ~ を拒否する
  • ..,別ディレクトリ,別ファイル,数字でないバージョンを拒否する
  • 単一コマンド,$ なし,バッククォートなしの既存ルールを維持する
  • uv run pytest tests/agents 2345 件成功
  • lefthook run pre-commit --all-files 成功
  • switch 後に Codex プラグインの呼び出しが sandbox の外で動くことを親が確認する

Closes #301

🤖 Generated with Claude Code

furedea and others added 2 commits October 23, 2026 13:15
…script

A quoted ~ is not expanded by the shell, so node resolves it relative to
the writable cwd and would run a planted script outside the sandbox.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea-agent
furedea-agent Bot force-pushed the fix/codex-plugin-version branch from bdc2bd8 to 82625f0 Compare October 23, 2026 04:17
@furedea
furedea merged commit ba597ec into main Oct 23, 2026
11 checks passed
@furedea
furedea deleted the fix/codex-plugin-version branch October 23, 2026 04:58
furedea added a commit that referenced this pull request Dec 2, 2026
…#554)

## 概要

ADR を「今有効な決定だけ」にし,front matter と `adr-check` を廃止します.Refs
furedea/agent-config#293

- `reusable-workflows` を v2.0.0(`bc856b7`)に,`agent-config` を
v0.8.0(`f3f8716`)に更新しました.
- `adrCheckPackage` を削除しました.
- `docs/adr` の全 ADR から front matter を外し,置き換え済み・deprecated・rejected の ADR
25 件を削除しました.
- `madr-from: 45` は変更不要なので据え置きです.

## 削除した ADR → 内容の行き先

| 削除した ADR | 行き先 |
| ---------------------------------------------------------------- |
------------------------------------------------------------------------------------------------
|
| 0003,0004,0005,0009,0025 | 0050 の Considered Options に各案と捨てた理由を追記 |
| 0006 | 0007 に 1 文追記 |
| 0010,0011,0012,0013,0014,0019,0020,0021,0022,0042,0043 | 0044
に集約(launchd と `claude -p`,Apple Mail,`gogcli`,`gws`,EventKit,Hermes) |
| 0018 | 0051 の Considered Options と Context.0045 と 0053 の言及は 0051 に差し替え
|
| 0039 | 0040 に 1 文追記.README のリンクは 0040 のみに |
| 0054(rejected) | 0045 の Considered Options と「他の案が負けた点」 |
| 0016,0030 | agent-config ADR-0012 が引き継いでいるため,dotfiles 側には追記なし |
| 0028,0031,0034 | agent-config の ADR-0002,0004,0007 を指すだけのスタブで,v0.8.0
では指す先が削除済みのため削除 |

## 確認した proposed ADR

0046,0047,0049,0050,0051,0052,0053 はいずれも実装を確認し,front matter
だけを外しました.0054 は rejected になっていたので上表のとおり削除しました.

## 確認済み

- `nix flake check` が通ります.
- `dprint check` が通ります.
- `docs/adr` と README の相対リンク切れ,front matter の残り,削除済み番号への参照は 0 件です.

## レビューで見てほしいこと

- スタブ 0028,0031,0034 の削除(agent-config 側で畳まれた先は確認できていません).
- `herdrCorePackage` は agent-config の herdr-core
経路の削除(#297,#302)後も入れたままです.`hc` を使うものは無いので外せますが,インストール内容を変えるため別件にしました.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex プラグインの呼び出しを,プラグインのバージョンに依存せず sandbox の外で動かす

1 participant