Repository navigation
Approve agent connections once per agent app (#13) - #15
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bind remembered approval to a registered direct host and its protected key. Require explicit live-session approval when the host cannot be verified. Keep revocation, receipt and draft retry state scoped to each approved client. Agent: Codex
…13) Identify the agent app that launches the helper by its code signature: team ID (or leaf certificate without a team) plus signing identifier. Any hardened, certificate-signed, non-platform app now gets a durable approval; the CodebasicTTSDirectMCPHost Info.plist key that no real agent app carries is no longer required. Hosts may have entitlements other than get-task-allow and dyld environment variables. Ad-hoc, unsigned, shell or system-interpreter launchers still get a one-run approval. An approval no longer lapses after 30 idle days; it ends only on revocation, a different signer or app, or a replaced helper key. Add AgentTrustStoreTests to ./build.sh test. Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Add the [AGENT-CONN] category so the persistent per-app approval can be verified from the unified log: which app identity reconnected, whether it was recognized, and what it got. No draft text or key material. Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Manual testing with Claude Code (a 366 MB signed binary) showed no approval request: validating the host signature takes about a second on the main thread, past the 750 ms pairing deadline, so hello answered unavailable. Compute the host identity on the socket thread before the main-thread hop and cache it per running parent process (pid, start time, executable path), so later checks, including the per-request delivery verifier, are cheap. Drop the redundant second validity check; process identity is re-checked instead. Log main-deadline timeouts. Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
) Manual testing found that a Keychain key created by a self-signed helper (no Team ID) is bound to that build's cdhash. After any rebuild or update the new helper gets errSecAuthFailed (-25293) on signing, and since an inaccessible key is never replaced, the approved app could not connect again. Store the key per identified app in ~/Library/Application Support/Codebasic TTS/agent-client-keys (0700 dir, 0600 file, no symlinks, single link, created atomically). Approval stays bound to the launching app's code signature. --forget-key deletes the file. Fixtures keep using their own key directory. Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
6b8b93e to
15da9e9
Compare
|
복구 PR #23이 병합된 독립 검토를 요청합니다. 특히 @codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15da9e9f17
ℹ️ 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".
…lusive rename (#13) Turning receipt back on (master switch or per-client resume) clears the client's rate state again, as the docs say and the earlier code did. The helper key file is published with renamex_np(RENAME_EXCL) instead of link()+unlink(), so a helper killed mid-creation can no longer leave a key with st_nlink == 2 that the reader rejects forever. Addresses Codex review on PR #15 (discussion_r4698613638, discussion_r4698613629). Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
증거 기반 병합 (AGENTS.md "합의 대신 증거로 진행")독립 검토를 요청한 지(17:36Z) 6시간이 지났습니다. 아래 근거로
미검증: 재구성한 헤드로 만든 검토판에서 실제 Claude Code가 재승인 없이 다시 연결되는지, 그리고 이전 기능(세로 목록, DB 복원)이 화면에 함께 보이는지는 아직 사용자가 확인하지 않았습니다. 서로 다른 실제 앱 두 개를 동시에 승인하는 경우도 확인하지 않았습니다. Generated by Claude Code |
Requested by 이성주 · project thread
Refs #13 · 대상 브랜치
integration/issue-13(main아님)요청
에이전트 앱 단위로 연결하고, 한 번 승인받은 앱은 다시 승인받지 않아도 되게 한다.
기준 변경 (2026-11-25)
처음에는 이전 기능(받은 대본 DB 저장, 세로 대본 목록 등)이 빠진 Codex 후보
9f058b4위에 올렸습니다. 그래서 검토판에서 그 기능들이 회귀했습니다. 복구 PR #23(13개 커밋과 Codex 리뷰 수정c21eb08)이integration/issue-13(bced973)에 병합된 뒤, 이 PR을 그 위로 다시 올렸습니다(force-with-lease,6b8b93e→15da9e9). 이전 헤드는6b8b93e에 남아 있습니다.구성 (9개 커밋)
05e167bCodex: 앱별 연결·승인·받기·철회·재시도 상태를 분리. 승인 기록agent-clients.json(0600), 앱별 받기 일시 중지·승인 철회 UI, stdio MCP fixture. 원래 커밋은 0600eb9이고, 전체 기능이 들어 있는 줄기 위에서 작성된 판입니다.f46e566: 영구 승인에 필요하던 opt-in Info.plist 키와 미사용 만료를 없앴습니다.72984f5,8661758,a9d561e,18aac11:[AGENT-CONN]연결·승인·철회 로그(categoryagent)와 수집 문서를 넣었습니다.51d4a75: 호스트 서명 검증을 메인 스레드 밖에서 하고 프로세스별로 캐시합니다. 366MB 바이너리에서 750ms 데드라인을 넘기던 문제를 고쳤습니다.99adc38: 도우미 연결 키를 키체인 대신 개인 파일(0600)에 둡니다. 키체인 키가 cdhash에 묶여 재빌드 뒤 접근할 수 없던 문제를 고쳤습니다.15da9e9: 신뢰 저장소 테스트를 "승인은 유휴 시간으로 만료되지 않음"(1년 뒤에도 trusted)으로 바꿨습니다."에이전트 앱" 식별자
도우미를 직접 실행한 부모 프로세스의 코드 서명으로 앱을 구분합니다. 형식은
registered-v1:<team.TEAMID | 리프 인증서 해시>:<코드 서명 식별자>이고, 앱 이름·경로·PID는 쓰지 않습니다. 예:registered-v1:team.Q6L2SF6YDW:com.anthropic.claude-code.영구 승인 조건은 다음과 같습니다. 유효한 인증서 서명(애드혹 제외), 강화 런타임, macOS 플랫폼 코드가 아님,
get-task-allow·allow-dyld-environment-variables없음, 번들이면 번들 ID와 서명 식별자가 같음. 이 조건을 못 채우는 호스트는 실행할 때마다 승인합니다.승인은 만료되지 않습니다. 승인 철회, 서명이나 앱 변경, 키 교체로만 끝납니다.
알려진 한계: 같은 서명된 런타임(예: 공용
node)이 직접 실행하는 서로 다른 도구는 같은 앱으로 보입니다. 연결 키는 사용자 전용 파일이라 추출할 수 없는 키는 아닙니다.운영 로그
macOS 27.2.1 (26B131), CommandLineTools Swift 6.4.2, Xcode 없음. 기본 SDK(27.2)는
SwiftUIMacros문제로main도 실패하므로SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk를 지정합니다.15da9e9./build.sh build(애드혹 서명, 실제 서명 키 미사용)15da9e9./build.sh test15da9e9Tests/Fixtures/run_agent_app_connections.py(일회용 자체 서명 인증서와 rcodesign)f5bd58b(재구성 전)scope=persistent result=ok, 이후lookup=trusted(클릭 없음)fixture 수는 이전 기록에 11/11로 적었지만, 스크립트의 check는 10개입니다. 10/10이 전체입니다.
남은 확인 항목
15da9e9검토판에서 실제 Claude Code 재연결(재승인 없음)과, 세로 대본 목록·DB 복원이 함께 동작하는지AgentCatalogTests.swift:450요약 출력 문구에 "expiry"가 남아 있음(테스트 동작은 "만료 없음")참여 에이전트
🤖 Generated with Claude Code
https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP