trustdex 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.ko.md +391 -0
  2. package/README.md +39 -7
  3. package/SECURITY.md +4 -0
  4. package/bin/trustdex.mjs +24 -1
  5. package/docs/ARCHITECTURE.ko.md +52 -0
  6. package/docs/ARCHITECTURE.md +12 -1
  7. package/docs/CLAUDE.ko.md +122 -0
  8. package/docs/CLAUDE.md +50 -1
  9. package/docs/CODEX.ko.md +98 -0
  10. package/docs/CODEX.md +41 -4
  11. package/docs/DEFENSIVE_USE_CASE.ko.md +85 -0
  12. package/docs/DEFENSIVE_USE_CASE.md +89 -0
  13. package/docs/EVALUATION.ko.md +67 -0
  14. package/docs/EVALUATION.md +36 -1
  15. package/docs/RELEASING.ko.md +70 -0
  16. package/docs/RELEASING.md +4 -0
  17. package/docs/ROADMAP.ko.md +46 -0
  18. package/docs/ROADMAP.md +14 -2
  19. package/docs/SECURITY_RESEARCH.ko.md +69 -0
  20. package/docs/SECURITY_RESEARCH.md +9 -0
  21. package/docs/THREAT_MODEL.ko.md +56 -0
  22. package/docs/THREAT_MODEL.md +10 -1
  23. package/docs/TRUST_STORE.ko.md +93 -0
  24. package/docs/TRUST_STORE.md +4 -0
  25. package/examples/adversarial/README.ko.md +31 -0
  26. package/examples/adversarial/README.md +31 -0
  27. package/examples/adversarial/drift-after.json +11 -0
  28. package/examples/adversarial/drift-before.json +8 -0
  29. package/examples/adversarial/expected.json +30 -0
  30. package/examples/adversarial/mcp-config.json +32 -0
  31. package/examples/adversarial/policy.json +10 -0
  32. package/examples/claude.mcp.json +24 -0
  33. package/examples/claude.policy.json +6 -0
  34. package/examples/claude.settings.json +26 -0
  35. package/examples/codex.config.toml +16 -0
  36. package/examples/codex.permissions.toml +13 -0
  37. package/examples/mcp.json +22 -0
  38. package/examples/trust-store.example.json +16 -0
  39. package/examples/trustdex.policy.json +14 -0
  40. package/package.json +4 -3
  41. package/src/claude-settings.mjs +173 -0
  42. package/src/codex-config.mjs +9 -7
  43. package/src/codex-settings.mjs +247 -0
  44. package/src/inspect.mjs +60 -3
  45. package/src/policy-packs.mjs +38 -2
