nulladrift 0.6.1 → 0.6.2

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 CHANGED
@@ -50,6 +50,13 @@ Then in CI:
50
50
  npx nulladrift check # exit 0 clean · 1 drift · 2 could not complete the audit
51
51
  ```
52
52
 
53
+ `check` starts every stdio server in the config, so it runs the commands a pull request writes
54
+ there. Run it on `pull_request`, which gives a fork no secrets, and never on
55
+ `pull_request_target`. A config cannot reach the job's own credentials through `${VAR}`: the
56
+ token and identity the CI provider puts in every job, and every `NULLADRIFT_` variable, are
57
+ refused. A secret your workflow sets for a server is filled as written, and a server that runs
58
+ does so as the job's user.
59
+
53
60
  When it fails, see what moved and decide:
54
61
 
55
62
  ```bash
@@ -67,14 +74,18 @@ nulladrift login <server> # opens a browser, stores tokens owner-only; check
67
74
  ```
68
75
 
69
76
  In CI, set `oauth.clientId` / `oauth.clientSecret` on the server in your config (the secret can
70
- be `${ENV_VAR}`) and no browser is involved. Auditing a gated server *without* credentials is
77
+ be `${ENV_VAR}`), with `oauth.issuer` naming the authorization server the secret is for, and no
78
+ browser is involved. The issuer is required: without it the secret goes to whichever
79
+ authorization server the MCP server names, and a compromised server can name its own. Auditing a gated server *without* credentials is
71
80
  not a smaller audit, the spec lets the tool list vary with who is asking, so `check` reports
72
81
  those servers as needing credentials rather than pinning whatever an anonymous client sees.
73
82
 
74
- `init` reads the config files your clients already use, `.mcp.json`, `.vscode/mcp.json`,
75
- `.cursor/mcp.json` and `~/.cursor/mcp.json`, `~/.claude.json`, `claude_desktop_config.json`,
76
- Windsurf's `~/.codeium/windsurf/mcp_config.json` and Copilot's `~/.copilot/mcp-config.json`, so
77
- there is nothing to configure to try it. `nulladrift logout <server>` deletes what `login`
83
+ `init` reads the config files your clients already use in the project, `.mcp.json`,
84
+ `.vscode/mcp.json` and `.cursor/mcp.json`, so there is nothing to configure to try it. Your own
85
+ configs (`~/.claude.json`, `~/.cursor/mcp.json`, `claude_desktop_config.json`, Windsurf's
86
+ `~/.codeium/windsurf/mcp_config.json`, Copilot's `~/.copilot/mcp-config.json`) are read with
87
+ `--user-configs`: they are one person's servers, often with their keys and home paths, and the lock
88
+ is the project's and is committed. `init` says when it left them out. `nulladrift logout <server>` deletes what `login`
78
89
  stored.
79
90
 
80
91
  ## What lands in the lock
@@ -135,8 +146,9 @@ registry lookups for an air-gapped run.
135
146
  **What it leaves out: credentials, wherever a config puts them.** `env` and header values are
136
147
  recorded by name only, and a URL loses its query string and `user:password`. A credential
137
148
  written literally (`--api-key sk-...`, `-e GITHUB_TOKEN=ghp_...`, a connection string's password,
138
- a key in a hosted server's URL path) is replaced with `REDACTED`, and `init`, `check` and `push`
139
- say which server it was. Write it as `${VAR}` instead; the lock keeps the placeholder. If an
149
+ `--header "Authorization: Bearer ..."`, a key in JSON passed as an argument, a key in a hosted
150
+ server's URL path or query) is replaced with `REDACTED`, and `init`, `check` and `push` say which
151
+ server it was. Write it as `${VAR}` instead; the lock keeps the placeholder. If an
140
152
  earlier `mcp.lock` was committed with the key in it, rotate the key: taking it out of the file
141
153
  does not take it out of git history.
142
154
 
@@ -217,6 +229,10 @@ nulladrift:
217
229
  ```
218
230
 
219
231
  Any other CI that can mint an OpenID Connect token for a job can put it in `NULLADRIFT_ID_TOKEN`.
232
+
233
+ `push` sends its tokens only over `https` (plain `http` only to `localhost`), refuses an API address
234
+ with credentials in it, and does not follow redirects, so the reading and the identity token reach
235
+ the control plane you named and nowhere else.
220
236
  Without one, the reading is recorded as unverified, exactly as before -- `push` never fails for
221
237
  want of a token.
222
238