trustdex 0.4.4 → 0.5.1

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.
package/README.ko.md ADDED
@@ -0,0 +1,369 @@
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
+ - 명시적인 전송 방식 검증과 헤더 실행 제어를 포함해 Claude Code MCP JSON 검사 및 필터링
62
+ - GitHub, npm 및 공식 MCP Registry를 대상으로 명시적인 출처 조회 수행
63
+ - 최신 GitHub 릴리스 태그/커밋에 GitHub 검증 서명이 있는지 확인
64
+ - 서명된 검토 번들을 생성하고 신뢰 관련 상태가 변경되면 자동으로 재검토 요구
65
+ - 보고서의 원격 엔드포인트 세부 정보에서 자격 증명, 경로 및 쿼리 값 제거
66
+ - 엄격한 정책에서 URL에 포함된 자격 증명과 안전하지 않은 원격 전송 차단
67
+ - 여러 호스트에서 Windows 실행 파일 경로와 명령 래퍼를 일관되게 인식
68
+ - 지원하지 않는 Codex MCP 키와 하위 섹션을 발견하면 안전하게 실패
69
+ - 사용자가 제공한 패키지 바이트를 npm SRI 또는 MCP Registry SHA-256 메타데이터와 대조해 검증
70
+ - 무결성 기반 신뢰 증거를 설정된 패키지 버전에 연결하고 불일치 차단
71
+
72
+ ## 호환성
73
+
74
+ TrustDex에는 Node.js 20 이상이 필요합니다. CI는 Ubuntu에서 Node.js 20과 22로 전체 테스트 및 게이트 워크플로를 실행하고, 최신 Windows 및 macOS 러너에서는 Node.js 22로 실행합니다. 체크아웃된 복합 GitHub Action에는 전용 엔드투엔드 스모크 테스트가 있습니다.
75
+
76
+ ## 빠른 시작
77
+
78
+ Node.js 20 이상이 필요합니다.
79
+
80
+ npm에서 직접 실행:
81
+
82
+ ```bash
83
+ npx trustdex@0.5.0 --help
84
+ npx trustdex@0.5.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
85
+ ```
86
+
87
+ 또는 소스 체크아웃에서 작업:
88
+
89
+ ```bash
90
+ git clone https://github.com/grigent/trustdex.git
91
+ cd trustdex
92
+ npm test
93
+ npm run check
94
+
95
+ node ./bin/trustdex.mjs inspect ./examples/mcp.json \
96
+ --pack strict \
97
+ --policy ./examples/trustdex.policy.json
98
+ ```
99
+
100
+ 예제에는 의도적으로 알 수 없는 서버가 포함되어 있으므로 엄격한 검사는 0이 아닌 종료 코드를 반환합니다.
101
+
102
+ 검사의 종료 코드:
103
+
104
+ - `0` - 모든 항목 허용
105
+ - `1` - 하나 이상의 항목에 검토 필요
106
+ - `2` - 하나 이상의 항목이 차단되었거나 명령 실패
107
+
108
+ ## 재현 가능한 방어적 연구
109
+
110
+ TrustDex에는 서드파티 서비스에 연결하거나 실행하지 않고 정책 경계를 테스트할 수 있는 비활성 적대적 벤치마크가 포함되어 있습니다. 픽스처는 예약된 `.invalid` 도메인, 자리표시자 자격 증명 및 설정 데이터만 사용합니다. TrustDex는 이를 정적으로 검사하며 나열된 서버를 실행하지 않습니다.
111
+
112
+ ```bash
113
+ npm run test:research
114
+
115
+ node ./bin/trustdex.mjs inspect \
116
+ ./examples/adversarial/mcp-config.json \
117
+ --pack strict \
118
+ --policy ./examples/adversarial/policy.json
119
+ ```
120
+
121
+ 직접 검사는 의도적으로 종료 코드 `2`를 반환합니다. 체크인된 기대 결과는 `ALLOW` 1개, `ASK` 1개, `BLOCK` 5개입니다. 자동화된 테스트는 자리표시자 비밀 값이 결과에 나타나지 않는지, 비밀 정보를 포함하는 새 환경 변수가 이전 검토 상태를 무효화하는지도 확인합니다.
122
+
123
+ [방어적 보안 연구 정책](docs/SECURITY_RESEARCH.ko.md), [평가 기록](docs/EVALUATION.ko.md), [적대적 픽스처 가이드](examples/adversarial/README.ko.md)를 참고하세요.
124
+
125
+ ## 기본 제공 정책 팩
126
+
127
+ ```bash
128
+ node ./bin/trustdex.mjs policy strict
129
+ node ./bin/trustdex.mjs policy official-first
130
+ node ./bin/trustdex.mjs policy development
131
+ ```
132
+
133
+ `official-first`는 소위 공식 공급업체의 하드코딩된 목록을 유지하지 **않습니다**. 신뢰 저장소에 명시적인 출처 증거가 있는 소스(또는 사용자가 명시적으로 허용 목록에 추가한 소스)만 허용하며, 알 수 없는 서드파티 소스는 기본적으로 차단합니다.
134
+
135
+ [신뢰 저장소와 출처](docs/TRUST_STORE.ko.md)를 참고하세요.
136
+
137
+ ## 에이전트가 사용하기 전에 도구 필터링
138
+
139
+ ```bash
140
+ node ./bin/trustdex.mjs gate ./examples/mcp.json \
141
+ --pack official-first \
142
+ --out .trustdex/gated-mcp.json
143
+ ```
144
+
145
+ 기본적으로 `ALLOW` 항목만 게이트된 설정에 기록됩니다. `ASK` 항목은 검토될 때까지 제외됩니다.
146
+
147
+ 이것이 TrustDex의 핵심 경계입니다. 에이전트는 검토되지 않은 원본 설정 대신 필터링된 설정을 받습니다.
148
+
149
+ ## 스킬 및 플러그인 검사
150
+
151
+ ```bash
152
+ node ./bin/trustdex.mjs inspect-skill ./path/to/SKILL.md --pack strict
153
+ node ./bin/trustdex.mjs inspect-plugin ./path/to/plugin.json --pack strict
154
+ ```
155
+
156
+ 이 검사는 관찰 가능한 신뢰 신호를 드러냅니다. 확장이 안전하다는 것을 증명하지는 않습니다.
157
+
158
+ ## Codex config.toml
159
+
160
+ 현재 Codex 클라이언트는 `config.toml`의 `[mcp_servers.<name>]` 테이블 아래에 MCP 설정을 저장합니다. TrustDex는 해당 MCP 섹션을 위한 전용 어댑터를 제공합니다.
161
+
162
+ ```bash
163
+ node ./bin/trustdex.mjs inspect-codex ./examples/codex.config.toml --pack strict
164
+
165
+ node ./bin/trustdex.mjs gate-codex ./examples/codex.config.toml \
166
+ --pack strict \
167
+ --out .trustdex/gated-codex.toml
168
+ ```
169
+
170
+ 게이트는 승인되지 않은 MCP 섹션을 제거하면서 관련 없는 TOML 섹션은 유지합니다. TrustDex는 필요한 MCP 관련 TOML 구성만 의도적으로 파싱합니다. 지원하지 않는 MCP 구문은 조용히 신뢰하지 않고 실패합니다.
171
+
172
+ 단계별 게이트 워크플로와 이 프로젝트가 자체 검토 과정에서 Codex를 사용하는 방법은 [Codex에서 TrustDex 사용하기](docs/CODEX.ko.md)를 참고하세요.
173
+
174
+ ## Claude Code MCP 설정
175
+
176
+ Claude Code는 `mcpServers` JSON 형식을 사용합니다. 전송 방식 변경, 인증 헤더 메타데이터 및 헤더 도우미 명령이 검사와 서명된 검토에 포함되도록 Claude 전용 명령을 사용하세요.
177
+
178
+ ```bash
179
+ node ./bin/trustdex.mjs inspect-claude ./.mcp.json --pack strict
180
+ node ./bin/trustdex.mjs gate-claude ./.mcp.json --pack strict --out .trustdex/claude-mcp.json
181
+ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
182
+ ```
183
+
184
+ Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.5.0`을 사용하세요.
185
+
186
+ 지원되는 설정, PowerShell 오류 처리, 서명된 검토 및 Claude Desktop 워크플로는 [Claude에서 TrustDex 사용하기](docs/CLAUDE.ko.md)를 참고하세요.
187
+
188
+ ## 온라인 출처 관찰
189
+
190
+ 일반 검사는 계속 로컬에서만 수행됩니다. 다음 명령은 명시적으로 실행할 때만 네트워크 조회를 수행합니다.
191
+
192
+ ```bash
193
+ node ./bin/trustdex.mjs provenance github modelcontextprotocol/servers
194
+ node ./bin/trustdex.mjs provenance github-release owner/repository
195
+ node ./bin/trustdex.mjs provenance npm @scope/package
196
+ node ./bin/trustdex.mjs provenance mcp io.github.user/server
197
+ ```
198
+
199
+ 조회 결과는 **증거이지 신뢰가 아닙니다**. 증거를 로컬 신뢰 저장소의 주장으로 전환하려면 사용자가 게시자를 명시적으로 지정해야 합니다.
200
+
201
+ ```bash
202
+ node ./bin/trustdex.mjs trust-source mcp io.github.user/server \
203
+ --publisher "Example Publisher" \
204
+ --out ./trust-store.json
205
+ ```
206
+
207
+ `github-release`의 경우 GitHub가 릴리스 태그 또는 대상 커밋 서명을 검증된 것으로 보고하지 않으면 TrustDex는 신뢰 주장을 생성하지 않습니다.
208
+
209
+ ### 정확한 패키지 바이트 검증
210
+
211
+ 레지스트리 메타데이터는 예상 다이제스트를 식별할 수 있지만, 메타데이터만으로 다운로드한 파일이 해당 값과 일치한다는 것을 증명할 수는 없습니다. 검토한 정확한 패키지 아카이브 또는 아티팩트를 제공하세요.
212
+
213
+ ```bash
214
+ node ./bin/trustdex.mjs trust-source npm @scope/package \
215
+ --publisher "Example Publisher" \
216
+ --artifact ./scope-package-1.2.3.tgz \
217
+ --out ./trust-store.json
218
+
219
+ node ./bin/trustdex.mjs trust-source mcp io.github.user/server \
220
+ --publisher "Example Publisher" \
221
+ --artifact ./downloaded-package \
222
+ --out ./trust-store.json
223
+ ```
224
+
225
+ TrustDex는 파일을 로컬에서 읽고 해당 바이트를 npm SRI 메타데이터 또는 MCP Registry SHA-256 다이제스트와 비교합니다. 아티팩트를 다운로드하거나 실행하지 않습니다. 무결성 기반 증거는 특정 버전에 연결됩니다. 설정된 패키지 버전이 다르면 `artifact-version-mismatch`가 발생하며 차단됩니다.
226
+
227
+ ## 출처 신뢰 저장소
228
+
229
+ 예시:
230
+
231
+ ```json
232
+ {
233
+ "version": 1,
234
+ "claims": [
235
+ {
236
+ "type": "package",
237
+ "subject": "example-mcp-server",
238
+ "publisher": "Example Publisher",
239
+ "status": "verified",
240
+ "evidence": {
241
+ "kind": "manual-review",
242
+ "reference": "https://example.invalid/security-review"
243
+ }
244
+ }
245
+ ]
246
+ }
247
+ ```
248
+
249
+ 그런 다음:
250
+
251
+ ```bash
252
+ node ./bin/trustdex.mjs inspect ./mcp.json \
253
+ --pack official-first \
254
+ --trust-store ./trust-store.json
255
+ ```
256
+
257
+ 여기서 `verified`는 해당 신뢰 저장소에서 관리하는 증거에 따라 검증되었다는 뜻입니다. OpenAI, TrustDex, GitHub, npm 또는 다른 플랫폼이 확장을 인증했다는 의미가 아닙니다.
258
+
259
+ ## 기능 및 출처 드리프트
260
+
261
+ 기준선 저장:
262
+
263
+ ```bash
264
+ node ./bin/trustdex.mjs snapshot ./examples/mcp.json \
265
+ --pack strict \
266
+ --out .trustdex/baseline.json
267
+ ```
268
+
269
+ 업데이트 후 다른 스냅샷을 저장하고 비교:
270
+
271
+ ```bash
272
+ node ./bin/trustdex.mjs diff .trustdex/baseline.json .trustdex/current.json
273
+ ```
274
+
275
+ TrustDex는 새로 추가된 신호, 소스 변경, 출처 변경, 결정 변경, 콘텐츠/설정 지문 변경을 보고합니다.
276
+
277
+ 검토 워크플로에서는 서명 키를 한 번 생성하고 차단되지 않은 설정을 승인합니다.
278
+
279
+ ```bash
280
+ node ./bin/trustdex.mjs keygen \
281
+ --private .trustdex/private.pem \
282
+ --public .trustdex/public.pem
283
+
284
+ node ./bin/trustdex.mjs approve ./examples/mcp.json \
285
+ --private .trustdex/private.pem \
286
+ --dir .trustdex/review \
287
+ --pack development
288
+ ```
289
+
290
+ 나중에 해당 서명된 검토를 기준으로 현재 설정을 다시 평가합니다.
291
+
292
+ ```bash
293
+ node ./bin/trustdex.mjs recheck ./examples/mcp.json \
294
+ --review-dir .trustdex/review \
295
+ --public .trustdex/public.pem
296
+ ```
297
+
298
+ 결과는 `APPROVED`, `NEEDS_REVIEW` 또는 `INVALID`입니다. 지문, 소스, 출처, 신호 또는 정책 관련 변경이 발생하면 이전 상태의 일치가 무효화됩니다.
299
+
300
+ ## 서명된 신뢰 기록
301
+
302
+ 로컬 서명 키 생성:
303
+
304
+ ```bash
305
+ node ./bin/trustdex.mjs keygen \
306
+ --private .trustdex/trustdex-private.pem \
307
+ --public .trustdex/trustdex-public.pem
308
+ ```
309
+
310
+ 검토된 스냅샷 서명:
311
+
312
+ ```bash
313
+ node ./bin/trustdex.mjs sign .trustdex/baseline.json \
314
+ --private .trustdex/trustdex-private.pem \
315
+ --out .trustdex/trust-record.json
316
+ ```
317
+
318
+ 나중에 검증:
319
+
320
+ ```bash
321
+ node ./bin/trustdex.mjs verify .trustdex/trust-record.json \
322
+ --public .trustdex/trustdex-public.pem \
323
+ --snapshot .trustdex/baseline.json
324
+ ```
325
+
326
+ 비공개 키는 절대 커밋하면 안 됩니다.
327
+
328
+ ## GitHub Action
329
+
330
+ ```yaml
331
+ - uses: actions/checkout@v4
332
+
333
+ - uses: grigent/trustdex@v0.5.0
334
+ with:
335
+ config: ./mcp.json
336
+ pack: official-first
337
+ trust-store: ./trust-store.json
338
+ output: .trustdex/gated-mcp.json
339
+ ```
340
+
341
+ 프로덕션 CI에서는 이동하는 브랜치 대신 검토된 커밋 SHA에 Action을 고정하세요.
342
+
343
+ ## 원칙
344
+
345
+ 1. **로컬 우선.** 비공개 에이전트 설정이 컴퓨터 밖으로 나갈 필요가 없어야 합니다.
346
+ 2. **맹목적으로 신뢰하지 않기.** 출처가 없으면 추측으로 ALLOW하지 않고 검토하거나 거부해야 합니다.
347
+ 3. **출력에 비밀 값 포함 금지.** 환경 변수 이름은 보고할 수 있지만 값은 보고하지 않습니다.
348
+ 4. **드리프트는 중요합니다.** 신뢰 관련 변경이 발생해도 승인이 조용히 유지되어서는 안 됩니다.
349
+ 5. **단순한 결과.** 불투명한 위험 점수 대신 ALLOW / ASK / BLOCK을 사용합니다.
350
+ 6. **브랜딩보다 증거.** 익숙한 이름만으로 "공식"이라고 추론하지 않습니다.
351
+ 7. **공급업체 중립.** 정책 모델은 Codex 및 다른 에이전트 런타임에서도 작동해야 합니다.
352
+
353
+ ## 로드맵
354
+
355
+ 공개 로드맵은 [docs/ROADMAP.ko.md](docs/ROADMAP.ko.md)에서 관리합니다. 단기 작업은 레지스트리 무결성 검증, 재현 가능한 릴리스, 추가 에이전트 런타임 어댑터 및 실제 파일럿 피드백에 중점을 둡니다. 로드맵 항목은 계획이며 약속이 아닙니다.
356
+
357
+ ## 보안
358
+
359
+ TrustDex는 서드파티 코드가 안전하다는 것을 **증명하지 않으며**, 샌드박싱, 의존성 검사, 코드 검토 또는 최소 권한 자격 증명을 대체하지 않습니다.
360
+
361
+ [SECURITY.ko.md](SECURITY.ko.md), [docs/THREAT_MODEL.ko.md](docs/THREAT_MODEL.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)를 참고하세요.
362
+
363
+ ## 기여
364
+
365
+ 기여를 환영합니다. [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)를 참고하세요.
366
+
367
+ ## 라이선스
368
+
369
+ 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,6 +58,7 @@ 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 and filter Claude Code MCP JSON with explicit transport validation and header execution controls
57
62
  - perform explicit provenance lookups against GitHub, npm, and the official MCP Registry
58
63
  - verify whether the latest GitHub release tag/commit has a GitHub-verified signature
59
64
  - create signed review bundles and automatically require re-review when trust-relevant state drifts
@@ -75,8 +80,8 @@ Requires Node.js 20+.
75
80
  Run directly from npm:
76
81
 
77
82
  ```bash
