# eslint-plugin-node-security All notable changes to `eslint-plugin-node-security` are documented here. Entries below `## ` are generated from [changesets](https://github.com/changesets/changesets); the format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](https://semver.org/spec/v2.0.0.html). ## 6.3.5 ### Patch Changes - **πŸ› Fix** β€” Four false positives measured on real repositories, each fixed by following where the value goes. `secure-coding/no-xxe-injection` no longer reports the platform `DOMParser` (an undeclared global, which the HTML standard forbids from fetching an external entity) or linkedom, probed against an external-entity canary with no leak; an imported or locally declared `DOMParser` and every entity-capable package keep reporting (23 findings on next-ai-draw-io). `node-security/no-math-random-crypto` no longer reports a draw that only picks an element that already exists, sets a timer delay or is compared, however its binding is named; a pick from an alphabet, an accumulator (`token += CHARS[draw]`) and a draw that is also stored keep reporting (terraform-aws-github-runner, next-ai-draw-io). `secure-coding/no-improper-sanitization` no longer reports a `& < >` text escaper in a file that also ships the quote-escaping half and never calls the text escaper inside a tag, a constant inside `res.json({...})`, or a constant inside `new Command({...})`; dangerous markup, a text escaper used in an attribute, and a string built from request data keep reporting (apostrophe, n8n-mcp, next-ai-draw-io). `lambda-security/no-error-swallowing` no longer reports a catch that rethrows everything a negated test on the error leaves out (`if (!isNotFound(error)) throw error`); the opposite polarity and a test that never reads the error keep reporting (terraform-aws-github-runner). ## 6.3.4 ### Patch Changes - **πŸ› Fix** β€” `no-dynamic-algorithm-selection` no longer reports an algorithm name read from a string enum declared in the same file. `createCipheriv(SecretEncryptionAlgo.AES_256_GCM, key, iv)`, and a `const` that holds such a member, can only produce a name the author wrote down, which is the allowlist the rule asks for. A member read by a caller-supplied key (`Algo[name]`), an enum with a numeric or computed member, a merged enum and an imported enum keep being reported. Seen on Infisical. - **πŸ› Fix** β€” `no-toctou-vulnerability` no longer reports a check-then-use on a path beneath a directory the code created with `fs.mkdtemp` / `mkdtempSync` (also awaited, and through `path.join` or a template). `mkdtemp` makes a 0700 directory owned by the caller, so no other unprivileged user can create or swap a name inside it: the same absence of a shared namespace the per-user-root exemption already relies on. A path in the shared temp root, a `mkdtemp` that is not `fs`'s, and a path joined from unvalidated input (the Vendure `path.join(importAssetsDir, assetPath)` shape) are still reported. Seen on docmost. ## 6.3.3 ### Patch Changes - **πŸ› Fix** β€” `no-timing-unsafe-compare` no longer reports an etag check, a record id, or the caller's own `@Body()` value Three false-positive shapes turned up when scanning Wiki.js, Trigger.dev and Docmost: - An `If-None-Match` / `If-Match` header compared with the etag the handler sends back. The etag is public, even when it is a SHA-1 of the content. The exemption covers only a keyless `createHash(…).update(…).digest(…)` chain, or a value neither named as a secret nor derived with crypto, followed through single-write bindings, and only a request header receiver; the same header against a stored secret, an HMAC under any name or a digest with another value concatenated in still reports. This covers `req.headers[…]`, `headers.get(…)`, `req.get(…)` and a `const` bound to any of them. - A name ending in `Id`/`Ids`, such as `localAuthId` or `tokenId`, is now a record key. These were added to the default `nonSecretTails`. A configured secret pattern that itself ends in the tail is still a secret, so `sessionId` keeps reporting. - A NestJS `@Body()` / `@Query()` / `@Param()` parameter now reads as the request. Docmost's `dto.sessionId === req.raw.sessionId` has the caller on both sides, so it is not reported. A `@Body()` token compared with a stored reset token now reports; before, it read as two server values. devkit: `requestSource` (structural request-payload recognition, including `hasPayloadDecorator`) is now exported, namespaced like `valueFollow`. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.5.0` ## 6.3.2 ### Patch Changes - **πŸ› Fix** β€” `no-arbitrary-file-access` now decides that a path variable is a function parameter by scope resolution, not by matching its name while walking up the tree. A `catch (file)` binding that shadows an outer `file` parameter fed request input is no longer reported as that parameter. - **πŸ› Fix** β€” `isSeparatorAnchored` now lives in `@interlace/eslint-devkit`. node-security's file-access rules and mcp-sdk-security's `no-path-traversal-in-tool` each carried their own copy, and the two had to be changed together. Both now import the one shared helper, so a `startsWith` containment guard gets the same verdict from every rule. Rule behaviour does not change. - **πŸ› Fix** β€” `no-timing-unsafe-compare`: a comparison against `void 0` is a comparison against `undefined`, the spelling bundlers and minifiers emit. `meta?.progressToken === void 0` in a bundled MCP server is a presence check, not a secret comparison. `=== undefined` was already silent. A token compared with a configured secret still reports. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.4.0` ## 6.3.1 ### Patch Changes - **πŸ› Fix** β€” no-timing-unsafe-compare skips browser code A timing oracle needs the comparison to run on a server the attacker can time. In a React, Vue, Svelte or Angular module it runs in the user's own browser: OpenWA's dashboard compares a socket event's `sessionId` with the session the user picked, and the rule reported it as a secret compare. Files that start with `'use client'`, are `.tsx`/`.jsx`/`.vue`/`.svelte`, or import a UI framework (not type-only) are now skipped; `'use server'` overrides all of them. `includeBrowserCode: true` restores the old behaviour. On the files that drew the rule's 82 reports in a 40-app scan, 30 were browser code and are now silent. - **πŸ› Fix** β€” no-timing-unsafe-compare skips imported literal constants and plain digests of request data An imported name is followed across relative imports, and a value written there as a literal counts as a constant, the way a local `const` already did. Unleash compares an event type with `API_TOKEN_DELETED = 'api-token-deleted'`, which was reported because of the word `token`. A property of an imported object of literals counts too: Ghost compares `ctx.path` with `ROUTES.resetPassword`. A `createHash(...).update(...).digest()` is a secret only when something it hashes was not supplied by the caller. Before, comparing the SHA-256 of the request body with the client's `content-sha256` header was reported, as in Unleash's edge HMAC verifier. The digest is recognised through the `crypto` namespace too (`crypto.createHash(...)`). Keyed derivations and digests of stored values still report, and so does an HMAC written inline in the template it is compared as (`` `sha256=${createHmac(...)...}` === header ``), which was missed before. An input joined with a server value by any operator (`req.body + pepper`, `req.body ^ pepper`, a template carrying both) is not the caller's; an encoding argument (`.update(body, 'utf8')`) is not an input; a chain call other than `digest`, `toString`, `toLowerCase` or `toUpperCase` (`.concat(secret)`) is not a plain digest; and an imported object written to again in its module (`KEYS.api = process.env.KEY`, `Object.assign`, `delete`) is not a constant. - **πŸ› Fix** β€” no-timing-unsafe-compare keeps checking server code that shares a file with JSX The browser-code skip now leaves a file checked when it also holds server code: an exported Remix `loader` or `action`, a Next.js data or metadata function, a Next.js app-router file (a server component unless it says `'use client'`), or an inline `'use server'` action. A react import whose names are all `type` (`import { type FC } from 'react'`) no longer counts as browser code. And a plain digest of the request is the caller's only when every part of its input is: a binding that joins a server value (`const payload = req.body + pepper`) or an unknown call around the body now keeps the report. Session state read through the request (`req.session.apiToken`) is the server's, a local `String`, `JSON` or `Buffer` is not the built-in, and a literal and the body in separate `.update()` calls are judged together. - **πŸ› Fix** β€” no-timing-unsafe-compare checks a .tsx or .jsx file that renders no JSX The browser-code skip treated every `.tsx` and `.jsx` file as a UI component, so a request handler in a `.tsx` file (a Remix loader, or the case registry's `case.tsx`) compared `req.headers.authorization === apiKey` with no report. Seven registry cases regressed (ILB-0008, 0043, 0099 to 0102, 0104). The extension now counts only when the file renders JSX; a component built with the automatic JSX runtime still needs no import to be skipped. On the 40-app scan, the 30 browser-code reports stay skipped. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.3.1` ## 6.3.0 ### Minor Changes - **✨ Feature** β€” Add `no-modulo-biased-random` (strict): reports a byte from `crypto.randomBytes` or `getRandomValues` reduced with `%` to pick a character when the divisor does not divide the byte's range, which makes some characters of a generated secret more likely than others. ### Patch Changes - **πŸ› Fix** β€” Fix false positives found linting popular Node.js packages and Express/NestJS starters. - `no-zip-slip`: `zlib.createGzip()` / `createGunzip()` no longer make a file an archive file (a gzip stream has no entry names), so `path.join(this.dirname, this.filename)` in a log transport is not an archive entry. A bare `unzip(...)` call whose callee is bound to a relative module is the project's own code and is not an extraction. A member canonicalized in place by path-module calls, as a statement (`opts.path = path.resolve(path.normalize(opts.path))`), is not a join onto anything; any later read of it is judged on its own. The same join in a file that imports an archive library, a bare `unzip` imported from a package, a relative binding that is reassigned, two entries in one join, and an entry used as a join base still report. - `require-stream-error-handler`: an `'error'` listener at the end of a pipe chain (`src.pipe(dest).on('finish', f).on('error', h)`) covers `dest`, because `.pipe()` returns its destination. A destination built in place is covered by the listener that ends the chain. A stream binding returned by the function that owns it, assigned once (resolved by scope, not by name), is handed to the caller, who owns its listeners. A stream piped into and never returned, passed on or listened to still reports. - **πŸ› Fix** β€” `no-toctou-vulnerability`: `if (existsSync(p)) rmSync(p, { force: true })` is no longer reported. With a static `force: true` option, `rm`/`rmSync` (including `fs.promises.rm`) swallows ENOENT, so the check is redundant rather than racy. `rm` with `force: false`, without `force`, with spread options, and every other mutation (`unlinkSync`, `writeFileSync`, ...) still report. ## 6.2.1 ### Patch Changes - **πŸ› Fix** β€” no-unbounded-decompression accepts a payload an AEAD decipher authenticated nestjs/workflows inflates a payload only after `Buffer.concat([decipher.update(…), decipher.final()])` on an `aes-256-gcm` decipher with `setAuthTag`. `final()` throws unless the tag verifies, so a bomb needs the key. The whole chain is required: a node:crypto `createDecipheriv` with a literal GCM/CCM/OCB/ChaCha20-Poly1305 algorithm, `setAuthTag`, `final()` on the same decipher, and every write of the payload binding. - **πŸ› Fix** β€” no-unsafe-buffer-alloc accepts a ternary cap on a wire size `n <= MAX ? Buffer.alloc(n) : null` caps the size exactly as `if (n <= MAX) return Buffer.alloc(n)` does, and only the `if` spelling was recognised. The arm a ternary's test caps no longer reports `unboundedAllocation`; the other arm still does. - **πŸ› Fix** β€” no-unsafe-buffer-alloc reads `.length` of a declared Buffer or string as a size in memory nestjs/mail allocates `message.length * 2 + 5` for dot-stuffing a `message: Buffer`. That is at most twice what is already held, not a length prefix the peer wrote, but the name `message` decided it. The declared type (`Buffer`, `Uint8Array`, `ArrayBuffer`, `string`) is the evidence: an untyped or `any` value may be parsed JSON whose `length` field is any number, and still reports. - **πŸ› Fix** β€” skip test and spec files by default `no-unbounded-decompression` now skips test and spec files by default, matching `no-math-random-crypto`, `no-toctou-vulnerability` and `require-stream-error-handler`: its `allowInTests` option defaults to `true`, and `allowInTests: false` restores linting them. - **πŸ› Fix** β€” no-shell-injection lets a number-typed part into a command `execSync('taskkill /pid ' + pid + ' /T /F')` with `pid: number` (nestjs/nest-cli tree-kill.ts) has no injectable part: a number interpolates as digits. A part declared `: number`, coerced with `Number()`/`parseInt()`/`parseFloat()`, a unary expression, or a binary expression other than `+` (all numbers or booleans) no longer reports. A `number | string` union, an unannotated parameter, or a local function named `Number` still does. - **πŸ› Fix** β€” `require-storage-encryption` no longer reads written CONTENT as a credential name `namesACredential` matched a credential word anywhere in a string or template literal's text, including the _content_ being written to disk rather than a key or path naming it. A test stub that writes a fake CLI's JSON output β€” `writeFileSync(bin, \`#!/bin/sh\nprintf '{"usage":{"input_tokens":10}}'\n\`)` β€” contains "token" incidentally, inside prose that is printed, not stored, and was reported as an unencrypted credential write (CWE-312). Fixed by requiring a NAME to be a single token: no identifier, key or path segment contains whitespace, so a multi-word or multi-line string is evidence of what is printed, never of what is stored. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.2.0` ## 6.2.0 ### Minor Changes - **✨ Feature** β€” `require-emitter-error-handler`, and `require-stream-error-handler` reads `Readable.fromWeb` New rule `require-emitter-error-handler` (CWE-248). A `ClientRequest` or `ChildProcess` that emits `'error'` with no listener throws from the event loop, and a `try/catch` around the call or the `await` cannot catch it. The rule reports the value returned by `http.request`, `http.get`, `https.request`, `https.get`, `child_process.spawn` and `child_process.fork`, resolved by import provenance (default, namespace and named imports, aliases, `node:` specifiers, `require`), when no `.on('error')`, `.once('error')` or `.addListener('error')` is registered on it. Being the destination of `.pipe()` is not a listener. Two production crashes found on 2026-11-24 have this shape: parse-server's GraphQL file upload and Eleventy's `spawn('git', ...)` helper. It stays silent when the emitter escapes (returned, stored, or passed to any function other than as a pipe destination, which includes `events.once`, `stream.pipeline` and `finished`; that is the rule's ceiling). `exec` and `execFile` are not in the table: Node attaches its own `'error'` listener inside both, so they cannot crash this way, with or without a callback. Promisified forms resolve to no module. It is a separate rule, not an extension of `require-stream-error-handler`: that rule is triggered by a `.pipe()` and reads stream constructors by name, this one by the creation of an emitter resolved to its module, with or without a pipe. It is in `strict` and not in `recommended`; the corpus measurement a promotion needs has not been made. `require-stream-error-handler`: `Readable.fromWeb(body).pipe(dest)` reported the destination and never the source, because `fromWeb` was not a stream constructor. `Readable.fromWeb`, `Writable.fromWeb` and `Duplex.fromWeb`, resolved to `node:stream`, now count, and the report lands on the stream that emits. ## 6.1.5 ### Patch Changes - **πŸ› Fix** β€” no-dynamic-algorithm-selection no longer trusts a cast hidden under `satisfies` or inside a helper `(req.query.alg as 'sha256') satisfies 'sha256'` and a helper declared `: 'sha256' | 'sha512'` whose body returns `value as 'sha256'` both still report: the cast is erased at runtime. `as const` and a cast of a literal keep the exemption. - **πŸ› Fix** β€” `lock-file`: no longer reports a package published as a library (a `package.json` that is not `"private": true` and declares `main`, `exports` or `files`). npm never installs from a dependency's lock file, so libraries such as `express`, `body-parser` and `cors` ship without one on purpose. Apps, private packages and unparseable manifests still report. `require-secure-deletion`: no longer reports a `delete` (or `Reflect.deleteProperty`) on a local binding that holds a fresh shallow copy made with `{ ...source }` or `Object.assign({}, source)` and is never reassigned, the way code strips keys before passing options on. Deletes on the original object, a parameter, an alias or a reassigned binding still report. - **πŸ› Fix** β€” stop flagging three safe shapes found in NestJS's own code Each exemption is narrow, and a lookalike that is a real bug still reports. - `no-dynamic-algorithm-selection`: a value the compiler holds to a union of string literals (`satisfies`, a declared return type, or a same-file helper whose cast body is built only from literals and closed-typed parameters). A bare `req.query.algorithm as 'sha256'` still reports. - `no-timing-unsafe-compare`: an imported binding such as Nest's `REQUEST` DI token is not the request object. An imported function called with request data still reports. - `require-stream-error-handler`: `return src.pipe(dest)` hands `dest` to the caller, which attaches the error handler. A pipe returned from a callback still reports. - **πŸ› Fix** β€” `no-timing-unsafe-compare` no longer lets a `scheme` word mask an unrelated secret in the same identifier A `scheme`/`schemes` word in `nonSecretWords` used to exempt the WHOLE identifier from `secretPatterns` matching, so `schemeToken === req.body.value` was not reported even though `token` independently names a credential. The exemption now cancels only the `auth` pattern it pairs with (`auth_scheme_lower === auth_params.scheme`, the public prefix of an `Authorization` header), so a real secret compared next to a scheme word still reports (#1685). ## 6.1.4 ### Patch Changes - **πŸ› Fix** β€” Found linting open-source Node apps. - `no-timing-unsafe-compare`: a value the server holds compared with another value the server holds (`req.session.csrfSecret` against its own memo, a row of `req.user.sessions` against the current session id) is no longer reported. New detection: a configured secret (`process.env.*SECRET*`/`*KEY*`/`*TOKEN*`, or a secret property of an imported `config`) compared with a parameter or a constructor-supplied field is reported without a request in sight. Two secret names alone stay silent, as before. - `detect-eval-with-expression`: `new Function('s', 'return import(s)')` is skipped. ## 6.1.3 ### Patch Changes - **πŸ› Fix** β€” Fix false positives found linting popular Node.js packages. - `no-unsafe-buffer-alloc`: a buffer filled by `fs.read(fd, buf, 0, n, pos, (err, bytesRead) => buf.slice(0, bytesRead))` is recognised in the callback spelling, as the synchronous and promise spellings already were, provided the callback's third parameter (which aliases the whole buffer) is absent or never read; and `count === buf.byteLength ? buf : buf.subarray(0, count)` after a `readSync` hands out the whole buffer only on the arm where the read filled it. A callback that reads its third parameter, a callback that hands out the whole buffer, and the unmatched arm of the length test still report. - `no-deprecated-buffer`: `new Buffer(...)` in the branch of a feature check that only a runtime without `Buffer.alloc` / `Buffer.allocUnsafe` / `Buffer.from` takes is not reported. The same call in the branch that runs where the API exists, behind an unrelated test, or with no check still reports. - `no-buffer-overread`: the `noAssert` argument is recognised on `Buffer`'s numeric accessors only (`readUInt32LE`, `writeDoubleBE`, `readUIntBE`...). `writeFileTo(path, data, true)` is an `overwrite` flag, not `noAssert`. - **πŸ› Fix** β€” Fix four false positives found linting popular Express/NestJS packages. - `no-timing-unsafe-compare`: an auth-scheme word (`auth_scheme`, `scheme`) is a public header token, not a secret, and a value bound through a chained assignment (`var id = req.sessionID = read(req)`) is now read as coming from the request, so two client-held copies of one session id are no longer reported as a secret comparison. A real token or HMAC compared with `===` still reports. - `no-arbitrary-file-access`: a hand-written prefix-containment guard (`(p + sep).substr(0, root.length) !== root`, or its `slice` / `substring` spelling, against a root that provably ends at a separator) is recognised like `startsWith`, and a reject block may log before it returns. An unguarded `readFile(req.query.path)` still reports. - `detect-eval-with-expression`: a discarded `new vm.Script(source)` inside a `try` whose `catch` tests `instanceof SyntaxError` is a syntax probe, not code execution. A script that is kept, chained to `.runInContext`, or has no such handler still reports. ## 6.1.2 ### Patch Changes - **πŸ› Fix** β€” two false positives found by linting Vite `detect-eval-with-expression` no longer reports `Function('return this')()`, the portable global-object probe (also `return globalThis`, with an optional strict-mode prologue). It has a fixed body and no parameters. Any other literal body, and anything assembled at runtime, still reports. `no-math-random-crypto` no longer reports a binding whose name is an everyday identifier word (`hash`, `key`, `code`) when every read of it lands in a file name, such as a timestamped temp-file suffix: a path argument of a `path.*` or `fs.*` call (not file content), or a template that ends up in one or in a file-named binding (a `.ext` suffix alone, as in an HMAC key, is not enough). A strong secret name (`token`, `salt`, `nonce`, ...), a binding also used for anything else, and a binding nothing reads still report. ## 6.1.1 ### Patch Changes - **πŸ“š Docs** β€” Getting Started now leads each plugin README, with the ESLint install line and a flat config that loads The install block was below the Description and the doctrine, and on 17 of the 31 plugins there was no flat-config snippet on the page at all. `eslint-plugin-secure-coding`'s README showed `...securePlugin.configs.recommended`, which throws `TypeError: ... is not iterable` when pasted, because `configs.recommended` is one object. Every plugin README now opens with `npm install --save-dev eslint ` and `import { configs } from ''` and `export default [configs.recommended]` in an `eslint.config.mjs`, then the Description. A test now loads that snippet in ESLint for every plugin. The star banner above the first heading, the footer block with the star counter and the Dev.to ask are replaced by one `## Support` paragraph at the end: report a false positive, or star the repo if the plugin helped. `eslint-plugin-import-next` opens with its drop-in grade, read from the newest `benchmarks/results/ilb-import-parity` result with its date: passes 2,035 of 2,135 (95.3%) of eslint-plugin-import 2.32.0's own test cases, measured 2026-11-19. Eight taglines now say what the plugin flags instead of "security rules for X" (secure-coding, node-security, browser-security, nestjs-security, express-security, vercel-ai-security, react-a11y, import-next). `eslint-plugin-node-security` adds one proof line: the public repositories that list it, with the date they were checked. ## 6.1.0 ### Minor Changes - **πŸ› Fix** β€” `no-math-random-crypto` reads a security value from the slot it lands in A draw is now reported when the call names the slot with a string literal (`headers.set('X-SRF-TOKEN', ...)`, `res.setHeader`, `res.cookie`, `localStorage.setItem`, `url.searchParams.set('nonce', ...)`, `{ 'X-CSRF-Token': ... }`) and when it is the OAuth `state` of an authorization request (after `state=` in a URL, a `state` query parameter, or an object with `client_id` / `redirect_uri` / `response_type` / `scope`). `state` alone still decides nothing. Also no longer reported: a `.sort(() => Math.random() - 0.5)` shuffle, and keys qualified as `dom`, `element`, `node`, `item`, `list`, `child`, `component`, `render`, `data` or `color`. ## 6.0.7 ### Patch Changes - **πŸ“š Docs** β€” ship an AGENTS.md that tells AI assistants how to enable the plugin and what each preset catches Generated from the package's own presets and rules, so it cannot drift. `eslint-plugin-secure-coding`: the README no longer shows `...configs.recommended` spread into an array, which threw "not iterable". ## 6.0.6 ### Patch Changes - **πŸ› Fix** β€” no-timing-unsafe-compare drops dead separator spellings of the token compounds `api_token`, `x-session-token` and similar already match the whole-word `token` default, because a separator is a word boundary. So the `_` and `-` spellings of `apiToken`, `sessionToken`, `idToken` and `csrfToken` (added in PR 1581, not yet published) matched nothing the rule did not already match. The camelCase compounds stay: they catch a lowercase `apitoken`. No behaviour change. ## 6.0.5 ### Patch Changes - **πŸ“š Docs** β€” eight doc defects found by Codacy's reviewer, and every doc's CWE and severity now match the rule Codacy renders these docs from the release tag (codacy/codacy-eslint#5025). - `no-unsafe-buffer-alloc`: a one-argument `copy`/`set`/`write` from a source shorter than the buffer leaves the tail uninitialized. The rule accepts it as covering; that is now documented as a known false negative, and the safe examples size from the source or send only `buf.subarray(0, written)`. - `no-toctou-vulnerability`: the suggested fix was `access()` then `readFile()`, the race itself. It is now one `open` (with `O_NOFOLLOW` or `'wx'` as the case needs) and an `ENOENT` handler. - `no-ssrf`: the safe example allowlisted a hostname and never checked where it resolved. It now resolves, rejects private, loopback and link-local addresses, and pins the socket to the checked address. - `detect-non-literal-fs-filename`: `startsWith(baseDir)` accepted `/safe-dir-evil`. Containment is now `path.relative`-based, with a realpath check for symlinks. - `no-static-iv`: the AES-GCM example dropped the auth tag. It now stores `getAuthTag()` with the nonce and calls `setAuthTag()` on decrypt. - `detect-child-process`, `detect-non-literal-fs-filename`, `no-buffer-overread`, `no-zip-slip`: a template `CWE-693` header replaced by the rule's CWE. Front-matter `cwe` and `severity` now match each rule's meta and CVSS band across all node-security docs. - `lock-file`: "npm, yarn, or npm" now reads "npm, yarn, or pnpm", the schema's enum. - **πŸ› Fix** β€” three false positives found scanning the MCP TypeScript SDK examples and tolaria - `no-timing-unsafe-compare`: a secret pattern shorter than six letters (`token`, `auth`, `hash`, `jwt`, …) now matches only as a whole word of the identifier, so `grantedMaxTokens === params.maxTokens` (a count of LLM tokens) is no longer a timing oracle. `accessToken`, `x_auth_token` and `JWTValue` still match; `authorization` and lowercase-safe compounds (`apiToken`, `sessionToken`, `idToken`, `csrfToken`) are default patterns of their own. A pattern with regex syntax keeps substring semantics. - `no-unsafe-buffer-alloc`: `Buffer.allocUnsafe(n)` filled by `fs.readSync(fd, buf, 0, …)` or an awaited `handle.read(buf, 0, …)` on a handle from `fs/promises` `open()`, whose count is never rewritten, and then read only through `subarray(0, count)`, `slice(0, count)` or `toString(enc, 0, count)` is no longer reported β€” the uninitialized tail is never looked at. Any other read, bound or offset still reports. - `no-dynamic-command-string`: a parameter of a file-local, unexported function whose every call passes a string literal (`commandPath('axe')`) is treated as a constant, like a `const`. `no-shell-injection` does not follow parameters, and its docs now say why. ## 6.0.4 ### Patch Changes - **πŸ“š Docs** β€” npm descriptions lead with what people search for Each description now opens with the search phrase, such as "ESLint NestJS security rules β€” …" instead of "ESLint plugin for NestJS security β€” …". npm search ranks that opening phrase above download counts, so the old wording kept these packages out of the results for searches like "eslint security". The oxlint-plugin-* aliases open the same way, with "Oxlint". No rule or code changes. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.0.4` ## 6.0.3 ### Patch Changes - **πŸ› Fix** β€” `detect-non-literal-fs-filename` reads `/* global */` directives the way ESLint does Names may be separated by whitespace as well as commas, a `-- justification` is ignored, `: off` removes a global, and a later directive overrides an earlier one. ## 6.0.2 ### Patch Changes - **πŸ› Fix** β€” `detect-non-literal-fs-filename` honours `/* global NAME */` declarations under oxlint too. A path built from a declared global (configuration the environment provides) was silent under ESLint and reported under oxlint, whose scope manager does not read the comment. ## 6.0.1 ### Patch Changes - **🧹 Chore** β€” complete the npm metadata in every package manifest Every manifest declares `"sideEffects": false`; no module changes state outside itself when it is loaded, so a bundler may drop what it does not use. The `funding` field is removed: it pointed at the source repository, not at a funding page, so `npm fund` led nowhere useful. Each `oxlint-plugin-*` alias also declares an `exports` map (`.` and `./index.js`, each with `types` first, and `./package.json`); every path that resolved before still resolves. No code changes. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.0.1` ## 6.0.0 ### Major Changes - **πŸ’₯ Breaking** β€” requires Node 22.13 or later; Node 18 and 20 are end-of-life `engines.node` is now `>=22.13.0` (was `>=18.0.0`). Node 22.13, 24 and 26 are the versions tested. Stay on the previous major if you cannot leave Node 18 or 20 yet. ## Migration Run your linter on Node 22.13 or later, or pin the previous major until you can: ```sh # Before: any Node 18+ node --version # v20.x # After: Node 22.13+ (24 and 26 are also tested) nvm install 22 && nvm use 22 # or 24, or 26 ``` Nothing in your ESLint or oxlint config changes. ### Patch Changes - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@2.0.0` ## 5.8.4 ### Patch Changes - **πŸ“š Docs** β€” README rule counts match the shipped rules (browser-security 46, node-security 43, lambda-security 14). Republishes so the npm page stops showing the old numbers. No rule or config changes. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.21.2` ## 5.8.3 ### Patch Changes - **πŸ› Fix** β€” `no-insecure-rsa-padding` and `no-unsafe-buffer-alloc` read the value, not the spelling - `no-insecure-rsa-padding` reports PKCS#1 v1.5 padding held in a `const` or passed as a shorthand `{ padding }`. - `no-unsafe-buffer-alloc` treats only an upper bound that rejects the request as a guard. A lower bound (`size > 0`), a check that does not leave, a guard after the allocation, and a cap the peer chooses no longer silence it. - `no-dynamic-require` documents its `allowPatterns` option. ## 5.8.2 ### Patch Changes - **πŸ› Fix** β€” sinks are found by resolving the import, not by name Checked against a Quint model of each rule's documented contract (`npm run fidelity`) and by Stryker mutation testing. Rules now resolve `crypto`, `fs`, `child_process` and friends through their import. So a renamed or destructured import (`import { createCipheriv as x }`, `const { exec: run } = require('node:child_process')`) is reported, and a local object that merely shares the name (`const fs = {...}`) is not. Lines that a rule's doc lists as "Not a finding" are no longer reported. `lock-file` reports a missing lock file on every lint run in a long-lived process, not once per process. ## 5.8.1 ### Patch Changes - **πŸ› Fix** β€” `no-weak-hash-algorithm` reports `createHash('sha-1')` Node accepts `'sha-1'` and `'SHA-1'` for the same digest as `'sha1'`, but the pattern only matched the unhyphenated spelling, so a password hashed with `createHash('sha-1')` was not reported. Found by the Quint fidelity check (`npm run fidelity`). Also from the devkit resolver fix: `detect-non-literal-fs-filename` now sees `const { promises: { readFile } } = require('fs')` and an object rest of `fs`, and `no-unbounded-decompression` sees an object rest of `zlib`. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.21.1` ## 5.8.0 ### Minor Changes - **✨ Feature** β€” `reportLiteralComparands` option for `no-timing-unsafe-compare`; a bare `eval()` no longer reports `no-timing-unsafe-compare` has a new option, `reportLiteralComparands` (boolean, default `false`). With it on, a secret-named value compared against a string literal reports in either order, on the name alone: `password === 'mypass'` and `'mypass' === password`. This matches `eslint-plugin-security`'s `detect-possible-timing-attacks`. It is off by default because a string comparand is usually a tag rather than a secret (`revokedToken === 'access'`), so existing configs report exactly what they did before. `detect-eval-with-expression` no longer reports `eval()` called with no argument. There is no string, so nothing can run. `eval(userInput)` still reports. - **✨ Feature** β€” every rule runs natively on oxlint and Vite+, published as `oxlint-plugin-` too - **`oxlint-plugin-`**: each plugin now has an oxlint-native twin on npm, for installs from oxlint or Vite+ (`lint.jsPlugins: ['oxlint-plugin-']` in `vite.config.ts`). It re-exports the same rules under the same `/` IDs, at the same version, and does not install ESLint. - **`createOnce`**: 457 of 473 rule definitions are written in oxlint's `createOnce` shape, with per-file state reset in `before()`. ESLint runs the same rule object through a `create` the devkit derives from it, so ESLint behaviour is unchanged: every existing test passes, and oxlint parity on the benchmark corpus stays at 100% (3,932 shared findings, none on one engine only). The remaining 16 are listed, with reasons, in `.agent/create-rule-allowlist.json`. - **`meta.interop.runtimes`**: every rule now states where it is known to behave identically. `['eslint', 'oxlint']` means its own test suite passes on oxlint's RuleTester as well as ESLint's, and the tests enforce that on every run; type-aware rules stay `['eslint']`. The ESLint-only rules and the reason for each are listed in `docs/oxlint-runtimes.md`. ### Patch Changes - **πŸ› Fix** β€” ESLint is now an optional peer, so oxlint and Vite+ installs stop pulling it in npm 7+ installs a required peer automatically. Every plugin, and the shared devkit, declared `eslint` as a required peer, so installing a plugin for oxlint or Vite+ installed ESLint as well. Measured 2026-10-25: `npm i eslint-plugin-postgresql-security` added 79 packages, eslint@10.13.0 among them; with the peer skipped it added 2. The peer is now marked optional. npm still checks the version range whenever ESLint is installed, so ESLint users see no change. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.21.0` ## 5.7.0 ### Minor Changes - **✨ Feature** β€” `detect-non-literal-fs-filename`: new opt-in option `reportWholeProcessValues` (default `false`). Set to `true`, the rule reports a `process.argv` / `process.env` value used as the whole path, e.g. `fs.readFileSync(process.argv[2])`. That matches `eslint-plugin-security`'s rule of the same name, so a drop-in for it loses no finding. The default is unchanged: whoever sets argv or the environment already chooses which files the process opens. ## 5.6.12 ### Patch Changes - **πŸ› Fix** β€” `resolveModuleBinding` resolves a static computed destructuring key: `const { ['promises']: fsp } = require('node:fs')` names `fs.promises` like `{ promises: fsp }` does. A runtime key (`{ [k]: v }`) still abstains. node-security's `no-arbitrary-file-access`, `no-static-iv` and `no-unbounded-decompression` now report that spelling; cli-floor drops its local copy of the same resolution. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.20.1` ## 5.6.11 ### Patch Changes - **πŸ› Fix** β€” close the FP/FN policy gaps left open by the 2026-10-18 audit - `lock-file` stops its upward search at the repository root (the nearest ancestor holding `.git`, a directory or a worktree/submodule file). A stray `~/pnpm-lock.yaml` no longer satisfies every project under the home directory. With no `.git` above the file, the search still runs to the filesystem root. - `no-shell-injection` reports `exec(cmd + args)` β€” a `+` between non-literal operands β€” the shape its own message cites. Operands that all fold to literals in the file stay quiet. - `detect-child-process` allowlist guards clear only the value they check: `if (!BRANCHES.includes(branch)) return; execFile('git', ['push', remote, branch])` reports the unchecked `remote`. `includes()` / `has()` count only on a constant allowlist (an array or `Set` literal, or a `const` bound to one); the enclosing-`if` and early-exit (`return` / `throw` / `continue` / `break`) forms agree, including an `else` branch and a guard in an outer block; a positive check that falls through validates nothing. `cp[m](cmd)` with `const m = 'exec'` is the `exec` sink. `reportUnresolvedCommands` no longer reports a fully literal `execSync('npm ci', { stdio })` or `exec('ls', callback)`. - `no-zip-slip` accepts the canonical guard β€” `const p = path.resolve(dest, entry.name); if (!p.startsWith(dest + path.sep)) throw …;` then `p`, and the `path.relative()` spelling β€” and a guard clause before the join. A join inside the branch where the check failed is reported. `@safe` covers the statement directly below it (block or line comment), not the whole file. - `no-arbitrary-file-access` treats `fs.promises.*`, `fs/promises` (default, namespace or named imports, `require('fs').promises`) and `fs` under any local name as file-system sinks; follows a later assignment (`let f; f = req.query.x; fs.readFileSync(f)`); and stops trusting a `safePath`-style parameter name when a caller in the same file passes request input straight into it. - `no-weak-hash-algorithm` reports a weak digest compared with `===` / `!==` against a signature/token/hmac/mac/digest-named value (`if (signature === createHash('md5')…digest('hex'))`). The bare-helper `sha256(...)` suggestion is offered only when a `sha256` is callable there, so a file's own `sha1()` helper is no longer rewritten to call an undefined function. ## 5.6.10 ### Patch Changes - **πŸ› Fix** β€” wrong verdicts surfaced by Stryker mutation testing (batch 1) - `no-self-signed-certs` reports `globalThis.process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'` and the template-literal spelling `` = `0` ``. Both disable certificate verification exactly like `process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'`, which was already reported. - `no-toctou-vulnerability` no longer reports `if (!fs.existsSync(dir)) fs.mkdirSync(dir, { 'recursive': true })`: a quoted `recursive` key is the same idempotent option as the unquoted one, which was already exempt. - `no-toctou-vulnerability` reports the `fs/promises` spelling of stat-then-use: `const st = await stat(p); if (st.isFile()) await unlink(p);`. The awaited `stat` / `lstat` result was never recognised as a Stats object. - `no-unsafe-dynamic-require` tracks the loader returned by `module.createRequire(import.meta.url)` (the `node:module` default import), as it already did for a bare `createRequire(...)`. - `detect-child-process` reads a quoted or computed `shell` key: `spawn('ls', ['--', dir], { 'shell': true })` runs through `/bin/sh` exactly like `{ shell: true }`, and is now judged as a shell call. - `detect-child-process` resolves a quoted or computed key in a destructured require: `const { 'exec': run } = require('child_process'); run(req.query.cmd)` is now reported like `{ exec: run }`. - `no-arbitrary-file-access` follows a path destructured from the request: `const { file } = req.query; fs.readFileSync(file)` is now reported like `const file = req.query.file`. - `no-arbitrary-file-access` no longer treats a `path.join` as sanitised because one argument is a `path.basename()` result: `path.join(UPLOAD_ROOT, req.query.folder, name)` escapes the root with `folder = '../../etc'`, and is now reported. A join whose request-derived parts all go through `basename` stays silent. - `no-timing-unsafe-compare` reads a `#private` field like a public one: `this.#apiToken === req.query.t` is now reported like `this.apiToken === req.query.t`. - `no-math-random-crypto` no longer reads a draw inside a block-bodied arrow as that arrow's value: `const authRetry = setInterval(() => { delay = Math.random() * 1000; })` and an `async (req, res) => { await sleep(Math.random() * 100); }` handler named after auth are silent, as the `function () {}` spelling already was. ## 5.6.9 ### Patch Changes - **πŸ› Fix** β€” `no-unbounded-decompression` resolves zlib bindings through scope The rule now reports uncapped decompression reached through an inline `require('node:zlib').gunzipSync(...)`, `await import('node:zlib')` (namespace or destructured), a TypeScript `import zlib = require('zlib')`, and a decompressor destructured from a zlib namespace import. It no longer reports a function parameter that shadows an imported `gunzipSync`. ## 5.6.8 ### Patch Changes - **πŸ› Fix** β€” path guards no longer leak across functions; destructured `basename`/`sep` recognised `no-arbitrary-file-access` kept its `path.basename()` and `startsWith()` state per variable NAME for the whole file, so `const p = …; if (!p.startsWith('/safe/')) throw …` in one function silenced an unguarded `const p = req.query.g; fs.readFileSync(p)` in another. The state is now keyed on the scope variable. The `startsWith()` guard is also matched on the AST instead of the source text: it must be `!.startsWith(…)` with a throw/return, placed before the sink, so a guard after the read, or `file` matching inside `other.startsWith('/files/')`, no longer counts. The prefix must also be separator-anchored (`'/safe/'`, `base + path.sep`, `` `${base}/` ``): `'/safebad/x'.startsWith('/safe')` is true, so an unanchored guard is reported, matching `detect-non-literal-fs-filename`. An inline `path.join('/uploads', path.basename(req.query.f))`, the mitigation the docs recommend, is no longer reported. `detect-non-literal-fs-filename` now accepts `import { basename, sep } from 'node:path'` the way it already accepted `path.basename` and `path.sep`. ## 5.6.7 ### Patch Changes - **πŸ› Fix** β€” `detect-child-process` no longer treats `process.execPath` or `process.pid` as attacker input. `process` is a taint root because of `process.argv` and `process.env`, but the shared taint reader followed every `process.` back to that root. So `spawnSync(process.execPath, ['-e', CONSTANT])` and ``execSync(`kill -0 ${process.pid}`)`` were reported as CWE-78 command injection, while the same call spelled with `'node'` was silent. Values the runtime fixes (`execPath`, `pid`, `ppid`, `platform`, `arch`, `version`, `versions`, `release`, `config`, `features`) are no longer taint. Every other property, including `argv`, `env`, `execArgv` and `title`, still is. ## 5.6.6 ### Patch Changes - **πŸ› Fix** β€” detect-non-literal-fs-filename resolves const path bindings through scope, not by name. The binding table was a file-wide `Map` keyed on the bare identifier, so the last `const` of a given name in the file won everywhere. Two consequences, both measured: a path composed entirely of literals was reported as CWE-22 because an unrelated `const p` appeared later in the file, and β€” the serious direction β€” a genuine path traversal went silent when any later `const` of the same name existed, including a top-level one in a function containing no fs call at all. `reportUnresolvedPaths` could not recover the silenced finding, because the path did resolve; just to the wrong initialiser. Bindings are now resolved through ESLint's scope analysis, which is what this plugin's README already promises. The one-hop and `const`-only restrictions and the `Program:exit` deferral are unchanged. Also fixes a crash: a `for (const x of …)` head is a `const` declarator whose `init` is `null`, and asserting it non-null passed `null` into the taint walker, which threw `TypeError: Cannot read properties of null` and aborted the entire lint run rather than reporting anything. - **πŸ› Fix** β€” `no-zip-slip`: recognise the entry-path join when `join`/`resolve`/`relative`/`normalize` is imported by name β€” `import { join } from 'node:path'` (also `path`, `path/posix`, `node:path/posix`, renamed specifiers) or `const { join } = require('path')`. Previously only the member form `path.join(dest, entry.name)` reported, so ESM code extracting archives was silent. The callee is resolved through its import binding, so a locally defined `join` still does not report. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.19.7` ## 5.6.5 ### Patch Changes - **πŸ› Fix** β€” `no-dynamic-require` resolves the loader instead of matching the name `require` A binding from `module.createRequire()`, plus `module.require`, `require.main.require` and the `(0, require)` idiom, all load a specifier and were all invisible. The rule also documents its largest false-negative class: `no-weak-hash-algorithm`'s ❌ examples now fire under the default options, and unclassified hashes are described as the deliberate trade they are. ## 5.6.4 ### Patch Changes - **πŸ› Fix** β€” `no-deprecated-cipher-method` β€” correct the report path on a computed subscript. fix: `no-deprecated-cipher-method` β€” correct the report path on a computed subscript. The detection gate reads the property through the computed-aware `propertyName()`, but the report path re-read it as `(property as Identifier).name`, which is `undefined` on a Literal β€” so `crypto['createCipher'](...)` produced the message `crypto.undefined()`, offered `createDecipheriv` (the DECRYPTION constructor) for an encryption call, and emitted a suggestion that dropped the quotes and referenced an identifier resolving nowhere. The stale "Known False Negatives" entry claiming this form is undetected is corrected to describe the gap that does remain β€” a genuinely runtime-chosen key. ## 5.6.3 ### Patch Changes - **πŸ› Fix** β€” two documented-contract violations found by the burgee FP/FN sweep - `node-security/no-arbitrary-file-access` now reports whole-value `process.argv` and `process.env` paths. `detect-non-literal-fs-filename`'s docs hand this shape here by name ("that is `no-arbitrary-file-access`'s question, not this rule's"), and neither rule was reporting it, so a documented handoff landed nowhere. - `import-next/no-cycle` gains a `verbatimModuleSyntax` option (default `false`). Under that TypeScript flag an inline `import { type Foo }` is emitted as `import {} from './foo.js'` rather than erased, so the target module is still evaluated and the cycle is real. The rule skipped those edges on the stated premise that `verbatimModuleSyntax` projects write statement-level `import type`; TS1484's own quick-fix offers the inline form instead. ## 5.6.2 ### Patch Changes - **πŸ› Fix** β€” a TypeScript type assertion no longer blanks the two CWE-22 path rules `detect-non-literal-fs-filename` and `no-arbitrary-file-access` no longer go silent when a TypeScript type assertion sits on the tainted value. Both rules roll their own taint walker, each a `switch` on `node.type` falling through to `default: return false`, and neither had an arm for any TS-only wrapper β€” so `as`, `!`, `satisfies` and angle-bracket assertions all blanked the rule. That is not an exotic spelling: `process.env.X` is `string | undefined` under `strict`, so `'/etc/app/' + (process.env.NAME as string)` is the dialect TypeScript forces, and it went quiet while the docs' own worked example β€” the same line without the cast β€” is annotated "reported". The gap covered every composition form the docs name (`+`, template literal, `path.join`), and for `no-arbitrary-file-access` it also swallowed the bare whole-value form that is the rule's own Incorrect example. Both walkers now unwrap through the devkit's `unwrapTypeSyntax`, already used by the shared `makeReadsTaintSource` and seven other rules. Assertions are erased at compile time; the runtime was always byte-identical to the reported control. - **πŸ› Fix** β€” `no-weak-hash-algorithm` missed the `WithRSAEncryption` aliases of MD5 and SHA-1 `crypto.getHashes()` ships `md5WithRSAEncryption` and `sha1WithRSAEncryption`, and both return output byte-identical to bare `md5`/`sha1` β€” they are the broken digest, not a signature curiosity. `/\bmd5\b/` and `/\bsha1\b/` could not reach them because `5`β†’`W` and `1`β†’`W` are word-char to word-char. The rule was inconsistent with itself as a result: `RSA-MD5` already reported, because the hyphen supplies the boundary, and `ripemd160WithRSA` already reported, because the RIPEMD entry had this exact defect fixed previously. Both patterns now accept the suffixed alias. Verified against all 25 `WithRSA`/`RSA-` digests in `getHashes()`: only the two intended names are newly matched, and no SHA-2/SHA-3 variant is touched. - **πŸ› Fix** β€” `no-weak-cipher-algorithm` reported only the Triple-DES spellings Node rejects The rule matched `3des` and `tripledes` β€” neither of which is in `crypto.getCiphers()`; both throw `ERR_CRYPTO_UNKNOWN_CIPHER` before encrypting anything β€” while staying silent on `des3` and `des3-wrap`, which Node does ship and which encrypt successfully. So the only spellings that could ever be a real CWE-327 vulnerability were the only ones going unreported. The cause is a word boundary: `/\bdes\b(?!-ede)/` cannot reach `des3` because `s`β†’`3` is word-char to word-char, and the 3DES pattern required the literal `-ede`. The pattern now also accepts the `des3` form. Checked against all 51 names in `crypto.getCiphers()`: exactly two verdicts change, both genuinely Triple-DES, and no secure cipher is newly flagged. - **πŸ› Fix** β€” `no-zip-slip` no longer reports a bare ambiguous extractor that extracts nowhere `no-zip-slip` applied its `AMBIGUOUS_EXTRACTORS` disambiguation only to method callees. A bare identifier β€” which carries strictly LESS evidence, having no receiver to name an archive at all β€” skipped the check entirely and reported unconditionally, at CWE-22 / CVSS 7.5 / HIGH. So `const out = untar(buf)`, a pure in-memory call that takes no destination, imports no `fs` and writes nothing, was a HIGH severity path-traversal finding, while the same call renamed `extract(buf)` stayed silent because a hardcoded safe-library list happens to contain `extract`. The asymmetry was accidental and nothing in the docs predicted it. The documented harm requires a place to write: Zip Slip "allows an attacker to create files outside of the intended extraction directory". A call naming no directory creates nothing. An ambiguous bare extractor now needs a destination argument before it reports; unambiguous names (`extractAllTo`, `extractArchive`) are unaffected, and `unzip(file, dest)` still reports. Found by the burgee FP/FN sweep at `packages/compat-oracle/src/tar.ts:103`, where burgee had already written an `eslint-disable` for it β€” the sweep now reports that directive as unused. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.19.5` ## 5.6.1 ### Patch Changes - **πŸ› Fix** β€” `no-shell-injection` now reports `spawn`/`spawnSync`/`execFile`/`execFileSync` when a truthy `shell` option routes an interpolated command string through `/bin/sh`. The rule matched only `exec`/`execSync`, so the shape its own docs print as incorrect β€” ``spawn(`tar -xzf ${archivePath}`, { shell: true })`` β€” went unreported by every rule in the plugin. Without a `shell` option these functions stay silent, since an interpolated program name is CWE-114 and belongs to `detect-child-process`. ## 5.6.0 ### Minor Changes - **πŸ› Fix** β€” `no-weak-hash-algorithm` sees `ripemd160`, not just `ripemd` The pattern was `/\bripemd\b/i`. There is no word boundary between `d` and `1`, so it could not match `ripemd160` β€” the canonical spelling, and the one the rule's own docs use in their ❌ Incorrect block: ```ts const ripemdHash = crypto.createHash('ripemd160').update(data).digest('hex'); ``` `crypto.getHashes()` ships this digest under five names: `ripemd`, `ripemd160`, `rmd160`, `RSA-RIPEMD160` and `ripemd160WithRSA`. The old pattern matched the bare alias and the hyphenated `RIPEMD-160`, and missed `ripemd160`, `rmd160` and `ripemd160WithRSA`. The sole locking test used `createHash("ripemd")`, which is why the gap survived β€” that spelling is real, so this was a coverage hole rather than dead code. **This rule now reports where it did not before**, at every option setting including `reportUnclassifiedHashes`. RIPEMD-160 has no practical collision attack, so the impact is lower than an MD5 or SHA-1 miss, but the rule advertises RIPEMD coverage in its description and demonstrates it with the one spelling it could not see. ## 5.5.0 ### Minor Changes - **✨ Feature** β€” detect Diffie-Hellman and ECDH parameters below a safe strength New rule `no-weak-dh-parameters` (CWE-326), error in `recommended`. The plugin declares `crypto` as part of its target surface and had no rule that named a single Diffie-Hellman API. `createDiffieHellman`, `createDiffieHellmanGroup`, `getDiffieHellman`, `diffieHellman` and `createECDH` appeared nowhere in its sources while the published API-surface coverage figure said 70% β€” a figure that turned out to be a hand-typed constant rather than a measurement. A _named_ Diffie-Hellman group is a fixed prime, so the expensive part of breaking it is paid once and then every session using that group falls cheaply. That is Logjam (CVE-2015-4000): `modp1` is 768-bit and `modp2` is 1024-bit. Reports three argument shapes, each resolved through at most one `const` alias so that naming the parameter does not hide it: - `getDiffieHellman(name)` / `createDiffieHellmanGroup(name)` β€” MODP group below `minPrimeBits` (default 2048) - `createDiffieHellman(bits)` β€” numeric prime length below the floor - `createECDH(curve)` β€” a curve with a field size under 224 bits Deliberately silent on an unrecognised group name (a future RFC group must not become a finding by being unknown), on the `createDiffieHellman(prime, encoding)` overload (that prime is chosen elsewhere and reading it is not something a structural rule can do), and on a computed name. Configurable via `minPrimeBits`, `additionalWeakCurves` and `allowInTests`. ## 5.4.4 ### Patch Changes - **πŸ› Fix** β€” The README logo now links to the plugin's own documentation. Every plugin README opens with the Interlace logo, and it linked to the site root β€” so the most obvious thing to click on the npm page dropped the reader on a landing page and left them looking for the plugin they were already reading about. Both the header and footer logos now point at that plugin's docs page. The oxlint and ESLint logos still link to oxc.rs and eslint.org, which is where those belong. No rule behaviour changes. ## 5.4.3 ### Patch Changes - **πŸ› Fix** β€” A computed or quoted property key is still the same property. Eight sites across seven rules read a key through `X.key.type === Identifier` before touching `X.key.name`, so `{ ['shell']: true }` and `{ 'shell': true }` named nothing while `{ shell: true }` named the same property. All eight now use `objectKeyName`, which returns an Identifier's name only when the key is not computed, and any statically-known string otherwise. `detect-non-literal-fs-filename` needed more than the helper. A `prop.computed` bail sat before the key was ever read, so a destructured require was matched in two spellings and missed in the third: const { readFile } = require('fs') reported const { 'readFile': read } = require('fs') reported const { ['readFile']: read } = require('fs') silent The third now reports. A key chosen at runtime β€” `const { [k]: read }` β€” still names nothing readable and is still skipped. `detect-child-process` also stops missing the template spelling of the argv separator: ``spawn(cmd, [`--`])`` passes the same separator as `spawn(cmd, ['--'])`. Three rules are fully clear of the subscript blind spot as a result: `detect-non-literal-fs-filename`, `no-insecure-rsa-padding` and `no-self-signed-certs`. The remaining seven carry a second gate and are tracked separately. ## 5.4.2 ### Patch Changes - **πŸ› Fix** β€” `md5(user['password'])` weighs the same evidence `no-weak-hash-algorithm` decides whether a weak hash is being used on a credential from the name of the value being hashed, and read that name on the dotted spelling only β€” so a subscripted field carried no evidence and the finding was dropped. A destructuring target still names no single field, and is pinned as such. - **πŸ”— Dependencies** β€” updated workspace dependencies: `@interlace/eslint-devkit@1.19.2` ## 5.4.1 ### Patch Changes - **πŸ“š Docs** β€” detect-non-literal-fs-filename records why its own `safePattern` looks like a false positive `path.resolve(SAFE_DIR, path.basename(userInput))` β€” the remediation this rule prints β€” reports when it is probed as a fragment with `SAFE_DIR` declared nowhere. That reads as the rule rejecting its own advice, and the fix it suggests (weakening the `path.basename` sanitiser) is one the rule's header already documents as an edit that looks correct and is not. Measured: the report is `containsFreeVariable` firing on the undeclared name, not taint surviving the `resolve` wrapper. The discriminator is a snippet with no taint at all β€” ```js fs.readFileSync(path.resolve(SAFE_DIR, 'notes.txt')); // undeclared SAFE_DIR β€” still reports ``` Declare or import `SAFE_DIR` and the remediation is accepted verbatim. No behaviour change. The header block gains the entry, and `path-guards.test.ts` pins both directions β€” two valid cases for the remediation (declared base and imported base) and the literal-second-argument CONTROL above β€” each mutation-verified to fail when the mechanism it covers is reverted. - **πŸ› Fix** β€” require-dependency-integrity renders a tagged template whole `@typescript-eslint` 8.68.0 changed `TemplateElement.value.cooked`: 8.54.0 typed it `string` and emitted the RAW text for an escape it could not cook, 8.68.0 types it `string | null` and emits `null`. Both directions were verified against a real 8.54.0 install, not read off a changelog. `require-dependency-integrity` visits `TemplateLiteral`, so it sees the quasis of tagged templates, and a null `cooked` truncated the rendered text β€” an unprotected CDN `