current commit
250321.4 · lib: add warning when binding inspector to public IP
'use strict';

const common = require('../common');
common.skipIfInspectorDisabled();

const inspector = require('inspector');
inspector.open(0, '0.0.0.0', false);
common.expectWarning(
  'SecurityWarning',
  'Binding the inspector to a public IP with an open port is insecure, ' +
    'as it allows external hosts to connect to the inspector ' +
    'and perform a remote code execution attack. ' +
    'Documentation can be found at ' +
    'https://nodejs.org/api/cli.html#--inspecthostport'
);
inspector.close();