npm / @babel/generator / 8.0.6

@babel/generator 8.0.6

Source
https://github.com/babel/babel
Tag scanned
v8.0.6
Directory
packages/babel-generator (only this part of the repository was scanned)
Compared with
v8.0.5 (0 signals introduced since)
Files
1152 scanned, 148 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 62 info
Scan time
7.1 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 7 of 7 warn and critical signals; 7 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-14 19:38

Signals

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

  1. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /*0*/import/*1*/(/*2*/"foo"/*3*/)/*4*/
    dismissed LLM, confidence 0.93 Test fixture exercising comments inside a dynamic import call with a literal specifier.
    Reasoning

    The snippet shows import("foo") with a string literal specifier and comments between tokens. The fixture exists to test comment preservation around dynamic import, and the scanner's non-literal check does not account for the literal here. This is a scanner test fixture, not malicious code.

  2. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /*0*/import /*1*/(/*2*/"foo" /*3*/); /*4*/
    dismissed LLM, confidence 0.93 Formatted expected output of a comment-handling test for dynamic import with a literal specifier.
    Reasoning

    This is the formatted output counterpart of the input fixture. It has the same literal "foo" specifier and comment placement, so the non-literal warning is a false positive from the scanner's own test suite.

  3. 17 of 42 non-conventional identifiers are single-character (40%) (token pass, confidence 0.50)

  4. 17 of 42 non-conventional identifiers are single-character (40%) (token pass, confidence 0.50)

  5. 15 of 35 non-conventional identifiers are single-character (43%) (token pass, confidence 0.50)

  6. 15 of 35 non-conventional identifiers are single-character (43%) (token pass, confidence 0.50)

  7. line length 2112 characters (mostly string/comment) (raw pass, confidence 0.39)

    "undefined" === typeof Aura && (Aura = {}); Aura.bootstrap || (Aura.bootstrap = {}); Aura.frameworkJsReady || (Aura.ApplicationDefs = { cmpExporter: {}, libExporter: {} }, $A = { componentService: { addComponent: function (a, b) { Aura.ApplicationDefs.cmpExporter[a] = b; }, addLibraryExporter: function (a, b) { Aura.Ap
  8. mean non-conventional identifier length 1.90 over 41 names (token pass, confidence 0.50)

  9. mean non-conventional identifier length 1.90 over 41 names (token pass, confidence 0.50)

  10. 42 of 74 non-conventional identifiers are single-character (57%) (token pass, confidence 0.50)

  11. 42 of 74 non-conventional identifiers are single-character (57%) (token pass, confidence 0.50)

  12. 30 of 54 non-conventional identifiers are single-character (56%) (token pass, confidence 0.50)

  13. 30 of 54 non-conventional identifiers are single-character (56%) (token pass, confidence 0.50)

  14. mean non-conventional identifier length 1.43 over 21 names (token pass, confidence 0.50)

  15. mean non-conventional identifier length 1.43 over 21 names (token pass, confidence 0.50)

  16. mean non-conventional identifier length 1.65 over 20 names (token pass, confidence 0.50)

  17. mean non-conventional identifier length 1.65 over 20 names (token pass, confidence 0.50)

  18. 26 of 46 non-conventional identifiers are single-character (57%) (token pass, confidence 0.50)

  19. 26 of 46 non-conventional identifiers are single-character (57%) (token pass, confidence 0.50)

  20. mean non-conventional identifier length 1.38 over 48 names (token pass, confidence 0.50)

  21. mean non-conventional identifier length 1.38 over 48 names (token pass, confidence 0.50)

  22. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /* 0 */import/* 1 */./* 2 */source/* 3 */(/* 4 */"foo"/* 5 */, /* 6 */)/* 7 */;
    dismissed LLM, confidence 0.92 Import-phase test fixture for import.source with comments around a literal specifier.
    Reasoning

    This is a source-phase import expression (import.source) with a literal "foo" argument and comments, in a fixture directory named for import phases. It is a parser or formatter test case, not an attack pattern.

  23. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /* 0 */import /* 1 */ /* 2 */ /* 3 */.source(/* 4 */"foo" /* 5 */ /* 6 */) /* 7 */;
    dismissed LLM, confidence 0.92 Expected formatted output for the import.source comment test fixture.
    Reasoning

    This is the expected-output side of the same import-phases fixture. It shows the same import.source("foo") form reformatted, with no sign of obfuscation.

  24. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /* 0 */import/* 1 */./* 2 */source/* 3 */(/* 4 */"foo"/* 5 */, /* 6 */options/* 7 */,/* 8 */)/* 9 */;
    dismissed LLM, confidence 0.92 Test fixture for import.source with an options argument and comments.
    Reasoning

    This fixture is import.source with a literal "foo" argument plus an options argument and comments. It tests syntax handling for import phases, and the literal specifier means the non-literal warning does not apply.

  25. dynamic `import(...)` with a non-literal specifier (ast pass, confidence 0.65)

    /* 0 */import /* 1 */ /* 2 */ /* 3 */.source(/* 4 */"foo" /* 5 */, /* 6 */options /* 7 */ /* 8 */) /* 9 */;
    dismissed LLM, confidence 0.92 Expected formatted output for the import.source-with-options comment test.
    Reasoning

    Formatted expected output of the import.source options fixture, with the same literal specifier and no dynamic or hidden behavior.

  26. orphaned high surrogate \uD83D (no matching low surrogate) (token pass, confidence 0.65)

    "😂";
    "\uD83D_\uDE02"
    `😂`;
    /foobar/g;
  27. orphaned low surrogate \uDE02 (no preceding high surrogate) (token pass, confidence 0.65)

    "😂";
    "\uD83D_\uDE02"
    `😂`;
    /foobar/g;
  28. orphaned high surrogate \uD83D (no matching low surrogate) (token pass, confidence 0.65)

    5;5;50;5e4;"foobar";" ";"\n\r";"😂";"\uD83D_\uDE02"`😂`;/foobar/g;null;true;false;5;2;56;31;
  29. orphaned low surrogate \uDE02 (no preceding high surrogate) (token pass, confidence 0.65)

    5;5;50;5e4;"foobar";" ";"\n\r";"😂";"\uD83D_\uDE02"`😂`;/foobar/g;null;true;false;5;2;56;31;
  30. mean non-conventional identifier length 1.26 over 23 names (token pass, confidence 0.50)

  31. mean non-conventional identifier length 1.26 over 23 names (token pass, confidence 0.50)

  32. mean non-conventional identifier length 1.98 over 299 names (token pass, confidence 0.50)

  33. mean non-conventional identifier length 1.98 over 299 names (token pass, confidence 0.50)

  34. 23 of 50 non-conventional identifiers are single-character (46%) (token pass, confidence 0.50)

  35. 23 of 50 non-conventional identifiers are single-character (46%) (token pass, confidence 0.50)

  36. mean non-conventional identifier length 1.46 over 35 names (token pass, confidence 0.50)

  37. mean non-conventional identifier length 1.46 over 35 names (token pass, confidence 0.50)

  38. 34 of 48 non-conventional identifiers are single-character (71%) (token pass, confidence 0.50)

  39. 34 of 48 non-conventional identifiers are single-character (71%) (token pass, confidence 0.50)

  40. 34 of 48 non-conventional identifiers are single-character (71%) (token pass, confidence 0.50)

  41. 34 of 48 non-conventional identifiers are single-character (71%) (token pass, confidence 0.50)

  42. 30 of 60 non-conventional identifiers are single-character (50%) (token pass, confidence 0.50)

  43. 30 of 60 non-conventional identifiers are single-character (50%) (token pass, confidence 0.50)

  44. 25 of 51 non-conventional identifiers are single-character (49%) (token pass, confidence 0.50)

  45. 25 of 51 non-conventional identifiers are single-character (49%) (token pass, confidence 0.50)

  46. file mixes tab and space indentation (8 tab-indented and 2 space-indented lines) (raw pass, confidence 0.40)

    function assertElement(assertFn, shouldBeElement, opt_message) {
      return /** @type {!Ele	ment} */ (
    	  assertType_(
    	    assertFn,
  47. file mixes tab and space indentation (8 tab-indented and 2 space-indented lines) (raw pass, confidence 0.40)

    function assertElement(assertFn, shouldBeElement, opt_message) {
      return /** @type {!Ele	ment} */ (
    	  assertType_(
    	    assertFn,
  48. file mixes tab and space indentation (8 tab-indented and 2 space-indented lines) (raw pass, confidence 0.40)

    function assertElement(assertFn, shouldBeElement, opt_message) {
      return /** @type {!Ele	ment} */ (
    	  assertType_(
    	    assertFn,
  49. file mixes tab and space indentation (8 tab-indented and 2 space-indented lines) (raw pass, confidence 0.40)

    function assertElement(assertFn, shouldBeElement, opt_message) {
      return /** @type {!Ele	ment} */ (
    	  assertType_(
    	    assertFn,
  50. 25 of 33 non-conventional identifiers are single-character (76%) (token pass, confidence 0.50)

  51. 25 of 33 non-conventional identifiers are single-character (76%) (token pass, confidence 0.50)

  52. mean non-conventional identifier length 1.61 over 90 names (token pass, confidence 0.50)

  53. mean non-conventional identifier length 1.61 over 90 names (token pass, confidence 0.50)

  54. 38 of 56 non-conventional identifiers are single-character (68%) (token pass, confidence 0.50)

  55. 38 of 56 non-conventional identifiers are single-character (68%) (token pass, confidence 0.50)

  56. 38 of 56 non-conventional identifiers are single-character (68%) (token pass, confidence 0.50)

  57. 38 of 56 non-conventional identifiers are single-character (68%) (token pass, confidence 0.50)

  58. 21 of 40 non-conventional identifiers are single-character (52%) (token pass, confidence 0.50)

  59. 21 of 40 non-conventional identifiers are single-character (52%) (token pass, confidence 0.50)

  60. 13 of 30 non-conventional identifiers are single-character (43%) (token pass, confidence 0.50)

  61. 13 of 30 non-conventional identifiers are single-character (43%) (token pass, confidence 0.50)

  62. info critical → info by review dynamic-execution packages/babel-generator/test/index.js:1038:5

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

        );
        new Function(generate(mem).code);
      });
    likely benign LLM, confidence 0.75 Test-suite code that builds and evaluates a function from generated source code.
    Reasoning

    The snippet shows new Function(generate(mem).code) in a test file. Here the body comes from a code generator, which is typical of a compiler or transform test harness that evaluates generated output. A runtime-built Function is still a real dynamic-execution pattern, so the residual doubt is real. Without the surrounding test context, I rate it likely benign.

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/babel/babel babel && cd babel
git checkout v8.0.6
disclude scan --severity info --diff v8.0.5 packages/babel-generator