nulladrift 0.6.0 → 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
@@ -21,6 +21,12 @@ flagged the BCC. What `nulladrift` would have told you is narrower and still wor
21
21
  *the server you reviewed and approved as 1.0.15 is now answering as 1.0.16, and you never
22
22
  looked at it.* On a server that sends your mail, that is a reason to go look.
23
23
 
24
+ Since 0.6.0 it says so without taking the server's word for it. The lock records the npm package
25
+ behind the command by its integrity hash, so the day 1.0.16 became `latest`, `check` would have
26
+ reported `server.artifact.changed` -- a different release running, with nothing in the declared
27
+ surface to say what it does -- even had the server gone on reporting 1.0.15. It still reads no
28
+ code, so it would not have found the BCC. It would have failed the build until somebody looked.
29
+
24
30
  The broader class this does catch is the **rug pull**: a server that changes what a tool
25
31
  *claims to do* after you approved it. A description that grows a paragraph of instructions
26
32
  aimed at your agent. A schema that quietly accepts a new `path` argument. A
@@ -44,6 +50,13 @@ Then in CI:
44
50
  npx nulladrift check # exit 0 clean · 1 drift · 2 could not complete the audit
45
51
  ```
46
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
+
47
60
  When it fails, see what moved and decide:
48
61
 
49
62
  ```bash
@@ -61,13 +74,19 @@ nulladrift login <server> # opens a browser, stores tokens owner-only; check
61
74
  ```
62
75
 
63
76
  In CI, set `oauth.clientId` / `oauth.clientSecret` on the server in your config (the secret can
64
- 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
65
80
  not a smaller audit, the spec lets the tool list vary with who is asking, so `check` reports
66
81
  those servers as needing credentials rather than pinning whatever an anonymous client sees.
67
82
 
68
- `init` reads the config files your clients already use, `.mcp.json`, `.vscode/mcp.json`,
69
- `.cursor/mcp.json`, `~/.claude.json`, `claude_desktop_config.json`, so there is nothing
70
- to configure to try it.
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`
89
+ stored.
71
90
 
72
91
  ## What lands in the lock
73
92
 
@@ -124,6 +143,15 @@ describes the new code. The same npm version arriving with different bytes is
124
143
  `server.artifact.substituted`, which has no innocent explanation. `--no-provenance` skips the
125
144
  registry lookups for an air-gapped run.
126
145
 
146
+ **What it leaves out: credentials, wherever a config puts them.** `env` and header values are
147
+ recorded by name only, and a URL loses its query string and `user:password`. A credential
148
+ written literally (`--api-key sk-...`, `-e GITHUB_TOKEN=ghp_...`, a connection string's password,
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
152
+ earlier `mcp.lock` was committed with the key in it, rotate the key: taking it out of the file
153
+ does not take it out of git history.
154
+
127
155
  Format and rationale: [docs/lockfile.md](docs/lockfile.md). JSON Schema:
128
156
  [schema/mcp.lock.schema.json](schema/mcp.lock.schema.json). Worked example:
129
157
  [examples/mcp.lock](examples/mcp.lock).
@@ -156,8 +184,10 @@ scanning, or any AppSec tool that reads SARIF, with no integration to write.
156
184
  The CLI alone needs no account and no network, and that stays true.
157
185
  - **Not a dependency scanner.** `npm audit` and OSV already cover the servers' own
158
186
  dependency trees. The capability layer is the part nothing else covers.
159
- - **Not a guarantee of behaviour.** It pins what a server *declares*. Postmark is the
160
- standing reminder that declaration and behaviour are different things.
187
+ - **Not a guarantee of behaviour.** It pins what a server *declares* and, for a stdio server,
188
+ which artifact runs. It does not read the code: a release that changes what a tool does shows
189
+ up as a different artifact, not as a description of the change. Postmark is the standing
190
+ reminder that declaration and behaviour are different things.
161
191
 
162
192
  ## The hosted control plane
163
193
 
@@ -199,6 +229,10 @@ nulladrift:
199
229
  ```
200
230
 
201
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.
202
236
  Without one, the reading is recorded as unverified, exactly as before -- `push` never fails for
203
237
  want of a token.
204
238
 
@@ -238,8 +272,10 @@ the public registry is already there.
238
272
 
239
273
  Resources, resource templates, prompts and declared capabilities used to be on this list and are
240
274
  not any more: `mcplock` pins all of them and `mcpdrift` pins most. Running the other way, three
241
- of these tools can prove a reading came from somewhere, through signing or a transparency log,
242
- and this one cannot.
275
+ of these tools can prove a reading came from somewhere, through signing or a transparency log.
276
+ Since 0.6.0 this one can say which CI build sent a reading, on the provider's signature, but
277
+ nothing signs the reading's contents and there is no log. 0.6.0 also pins the artifact behind
278
+ each stdio server, which until then only MCPTrust did.
243
279
 
244
280
  [docs/comparison.md](docs/comparison.md) has the field-by-field matrix, how it was measured, and
245
281
  the cases where the alternatives are the better choice.
@@ -337,3 +373,13 @@ Requires Node 22+.
337
373
  ## Licence
338
374
 
339
375
  MIT. See [LICENSE](LICENSE).
376
+
377
+ **The licence covers the code, not the name.** "Nulladrift" and the pin mark identify this
378
+ project, and the MIT licence grants no rights to either. You are welcome to say a fork or a
379
+ product is based on Nulladrift, to write about it, and to link to it. Please do not name a fork, a
380
+ package or a hosted service "Nulladrift", or use the mark in a way that suggests it is this
381
+ project or that we endorse it. The mark, and how to use it when you write about the project, is
382
+ at [nulladrift.com/brand](https://nulladrift.com/brand).
383
+
384
+ Contributions come in under the same MIT licence, signed off under the Developer Certificate of
385
+ Origin; [CONTRIBUTING.md](CONTRIBUTING.md#sign-off-every-commit) says how.