NodeSecure / js-x-ray

JavaScript & Node.js open-source SAST scanner. A static analyser for detecting most common malicious patterns 🔬.
MIT License
229 stars 26 forks source link

parsing-error is missing from warnings list #129

Closed fraxken closed 1 year ago

fraxken commented 1 year ago

The warning parsing-error is missing from the warnings list: https://github.com/NodeSecure/js-x-ray/blob/master/src/warnings.js#L4

The following code must not crash

import * as jsxray from "@nodesecure/js-x-ray";
import * as i18n from "@nodesecure/i18n";

console.log(i18n.getTokenSync(jsxray.warnings["parsing-error"].i18n));

Also please update the README example to use getTokenSync instead of getToken

fabnguess commented 1 year ago

Hi @fraxken , unless I'm mistaken, it seems that this issue has already been dealt with by Hubert .

fraxken commented 1 year ago

@fabnguess yes you right