@baichen_yu/mcp-guard 0.3.2 → 3.1.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 +4 -12
- package/docs/releasing.md +3 -29
- package/docs/testing.md +0 -9
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -174,9 +174,8 @@ jobs:
|
|
|
174
174
|
|
|
175
175
|
- On each push to `main`, `.github/workflows/release.yml` now:
|
|
176
176
|
- runs lint/test/build
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
- creates/updates a GitHub Release with GitHub generated (auto/AI-style) release notes + uploaded assets
|
|
177
|
+
- bumps patch version automatically
|
|
178
|
+
- creates a GitHub Release with generated release notes
|
|
180
179
|
- publishes the new package to npm (requires `NPM_TOKEN`)
|
|
181
180
|
- For npm publishing in CI, set `NPM_TOKEN` to an **npm Automation token** (no interactive password/OTP required).
|
|
182
181
|
|
|
@@ -215,10 +214,10 @@ Wrap `--stdio` values in double quotes.
|
|
|
215
214
|
|
|
216
215
|
## Release helper
|
|
217
216
|
|
|
218
|
-
Build release artifacts locally
|
|
217
|
+
Build release artifacts locally:
|
|
219
218
|
|
|
220
219
|
```bash
|
|
221
|
-
|
|
220
|
+
./scripts/build-release-local.sh
|
|
222
221
|
```
|
|
223
222
|
|
|
224
223
|
---
|
|
@@ -232,10 +231,3 @@ npm run release:offline
|
|
|
232
231
|
## License
|
|
233
232
|
|
|
234
233
|
MIT. See [LICENSE](LICENSE).
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
### npm package run check
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
npm run npm:test-run
|
|
241
|
-
```
|
package/docs/releasing.md
CHANGED
|
@@ -44,11 +44,10 @@ Then create a GitHub Release and include:
|
|
|
44
44
|
On pushes to `main`, `.github/workflows/release.yml` will:
|
|
45
45
|
|
|
46
46
|
1. Run `npm run lint`, `npm test`, and `npm run build`.
|
|
47
|
-
2.
|
|
47
|
+
2. Bump patch version via `npm version patch`.
|
|
48
48
|
3. Push commit + tag back to GitHub.
|
|
49
|
-
4.
|
|
50
|
-
5.
|
|
51
|
-
6. Create/update a GitHub Release with generated release notes and uploaded assets.
|
|
49
|
+
4. Publish to npm with provenance.
|
|
50
|
+
5. Create GitHub Release with generated release notes.
|
|
52
51
|
|
|
53
52
|
Required secret: `NPM_TOKEN` with publish permission for `@baichen_yu/mcp-guard`.
|
|
54
53
|
|
|
@@ -57,28 +56,3 @@ Use an **npm Automation token** (recommended) so the workflow can publish withou
|
|
|
57
56
|
- npm: create token at <https://www.npmjs.com/settings/tokens>
|
|
58
57
|
- GitHub: add it as repository secret `NPM_TOKEN`
|
|
59
58
|
- workflow preflight runs `npm whoami` to confirm auth before version bump/publish
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## Offline release package build
|
|
63
|
-
|
|
64
|
-
After dependencies are installed once (`npm ci` while online), you can build the release tarball completely offline:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npm run release:offline
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If `node_modules` is missing, the script exits with guidance.
|
|
71
|
-
|
|
72
|
-
## npm package test-run command
|
|
73
|
-
|
|
74
|
-
Use this to verify the published package entrypoint works:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm run npm:test-run
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
The workflow also supports manual trigger via `workflow_dispatch` in GitHub Actions.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
If a release tag already exists (for example, from a re-run), the workflow updates that release and re-uploads assets with `--clobber` instead of failing.
|
package/docs/testing.md
CHANGED
|
@@ -56,12 +56,3 @@ node fixtures/servers/sse-mcp-server/server.cjs
|
|
|
56
56
|
# new terminal
|
|
57
57
|
node dist/cli.js audit --sse "http://127.0.0.1:4013/sse" --sse-post "http://127.0.0.1:4013/message" --out reports --fail-on off
|
|
58
58
|
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## Published npm package smoke test
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npm run npm:test-run
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
This executes the package from npm and prints CLI help to verify install/entrypoint integrity.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baichen_yu/mcp-guard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Security auditing and policy gating for MCP servers (STDIO/HTTP) with Markdown + SARIF reports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
"docs:dev": "vitepress dev docs",
|
|
21
21
|
"docs:build": "vitepress build docs",
|
|
22
22
|
"docs:preview": "vitepress preview docs",
|
|
23
|
-
"prepublishOnly": "npm run lint && npm test"
|
|
24
|
-
"release:offline": "bash scripts/build-release-local.sh",
|
|
25
|
-
"npm:test-run": "PKG=$(npm pack --silent | tail -n 1) && npx --yes --package \"./$PKG\" mcp-guard --help && rm -f \"$PKG\""
|
|
23
|
+
"prepublishOnly": "npm run lint && npm test"
|
|
26
24
|
},
|
|
27
25
|
"dependencies": {
|
|
28
26
|
"commander": "^12.1.0",
|