/mininode

Mininode is a CLI tool to reduce the attack surface of the Node.js applications by using static analysis.

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Mininode

Mininode is a CLI tool to reduce the attack surface of the Node.js applications by using static analysis.

Options

List of command line options that can be passed to mininode.

  • --dry-run: just generates mininode.json without modifying the initial application.
  • --skip-stat: skips calculating the statistics
  • --seeds: seed files from where mininode will start building dependency graph. You can provide many seed files by separating them with colon.
  • --mode: reduction mode. The value can be either soft or hard. In soft mode mininode will perform only coarse-grained reduction. While in hard mode mininode will perform fine-grained reduction. In general coarse-grained reduction is more reliable, because mininode will not try to reduce unused functions inside the module. Default value: soft.
  • --destination: the path where mininode will save the reduced Node.js application. The default value: mininode.
  • --silent: console output is disabled. This will improve the performance of the mininode.
  • --verbose: outputs additional information to the console. The default value: false
  • --log: mininode will generate log file inside, which contains dependency graph of the application in json format. The default value: true.
  • --log-output: the name of the log file generated by mininode. The default value: mininode.json.
  • --compress-log: compresses the final log file. By default it will dump everything into log file. In production it is advised to pass the --compress-log flag to save space.
  • --skip-reduction: if passed mininode will not reduce the JavaScript files. The default value: false.
  • --skip-remove: if passed mininode will not remove unused JavaScript files. The default value: false.

Research Paper

You can read more about the details of our work in the following research paper:

Mininode: Reducing the Attack Surface of Node.js Applications [PDF]
Igibek Koishybayev, Alexandros Kapravelos
Proceedings of the International Symposium on Research in Attacks, Intrusions and Defenses (RAID), 2020

If you use Mininode in your research, consider citing our work using this Bibtex entry:

@conference{mininode-raid20,
  title = {{Mininode: Reducing the Attack Surface of Node.js Applications}},
  author = {Koishybayev, Igibek and Kapravelos, Alexandros},
  booktitle = {{Proceedings of the International Symposium on Research in Attacks, Intrusions and Defenses (RAID)}},
  year = {2020}
}

Contributing

js-semistandard-style

We are following semistandard.