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
21 scanned, 7 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
3.0 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 12:50

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.85 A dynamic require(path) inside a typeof-guarded loader branch that handles JSON files, following a referenced yargs compatibility fix.
    Reasoning

    The snippet shows a guarded fallback: it runs require(path) only when require is defined, and the next branch handles .json paths. A comment cites a yargs issue about JSON loading. This is a common cross-environment module loader pattern, and the dynamic specifier is a caller-supplied module path rather than a hidden payload. Nothing in the snippet suggests obfuscation or malicious intent.

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