RangeError: Invalid array length
root@ch:/usr/local/scans# ./index.js --config ./config.js --plugin maxPasswordAge
RangeError: Invalid array length
at /usr/local/scans/node_modules/tty-table/src/format.js:172:15
at Array.map (
Someone from my team has found a workaround - just make the terminal window smaller 😃. Another workaround is to simply use --console=text parameter. I guess there is a bug in the module?
Another curious finding is these cases: In custom plugin I want to completely ignore all UNIX VMs.
if (windowsImg) {
if (antiMalware) {
helpers.addResult(results, 0, 'Endpoint protection is installed on the virtual machine', location, vm.id);
} else {
helpers.addResult(results, 2, 'Endpoint protection is not installed on the virtual machine', location, vm.id);
}
}
Therefore after I check if the OS is MS based I want to output this which causes RangeError:
helpers.addResult(results, 0, 'No Windows Virtual Machine found', location);
but for some reason providing resource id doesn't:
helpers.addResult(results, 0, 'No Windows Virtual Machine found', location, , vm.id);
Just to clarify. In all cases the results object was correctly filled out and not null.
Any updates on this one?
Also seeing this error when attempting to run several other aws modules e.g. ./index.js --plugin ebsSnapshotPublic ./index.js --plugin excessiveSecurityGroups
/home/user/development/cloudsploit/node_modules/tty-table/src/format.js:172
+ Array(padBoth + 1 + padRemainder).join(" ")
^
RangeError: Invalid array length
at string.split.map.line (/home/user/development/cloudsploit/node_modules/tty-table/src/format.js:172:15)
at Array.map (<anonymous>)
at Object.module.exports.wrapCellText (/home/user/development/cloudsploit/node_modules/tty-table/src/format.js:156:35)
at Object.module.exports.buildCell (/home/user/development/cloudsploit/node_modules/tty-table/src/render.js:287:39)
at row.map (/home/user/development/cloudsploit/node_modules/tty-table/src/render.js:171:26)
at Array.map (<anonymous>)
at Object.module.exports.buildRow (/home/user/development/cloudsploit/node_modules/tty-table/src/render.js:170:13)
at sections.header.config.table.header.map.row (/home/user/development/cloudsploit/node_modules/tty-table/src/render.js:47:24)
at Array.map (<anonymous>)
at Object.module.exports.stringifyData (/home/user/development/cloudsploit/node_modules/tty-table/src/render.js:46:45)