nulladrift 0.12.0 → 0.13.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 CHANGED
@@ -88,6 +88,77 @@ configs (`~/.claude.json`, `~/.cursor/mcp.json`, `claude_desktop_config.json`, W
88
88
  is the project's and is committed. `init` says when it left them out. `nulladrift logout <server>` deletes what `login`
89
89
  stored.
90
90
 
91
+ ## In GitHub Actions
92
+
93
+ Commit this as `.github/workflows/mcp.yml` next to your `mcp.lock`:
94
+
95
+ ```yaml
96
+ name: mcp
97
+ on: [push, pull_request]
98
+ permissions:
99
+ contents: read
100
+ jobs:
101
+ nulladrift:
102
+ runs-on: ubuntu-latest
103
+ steps:
104
+ - uses: actions/checkout@v4
105
+ with:
106
+ persist-credentials: false
107
+ - uses: Nulladrift/nulladrift@v0.13.0
108
+ ```
109
+
110
+ That runs `check` against the committed lock, with the nulladrift release the action came with,
111
+ and the step fails the way the CLI exits: 1 on drift, 2 when the audit could not be completed. It
112
+ uses the runner's Node when that is 22 or later and sets up 22 when it is not, so a job that
113
+ already chose a newer Node keeps it. The action is released with the CLI, from 0.13.0; pin a
114
+ commit SHA in place of the tag if your policy asks for one. The rule above holds here too: run it
115
+ on `pull_request`, never on `pull_request_target`.
116
+
117
+ To post the findings on the pull request, give the job `pull-requests: write` and the step the
118
+ token:
119
+
120
+ ```yaml
121
+ - uses: Nulladrift/nulladrift@v0.13.0
122
+ with:
123
+ args: --comment
124
+ env:
125
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126
+ ```
127
+
128
+ To send each reading to a control plane instead, which decides the verdict and keeps the record,
129
+ add `id-token: write` to the permissions so the reading is signed by the build that sent it:
130
+
131
+ ```yaml
132
+ - uses: Nulladrift/nulladrift@v0.13.0
133
+ with:
134
+ command: push
135
+ api-url: ${{ vars.NULLADRIFT_API_URL }}
136
+ token: ${{ secrets.NULLADRIFT_TOKEN }}
137
+ ```
138
+
139
+ | Input | Default | What it does |
140
+ | --- | --- | --- |
141
+ | `command` | `check` | `check` or `push`. |
142
+ | `args` | none | More arguments for the command, split on spaces: `--comment`, `--sarif nulladrift.sarif`, `--allow-unreachable`. |
143
+ | `working-directory` | `.` | Where `mcp.lock` and the MCP configs are. |
144
+ | `version` | the action's release | The nulladrift version to run from npm. |
145
+ | `node-version` | the runner's, or 22 | Node.js to run it on. Setting it always sets that version up. |
146
+ | `token` | none | For `push`: the collector token. Same as `NULLADRIFT_TOKEN`, which the job can set instead. |
147
+ | `api-url` | none | For `push`: the control plane's address. Same as `NULLADRIFT_API_URL`. |
148
+
149
+ ### Show that a repository is pinned
150
+
151
+ [![MCP pinned by nulladrift][pinned]](https://nulladrift.com)
152
+
153
+ ```markdown
154
+ [![MCP pinned by nulladrift](https://img.shields.io/badge/MCP-pinned%20by%20nulladrift-a3e635?labelColor=0d1117&logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2EzZTYzNSI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYTNlNjM1IiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48cGF0aCBkPSJNMy42IDE3LjRoNi4zIi8+PHBhdGggZD0iTTE0LjEgMTcuNGg2LjMiLz48L2c+PGNpcmNsZSBjeD0iMTIiIGN5PSI1LjgiIHI9IjMuMyIvPjxwYXRoIGQ9Ik0xMC43NSA4LjQgMTIgMjEuNiAxMy4yNSA4LjRaIi8+PC9zdmc+)](https://nulladrift.com)
155
+ ```
156
+
157
+ It says the repository pins its MCP servers with nulladrift. It is not a status badge: it does not
158
+ turn red when `check` fails, which is the job's own status to show.
159
+
160
+ [pinned]: https://img.shields.io/badge/MCP-pinned%20by%20nulladrift-a3e635?labelColor=0d1117&logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2EzZTYzNSI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYTNlNjM1IiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48cGF0aCBkPSJNMy42IDE3LjRoNi4zIi8+PHBhdGggZD0iTTE0LjEgMTcuNGg2LjMiLz48L2c+PGNpcmNsZSBjeD0iMTIiIGN5PSI1LjgiIHI9IjMuMyIvPjxwYXRoIGQ9Ik0xMC43NSA4LjQgMTIgMjEuNiAxMy4yNSA4LjRaIi8+PC9zdmc+
161
+
91
162
  ## What lands in the lock
92
163
 
93
164
  For every server: its identity (`serverInfo`), its declared capabilities, and the
package/dist/index.js CHANGED
@@ -2503,7 +2503,7 @@ import { readFile as readFile3 } from "fs/promises";
2503
2503
  import { isAbsolute as isAbsolute2, resolve as resolve3 } from "path";
2504
2504
 
2505
2505
  // src/lib/version.ts
2506
- var VERSION = "0.12.0";
2506
+ var VERSION = "0.13.0";
2507
2507
  var USER_AGENT = `nulladrift/${VERSION} (+https://github.com/Nulladrift/nulladrift)`;
2508
2508
 
2509
2509
  // src/lock/provenance.ts