@socketsecurity/mcp 0.0.19 → 0.2.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/CHANGELOG.md +63 -1
- package/README.md +279 -115
- package/dist/index.cjs +54801 -41179
- package/{hooks → dist}/socket-gate/README.md +13 -13
- package/dist/socket-gate/socket-gate.cjs +5391 -0
- package/package.json +185 -46
- package/hooks/socket-gate/index.mts +0 -296
- package/hooks/socket-gate/socket-gate.cjs +0 -1047
|
@@ -9,10 +9,10 @@ signals).
|
|
|
9
9
|
|
|
10
10
|
No API key, no CLI, no registration. Copy the directory and wire it up.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
`socket-gate.cjs`
|
|
14
|
-
`~/.claude/hooks/` and point your settings at
|
|
15
|
-
[Copy it in](#copy-it-in)).
|
|
12
|
+
The hook source (`index.mts`) lives here; a build bundles it to
|
|
13
|
+
`dist/socket-gate/socket-gate.cjs` with this README beside it. You copy that
|
|
14
|
+
`dist/socket-gate` directory into `~/.claude/hooks/` and point your settings at
|
|
15
|
+
the `.cjs` (see [Copy it in](#copy-it-in)).
|
|
16
16
|
|
|
17
17
|
## Why
|
|
18
18
|
|
|
@@ -42,25 +42,25 @@ allows.
|
|
|
42
42
|
|
|
43
43
|
## Copy it in
|
|
44
44
|
|
|
45
|
-
Copy the whole `socket-gate` directory into your hooks folder so the
|
|
46
|
-
its docs travel together, and so you own your copy to edit. The
|
|
47
|
-
`socket-gate.cjs` is self-contained: rolldown inlines its one
|
|
48
|
-
(`@socketsecurity/lib-stable`), so it runs without a `package.json`
|
|
49
|
-
`node_modules` beside it.
|
|
45
|
+
Copy the whole `dist/socket-gate` directory into your hooks folder so the
|
|
46
|
+
bundle and its docs travel together, and so you own your copy to edit. The
|
|
47
|
+
bundled `socket-gate.cjs` is self-contained: rolldown inlines its one
|
|
48
|
+
dependency (`@socketsecurity/lib-stable`), so it runs without a `package.json`
|
|
49
|
+
or `node_modules` beside it.
|
|
50
50
|
|
|
51
51
|
From an installed `@socketsecurity/mcp` package:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
mkdir -p ~/.claude/hooks
|
|
55
|
-
cp -R node_modules/@socketsecurity/mcp/
|
|
55
|
+
cp -R node_modules/@socketsecurity/mcp/dist/socket-gate ~/.claude/hooks/
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
From a checkout of this repo, run `pnpm run build` first to produce
|
|
59
|
-
`socket-gate
|
|
59
|
+
`dist/socket-gate`, then copy:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
pnpm run build
|
|
63
|
-
cp -R
|
|
63
|
+
cp -R dist/socket-gate ~/.claude/hooks/
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Wire it up
|
|
@@ -87,7 +87,7 @@ Add to `~/.claude/settings.json`:
|
|
|
87
87
|
|
|
88
88
|
## How it works
|
|
89
89
|
|
|
90
|
-
`supplyChain < 20` denies, anything else allows
|
|
90
|
+
`supplyChain < 20` denies, anything else allows - e.g. `express` / `lodash` /
|
|
91
91
|
`react` (75–97) allow, `browserlist` (typosquat of `browserslist`, 15) and
|
|
92
92
|
confirmed malware (0) block. Network, timeout, and parse errors all fail open
|
|
93
93
|
(decision `allow`), with the cause written to stderr; stdout stays the
|