trustdex 0.7.0 → 0.9.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 +71 -8
- package/README.md +75 -8
- package/bin/trustdex.mjs +204 -11
- package/docs/ARCHITECTURE.ko.md +10 -2
- package/docs/ARCHITECTURE.md +15 -4
- package/docs/CLAUDE.ko.md +47 -2
- package/docs/CLAUDE.md +54 -5
- package/docs/CODEX.ko.md +49 -5
- package/docs/CODEX.md +59 -11
- package/docs/DEFENSIVE_USE_CASE.ko.md +8 -2
- package/docs/DEFENSIVE_USE_CASE.md +11 -3
- package/docs/EVALUATION.ko.md +29 -1
- package/docs/EVALUATION.md +29 -1
- package/docs/ROADMAP.ko.md +7 -4
- package/docs/ROADMAP.md +7 -4
- package/docs/THREAT_MODEL.ko.md +7 -1
- package/docs/THREAT_MODEL.md +7 -1
- package/examples/adversarial/README.ko.md +2 -0
- package/examples/adversarial/README.md +2 -0
- package/examples/adversarial/bindings/README.ko.md +24 -0
- package/examples/adversarial/bindings/README.md +25 -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 +15 -0
- package/examples/adversarial/bindings/trust-store.json +15 -0
- package/package.json +3 -3
- package/schemas/permission-posture-diff-v2.schema.json +37 -0
- package/schemas/permission-posture-v2.schema.json +117 -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 +354 -0
- package/src/claude-settings.mjs +130 -0
- package/src/codex-settings.mjs +81 -3
- package/src/posture.mjs +69 -8
package/docs/THREAT_MODEL.ko.md
CHANGED
|
@@ -23,6 +23,9 @@ TrustDex는 하나의 좁은 질문을 다룹니다.
|
|
|
23
23
|
- 샌드박스를 제거하거나 승인을 생략하거나 네트워크 접근 또는 쓰기 가능 루트를 추가하는 Codex 설정
|
|
24
24
|
- 명시적인 검토 없이 변경되는 행동 권한 설정
|
|
25
25
|
- 값이 제거된 구조적 기준 상태보다 확대되는 Claude 또는 Codex 권한 상태
|
|
26
|
+
- 명시적으로 전달된 Claude 또는 Codex 설정 소스 사이의 우선순위 변경
|
|
27
|
+
- 서버의 정책/출처 결과와 더 이상 일치하지 않는 자동 MCP 도구 권한
|
|
28
|
+
- 실제 도구 경계를 가리는 와일드카드, 일치하지 않거나 모호한 권한
|
|
26
29
|
|
|
27
30
|
## 신뢰 경계
|
|
28
31
|
|
|
@@ -45,9 +48,12 @@ TrustDex는 익숙한 프로젝트 이름, 스타 수, 패키지 이름 또는
|
|
|
45
48
|
- 로컬 신뢰 저장소 주장만으로 게시자 소유권을 독립적으로 증명
|
|
46
49
|
- 완전히 침해된 호스트 보호
|
|
47
50
|
- 도난당한 서명 비공개 키로부터 보호
|
|
48
|
-
- 모든
|
|
51
|
+
- 모든 활성 설정 소스, 프로필, 환경 변수 재정의, 요구사항 또는 서버 전달 정책의 자동 탐색
|
|
52
|
+
- 명시적으로 병합한 설정 투영이 런타임에서 활성화된 정책임을 증명하는 것
|
|
49
53
|
- Claude Code 또는 Codex 행동 권한의 런타임 강제 적용
|
|
50
54
|
- 서명되지 않은 권한 상태 스냅샷 작성자의 인증
|
|
55
|
+
- 결합 스냅샷이 실행 중인 에이전트가 실제로 불러온 파일을 반영함을 증명하는 것
|
|
56
|
+
- 개별 MCP 도구 호출을 런타임에서 가로채거나 강제하는 것
|
|
51
57
|
|
|
52
58
|
## 중요한 실패 모드
|
|
53
59
|
|
package/docs/THREAT_MODEL.md
CHANGED
|
@@ -23,6 +23,9 @@ TrustDex addresses one narrow question:
|
|
|
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
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
|
|
27
|
+
- automatic MCP tool grants that no longer match the server's policy/provenance result
|
|
28
|
+
- wildcard, unmatched, or ambiguous grants that hide the effective tool boundary
|
|
26
29
|
|
|
27
30
|
## Trust boundaries
|
|
28
31
|
|
|
@@ -45,9 +48,12 @@ TrustDex does **not** treat a familiar project name, star count, package name, o
|
|
|
45
48
|
- independently proving publisher ownership from a local trust-store claim
|
|
46
49
|
- protecting a fully compromised host
|
|
47
50
|
- protecting a stolen signing private key
|
|
48
|
-
-
|
|
51
|
+
- automatically discovering every active settings source, profile, environment override, requirement, or server-delivered policy
|
|
52
|
+
- proving that the explicitly merged settings projection is the policy active at runtime
|
|
49
53
|
- enforcing Claude Code or Codex action permissions at runtime
|
|
50
54
|
- authenticating the author of an unsigned permission posture snapshot
|
|
55
|
+
- proving that a binding snapshot reflects the files actually loaded by a running agent
|
|
56
|
+
- intercepting or enforcing individual MCP tool calls at runtime
|
|
51
57
|
|
|
52
58
|
## Important failure mode
|
|
53
59
|
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
- `policy.json`은 소스 허용 목록과 독립적으로 차단 신호를 테스트할 수 있도록 픽스처 패키지 1개와 픽스처 호스트 2개를 명시적으로 신뢰합니다.
|
|
11
11
|
- `expected.json`은 필수 결정과 최소 신호를 기록합니다.
|
|
12
12
|
- `drift-before.json`과 `drift-after.json`은 검토된 패키지에 비밀 정보를 포함하는 환경 키가 추가되는 상황을 모델링합니다.
|
|
13
|
+
- [`permissions/`](permissions/README.ko.md)는 값이 제거된 Claude/Codex 권한 상태 드리프트를 다룹니다.
|
|
14
|
+
- [`bindings/`](bindings/README.ko.md)는 MCP 출처와 자동 권한의 연결을 다룹니다.
|
|
13
15
|
|
|
14
16
|
모든 패키지 이름은 가상이며, 모든 원격 엔드포인트는 예약된 `.invalid` 최상위 도메인을 사용하고, 자격 증명으로 보이는 모든 값은 자리표시자입니다. 이를 실제 값으로 바꾸지 마세요. TrustDex는 이 파일을 읽지만 나열된 명령을 실행하거나 나열된 엔드포인트에 연결하지 않습니다.
|
|
15
17
|
|
|
@@ -10,6 +10,8 @@ These files provide a reproducible defensive test of TrustDex's policy boundary.
|
|
|
10
10
|
- `policy.json` explicitly trusts one fixture package and two fixture hosts so blocking signals can be tested independently of source allowlisting.
|
|
11
11
|
- `expected.json` records the required decisions and minimum signals.
|
|
12
12
|
- `drift-before.json` and `drift-after.json` model a reviewed package gaining a secret-bearing environment key.
|
|
13
|
+
- [`permissions/`](permissions/README.md) covers value-free Claude/Codex permission posture drift.
|
|
14
|
+
- [`bindings/`](bindings/README.md) covers MCP provenance-to-automatic-grant bindings.
|
|
13
15
|
|
|
14
16
|
All package names are fictional, all remote endpoints use the reserved `.invalid` top-level domain, and all apparent credentials are placeholders. Do not replace them with real values. TrustDex reads these files but never executes the listed commands or contacts the listed endpoints.
|
|
15
17
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 도구 출처와 권한 결합 픽스처
|
|
2
|
+
|
|
3
|
+
이 비활성 픽스처는 MCP 서버의 정책/출처 결과와 해당 서버에 부여된 자동 도구
|
|
4
|
+
권한을 값 없이 연결하는 TrustDex 동작을 검증합니다. 예약된 `.invalid` 도메인과
|
|
5
|
+
자리표시자 마커만 사용하며, 검사는 서버에 연결하거나 서버를 실행하지 않습니다.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node ../../../bin/trustdex.mjs snapshot-claude-bindings ./claude.mcp.json \
|
|
9
|
+
--settings ./claude.settings.json \
|
|
10
|
+
--trust-store ./trust-store.json \
|
|
11
|
+
--out ./claude.bindings.json
|
|
12
|
+
|
|
13
|
+
node ../../../bin/trustdex.mjs snapshot-codex-bindings ./codex.toml \
|
|
14
|
+
--trust-store ./trust-store.json \
|
|
15
|
+
--out ./codex.bindings.json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
검토된 Claude 서버의 범위 제한 승인은 `ALLOW` 결과와 결합됩니다. 출처를 알 수
|
|
19
|
+
없는 서버의 와일드카드 승인은 `BLOCK` 결과와 결합됩니다. 일치하지 않는 Claude
|
|
20
|
+
권한 규칙은 개수만 기록하고 값은 보관하지 않습니다. Codex의 검토된 서버도
|
|
21
|
+
`default_tools_approval_mode = "approve"`가 모든 도구를 승인하므로 재검토가 필요합니다.
|
|
22
|
+
|
|
23
|
+
생성된 보고서는 엔드포인트 경로, 권한 지정자, 도구 이름 및 마커 값을 의도적으로
|
|
24
|
+
제외합니다. `expected.json`은 안정적인 구조적 결과만 기록합니다.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Tool provenance and permission binding fixtures
|
|
2
|
+
|
|
3
|
+
These inert fixtures exercise TrustDex's value-free link between an MCP server's
|
|
4
|
+
policy/provenance result and the automatic tool permission granted to that server.
|
|
5
|
+
They use reserved `.invalid` domains and placeholder markers; inspection never
|
|
6
|
+
contacts or launches either server.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
node ../../../bin/trustdex.mjs snapshot-claude-bindings ./claude.mcp.json \
|
|
10
|
+
--settings ./claude.settings.json \
|
|
11
|
+
--trust-store ./trust-store.json \
|
|
12
|
+
--out ./claude.bindings.json
|
|
13
|
+
|
|
14
|
+
node ../../../bin/trustdex.mjs snapshot-codex-bindings ./codex.toml \
|
|
15
|
+
--trust-store ./trust-store.json \
|
|
16
|
+
--out ./codex.bindings.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The reviewed Claude server has a scoped grant bound to an `ALLOW` result. Its
|
|
20
|
+
unknown peer has a wildcard grant bound to a `BLOCK` result. The unmatched Claude
|
|
21
|
+
permission is counted but not retained. Codex's reviewed server still requires
|
|
22
|
+
review because `default_tools_approval_mode = "approve"` grants every tool.
|
|
23
|
+
|
|
24
|
+
Generated reports intentionally omit endpoint paths, permission specifiers, tool
|
|
25
|
+
names, and marker values. `expected.json` records only stable structural outcomes.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
[mcp_servers.reviewed]
|
|
2
|
+
url = "https://reviewed-bindings.invalid/mcp/INERT_BINDING_URL_MARKER"
|
|
3
|
+
default_tools_approval_mode = "approve"
|
|
4
|
+
enabled_tools = ["read_INERT_BINDING_TOOL_MARKER"]
|
|
5
|
+
|
|
6
|
+
[mcp_servers.unknown]
|
|
7
|
+
url = "https://unknown-bindings.invalid/mcp/INERT_BINDING_URL_MARKER"
|
|
8
|
+
default_tools_approval_mode = "approve"
|
|
9
|
+
enabled_tools = ["*"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"claude": {
|
|
3
|
+
"status": "block",
|
|
4
|
+
"automaticGrantCount": 2,
|
|
5
|
+
"boundCount": 1,
|
|
6
|
+
"blockedCount": 1,
|
|
7
|
+
"unboundAutomaticGrantCount": 1
|
|
8
|
+
},
|
|
9
|
+
"codex": {
|
|
10
|
+
"status": "block",
|
|
11
|
+
"automaticGrantCount": 2,
|
|
12
|
+
"reviewCount": 1,
|
|
13
|
+
"blockedCount": 1
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"claims": [
|
|
4
|
+
{
|
|
5
|
+
"type": "remote",
|
|
6
|
+
"subject": "reviewed-bindings.invalid",
|
|
7
|
+
"publisher": "Inert Reviewed Publisher",
|
|
8
|
+
"status": "verified",
|
|
9
|
+
"evidence": {
|
|
10
|
+
"kind": "manual-review",
|
|
11
|
+
"reference": "https://evidence.invalid/trustdex/bindings-review"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trustdex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A local-first trust, provenance, and review gate for AI agent tools, MCP servers, skills, and plugins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "node --test",
|
|
11
|
-
"test:research": "node --test test/research-fixtures.test.mjs test/claude-settings.test.mjs test/codex-settings.test.mjs test/posture.test.mjs",
|
|
12
|
-
"check": "node --check bin/trustdex.mjs && node --check src/canonical.mjs && node --check src/claude-config.mjs && node --check src/claude-settings.mjs && node --check src/codex-config.mjs && node --check src/codex-settings.mjs && node --check src/extensions.mjs && node --check src/gate.mjs && node --check src/inspect.mjs && node --check src/policy.mjs && node --check src/policy-packs.mjs && node --check src/posture.mjs && node --check src/provenance.mjs && node --check src/provenance-online.mjs && node --check src/review.mjs && node --check src/snapshot.mjs && node --check src/trust-record.mjs",
|
|
11
|
+
"test:research": "node --test test/research-fixtures.test.mjs test/claude-settings.test.mjs test/codex-settings.test.mjs test/posture.test.mjs test/settings-stack.test.mjs test/bindings.test.mjs",
|
|
12
|
+
"check": "node --check bin/trustdex.mjs && node --check src/bindings.mjs && node --check src/canonical.mjs && node --check src/claude-config.mjs && node --check src/claude-settings.mjs && node --check src/codex-config.mjs && node --check src/codex-settings.mjs && node --check src/extensions.mjs && node --check src/gate.mjs && node --check src/inspect.mjs && node --check src/policy.mjs && node --check src/policy-packs.mjs && node --check src/posture.mjs && node --check src/provenance.mjs && node --check src/provenance-online.mjs && node --check src/review.mjs && node --check src/snapshot.mjs && node --check src/trust-record.mjs",
|
|
13
13
|
"prepublishOnly": "npm test && npm run check"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/grigent/trustdex/blob/main/schemas/permission-posture-diff-v2.schema.json",
|
|
4
|
+
"title": "TrustDex merged permission posture diff v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"runtime",
|
|
10
|
+
"status",
|
|
11
|
+
"baselineDigest",
|
|
12
|
+
"currentDigest",
|
|
13
|
+
"summary",
|
|
14
|
+
"changes"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schemaVersion": { "const": 2 },
|
|
18
|
+
"runtime": { "enum": ["claude", "codex"] },
|
|
19
|
+
"status": { "enum": ["unchanged", "restricted", "needs-review"] },
|
|
20
|
+
"baselineDigest": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/digest" },
|
|
21
|
+
"currentDigest": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/digest" },
|
|
22
|
+
"summary": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["expansions", "restrictions", "reviews"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"expansions": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/count" },
|
|
28
|
+
"restrictions": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/count" },
|
|
29
|
+
"reviews": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/count" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"changes": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "$ref": "permission-posture-diff-v1.schema.json#/$defs/change" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/grigent/trustdex/blob/main/schemas/permission-posture-v2.schema.json",
|
|
4
|
+
"title": "TrustDex merged permission posture snapshot v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"createdAt",
|
|
11
|
+
"runtime",
|
|
12
|
+
"policyDigest",
|
|
13
|
+
"posture",
|
|
14
|
+
"sources",
|
|
15
|
+
"digest"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": { "const": 2 },
|
|
19
|
+
"kind": { "const": "agent-permission-posture" },
|
|
20
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
21
|
+
"runtime": { "enum": ["claude", "codex"] },
|
|
22
|
+
"policyDigest": { "$ref": "permission-posture-v1.schema.json#/$defs/digest" },
|
|
23
|
+
"digest": { "$ref": "permission-posture-v1.schema.json#/$defs/digest" },
|
|
24
|
+
"posture": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["action", "signals", "metadata"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"action": { "enum": ["allow", "ask", "block"] },
|
|
30
|
+
"signals": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"uniqueItems": true,
|
|
33
|
+
"items": { "type": "string" }
|
|
34
|
+
},
|
|
35
|
+
"metadata": { "type": "object" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"sources": { "type": "object" }
|
|
39
|
+
},
|
|
40
|
+
"allOf": [
|
|
41
|
+
{
|
|
42
|
+
"if": { "properties": { "runtime": { "const": "claude" } } },
|
|
43
|
+
"then": {
|
|
44
|
+
"properties": {
|
|
45
|
+
"posture": {
|
|
46
|
+
"properties": {
|
|
47
|
+
"metadata": { "$ref": "permission-posture-v1.schema.json#/$defs/claudeMetadata" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"sources": { "$ref": "#/$defs/claudeSources" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"if": { "properties": { "runtime": { "const": "codex" } } },
|
|
56
|
+
"then": {
|
|
57
|
+
"properties": {
|
|
58
|
+
"posture": {
|
|
59
|
+
"properties": {
|
|
60
|
+
"metadata": { "$ref": "permission-posture-v1.schema.json#/$defs/codexMetadata" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"sources": { "$ref": "#/$defs/codexSources" }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"$defs": {
|
|
69
|
+
"count": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 0
|
|
72
|
+
},
|
|
73
|
+
"claudeSources": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["sourceCount", "activeSourceCount", "sourceCounts"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"sourceCount": { "$ref": "#/$defs/count" },
|
|
79
|
+
"activeSourceCount": { "$ref": "#/$defs/count" },
|
|
80
|
+
"sourceCounts": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["user", "project", "local", "session", "managed"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"user": { "$ref": "#/$defs/count" },
|
|
86
|
+
"project": { "$ref": "#/$defs/count" },
|
|
87
|
+
"local": { "$ref": "#/$defs/count" },
|
|
88
|
+
"session": { "$ref": "#/$defs/count" },
|
|
89
|
+
"managed": { "$ref": "#/$defs/count" }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"codexSources": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["sourceCount", "activeSourceCount", "sourceCounts"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"sourceCount": { "$ref": "#/$defs/count" },
|
|
100
|
+
"activeSourceCount": { "$ref": "#/$defs/count" },
|
|
101
|
+
"sourceCounts": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": ["system", "managed", "user", "profile", "project", "cli"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"system": { "$ref": "#/$defs/count" },
|
|
107
|
+
"managed": { "$ref": "#/$defs/count" },
|
|
108
|
+
"user": { "$ref": "#/$defs/count" },
|
|
109
|
+
"profile": { "$ref": "#/$defs/count" },
|
|
110
|
+
"project": { "$ref": "#/$defs/count" },
|
|
111
|
+
"cli": { "$ref": "#/$defs/count" }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/grigent/trustdex/blob/main/schemas/tool-permission-bindings-diff-v1.schema.json",
|
|
4
|
+
"title": "TrustDex tool provenance and permission binding diff v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"runtime",
|
|
10
|
+
"status",
|
|
11
|
+
"baselineDigest",
|
|
12
|
+
"currentDigest",
|
|
13
|
+
"summary",
|
|
14
|
+
"changes"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schemaVersion": { "const": 1 },
|
|
18
|
+
"runtime": { "enum": ["claude", "codex"] },
|
|
19
|
+
"status": { "enum": ["unchanged", "restricted", "needs-review"] },
|
|
20
|
+
"baselineDigest": { "$ref": "tool-permission-bindings-v1.schema.json#/$defs/digest" },
|
|
21
|
+
"currentDigest": { "$ref": "tool-permission-bindings-v1.schema.json#/$defs/digest" },
|
|
22
|
+
"summary": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["expansions", "restrictions", "reviews"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"expansions": { "$ref": "tool-permission-bindings-v1.schema.json#/$defs/count" },
|
|
28
|
+
"restrictions": { "$ref": "tool-permission-bindings-v1.schema.json#/$defs/count" },
|
|
29
|
+
"reviews": { "$ref": "tool-permission-bindings-v1.schema.json#/$defs/count" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"changes": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "$ref": "#/$defs/change" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"$defs": {
|
|
38
|
+
"value": { "type": ["string", "boolean", "number", "null"] },
|
|
39
|
+
"change": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["impact", "type", "name", "field", "before", "after"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"impact": { "enum": ["expansion", "restriction", "review"] },
|
|
45
|
+
"type": {
|
|
46
|
+
"enum": [
|
|
47
|
+
"policy-changed",
|
|
48
|
+
"trust-store-changed",
|
|
49
|
+
"count-changed",
|
|
50
|
+
"binding-added",
|
|
51
|
+
"binding-removed",
|
|
52
|
+
"source-decision-changed",
|
|
53
|
+
"provenance-changed",
|
|
54
|
+
"grant-changed",
|
|
55
|
+
"wildcard-changed"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"name": {
|
|
59
|
+
"oneOf": [
|
|
60
|
+
{ "type": "string", "minLength": 1 },
|
|
61
|
+
{ "type": "null" }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"field": { "type": "string", "minLength": 1 },
|
|
65
|
+
"before": { "$ref": "#/$defs/value" },
|
|
66
|
+
"after": { "$ref": "#/$defs/value" }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/grigent/trustdex/blob/main/schemas/tool-permission-bindings-v1.schema.json",
|
|
4
|
+
"title": "TrustDex tool provenance and permission bindings v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"createdAt",
|
|
11
|
+
"runtime",
|
|
12
|
+
"policyDigest",
|
|
13
|
+
"trustStoreDigest",
|
|
14
|
+
"status",
|
|
15
|
+
"summary",
|
|
16
|
+
"bindings",
|
|
17
|
+
"digest"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schemaVersion": { "const": 1 },
|
|
21
|
+
"kind": { "const": "agent-tool-permission-bindings" },
|
|
22
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
23
|
+
"runtime": { "enum": ["claude", "codex"] },
|
|
24
|
+
"policyDigest": { "$ref": "#/$defs/digest" },
|
|
25
|
+
"trustStoreDigest": {
|
|
26
|
+
"oneOf": [
|
|
27
|
+
{ "$ref": "#/$defs/digest" },
|
|
28
|
+
{ "type": "null" }
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"status": { "enum": ["clear", "bound", "needs-review", "block"] },
|
|
32
|
+
"summary": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": [
|
|
36
|
+
"serverCount",
|
|
37
|
+
"automaticGrantCount",
|
|
38
|
+
"boundCount",
|
|
39
|
+
"reviewCount",
|
|
40
|
+
"blockedCount",
|
|
41
|
+
"unboundAutomaticGrantCount",
|
|
42
|
+
"ambiguousAutomaticGrantCount"
|
|
43
|
+
],
|
|
44
|
+
"properties": {
|
|
45
|
+
"serverCount": { "$ref": "#/$defs/count" },
|
|
46
|
+
"automaticGrantCount": { "$ref": "#/$defs/count" },
|
|
47
|
+
"boundCount": { "$ref": "#/$defs/count" },
|
|
48
|
+
"reviewCount": { "$ref": "#/$defs/count" },
|
|
49
|
+
"blockedCount": { "$ref": "#/$defs/count" },
|
|
50
|
+
"unboundAutomaticGrantCount": { "$ref": "#/$defs/count" },
|
|
51
|
+
"ambiguousAutomaticGrantCount": { "$ref": "#/$defs/count" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"bindings": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "$ref": "#/$defs/binding" }
|
|
57
|
+
},
|
|
58
|
+
"digest": { "$ref": "#/$defs/digest" }
|
|
59
|
+
},
|
|
60
|
+
"$defs": {
|
|
61
|
+
"digest": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
64
|
+
},
|
|
65
|
+
"count": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"minimum": 0
|
|
68
|
+
},
|
|
69
|
+
"binding": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"name",
|
|
74
|
+
"sourceDecision",
|
|
75
|
+
"provenanceStatus",
|
|
76
|
+
"integrityVerified",
|
|
77
|
+
"automaticGrant",
|
|
78
|
+
"grantRuleCount",
|
|
79
|
+
"toolScopeWildcard",
|
|
80
|
+
"status"
|
|
81
|
+
],
|
|
82
|
+
"properties": {
|
|
83
|
+
"name": { "type": "string", "minLength": 1 },
|
|
84
|
+
"sourceDecision": { "enum": ["allow", "ask", "block"] },
|
|
85
|
+
"provenanceStatus": { "enum": ["unknown", "verified", "mismatch"] },
|
|
86
|
+
"integrityVerified": { "type": "boolean" },
|
|
87
|
+
"automaticGrant": { "enum": ["none", "scoped", "all"] },
|
|
88
|
+
"grantRuleCount": { "$ref": "#/$defs/count" },
|
|
89
|
+
"toolScopeWildcard": { "type": "boolean" },
|
|
90
|
+
"status": { "enum": ["not-granted", "bound", "needs-review", "blocked"] }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|