Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework SourceFile analysis strategy #237

Closed
fraxken opened this issue Feb 2, 2024 · 1 comment · Fixed by #258
Closed

Rework SourceFile analysis strategy #237

fraxken opened this issue Feb 2, 2024 · 1 comment · Fixed by #258
Assignees
Labels
help wanted Extra attention is needed

Comments

@fraxken
Copy link
Member

fraxken commented Feb 2, 2024

Right now JS-X-Ray is only capable to scan one sourcefile by one sourcefile. The Scanner package is currently responsible of listing and iterating all JavaScript files from a given NPM tarball (for example).

What's the issue with that?

index.js
src/
  other.js
test/
  foobar.js

In the example above we will scan every files. But in reality there is a high probability that test/foobar.js will never be executed (and it will also be the biggest vector of false positives).

My idea is to add a new strategy that will take entry files as input. We will then only scan files imported from these entry points.

Eventually, we could combine the two ways of doing things to ensure greater security while reducing false positives overall.

@fraxken fraxken added the help wanted Extra attention is needed label Feb 2, 2024
@jean-michelet
Copy link
Contributor

I take this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
2 participants