feat(secrets): fnox を tier 分離し tier1 を対話シェルに自動ロード#58
Merged
Conversation
秘密を2段 tier に分け、日常の API キーは自動ロード/機密は守る両立にする。 - fnox: K35O_BOT_*(GitHub App 秘密鍵=tier2) を [secrets] → [profiles.bot.secrets] に分離。 default の exec/export には載らず `fnox exec -P bot` で取得。SAKANA 等の API キー(tier1)は [secrets] のまま。 - zsh: aliases.zsh をテンプレ化し、個人機の対話シェル(CLAUDECODE 以外)で tier1 を `eval "$(fnox export -f env)"` で自動ロード。素の codex 等が鍵を読める。 新しい API キーは [secrets] に足すだけで自動で載る。 - new-project スキル: bot secret 投入を `fnox exec -P bot` に。 - CLAUDE.md: tier 運用を記載。 旧 codex ラッパー(PR #57)はこれに置換しクローズ済み。 実機検証: 対話=SAKANA載る/bot載らない・エージェント=載らない・-P bot=bot取得可・codex doctor auth ✓。
4b64ea3 to
3bff4cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
fnox の秘密を 2段 tier に分け、「日常の API キーは自動ロードで何でも素で動く/GitHub App 秘密鍵などの機密は常駐させず守る」を両立する。codex の
Missing SAKANA_API_KEY問題の恒久対応でもある(ラッパー方式 PR #57 を置換)。tier 設計
[secrets]SAKANA_API_KEY等 API キーfnox exec --[profiles.bot]K35O_BOT_*(GitHub App 秘密鍵)fnox exec -P bot --のみ。常駐しない将来: 新しい秘密は「常駐してよい→
[secrets]/機密→profile」に振り分けるだけ(スケールする)。変更
dot_config/fnox/config.toml:K35O_BOT_*を[profiles.bot.secrets]へ移動。dot_config/zsh/aliases.zsh→.tmpl:profile=personalかつCLAUDECODE以外の対話シェルでeval "$(fnox export -f env)"(tier1 のみ/~50ms・keychain プロンプト無し)。dot_agents/skills/new-project/SKILL.md: bot 投入をfnox exec -P botに。dot_claude/CLAUDE.md: tier 運用を記載。気をつける点
fnox export(default profile) は tier2 を除外、hook-env/fnox activateは除外できない(全部載る)ため export 方式を採用。mcp__fnox__execは元々値が空([mcp] secrets=[])。bot は CLIfnox exec -P botで。fnox exec。テスト(実機)
対話シェル=SAKANA載る/bot載らない・エージェント=載らない・
fnox exec -P bot=bot取得可(len 1674)・codex doctorの auth ✓。