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

EntryFilesAnalyser: detect recursion #290

Closed fraxken closed 2 months ago

fraxken commented 3 months ago

Detect recursion between files during the analysis

At the end we should be able to retrieve edges between files (with corresponding node location I guess)

example:

First file is bar.js (entry file)

import { foo } from "foo.js";
console.log(foo);

export const bar = 5;

Then foo.js

import { bar } from "bar.js";
console.log(bar);

export const foo = 10;