npm / source-map-js / 1.2.2

source-map-js 1.2.2

Source
https://github.com/7rulnik/source-map-js
Artifact scanned
source-map-js-1.2.2.tgz (npm tarball · 35.5 KB · SHA-256 05c8cf8e7c3a…)
Compared with
source-map-js-1.2.1.tgz (0 signals introduced since)
Files
17 scanned, 1 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
3.1 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 19:12

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info critical → info by review dynamic-execution lib/quick-sort.js:111:20

    `Function(...)` called with a non-literal body (ast pass, confidence 0.90)

      let template = SortTemplate.toString();
      let templateFn = new Function(`return ${template}`)();
      return templateFn(comparator);
    }
    likely benign LLM, confidence 0.82 A quick-sort library builds a specialized sort function by passing its own template function's source to new Function and invoking the result with a comparator.
    Reasoning

    The Function constructor receives the source of a local function (SortTemplate.toString()) wrapped in a return statement, then the result is called with a comparator. This is a known code-generation technique for specializing a sort routine. Nothing in the snippet takes external input or reaches the network, spawns processes, or decodes a payload. The dynamic execution is real, but its input is the library's own code, so it looks like a legitimate pattern. Some doubt remains because the surrounding file is not shown.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o source-map-js-1.2.2.tgz https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz
printf '%s  %s\n' 05c8cf8e7c3a6b56cada7668fe9342b10f4b625efc92aba9ba05b9e8fe4d71a3 source-map-js-1.2.2.tgz | shasum -a 256 -c -
mkdir pkg && tar -xzf source-map-js-1.2.2.tgz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg