trustdex 0.4.1 → 0.4.3
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.md +5 -3
- package/bin/trustdex.mjs +3 -1
- package/docs/CODEX.md +73 -0
- package/docs/ROADMAP.md +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,8 +75,8 @@ Requires Node.js 20+.
|
|
|
75
75
|
Run directly from npm:
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
npx trustdex@0.4.
|
|
79
|
-
npx trustdex@0.4.
|
|
78
|
+
npx trustdex@0.4.3 --help
|
|
79
|
+
npx trustdex@0.4.3 inspect ./mcp.json --pack strict --policy ./trustdex.policy.json
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Or work from a source checkout:
|
|
@@ -147,6 +147,8 @@ node ./bin/trustdex.mjs gate-codex ./examples/codex.config.toml \
|
|
|
147
147
|
|
|
148
148
|
The gate removes non-approved MCP sections while preserving unrelated TOML sections. TrustDex intentionally parses only the MCP-related TOML constructs it needs; unsupported MCP syntax fails rather than being silently trusted.
|
|
149
149
|
|
|
150
|
+
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.
|
|
151
|
+
|
|
150
152
|
## Online provenance observations
|
|
151
153
|
|
|
152
154
|
Normal inspection remains local-only. These commands perform an explicit network lookup only when invoked:
|
|
@@ -292,7 +294,7 @@ The private key should never be committed.
|
|
|
292
294
|
```yaml
|
|
293
295
|
- uses: actions/checkout@v4
|
|
294
296
|
|
|
295
|
-
- uses: grigent/trustdex@v0.4.
|
|
297
|
+
- uses: grigent/trustdex@v0.4.3
|
|
296
298
|
with:
|
|
297
299
|
config: ./mcp.json
|
|
298
300
|
pack: official-first
|
package/bin/trustdex.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
2
3
|
import fs from 'node:fs/promises';
|
|
3
4
|
import path from 'node:path';
|
|
4
5
|
import process from 'node:process';
|
|
@@ -27,7 +28,8 @@ import {
|
|
|
27
28
|
verifyTrustRecord
|
|
28
29
|
} from '../src/trust-record.mjs';
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
// Read the version from the package manifest so --version cannot drift from releases.
|
|
32
|
+
const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
31
33
|
|
|
32
34
|
function usage() {
|
|
33
35
|
console.log(`TrustDex v${VERSION}
|
package/docs/CODEX.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Using TrustDex with Codex
|
|
2
|
+
|
|
3
|
+
This guide covers two things: gating the MCP servers a Codex client may start, and how TrustDex itself is maintained with Codex.
|
|
4
|
+
|
|
5
|
+
TrustDex is an independent project. It is not affiliated with, endorsed by, or certified by OpenAI, and an ALLOW decision is not an OpenAI or TrustDex safety certification.
|
|
6
|
+
|
|
7
|
+
## Gate Codex MCP servers
|
|
8
|
+
|
|
9
|
+
Codex clients read MCP server definitions from `[mcp_servers.<name>]` tables in `config.toml` (by default under `~/.codex/`). Every entry there can start a local process or connect to a remote endpoint with the credentials you give it.
|
|
10
|
+
|
|
11
|
+
### 1. Inspect the current configuration
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx trustdex@0.4.3 inspect-codex ~/.codex/config.toml --pack strict
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
Use `--json` for machine-readable output and `--trust-store ./trust-store.json` to attach explicit publisher evidence (see [TRUST_STORE.md](TRUST_STORE.md)).
|
|
20
|
+
|
|
21
|
+
### 2. Write a gated copy
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx trustdex@0.4.3 gate-codex ~/.codex/config.toml \
|
|
25
|
+
--pack official-first \
|
|
26
|
+
--trust-store ./trust-store.json \
|
|
27
|
+
--out ./gated-config.toml
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The gated file keeps unrelated TOML sections (models, features, profiles) unchanged and removes every MCP section that is not ALLOW. `ASK` entries stay out unless you pass `--include-ask`, which should only be used when another approval layer exists.
|
|
31
|
+
|
|
32
|
+
Review the difference before using it:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
diff ~/.codex/config.toml ./gated-config.toml
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
TrustDex never edits `config.toml` in place. Replacing the original file, or pointing a Codex installation at the gated copy, is an explicit step you take after review.
|
|
39
|
+
|
|
40
|
+
### 3. Re-run after every change
|
|
41
|
+
|
|
42
|
+
MCP entries change when a package version is bumped, a launcher is swapped, or a new environment variable is passed. Re-run `inspect-codex` and `gate-codex` whenever `config.toml` changes; a CI job or a pre-commit hook in a dotfiles repository works well for this.
|
|
43
|
+
|
|
44
|
+
The signed `snapshot`, `approve`, and `recheck` drift workflow in the [README](../README.md#capability-and-provenance-drift) currently accepts MCP JSON only. Extending it to Codex `config.toml` is tracked in the [roadmap](ROADMAP.md).
|
|
45
|
+
|
|
46
|
+
### Fail-closed parsing
|
|
47
|
+
|
|
48
|
+
TrustDex parses only the TOML constructs used by Codex MCP sections. An unsupported MCP key, nested subsection, or syntax is reported as an error instead of being skipped, so a configuration TrustDex cannot fully read never silently becomes ALLOW.
|
|
49
|
+
|
|
50
|
+
### Skills and plugins
|
|
51
|
+
|
|
52
|
+
Agent skills and plugin manifests can be inspected the same way:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx trustdex@0.4.3 inspect-skill ./path/to/SKILL.md --pack strict
|
|
56
|
+
npx trustdex@0.4.3 inspect-plugin ./path/to/plugin.json --pack strict
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
## Gate MCP configuration in CI
|
|
62
|
+
|
|
63
|
+
Repositories that ship an MCP configuration for agents can gate it on every pull request with the [TrustDex GitHub Action](../README.md#github-action). Pin the action to a reviewed commit SHA.
|
|
64
|
+
|
|
65
|
+
## How TrustDex is maintained with Codex
|
|
66
|
+
|
|
67
|
+
TrustDex uses Codex as a reviewer and maintainer assistant, with the same trust boundary it asks users to apply:
|
|
68
|
+
|
|
69
|
+
- [AGENTS.md](../AGENTS.md) holds the development rules and a **Review guidelines** section that Codex code review applies to TrustDex pull requests. The guidelines turn the project's security invariants (no silent ALLOW, no secret values in output, no provenance override of blocking signals, fail-closed parsing, pinned actions) into explicit review findings.
|
|
70
|
+
- Codex suggestions are treated like any other contribution: they go through a pull request, must pass the cross-platform CI matrix and CodeQL, and are merged only after maintainer review.
|
|
71
|
+
- Codex does not hold release credentials. npm publication uses Trusted Publisher OIDC with Sigstore provenance from `.github/workflows/publish.yml`, triggered by a maintainer.
|
|
72
|
+
|
|
73
|
+
If you contribute with Codex or another coding agent, the same AGENTS.md rules apply to your changes.
|
package/docs/ROADMAP.md
CHANGED
|
@@ -19,6 +19,7 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
|
|
|
19
19
|
|
|
20
20
|
## Later: expand interoperability
|
|
21
21
|
|
|
22
|
+
- extend signed snapshot, approval, and recheck workflows to Codex `config.toml`
|
|
22
23
|
- add adapters for additional agent runtimes and registries
|
|
23
24
|
- publish a compatibility matrix backed by tests
|
|
24
25
|
- define machine-readable decision output for CI and policy tooling
|
|
@@ -30,4 +31,4 @@ The project is seeking pilot users willing to share non-sensitive feedback about
|
|
|
30
31
|
|
|
31
32
|
## How to help
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
If you ran TrustDex on a real configuration, the **Pilot feedback** issue form is the fastest way to report results. Otherwise, open a focused issue describing the use case and redacted configuration shape. For security-sensitive proposals, include the expected trust boundary and bypass cases.
|