google-gemini/gemini-cli

Missing validation for critical configuration files could lead to broken bundles

Open

#16114 opened on Jan 8, 2026

View on GitHub
 (13 comments) (0 reactions) (1 assignee)TypeScript (103,992 stars) (13,657 forks)batch import
area/platformhelp wantedkind/bugpriority/p2status/bot-triagedtype/feature

Description

What happened?

The build and lint configuration files lack automated validation, creating risks:

Actual Behavior:

No tests verify that native modules (node-pty, keytar) are excluded from bundling

No validation of WASM resolution logic

No verification of ESLint security rule enforcement

No automated checks for license header compliance

What did you expect to happen?

Critical configuration files should have unit tests to prevent:

Broken CLI distribution from bundled native modules

Security rule violations slipping through

Compliance issues in production code

Impact:

High: CLI could fail on user machines if native modules are bundled

Medium: Security boundaries could be inadvertently removed

Medium: License violations could go undetected

Client information

Examine the test suite

Note absence of tests for esbuild.config.js and eslint.config.js

Modify either file incorrectly (e.g., remove node-pty from externals)

Observe that tests don't catch the regression

Proposed Solution

Add unit tests for these configuration files to validate:

  • WASM resolution handles both bare specifiers and local paths correctly
  • Native modules (node-pty, keytar) remain external to prevent bundling
  • ESLint security rules are properly configured and enforced
  • License header compliance is automatically validated

Acceptance Criteria

  • Tests exist for esbuild configuration validation
  • Tests exist for ESLint rule configuration
  • Native module externalization is verified
  • Security boundaries (node:os restrictions) are test-covered

Contributor guide