nulladrift 0.7.1 → 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.md +50 -4
- package/dist/index.js +773 -138
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -170,7 +170,21 @@ and `--json` carries the per-server reason.
|
|
|
170
170
|
|
|
171
171
|
Unreachable is a failure by default: a server you cannot check is not a server you can
|
|
172
172
|
trust. `--allow-unreachable` downgrades it to a warning for the cases where you have
|
|
173
|
-
decided that is acceptable
|
|
173
|
+
decided that is acceptable, and records that decision: `init --allow-unreachable`, or
|
|
174
|
+
accepting the server in `review`, writes it to the lock's `unaudited` list. A server that
|
|
175
|
+
could not be audited and is not on that list, or is reached differently than when it went on,
|
|
176
|
+
is reported as new drift even with the flag, so a pull request cannot add a server that
|
|
177
|
+
refuses the auditor and pass.
|
|
178
|
+
|
|
179
|
+
A server whose tool list could not be read in full is a failure too, for the same reason: a
|
|
180
|
+
listing that did not end within 64 pages, or a server that said its tools changed while they were
|
|
181
|
+
being read, on every pass. What was read is pinned and marked partial in the lock, and `check`
|
|
182
|
+
exits `2`. `--allow-partial`, or `policy.allowPartial` in the lock, makes it a warning. Only what
|
|
183
|
+
the protocol states counts; a server is never called partial from the name of one of its tools.
|
|
184
|
+
|
|
185
|
+
A server name defined differently in two config files (`.mcp.json` and `.vscode/mcp.json`,
|
|
186
|
+
say) fails the audit. Each client reads its own file, so checking one definition would vouch
|
|
187
|
+
for the others. Rename one, or make them the same.
|
|
174
188
|
|
|
175
189
|
`--json` and `--sarif` are available on `check`. SARIF means drift shows up in GitHub code
|
|
176
190
|
scanning, or any AppSec tool that reads SARIF, with no integration to write.
|
|
@@ -356,9 +370,41 @@ captures every server's capability surface, and diffs it against the previous re
|
|
|
356
370
|
`crawl-state` branch. It needs no consent from anyone, has no self-selection, and reports in
|
|
357
371
|
changes per server-year, withholding the figure entirely until enough observation has
|
|
358
372
|
accumulated to support it. `--include-stdio` additionally runs registry packages inside a
|
|
359
|
-
container with no host mounts, no host environment, no privileges
|
|
360
|
-
|
|
361
|
-
|
|
373
|
+
container with no host mounts, no host environment, no privileges, a read-only root and no
|
|
374
|
+
network. Each package is fetched first, in a separate container that has the network and runs
|
|
375
|
+
none of the package's code (install scripts off); a package that needs an install script to work
|
|
376
|
+
is counted as unreachable. Without that flag those entries are skipped, and the report states
|
|
377
|
+
which population it actually measured.
|
|
378
|
+
|
|
379
|
+
## Environment variables
|
|
380
|
+
|
|
381
|
+
Nothing needs to be set to run `init`, `check` or `review`. Every variable below is optional, and
|
|
382
|
+
where a flag does the same job the flag wins.
|
|
383
|
+
|
|
384
|
+
| Variable | Used by | What it does |
|
|
385
|
+
| --- | --- | --- |
|
|
386
|
+
| `NULLADRIFT_API_URL` | `push` | The control plane to push readings to. Same as `--api`. |
|
|
387
|
+
| `NULLADRIFT_TOKEN` | `push` | The collector token issued in the dashboard. Same as `--token`. Keep it in a CI secret; `push` refuses an address with credentials in it. |
|
|
388
|
+
| `NULLADRIFT_ID_TOKEN` | `push` | A CI identity token the pipeline minted for this job, which proves which build sent the reading. GitLab mints one into it with `id_tokens` (above); any CI that can mint an OpenID Connect token can set it. GitHub Actions needs nothing here: `push` asks for one itself when the job has `id-token: write`. |
|
|
389
|
+
| `NULLADRIFT_BUILD_AUDIENCE` | `push` | The audience `push` asks GitHub to mint that token for. Defaults to `nulladrift`; change it only together with the control plane's setting of the same name. When set, it also takes the place of the control plane's address in the reading token's audience, which the control plane accepts because it is configured with the same value. Empty counts as unset, so `${{ vars.X }}` for an unset variable falls back to the default. |
|
|
390
|
+
| `GITHUB_TOKEN` | `check --comment` | Lets `check` post its findings on the pull request under review. In GitHub Actions pass `${{ secrets.GITHUB_TOKEN }}` to the step, with `pull-requests: write`. Without it, `--comment` posts nothing and says so. |
|
|
391
|
+
| `NULLADRIFT_PYPI_URL` | `init`, `check` | The PyPI JSON API used to record what a Python server runs. Defaults to `https://pypi.org/pypi`; point it at a mirror or an internal proxy. |
|
|
392
|
+
| `NULLADRIFT_DOCS_URL` | `check --sarif` | Where each finding's "learn more" link points. Unset in this build, so SARIF findings carry no link rather than one that 404s. |
|
|
393
|
+
| `NULLADRIFT_TELEMETRY_ENDPOINT` | `telemetry` | Where opt-in drift counts are sent. No collector is configured in this build; see above. |
|
|
394
|
+
| `NO_COLOR` | all | Set to anything to turn colour off. Colour is also off when the output is not a terminal, or `TERM=dumb`. |
|
|
395
|
+
| `XDG_CONFIG_HOME` | `login`, `telemetry` | Where stored server credentials (`nulladrift/auth`) and the telemetry preference (`nulladrift/config.json`) live. Defaults to `~/.config`. |
|
|
396
|
+
| `COPILOT_HOME`, `APPDATA` | `init`, `check` | Where the Copilot CLI's config (default `~/.copilot`) and, on Windows, Claude Desktop's config are looked for. |
|
|
397
|
+
|
|
398
|
+
These are read, never required, and set by the CI provider rather than by you:
|
|
399
|
+
|
|
400
|
+
| Variable | What it is used for |
|
|
401
|
+
| --- | --- |
|
|
402
|
+
| `CI` | Marks a reading as made in CI rather than locally, and keeps telemetry from asking a question nobody is there to answer. `CI=false` counts as unset. |
|
|
403
|
+
| `GITHUB_REPOSITORY`, `CI_PROJECT_PATH`, `BUILD_REPOSITORY_NAME` | The project name `push` reports under (GitHub, GitLab, Azure Pipelines), unless `--project` names one. Outside CI it is the directory's name. |
|
|
404
|
+
| `GITHUB_REF_NAME`, `CI_COMMIT_REF_NAME` | The branch or tag `push` reports. |
|
|
405
|
+
| `GITHUB_SHA`, `CI_COMMIT_SHA` | The commit `push` reports. |
|
|
406
|
+
| `GITHUB_ACTIONS`, `ACTIONS_ID_TOKEN_REQUEST_URL`, `ACTIONS_ID_TOKEN_REQUEST_TOKEN` | How `push` asks GitHub for the job's identity token. The last two exist only when the job has `id-token: write`. |
|
|
407
|
+
| `GITHUB_REF`, `GITHUB_API_URL` | Which pull request `check --comment` writes on, and the API to write through (GitHub Enterprise Server sets its own). |
|
|
362
408
|
|
|
363
409
|
## Protocol support
|
|
364
410
|
|