npm / yargs-parser / 22.0.0

yargs-parser 22.0.0

Source
https://github.com/yargs/yargs-parser
Commit scanned
66f0bb2d2c8a (recorded by npm)
Compared with
ba6421b843ea (0 signals introduced since)
Files
20 scanned, 8 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
2.6 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-14 19:15

Signals

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

  1. info warn → info by review dynamic-import lib/index.ts:46:14

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

        if (typeof require !== 'undefined') {
          return require(path)
        } else if (path.match(/\.json$/)) {
          // Addresses: https://github.com/yargs/yargs/issues/2040
    likely benign LLM, confidence 0.80 A require(path) call with a dynamic specifier inside a CJS/ESM compatibility shim that loads JSON files, referencing a yargs issue.
    Reasoning

    The require(path) call sits inside a typeof require guard and an explicit branch for .json files, with a comment referencing a yargs issue. This looks like a deliberate ESM/CJS compatibility shim for loading config files, not a dropper. The specifier comes from a caller-supplied path rather than a hidden or encoded payload, so it is a generic dynamic-require warning. Some residual doubt remains because the path source is not shown.

Reproduce This Scan

Run disclude locally to verify. 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.0.0
git clone https://github.com/yargs/yargs-parser yargs-parser && cd yargs-parser
git checkout 66f0bb2d2c8a2c9689489784cfe2e5128b0abfc2
disclude scan --severity info --diff ba6421b843ea5271d84489168314bba26ffa757f .