nulladrift 0.5.0 → 0.6.1
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 +78 -6
- package/dist/index.js +734 -54
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
|
@@ -66,8 +72,10 @@ not a smaller audit, the spec lets the tool list vary with who is asking, so `ch
|
|
|
66
72
|
those servers as needing credentials rather than pinning whatever an anonymous client sees.
|
|
67
73
|
|
|
68
74
|
`init` reads the config files your clients already use, `.mcp.json`, `.vscode/mcp.json`,
|
|
69
|
-
`.cursor/mcp.json`, `~/.claude.json`, `claude_desktop_config.json`,
|
|
70
|
-
|
|
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`
|
|
78
|
+
stored.
|
|
71
79
|
|
|
72
80
|
## What lands in the lock
|
|
73
81
|
|
|
@@ -111,6 +119,27 @@ not neutral, absent `readOnlyHint` means "may modify", absent `destructiveHint`
|
|
|
111
119
|
"may destroy", so a *removed* annotation is an escalation. The lock writes the effective
|
|
112
120
|
values out in full so that escalation appears as a change rather than as an absence.
|
|
113
121
|
|
|
122
|
+
Everything above is what a server *says*. For a stdio server the lock also records what it *is*:
|
|
123
|
+
the package, image or file behind the command, by content address.
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
"provenance": { "ecosystem": "npm", "name": "@modelcontextprotocol/server-filesystem", "version": "2.2.0", "integrity": "sha512-…" }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
A release that keeps every tool name, description and schema identical while changing what the
|
|
130
|
+
tools do used to pass `check`. It now fails it, and says that nothing else in the report
|
|
131
|
+
describes the new code. The same npm version arriving with different bytes is
|
|
132
|
+
`server.artifact.substituted`, which has no innocent explanation. `--no-provenance` skips the
|
|
133
|
+
registry lookups for an air-gapped run.
|
|
134
|
+
|
|
135
|
+
**What it leaves out: credentials, wherever a config puts them.** `env` and header values are
|
|
136
|
+
recorded by name only, and a URL loses its query string and `user:password`. A credential
|
|
137
|
+
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
|
|
140
|
+
earlier `mcp.lock` was committed with the key in it, rotate the key: taking it out of the file
|
|
141
|
+
does not take it out of git history.
|
|
142
|
+
|
|
114
143
|
Format and rationale: [docs/lockfile.md](docs/lockfile.md). JSON Schema:
|
|
115
144
|
[schema/mcp.lock.schema.json](schema/mcp.lock.schema.json). Worked example:
|
|
116
145
|
[examples/mcp.lock](examples/mcp.lock).
|
|
@@ -143,8 +172,10 @@ scanning, or any AppSec tool that reads SARIF, with no integration to write.
|
|
|
143
172
|
The CLI alone needs no account and no network, and that stays true.
|
|
144
173
|
- **Not a dependency scanner.** `npm audit` and OSV already cover the servers' own
|
|
145
174
|
dependency trees. The capability layer is the part nothing else covers.
|
|
146
|
-
- **Not a guarantee of behaviour.** It pins what a server *declares
|
|
147
|
-
|
|
175
|
+
- **Not a guarantee of behaviour.** It pins what a server *declares* and, for a stdio server,
|
|
176
|
+
which artifact runs. It does not read the code: a release that changes what a tool does shows
|
|
177
|
+
up as a different artifact, not as a description of the change. Postmark is the standing
|
|
178
|
+
reminder that declaration and behaviour are different things.
|
|
148
179
|
|
|
149
180
|
## The hosted control plane
|
|
150
181
|
|
|
@@ -160,6 +191,35 @@ a pull request cannot widen what its own build is allowed to do.
|
|
|
160
191
|
**Nothing in this repository depends on it.** `nulladrift check` needs no account, no token and
|
|
161
192
|
no network beyond the servers it is auditing, and that does not change.
|
|
162
193
|
|
|
194
|
+
### Proving which build sent a reading
|
|
195
|
+
|
|
196
|
+
A reading names its own ref and commit, so the collector token alone lets whoever holds it report
|
|
197
|
+
any branch as clean. `push` can send your CI provider's signed identity token as well, and the
|
|
198
|
+
control plane then records the repository, ref and commit as the provider stated them. An
|
|
199
|
+
organization can list the builds it trusts and require every reading to come from one.
|
|
200
|
+
|
|
201
|
+
GitHub Actions needs one permission, and `push` does the rest:
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
permissions:
|
|
205
|
+
contents: read
|
|
206
|
+
id-token: write
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
GitLab CI mints the token into a variable you name:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
nulladrift:
|
|
213
|
+
id_tokens:
|
|
214
|
+
NULLADRIFT_ID_TOKEN:
|
|
215
|
+
aud: nulladrift
|
|
216
|
+
script: npx nulladrift push
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Any other CI that can mint an OpenID Connect token for a job can put it in `NULLADRIFT_ID_TOKEN`.
|
|
220
|
+
Without one, the reading is recorded as unverified, exactly as before -- `push` never fails for
|
|
221
|
+
want of a token.
|
|
222
|
+
|
|
163
223
|
See [nulladrift.com](https://nulladrift.com).
|
|
164
224
|
|
|
165
225
|
## Layout
|
|
@@ -196,8 +256,10 @@ the public registry is already there.
|
|
|
196
256
|
|
|
197
257
|
Resources, resource templates, prompts and declared capabilities used to be on this list and are
|
|
198
258
|
not any more: `mcplock` pins all of them and `mcpdrift` pins most. Running the other way, three
|
|
199
|
-
of these tools can prove a reading came from somewhere, through signing or a transparency log
|
|
200
|
-
|
|
259
|
+
of these tools can prove a reading came from somewhere, through signing or a transparency log.
|
|
260
|
+
Since 0.6.0 this one can say which CI build sent a reading, on the provider's signature, but
|
|
261
|
+
nothing signs the reading's contents and there is no log. 0.6.0 also pins the artifact behind
|
|
262
|
+
each stdio server, which until then only MCPTrust did.
|
|
201
263
|
|
|
202
264
|
[docs/comparison.md](docs/comparison.md) has the field-by-field matrix, how it was measured, and
|
|
203
265
|
the cases where the alternatives are the better choice.
|
|
@@ -295,3 +357,13 @@ Requires Node 22+.
|
|
|
295
357
|
## Licence
|
|
296
358
|
|
|
297
359
|
MIT. See [LICENSE](LICENSE).
|
|
360
|
+
|
|
361
|
+
**The licence covers the code, not the name.** "Nulladrift" and the pin mark identify this
|
|
362
|
+
project, and the MIT licence grants no rights to either. You are welcome to say a fork or a
|
|
363
|
+
product is based on Nulladrift, to write about it, and to link to it. Please do not name a fork, a
|
|
364
|
+
package or a hosted service "Nulladrift", or use the mark in a way that suggests it is this
|
|
365
|
+
project or that we endorse it. The mark, and how to use it when you write about the project, is
|
|
366
|
+
at [nulladrift.com/brand](https://nulladrift.com/brand).
|
|
367
|
+
|
|
368
|
+
Contributions come in under the same MIT licence, signed off under the Developer Certificate of
|
|
369
|
+
Origin; [CONTRIBUTING.md](CONTRIBUTING.md#sign-off-every-commit) says how.
|