78
- npx trustdex@0.4.4 --help
79
- npx trustdex@0.4.4 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
83
+ npx trustdex@0.5.0 --help
84
+ npx trustdex@0.5.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
80
85
  ```
81
86
 
82
87
  Or work from a source checkout:
@@ -166,6 +171,26 @@ The gate removes non-approved MCP sections while preserving unrelated TOML secti
166
171
 
167
172
  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.
168
173
 
174
+ ## Claude Code MCP configuration
175
+
176
+ Claude Code uses the `mcpServers` JSON shape. Use the Claude-specific commands so
177
+ transport changes, authentication header metadata, and header helper commands
178
+ are included in inspection and signed review:
179
+
180
+ ```bash
181
+ node ./bin/trustdex.mjs inspect-claude ./.mcp.json --pack strict
182
+ node ./bin/trustdex.mjs gate-claude ./.mcp.json --pack strict --out .trustdex/claude-mcp.json
183
+ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
184
+ ```
185
+
186
+ Check the gate's result before starting Claude. Only `ALLOW` entries are exposed by
187
+ default; `ASK` entries require review. The adapter rejects settings it cannot
188
+ inspect instead of silently trusting them. These commands are available in npm 0.5.0 and later, and from a source checkout.
189
+ Use `npx trustdex@0.5.0` in place of `node ./bin/trustdex.mjs` to run the published CLI.
190
+
191
+ See [Using TrustDex with Claude](docs/CLAUDE.md) for supported settings, PowerShell
192
+ error handling, signed review, and the Claude Desktop workflow.
193
+
169
194
  ## Online provenance observations
170
195
 
171
196
  Normal inspection remains local-only. These commands perform an explicit network lookup only when invoked:
@@ -311,7 +336,7 @@ The private key should never be committed.
311
336
  ```yaml
