Skip to content

Implement a new Collectable API in AstAnalyser #425

@fraxken

Description

@fraxken

The idea is to implement a new way of collecting some of the data that JS-X-Ray is extracting and analysing along the way such as (mostly string located in the literal probe):

  • URL
  • Ips
  • Hostname

Note

We could extend that list in future PRs (no need to integrate 10 of thems in the initial draft).

The API itself could look like:

const domainSet = new CollectableSet("url");

const scanner = new AstAnalyser({
  collectables: [domainSet]
});

console.log(Array.from(domainSet));

Note

Naming is not definitive and open to discussion

This datastructure would provide the following features:

  • File and AST location (one entry can have multiple)
  • Metadata

Also doing it this way make things easier when dealing with the EntryFileAnalyser API.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions