trustdex 0.8.0 → 0.10.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.
- package/README.ko.md +65 -5
- package/README.md +67 -5
- package/bin/trustdex.mjs +182 -3
- package/docs/ARCHITECTURE.ko.md +17 -1
- package/docs/ARCHITECTURE.md +17 -1
- package/docs/CLAUDE.ko.md +33 -1
- package/docs/CLAUDE.md +32 -1
- package/docs/CODEX.ko.md +34 -4
- package/docs/CODEX.md +35 -4
- package/docs/DEFENSIVE_USE_CASE.ko.md +12 -0
- package/docs/DEFENSIVE_USE_CASE.md +13 -0
- package/docs/EVALUATION.ko.md +35 -0
- package/docs/EVALUATION.md +35 -0
- package/docs/ROADMAP.ko.md +9 -5
- package/docs/ROADMAP.md +9 -5
- package/docs/THREAT_MODEL.ko.md +8 -0
- package/docs/THREAT_MODEL.md +8 -0
- package/examples/adversarial/README.ko.md +2 -0
- package/examples/adversarial/README.md +2 -0
- package/examples/adversarial/bindings/README.ko.md +32 -0
- package/examples/adversarial/bindings/README.md +33 -0
- package/examples/adversarial/bindings/claude.mcp.json +12 -0
- package/examples/adversarial/bindings/claude.settings.json +9 -0
- package/examples/adversarial/bindings/codex.toml +9 -0
- package/examples/adversarial/bindings/expected.json +27 -0
- package/examples/adversarial/bindings/runtime-after.json +21 -0
- package/examples/adversarial/bindings/runtime-before.json +13 -0
- package/examples/adversarial/bindings/trust-store.json +15 -0
- package/package.json +3 -3
- package/schemas/effective-runtime-tools-diff-v1.schema.json +50 -0
- package/schemas/effective-runtime-tools-v1.schema.json +68 -0
- package/schemas/runtime-tool-inventory-v1.schema.json +27 -0
- package/schemas/tool-permission-bindings-diff-v1.schema.json +70 -0
- package/schemas/tool-permission-bindings-v1.schema.json +94 -0
- package/src/bindings.mjs +358 -0
- package/src/claude-settings.mjs +49 -0
- package/src/runtime-evidence.mjs +318 -0
package/README.ko.md
CHANGED
|
@@ -70,6 +70,8 @@ TrustDex는 이름, 스타 수 또는 브랜딩만으로 "공식" 여부를 추
|
|
|
70
70
|
- 지원하지 않는 Codex MCP 키와 하위 섹션을 발견하면 안전하게 실패
|
|
71
71
|
- 사용자가 제공한 패키지 바이트를 npm SRI 또는 MCP Registry SHA-256 메타데이터와 대조해 검증
|
|
72
72
|
- 무결성 기반 신뢰 증거를 설정된 패키지 버전에 연결하고 불일치 차단
|
|
73
|
+
- 각 Claude/Codex MCP 소스의 결정·출처 상태를 도구 이름이나 규칙 값 없이 자동 도구 권한과 연결
|
|
74
|
+
- 명시적으로 제공된 값 없는 런타임 MCP 인벤토리를 검토된 연결과 대조해 차단되거나 예상 밖으로 로드된 서버 감지
|
|
73
75
|
|
|
74
76
|
## 호환성
|
|
75
77
|
|
|
@@ -82,8 +84,8 @@ Node.js 20 이상이 필요합니다.
|
|
|
82
84
|
npm에서 직접 실행:
|
|
83
85
|
|
|
84
86
|
```bash
|
|
85
|
-
npx trustdex@0.
|
|
86
|
-
npx trustdex@0.
|
|
87
|
+
npx trustdex@0.10.0 --help
|
|
88
|
+
npx trustdex@0.10.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
또는 소스 체크아웃에서 작업:
|
|
@@ -203,7 +205,7 @@ node ./bin/trustdex.mjs gate-claude ./.mcp.json --pack strict --out .trustdex/cl
|
|
|
203
205
|
claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
|
|
204
206
|
```
|
|
205
207
|
|
|
206
|
-
Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.
|
|
208
|
+
Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.10.0`을 사용하세요.
|
|
207
209
|
|
|
208
210
|
지원되는 설정, PowerShell 오류 처리, 서명된 검토 및 Claude Desktop 워크플로는 [Claude에서 TrustDex 사용하기](docs/CLAUDE.ko.md)를 참고하세요.
|
|
209
211
|
|
|
@@ -275,6 +277,64 @@ node ./bin/trustdex.mjs diff-permissions \
|
|
|
275
277
|
사용합니다. 스키마가 바뀌면 새로운 정수 `schemaVersion`을 사용하며 기존
|
|
276
278
|
필드의 의미를 조용히 바꾸지 않습니다.
|
|
277
279
|
|
|
280
|
+
## 도구 출처와 자동 권한 연결
|
|
281
|
+
|
|
282
|
+
MCP 소스와 해당 소스에 부여된 자동 권한을 하나의 값 없는 기록으로 검토합니다.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
node ./bin/trustdex.mjs snapshot-claude-bindings ./.mcp.json \
|
|
286
|
+
--settings ./.claude/settings.json \
|
|
287
|
+
--trust-store ./trust-store.json \
|
|
288
|
+
--out .trustdex/claude-bindings.json
|
|
289
|
+
|
|
290
|
+
node ./bin/trustdex.mjs snapshot-codex-bindings ~/.codex/config.toml \
|
|
291
|
+
--trust-store ./trust-store.json \
|
|
292
|
+
--out .trustdex/codex-bindings.json
|
|
293
|
+
|
|
294
|
+
node ./bin/trustdex.mjs diff-bindings \
|
|
295
|
+
.trustdex/approved-bindings.json \
|
|
296
|
+
.trustdex/current-bindings.json \
|
|
297
|
+
--json
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Claude에서는 `--settings` 대신 스택 소스 플래그를 사용할 수 있습니다. 범위가
|
|
301
|
+
제한된 권한은 MCP 소스가 `ALLOW`일 때만 `bound`가 될 수 있습니다. 와일드카드/전체
|
|
302
|
+
도구 권한, ASK 소스, 출처 변경, 일치하지 않는 규칙 및 모호한 서버 이름 일치는
|
|
303
|
+
재검토 또는 차단 대상입니다. Codex의 `default_tools_approval_mode = "approve"`는
|
|
304
|
+
전체 도구 권한으로 취급합니다. 보고서는 서버 이름과 구조적 개수만 보관하고
|
|
305
|
+
엔드포인트 경로, 권한 지정자 및 도구 이름은 제외합니다.
|
|
306
|
+
[`schemas/tool-permission-bindings-v1.schema.json`](schemas/tool-permission-bindings-v1.schema.json)과
|
|
307
|
+
[`schemas/tool-permission-bindings-diff-v1.schema.json`](schemas/tool-permission-bindings-diff-v1.schema.json)으로
|
|
308
|
+
검증할 수 있습니다. 이는 검토 증거이며 런타임 권한 강제 기능이 아닙니다.
|
|
309
|
+
|
|
310
|
+
## 실제 런타임 도구 증거
|
|
311
|
+
|
|
312
|
+
권한이 있는 런타임 어댑터는 런타임, 캡처 방식, 서버 이름 및 도구 개수만 포함한
|
|
313
|
+
최소 인벤토리를 생성할 수 있습니다. TrustDex는 비공개 파일을 찾거나 도구 호출을
|
|
314
|
+
가로채지 않고 이 명시적 입력을 결합 스냅샷과 대조합니다.
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
node ./bin/trustdex.mjs snapshot-runtime-tools \
|
|
318
|
+
.trustdex/claude-bindings.json \
|
|
319
|
+
./runtime-tool-inventory.json \
|
|
320
|
+
--out .trustdex/runtime-tools.json
|
|
321
|
+
|
|
322
|
+
node ./bin/trustdex.mjs diff-runtime-tools \
|
|
323
|
+
.trustdex/approved-runtime-tools.json \
|
|
324
|
+
.trustdex/current-runtime-tools.json \
|
|
325
|
+
--json
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
관찰된 BLOCK 소스와 예상 밖 서버는 `block`, 관찰된 ASK 또는 광범위한 자동 권한
|
|
329
|
+
연결은 `needs-review`가 됩니다. 인벤토리에 없는 설정 서버는 제한적으로만 변한
|
|
330
|
+
상태입니다. 도구 개수 증가와 새로 관찰된 서버는 재검토를 요구합니다. 입력과 출력은
|
|
331
|
+
[`schemas/runtime-tool-inventory-v1.schema.json`](schemas/runtime-tool-inventory-v1.schema.json),
|
|
332
|
+
[`schemas/effective-runtime-tools-v1.schema.json`](schemas/effective-runtime-tools-v1.schema.json),
|
|
333
|
+
[`schemas/effective-runtime-tools-diff-v1.schema.json`](schemas/effective-runtime-tools-diff-v1.schema.json)으로
|
|
334
|
+
검증할 수 있습니다. TrustDex는 전달된 증거의 형태와 다이제스트를 검증하지만 어댑터를
|
|
335
|
+
인증하거나 인벤토리의 완전성을 증명하거나 런타임을 강제하지 않습니다. 도구 이름
|
|
336
|
+
대신 개수만 보관하므로 개수는 같고 도구 집합만 바뀌는 대체는 비교 범위 밖입니다.
|
|
337
|
+
|
|
278
338
|
## 온라인 출처 관찰
|
|
279
339
|
|
|
280
340
|
일반 검사는 계속 로컬에서만 수행됩니다. 다음 명령은 명시적으로 실행할 때만 네트워크 조회를 수행합니다.
|
|
@@ -420,7 +480,7 @@ node ./bin/trustdex.mjs verify .trustdex/trust-record.json \
|
|
|
420
480
|
```yaml
|
|
421
481
|
- uses: actions/checkout@v4
|
|
422
482
|
|
|
423
|
-
- uses: grigent/trustdex@v0.
|
|
483
|
+
- uses: grigent/trustdex@v0.10.0
|
|
424
484
|
with:
|
|
425
485
|
config: ./mcp.json
|
|
426
486
|
pack: official-first
|
|
@@ -442,7 +502,7 @@ node ./bin/trustdex.mjs verify .trustdex/trust-record.json \
|
|
|
442
502
|
|
|
443
503
|
## 로드맵
|
|
444
504
|
|
|
445
|
-
공개 로드맵은 [docs/ROADMAP.ko.md](docs/ROADMAP.ko.md)에서 관리합니다. 단기 작업은
|
|
505
|
+
공개 로드맵은 [docs/ROADMAP.ko.md](docs/ROADMAP.ko.md)에서 관리합니다. 단기 작업은 인증된 런타임 증거 생성자, 안정적인 옵트인 어댑터, 재현 가능한 통제 및 실제 파일럿 피드백에 중점을 둡니다. 로드맵 항목은 계획이며 약속이 아닙니다.
|
|
446
506
|
|
|
447
507
|
## 보안
|
|
448
508
|
|
package/README.md
CHANGED
|
@@ -70,6 +70,8 @@ TrustDex deliberately does not infer "official" status from names, stars, or bra
|
|
|
70
70
|
- fail closed on unsupported Codex MCP keys and subsections
|
|
71
71
|
- verify user-supplied package bytes against npm SRI or MCP Registry SHA-256 metadata
|
|
72
72
|
- bind integrity-backed trust evidence to the configured package version and block mismatches
|
|
73
|
+
- bind each Claude/Codex MCP source decision and provenance state to its automatic tool grant without retaining tool names or rule values
|
|
74
|
+
- reconcile explicit, value-free runtime MCP inventories with reviewed bindings and detect blocked or unexpected loaded servers
|
|
73
75
|
|
|
74
76
|
## Compatibility
|
|
75
77
|
|
|
@@ -82,8 +84,8 @@ Requires Node.js 20+.
|
|
|
82
84
|
Run directly from npm:
|
|
83
85
|
|
|
84
86
|
```bash
|
|
85
|
-
npx trustdex@0.
|
|
86
|
-
npx trustdex@0.
|
|
87
|
+
npx trustdex@0.10.0 --help
|
|
88
|
+
npx trustdex@0.10.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
Or work from a source checkout:
|
|
@@ -212,7 +214,7 @@ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
|
|
|
212
214
|
Check the gate's result before starting Claude. Only `ALLOW` entries are exposed by
|
|
213
215
|
default; `ASK` entries require review. The adapter rejects settings it cannot
|
|
214
216
|
inspect instead of silently trusting them. These commands are available in npm 0.5.0 and later, and from a source checkout.
|
|
215
|
-
Use `npx trustdex@0.
|
|
217
|
+
Use `npx trustdex@0.10.0` in place of `node ./bin/trustdex.mjs` to run the published CLI.
|
|
216
218
|
|
|
217
219
|
See [Using TrustDex with Claude](docs/CLAUDE.md) for supported settings, PowerShell
|
|
218
220
|
error handling, signed review, and the Claude Desktop workflow.
|
|
@@ -291,6 +293,66 @@ Merged-source snapshots and their diffs use
|
|
|
291
293
|
and [`schemas/permission-posture-diff-v2.schema.json`](schemas/permission-posture-diff-v2.schema.json).
|
|
292
294
|
Schema changes require a new integer `schemaVersion`; fields are not silently repurposed.
|
|
293
295
|
|
|
296
|
+
## Tool provenance and automatic permission bindings
|
|
297
|
+
|
|
298
|
+
Review an MCP source and the automatic permission granted to it as one value-free record:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
node ./bin/trustdex.mjs snapshot-claude-bindings ./.mcp.json \
|
|
302
|
+
--settings ./.claude/settings.json \
|
|
303
|
+
--trust-store ./trust-store.json \
|
|
304
|
+
--out .trustdex/claude-bindings.json
|
|
305
|
+
|
|
306
|
+
node ./bin/trustdex.mjs snapshot-codex-bindings ~/.codex/config.toml \
|
|
307
|
+
--trust-store ./trust-store.json \
|
|
308
|
+
--out .trustdex/codex-bindings.json
|
|
309
|
+
|
|
310
|
+
node ./bin/trustdex.mjs diff-bindings \
|
|
311
|
+
.trustdex/approved-bindings.json \
|
|
312
|
+
.trustdex/current-bindings.json \
|
|
313
|
+
--json
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Claude stack source flags can replace `--settings`. A scoped grant can be `bound` only
|
|
317
|
+
when its MCP source is `ALLOW`; wildcard/all-tool grants, ASK sources, changed
|
|
318
|
+
provenance, unmatched rules, and ambiguous server-name matches require review or are
|
|
319
|
+
blocked. Codex `default_tools_approval_mode = "approve"` is treated as an all-tool
|
|
320
|
+
grant. Reports retain server names and structural counts, but omit endpoint paths,
|
|
321
|
+
permission specifiers, and tool names. Validate them with
|
|
322
|
+
[`schemas/tool-permission-bindings-v1.schema.json`](schemas/tool-permission-bindings-v1.schema.json)
|
|
323
|
+
and [`schemas/tool-permission-bindings-diff-v1.schema.json`](schemas/tool-permission-bindings-diff-v1.schema.json).
|
|
324
|
+
This is review evidence, not runtime permission enforcement.
|
|
325
|
+
|
|
326
|
+
## Effective runtime tool evidence
|
|
327
|
+
|
|
328
|
+
An authorized runtime adapter can emit a minimal inventory containing only runtime,
|
|
329
|
+
capture method, server names, and tool counts. TrustDex reconciles that explicit input
|
|
330
|
+
with a binding snapshot without searching private files or intercepting tool calls:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
node ./bin/trustdex.mjs snapshot-runtime-tools \
|
|
334
|
+
.trustdex/claude-bindings.json \
|
|
335
|
+
./runtime-tool-inventory.json \
|
|
336
|
+
--out .trustdex/runtime-tools.json
|
|
337
|
+
|
|
338
|
+
node ./bin/trustdex.mjs diff-runtime-tools \
|
|
339
|
+
.trustdex/approved-runtime-tools.json \
|
|
340
|
+
.trustdex/current-runtime-tools.json \
|
|
341
|
+
--json
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Observed BLOCK sources and unexpected servers produce `block`; observed ASK or broad
|
|
345
|
+
automatic-grant bindings produce `needs-review`; configured servers absent from the
|
|
346
|
+
inventory are restriction-only. Tool-count growth and newly observed servers require
|
|
347
|
+
review. The input and output schemas are
|
|
348
|
+
[`schemas/runtime-tool-inventory-v1.schema.json`](schemas/runtime-tool-inventory-v1.schema.json),
|
|
349
|
+
[`schemas/effective-runtime-tools-v1.schema.json`](schemas/effective-runtime-tools-v1.schema.json),
|
|
350
|
+
and [`schemas/effective-runtime-tools-diff-v1.schema.json`](schemas/effective-runtime-tools-diff-v1.schema.json).
|
|
351
|
+
TrustDex validates the supplied evidence shape and digest but does not authenticate the
|
|
352
|
+
adapter, prove that the inventory is complete, or enforce the runtime. Because the
|
|
353
|
+
contract retains counts instead of tool names, same-count tool-set substitutions remain
|
|
354
|
+
outside this comparison.
|
|
355
|
+
|
|
294
356
|
## Online provenance observations
|
|
295
357
|
|
|
296
358
|
Normal inspection remains local-only. These commands perform an explicit network lookup only when invoked:
|
|
@@ -436,7 +498,7 @@ The private key should never be committed.
|
|
|
436
498
|
```yaml
|
|
437
499
|
- uses: actions/checkout@v4
|
|
438
500
|
|
|
439
|
-
- uses: grigent/trustdex@v0.
|
|
501
|
+
- uses: grigent/trustdex@v0.10.0
|
|
440
502
|
with:
|
|
441
503
|
config: ./mcp.json
|
|
442
504
|
pack: official-first
|
|
@@ -458,7 +520,7 @@ For production CI, pin the action to a reviewed commit SHA rather than a moving
|
|
|
458
520
|
|
|
459
521
|
## Roadmap
|
|
460
522
|
|
|
461
|
-
The public roadmap is maintained in [docs/ROADMAP.md](docs/ROADMAP.md). Near-term work focuses on
|
|
523
|
+
The public roadmap is maintained in [docs/ROADMAP.md](docs/ROADMAP.md). Near-term work focuses on authenticated runtime-evidence producers, stable opt-in adapters, reproducible controls, and real-world pilot feedback. Roadmap items are intentions, not promises.
|
|
462
524
|
|
|
463
525
|
## Security
|
|
464
526
|
|
package/bin/trustdex.mjs
CHANGED
|
@@ -8,7 +8,11 @@ import { inspectMcpConfig } from '../src/inspect.mjs';
|
|
|
8
8
|
import { parseCodexMcpToml, gateCodexToml } from '../src/codex-config.mjs';
|
|
9
9
|
import { inspectCodexSettingsStack, inspectCodexSettingsText } from '../src/codex-settings.mjs';
|
|
10
10
|
import { parseClaudeMcpConfig } from '../src/claude-config.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
inspectClaudeMcpPermissionBindings,
|
|
13
|
+
inspectClaudeSettings,
|
|
14
|
+
inspectClaudeSettingsStack
|
|
15
|
+
} from '../src/claude-settings.mjs';
|
|
12
16
|
import { inspectSkillText, inspectPluginManifest } from '../src/extensions.mjs';
|
|
13
17
|
import { evaluateAll } from '../src/policy.mjs';
|
|
14
18
|
import { getPolicyPack, mergePolicy } from '../src/policy-packs.mjs';
|
|
@@ -27,6 +31,15 @@ import {
|
|
|
27
31
|
createPermissionPostureSnapshot,
|
|
28
32
|
diffPermissionPostureSnapshots
|
|
29
33
|
} from '../src/posture.mjs';
|
|
34
|
+
import {
|
|
35
|
+
codexAutomaticGrantProjection,
|
|
36
|
+
createToolPermissionBindingSnapshot,
|
|
37
|
+
diffToolPermissionBindingSnapshots
|
|
38
|
+
} from '../src/bindings.mjs';
|
|
39
|
+
import {
|
|
40
|
+
createEffectiveRuntimeEvidence,
|
|
41
|
+
diffEffectiveRuntimeEvidence
|
|
42
|
+
} from '../src/runtime-evidence.mjs';
|
|
30
43
|
import { gateMcpConfig } from '../src/gate.mjs';
|
|
31
44
|
import { assessReview } from '../src/review.mjs';
|
|
32
45
|
import {
|
|
@@ -66,6 +79,10 @@ Usage:
|
|
|
66
79
|
trustdex inspect-claude-settings-stack [--user file] [--project file] [--local file]
|
|
67
80
|
[--session file] [--managed file] [--json]
|
|
68
81
|
trustdex snapshot-claude-settings-stack [same source flags] --out posture.json
|
|
82
|
+
trustdex snapshot-claude-bindings <.mcp.json> --settings file --out bindings.json
|
|
83
|
+
[--trust-store trust-store.json] [--pack ...]
|
|
84
|
+
trustdex snapshot-claude-bindings <.mcp.json> [Claude stack source flags]
|
|
85
|
+
--out bindings.json [--trust-store trust-store.json] [--pack ...]
|
|
69
86
|
trustdex gate-claude <.mcp.json> --out gated.json [--pack ...] [--policy policy.json]
|
|
70
87
|
trustdex snapshot-claude <.mcp.json> --out snapshot.json [--pack ...]
|
|
71
88
|
trustdex approve-claude <.mcp.json> --private key.pem --dir review [--pack ...]
|
|
@@ -92,6 +109,11 @@ Usage:
|
|
|
92
109
|
|
|
93
110
|
trustdex diff <before.json> <after.json> [--json]
|
|
94
111
|
trustdex diff-permissions <before.json> <after.json> [--json]
|
|
112
|
+
trustdex snapshot-codex-bindings <config.toml> --out bindings.json
|
|
113
|
+
[--trust-store trust-store.json] [--pack ...]
|
|
114
|
+
trustdex diff-bindings <before.json> <after.json> [--json]
|
|
115
|
+
trustdex snapshot-runtime-tools <bindings.json> <inventory.json> --out runtime.json
|
|
116
|
+
trustdex diff-runtime-tools <before.json> <after.json> [--json]
|
|
95
117
|
trustdex policy <strict|official-first|development>
|
|
96
118
|
|
|
97
119
|
trustdex keygen --private trustdex-private.pem --public trustdex-public.pem
|
|
@@ -181,8 +203,8 @@ function setInspectExitCode(results) {
|
|
|
181
203
|
else if (results.some((result) => result.action === 'ask')) process.exitCode = 1;
|
|
182
204
|
}
|
|
183
205
|
|
|
184
|
-
async function evaluateMcp(configPath, args) {
|
|
185
|
-
const isClaude = args[0].endsWith('-claude');
|
|
206
|
+
async function evaluateMcp(configPath, args, options = {}) {
|
|
207
|
+
const isClaude = options.claude === true || args[0].endsWith('-claude');
|
|
186
208
|
let config;
|
|
187
209
|
try { config = await readJson(configPath); } catch (error) {
|
|
188
210
|
if (isClaude && error instanceof SyntaxError) throw new Error('Invalid Claude MCP JSON.');
|
|
@@ -273,6 +295,37 @@ async function evaluateCodexSettingsStack(args) {
|
|
|
273
295
|
return { policy, result };
|
|
274
296
|
}
|
|
275
297
|
|
|
298
|
+
async function loadClaudeBindingLayers(args) {
|
|
299
|
+
const single = getFlags(args, '--settings');
|
|
300
|
+
const stackScopes = ['user', 'project', 'local', 'session', 'managed'];
|
|
301
|
+
const hasStack = stackScopes.some((scope) => getFlags(args, `--${scope}`).length);
|
|
302
|
+
if (single.length > 1 || (single.length && hasStack)) {
|
|
303
|
+
throw new Error('Claude bindings accept one --settings file or stack source flags, not both.');
|
|
304
|
+
}
|
|
305
|
+
if (single.length) {
|
|
306
|
+
let settings;
|
|
307
|
+
try { settings = await readJson(single[0]); } catch (error) {
|
|
308
|
+
if (error instanceof SyntaxError) throw new Error('Invalid Claude settings JSON.');
|
|
309
|
+
throw error;
|
|
310
|
+
}
|
|
311
|
+
return [{ scope: 'session', settings }];
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const layers = [];
|
|
315
|
+
for (const scope of stackScopes) {
|
|
316
|
+
for (const file of getFlags(args, `--${scope}`)) {
|
|
317
|
+
let settings;
|
|
318
|
+
try { settings = await readJson(file); } catch (error) {
|
|
319
|
+
if (error instanceof SyntaxError) throw new Error(`Invalid Claude ${scope} settings JSON.`);
|
|
320
|
+
throw error;
|
|
321
|
+
}
|
|
322
|
+
layers.push({ scope, settings });
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (!layers.length) throw new Error('Claude bindings require --settings or stack source flags.');
|
|
326
|
+
return layers;
|
|
327
|
+
}
|
|
328
|
+
|
|
276
329
|
function printObservation(observation, asJson) {
|
|
277
330
|
if (asJson) {
|
|
278
331
|
console.log(JSON.stringify(observation, null, 2));
|
|
@@ -316,6 +369,40 @@ function printPermissionPostureDiff(diff) {
|
|
|
316
369
|
}
|
|
317
370
|
}
|
|
318
371
|
|
|
372
|
+
function printBindingDiff(diff) {
|
|
373
|
+
if (diff.status === 'unchanged') {
|
|
374
|
+
console.log('UNCHANGED: tool permission bindings match the baseline.');
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
console.log(diff.status === 'restricted'
|
|
378
|
+
? 'RESTRICTED: automatic tool permissions became more restrictive.'
|
|
379
|
+
: 'NEEDS_REVIEW: tool provenance or automatic permissions changed.');
|
|
380
|
+
for (const change of diff.changes) {
|
|
381
|
+
const subject = change.name ? `${change.name}.` : '';
|
|
382
|
+
const details = change.before !== null || change.after !== null
|
|
383
|
+
? ` (${String(change.before)} -> ${String(change.after)})`
|
|
384
|
+
: '';
|
|
385
|
+
console.log(`${change.impact.toUpperCase()} ${change.type}: ${subject}${change.field}${details}`);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function printRuntimeEvidenceDiff(diff) {
|
|
390
|
+
if (diff.status === 'unchanged') {
|
|
391
|
+
console.log('UNCHANGED: effective runtime tool evidence matches the baseline.');
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
console.log(diff.status === 'restricted'
|
|
395
|
+
? 'RESTRICTED: observed runtime tool exposure became more restrictive.'
|
|
396
|
+
: 'NEEDS_REVIEW: effective runtime tool evidence changed.');
|
|
397
|
+
for (const change of diff.changes) {
|
|
398
|
+
const subject = change.name ? `${change.name}.` : '';
|
|
399
|
+
const details = change.before !== null || change.after !== null
|
|
400
|
+
? ` (${String(change.before)} -> ${String(change.after)})`
|
|
401
|
+
: '';
|
|
402
|
+
console.log(`${change.impact.toUpperCase()} ${change.type}: ${subject}${change.field}${details}`);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
319
406
|
async function main() {
|
|
320
407
|
const args = process.argv.slice(2);
|
|
321
408
|
const command = args[0];
|
|
@@ -422,6 +509,66 @@ async function main() {
|
|
|
422
509
|
return;
|
|
423
510
|
}
|
|
424
511
|
|
|
512
|
+
if (command === 'snapshot-claude-bindings') {
|
|
513
|
+
const configPath = args[1];
|
|
514
|
+
const out = getFlag(args, '--out');
|
|
515
|
+
if (!configPath || !out) {
|
|
516
|
+
throw new Error('snapshot-claude-bindings requires <.mcp.json>, settings sources, and --out <bindings.json>.');
|
|
517
|
+
}
|
|
518
|
+
const { policy, store, results } = await evaluateMcp(configPath, args, { claude: true });
|
|
519
|
+
const projection = inspectClaudeMcpPermissionBindings(
|
|
520
|
+
await loadClaudeBindingLayers(args),
|
|
521
|
+
results.map((result) => result.name)
|
|
522
|
+
);
|
|
523
|
+
const snapshot = createToolPermissionBindingSnapshot({
|
|
524
|
+
runtime: 'claude',
|
|
525
|
+
results,
|
|
526
|
+
grants: projection.grants,
|
|
527
|
+
policy,
|
|
528
|
+
trustStore: store,
|
|
529
|
+
unboundAutomaticGrantCount: projection.unboundAllowRuleCount,
|
|
530
|
+
ambiguousAutomaticGrantCount: projection.ambiguousAllowRuleCount
|
|
531
|
+
});
|
|
532
|
+
await writeFileSafe(out, `${JSON.stringify(snapshot, null, 2)}\n`);
|
|
533
|
+
console.log(`Wrote ${out}\nStatus: ${snapshot.status}\nDigest: ${snapshot.digest}`);
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if (command === 'snapshot-codex-bindings') {
|
|
538
|
+
const configPath = args[1];
|
|
539
|
+
const out = getFlag(args, '--out');
|
|
540
|
+
if (!configPath || !out) {
|
|
541
|
+
throw new Error('snapshot-codex-bindings requires <config.toml> and --out <bindings.json>.');
|
|
542
|
+
}
|
|
543
|
+
const { policy, store, results } = await evaluateCodex(configPath, args);
|
|
544
|
+
const snapshot = createToolPermissionBindingSnapshot({
|
|
545
|
+
runtime: 'codex',
|
|
546
|
+
results,
|
|
547
|
+
grants: codexAutomaticGrantProjection(results),
|
|
548
|
+
policy,
|
|
549
|
+
trustStore: store
|
|
550
|
+
});
|
|
551
|
+
await writeFileSafe(out, `${JSON.stringify(snapshot, null, 2)}\n`);
|
|
552
|
+
console.log(`Wrote ${out}\nStatus: ${snapshot.status}\nDigest: ${snapshot.digest}`);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (command === 'snapshot-runtime-tools') {
|
|
557
|
+
const bindingsPath = args[1];
|
|
558
|
+
const inventoryPath = args[2];
|
|
559
|
+
const out = getFlag(args, '--out');
|
|
560
|
+
if (!bindingsPath || !inventoryPath || !out) {
|
|
561
|
+
throw new Error('snapshot-runtime-tools requires <bindings.json> <inventory.json> and --out <runtime.json>.');
|
|
562
|
+
}
|
|
563
|
+
const snapshot = createEffectiveRuntimeEvidence(
|
|
564
|
+
await readJson(bindingsPath),
|
|
565
|
+
await readJson(inventoryPath)
|
|
566
|
+
);
|
|
567
|
+
await writeFileSafe(out, `${JSON.stringify(snapshot, null, 2)}\n`);
|
|
568
|
+
console.log(`Wrote ${out}\nStatus: ${snapshot.status}\nDigest: ${snapshot.digest}`);
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
|
|
425
572
|
if (command === 'diff-permissions') {
|
|
426
573
|
const beforePath = args[1];
|
|
427
574
|
const afterPath = args[2];
|
|
@@ -438,6 +585,38 @@ async function main() {
|
|
|
438
585
|
return;
|
|
439
586
|
}
|
|
440
587
|
|
|
588
|
+
if (command === 'diff-bindings') {
|
|
589
|
+
const beforePath = args[1];
|
|
590
|
+
const afterPath = args[2];
|
|
591
|
+
if (!beforePath || !afterPath) {
|
|
592
|
+
throw new Error('diff-bindings requires <before.json> <after.json>.');
|
|
593
|
+
}
|
|
594
|
+
const diff = diffToolPermissionBindingSnapshots(
|
|
595
|
+
await readJson(beforePath),
|
|
596
|
+
await readJson(afterPath)
|
|
597
|
+
);
|
|
598
|
+
if (hasFlag(args, '--json')) console.log(JSON.stringify(diff, null, 2));
|
|
599
|
+
else printBindingDiff(diff);
|
|
600
|
+
if (diff.status === 'needs-review') process.exitCode = 1;
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (command === 'diff-runtime-tools') {
|
|
605
|
+
const beforePath = args[1];
|
|
606
|
+
const afterPath = args[2];
|
|
607
|
+
if (!beforePath || !afterPath) {
|
|
608
|
+
throw new Error('diff-runtime-tools requires <before.json> <after.json>.');
|
|
609
|
+
}
|
|
610
|
+
const diff = diffEffectiveRuntimeEvidence(
|
|
611
|
+
await readJson(beforePath),
|
|
612
|
+
await readJson(afterPath)
|
|
613
|
+
);
|
|
614
|
+
if (hasFlag(args, '--json')) console.log(JSON.stringify(diff, null, 2));
|
|
615
|
+
else printRuntimeEvidenceDiff(diff);
|
|
616
|
+
if (diff.status === 'needs-review') process.exitCode = 1;
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
|
|
441
620
|
if (command === 'gate-codex') {
|
|
442
621
|
const configPath = args[1];
|
|
443
622
|
const out = getFlag(args, '--out');
|
package/docs/ARCHITECTURE.ko.md
CHANGED
|
@@ -13,7 +13,8 @@ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존
|
|
|
13
13
|
3. 선택적인 신뢰 저장소 주장이 명시적인 출처 증거를 연결합니다.
|
|
14
14
|
4. 정책 엔진이 ALLOW, ASK 또는 BLOCK을 생성합니다.
|
|
15
15
|
5. 게이트가 승인된 설정만 출력합니다.
|
|
16
|
-
6. MCP 스냅샷, 권한 상태 스냅샷 및 서명된 신뢰 기록을 통해 이후 드리프트를 검토할 수 있습니다.
|
|
16
|
+
6. MCP 스냅샷, 권한 상태 스냅샷, 출처–권한 결합 스냅샷 및 서명된 신뢰 기록을 통해 이후 드리프트를 검토할 수 있습니다.
|
|
17
|
+
7. 명시적으로 전달된 값 없는 런타임 인벤토리를 검토된 연결과 대조할 수 있습니다. TrustDex는 런타임을 자동으로 찾거나 가로채지 않습니다.
|
|
17
18
|
|
|
18
19
|
게이트가 강제 적용 경계입니다. 보고서만으로는 에이전트가 검토되지 않은 확장을 불러오는 것을 막을 수 없습니다.
|
|
19
20
|
|
|
@@ -32,6 +33,8 @@ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존
|
|
|
32
33
|
| `src/gate.mjs` | 승인된 MCP 항목만 출력 |
|
|
33
34
|
| `src/snapshot.mjs` | 결정론적 신뢰 관련 상태 및 드리프트 |
|
|
34
35
|
| `src/posture.mjs` | 값이 제거된 Claude/Codex 권한 상태 스냅샷 및 자율성 확대 분류 |
|
|
36
|
+
| `src/bindings.mjs` | 값이 제거된 MCP 소스/출처와 자동 도구 권한의 연결 및 드리프트 분류 |
|
|
37
|
+
| `src/runtime-evidence.mjs` | 명시적 런타임 인벤토리 검증, 실제 경계 대조 및 노출 드리프트 |
|
|
35
38
|
| `src/trust-record.mjs` | Ed25519 검토 기록 서명 및 검증 |
|
|
36
39
|
| `src/review.mjs` | 서명된 기준선 비교 |
|
|
37
40
|
|
|
@@ -41,6 +44,8 @@ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존
|
|
|
41
44
|
- 비밀 값은 출력하거나 스냅샷에 저장해서는 안 됩니다.
|
|
42
45
|
- 권한 규칙 값, 쓰기 가능 루트 경로, 훅/도우미 본문 및 관련 없는 설정 값은 에이전트 설정 보고서에 보관해서는 안 됩니다.
|
|
43
46
|
- 권한 상태 스냅샷은 소스 경로와 설정 값을 제외해야 하며, 새 자율성 또는 정책 의미 변경은 검토를 요구해야 합니다.
|
|
47
|
+
- 결합 스냅샷은 권한 지정자와 도구 이름을 제외해야 하며, ASK/BLOCK 소스의 자동 권한, 와일드카드 확대, 출처 변경 또는 모호하거나 연결되지 않은 규칙을 안전한 연결로 표시해서는 안 됩니다.
|
|
48
|
+
- 런타임 증거는 원시 도구 목록과 예상 밖 필드를 거부하고, 관찰된 BLOCK/미설정 서버를 차단하며, 새로 관찰된 서버나 도구 개수 증가를 검토가 필요한 확대로 처리해야 합니다.
|
|
44
49
|
- 알 수 없는 증거가 신뢰로 바뀌어서는 안 됩니다.
|
|
45
50
|
- 차단 신호의 심각도를 출처 정보로 낮춰서는 안 됩니다.
|
|
46
51
|
- 지원하지 않는 보안 관련 구문은 안전하게 실패해야 합니다.
|
|
@@ -49,6 +54,17 @@ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존
|
|
|
49
54
|
|
|
50
55
|
설정 검사는 권고 기능입니다. 소스 파일 하나 또는 명시적으로 전달된 Claude/Codex 소스 스택을 읽고 지원되는 보안 필드에 대해 문서화된 우선순위를 계산할 수 있습니다. 활성 파일, 프로필, 환경 변수 재정의, 요구사항 또는 서버 전달 정책을 자동으로 찾지 않으며 보고된 정책이 실제로 활성화되었다는 것도 증명하지 않습니다. MCP 게이트는 구현된 강제 적용 경계로 유지되고, 에이전트 작업은 운영체제 및 런타임 샌드박스가 강제합니다.
|
|
51
56
|
|
|
57
|
+
결합 스냅샷은 MCP 검사/정책 결과와 명시적으로 전달된 런타임 설정에서 파싱한
|
|
58
|
+
자동 도구 권한이라는 두 정적 투영을 합성합니다. 실제 설정을 자동으로 찾거나 도구
|
|
59
|
+
호출을 가로채지 않습니다. `bound`는 관찰된 범위 제한 권한이 전달된 증거 아래에서
|
|
60
|
+
ALLOW 소스를 가리킨다는 뜻이며, 도구 구현이 안전하거나 런타임이 해당 파일을
|
|
61
|
+
로드했다는 뜻이 아닙니다.
|
|
62
|
+
|
|
63
|
+
런타임 증거는 권한이 있는 어댑터가 제공하는 세 번째 옵트인 투영을 추가합니다.
|
|
64
|
+
계약에는 도구 이름, 엔드포인트, 경로 또는 자격 증명이 아니라 서버 이름과 도구
|
|
65
|
+
개수만 포함됩니다. 인벤토리 다이제스트는 내부 상태만 검증합니다. 운영자는 별도의
|
|
66
|
+
신뢰할 수 있는 채널로 생성자를 인증하고 완전성을 확인해야 합니다.
|
|
67
|
+
|
|
52
68
|
## 의존성 정책
|
|
53
69
|
|
|
54
70
|
현재 런타임 코드는 Node.js 기본 제공 기능만 사용합니다. 새로운 의존성을 추가하려면 해당 기능을 플랫폼만으로 합리적으로 구현할 수 없는 이유, 패키지의 유지관리 및 보안 상태, 공급망 경계에 미치는 영향을 설명하는 이슈가 필요합니다.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -13,7 +13,8 @@ TrustDex is a dependency-free Node.js CLI that separates observation, policy, ga
|
|
|
13
13
|
3. Optional trust-store claims attach explicit provenance evidence.
|
|
14
14
|
4. The policy engine produces ALLOW, ASK, or BLOCK.
|
|
15
15
|
5. A gate emits only the approved configuration.
|
|
16
|
-
6. MCP snapshots, permission posture snapshots, and signed trust records make later drift reviewable.
|
|
16
|
+
6. MCP snapshots, permission posture snapshots, provenance-permission binding snapshots, and signed trust records make later drift reviewable.
|
|
17
|
+
7. An explicitly supplied value-free runtime inventory can be reconciled with reviewed bindings; TrustDex does not discover or intercept the runtime.
|
|
17
18
|
|
|
18
19
|
The gate is the enforcement boundary. Reports alone do not prevent an agent from loading an unreviewed extension.
|
|
19
20
|
|
|
@@ -32,6 +33,8 @@ The gate is the enforcement boundary. Reports alone do not prevent an agent from
|
|
|
32
33
|
| src/gate.mjs | Output only approved MCP entries |
|
|
33
34
|
| src/snapshot.mjs | Deterministic trust-relevant state and drift |
|
|
34
35
|
| src/posture.mjs | Value-free Claude/Codex permission posture snapshots and autonomy-expansion classification |
|
|
36
|
+
| src/bindings.mjs | Value-free MCP source/provenance to automatic-tool-grant bindings and drift classification |
|
|
37
|
+
| src/runtime-evidence.mjs | Explicit runtime inventory validation, effective-boundary reconciliation, and exposure drift |
|
|
35
38
|
| src/trust-record.mjs | Ed25519 review-record signing and verification |
|
|
36
39
|
| src/review.mjs | Signed-baseline comparison |
|
|
37
40
|
|
|
@@ -41,6 +44,8 @@ The gate is the enforcement boundary. Reports alone do not prevent an agent from
|
|
|
41
44
|
- Secret values must not be printed or stored in snapshots.
|
|
42
45
|
- Permission rule values, writable-root paths, hook/helper bodies, and unrelated settings values must not be retained in agent-settings reports.
|
|
43
46
|
- Permission posture snapshots must omit source paths and setting values; new autonomy or changed policy semantics must require review.
|
|
47
|
+
- Binding snapshots must omit permission specifiers and tool names; an automatic grant to ASK/BLOCK, wildcard expansion, provenance change, or ambiguous/unbound rule must never appear as safely bound.
|
|
48
|
+
- Runtime evidence must reject raw tool lists and unexpected fields, block observed BLOCK/unconfigured servers, and treat newly observed servers or tool-count growth as reviewable expansion.
|
|
44
49
|
- Unknown evidence must not become trust.
|
|
45
50
|
- A blocking signal must not be lowered by provenance.
|
|
46
51
|
- Unsupported security-relevant syntax must fail closed.
|
|
@@ -54,6 +59,17 @@ requirements, or server-delivered policy, and it does not prove the reported pol
|
|
|
54
59
|
active. MCP gates remain the implemented enforcement boundary; operating-system and
|
|
55
60
|
runtime sandboxes enforce agent actions.
|
|
56
61
|
|
|
62
|
+
Binding snapshots compose two static projections: MCP inspection/policy results and
|
|
63
|
+
automatic tool grants parsed from explicitly supplied runtime settings. They do not
|
|
64
|
+
discover effective settings or intercept tool calls. A `bound` result means the
|
|
65
|
+
observed scoped grant points to an ALLOW source under the supplied evidence, not that
|
|
66
|
+
the tool implementation is safe or that the runtime loaded those files.
|
|
67
|
+
|
|
68
|
+
Runtime evidence adds a third, opt-in projection supplied by an authorized adapter. Its
|
|
69
|
+
contract contains server names and tool counts, not tool names, endpoints, paths, or
|
|
70
|
+
credentials. The inventory digest authenticates internal state only; an operator must
|
|
71
|
+
authenticate the producer and confirm completeness through a separate trusted channel.
|
|
72
|
+
|
|
57
73
|
## Dependency policy
|
|
58
74
|
|
|
59
75
|
Runtime code currently uses only Node.js built-ins. A new dependency requires an issue explaining why the feature cannot reasonably be implemented with the platform, the package's maintenance and security posture, and the effect on the supply-chain boundary.
|
package/docs/CLAUDE.ko.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
TrustDex는 Claude Code 또는 Claude Desktop이 MCP JSON을 받기 전에 이를 검사할 수 있습니다. 설정 증거를 로컬에서 평가하고, MCP 서버를 시작하지 않으며, 설정을 업로드하지 않습니다. ALLOW 결정은 증거가 정책과 일치한다는 뜻이며 서버 코드가 안전하다는 것을 증명하지 않습니다.
|
|
8
8
|
|
|
9
|
-
Claude 전용 명령은 TrustDex 0.5.0 이상에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 아래 예제의 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.
|
|
9
|
+
Claude 전용 명령은 TrustDex 0.5.0 이상에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 아래 예제의 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.10.0`을 사용하거나, 소스 체크아웃에서 명령을 직접 사용하세요.
|
|
10
10
|
|
|
11
11
|
## 지원되는 설정
|
|
12
12
|
|
|
@@ -137,6 +137,38 @@ node ./bin/trustdex.mjs diff-permissions \
|
|
|
137
137
|
병합 소스 스냅샷은 스키마 v2를 사용하고 소스 범위 개수만 포함합니다. 최종 구조적
|
|
138
138
|
권한 상태가 같더라도 소스 추가, 제거 또는 범위 변경에는 재검토가 필요합니다.
|
|
139
139
|
|
|
140
|
+
### MCP 출처와 자동 권한 연결
|
|
141
|
+
|
|
142
|
+
각 `.mcp.json` 서버의 정책/출처 결과와 이를 호출할 수 있는 병합 Claude
|
|
143
|
+
`permissions.allow` 권한을 하나의 자체 검증 기록으로 연결합니다.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
node ./bin/trustdex.mjs snapshot-claude-bindings ./.mcp.json \
|
|
147
|
+
--user ./review/user.settings.json \
|
|
148
|
+
--project ./.claude/settings.json \
|
|
149
|
+
--managed ./review/managed-settings.json \
|
|
150
|
+
--trust-store ./trust-store.json \
|
|
151
|
+
--out .trustdex/claude-bindings.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
설정 파일 하나에는 `--settings <file>`을 사용합니다. 범위가 제한된 규칙은
|
|
155
|
+
`ALLOW` 소스에 연결할 수 있습니다. 와일드카드 권한, ASK/BLOCK 소스의 권한,
|
|
156
|
+
일치하지 않는 규칙 및 모호한 서버 이름 일치는 검토 또는 차단 대상으로 표시합니다.
|
|
157
|
+
스냅샷은 서버 이름과 권한 형태만 기록하며 권한 지정자와 도구 이름은 제외합니다.
|
|
158
|
+
따라서 범위가 제한된 도구가 같은 개수 안에서 바뀌는 경우에는 소스 검토가 필요합니다.
|
|
159
|
+
검토본과 현재 기록은 `diff-bindings`로 비교하며, 확대 또는 출처/정책 드리프트는
|
|
160
|
+
종료 코드 `1`을 반환합니다.
|
|
161
|
+
|
|
162
|
+
### 명시적 런타임 인벤토리 비교
|
|
163
|
+
|
|
164
|
+
권한이 있는 통합이 Claude 세션에 보이는 MCP 서버를 가져올 수 있다면 서버 이름과
|
|
165
|
+
도구 개수만 포함하는 `agent-runtime-tool-inventory` JSON을 생성하게 하세요. 그다음
|
|
166
|
+
`snapshot-runtime-tools <bindings> <inventory> --out <evidence>`를 실행합니다. 로드된
|
|
167
|
+
BLOCK 소스와 `.mcp.json`에 없는 서버는 결과를 차단하고, 검토가 필요한 연결이
|
|
168
|
+
로드되면 계속 검토가 필요합니다. `diff-runtime-tools`는 새로 보이는 서버와 도구
|
|
169
|
+
개수 증가를 감지합니다. TrustDex는 Claude를 호출하거나 세션 파일을 찾거나 어댑터를
|
|
170
|
+
인증하거나 인벤토리의 완전성을 증명하지 않습니다.
|
|
171
|
+
|
|
140
172
|
## 서명된 검토 및 드리프트
|
|
141
173
|
|
|
142
174
|
검토 워크플로 전체에서 Claude 어댑터를 유지하세요. 일반 MCP 명령은 Claude 전용 제어를 검사하지 않습니다.
|
package/docs/CLAUDE.md
CHANGED
|
@@ -10,7 +10,7 @@ upload your configuration. An ALLOW decision means the evidence matched your pol
|
|
|
10
10
|
it does not prove that server code is safe.
|
|
11
11
|
|
|
12
12
|
The Claude-specific commands are available in TrustDex 0.5.0 and later.
|
|
13
|
-
Use `npx trustdex@0.
|
|
13
|
+
Use `npx trustdex@0.10.0` in place of `node ./bin/trustdex.mjs` in the examples
|
|
14
14
|
below to run the published CLI, or use the commands directly from a source checkout.
|
|
15
15
|
|
|
16
16
|
## Supported configuration
|
|
@@ -187,6 +187,37 @@ Merged-source snapshots use schema v2 and include only source-scope counts. Addi
|
|
|
187
187
|
removing, or reclassifying a source requires review even when the resulting structural
|
|
188
188
|
permission posture is otherwise unchanged.
|
|
189
189
|
|
|
190
|
+
### Bind MCP provenance to automatic grants
|
|
191
|
+
|
|
192
|
+
Create a self-validating record that joins each `.mcp.json` server's policy/provenance
|
|
193
|
+
result to the merged Claude `permissions.allow` grant that can invoke it:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
node ./bin/trustdex.mjs snapshot-claude-bindings ./.mcp.json \
|
|
197
|
+
--user ./review/user.settings.json \
|
|
198
|
+
--project ./.claude/settings.json \
|
|
199
|
+
--managed ./review/managed-settings.json \
|
|
200
|
+
--trust-store ./trust-store.json \
|
|
201
|
+
--out .trustdex/claude-bindings.json
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
For one settings file, use `--settings <file>`. Scoped rules can bind to an `ALLOW`
|
|
205
|
+
source; wildcard grants, grants to ASK/BLOCK sources, unmatched rules, and ambiguous
|
|
206
|
+
server-name matches are surfaced for review or blocking. The snapshot records server
|
|
207
|
+
names and grant shape only. It omits permission specifiers and tool names, so same-count
|
|
208
|
+
changes among scoped tools remain a source-review responsibility. Compare reviewed and
|
|
209
|
+
current records with `diff-bindings`; expansion or provenance/policy drift exits `1`.
|
|
210
|
+
|
|
211
|
+
### Compare an explicit runtime inventory
|
|
212
|
+
|
|
213
|
+
If an authorized integration can obtain the MCP servers visible to a Claude session,
|
|
214
|
+
have it emit `agent-runtime-tool-inventory` JSON with server names and tool counts only.
|
|
215
|
+
Then run `snapshot-runtime-tools <bindings> <inventory> --out <evidence>`. Loaded BLOCK
|
|
216
|
+
sources and servers absent from `.mcp.json` block the result; loaded review-required
|
|
217
|
+
bindings remain review-required. `diff-runtime-tools` detects newly visible servers and
|
|
218
|
+
tool-count growth. TrustDex does not call Claude, discover session files, authenticate
|
|
219
|
+
the adapter, or prove the inventory is complete.
|
|
220
|
+
|
|
190
221
|
## Signed review and drift
|
|
191
222
|
|
|
192
223
|
Keep the Claude adapter throughout a review workflow; generic MCP commands do not
|