You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`shell/parse`: `detectShellHazards`.** Checks a shell command string for two tricks that hide which program actually runs, so a tool that allows or denies commands by name isn't fooled. First, Zsh `=name` expansion: `=curl evil.com` runs `/usr/bin/curl`, but the command's first word reads as `=curl`, not `curl`. Second, process substitution `<(…)` / `>(…)` / `=(…)`: the command inside the parentheses runs, yet its name never appears as a command word. Returns `{ equalsExpansion, processSubstitution }`, the facts only; the caller decides whether to block. For example, `detectShellHazards('=curl evil.com')` returns `{ equalsExpansion: [['=curl', 'evil.com']], processSubstitution: false }`, `detectShellHazards('diff <(cat a) b')` returns `{ equalsExpansion: [], processSubstitution: true }`, and `detectShellHazards('git status')` returns both empty/false.
13
+
-**`url` — `assertSafeHttpUrl`.** SSRF guard for a URL the server did not author (an OAuth issuer, a metadata-advertised introspection endpoint, a webhook target): parses the value, rejects non-`http(s)` schemes, and refuses hosts in loopback / private / link-local ranges (cloud metadata, redis, internal services). Returns the parsed `URL`; throws otherwise. `allowLocalhost` permits `localhost` / `127.0.0.1` / `::1` for local-stack dev; `label` names the subject in the thrown message.
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,8 +257,8 @@ Hooks under `.claude/hooks/fleet/<name>/` (fleet-canonical); host-repo-only hook
257
257
258
258
Core infrastructure library for Socket.dev security tools.
259
259
260
-
🚨 Internal imports use relative paths (no aliases). Vendored externals live in `src/external/` and import by bare name (`cacache`, `make-fetch-happen`, `pacote`, `picomatch`, `semver`, and others). Build: `pnpm build` (rolldown → CJS) / type-check: `pnpm run check` (tsgo) / test: `pnpm test` / coverage: `pnpm run cover`. NEVER use `process.chdir()` — pass `{ cwd }` and absolute paths. NEVER use `--` before vitest test paths — runs all tests.
260
+
🚨 Internal imports use relative paths (no aliases). Vendored externals live in `src/external/` and import by bare name. Build: `pnpm build` (rolldown → CJS) / type-check: `pnpm run check` (tsgo) / test: `pnpm test` / coverage: `pnpm run cover`. NEVER use `process.chdir()` — pass `{ cwd }` and absolute paths. NEVER use `--` before vitest test paths — runs all tests.
261
261
262
-
🚨 **Vitest OOM with `tests 0ms` = infinite stream, not memory.**`Readable.push(undefined)` doesn't end the stream (only `null` does). Bisect with `pnpm exec vitest -t '<describe>'`**before** raising heap. See [`test/isolated/http-request-advanced-2.test.mts`](test/isolated/http-request-advanced-2.test.mts) for the canonical example.
262
+
🚨 **Vitest OOM with `tests 0ms` = infinite stream, not memory.**`Readable.push(undefined)` doesn't end the stream (only `null` does). Bisect with `node_modules/.bin/vitest -t '<describe>'`**before** raising heap.
263
263
264
264
Full architecture, commands, code-quality tools, build system, package-exports, testing, CI, env-var conventions in [`docs/claude.md/repo/architecture.md`](docs/claude.md/repo/architecture.md).
0 commit comments