trustdex 0.6.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.
Files changed (34) hide show
  1. package/README.ko.md +74 -6
  2. package/README.md +79 -7
  3. package/bin/trustdex.mjs +152 -9
  4. package/docs/ARCHITECTURE.ko.md +4 -2
  5. package/docs/ARCHITECTURE.md +9 -4
  6. package/docs/CLAUDE.ko.md +48 -2
  7. package/docs/CLAUDE.md +56 -5
  8. package/docs/CODEX.ko.md +53 -5
  9. package/docs/CODEX.md +63 -11
  10. package/docs/DEFENSIVE_USE_CASE.ko.md +2 -2
  11. package/docs/DEFENSIVE_USE_CASE.md +5 -3
  12. package/docs/EVALUATION.ko.md +29 -1
  13. package/docs/EVALUATION.md +28 -1
  14. package/docs/ROADMAP.ko.md +12 -4
  15. package/docs/ROADMAP.md +12 -4
  16. package/docs/SECURITY_RESEARCH.ko.md +2 -0
  17. package/docs/SECURITY_RESEARCH.md +2 -0
  18. package/docs/THREAT_MODEL.ko.md +5 -1
  19. package/docs/THREAT_MODEL.md +5 -1
  20. package/examples/adversarial/permissions/README.ko.md +15 -0
  21. package/examples/adversarial/permissions/README.md +15 -0
  22. package/examples/adversarial/permissions/claude-expanded.settings.json +30 -0
  23. package/examples/adversarial/permissions/claude-restrictive.settings.json +16 -0
  24. package/examples/adversarial/permissions/codex-expanded.toml +13 -0
  25. package/examples/adversarial/permissions/codex-restrictive.toml +13 -0
  26. package/examples/adversarial/permissions/expected.json +18 -0
  27. package/package.json +4 -3
  28. package/schemas/permission-posture-diff-v1.schema.json +78 -0
  29. package/schemas/permission-posture-diff-v2.schema.json +37 -0
  30. package/schemas/permission-posture-v1.schema.json +162 -0
  31. package/schemas/permission-posture-v2.schema.json +117 -0
  32. package/src/claude-settings.mjs +81 -0
  33. package/src/codex-settings.mjs +81 -3
  34. package/src/posture.mjs +601 -0
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.6.0` in place of `node ./bin/trustdex.mjs` in the examples
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,13 +129,64 @@ 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
- This command inspects one file at a time. Claude Code merges settings across scopes
133
- and command-line flags can add session permissions, so the result is not the effective
134
- runtime policy. Confirm loaded sources and permissions in Claude Code and use OS-level
135
- sandboxing for enforcement. Official references: [settings files and precedence](https://code.claude.com/docs/en/settings),
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
 
157
+ ### Permission posture drift
158
+
159
+ Create a baseline after review and compare a later settings state:
160
+
161
+ ```bash
162
+ node ./bin/trustdex.mjs snapshot-claude-settings \
163
+ ./.claude/settings.json \
164
+ --pack strict \
165
+ --out .trustdex/claude-posture.json
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
+
174
+ node ./bin/trustdex.mjs diff-permissions \
175
+ .trustdex/approved-claude-posture.json \
176
+ .trustdex/current-claude-posture.json
177
+ ```
178
+
179
+ New automatic tool categories, added rules or directories, relaxed protective
180
+ switches, a riskier default mode, new risk signals, or changed policy semantics return
181
+ `NEEDS_REVIEW` and exit `1`. Restriction-only changes return `RESTRICTED` and exit `0`.
182
+ The snapshot excludes source paths and every permission, hook, directory, domain,
183
+ credential-helper, plugin, and environment value. Because it intentionally does not
184
+ fingerprint redacted rule contents, a same-count change inside one capability category
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.
189
+
139
190
  ## Signed review and drift
140
191
 
141
192
  Keep the Claude adapter throughout a review workflow; generic MCP commands do not
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.6.0 inspect-codex ~/.codex/config.toml --pack strict
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.6.0 inspect-codex ~/.codex/config.toml --pack strict
25
25
  ### 2. 게이트된 사본 작성
26
26
 
27
27
  ```bash
28
- npx trustdex@0.6.0 gate-codex ~/.codex/config.toml \
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,15 +70,63 @@ node ./bin/trustdex.mjs inspect-codex-settings \
70
70
 