package/README.ko.md ADDED
@@ -0,0 +1,391 @@
1
+ # TrustDex
2
+
3
+ <p align="right">
4
+ <a href="./README.md">English</a> | <strong>한국어</strong>
5
+ </p>
6
+
7
+ [![CI](https://github.com/grigent/trustdex/actions/workflows/ci.yml/badge.svg)](https://github.com/grigent/trustdex/actions/workflows/ci.yml)
8
+ [![CodeQL](https://github.com/grigent/trustdex/actions/workflows/codeql.yml/badge.svg)](https://github.com/grigent/trustdex/actions/workflows/codeql.yml)
9
+ [![Release](https://img.shields.io/github/v/release/grigent/trustdex)](https://github.com/grigent/trustdex/releases)
10
+ [![npm](https://img.shields.io/npm/v/trustdex)](https://www.npmjs.com/package/trustdex)
11
+ [![License](https://img.shields.io/github/license/grigent/trustdex)](LICENSE)
12
+
13
+ **AI 에이전트 도구를 위한 로컬 우선 신뢰 및 출처 검증 게이트입니다.**
14
+
15
+ TrustDex는 AI 에이전트가 어떤 MCP 서버, 스킬, 플러그인을 사용하도록 허용할지 판단하는 데 도움을 줍니다. 발견된 모든 확장을 신뢰하는 대신, TrustDex는 관찰 가능한 증거를 평가하여 다음 세 가지 결과 중 하나를 반환합니다.
16
+
17
+ - **ALLOW** - 명시적인 신뢰 정책과 일치
18
+ - **ASK** - 사람의 검토가 필요
19
+ - **BLOCK** - 현재 정책에서 신뢰되지 않음
20
+
21
+ > TrustDex는 보안 관련 인프라이며, 악성 코드 스캐너, 샌드박스 또는 인증 서비스가 아닙니다. ALLOW 결과는 검사된 증거가 사용자의 정책과 일치한다는 의미일 뿐입니다.
22
+
23
+ > **프로젝트 상태:** TrustDex는 초기 단계이며 파일럿 사용자를 찾고 있습니다. 보안 경계가 문서화되어 있고, 지원되는 Node.js 버전에서 변경 사항을 테스트하지만, 1.0 이전에는 호환성이 계속 변경될 수 있습니다. [로드맵](docs/ROADMAP.ko.md), [거버넌스](GOVERNANCE.ko.md), [지원 가이드](SUPPORT.ko.md)를 참고하세요.
24
+
25
+ ## TrustDex가 필요한 이유
26
+
27
+ AI 에이전트는 자격 증명을 받거나, 파일에 접근하거나, 원격 서비스에 연결하거나, 로컬 프로그램을 실행할 수 있는 서드파티 MCP 서버, 스킬, 플러그인에 점점 더 의존하고 있습니다. 패키지를 설치할 수 있다는 사실만으로 해당 패키지를 에이전트가 자동으로 사용할 수 있어서는 안 됩니다.
28
+
29
+ TrustDex는 **도구가 노출되기 전**에 의사 결정 계층을 추가합니다.
30
+
31
+ ```text
32
+ 사용자 요청
33
+ |
34
+ v
35
+ AI 에이전트 / Codex
36
+ |
37
+ v
38
+ TrustDex 정책 + 출처 검증 게이트
39
+ |-- ALLOW -> 도구 노출 가능
40
+ |-- ASK -> 사람의 검토 필요
41
+ `-- BLOCK -> 도구를 사용할 수 없도록 유지
42
+ ```
43
+
44
+ TrustDex는 이름, 스타 수 또는 브랜딩만으로 "공식" 여부를 추론하지 않습니다. 출처는 명시적이고 검토 가능한 증거로 확인해야 합니다.
45
+
46
+ ## 현재 코드에서 지원하는 기능
47
+
48
+ - 설정을 업로드하지 않고 로컬에서 MCP 서버 항목 검사
49
+ - 패키지, 원격, 로컬 및 알 수 없는 소스 구분
50
+ - 유동 버전, 실행 시 설치하는 런처, 셸 실행, 파일 시스템 경로로 보이는 인수, 비밀 정보로 보이는 환경 변수 이름, 원격 엔드포인트 등 신뢰 관련 신호 감지
51
+ - `SKILL.md` 파일 및 플러그인 매니페스트에서 신뢰 관련 메타데이터와 지침 검사
52
+ - 기본 제공 `strict`, `official-first`, `development` 정책 팩 적용
53
+ - 로컬 신뢰 저장소에서 명시적인 게시자/출처 주장 연결
54
+ - **ALLOW / ASK / BLOCK** 결정 출력
55
+ - 정책에서 승인된 도구만 포함하는 필터링된 MCP 설정 생성
56
+ - 스냅샷 생성 및 소스, 출처, 결정, 기능 드리프트 감지
57
+ - 검토된 스냅샷에 대한 Ed25519 서명 신뢰 기록 생성
58
+ - CI에서 GitHub Action으로 실행
59
+ - 비밀 값을 저장하지 않고 MCP 항목, 스킬 및 플러그인 매니페스트의 지문 생성
60
+ - Codex `config.toml`의 MCP 섹션 검사 및 필터링
61
+ - 경로 값을 보관하지 않고 Codex 승인, 샌드박스, 네트워크, 쓰기 가능 루트, 웹 검색 및 서브에이전트 설정 검사
62
+ - 명시적인 전송 방식 검증과 헤더 실행 제어를 포함해 Claude Code MCP JSON 검사 및 필터링
63
+ - 규칙 값을 보관하지 않고 자동 셸, 파일 시스템, 네트워크, MCP 및 서브에이전트 권한에 대해 Claude Code 권한 설정 검사
64
+ - GitHub, npm 및 공식 MCP Registry를 대상으로 명시적인 출처 조회 수행
65
+ - 최신 GitHub 릴리스 태그/커밋에 GitHub 검증 서명이 있는지 확인
66
+ - 서명된 검토 번들을 생성하고 신뢰 관련 상태가 변경되면 자동으로 재검토 요구
67
+ - 보고서의 원격 엔드포인트 세부 정보에서 자격 증명, 경로 및 쿼리 값 제거
68
+ - 엄격한 정책에서 URL에 포함된 자격 증명과 안전하지 않은 원격 전송 차단
69
+ - 여러 호스트에서 Windows 실행 파일 경로와 명령 래퍼를 일관되게 인식
70
+ - 지원하지 않는 Codex MCP 키와 하위 섹션을 발견하면 안전하게 실패
71
+ - 사용자가 제공한 패키지 바이트를 npm SRI 또는 MCP Registry SHA-256 메타데이터와 대조해 검증
72
+ - 무결성 기반 신뢰 증거를 설정된 패키지 버전에 연결하고 불일치 차단
73
+
74
+ ## 호환성
75
+
76
+ TrustDex에는 Node.js 20 이상이 필요합니다. CI는 Ubuntu에서 Node.js 20과 22로 전체 테스트 및 게이트 워크플로를 실행하고, 최신 Windows 및 macOS 러너에서는 Node.js 22로 실행합니다. 체크아웃된 복합 GitHub Action에는 전용 엔드투엔드 스모크 테스트가 있습니다.
77
+
78
+ ## 빠른 시작
79
+
80
+ Node.js 20 이상이 필요합니다.
81
+
82
+ npm에서 직접 실행:
83
+
84
+ ```bash
85
+ npx trustdex@0.6.0 --help
86
+ npx trustdex@0.6.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
87
+ ```
88
+
89
+ 또는 소스 체크아웃에서 작업:
90
+
91
+ ```bash
92
+ git clone https://github.com/grigent/trustdex.git
93
+ cd trustdex
94
+ npm test
95
+ npm run check
96
+
97
+ node ./bin/trustdex.mjs inspect ./examples/mcp.json \
98
+ --pack strict \
99
+ --policy ./examples/trustdex.policy.json
100
+ ```
101
+
102
+ 예제에는 의도적으로 알 수 없는 서버가 포함되어 있으므로 엄격한 검사는 0이 아닌 종료 코드를 반환합니다.
103
+
104
+ 검사의 종료 코드:
105
+
106
+ - `0` - 모든 항목 허용
107
+ - `1` - 하나 이상의 항목에 검토 필요
108
+ - `2` - 하나 이상의 항목이 차단되었거나 명령 실패
109
+
110
+ ## 재현 가능한 방어적 연구
111
+
112
+ TrustDex에는 서드파티 서비스에 연결하거나 실행하지 않고 정책 경계를 테스트할 수 있는 비활성 적대적 벤치마크가 포함되어 있습니다. 픽스처는 예약된 `.invalid` 도메인, 자리표시자 자격 증명 및 설정 데이터만 사용합니다. TrustDex는 이를 정적으로 검사하며 나열된 서버를 실행하지 않습니다.
113
+
114
+ ```bash
115
+ npm run test:research
116
+
117
+ node ./bin/trustdex.mjs inspect \
118
+ ./examples/adversarial/mcp-config.json \
119
+ --pack strict \
120
+ --policy ./examples/adversarial/policy.json
121
+ ```
122
+
123
+ 직접 검사는 의도적으로 종료 코드 `2`를 반환합니다. 체크인된 기대 결과는 `ALLOW` 1개, `ASK` 1개, `BLOCK` 5개입니다. 자동화된 테스트는 자리표시자 비밀 값이 결과에 나타나지 않는지, 비밀 정보를 포함하는 새 환경 변수가 이전 검토 상태를 무효화하는지도 확인합니다.
124
+
125
+ [방어적 AI 에이전트 보안 사용 사례](docs/DEFENSIVE_USE_CASE.ko.md), [방어적 보안 연구 정책](docs/SECURITY_RESEARCH.ko.md), [평가 기록](docs/EVALUATION.ko.md), [적대적 픽스처 가이드](examples/adversarial/README.ko.md)를 참고하세요.
126
+
127
+ ## 기본 제공 정책 팩
128
+
129
+ ```bash
130
+ node ./bin/trustdex.mjs policy strict
131
+ node ./bin/trustdex.mjs policy official-first
132
+ node ./bin/trustdex.mjs policy development
133
+ ```
134
+
135
+ `official-first`는 소위 공식 공급업체의 하드코딩된 목록을 유지하지 **않습니다**. 신뢰 저장소에 명시적인 출처 증거가 있는 소스(또는 사용자가 명시적으로 허용 목록에 추가한 소스)만 허용하며, 알 수 없는 서드파티 소스는 기본적으로 차단합니다.
136
+
137
+ [신뢰 저장소와 출처](docs/TRUST_STORE.ko.md)를 참고하세요.
138
+
139
+ ## 에이전트가 사용하기 전에 도구 필터링
140
+
141
+ ```bash
142
+ node ./bin/trustdex.mjs gate ./examples/mcp.json \
143
+ --pack official-first \
144
+ --out .trustdex/gated-mcp.json
145
+ ```
146
+
147
+ 기본적으로 `ALLOW` 항목만 게이트된 설정에 기록됩니다. `ASK` 항목은 검토될 때까지 제외됩니다.
148
+
149
+ 이것이 TrustDex의 핵심 경계입니다. 에이전트는 검토되지 않은 원본 설정 대신 필터링된 설정을 받습니다.
150
+
151
+ ## 스킬 및 플러그인 검사
152
+
153
+ ```bash
154
+ node ./bin/trustdex.mjs inspect-skill ./path/to/SKILL.md --pack strict
155
+ node ./bin/trustdex.mjs inspect-plugin ./path/to/plugin.json --pack strict
156
+ ```
157
+
158
+ 이 검사는 관찰 가능한 신뢰 신호를 드러냅니다. 확장이 안전하다는 것을 증명하지는 않습니다.
159
+
160
+ ## Codex config.toml
161
+
162
+ 현재 Codex 클라이언트는 `config.toml`의 `[mcp_servers.<name>]` 테이블 아래에 MCP 설정을 저장합니다. TrustDex는 해당 MCP 섹션을 위한 전용 어댑터를 제공합니다.
163
+
164
+ ```bash
165
+ node ./bin/trustdex.mjs inspect-codex ./examples/codex.config.toml --pack strict
166
+
167
+ node ./bin/trustdex.mjs gate-codex ./examples/codex.config.toml \
168
+ --pack strict \
169
+ --out .trustdex/gated-codex.toml
170
+ ```
171
+
172
+ 게이트는 승인되지 않은 MCP 섹션을 제거하면서 관련 없는 TOML 섹션은 유지합니다. TrustDex는 필요한 MCP 관련 TOML 구성만 의도적으로 파싱합니다. 지원하지 않는 MCP 구문은 조용히 신뢰하지 않고 실패합니다.
173
+
174
+ MCP 도구와 별도로 에이전트의 실행 경계를 검사하세요.
175
+
176
+ ```bash
177
+ node ./bin/trustdex.mjs inspect-codex-settings \
178
+ ./examples/codex.permissions.toml \
179
+ --pack strict
180
+ ```
181
+
182
+ 이 명령은 승인 정책, 샌드박스 종류, 네트워크 접근, 추가 쓰기 가능 루트 개수, 웹 검색 모드 및 명시적인 서브에이전트 활성화를 보고합니다. 쓰기 가능 경로나 관련 없는 설정의 값은 보관하지 않으며, 모든 설정 범위를 하나의 실제 런타임 정책으로 병합하지 않습니다.
183
+
184
+ 단계별 게이트 워크플로와 이 프로젝트가 자체 검토 과정에서 Codex를 사용하는 방법은 [Codex에서 TrustDex 사용하기](docs/CODEX.ko.md)를 참고하세요.
185
+
186
+ ## Claude Code MCP 설정
187
+
188
+ Claude Code는 `mcpServers` JSON 형식을 사용합니다. 전송 방식 변경, 인증 헤더 메타데이터 및 헤더 도우미 명령이 검사와 서명된 검토에 포함되도록 Claude 전용 명령을 사용하세요.
189
+
190
+ ```bash
191
+ node ./bin/trustdex.mjs inspect-claude ./.mcp.json --pack strict
192
+ node ./bin/trustdex.mjs gate-claude ./.mcp.json --pack strict --out .trustdex/claude-mcp.json
193
+ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
194
+ ```
195
+
196
+ Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.6.0`을 사용하세요.
197
+
198
+ 지원되는 설정, PowerShell 오류 처리, 서명된 검토 및 Claude Desktop 워크플로는 [Claude에서 TrustDex 사용하기](docs/CLAUDE.ko.md)를 참고하세요.
199
+
200
+ Claude Code 프로젝트 및 사용자 설정은 별도 확인 없이 실행되는 작업을 허용할 수도 있습니다. 문서화된 `permissions` 객체와 인접한 자동 실행 설정을 별도로 검사하세요.
201
+
202
+ ```bash
203
+ node ./bin/trustdex.mjs inspect-claude-settings \
204
+ ./.claude/settings.json \
205
+ --pack strict
206
+ ```
207
+
208
+ 이 명령은 구조적인 기능 증거만 보고합니다. 권한 지정자, 디렉터리 값, 훅 명령, 도메인, 자격 증명 도우미 값 또는 환경 값을 출력하거나 지문에 포함하지 않습니다. 이는 정적 검토 도구이며 설정 병합기나 런타임 샌드박스가 아닙니다.
209
+
210
+ ## 온라인 출처 관찰
211
+
212
+ 일반 검사는 계속 로컬에서만 수행됩니다. 다음 명령은 명시적으로 실행할 때만 네트워크 조회를 수행합니다.
213
+
214
+ ```bash
215
+ node ./bin/trustdex.mjs provenance github modelcontextprotocol/servers
216
+ node ./bin/trustdex.mjs provenance github-release owner/repository
217
+ node ./bin/trustdex.mjs provenance npm @scope/package
218
+ node ./bin/trustdex.mjs provenance mcp io.github.user/server
219
+ ```
220
+
221
+ 조회 결과는 **증거이지 신뢰가 아닙니다**. 증거를 로컬 신뢰 저장소의 주장으로 전환하려면 사용자가 게시자를 명시적으로 지정해야 합니다.
222
+
223
+ ```bash
224
+ node ./bin/trustdex.mjs trust-source mcp io.github.user/server \
225
+ --publisher "Example Publisher" \
226
+ --out ./trust-store.json
227
+ ```
228
+
229
+ `github-release`의 경우 GitHub가 릴리스 태그 또는 대상 커밋 서명을 검증된 것으로 보고하지 않으면 TrustDex는 신뢰 주장을 생성하지 않습니다.
230
+
231
+ ### 정확한 패키지 바이트 검증
232
+
233
+ 레지스트리 메타데이터는 예상 다이제스트를 식별할 수 있지만, 메타데이터만으로 다운로드한 파일이 해당 값과 일치한다는 것을 증명할 수는 없습니다. 검토한 정확한 패키지 아카이브 또는 아티팩트를 제공하세요.
234
+
235
+ ```bash
236
+ node ./bin/trustdex.mjs trust-source npm @scope/package \
237
+ --publisher "Example Publisher" \
238
+ --artifact ./scope-package-1.2.3.tgz \
239
+ --out ./trust-store.json
240
+
241
+ node ./bin/trustdex.mjs trust-source mcp io.github.user/server \
242
+ --publisher "Example Publisher" \
243
+ --artifact ./downloaded-package \
244
+ --out ./trust-store.json
245
+ ```
246
+
247
+ TrustDex는 파일을 로컬에서 읽고 해당 바이트를 npm SRI 메타데이터 또는 MCP Registry SHA-256 다이제스트와 비교합니다. 아티팩트를 다운로드하거나 실행하지 않습니다. 무결성 기반 증거는 특정 버전에 연결됩니다. 설정된 패키지 버전이 다르면 `artifact-version-mismatch`가 발생하며 차단됩니다.
248
+
249
+ ## 출처 신뢰 저장소
250
+
251
+ 예시:
252
+
253
+ ```json
254
+ {
255
+ "version": 1,
256
+ "claims": [
257
+ {
258
+ "type": "package",
259
+ "subject": "example-mcp-server",
260
+ "publisher": "Example Publisher",
261
+ "status": "verified",
262
+ "evidence": {
263
+ "kind": "manual-review",
264
+ "reference": "https://example.invalid/security-review"
265
+ }
266
+ }
267
+ ]
268
+ }
269
+ ```
270
+
271
+ 그런 다음:
272
+
273
+ ```bash
274
+ node ./bin/trustdex.mjs inspect ./mcp.json \
275
+ --pack official-first \
276
+ --trust-store ./trust-store.json
277
+ ```
278
+
279
+ 여기서 `verified`는 해당 신뢰 저장소에서 관리하는 증거에 따라 검증되었다는 뜻입니다. OpenAI, TrustDex, GitHub, npm 또는 다른 플랫폼이 확장을 인증했다는 의미가 아닙니다.
280
+
281
+ ## 기능 및 출처 드리프트
282
+
283
+ 기준선 저장:
284
+
285
+ ```bash
286
+ node ./bin/trustdex.mjs snapshot ./examples/mcp.json \
287
+ --pack strict \
288
+ --out .trustdex/baseline.json
289
+ ```
290
+
291
+ 업데이트 후 다른 스냅샷을 저장하고 비교:
292
+
293
+ ```bash
294
+ node ./bin/trustdex.mjs diff .trustdex/baseline.json .trustdex/current.json
295
+ ```
296
+
297
+ TrustDex는 새로 추가된 신호, 소스 변경, 출처 변경, 결정 변경, 콘텐츠/설정 지문 변경을 보고합니다.
298
+
299
+ 검토 워크플로에서는 서명 키를 한 번 생성하고 차단되지 않은 설정을 승인합니다.
300
+
301
+ ```bash
302
+ node ./bin/trustdex.mjs keygen \
303
+ --private .trustdex/private.pem \
304
+ --public .trustdex/public.pem
305
+
306
+ node ./bin/trustdex.mjs approve ./examples/mcp.json \
307
+ --private .trustdex/private.pem \
308
+ --dir .trustdex/review \
309
+ --pack development
310
+ ```
311
+
312
+ 나중에 해당 서명된 검토를 기준으로 현재 설정을 다시 평가합니다.
313
+
314
+ ```bash
315
+ node ./bin/trustdex.mjs recheck ./examples/mcp.json \
316
+ --review-dir .trustdex/review \
317
+ --public .trustdex/public.pem
318
+ ```
319
+
320
+ 결과는 `APPROVED`, `NEEDS_REVIEW` 또는 `INVALID`입니다. 지문, 소스, 출처, 신호 또는 정책 관련 변경이 발생하면 이전 상태의 일치가 무효화됩니다.
321
+
322
+ ## 서명된 신뢰 기록
323
+
324
+ 로컬 서명 키 생성:
325
+
326
+ ```bash
327
+ node ./bin/trustdex.mjs keygen \
328
+ --private .trustdex/trustdex-private.pem \
329
+ --public .trustdex/trustdex-public.pem
330
+ ```
331
+
332
+ 검토된 스냅샷 서명:
333
+
334
+ ```bash
335
+ node ./bin/trustdex.mjs sign .trustdex/baseline.json \
336
+ --private .trustdex/trustdex-private.pem \
337
+ --out .trustdex/trust-record.json
338
+ ```
339
+
340
+ 나중에 검증:
341
+
342
+ ```bash
343
+ node ./bin/trustdex.mjs verify .trustdex/trust-record.json \
344
+ --public .trustdex/trustdex-public.pem \
345
+ --snapshot .trustdex/baseline.json
346
+ ```
347
+
348
+ 비공개 키는 절대 커밋하면 안 됩니다.
349
+
350
+ ## GitHub Action
351
+
352
+ ```yaml
353
+ - uses: actions/checkout@v4
354
+
355
+ - uses: grigent/trustdex@v0.6.0
356
+ with:
357
+ config: ./mcp.json
358
+ pack: official-first
359
+ trust-store: ./trust-store.json
360
+ output: .trustdex/gated-mcp.json
361
+ ```
362
+
363
+ 프로덕션 CI에서는 이동하는 브랜치 대신 검토된 커밋 SHA에 Action을 고정하세요.
364
+
365
+ ## 원칙
366
+
367
+ 1. **로컬 우선.** 비공개 에이전트 설정이 컴퓨터 밖으로 나갈 필요가 없어야 합니다.
368
+ 2. **맹목적으로 신뢰하지 않기.** 출처가 없으면 추측으로 ALLOW하지 않고 검토하거나 거부해야 합니다.
369
+ 3. **출력에 비밀 값 포함 금지.** 환경 변수 이름은 보고할 수 있지만 값은 보고하지 않습니다.
370
+ 4. **드리프트는 중요합니다.** 신뢰 관련 변경이 발생해도 승인이 조용히 유지되어서는 안 됩니다.
371
+ 5. **단순한 결과.** 불투명한 위험 점수 대신 ALLOW / ASK / BLOCK을 사용합니다.
372
+ 6. **브랜딩보다 증거.** 익숙한 이름만으로 "공식"이라고 추론하지 않습니다.
373
+ 7. **런타임 중립.** 도구 출처와 에이전트 행동 권한은 Codex와 Claude 모두에서 검토할 수 있어야 하며, 추가 런타임으로 확장할 수 있어야 합니다.
374
+
375
+ ## 로드맵
376
+
377
+ 공개 로드맵은 [docs/ROADMAP.ko.md](docs/ROADMAP.ko.md)에서 관리합니다. 단기 작업은 레지스트리 무결성 검증, 재현 가능한 릴리스, 추가 에이전트 런타임 어댑터 및 실제 파일럿 피드백에 중점을 둡니다. 로드맵 항목은 계획이며 약속이 아닙니다.
378
+
379
+ ## 보안
380
+
381
+ TrustDex는 서드파티 코드가 안전하다는 것을 **증명하지 않으며**, 샌드박싱, 의존성 검사, 코드 검토 또는 최소 권한 자격 증명을 대체하지 않습니다.
382
+
383
+ [SECURITY.ko.md](SECURITY.ko.md), [docs/THREAT_MODEL.ko.md](docs/THREAT_MODEL.ko.md), [docs/DEFENSIVE_USE_CASE.ko.md](docs/DEFENSIVE_USE_CASE.ko.md), [docs/SECURITY_RESEARCH.ko.md](docs/SECURITY_RESEARCH.ko.md), [docs/EVALUATION.ko.md](docs/EVALUATION.ko.md), [docs/TRUST_STORE.ko.md](docs/TRUST_STORE.ko.md)를 참고하세요.
384
+
385
+ ## 기여
386
+
387
+ 기여를 환영합니다. [CONTRIBUTING.ko.md](CONTRIBUTING.ko.md), [GOVERNANCE.ko.md](GOVERNANCE.ko.md), [CODE_OF_CONDUCT.ko.md](CODE_OF_CONDUCT.ko.md), [AGENTS.ko.md](AGENTS.ko.md)를 참고하세요.
388
+
389
+ ## 라이선스
390
+
391
+ MIT
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # TrustDex
2
2
 
3
+ <p align="right">
4
+ <strong>English</strong> | <a href="./README.ko.md">한국어</a>
5
+ </p>
6
+
3
7
  [![CI](https://github.com/grigent/trustdex/actions/workflows/ci.yml/badge.svg)](https://github.com/grigent/trustdex/actions/workflows/ci.yml)
4
8
  [![CodeQL](https://github.com/grigent/trustdex/actions/workflows/codeql.yml/badge.svg)](https://github.com/grigent/trustdex/actions/workflows/codeql.yml)
5
9
  [![Release](https://img.shields.io/github/v/release/grigent/trustdex)](https://github.com/grigent/trustdex/releases)
@@ -54,7 +58,9 @@ TrustDex deliberately does not infer "official" status from names, stars, or bra
54
58
  - run as a GitHub Action in CI
55
59
  - fingerprint MCP entries, skills, and plugin manifests without storing secret values
56
60
  - inspect and filter Codex `config.toml` MCP sections
61
+ - inspect Codex approval, sandbox, network, writable-root, web-search, and subagent settings without retaining path values
57
62
  - inspect and filter Claude Code MCP JSON with explicit transport validation and header execution controls
63
+ - inspect Claude Code permission settings for automatic shell, filesystem, network, MCP, and subagent grants without retaining rule values
58
64
  - perform explicit provenance lookups against GitHub, npm, and the official MCP Registry
59
65
  - verify whether the latest GitHub release tag/commit has a GitHub-verified signature
60
66
  - create signed review bundles and automatically require re-review when trust-relevant state drifts
@@ -76,8 +82,8 @@ Requires Node.js 20+.
76
82
  Run directly from npm:
77
83
 
78
84
  ```bash
79
- npx trustdex@0.5.0 --help
80
- npx trustdex@0.5.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
85
+ npx trustdex@0.6.0 --help
86
+ npx trustdex@0.6.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
81
87
  ```
82
88
 
83
89
  Or work from a source checkout:
@@ -116,7 +122,7 @@ node ./bin/trustdex.mjs inspect \
116
122
 
117
123
  The direct inspection intentionally exits with code `2`: the checked-in expectation is one `ALLOW`, one `ASK`, and five `BLOCK` decisions. The automated test also verifies that placeholder secret values do not appear in results and that a newly introduced secret-bearing environment variable invalidates the previous review state.
118
124
 
119
- See the [defensive security research policy](docs/SECURITY_RESEARCH.md), [evaluation record](docs/EVALUATION.md), and [adversarial fixture guide](examples/adversarial/README.md).
125
+ See the [defensive AI-agent security use case](docs/DEFENSIVE_USE_CASE.md), [defensive security research policy](docs/SECURITY_RESEARCH.md), [evaluation record](docs/EVALUATION.md), and [adversarial fixture guide](examples/adversarial/README.md).
120
126
 
121
127
  ## Built-in policy packs
122
128
 
@@ -165,6 +171,19 @@ node ./bin/trustdex.mjs gate-codex ./examples/codex.config.toml \
165
171
 
166
172
  The gate removes non-approved MCP sections while preserving unrelated TOML sections. TrustDex intentionally parses only the MCP-related TOML constructs it needs; unsupported MCP syntax fails rather than being silently trusted.
167
173
 
174
+ Inspect the agent's execution boundary separately from its MCP tools:
175
+
176
+ ```bash
177
+ node ./bin/trustdex.mjs inspect-codex-settings \
178
+ ./examples/codex.permissions.toml \
179
+ --pack strict
180
+ ```
181
+
182
+ This reports approval policy, sandbox class, network access, additional writable-root
183
+ count, web-search mode, and explicit subagent enablement. It does not retain writable
184
+ paths or values from unrelated settings, and it does not merge every configuration
185
+ scope into an effective runtime policy.
186
+
168
187
  See [Using TrustDex with Codex](docs/CODEX.md) for a step-by-step gating workflow and for how this project uses Codex in its own review process.
169
188
 
170
189
  ## Claude Code MCP configuration
@@ -182,11 +201,24 @@ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
182
201
  Check the gate's result before starting Claude. Only `ALLOW` entries are exposed by
183
202
  default; `ASK` entries require review. The adapter rejects settings it cannot
184
203
  inspect instead of silently trusting them. These commands are available in npm 0.5.0 and later, and from a source checkout.
185
- Use `npx trustdex@0.5.0` in place of `node ./bin/trustdex.mjs` to run the published CLI.
204
+ Use `npx trustdex@0.6.0` in place of `node ./bin/trustdex.mjs` to run the published CLI.
186
205
 
187
206
  See [Using TrustDex with Claude](docs/CLAUDE.md) for supported settings, PowerShell
188
207
  error handling, signed review, and the Claude Desktop workflow.
189
208
 
209
+ Claude Code project and user settings can also grant actions without prompting. Inspect
210
+ the documented `permissions` object and nearby executable settings separately:
211
+
212
+ ```bash
213
+ node ./bin/trustdex.mjs inspect-claude-settings \
214
+ ./.claude/settings.json \
215
+ --pack strict
216
+ ```
217
+
218
+ The command reports structural capability evidence only. It does not print or fingerprint
219
+ permission specifiers, directory values, hook commands, domains, credential-helper values,
220
+ or environment values. It is a static review aid, not a settings merger or runtime sandbox.
221
+
190
222
  ## Online provenance observations
191
223
 
192
224
  Normal inspection remains local-only. These commands perform an explicit network lookup only when invoked:
@@ -332,7 +364,7 @@ The private key should never be committed.
332
364
  ```yaml
333
365
  - uses: actions/checkout@v4
334
366
 
335
- - uses: grigent/trustdex@v0.5.0
367
+ - uses: grigent/trustdex@v0.6.0
336
368
  with:
337
369
  config: ./mcp.json
338
370
  pack: official-first
@@ -350,7 +382,7 @@ For production CI, pin the action to a reviewed commit SHA rather than a moving
350
382
  4. **Drift matters.** Approval should not silently survive trust-relevant changes.
351
383
  5. **Simple outcomes.** ALLOW / ASK / BLOCK instead of an opaque risk score.
352
384
  6. **Evidence over branding.** "Official" is not inferred from a familiar name.
353
- 7. **Vendor neutral.** The policy model should work across Codex and other agent runtimes.
385
+ 7. **Runtime neutral.** Tool provenance and agent-action permissions should be reviewable across both Codex and Claude, with room for additional runtimes.
354
386
 
355
387
  ## Roadmap
356
388
 
@@ -360,7 +392,7 @@ The public roadmap is maintained in [docs/ROADMAP.md](docs/ROADMAP.md). Near-ter
360
392
 
361
393
  TrustDex does **not** prove that third-party code is safe and does not replace sandboxing, dependency scanning, code review, or least-privilege credentials.
362
394
 
363
- See [SECURITY.md](SECURITY.md), [docs/THREAT_MODEL.md](docs/THREAT_MODEL.md), [docs/SECURITY_RESEARCH.md](docs/SECURITY_RESEARCH.md), [docs/EVALUATION.md](docs/EVALUATION.md), and [docs/TRUST_STORE.md](docs/TRUST_STORE.md).
395
+ See [SECURITY.md](SECURITY.md), [docs/THREAT_MODEL.md](docs/THREAT_MODEL.md), [docs/DEFENSIVE_USE_CASE.md](docs/DEFENSIVE_USE_CASE.md), [docs/SECURITY_RESEARCH.md](docs/SECURITY_RESEARCH.md), [docs/EVALUATION.md](docs/EVALUATION.md), and [docs/TRUST_STORE.md](docs/TRUST_STORE.md).
364
396
 
365
397
  ## Contributing
366
398
 
package/SECURITY.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Security Policy
2
2
 
3
+ <p align="right">
4
+ <strong>English</strong> | <a href="./SECURITY.ko.md">한국어</a>
5
+ </p>
6
+
3
7
  TrustDex is security-related software, but it is not a sandbox, malware scanner, vulnerability scanner, or certification service. An ALLOW decision means only that the observed evidence matched the selected policy.
4
8
 
5
9
  ## Supported versions
package/bin/trustdex.mjs CHANGED
@@ -6,7 +6,9 @@ import process from 'node:process';
6
6
 
7
7
  import { inspectMcpConfig } from '../src/inspect.mjs';
8
8
  import { parseCodexMcpToml, gateCodexToml } from '../src/codex-config.mjs';
9
+ import { inspectCodexSettingsText } from '../src/codex-settings.mjs';
9
10
  import { parseClaudeMcpConfig } from '../src/claude-config.mjs';
11
+ import { inspectClaudeSettings } from '../src/claude-settings.mjs';
10
12
  import { inspectSkillText, inspectPluginManifest } from '../src/extensions.mjs';
11
13
  import { evaluateAll } from '../src/policy.mjs';
12
14
  import { getPolicyPack, mergePolicy } from '../src/policy-packs.mjs';
@@ -43,6 +45,7 @@ Usage:
43
45
  trustdex inspect-plugin <plugin.json> [--pack ...] [--policy policy.json] [--json]
44
46
  trustdex inspect-codex <config.toml> [--pack ...] [--policy policy.json]
45
47
  [--trust-store trust-store.json] [--json]
48
+ trustdex inspect-codex-settings <config.toml> [--pack ...] [--policy policy.json] [--json]
46
49
 
47
50
  trustdex gate <mcp.json> --out gated.json [--pack ...] [--policy policy.json]
48
51
  [--trust-store trust-store.json] [--include-ask] [--json]
@@ -50,11 +53,12 @@ Usage:
50
53
  [--trust-store trust-store.json] [--include-ask]
51
54
 
52
55
  trustdex inspect-claude <.mcp.json> [--pack ...] [--policy policy.json] [--json]
56
+ trustdex inspect-claude-settings <settings.json> [--pack ...] [--policy policy.json] [--json]
53
57
  trustdex gate-claude <.mcp.json> --out gated.json [--pack ...] [--policy policy.json]
54
58
  trustdex snapshot-claude <.mcp.json> --out snapshot.json [--pack ...]
55
59
  trustdex approve-claude <.mcp.json> --private key.pem --dir review [--pack ...]
56
60
  trustdex recheck-claude <.mcp.json> --review-dir review --public key.pem [--json]
57
- Claude commands accept the same policy/trust-store flags as their generic counterparts.
61
+ Claude MCP commands accept the same policy/trust-store flags as their generic counterparts.
58
62
 
59
63
  trustdex provenance github <owner/repo> [--json]
60
64
  trustdex provenance github-release <owner/repo> [--json]
@@ -263,6 +267,18 @@ async function main() {
263
267
  return;
264
268
  }
265
269
 
270
+ if (command === 'inspect-claude-settings') {
271
+ const settingsPath = args[1];
272
+ if (!settingsPath) throw new Error('inspect-claude-settings requires a path to Claude settings JSON.');
273
+ let settings;
274
+ try { settings = await readJson(settingsPath); } catch (error) {
275
+ if (error instanceof SyntaxError) throw new Error('Invalid Claude settings JSON.');
276
+ throw error;
277
+ }
278
+ await inspectSingle(inspectClaudeSettings(settings, settingsPath), args);
279
+ return;
280
+ }
281
+
266
282
  if (command === 'inspect-codex') {
267
283
  const configPath = args[1];
268
284
  if (!configPath) throw new Error('inspect-codex requires a path to Codex config.toml.');
@@ -272,6 +288,13 @@ async function main() {
272
288
  return;
273
289
  }
274
290
 
291
+ if (command === 'inspect-codex-settings') {
292
+ const configPath = args[1];
293
+ if (!configPath) throw new Error('inspect-codex-settings requires a path to Codex config.toml.');
294
+ await inspectSingle(inspectCodexSettingsText(await fs.readFile(configPath, 'utf8'), configPath), args);
295
+ return;
296
+ }
297
+
275
298
  if (command === 'gate-codex') {
276
299
  const configPath = args[1];
277
300
  const out = getFlag(args, '--out');
@@ -0,0 +1,52 @@
1
+ # 아키텍처
2
+
3
+ <p align="right">
4
+ <a href="./ARCHITECTURE.md">English</a> | <strong>한국어</strong>
5
+ </p>
6
+
7
+ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존성 없는 Node.js CLI입니다.
8
+
9
+ ## 데이터 흐름
10
+
11
+ 1. 어댑터가 MCP JSON 파일, Codex TOML의 제한된 하위 집합, Claude/Codex 권한 설정 파일, 스킬 또는 플러그인 매니페스트를 읽습니다.
12
+ 2. 검사가 소스를 정규화하고 관찰 가능한 신호를 생성합니다. 비밀 값은 보고서에 보관하지 않습니다.
13
+ 3. 선택적인 신뢰 저장소 주장이 명시적인 출처 증거를 연결합니다.
14
+ 4. 정책 엔진이 ALLOW, ASK 또는 BLOCK을 생성합니다.
15
+ 5. 게이트가 승인된 설정만 출력합니다.
16
+ 6. 스냅샷과 서명된 신뢰 기록을 통해 이후 드리프트를 검토할 수 있습니다.
17
+
18
+ 게이트가 강제 적용 경계입니다. 보고서만으로는 에이전트가 검토되지 않은 확장을 불러오는 것을 막을 수 없습니다.
19
+
20
+ ## 모듈
21
+
22
+ | 영역 | 책임 |
23
+ | --- | --- |
24
+ | `src/inspect.mjs` | MCP 소스 분류, 민감 정보 제거, 지문 생성 및 신호 |
25
+ | `src/codex-config.mjs` | 안전하게 실패하는 Codex MCP 전용 파싱 및 섹션 필터링 |
26
+ | `src/codex-settings.mjs` | Codex 승인, 샌드박스, 네트워크, 쓰기 가능 루트, 웹 검색 및 서브에이전트 설정 검사 |
27
+ | `src/claude-settings.mjs` | Claude Code 권한 규칙 및 인접 자동 실행 설정 검사 |
28
+ | `src/extensions.mjs` | 스킬 및 플러그인 매니페스트 검사 |
29
+ | `src/provenance.mjs` | 명시적인 로컬 신뢰 저장소 주장 |
30
+ | `src/provenance-online.mjs` | 사용자가 호출하는 GitHub, npm 및 MCP Registry 관찰과 로컬 아티팩트 다이제스트 검증 |
31
+ | `src/policy.mjs` | 단조로운 정책 평가. 신호는 심각도를 높일 수 있음 |
32
+ | `src/gate.mjs` | 승인된 MCP 항목만 출력 |
33
+ | `src/snapshot.mjs` | 결정론적 신뢰 관련 상태 및 드리프트 |
34
+ | `src/trust-record.mjs` | Ed25519 검토 기록 서명 및 검증 |
35
+ | `src/review.mjs` | 서명된 기준선 비교 |
36
+
37
+ ## 보안 불변 조건
38
+
39
+ - 검사는 검사 대상 확장을 실행해서는 안 됩니다.
40
+ - 비밀 값은 출력하거나 스냅샷에 저장해서는 안 됩니다.
41
+ - 권한 규칙 값, 쓰기 가능 루트 경로, 훅/도우미 본문 및 관련 없는 설정 값은 에이전트 설정 보고서에 보관해서는 안 됩니다.
42
+ - 알 수 없는 증거가 신뢰로 바뀌어서는 안 됩니다.
43
+ - 차단 신호의 심각도를 출처 정보로 낮춰서는 안 됩니다.
44
+ - 지원하지 않는 보안 관련 구문은 안전하게 실패해야 합니다.
45
+ - 네트워크 조회는 명시적으로 수행하며, 관찰은 승인이 아닙니다.
46
+ - ALLOW는 정책 결과이지 안전 인증이 아닙니다.
47
+
48
+ 설정 검사는 현재 권고 기능입니다. 한 번에 설정 소스 파일 하나를 읽으며 병합된 실제 런타임 정책을 계산하지 않습니다. MCP 게이트는 구현된 강제 적용 경계로 유지되고, 에이전트 작업은 운영체제 및 런타임 샌드박스가 강제합니다.
49
+
50
+ ## 의존성 정책
51
+
52
+ 현재 런타임 코드는 Node.js 기본 제공 기능만 사용합니다. 새로운 의존성을 추가하려면 해당 기능을 플랫폼만으로 합리적으로 구현할 수 없는 이유, 패키지의 유지관리 및 보안 상태, 공급망 경계에 미치는 영향을 설명하는 이슈가 필요합니다.