trustdex 0.8.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 +36 -5
- package/README.md +36 -5
- package/bin/trustdex.mjs +127 -3
- package/docs/ARCHITECTURE.ko.md +9 -1
- package/docs/ARCHITECTURE.md +9 -1
- package/docs/CLAUDE.ko.md +23 -1
- package/docs/CLAUDE.md +22 -1
- package/docs/CODEX.ko.md +25 -4
- package/docs/CODEX.md +25 -4
- package/docs/DEFENSIVE_USE_CASE.ko.md +6 -0
- package/docs/DEFENSIVE_USE_CASE.md +6 -0
- package/docs/EVALUATION.ko.md +17 -0
- package/docs/EVALUATION.md +17 -0
- package/docs/ROADMAP.ko.md +4 -2
- package/docs/ROADMAP.md +4 -2
- package/docs/THREAT_MODEL.ko.md +4 -0
- package/docs/THREAT_MODEL.md +4 -0
- 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/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 +49 -0
|
@@ -45,6 +45,7 @@ This work is defensive engineering. It does not require credential theft, persis
|
|
|
45
45
|
| Avoid silent parser bypass | focused adapters reject unsupported security-relevant syntax |
|
|
46
46
|
| Keep secrets out of evidence | tests for redaction from output, snapshots, and configuration fingerprints |
|
|
47
47
|
| Make approval drift visible | deterministic snapshots, Ed25519 review records, and recheck commands |
|
|
48
|
+
| Reconcile source trust with automatic grants | value-free Claude/Codex binding snapshots, schemas, diffs, and inert fixtures |
|
|
48
49
|
| Reduce supply-chain ambiguity | explicit provenance observations, artifact digest verification, release checksums, SBOMs, and build attestations |
|
|
49
50
|
| Keep research reproducible | inert fixtures, documented expectations, cross-platform CI, and CodeQL |
|
|
50
51
|
|
|
@@ -64,6 +65,11 @@ applies documented system-through-CLI precedence to supplied files, including or
|
|
|
64
65
|
project layers. It does not discover the active layers, enforce requirements, or replace
|
|
65
66
|
the active Codex sandbox.
|
|
66
67
|
|
|
68
|
+
`snapshot-claude-bindings` and `snapshot-codex-bindings` connect each inspected MCP
|
|
69
|
+
source decision/provenance state to its automatic tool-grant shape. This makes broad
|
|
70
|
+
or blocked grants reviewable without retaining tool names or permission specifiers.
|
|
71
|
+
It remains static evidence and does not enforce runtime calls.
|
|
72
|
+
|
|
67
73
|
## CVP application boundary
|
|
68
74
|
|
|
69
75
|
Anthropic's current Cyber Verification Program application asks for verifiable identity or organization details, a description of security work, and an attestation to the controls for the requested tier. This repository can support the security-work description, but repository changes cannot establish the operator's identity or satisfy account and device controls by themselves.
|
package/docs/EVALUATION.ko.md
CHANGED
|
@@ -77,6 +77,23 @@
|
|
|
77
77
|
제거된 권한 규칙 안에서 개수는 같고 내용만 바뀌는 경우는 이 구조적 비교의
|
|
78
78
|
범위 밖입니다.
|
|
79
79
|
|
|
80
|
+
## 도구 출처와 권한 결합 사례
|
|
81
|
+
|
|
82
|
+
`examples/adversarial/bindings/`와 `test/bindings.test.mjs`는 MCP 정책/출처 결과를
|
|
83
|
+
Claude 및 Codex 자동 도구 권한과 연결합니다. 회귀 테스트는 다음을 요구합니다.
|
|
84
|
+
|
|
85
|
+
- ALLOW 소스에 대한 범위 제한 Claude 권한은 `bound`
|
|
86
|
+
- 와일드카드/전체 도구 권한 및 ASK 소스의 권한은 재검토
|
|
87
|
+
- BLOCK 소스 또는 출처 불일치의 권한은 `blocked`
|
|
88
|
+
- 일치하지 않거나 모호한 Claude 규칙은 값을 보관하지 않고 개수만 기록
|
|
89
|
+
- 정책, 출처, 신뢰 저장소 및 권한 확대 드리프트는 재검토
|
|
90
|
+
- 변조된 요약, 상태 또는 다이제스트는 안전하게 실패
|
|
91
|
+
- 엔드포인트 경로, 권한 지정자, 도구 이름 및 비활성 마커 값을 계속 제외
|
|
92
|
+
|
|
93
|
+
스냅샷 스키마는 안정적인 보고서 형태를 검증합니다. 서명된 신뢰 기록은 검토된
|
|
94
|
+
스냅샷을 인증할 수 있지만 스키마나 서명 모두 런타임 강제 또는 도구 안전성을
|
|
95
|
+
증명하지 않습니다.
|
|
96
|
+
|
|
80
97
|
## 병합 설정 스택 사례
|
|
81
98
|
|
|
82
99
|
`test/settings-stack.test.mjs`는 두 런타임의 명시적 소스 스택을 검사합니다. 다음을 요구합니다.
|
package/docs/EVALUATION.md
CHANGED
|
@@ -79,6 +79,23 @@ for both runtimes. `test/posture.test.mjs` requires:
|
|
|
79
79
|
The digest checks internal consistency, not signer identity. Same-count changes inside
|
|
80
80
|
redacted permission rules remain outside this structural comparison.
|
|
81
81
|
|
|
82
|
+
## Tool provenance and permission binding cases
|
|
83
|
+
|
|
84
|
+
`examples/adversarial/bindings/` and `test/bindings.test.mjs` join MCP policy/provenance
|
|
85
|
+
results to Claude and Codex automatic tool grants. The regression requires:
|
|
86
|
+
|
|
87
|
+
- a scoped Claude grant to an ALLOW source to be `bound`
|
|
88
|
+
- wildcard or all-tool grants and grants to ASK sources to require review
|
|
89
|
+
- grants to BLOCK sources or provenance mismatches to be `blocked`
|
|
90
|
+
- unmatched and ambiguous Claude rules to be counted without retaining their values
|
|
91
|
+
- policy, provenance, trust-store, and grant expansion drift to require review
|
|
92
|
+
- tampered summaries, statuses, or digests to fail closed
|
|
93
|
+
- endpoint paths, permission specifiers, tool names, and inert marker values to remain absent
|
|
94
|
+
|
|
95
|
+
The snapshot schemas validate the stable report shape. A signed trust record can
|
|
96
|
+
authenticate a reviewed snapshot, but neither the schema nor signature proves runtime
|
|
97
|
+
enforcement or tool safety.
|
|
98
|
+
|
|
82
99
|
## Merged settings stack cases
|
|
83
100
|
|
|
84
101
|
`test/settings-stack.test.mjs` exercises explicit source stacks for both runtimes. It requires:
|
package/docs/ROADMAP.ko.md
CHANGED
|
@@ -14,6 +14,8 @@ TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴
|
|
|
14
14
|
추가합니다.
|
|
15
15
|
- TrustDex 0.8.0은 문서화된 Claude Code 및 Codex 우선순위를 위한 명시적 병합 소스
|
|
16
16
|
검사, 스키마 v2 소스 구성 증거 및 안전하게 실패하는 스택 테스트를 추가합니다.
|
|
17
|
+
- TrustDex 0.9.0은 MCP 정책/출처 결과와 자동 도구 권한 사이의 값 없는 Claude/Codex
|
|
18
|
+
연결, 버전 지정 스키마, 드리프트 검토 및 비활성 픽스처를 추가합니다.
|
|
17
19
|
|
|
18
20
|
## 현재: 경계 강화
|
|
19
21
|
|
|
@@ -24,12 +26,12 @@ TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴
|
|
|
24
26
|
- 안정적인 정책 및 스냅샷 스키마 규칙 문서화
|
|
25
27
|
- CI, CodeQL 및 릴리스 자동화를 재현 가능하고 검토 가능한 상태로 유지
|
|
26
28
|
|
|
27
|
-
## 다음:
|
|
29
|
+
## 다음: 실제 런타임 증거 강화
|
|
28
30
|
|
|
29
|
-
- 승인된 도구 출처와 해당 도구에 부여된 행동 권한 연결
|
|
30
31
|
- 버전이 지정된 권한 상태 JSON 스키마를 추가 결정 및 런타임으로 확장
|
|
31
32
|
- 권고형 설정 검사가 런타임 및 운영체제 샌드박스와 결합되는 방식 문서화
|
|
32
33
|
- 비공개 파일을 조용히 찾지 않으면서 런타임이 생성한 실제 설정 증거 추가
|
|
34
|
+
- 호출을 가로채지 않고 런타임이 생성한 MCP/도구 목록을 받는 옵트인 어댑터 추가
|
|
33
35
|
|
|
34
36
|
## 그다음: 무결성 증명
|
|
35
37
|
|
package/docs/ROADMAP.md
CHANGED
|
@@ -14,6 +14,8 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
|
|
|
14
14
|
permission fixtures.
|
|
15
15
|
- TrustDex 0.8.0 adds explicit merged-source inspection for documented Claude Code
|
|
16
16
|
and Codex precedence, schema-v2 source topology evidence, and fail-closed stack tests.
|
|
17
|
+
- TrustDex 0.9.0 adds value-free Claude/Codex bindings between MCP policy/provenance
|
|
18
|
+
results and automatic tool grants, versioned schemas, drift review, and inert fixtures.
|
|
17
19
|
|
|
18
20
|
## Now: harden the boundary
|
|
19
21
|
|
|
@@ -24,12 +26,12 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
|
|
|
24
26
|
- document stable policy and snapshot schema rules
|
|
25
27
|
- keep CI, CodeQL, and release automation reproducible and reviewable
|
|
26
28
|
|
|
27
|
-
## Next:
|
|
29
|
+
## Next: strengthen effective-runtime evidence
|
|
28
30
|
|
|
29
|
-
- connect approved tool provenance to the action permissions granted to that tool
|
|
30
31
|
- extend the versioned permission-posture JSON schemas to additional decisions and runtimes
|
|
31
32
|
- document how advisory settings checks compose with runtime and operating-system sandboxes
|
|
32
33
|
- add runtime-produced effective-setting evidence without silently discovering private files
|
|
34
|
+
- add opt-in adapters for runtime-produced MCP/tool inventories without intercepting calls
|
|
33
35
|
|
|
34
36
|
## Then: prove integrity
|
|
35
37
|
|
package/docs/THREAT_MODEL.ko.md
CHANGED
|
@@ -24,6 +24,8 @@ TrustDex는 하나의 좁은 질문을 다룹니다.
|
|
|
24
24
|
- 명시적인 검토 없이 변경되는 행동 권한 설정
|
|
25
25
|
- 값이 제거된 구조적 기준 상태보다 확대되는 Claude 또는 Codex 권한 상태
|
|
26
26
|
- 명시적으로 전달된 Claude 또는 Codex 설정 소스 사이의 우선순위 변경
|
|
27
|
+
- 서버의 정책/출처 결과와 더 이상 일치하지 않는 자동 MCP 도구 권한
|
|
28
|
+
- 실제 도구 경계를 가리는 와일드카드, 일치하지 않거나 모호한 권한
|
|
27
29
|
|
|
28
30
|
## 신뢰 경계
|
|
29
31
|
|
|
@@ -50,6 +52,8 @@ TrustDex는 익숙한 프로젝트 이름, 스타 수, 패키지 이름 또는
|
|
|
50
52
|
- 명시적으로 병합한 설정 투영이 런타임에서 활성화된 정책임을 증명하는 것
|
|
51
53
|
- Claude Code 또는 Codex 행동 권한의 런타임 강제 적용
|
|
52
54
|
- 서명되지 않은 권한 상태 스냅샷 작성자의 인증
|
|
55
|
+
- 결합 스냅샷이 실행 중인 에이전트가 실제로 불러온 파일을 반영함을 증명하는 것
|
|
56
|
+
- 개별 MCP 도구 호출을 런타임에서 가로채거나 강제하는 것
|
|
53
57
|
|
|
54
58
|
## 중요한 실패 모드
|
|
55
59
|
|
package/docs/THREAT_MODEL.md
CHANGED
|
@@ -24,6 +24,8 @@ TrustDex addresses one narrow question:
|
|
|
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
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
|
|
27
29
|
|
|
28
30
|
## Trust boundaries
|
|
29
31
|
|
|
@@ -50,6 +52,8 @@ TrustDex does **not** treat a familiar project name, star count, package name, o
|
|
|
50
52
|
- proving that the explicitly merged settings projection is the policy active at runtime
|
|
51
53
|
- enforcing Claude Code or Codex action permissions at runtime
|
|
52
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
|
|
53
57
|
|
|
54
58
|
## Important failure mode
|
|
55
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 test/settings-stack.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,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
|
+
}
|