71
71
  보안 관련 값의 타입이나 열거 값이 지원되지 않으면 안전하게 실패합니다. 공식 설정 레퍼런스가 함께 사용하지 말라고 명시하므로 `default_permissions`와 기존 샌드박스 설정을 같이 사용해도 실패합니다. 쓰기 가능 루트 경로와 관련 없는 설정의 값은 보관·출력·지문화하지 않습니다.
72
72
 
73
- 이 첫 번째 어댑터는 한 번에 파일 하나를 검사하며 사용자, 프로젝트, 프로필, 관리형, 시스템 또는 명령줄 설정을 하나의 실제 정책으로 병합하지 않습니다. 이는 정적 증거이며 Codex 샌드박스 자체가 아닙니다. 클라이언트에서 활성 권한 프로필을 확인하세요. 공식 OpenAI 문서는 샌드박스 경계와 승인 처리를 구분하며 `workspace-write`와 `on-request` 조합을 더 낮은 위험의 로컬 자동화 구성으로 안내합니다. [설정 레퍼런스](https://developers.openai.com/codex/config-reference)와 [샌드박스 가이드](https://developers.openai.com/codex/sandboxing)를 참고하세요.
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)를 참고하세요.
88
+
89
+ ### 권한 상태 드리프트
90
+
91
+ 검토한 구조적 기준 상태를 생성해 커밋한 뒤 CI에서 현재 스냅샷을 만들고
92
+ 비교하세요.
93
+
94
+ ```bash
95
+ node ./bin/trustdex.mjs snapshot-codex-settings \
96
+ ~/.codex/config.toml \
97
+ --pack strict \
98
+ --out .trustdex/codex-posture.json
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
+
107
+ node ./bin/trustdex.mjs diff-permissions \
108
+ .trustdex/approved-codex-posture.json \
109
+ .trustdex/current-codex-posture.json \
110
+ --json
111
+ ```
112
+
113
+ 네트워크 활성화, 더 넓은 쓰기 범위, 더 약한 샌드박스나 승인 상태, 실시간 검색,
114
+ 서브에이전트 활성화, 새 위험 신호 및 정책 의미 변경은 검토를 요구하고 종료 코드
115
+ `1`을 반환합니다. 제한적으로만 변한 경우 종료 코드 `0`을 반환합니다. 스냅샷은
116
+ 구조적 개수와 문서화된 열거 값만 저장하며 설정 파일 경로, 쓰기 가능 루트 경로,
117
+ 사용자 정의 프로필 값 또는 관련 없는 설정은 저장하지 않습니다. 다이제스트는
118
+ 우발적이거나 조정되지 않은 편집을 감지하지만 누구나 서명되지 않은 다이제스트를
119
+ 다시 계산할 수 있습니다. 인증이 아니며 Codex 런타임 샌드박스를 대체하지 않습니다.
120
+ 병합 소스 스냅샷은 스키마 v2를 사용합니다. 최종 구조 설정이 같더라도 소스 범위 개수가
121
+ 바뀌면 분류되지 않은 변경으로 처리되어 `NEEDS_REVIEW`를 반환합니다.
74
122
 
75
123
  ### 스킬 및 플러그인
76
124
 
77
125
  에이전트 스킬과 플러그인 매니페스트도 같은 방법으로 검사할 수 있습니다.
78
126
 
79
127
  ```bash
80
- npx trustdex@0.6.0 inspect-skill ./path/to/SKILL.md --pack strict
81
- npx trustdex@0.6.0 inspect-plugin ./path/to/plugin.json --pack strict
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
82
130
  ```
83
131
 
