trustdex 0.7.0 → 0.8.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 +39 -7
- package/README.md +43 -7
- package/bin/trustdex.mjs +78 -9
- package/docs/ARCHITECTURE.ko.md +1 -1
- package/docs/ARCHITECTURE.md +6 -3
- package/docs/CLAUDE.ko.md +25 -2
- package/docs/CLAUDE.md +33 -5
- package/docs/CODEX.ko.md +28 -5
- package/docs/CODEX.md +38 -11
- package/docs/DEFENSIVE_USE_CASE.ko.md +2 -2
- package/docs/DEFENSIVE_USE_CASE.md +5 -3
- package/docs/EVALUATION.ko.md +12 -1
- package/docs/EVALUATION.md +12 -1
- package/docs/ROADMAP.ko.md +3 -2
- package/docs/ROADMAP.md +3 -2
- package/docs/THREAT_MODEL.ko.md +3 -1
- package/docs/THREAT_MODEL.md +3 -1
- package/package.json +2 -2
- package/schemas/permission-posture-diff-v2.schema.json +37 -0
- package/schemas/permission-posture-v2.schema.json +117 -0
- package/src/claude-settings.mjs +81 -0
- package/src/codex-settings.mjs +81 -3
- package/src/posture.mjs +69 -8
package/README.ko.md
CHANGED
|
@@ -82,8 +82,8 @@ Node.js 20 이상이 필요합니다.
|
|
|
82
82
|
npm에서 직접 실행:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
npx trustdex@0.
|
|
86
|
-
npx trustdex@0.
|
|
85
|
+
npx trustdex@0.8.0 --help
|
|
86
|
+
npx trustdex@0.8.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
또는 소스 체크아웃에서 작업:
|
|
@@ -179,7 +179,17 @@ node ./bin/trustdex.mjs inspect-codex-settings \
|
|
|
179
179
|
--pack strict
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
이 명령은 승인 정책, 샌드박스 종류, 네트워크 접근, 추가 쓰기 가능 루트 개수, 웹 검색 모드 및 명시적인 서브에이전트 활성화를 보고합니다. 쓰기 가능 경로나 관련 없는 설정의 값은 보관하지
|
|
182
|
+
이 명령은 승인 정책, 샌드박스 종류, 네트워크 접근, 추가 쓰기 가능 루트 개수, 웹 검색 모드 및 명시적인 서브에이전트 활성화를 보고합니다. 쓰기 가능 경로나 관련 없는 설정의 값은 보관하지 않습니다. 문서화된 병합 우선순위를 검사하려면 활성 소스를 명시적으로 제공하세요. `--project`는 저장소 루트에서 현재 디렉터리 방향으로 반복합니다.
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
node ./bin/trustdex.mjs inspect-codex-settings-stack \
|
|
186
|
+
--system ./review/system.toml \
|
|
187
|
+
--user ./review/user.toml \
|
|
188
|
+
--project ./review/root-project.toml \
|
|
189
|
+
--project ./review/closest-project.toml \
|
|
190
|
+
--cli ./review/cli-overrides.toml \
|
|
191
|
+
--pack strict
|
|
192
|
+
```
|
|
183
193
|
|
|
184
194
|
단계별 게이트 워크플로와 이 프로젝트가 자체 검토 과정에서 Codex를 사용하는 방법은 [Codex에서 TrustDex 사용하기](docs/CODEX.ko.md)를 참고하세요.
|
|
185
195
|
|
|
@@ -193,7 +203,7 @@ node ./bin/trustdex.mjs gate-claude ./.mcp.json --pack strict --out .trustdex/cl
|
|
|
193
203
|
claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
|
|
194
204
|
```
|
|
195
205
|
|
|
196
|
-
Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.
|
|
206
|
+
Claude를 시작하기 전에 게이트의 결과를 확인하세요. 기본적으로 `ALLOW` 항목만 노출되며, `ASK` 항목에는 검토가 필요합니다. 어댑터는 검사할 수 없는 설정을 조용히 신뢰하지 않고 거부합니다. 이 명령은 npm 0.5.0 이상과 소스 체크아웃에서 사용할 수 있습니다. 게시된 CLI를 실행하려면 `node ./bin/trustdex.mjs` 대신 `npx trustdex@0.8.0`을 사용하세요.
|
|
197
207
|
|
|
198
208
|
지원되는 설정, PowerShell 오류 처리, 서명된 검토 및 Claude Desktop 워크플로는 [Claude에서 TrustDex 사용하기](docs/CLAUDE.ko.md)를 참고하세요.
|
|
199
209
|
|
|
@@ -205,7 +215,19 @@ node ./bin/trustdex.mjs inspect-claude-settings \
|
|
|
205
215
|
--pack strict
|
|
206
216
|
```
|
|
207
217
|
|
|
208
|
-
이 명령은 구조적인 기능 증거만 보고합니다. 권한 지정자, 디렉터리 값, 훅 명령, 도메인, 자격 증명 도우미 값 또는 환경 값을 출력하거나 지문에 포함하지 않습니다.
|
|
218
|
+
이 명령은 구조적인 기능 증거만 보고합니다. 권한 지정자, 디렉터리 값, 훅 명령, 도메인, 자격 증명 도우미 값 또는 환경 값을 출력하거나 지문에 포함하지 않습니다. 문서화된 파일 우선순위와 목록 병합을 계산하려면 소스를 명시적으로 제공하세요.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
node ./bin/trustdex.mjs inspect-claude-settings-stack \
|
|
222
|
+
--user ./review/user.settings.json \
|
|
223
|
+
--project ./.claude/settings.json \
|
|
224
|
+
--local ./.claude/settings.local.json \
|
|
225
|
+
--session ./review/session.settings.json \
|
|
226
|
+
--managed ./review/managed-settings.json \
|
|
227
|
+
--pack strict
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
스택 검사는 여전히 정적 검토 도구이며 런타임 샌드박스가 아닙니다. 파일, 환경 변수 재정의 또는 조직 정책을 자동으로 찾지 않으며, 전달된 소스만 평가합니다.
|
|
209
231
|
|
|
210
232
|
## 권한 상태 드리프트
|
|
211
233
|
|
|
@@ -223,6 +245,13 @@ node ./bin/trustdex.mjs snapshot-codex-settings \
|
|
|
223
245
|
--pack strict \
|
|
224
246
|
--out .trustdex/codex-posture.json
|
|
225
247
|
|
|
248
|
+
node ./bin/trustdex.mjs snapshot-claude-settings-stack \
|
|
249
|
+
--user ./review/user.settings.json \
|
|
250
|
+
--project ./.claude/settings.json \
|
|
251
|
+
--managed ./review/managed-settings.json \
|
|
252
|
+
--pack strict \
|
|
253
|
+
--out .trustdex/claude-stack-posture.json
|
|
254
|
+
|
|
226
255
|
node ./bin/trustdex.mjs diff-permissions \
|
|
227
256
|
.trustdex/approved-posture.json \
|
|
228
257
|
.trustdex/current-posture.json \
|
|
@@ -240,7 +269,10 @@ node ./bin/trustdex.mjs diff-permissions \
|
|
|
240
269
|
기계 소비자는 `--json` 출력을
|
|
241
270
|
[`schemas/permission-posture-v1.schema.json`](schemas/permission-posture-v1.schema.json)과
|
|
242
271
|
[`schemas/permission-posture-diff-v1.schema.json`](schemas/permission-posture-diff-v1.schema.json)으로
|
|
243
|
-
검증할 수 있습니다.
|
|
272
|
+
검증할 수 있습니다. 병합 소스 스냅샷과 차이는
|
|
273
|
+
[`schemas/permission-posture-v2.schema.json`](schemas/permission-posture-v2.schema.json)과
|
|
274
|
+
[`schemas/permission-posture-diff-v2.schema.json`](schemas/permission-posture-diff-v2.schema.json)을
|
|
275
|
+
사용합니다. 스키마가 바뀌면 새로운 정수 `schemaVersion`을 사용하며 기존
|
|
244
276
|
필드의 의미를 조용히 바꾸지 않습니다.
|
|
245
277
|
|
|
246
278
|
## 온라인 출처 관찰
|
|
@@ -388,7 +420,7 @@ node ./bin/trustdex.mjs verify .trustdex/trust-record.json \
|
|
|
388
420
|
```yaml
|
|
389
421
|
- uses: actions/checkout@v4
|
|
390
422
|
|
|
391
|
-
- uses: grigent/trustdex@v0.
|
|
423
|
+
- uses: grigent/trustdex@v0.8.0
|
|
392
424
|
with:
|
|
393
425
|
config: ./mcp.json
|
|
394
426
|
pack: official-first
|
package/README.md
CHANGED
|
@@ -82,8 +82,8 @@ Requires Node.js 20+.
|
|
|
82
82
|
Run directly from npm:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
npx trustdex@0.
|
|
86
|
-
npx trustdex@0.
|
|
85
|
+
npx trustdex@0.8.0 --help
|
|
86
|
+
npx trustdex@0.8.0 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Or work from a source checkout:
|
|
@@ -181,8 +181,19 @@ node ./bin/trustdex.mjs inspect-codex-settings \
|
|
|
181
181
|
|
|
182
182
|
This reports approval policy, sandbox class, network access, additional writable-root
|
|
183
183
|
count, web-search mode, and explicit subagent enablement. It does not retain writable
|
|
184
|
-
paths or values from unrelated settings
|
|
185
|
-
|
|
184
|
+
paths or values from unrelated settings. To inspect the documented merged precedence,
|
|
185
|
+
provide each active source explicitly; repeat `--project` from repository root toward
|
|
186
|
+
the current directory:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
node ./bin/trustdex.mjs inspect-codex-settings-stack \
|
|
190
|
+
--system ./review/system.toml \
|
|
191
|
+
--user ./review/user.toml \
|
|
192
|
+
--project ./review/root-project.toml \
|
|
193
|
+
--project ./review/closest-project.toml \
|
|
194
|
+
--cli ./review/cli-overrides.toml \
|
|
195
|
+
--pack strict
|
|
196
|
+
```
|
|
186
197
|
|
|
187
198
|
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.
|
|
188
199
|
|
|
@@ -201,7 +212,7 @@ claude --strict-mcp-config --mcp-config .trustdex/claude-mcp.json
|
|
|
201
212
|
Check the gate's result before starting Claude. Only `ALLOW` entries are exposed by
|
|
202
213
|
default; `ASK` entries require review. The adapter rejects settings it cannot
|
|
203
214
|
inspect instead of silently trusting them. These commands are available in npm 0.5.0 and later, and from a source checkout.
|
|
204
|
-
Use `npx trustdex@0.
|
|
215
|
+
Use `npx trustdex@0.8.0` in place of `node ./bin/trustdex.mjs` to run the published CLI.
|
|
205
216
|
|
|
206
217
|
See [Using TrustDex with Claude](docs/CLAUDE.md) for supported settings, PowerShell
|
|
207
218
|
error handling, signed review, and the Claude Desktop workflow.
|
|
@@ -217,7 +228,22 @@ node ./bin/trustdex.mjs inspect-claude-settings \
|
|
|
217
228
|
|
|
218
229
|
The command reports structural capability evidence only. It does not print or fingerprint
|
|
219
230
|
permission specifiers, directory values, hook commands, domains, credential-helper values,
|
|
220
|
-
or environment values.
|
|
231
|
+
or environment values. To calculate the documented file precedence and list merging, pass
|
|
232
|
+
the sources explicitly:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
node ./bin/trustdex.mjs inspect-claude-settings-stack \
|
|
236
|
+
--user ./review/user.settings.json \
|
|
237
|
+
--project ./.claude/settings.json \
|
|
238
|
+
--local ./.claude/settings.local.json \
|
|
239
|
+
--session ./review/session.settings.json \
|
|
240
|
+
--managed ./review/managed-settings.json \
|
|
241
|
+
--pack strict
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The stack inspector remains a static review aid, not a runtime sandbox. It does not discover
|
|
245
|
+
files, environment overrides, or organization policy automatically; only supplied sources
|
|
246
|
+
are evaluated.
|
|
221
247
|
|
|
222
248
|
## Permission posture drift
|
|
223
249
|
|
|
@@ -235,6 +261,13 @@ node ./bin/trustdex.mjs snapshot-codex-settings \
|
|
|
235
261
|
--pack strict \
|
|
236
262
|
--out .trustdex/codex-posture.json
|
|
237
263
|
|
|
264
|
+
node ./bin/trustdex.mjs snapshot-claude-settings-stack \
|
|
265
|
+
--user ./review/user.settings.json \
|
|
266
|
+
--project ./.claude/settings.json \
|
|
267
|
+
--managed ./review/managed-settings.json \
|
|
268
|
+
--pack strict \
|
|
269
|
+
--out .trustdex/claude-stack-posture.json
|
|
270
|
+
|
|
238
271
|
node ./bin/trustdex.mjs diff-permissions \
|
|
239
272
|
.trustdex/approved-posture.json \
|
|
240
273
|
.trustdex/current-posture.json \
|
|
@@ -253,6 +286,9 @@ enforcement.
|
|
|
253
286
|
Machine consumers can validate `--json` output against
|
|
254
287
|
[`schemas/permission-posture-v1.schema.json`](schemas/permission-posture-v1.schema.json)
|
|
255
288
|
and [`schemas/permission-posture-diff-v1.schema.json`](schemas/permission-posture-diff-v1.schema.json).
|
|
289
|
+
Merged-source snapshots and their diffs use
|
|
290
|
+
[`schemas/permission-posture-v2.schema.json`](schemas/permission-posture-v2.schema.json)
|
|
291
|
+
and [`schemas/permission-posture-diff-v2.schema.json`](schemas/permission-posture-diff-v2.schema.json).
|
|
256
292
|
Schema changes require a new integer `schemaVersion`; fields are not silently repurposed.
|
|
257
293
|
|
|
258
294
|
## Online provenance observations
|
|
@@ -400,7 +436,7 @@ The private key should never be committed.
|
|
|
400
436
|
```yaml
|
|
401
437
|
- uses: actions/checkout@v4
|
|
402
438
|
|
|
403
|
-
- uses: grigent/trustdex@v0.
|
|
439
|
+
- uses: grigent/trustdex@v0.8.0
|
|
404
440
|
with:
|
|
405
441
|
config: ./mcp.json
|
|
406
442
|
pack: official-first
|
package/bin/trustdex.mjs
CHANGED
|
@@ -6,9 +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
|
+
import { inspectCodexSettingsStack, inspectCodexSettingsText } from '../src/codex-settings.mjs';
|
|
10
10
|
import { parseClaudeMcpConfig } from '../src/claude-config.mjs';
|
|
11
|
-
import { inspectClaudeSettings } from '../src/claude-settings.mjs';
|
|
11
|
+
import { inspectClaudeSettings, inspectClaudeSettingsStack } from '../src/claude-settings.mjs';
|
|
12
12
|
import { inspectSkillText, inspectPluginManifest } from '../src/extensions.mjs';
|
|
13
13
|
import { evaluateAll } from '../src/policy.mjs';
|
|
14
14
|
import { getPolicyPack, mergePolicy } from '../src/policy-packs.mjs';
|
|
@@ -51,6 +51,9 @@ Usage:
|
|
|
51
51
|
[--trust-store trust-store.json] [--json]
|
|
52
52
|
trustdex inspect-codex-settings <config.toml> [--pack ...] [--policy policy.json] [--json]
|
|
53
53
|
trustdex snapshot-codex-settings <config.toml> --out posture.json [--pack ...]
|
|
54
|
+
trustdex inspect-codex-settings-stack [--system file] [--managed file] [--user file]
|
|
55
|
+
[--profile file] [--project file ...] [--cli file] [--json]
|
|
56
|
+
trustdex snapshot-codex-settings-stack [same source flags] --out posture.json
|
|
54
57
|
|
|
55
58
|
trustdex gate <mcp.json> --out gated.json [--pack ...] [--policy policy.json]
|
|
56
59
|
[--trust-store trust-store.json] [--include-ask] [--json]
|
|
@@ -60,6 +63,9 @@ Usage:
|
|
|
60
63
|
trustdex inspect-claude <.mcp.json> [--pack ...] [--policy policy.json] [--json]
|
|
61
64
|
trustdex inspect-claude-settings <settings.json> [--pack ...] [--policy policy.json] [--json]
|
|
62
65
|
trustdex snapshot-claude-settings <settings.json> --out posture.json [--pack ...]
|
|
66
|
+
trustdex inspect-claude-settings-stack [--user file] [--project file] [--local file]
|
|
67
|
+
[--session file] [--managed file] [--json]
|
|
68
|
+
trustdex snapshot-claude-settings-stack [same source flags] --out posture.json
|
|
63
69
|
trustdex gate-claude <.mcp.json> --out gated.json [--pack ...] [--policy policy.json]
|
|
64
70
|
trustdex snapshot-claude <.mcp.json> --out snapshot.json [--pack ...]
|
|
65
71
|
trustdex approve-claude <.mcp.json> --private key.pem --dir review [--pack ...]
|
|
@@ -122,6 +128,17 @@ function getFlag(args, name) {
|
|
|
122
128
|
return index >= 0 ? args[index + 1] : null;
|
|
123
129
|
}
|
|
124
130
|
|
|
131
|
+
function getFlags(args, name) {
|
|
132
|
+
const values = [];
|
|
133
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
134
|
+
if (args[index] !== name) continue;
|
|
135
|
+
const value = args[index + 1];
|
|
136
|
+
if (!value || value.startsWith('--')) throw new Error(`${name} requires a file path.`);
|
|
137
|
+
values.push(value);
|
|
138
|
+
}
|
|
139
|
+
return values;
|
|
140
|
+
}
|
|
141
|
+
|
|
125
142
|
function hasFlag(args, name) {
|
|
126
143
|
return args.includes(name);
|
|
127
144
|
}
|
|
@@ -225,6 +242,37 @@ async function evaluateCodexSettings(configPath, args) {
|
|
|
225
242
|
return { policy, result };
|
|
226
243
|
}
|
|
227
244
|
|
|
245
|
+
async function evaluateClaudeSettingsStack(args) {
|
|
246
|
+
const layers = [];
|
|
247
|
+
for (const scope of ['user', 'project', 'local', 'session', 'managed']) {
|
|
248
|
+
for (const file of getFlags(args, `--${scope}`)) {
|
|
249
|
+
let settings;
|
|
250
|
+
try { settings = await readJson(file); } catch (error) {
|
|
251
|
+
if (error instanceof SyntaxError) throw new Error(`Invalid Claude ${scope} settings JSON.`);
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
254
|
+
layers.push({ scope, settings });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (!layers.length) throw new Error('Claude settings stack requires at least one source flag.');
|
|
258
|
+
const policy = await loadPolicy(args);
|
|
259
|
+
const [result] = evaluateAll([inspectClaudeSettingsStack(layers)], policy);
|
|
260
|
+
return { policy, result };
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async function evaluateCodexSettingsStack(args) {
|
|
264
|
+
const layers = [];
|
|
265
|
+
for (const scope of ['system', 'managed', 'user', 'profile', 'project', 'cli']) {
|
|
266
|
+
for (const file of getFlags(args, `--${scope}`)) {
|
|
267
|
+
layers.push({ scope, text: await fs.readFile(file, 'utf8') });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (!layers.length) throw new Error('Codex settings stack requires at least one source flag.');
|
|
271
|
+
const policy = await loadPolicy(args);
|
|
272
|
+
const [result] = evaluateAll([inspectCodexSettingsStack(layers)], policy);
|
|
273
|
+
return { policy, result };
|
|
274
|
+
}
|
|
275
|
+
|
|
228
276
|
function printObservation(observation, asJson) {
|
|
229
277
|
if (asJson) {
|
|
230
278
|
console.log(JSON.stringify(observation, null, 2));
|
|
@@ -320,6 +368,13 @@ async function main() {
|
|
|
320
368
|
return;
|
|
321
369
|
}
|
|
322
370
|
|
|
371
|
+
if (command === 'inspect-claude-settings-stack') {
|
|
372
|
+
const { result } = await evaluateClaudeSettingsStack(args);
|
|
373
|
+
printResults([result], hasFlag(args, '--json'));
|
|
374
|
+
setInspectExitCode([result]);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
|
|
323
378
|
if (command === 'inspect-codex') {
|
|
324
379
|
const configPath = args[1];
|
|
325
380
|
if (!configPath) throw new Error('inspect-codex requires a path to Codex config.toml.');
|
|
@@ -338,15 +393,29 @@ async function main() {
|
|
|
338
393
|
return;
|
|
339
394
|
}
|
|
340
395
|
|
|
341
|
-
if (command === '
|
|
342
|
-
const
|
|
396
|
+
if (command === 'inspect-codex-settings-stack') {
|
|
397
|
+
const { result } = await evaluateCodexSettingsStack(args);
|
|
398
|
+
printResults([result], hasFlag(args, '--json'));
|
|
399
|
+
setInspectExitCode([result]);
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (['snapshot-claude-settings', 'snapshot-codex-settings',
|
|
404
|
+
'snapshot-claude-settings-stack', 'snapshot-codex-settings-stack'].includes(command)) {
|
|
405
|
+
const isStack = command.endsWith('-stack');
|
|
406
|
+
const configPath = isStack ? null : args[1];
|
|
343
407
|
const out = getFlag(args, '--out');
|
|
344
|
-
if (!configPath || !out) {
|
|
345
|
-
throw new Error(
|
|
408
|
+
if ((!isStack && !configPath) || !out) {
|
|
409
|
+
throw new Error(isStack
|
|
410
|
+
? `${command} requires source flags and --out <posture.json>.`
|
|
411
|
+
: `${command} requires a settings path and --out <posture.json>.`);
|
|
346
412
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
413
|
+
let evaluated;
|
|
414
|
+
if (command === 'snapshot-claude-settings') evaluated = await evaluateClaudeSettings(configPath, args);
|
|
415
|
+
else if (command === 'snapshot-codex-settings') evaluated = await evaluateCodexSettings(configPath, args);
|
|
416
|
+
else if (command === 'snapshot-claude-settings-stack') evaluated = await evaluateClaudeSettingsStack(args);
|
|
417
|
+
else evaluated = await evaluateCodexSettingsStack(args);
|
|
418
|
+
const { policy, result } = evaluated;
|
|
350
419
|
const snapshot = createPermissionPostureSnapshot(result, policy);
|
|
351
420
|
await writeFileSafe(out, `${JSON.stringify(snapshot, null, 2)}\n`);
|
|
352
421
|
console.log(`Wrote ${out}\nDigest: ${snapshot.digest}`);
|
package/docs/ARCHITECTURE.ko.md
CHANGED
|
@@ -47,7 +47,7 @@ TrustDex는 관찰, 정책, 게이트 및 검토 증거를 분리하는 의존
|
|
|
47
47
|
- 네트워크 조회는 명시적으로 수행하며, 관찰은 승인이 아닙니다.
|
|
48
48
|
- ALLOW는 정책 결과이지 안전 인증이 아닙니다.
|
|
49
49
|
|
|
50
|
-
설정 검사는
|
|
50
|
+
설정 검사는 권고 기능입니다. 소스 파일 하나 또는 명시적으로 전달된 Claude/Codex 소스 스택을 읽고 지원되는 보안 필드에 대해 문서화된 우선순위를 계산할 수 있습니다. 활성 파일, 프로필, 환경 변수 재정의, 요구사항 또는 서버 전달 정책을 자동으로 찾지 않으며 보고된 정책이 실제로 활성화되었다는 것도 증명하지 않습니다. MCP 게이트는 구현된 강제 적용 경계로 유지되고, 에이전트 작업은 운영체제 및 런타임 샌드박스가 강제합니다.
|
|
51
51
|
|
|
52
52
|
## 의존성 정책
|
|
53
53
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -47,9 +47,12 @@ The gate is the enforcement boundary. Reports alone do not prevent an agent from
|
|
|
47
47
|
- Network lookup is explicit and observation is not approval.
|
|
48
48
|
- ALLOW is a policy result, not a safety certification.
|
|
49
49
|
|
|
50
|
-
Settings inspection is
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
Settings inspection is advisory. It can read one source file or an explicitly supplied
|
|
51
|
+
Claude/Codex source stack and calculate the documented precedence for the supported
|
|
52
|
+
security fields. It does not discover active files, profiles, environment overrides,
|
|
53
|
+
requirements, or server-delivered policy, and it does not prove the reported policy is
|
|
54
|
+
active. MCP gates remain the implemented enforcement boundary; operating-system and
|
|
55
|
+
runtime sandboxes enforce agent actions.
|
|
53
56
|
|
|
54
57
|
## Dependency policy
|
|
55
58
|
|
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.8.0`을 사용하거나, 소스 체크아웃에서 명령을 직접 사용하세요.
|
|
10
10
|
|
|
11
11
|
## 지원되는 설정
|
|
12
12
|
|
|
@@ -89,7 +89,21 @@ node ./bin/trustdex.mjs inspect-claude-settings \
|
|
|
89
89
|
|
|
90
90
|
`ask`와 `deny` 규칙은 제한적이므로 그 자체로 위험 신호를 추가하지 않습니다. 보고서에는 규칙 개수와 기능 범주가 포함되지만 명령 패턴, 경로, 도메인, 훅 본문, 도우미 명령, 디렉터리 값, 환경 값 또는 플러그인 식별자는 포함되지 않습니다. 같은 이유로 이 첫 번째 어댑터는 설정 파일용 콘텐츠 지문이나 서명된 검토 기록을 만들지 않습니다.
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
여러 활성 소스를 검토할 때는 스택 명령을 사용하세요.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
node ./bin/trustdex.mjs inspect-claude-settings-stack \
|
|
96
|
+
--user ./review/user.settings.json \
|
|
97
|
+
--project ./.claude/settings.json \
|
|
98
|
+
--local ./.claude/settings.local.json \
|
|
99
|
+
--session ./review/session.settings.json \
|
|
100
|
+
--managed ./review/managed-settings.json \
|
|
101
|
+
--pack strict --json
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
TrustDex는 사용자, 공유 프로젝트, 프로젝트 로컬, 세션 및 관리형 우선순위를 적용합니다. 권한 목록은 결합하고 지원되는 스칼라 권한 제어는 가장 높은 유효 소스를 사용합니다. 문서화된 범위 제한에 맞춰 프로젝트 또는 로컬 소스의 `auto`와 `bypassPermissions` 기본 모드는 무시합니다. 보고서에는 고정된 소스 범위 이름과 개수만 저장하며 입력 경로나 설정 값은 저장하지 않습니다.
|
|
105
|
+
|
|
106
|
+
소스는 명시적으로 전달해야 합니다. TrustDex는 설정, 셸 환경 변수 재정의, 임베딩 호스트 정책 또는 서버 전달 관리형 설정을 자동으로 찾지 않습니다. `/status`로 로드된 소스를 확인하고 강제 적용에는 운영체제 수준 샌드박싱을 사용하세요. 공식 참고 자료: [설정 파일 및 우선순위](https://code.claude.com/docs/en/settings), [권한](https://code.claude.com/docs/en/permissions), [보안](https://code.claude.com/docs/en/security).
|
|
93
107
|
|
|
94
108
|
### 권한 상태 드리프트
|
|
95
109
|
|
|
@@ -101,6 +115,13 @@ node ./bin/trustdex.mjs snapshot-claude-settings \
|
|
|
101
115
|
--pack strict \
|
|
102
116
|
--out .trustdex/claude-posture.json
|
|
103
117
|
|
|
118
|
+
node ./bin/trustdex.mjs snapshot-claude-settings-stack \
|
|
119
|
+
--user ./review/user.settings.json \
|
|
120
|
+
--project ./.claude/settings.json \
|
|
121
|
+
--managed ./review/managed-settings.json \
|
|
122
|
+
--pack strict \
|
|
123
|
+
--out .trustdex/claude-stack-posture.json
|
|
124
|
+
|
|
104
125
|
node ./bin/trustdex.mjs diff-permissions \
|
|
105
126
|
.trustdex/approved-claude-posture.json \
|
|
106
127
|
.trustdex/current-claude-posture.json
|
|
@@ -113,6 +134,8 @@ node ./bin/trustdex.mjs diff-permissions \
|
|
|
113
134
|
플러그인 및 환경 값을 제외합니다. 제거된 규칙 내용을 의도적으로 지문화하지
|
|
114
135
|
않으므로 같은 기능 범주 안에서 규칙 개수는 같고 내용만 바뀌는 경우에는 소스
|
|
115
136
|
검토나 런타임 제어가 계속 필요합니다.
|
|
137
|
+
병합 소스 스냅샷은 스키마 v2를 사용하고 소스 범위 개수만 포함합니다. 최종 구조적
|
|
138
|
+
권한 상태가 같더라도 소스 추가, 제거 또는 범위 변경에는 재검토가 필요합니다.
|
|
116
139
|
|
|
117
140
|
## 서명된 검토 및 드리프트
|
|
118
141
|
|
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.8.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
|
|
@@ -129,10 +129,28 @@ paths, domains, hook bodies, helper commands, directory values, environment valu
|
|
|
129
129
|
or plugin identifiers. For the same reason, this first adapter does not create a
|
|
130
130
|
content fingerprint or signed review record for settings files.
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
Use the stack command when reviewing multiple active sources:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
node ./bin/trustdex.mjs inspect-claude-settings-stack \
|
|
136
|
+
--user ./review/user.settings.json \
|
|
137
|
+
--project ./.claude/settings.json \
|
|
138
|
+
--local ./.claude/settings.local.json \
|
|
139
|
+
--session ./review/session.settings.json \
|
|
140
|
+
--managed ./review/managed-settings.json \
|
|
141
|
+
--pack strict --json
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
TrustDex applies user, shared project, project-local, session, and managed precedence;
|
|
145
|
+
permission lists combine, while supported scalar permission controls use the highest
|
|
146
|
+
effective source. It also ignores `auto` and `bypassPermissions` defaults from project
|
|
147
|
+
or local sources, matching the documented scope restriction. The report stores only
|
|
148
|
+
fixed scope names and counts, never input paths or setting values.
|
|
149
|
+
|
|
150
|
+
Sources must be passed explicitly. TrustDex does not discover settings, shell environment
|
|
151
|
+
overrides, embedded-host policy, or server-delivered managed settings, so confirm loaded
|
|
152
|
+
sources with `/status` and use OS-level sandboxing for enforcement. Official references:
|
|
153
|
+
[settings files and precedence](https://code.claude.com/docs/en/settings),
|
|
136
154
|
[permissions](https://code.claude.com/docs/en/permissions), and
|
|
137
155
|
[security](https://code.claude.com/docs/en/security).
|
|
138
156
|
|
|
@@ -146,6 +164,13 @@ node ./bin/trustdex.mjs snapshot-claude-settings \
|
|
|
146
164
|
--pack strict \
|
|
147
165
|
--out .trustdex/claude-posture.json
|
|
148
166
|
|
|
167
|
+
node ./bin/trustdex.mjs snapshot-claude-settings-stack \
|
|
168
|
+
--user ./review/user.settings.json \
|
|
169
|
+
--project ./.claude/settings.json \
|
|
170
|
+
--managed ./review/managed-settings.json \
|
|
171
|
+
--pack strict \
|
|
172
|
+
--out .trustdex/claude-stack-posture.json
|
|
173
|
+
|
|
149
174
|
node ./bin/trustdex.mjs diff-permissions \
|
|
150
175
|
.trustdex/approved-claude-posture.json \
|
|
151
176
|
.trustdex/current-claude-posture.json
|
|
@@ -158,6 +183,9 @@ The snapshot excludes source paths and every permission, hook, directory, domain
|
|
|
158
183
|
credential-helper, plugin, and environment value. Because it intentionally does not
|
|
159
184
|
fingerprint redacted rule contents, a same-count change inside one capability category
|
|
160
185
|
must still be covered by source review or runtime controls.
|
|
186
|
+
Merged-source snapshots use schema v2 and include only source-scope counts. Adding,
|
|
187
|
+
removing, or reclassifying a source requires review even when the resulting structural
|
|
188
|
+
permission posture is otherwise unchanged.
|
|
161
189
|
|
|
162
190
|
## Signed review and drift
|
|
163
191
|
|
package/docs/CODEX.ko.md
CHANGED
|
@@ -15,7 +15,7 @@ Codex 클라이언트는 `config.toml`(기본적으로 `~/.codex/` 아래)의 `[
|
|
|
15
15
|
### 1. 현재 설정 검사
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx trustdex@0.
|
|
18
|
+
npx trustdex@0.8.0 inspect-codex ~/.codex/config.toml --pack strict
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
이 명령은 파일을 로컬에서 읽으며 네트워크 요청을 하지 않습니다. 출력에는 각 MCP 서버, 소스 유형, 신뢰 신호 및 ALLOW / ASK / BLOCK 결정이 표시됩니다. 환경 변수 이름은 표시될 수 있지만 값은 절대 표시되지 않습니다.
|
|
@@ -25,7 +25,7 @@ npx trustdex@0.7.0 inspect-codex ~/.codex/config.toml --pack strict
|
|
|
25
25
|
### 2. 게이트된 사본 작성
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npx trustdex@0.
|
|
28
|
+
npx trustdex@0.8.0 gate-codex ~/.codex/config.toml \
|
|
29
29
|
--pack official-first \
|
|
30
30
|
--trust-store ./trust-store.json \
|
|
31
31
|
--out ./gated-config.toml
|
|
@@ -70,7 +70,21 @@ node ./bin/trustdex.mjs inspect-codex-settings \
|
|
|
70
70
|
|
|
71
71
|
보안 관련 값의 타입이나 열거 값이 지원되지 않으면 안전하게 실패합니다. 공식 설정 레퍼런스가 함께 사용하지 말라고 명시하므로 `default_permissions`와 기존 샌드박스 설정을 같이 사용해도 실패합니다. 쓰기 가능 루트 경로와 관련 없는 설정의 값은 보관·출력·지문화하지 않습니다.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
문서화된 설정 우선순위를 적용하려면 스택 명령을 사용하세요. `--project`는 저장소 루트에서 현재 디렉터리 방향으로 반복하며 가장 가까운 프로젝트 파일이 우선합니다.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
node ./bin/trustdex.mjs inspect-codex-settings-stack \
|
|
77
|
+
--system ./review/system.toml \
|
|
78
|
+
--managed ./review/managed.toml \
|
|
79
|
+
--user ./review/user.toml \
|
|
80
|
+
--profile ./review/profile.toml \
|
|
81
|
+
--project ./review/root-project.toml \
|
|
82
|
+
--project ./review/closest-project.toml \
|
|
83
|
+
--cli ./review/cli-overrides.toml \
|
|
84
|
+
--pack strict --json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
스택은 시스템부터 CLI 우선순위까지 지원되는 보안 필드별로 병합됩니다. 높은 소스가 재정의하더라도 어떤 소스에 지원하지 않는 구문이 있으면 안전하게 실패합니다. 보고서에는 고정된 소스 범위 개수만 남고 설정 경로나 관련 없는 값은 남지 않습니다. 소스는 명시적 입력이며 신뢰된 프로젝트, 활성 프로필, 클라우드 관리 기본값, 요구사항 또는 CLI 플래그를 자동으로 찾지 않습니다. 이는 정적 증거이며 Codex 샌드박스 자체가 아닙니다. 클라이언트에서 활성 권한 프로필을 확인하세요. 공식 OpenAI 문서는 샌드박스 경계와 승인 처리를 구분합니다. [설정 레퍼런스](https://developers.openai.com/codex/config-reference)와 [설정 우선순위](https://developers.openai.com/codex/config-basic)를 참고하세요.
|
|
74
88
|
|
|
75
89
|
### 권한 상태 드리프트
|
|
76
90
|
|
|
@@ -83,6 +97,13 @@ node ./bin/trustdex.mjs snapshot-codex-settings \
|
|
|
83
97
|
--pack strict \
|
|
84
98
|
--out .trustdex/codex-posture.json
|
|
85
99
|
|
|
100
|
+
node ./bin/trustdex.mjs snapshot-codex-settings-stack \
|
|
101
|
+
--system ./review/system.toml \
|
|
102
|
+
--user ./review/user.toml \
|
|
103
|
+
--project ./review/project.toml \
|
|
104
|
+
--pack strict \
|
|
105
|
+
--out .trustdex/codex-stack-posture.json
|
|
106
|
+
|
|
86
107
|
node ./bin/trustdex.mjs diff-permissions \
|
|
87
108
|
.trustdex/approved-codex-posture.json \
|
|
88
109
|
.trustdex/current-codex-posture.json \
|
|
@@ -96,14 +117,16 @@ node ./bin/trustdex.mjs diff-permissions \
|
|
|
96
117
|
사용자 정의 프로필 값 또는 관련 없는 설정은 저장하지 않습니다. 다이제스트는
|
|
97
118
|
우발적이거나 조정되지 않은 편집을 감지하지만 누구나 서명되지 않은 다이제스트를
|
|
98
119
|
다시 계산할 수 있습니다. 인증이 아니며 Codex 런타임 샌드박스를 대체하지 않습니다.
|
|
120
|
+
병합 소스 스냅샷은 스키마 v2를 사용합니다. 최종 구조 설정이 같더라도 소스 범위 개수가
|
|
121
|
+
바뀌면 분류되지 않은 변경으로 처리되어 `NEEDS_REVIEW`를 반환합니다.
|
|
99
122
|
|
|
100
123
|
### 스킬 및 플러그인
|
|
101
124
|
|
|
102
125
|
에이전트 스킬과 플러그인 매니페스트도 같은 방법으로 검사할 수 있습니다.
|
|
103
126
|
|
|
104
127
|
```bash
|
|
105
|
-
npx trustdex@0.
|
|
106
|
-
npx trustdex@0.
|
|
128
|
+
npx trustdex@0.8.0 inspect-skill ./path/to/SKILL.md --pack strict
|
|
129
|
+
npx trustdex@0.8.0 inspect-plugin ./path/to/plugin.json --pack strict
|
|
107
130
|
```
|
|
108
131
|
|
|
109
132
|
이 명령은 파이프로 연결된 셸 설치 프로그램, 민감한 경로 참조, 네트워크 URL 및 와일드카드 도구 범위와 같은 관찰 가능한 신호를 보고합니다. 스킬이나 플러그인이 안전하다는 것을 증명하지는 않습니다.
|
package/docs/CODEX.md
CHANGED
|
@@ -15,7 +15,7 @@ Codex clients read MCP server definitions from `[mcp_servers.<name>]` tables in
|
|
|
15
15
|
### 1. Inspect the current configuration
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx trustdex@0.
|
|
18
|
+
npx trustdex@0.8.0 inspect-codex ~/.codex/config.toml --pack strict
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
This reads the file locally and makes no network request. The output lists each MCP server, its source type, trust signals, and an ALLOW / ASK / BLOCK decision. Environment variable names may appear; their values never do.
|
|
@@ -25,7 +25,7 @@ Use `--json` for machine-readable output and `--trust-store ./trust-store.json`
|
|
|
25
25
|
### 2. Write a gated copy
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npx trustdex@0.
|
|
28
|
+
npx trustdex@0.8.0 gate-codex ~/.codex/config.toml \
|
|
29
29
|
--pack official-first \
|
|
30
30
|
--trust-store ./trust-store.json \
|
|
31
31
|
--out ./gated-config.toml
|
|
@@ -76,13 +76,31 @@ Security-relevant values fail closed when their type or enum value is unsupporte
|
|
|
76
76
|
the official configuration reference says not to combine them. Writable-root paths
|
|
77
77
|
and values from unrelated settings are not retained, printed, or fingerprinted.
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
Use the stack command to apply the documented configuration precedence. Repeat
|
|
80
|
+
`--project` from the repository root toward the current directory; the closest project
|
|
81
|
+
file wins:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
node ./bin/trustdex.mjs inspect-codex-settings-stack \
|
|
85
|
+
--system ./review/system.toml \
|
|
86
|
+
--managed ./review/managed.toml \
|
|
87
|
+
--user ./review/user.toml \
|
|
88
|
+
--profile ./review/profile.toml \
|
|
89
|
+
--project ./review/root-project.toml \
|
|
90
|
+
--project ./review/closest-project.toml \
|
|
91
|
+
--cli ./review/cli-overrides.toml \
|
|
92
|
+
--pack strict --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The stack is merged from system through CLI precedence, one supported security field
|
|
96
|
+
at a time. Unsupported syntax in any source fails closed even when a higher source
|
|
97
|
+
would override it. Reports retain fixed source-scope counts but not config paths or
|
|
98
|
+
unrelated values. Sources are explicit inputs: the command does not discover trusted
|
|
99
|
+
projects, active profiles, cloud-managed defaults, requirements, or CLI flags itself.
|
|
100
|
+
It is static evidence, not the Codex sandbox. Confirm the active permission profile
|
|
101
|
+
in the client. The official OpenAI documentation distinguishes the sandbox boundary
|
|
102
|
+
from approval handling. See the [configuration reference](https://developers.openai.com/codex/config-reference)
|
|
103
|
+
and [configuration precedence](https://developers.openai.com/codex/config-basic).
|
|
86
104
|
|
|
87
105
|
### Permission posture drift
|
|
88
106
|
|
|
@@ -95,6 +113,13 @@ node ./bin/trustdex.mjs snapshot-codex-settings \
|
|
|
95
113
|
--pack strict \
|
|
96
114
|
--out .trustdex/codex-posture.json
|
|
97
115
|
|
|
116
|
+
node ./bin/trustdex.mjs snapshot-codex-settings-stack \
|
|
117
|
+
--system ./review/system.toml \
|
|
118
|
+
--user ./review/user.toml \
|
|
119
|
+
--project ./review/project.toml \
|
|
120
|
+
--pack strict \
|
|
121
|
+
--out .trustdex/codex-stack-posture.json
|
|
122
|
+
|
|
98
123
|
node ./bin/trustdex.mjs diff-permissions \
|
|
99
124
|
.trustdex/approved-codex-posture.json \
|
|
100
125
|
.trustdex/current-codex-posture.json \
|
|
@@ -108,14 +133,16 @@ counts and documented enums, not the config path, writable-root paths, custom pr
|
|
|
108
133
|
values, or unrelated settings. Its digest detects accidental or unreconciled edits,
|
|
109
134
|
but anyone can recompute an unsigned digest; it is not authentication or a replacement
|
|
110
135
|
for the Codex runtime sandbox.
|
|
136
|
+
Merged-source snapshots use schema v2. A source-scope count change is unclassified
|
|
137
|
+
and therefore returns `NEEDS_REVIEW`, even when the final structural settings match.
|
|
111
138
|
|
|
112
139
|
### Skills and plugins
|
|
113
140
|
|
|
114
141
|
Agent skills and plugin manifests can be inspected the same way:
|
|
115
142
|
|
|
116
143
|
```bash
|
|
117
|
-
npx trustdex@0.
|
|
118
|
-
npx trustdex@0.
|
|
144
|
+
npx trustdex@0.8.0 inspect-skill ./path/to/SKILL.md --pack strict
|
|
145
|
+
npx trustdex@0.8.0 inspect-plugin ./path/to/plugin.json --pack strict
|
|
119
146
|
```
|
|
120
147
|
|
|
121
148
|
These report observable signals such as piped shell installers, references to sensitive paths, network URLs, and wildcard tool scopes. They do not prove a skill or plugin is safe.
|