312
337
  - uses: actions/checkout@v4
313
338
 
314
- - uses: grigent/trustdex@v0.4.4
339
+ - uses: grigent/trustdex@v0.5.0
315
340
  with:
316
341
  config: ./mcp.json
317
342
  pack: official-first
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,6 +6,7 @@ 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 { parseClaudeMcpConfig } from '../src/claude-config.mjs';
9
10
  import { inspectSkillText, inspectPluginManifest } from '../src/extensions.mjs';
10
11
  import { evaluateAll } from '../src/policy.mjs';
11
12
  import { getPolicyPack, mergePolicy } from '../src/policy-packs.mjs';
@@ -48,6 +49,13 @@ Usage:
48
49
  trustdex gate-codex <config.toml> --out gated.toml [--pack ...] [--policy policy.json]
49
50
  [--trust-store trust-store.json] [--include-ask]
50
51
 
52
+ trustdex inspect-claude <.mcp.json> [--pack ...] [--policy policy.json] [--json]
53
+ trustdex gate-claude <.mcp.json> --out gated.json [--pack ...] [--policy policy.json]
54
+ trustdex snapshot-claude <.mcp.json> --out snapshot.json [--pack ...]
55
+ trustdex approve-claude <.mcp.json> --private key.pem --dir review [--pack ...]
56
+ 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.
58
+
51
59
  trustdex provenance github <owner/repo> [--json]