84
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.6.0 inspect-codex ~/.codex/config.toml --pack strict
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.6.0 gate-codex ~/.codex/config.toml \
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,21 +76,73 @@ 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
- This first adapter inspects one file at a time; it does not merge user, project,
80
- profile, managed, system, or command-line configuration into an effective policy.
81
- It is static evidence, not the Codex sandbox itself. Confirm the active permission
82
- profile in the client. The official OpenAI documentation distinguishes the sandbox
83
- boundary from approval handling and documents `workspace-write` plus `on-request`
84
- as the lower-risk local automation combination. See the [configuration reference](https://developers.openai.com/codex/config-reference)
85
- and [sandbox guide](https://developers.openai.com/codex/sandboxing).
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).
104
+
105
+ ### Permission posture drift
106
+
107
+ Create and commit a reviewed structural baseline, then generate a current snapshot in
108
+ CI and compare them:
109
+
110
+ ```bash
111
+ node ./bin/trustdex.mjs snapshot-codex-settings \
112
+ ~/.codex/config.toml \
113
+ --pack strict \
114
+ --out .trustdex/codex-posture.json
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
+
123
+ node ./bin/trustdex.mjs diff-permissions \
124
+ .trustdex/approved-codex-posture.json \
125
+ .trustdex/current-codex-posture.json \
126
+ --json
127
+ ```
128
+
129
+ Network enablement, broader writable scope, a weaker sandbox or approval posture,
130
+ live search, subagent enablement, new risk signals, and policy-semantic changes require
131
+ review and exit `1`. Restriction-only changes exit `0`. The snapshot stores structural
132
+ counts and documented enums, not the config path, writable-root paths, custom profile
133
+ values, or unrelated settings. Its digest detects accidental or unreconciled edits,
134
+ but anyone can recompute an unsigned digest; it is not authentication or a replacement
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.
86
138
 
87
139
  ### Skills and plugins
88
140
 
89
141
  Agent skills and plugin manifests can be inspected the same way:
90
142
 
91
143
  ```bash
92
- npx trustdex@0.6.0 inspect-skill ./path/to/SKILL.md --pack strict
93
- npx trustdex@0.6.0 inspect-plugin ./path/to/plugin.json --pack strict
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
94
146
  ```
95
147
 
96
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.
@@ -54,9 +54,9 @@ ALLOW 결과는 여전히 관찰된 증거에 대한 정책 결과일 뿐입니
54
54
 
55
55
  `inspect-claude-settings`는 문서화된 `permissions` 객체를 검사하고 셸, 파일 시스템, 네트워크, MCP 및 서브에이전트 기능의 자동 승인을 보고합니다. 또한 훅, 자격 증명 도우미, 환경 설정, 샌드박스 설정 및 플러그인 로딩의 존재를 값은 보관하지 않은 채 드러냅니다.
56
56
 
57
- 이는 정적 증거이지 런타임 강제 적용이 아닙니다. 모든 Claude 설정 범위를 병합하거나, 명령줄 플래그를 검사하거나, 관리형 설정이 세션에 실제 적용되었음을 증명하거나, Claude Code 샌드박싱을 대체하지 않습니다. 운영자는 실제 런타임 설정을 별도로 확인해야 합니다.
57
+ `inspect-claude-settings-stack`은 명시적으로 전달된 사용자, 프로젝트, 로컬, 세션 및 관리형 소스에 문서화된 우선순위를 적용합니다. 이는 정적 증거이지 런타임 강제 적용이 아닙니다. 소스를 자동으로 찾거나 관리형 설정이 세션에 실제 적용되었음을 증명하지 않으며 Claude Code 샌드박싱을 대체하지 않습니다. 운영자는 실제 런타임 설정을 별도로 확인해야 합니다.
58
58
 
59
- `inspect-codex-settings`는 Codex 승인 정책, 검토자 선택, 샌드박스 종류, 네트워크 접근, 추가 쓰기 가능 루트 개수, 웹 검색 모드 및 명시적인 서브에이전트 활성화를 평가합니다. 완전히 파싱하지 않는 사용자 정의 권한, 앱 및 플러그인 표면은 값은 보관하지 않고 보고합니다. 마찬가지로 모든 Codex 설정 계층을 병합하거나 활성 Codex 샌드박스를 대체하지 않습니다.
59
+ `inspect-codex-settings`는 Codex 승인 정책, 검토자 선택, 샌드박스 종류, 네트워크 접근, 추가 쓰기 가능 루트 개수, 웹 검색 모드 및 명시적인 서브에이전트 활성화를 평가합니다. 완전히 파싱하지 않는 사용자 정의 권한, 앱 및 플러그인 표면은 값은 보관하지 않고 보고합니다. `inspect-codex-settings-stack`은 전달된 파일에 시스템부터 CLI까지의 문서화된 우선순위와 순서가 있는 프로젝트 계층을 적용합니다. 활성 계층을 자동으로 찾거나 요구사항을 강제하거나 활성 Codex 샌드박스를 대체하지 않습니다.
60
60
 
61
61
  ## CVP 신청 경계
62
62
 
@@ -54,13 +54,15 @@ An ALLOW result is still only a policy result over observed evidence. TrustDex i
54
54
 
55
55
  `inspect-claude-settings` examines the documented `permissions` object and reports automatic approval of shell, filesystem, network, MCP, and subagent capabilities. It also surfaces the presence of hooks, credential helpers, environment settings, sandbox configuration, and plugin loading without retaining their values.
56
56
 
57
- This is static evidence, not runtime enforcement. It does not merge every Claude settings scope, inspect command-line flags, prove that managed settings reached a session, or replace Claude Code sandboxing. The operator must confirm the effective runtime configuration separately.
57
+ `inspect-claude-settings-stack` applies documented precedence to explicitly supplied user, project, local, session, and managed sources. This is static evidence, not runtime enforcement. It does not discover sources or prove that managed settings reached a session, and it does not replace Claude Code sandboxing. The operator must confirm the effective runtime configuration separately.
58
58
 
59
59
  `inspect-codex-settings` evaluates Codex approval policy, reviewer choice, sandbox
60
60
  class, network access, additional writable-root count, web-search mode, and explicit
61
61
  subagent enablement. It reports custom permission, app, and plugin surfaces that it
62
- does not fully parse without retaining their values. It likewise does not merge every
63
- Codex configuration layer or replace the active Codex sandbox.
62
+ does not fully parse without retaining their values. `inspect-codex-settings-stack`
63
+ applies documented system-through-CLI precedence to supplied files, including ordered
64
+ project layers. It does not discover the active layers, enforce requirements, or replace
65
+ the active Codex sandbox.
64
66
 
65
67
  ## CVP application boundary
66
68
 
@@ -60,8 +60,36 @@
60
60
 
61
61
  쓰기 가능 루트 경로와 관련 없는 설정 값은 결과에 나타나면 안 됩니다. Codex 설정 지문은 생성하지 않습니다.
62
62
 
63
+ ## 권한 상태 드리프트 사례
64
+
65
+ `examples/adversarial/permissions/`에는 두 런타임의 제한적 설정과 확대된 설정이
66
+ 쌍으로 포함됩니다. `test/posture.test.mjs`는 다음을 요구합니다.
67
+
68
+ - 제한적인 기준 상태는 안전 인증을 의미하지 않는 `ASK`로 유지
69
+ - 자동 셸/네트워크/서브에이전트 권한 및 더 넓은 파일 시스템 범위가 위험을 높임
70
+ - 자율성 확대와 정책 변경에 대해 `diff-permissions`가 `needs-review`를 반환
71
+ - 제한적으로만 변한 경우 실패 종료 코드 없이 `restricted`를 반환
72
+ - 구조적 다이제스트를 계산한 스냅샷이 소스 경로, 규칙 값, 쓰기 가능 경로,
73
+ 도메인, 명령, 환경 변수 이름과 값 및 인접 설정 값을 제외
74
+ - 내용이 다이제스트와 더 이상 일치하지 않는 스냅샷은 안전하게 실패
75
+
76
+ 다이제스트는 내부 일관성을 확인할 뿐 서명자 신원을 인증하지 않습니다. 값이
77
+ 제거된 권한 규칙 안에서 개수는 같고 내용만 바뀌는 경우는 이 구조적 비교의
78
+ 범위 밖입니다.
79
+
80
+ ## 병합 설정 스택 사례
81
+
82
+ `test/settings-stack.test.mjs`는 두 런타임의 명시적 소스 스택을 검사합니다. 다음을 요구합니다.
83
+
84
+ - Claude 권한 목록을 결합하면서 관리형/세션/로컬/프로젝트/사용자 스칼라 우선순위를 유지
85
+ - 프로젝트 또는 로컬 Claude 소스가 `auto`나 `bypassPermissions` 기본 모드를 활성화하지 않음
86
+ - Codex 시스템/관리형/사용자/프로필/프로젝트/CLI 우선순위와 가장 가까운 프로젝트 순서 적용
87
+ - 높은 소스가 설정을 대체하더라도 잘못된 낮은 우선순위 입력은 실패
88
+ - 스키마 v2 스냅샷은 고정된 범위 개수만 보관하고 소스 구성 변경에 재검토 요구
89
+ - 소스 경로, 규칙, 도메인, 명령, 쓰기 가능 경로, 환경 변수 이름과 값을 계속 제외
90
+
63
91
  ## 이 평가가 측정하지 않는 것
64
92
 
65
- 이 벤치마크는 의도적으로 범위가 좁습니다. 런타임 동작, 샌드박스 탈출, 임의의 악성 코드, 모든 형태의 프롬프트 인젝션, 게시자 신원 소유권 또는 전이 의존성의 취약점을 측정하지 않습니다. 모든 Claude 또는 Codex 설정 범위를 병합하거나 세션 명령줄 재정의를 검사하거나 보고된 샌드박스가 실제로 활성화되었음을 증명하지 않습니다. 특히 이미 실행 중인 MCP 서버가 동적으로 반환하는 도구 설명은 현재 정적 설정 경계 밖에 있습니다.
93
+ 이 벤치마크는 의도적으로 범위가 좁습니다. 런타임 동작, 샌드박스 탈출, 임의의 악성 코드, 모든 형태의 프롬프트 인젝션, 게시자 신원 소유권 또는 전이 의존성의 취약점을 측정하지 않습니다. 스택 사례는 테스트에 명시적으로 전달된 소스만 병합하며 활성 설정, 요구사항, 환경 변수 재정의 또는 서버 관리 정책을 자동으로 찾지 않고 보고된 샌드박스가 실제로 활성화되었음도 증명하지 않습니다. 특히 이미 실행 중인 MCP 서버가 동적으로 반환하는 도구 설명은 현재 정적 설정 경계 밖에 있습니다.
66
94
 
67
95
  이 작은 픽스처 집합은 회귀 기준선이지 탐지 정확도에 대한 통계적 주장이 아닙니다. 거짓 양성과 거짓 음성 비율을 측정하려면 민감 정보를 제거한 실제 설정으로 구성되고 독립적으로 검토된 더 큰 코퍼스가 필요합니다.
@@ -63,8 +63,35 @@ inspection result. No permission-settings fingerprint is created.
63
63
  Writable-root paths and unrelated setting values must not appear in results. No
64
64
  Codex-settings fingerprint is created.
65
65
 
66
+ ## Permission posture drift cases
67
+
68
+ `examples/adversarial/permissions/` contains paired restrictive and expanded settings
69
+ for both runtimes. `test/posture.test.mjs` requires:
70
+
71
+ - the restrictive baseline to remain `ASK`, without implying certification
72
+ - automatic shell/network/subagent grants and broader filesystem scope to raise risk
73
+ - `diff-permissions` to return `needs-review` for autonomy expansion and policy changes
74
+ - restriction-only changes to return `restricted` without a failure exit code
75
+ - snapshots with recomputed structural digests to omit source paths, rule values,
76
+ writable paths, domains, commands, environment names and values, and adjacent-setting values
77
+ - a snapshot whose contents no longer match its digest to fail closed
78
+
79
+ The digest checks internal consistency, not signer identity. Same-count changes inside
80
+ redacted permission rules remain outside this structural comparison.
81
+
82
+ ## Merged settings stack cases
83
+
84
+ `test/settings-stack.test.mjs` exercises explicit source stacks for both runtimes. It requires:
85
+
86
+ - Claude permission lists to combine while managed/session/local/project/user scalar precedence is preserved
87
+ - project or local Claude sources not to activate `auto` or `bypassPermissions` default modes
88
+ - Codex system/managed/user/profile/project/CLI precedence and closest-project ordering
89
+ - invalid lower-precedence input to fail even when a higher source would replace the setting
90
+ - schema-v2 snapshots to retain only fixed scope counts and to require review when source topology changes
91
+ - source paths, rules, domains, commands, writable paths, environment names, and values to remain absent
92
+
66
93
  ## What this does not measure
67
94
 
68
- This benchmark is intentionally narrow. It does not measure runtime behavior, sandbox escape, arbitrary malware, every form of prompt injection, publisher identity ownership, or vulnerabilities in transitive dependencies. It does not merge every Claude or Codex settings scope, inspect session command-line overrides, or prove that the reported sandbox is active. In particular, tool descriptions returned dynamically by an already-running MCP server are outside the current static configuration boundary.
95
+ This benchmark is intentionally narrow. It does not measure runtime behavior, sandbox escape, arbitrary malware, every form of prompt injection, publisher identity ownership, or vulnerabilities in transitive dependencies. The stack cases merge only sources explicitly supplied to the test; they do not discover active settings, requirements, environment overrides, or server-managed policy, and they do not prove that the reported sandbox is active. In particular, tool descriptions returned dynamically by an already-running MCP server are outside the current static configuration boundary.
69
96
 
70
97
  The small fixture set is a regression baseline, not a statistical claim about detection accuracy. False-positive and false-negative rates require a larger, independently reviewed corpus of redacted real-world configurations.
@@ -6,10 +6,19 @@
6
6
 
7
7
  TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴리스를 약속하지 않습니다.
8
8
 
9
+ ## 진행 상황
10
+
11
+ - TrustDex 0.6.0은 Claude Code와 Codex 권한의 안전한 실패 검사를 추가했습니다.
12
+ - TrustDex 0.7.0은 값이 제거되고 자체 일관성을 검증하는 권한 상태 스냅샷,
13
+ 자율성 확대 검토 게이트, 버전 지정 JSON 스키마 및 공개 적대적 권한 픽스처를
14
+ 추가합니다.
15
+ - TrustDex 0.8.0은 문서화된 Claude Code 및 Codex 우선순위를 위한 명시적 병합 소스
16
+ 검사, 스키마 v2 소스 구성 증거 및 안전하게 실패하는 스택 테스트를 추가합니다.
17
+
9
18
  ## 현재: 경계 강화
10
19
 
11
20
  - MCP JSON, Codex TOML, 스킬 및 플러그인 매니페스트의 적대적 픽스처 확장
12
- - Claude Code와 Codex 모두의 적대적 권한 픽스처 확장
21
+ - Claude Code와 Codex 모두의 적대적 권한 픽스처를 계속 확장
13
22
  - 사람이 읽을 수 있는 모든 출력에 비밀 값이 계속 포함되지 않는지 검증
14
23
  - 크로스 플랫폼 소스 및 경로 정규화 개선
15
24
  - 안정적인 정책 및 스냅샷 스키마 규칙 문서화
@@ -17,11 +26,10 @@ TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴
17
26
 
18
27
  ## 다음: 에이전트 행동 경계를 검토 가능하게 만들기
19
28
 
20
- - 명령, 경로, 도메인 또는 자격 증명 값을 보관하지 않고 병합된 설정 소스 검사
21
- - 시간에 따른 권한 상태를 비교하고 에이전트 자율성이 넓어지면 재검토 요구
22
29
  - 승인된 도구 출처와 해당 도구에 부여된 행동 권한 연결
23
- - 오케스트레이터와 CI용 기계 판독 가능 결정 출력 정의
30
+ - 버전이 지정된 권한 상태 JSON 스키마를 추가 결정 및 런타임으로 확장
24
31
  - 권고형 설정 검사가 런타임 및 운영체제 샌드박스와 결합되는 방식 문서화
32
+ - 비공개 파일을 조용히 찾지 않으면서 런타임이 생성한 실제 설정 증거 추가
25
33
 
26
34
  ## 그다음: 무결성 증명
27
35
 
package/docs/ROADMAP.md CHANGED
@@ -6,10 +6,19 @@
6
6
 
7
7
  TrustDex is early-stage. This roadmap communicates direction and is not a release commitment.
8
8
 
9
+ ## Progress
10
+
11
+ - TrustDex 0.6.0 added fail-closed Claude Code and Codex permission inspection.
12
+ - TrustDex 0.7.0 adds value-free, self-validating permission posture snapshots,
13
+ autonomy-expansion review gates, versioned JSON schemas, and public adversarial
14
+ permission fixtures.
15
+ - TrustDex 0.8.0 adds explicit merged-source inspection for documented Claude Code
16
+ and Codex precedence, schema-v2 source topology evidence, and fail-closed stack tests.
17
+
9
18
  ## Now: harden the boundary
10
19
 
11
20
  - expand adversarial fixtures for MCP JSON, Codex TOML, skills, and plugin manifests
12
- - expand adversarial permission fixtures for both Claude Code and Codex
21
+ - keep expanding adversarial permission fixtures for both Claude Code and Codex
13
22
  - verify that all human-readable output remains free of secret values
14
23
  - improve cross-platform source and path normalization
15
24
  - document stable policy and snapshot schema rules
@@ -17,11 +26,10 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
17
26
 
18
27
  ## Next: make agent action boundaries reviewable
19
28
 
20
- - inspect merged settings sources without retaining commands, paths, domains, or credential values
21
- - compare permission posture over time and require review when agent autonomy expands
22
29
  - connect approved tool provenance to the action permissions granted to that tool
23
- - define machine-readable decision output for orchestrators and CI
30
+ - extend the versioned permission-posture JSON schemas to additional decisions and runtimes
24
31
  - document how advisory settings checks compose with runtime and operating-system sandboxes
32
+ - add runtime-produced effective-setting evidence without silently discovering private files
25
33
 
26
34
  ## Then: prove integrity
27
35
 
@@ -19,6 +19,7 @@ TrustDex는 AI 에이전트가 서드파티 도구에 접근하기 전에 내리
19
19
  - 지원하지 않는 구문에서 안전하게 실패해야 하는 파서 동작
20
20
  - Claude Code 권한 설정의 자동 행동 권한
21
21
  - Codex 샌드박스, 승인, 네트워크, 쓰기 가능 루트, 웹 검색 및 서브에이전트 설정
22
+ - 구조적 권한 상태 드리프트 및 에이전트 자율성 확대 시 재검토
22
23
 
23
24
  의도한 결과물은 재현 가능한 픽스처, 회귀 테스트, 문서화된 제한 사항 및 에이전트 개발자와 운영자를 위한 실용적인 완화책입니다.
24
25
 
@@ -61,6 +62,7 @@ TrustDex 연구는 관련 없는 공개 시스템을 테스트할 권한을 부
61
62
  - [적대적 MCP 픽스처](../examples/adversarial/README.ko.md)
62
63
  - [Claude Code 권한 픽스처](../examples/claude.settings.json)
63
64
  - [Codex 권한 픽스처](../examples/codex.permissions.toml)
65
+ - [적대적 Claude 및 Codex 권한 상태 픽스처](../examples/adversarial/permissions/README.ko.md)
64
66
  - [평가 기록](EVALUATION.ko.md)
65
67
  - [방어적 AI 에이전트 보안 사용 사례](DEFENSIVE_USE_CASE.ko.md)
66
68
  - [위협 모델](THREAT_MODEL.ko.md)
@@ -19,6 +19,7 @@ The research asks whether observable configuration, provenance, integrity, and c
19
19
  - parser behavior that must fail closed on unsupported syntax
20
20
  - automatic action grants in Claude Code permission settings
21
21
  - Codex sandbox, approval, network, writable-root, web-search, and subagent settings
22
+ - structural permission posture drift and review when agent autonomy expands
22
23
 
23
24
  The intended outputs are reproducible fixtures, regression tests, documented limitations, and practical mitigations for agent developers and operators.
24
25
 
@@ -61,6 +62,7 @@ Public reports must remove credentials, private endpoints, proprietary prompts,
61
62
  - [Adversarial MCP fixtures](../examples/adversarial/README.md)
62
63
  - [Claude Code permission fixture](../examples/claude.settings.json)
63
64
  - [Codex permission fixture](../examples/codex.permissions.toml)
65
+ - [Adversarial Claude and Codex permission posture fixtures](../examples/adversarial/permissions/README.md)
64
66
  - [Evaluation record](EVALUATION.md)
65
67
  - [Defensive AI-agent security use case](DEFENSIVE_USE_CASE.md)
66
68
  - [Threat model](THREAT_MODEL.md)
@@ -22,6 +22,8 @@ TrustDex는 하나의 좁은 질문을 다룹니다.
22
22
  - 광범위한 셸, 파일 시스템, 네트워크, MCP 또는 서브에이전트 작업을 조용히 자동 승인하는 Claude Code 권한 규칙
23
23
  - 샌드박스를 제거하거나 승인을 생략하거나 네트워크 접근 또는 쓰기 가능 루트를 추가하는 Codex 설정
24
24
  - 명시적인 검토 없이 변경되는 행동 권한 설정
25
+ - 값이 제거된 구조적 기준 상태보다 확대되는 Claude 또는 Codex 권한 상태
26
+ - 명시적으로 전달된 Claude 또는 Codex 설정 소스 사이의 우선순위 변경
25
27
 
26
28
  ## 신뢰 경계
27
29
 
@@ -44,8 +46,10 @@ TrustDex는 익숙한 프로젝트 이름, 스타 수, 패키지 이름 또는
44
46
  - 로컬 신뢰 저장소 주장만으로 게시자 소유권을 독립적으로 증명
45
47
  - 완전히 침해된 호스트 보호
46
48
  - 도난당한 서명 비공개 키로부터 보호
47
- - 모든 사용자, 프로젝트, 프로필, 관리형, 시스템, 환경 및 명령줄 소스를 병합한 실제 설정 계산
49
+ - 모든 활성 설정 소스, 프로필, 환경 변수 재정의, 요구사항 또는 서버 전달 정책의 자동 탐색
50
+ - 명시적으로 병합한 설정 투영이 런타임에서 활성화된 정책임을 증명하는 것
48
51
  - Claude Code 또는 Codex 행동 권한의 런타임 강제 적용
52
+ - 서명되지 않은 권한 상태 스냅샷 작성자의 인증
49
53
 
50
54
  ## 중요한 실패 모드
51
55
 
@@ -22,6 +22,8 @@ TrustDex addresses one narrow question:
22
22
  - Claude Code permission rules that silently auto-approve broad shell, filesystem, network, MCP, or subagent actions
23
23
  - Codex configurations that remove the sandbox, suppress approvals, enable network access, or add writable roots
24
24
  - action-permission settings changing without an explicit review
25
+ - Claude or Codex permission posture expanding relative to a value-free structural baseline
26
+ - precedence changes across explicitly supplied Claude or Codex settings sources
25
27
 
26
28
  ## Trust boundaries
27
29
 
@@ -44,8 +46,10 @@ TrustDex does **not** treat a familiar project name, star count, package name, o
44
46
  - independently proving publisher ownership from a local trust-store claim
45
47
  - protecting a fully compromised host
46
48
  - protecting a stolen signing private key
47
- - calculating the effective configuration after every user, project, profile, managed, system, environment, and command-line source is merged
49
+ - automatically discovering every active settings source, profile, environment override, requirement, or server-delivered policy
50
+ - proving that the explicitly merged settings projection is the policy active at runtime
48
51
  - enforcing Claude Code or Codex action permissions at runtime
52
+ - authenticating the author of an unsigned permission posture snapshot
49
53
 
50
54
  ## Important failure mode
51
55
 
@@ -0,0 +1,15 @@
1
+ # 적대적 권한 상태 픽스처
2
+
3
+ 이 픽스처는 Claude Code와 Codex의 제한적인 기준 상태와 이후의 자율성 확대를
4
+ 모델링합니다. 모든 자격 증명, 명령 인수, 경로 및 호스트명은 비활성 테스트
5
+ 데이터입니다. `.invalid` 호스트명은 공개 인터넷에서 해석될 수 없습니다.
6
+
7
+ 평가는 다음을 검증합니다.
8
+
9
+ - 제한적 설정도 안전 인증으로 표현하지 않고 검토 가능한 상태로 유지
10
+ - 자동 셸, 네트워크, 파일 시스템 및 서브에이전트 권한 확대 감지
11
+ - 권한 상태 비교가 `needs-review`를 반환
12
+ - 검사, 스냅샷 또는 차이 출력에 설정 값과 경로 값이 나타나지 않음
13
+
14
+ 이 픽스처는 외부 시스템에 대한 보안 테스트를 허가하지 않으며 실제 사용자
15
+ 설정을 재현하지 않습니다.
@@ -0,0 +1,15 @@
1
+ # Adversarial permission posture fixtures
2
+
3
+ These fixtures model a restrictive baseline and a later autonomy expansion for
4
+ Claude Code and Codex. Every credential, command argument, path, and hostname is
5
+ inert test data. The `.invalid` hostname cannot resolve on the public Internet.
6
+
7
+ The evaluation asserts that:
8
+
9
+ - restrictive settings remain reviewable without being described as certified safe
10
+ - automatic shell, network, filesystem, and subagent expansion is detected
11
+ - permission posture comparison returns `needs-review`
12
+ - settings values and path values never appear in inspection, snapshot, or diff output
13
+
14
+ The fixtures do not authorize security testing against any external system and do
15
+ not reproduce a real user configuration.
@@ -0,0 +1,30 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(reviewer --token INERT_CLAUDE_PERMISSION_SECRET)",
5
+ "WebFetch(domain:research.invalid)",
6
+ "Agent(Explore)",
7
+ "mcp__reviewed__*"
8
+ ],
9
+ "defaultMode": "auto",
10
+ "additionalDirectories": [
11
+ "../INERT_CLAUDE_PERMISSION_PATH"
12
+ ],
13
+ "blockReadsOutsideWorkingDirectories": false
14
+ },
15
+ "env": {
16
+ "API_TOKEN": "INERT_CLAUDE_PERMISSION_SECRET"
17
+ },
18
+ "hooks": {
19
+ "PreToolUse": [
20
+ {
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "printf INERT_CLAUDE_HOOK_SECRET"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "permissions": {
3
+ "ask": [
4
+ "Bash(git status)",
5
+ "Agent(Explore)"
6
+ ],
7
+ "deny": [
8
+ "WebFetch",
9
+ "mcp__unreviewed__*"
10
+ ],
11
+ "defaultMode": "plan",
12
+ "disableBypassPermissionsMode": "disable",
13
+ "disableAutoMode": "disable",
14
+ "blockReadsOutsideWorkingDirectories": true
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ approval_policy = "never"
2
+ approvals_reviewer = "auto_review"
3
+ sandbox_mode = "danger-full-access"
4
+ web_search = "live"
5
+
6
+ [sandbox_workspace_write]
7
+ network_access = true
8
+ writable_roots = ["../INERT_CODEX_PERMISSION_PATH"]
9
+ exclude_slash_tmp = false
10
+ exclude_tmpdir_env_var = false
11
+
12
+ [agents]
13
+ enabled = true