52
60
  trustdex provenance github-release <owner/repo> [--json]
53
61
  trustdex provenance npm <package> [--json]
@@ -146,8 +154,14 @@ function setInspectExitCode(results) {
146
154
  }
147
155
 
148
156
  async function evaluateMcp(configPath, args) {
149
- const config = await readJson(configPath);
150
- const inspected = inspectMcpConfig(config);
157
+ const isClaude = args[0].endsWith('-claude');
158
+ let config;
159
+ try { config = await readJson(configPath); } catch (error) {
160
+ if (isClaude && error instanceof SyntaxError) throw new Error('Invalid Claude MCP JSON.');
161
+ throw error;
162
+ }
163
+ const inspectionConfig = isClaude ? parseClaudeMcpConfig(config) : config;
164
+ const inspected = inspectMcpConfig(inspectionConfig);
151
165
  const store = await loadTrustStore(args);
152
166
  const withProvenance = store ? attachProvenanceAll(inspected, store) : inspected;
153
167
  const policy = await loadPolicy(args);
@@ -225,7 +239,7 @@ async function main() {
225
239
  return;
226
240
  }
227
241
 
228
- if (command === 'inspect') {
242
+ if (command === 'inspect' || command === 'inspect-claude') {
229
243
  const configPath = args[1];
230
244
  if (!configPath) throw new Error('inspect requires a path to an MCP JSON file.');
231
245
 
@@ -311,7 +325,7 @@ async function main() {
311
325
  return;
312
326
  }
313
327
 
314
- if (command === 'gate') {
328
+ if (command === 'gate' || command === 'gate-claude') {
315
329
  const configPath = args[1];
316
330
  const out = getFlag(args, '--out');
317
331
  if (!configPath || !out) throw new Error('gate requires <mcp.json> and --out <gated.json>.');
@@ -332,7 +346,7 @@ async function main() {
332
346
  return;
333
347
  }
334
348
 
335
- if (command === 'approve') {
349
+ if (command === 'approve' || command === 'approve-claude') {
336
350
  const configPath = args[1];
337
351
  const privatePath = getFlag(args, '--private');
338
352
  const reviewDir = getFlag(args, '--dir');
@@ -364,7 +378,7 @@ async function main() {
364
378
  return;
365
379
  }
366
380
 
367
- if (command === 'recheck') {
381
+ if (command === 'recheck' || command === 'recheck-claude') {
368
382
  const configPath = args[1];
369
383
  const reviewDir = getFlag(args, '--review-dir');
370
384
  const publicPath = getFlag(args, '--public');
@@ -409,7 +423,7 @@ async function main() {
409
423
  return;
410
424
  }
411
425
 
412
- if (command === 'snapshot') {
426
+ if (command === 'snapshot' || command === 'snapshot-claude') {
413
427
  const configPath = args[1];
414
428
  const out = getFlag(args, '--out');
415
429
  if (!configPath || !out) throw new Error('snapshot requires <mcp.json> and --out <snapshot.json>.');
@@ -0,0 +1,47 @@
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의 제한된 하위 집합, 스킬 또는 플러그인 매니페스트를 읽습니다.
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/extensions.mjs` | 스킬 및 플러그인 매니페스트 검사 |
27
+ | `src/provenance.mjs` | 명시적인 로컬 신뢰 저장소 주장 |
28
+ | `src/provenance-online.mjs` | 사용자가 호출하는 GitHub, npm 및 MCP Registry 관찰과 로컬 아티팩트 다이제스트 검증 |
29
+ | `src/policy.mjs` | 단조로운 정책 평가. 신호는 심각도를 높일 수 있음 |
30
+ | `src/gate.mjs` | 승인된 MCP 항목만 출력 |
31
+ | `src/snapshot.mjs` | 결정론적 신뢰 관련 상태 및 드리프트 |
32
+ | `src/trust-record.mjs` | Ed25519 검토 기록 서명 및 검증 |
33
+ | `src/review.mjs` | 서명된 기준선 비교 |
34
+
35
+ ## 보안 불변 조건
36
+
37
+ - 검사는 검사 대상 확장을 실행해서는 안 됩니다.
38
+ - 비밀 값은 출력하거나 스냅샷에 저장해서는 안 됩니다.
39
+ - 알 수 없는 증거가 신뢰로 바뀌어서는 안 됩니다.
40
+ - 차단 신호의 심각도를 출처 정보로 낮춰서는 안 됩니다.
41
+ - 지원하지 않는 보안 관련 구문은 안전하게 실패해야 합니다.
42
+ - 네트워크 조회는 명시적으로 수행하며, 관찰은 승인이 아닙니다.
43
+ - ALLOW는 정책 결과이지 안전 인증이 아닙니다.
44
+
45
+ ## 의존성 정책
46
+
47
+ 현재 런타임 코드는 Node.js 기본 제공 기능만 사용합니다. 새로운 의존성을 추가하려면 해당 기능을 플랫폼만으로 합리적으로 구현할 수 없는 이유, 패키지의 유지관리 및 보안 상태, 공급망 경계에 미치는 영향을 설명하는 이슈가 필요합니다.
@@ -1,5 +1,9 @@
1
1
  # Architecture
2
2
 
3
+ <p align="right">
4
+ <strong>English</strong> | <a href="./ARCHITECTURE.ko.md">한국어</a>
5
+ </p>
6
+
3
7
  TrustDex is a dependency-free Node.js CLI that separates observation, policy, gating, and review evidence.
4
8
 
5
9
  ## Data flow