@nodesecure/js-x-ray 8.2.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +9 -208
- package/package.json +62 -63
- package/src/{AstAnalyser.js → AstAnalyser.ts} +283 -209
- package/src/{Deobfuscator.js → Deobfuscator.ts} +228 -195
- package/src/{EntryFilesAnalyser.js → EntryFilesAnalyser.ts} +206 -167
- package/src/JsSourceParser.ts +77 -0
- package/src/NodeCounter.ts +90 -0
- package/src/{ProbeRunner.js → ProbeRunner.ts} +167 -144
- package/src/SourceFile.ts +226 -0
- package/src/index.ts +5 -0
- package/src/obfuscators/freejsobfuscator.ts +17 -0
- package/src/obfuscators/{jjencode.js → jjencode.ts} +39 -27
- package/src/obfuscators/jsfuck.ts +19 -0
- package/src/obfuscators/{obfuscator-io.js → obfuscator-io.ts} +25 -13
- package/src/obfuscators/{trojan-source.js → trojan-source.ts} +3 -1
- package/src/probes/{isArrayExpression.js → isArrayExpression.ts} +12 -3
- package/src/probes/{isBinaryExpression.js → isBinaryExpression.ts} +74 -55
- package/src/probes/isESMExport.ts +50 -0
- package/src/probes/{isFetch.js → isFetch.ts} +28 -19
- package/src/probes/isImportDeclaration.ts +58 -0
- package/src/probes/{isLiteral.js → isLiteral.ts} +91 -70
- package/src/probes/isLiteralRegex.ts +42 -0
- package/src/probes/{isRegexObject.js → isRegexObject.ts} +71 -49
- package/src/probes/isRequire/RequireCallExpressionWalker.ts +142 -0
- package/src/probes/isRequire/{isRequire.js → isRequire.ts} +195 -148
- package/src/probes/isSerializeEnv.ts +65 -0
- package/src/probes/isSyncIO.ts +96 -0
- package/src/probes/isUnsafeCallee.ts +89 -0
- package/src/probes/isUnsafeCommand.ts +133 -0
- package/src/probes/isWeakCrypto.ts +69 -0
- package/src/types/estree.ts +35 -0
- package/src/utils/extractNode.ts +22 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/{exportAssignmentHasRequireLeave.js → isOneLineExpressionExport.ts} +70 -40
- package/src/utils/notNullOrUndefined.ts +5 -0
- package/src/utils/toArrayLocation.ts +22 -0
- package/src/warnings.ts +146 -0
- package/index.d.ts +0 -46
- package/index.js +0 -4
- package/src/JsSourceParser.js +0 -57
- package/src/NodeCounter.js +0 -76
- package/src/SourceFile.js +0 -147
- package/src/obfuscators/freejsobfuscator.js +0 -9
- package/src/obfuscators/jsfuck.js +0 -11
- package/src/probes/isESMExport.js +0 -31
- package/src/probes/isImportDeclaration.js +0 -33
- package/src/probes/isLiteralRegex.js +0 -31
- package/src/probes/isRequire/RequireCallExpressionWalker.js +0 -93
- package/src/probes/isUnsafeCallee.js +0 -35
- package/src/probes/isWeakCrypto.js +0 -37
- package/src/utils/extractNode.js +0 -14
- package/src/utils/index.js +0 -8
- package/src/utils/isNode.js +0 -5
- package/src/utils/isOneLineExpressionExport.js +0 -24
- package/src/utils/isUnsafeCallee.js +0 -28
- package/src/utils/notNullOrUndefined.js +0 -3
- package/src/utils/rootLocation.js +0 -3
- package/src/utils/toArrayLocation.js +0 -11
- package/src/warnings.js +0 -76
- package/types/api.d.ts +0 -177
- package/types/warnings.d.ts +0 -36
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021-2025 NodeSecure
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2025 NodeSecure
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,208 +1,9 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<img src="https://img.shields.io/github/license/NodeSecure/js-x-ray.svg?style=for-the-badge" alt="license">
|
|
11
|
-
</a>
|
|
12
|
-
<a href="https://api.securityscorecards.dev/projects/github.com/NodeSecure/js-x-ray">
|
|
13
|
-
<img src="https://api.securityscorecards.dev/projects/github.com/NodeSecure/js-x-ray/badge?style=for-the-badge" alt="ossf scorecard">
|
|
14
|
-
</a>
|
|
15
|
-
<a href="https://github.com/NodeSecure/js-x-ray/actions?query=workflow%3A%22Node.js+CI%22">
|
|
16
|
-
<img src="https://img.shields.io/github/actions/workflow/status/NodeSecure/js-x-ray/node.js.yml?style=for-the-badge" alt="github ci workflow">
|
|
17
|
-
</a>
|
|
18
|
-
<a href="https://codecov.io/github/NodeSecure/js-xray">
|
|
19
|
-
<img src="https://img.shields.io/codecov/c/github/NodeSecure/js-x-ray?style=for-the-badge" alt="codecov">
|
|
20
|
-
</a>
|
|
21
|
-
</p>
|
|
22
|
-
|
|
23
|
-
JavaScript AST analysis. This package has been created to export the [NodeSecure](https://github.com/NodeSecure/cli) AST Analysis to enable better code evolution and allow better access to developers and researchers.
|
|
24
|
-
|
|
25
|
-
The goal is to quickly identify dangerous code and patterns for developers and Security researchers. Interpreting the results of this tool will still require you to have a set of security notions.
|
|
26
|
-
|
|
27
|
-
## Goals
|
|
28
|
-
The objective of the project is to successfully detect all potentially suspicious JavaScript codes.. The target is obviously codes that are added or injected for malicious purposes..
|
|
29
|
-
|
|
30
|
-
Most of the time these hackers will try to hide the behaviour of their codes as much as possible to avoid being spotted or easily understood... The work of the library is to understand and analyze these patterns that will allow us to detect malicious code..
|
|
31
|
-
|
|
32
|
-
## Features Highlight
|
|
33
|
-
- Retrieve required dependencies and files for Node.js.
|
|
34
|
-
- Detect unsafe RegEx.
|
|
35
|
-
- Get warnings when the AST Analysis as a problem or when not able to follow a statement.
|
|
36
|
-
- Highlight common attack patterns and API usages.
|
|
37
|
-
- Capable to follow the usage of dangerous Node.js globals.
|
|
38
|
-
- Detect obfuscated code and when possible the tool that has been used.
|
|
39
|
-
|
|
40
|
-
## Getting Started
|
|
41
|
-
|
|
42
|
-
This package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
$ npm i @nodesecure/js-x-ray
|
|
46
|
-
# or
|
|
47
|
-
$ yarn add @nodesecure/js-x-ray
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Usage example
|
|
51
|
-
|
|
52
|
-
Create a local `.js` file with the following content:
|
|
53
|
-
```js
|
|
54
|
-
try {
|
|
55
|
-
require("http");
|
|
56
|
-
}
|
|
57
|
-
catch (err) {
|
|
58
|
-
// do nothing
|
|
59
|
-
}
|
|
60
|
-
const lib = "crypto";
|
|
61
|
-
require(lib);
|
|
62
|
-
require("util");
|
|
63
|
-
require(Buffer.from("6673", "hex").toString());
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
Then use `js-x-ray` to run an analysis of the JavaScript code:
|
|
69
|
-
```js
|
|
70
|
-
import { AstAnalyser } from "@nodesecure/js-x-ray";
|
|
71
|
-
import { readFileSync } from "node:fs";
|
|
72
|
-
|
|
73
|
-
const scanner = new AstAnalyser();
|
|
74
|
-
|
|
75
|
-
const { warnings, dependencies } = await scanner.analyseFile(
|
|
76
|
-
"./file.js"
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
console.log(dependencies);
|
|
80
|
-
console.dir(warnings, { depth: null });
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The analysis will return: `http` (in try), `crypto`, `util` and `fs`.
|
|
84
|
-
|
|
85
|
-
> [!TIP]
|
|
86
|
-
> There is also a lot of suspicious code example in the `./examples` cases directory. Feel free to try the tool on these files.
|
|
87
|
-
|
|
88
|
-
## API
|
|
89
|
-
|
|
90
|
-
- [AstAnalyser](./docs/api/AstAnalyser.md)
|
|
91
|
-
- [EntryFilesAnalyser](./docs/api/EntryFilesAnalyser.md)
|
|
92
|
-
|
|
93
|
-
## Warnings
|
|
94
|
-
|
|
95
|
-
This section describes how use `warnings` export.
|
|
96
|
-
|
|
97
|
-
```ts
|
|
98
|
-
type WarningName = "parsing-error"
|
|
99
|
-
| "encoded-literal"
|
|
100
|
-
| "unsafe-regex"
|
|
101
|
-
| "unsafe-stmt"
|
|
102
|
-
| "short-identifiers"
|
|
103
|
-
| "suspicious-literal"
|
|
104
|
-
| "suspicious-file"
|
|
105
|
-
| "obfuscated-code"
|
|
106
|
-
| "weak-crypto"
|
|
107
|
-
| "unsafe-import"
|
|
108
|
-
| "shady-link";
|
|
109
|
-
|
|
110
|
-
declare const warnings: Record<WarningName, {
|
|
111
|
-
i18n: string;
|
|
112
|
-
severity: "Information" | "Warning" | "Critical";
|
|
113
|
-
experimental?: boolean;
|
|
114
|
-
}>;
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
We make a call to `i18n` through the package `NodeSecure/i18n` to get the translation.
|
|
118
|
-
|
|
119
|
-
```js
|
|
120
|
-
import * as jsxray from "@nodesecure/js-x-ray";
|
|
121
|
-
import * as i18n from "@nodesecure/i18n";
|
|
122
|
-
|
|
123
|
-
console.log(i18n.getTokenSync(jsxray.warnings["parsing-error"].i18n));
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Legends
|
|
127
|
-
|
|
128
|
-
This section describe all the possible warnings returned by JSXRay. Click on the warning **name** for additional information and examples.
|
|
129
|
-
|
|
130
|
-
| name | experimental | description |
|
|
131
|
-
| --- | :-: | --- |
|
|
132
|
-
| [parsing-error](./docs/parsing-error.md) | ❌ | The AST parser throw an error |
|
|
133
|
-
| [unsafe-import](./docs/unsafe-import.md) | ❌ | Unable to follow an import (require, require.resolve) statement/expr. |
|
|
134
|
-
| [unsafe-regex](./docs/unsafe-regex.md) | ❌ | A RegEx as been detected as unsafe and may be used for a ReDoS Attack. |
|
|
135
|
-
| [unsafe-stmt](./docs//unsafe-stmt.md) | ❌ | Usage of dangerous statement like `eval()` or `Function("")`. |
|
|
136
|
-
| [encoded-literal](./docs/encoded-literal.md) | ❌ | An encoded literal has been detected (it can be an hexa value, unicode sequence or a base64 string) |
|
|
137
|
-
| [short-identifiers](./docs/short-identifiers.md) | ❌ | This mean that all identifiers has an average length below 1.5. |
|
|
138
|
-
| [suspicious-literal](./docs/suspicious-literal.md) | ❌ | A suspicious literal has been found in the source code. |
|
|
139
|
-
| [suspicious-file](./docs/suspicious-file.md) | ❌ | A suspicious file with more than ten encoded-literal in it |
|
|
140
|
-
| [obfuscated-code](./docs/obfuscated-code.md) | ✔️ | There's a very high probability that the code is obfuscated. |
|
|
141
|
-
| [weak-crypto](./docs/weak-crypto.md) | ❌ | The code probably contains a weak crypto algorithm (md5, sha1...) |
|
|
142
|
-
| [shady-link](./docs/shady-link.md) | ❌ | The code contains shady/unsafe link |
|
|
143
|
-
|
|
144
|
-
## Workspaces
|
|
145
|
-
|
|
146
|
-
Click on one of the links to access the documentation of the workspace:
|
|
147
|
-
|
|
148
|
-
| name | package and link |
|
|
149
|
-
| --- | --- |
|
|
150
|
-
| estree-ast-utils | [@nodesecure/estree-ast-utils](./workspaces/estree-ast-utils) |
|
|
151
|
-
| sec-literal | [@nodesecure/sec-literal ](./workspaces/sec-literal) |
|
|
152
|
-
| ts-source-parser | [@nodesecure/ts-source-parser ](./workspaces/ts-source-parser) |
|
|
153
|
-
|
|
154
|
-
These packages are available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).
|
|
155
|
-
```bash
|
|
156
|
-
$ npm i @nodesecure/estree-ast-util
|
|
157
|
-
# or
|
|
158
|
-
$ yarn add @nodesecure/estree-ast-util
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Contributors ✨
|
|
162
|
-
|
|
163
|
-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
164
|
-
[](#contributors-)
|
|
165
|
-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
166
|
-
|
|
167
|
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
168
|
-
|
|
169
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
170
|
-
<!-- prettier-ignore-start -->
|
|
171
|
-
<!-- markdownlint-disable -->
|
|
172
|
-
<table>
|
|
173
|
-
<tbody>
|
|
174
|
-
<tr>
|
|
175
|
-
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/thomas-gentilhomme/"><img src="https://avatars.githubusercontent.com/u/4438263?v=4?s=100" width="100px;" alt="Gentilhomme"/><br /><sub><b>Gentilhomme</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=fraxken" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=fraxken" title="Documentation">📖</a> <a href="https://github.com/NodeSecure/js-x-ray/pulls?q=is%3Apr+reviewed-by%3Afraxken" title="Reviewed Pull Requests">👀</a> <a href="#security-fraxken" title="Security">🛡️</a> <a href="https://github.com/NodeSecure/js-x-ray/issues?q=author%3Afraxken" title="Bug reports">🐛</a></td>
|
|
176
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Rossb0b"><img src="https://avatars.githubusercontent.com/u/39910164?v=4?s=100" width="100px;" alt="Nicolas Hallaert"/><br /><sub><b>Nicolas Hallaert</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Rossb0b" title="Documentation">📖</a></td>
|
|
177
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/antoine-coulon"><img src="https://avatars.githubusercontent.com/u/43391199?v=4?s=100" width="100px;" alt="Antoine"/><br /><sub><b>Antoine</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=antoine-coulon" title="Code">💻</a></td>
|
|
178
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mathieuka"><img src="https://avatars.githubusercontent.com/u/34446722?v=4?s=100" width="100px;" alt="Mathieu"/><br /><sub><b>Mathieu</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Mathieuka" title="Code">💻</a></td>
|
|
179
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Kawacrepe"><img src="https://avatars.githubusercontent.com/u/40260517?v=4?s=100" width="100px;" alt="Vincent Dhennin"/><br /><sub><b>Vincent Dhennin</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Kawacrepe" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=Kawacrepe" title="Tests">⚠️</a></td>
|
|
180
|
-
<td align="center" valign="top" width="14.28%"><a href="http://tonygo.dev"><img src="https://avatars.githubusercontent.com/u/22824417?v=4?s=100" width="100px;" alt="Tony Gorez"/><br /><sub><b>Tony Gorez</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Documentation">📖</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Tests">⚠️</a></td>
|
|
181
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/PierreDemailly"><img src="https://avatars.githubusercontent.com/u/39910767?v=4?s=100" width="100px;" alt="PierreD"/><br /><sub><b>PierreD</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=PierreDemailly" title="Tests">⚠️</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=PierreDemailly" title="Code">💻</a></td>
|
|
182
|
-
</tr>
|
|
183
|
-
<tr>
|
|
184
|
-
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/franck-hallaert/"><img src="https://avatars.githubusercontent.com/u/110826655?v=4?s=100" width="100px;" alt="Franck Hallaert"/><br /><sub><b>Franck Hallaert</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Aekk0" title="Code">💻</a></td>
|
|
185
|
-
<td align="center" valign="top" width="14.28%"><a href="https://maji.kiwi"><img src="https://avatars.githubusercontent.com/u/33150916?v=4?s=100" width="100px;" alt="Maji"/><br /><sub><b>Maji</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=M4gie" title="Code">💻</a></td>
|
|
186
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/targos"><img src="https://avatars.githubusercontent.com/u/2352663?v=4?s=100" width="100px;" alt="Michaël Zasso"/><br /><sub><b>Michaël Zasso</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=targos" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/issues?q=author%3Atargos" title="Bug reports">🐛</a></td>
|
|
187
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fabnguess"><img src="https://avatars.githubusercontent.com/u/72697416?v=4?s=100" width="100px;" alt="Kouadio Fabrice Nguessan"/><br /><sub><b>Kouadio Fabrice Nguessan</b></sub></a><br /><a href="#maintenance-fabnguess" title="Maintenance">🚧</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=fabnguess" title="Code">💻</a></td>
|
|
188
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jean-michelet"><img src="https://avatars.githubusercontent.com/u/110341611?v=4?s=100" width="100px;" alt="Jean"/><br /><sub><b>Jean</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=jean-michelet" title="Tests">⚠️</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=jean-michelet" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=jean-michelet" title="Documentation">📖</a></td>
|
|
189
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tchapacan"><img src="https://avatars.githubusercontent.com/u/28821702?v=4?s=100" width="100px;" alt="tchapacan"/><br /><sub><b>tchapacan</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=tchapacan" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=tchapacan" title="Tests">⚠️</a></td>
|
|
190
|
-
<td align="center" valign="top" width="14.28%"><a href="http://miikkak.dev"><img src="https://avatars.githubusercontent.com/u/65869801?v=4?s=100" width="100px;" alt="mkarkkainen"/><br /><sub><b>mkarkkainen</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=mkarkkainen" title="Code">💻</a></td>
|
|
191
|
-
</tr>
|
|
192
|
-
<tr>
|
|
193
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/FredGuiou"><img src="https://avatars.githubusercontent.com/u/99122562?v=4?s=100" width="100px;" alt="FredGuiou"/><br /><sub><b>FredGuiou</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=FredGuiou" title="Documentation">📖</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=FredGuiou" title="Code">💻</a></td>
|
|
194
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/madina0801"><img src="https://avatars.githubusercontent.com/u/101329759?v=4?s=100" width="100px;" alt="Madina"/><br /><sub><b>Madina</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=madina0801" title="Code">💻</a></td>
|
|
195
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sairuss7"><img src="https://avatars.githubusercontent.com/u/87803528?v=4?s=100" width="100px;" alt="SairussDev"/><br /><sub><b>SairussDev</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=sairuss7" title="Code">💻</a></td>
|
|
196
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fless-lab"><img src="https://avatars.githubusercontent.com/u/71844440?v=4?s=100" width="100px;" alt="Abdou-Raouf ATARMLA"/><br /><sub><b>Abdou-Raouf ATARMLA</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=fless-lab" title="Code">💻</a></td>
|
|
197
|
-
<td align="center" valign="top" width="14.28%"><a href="https://clementgombauld.netlify.app/"><img src="https://avatars.githubusercontent.com/u/91478082?v=4?s=100" width="100px;" alt="Clement Gombauld"/><br /><sub><b>Clement Gombauld</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=clemgbld" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=clemgbld" title="Tests">⚠️</a></td>
|
|
198
|
-
</tr>
|
|
199
|
-
</tbody>
|
|
200
|
-
</table>
|
|
201
|
-
|
|
202
|
-
<!-- markdownlint-restore -->
|
|
203
|
-
<!-- prettier-ignore-end -->
|
|
204
|
-
|
|
205
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
206
|
-
|
|
207
|
-
## License
|
|
208
|
-
MIT
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
@nodesecure/js-x-ray
|
|
4
|
+
</h1>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="../../README.md">The documentation of this project is in the root README</a>
|
|
9
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,63 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nodesecure/js-x-ray",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "JavaScript AST XRay analysis",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports":
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodesecure/js-x-ray",
|
|
3
|
+
"version": "9.1.0",
|
|
4
|
+
"description": "JavaScript AST XRay analysis",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./warnings": {
|
|
12
|
+
"import": "./dist/warnings.js",
|
|
13
|
+
"types": "./dist/warnings.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20.0.0"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepublishOnly": "npm run build",
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"test-only": "tsx --test-reporter=spec --test \"./test/**/*.spec.ts\"",
|
|
24
|
+
"test": "c8 --all --src ./src -r html npm run test-only"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/NodeSecure/js-x-ray.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"ast",
|
|
32
|
+
"nsecure",
|
|
33
|
+
"nodesecure",
|
|
34
|
+
"analysis",
|
|
35
|
+
"dependencies",
|
|
36
|
+
"security"
|
|
37
|
+
],
|
|
38
|
+
"files": [
|
|
39
|
+
"src",
|
|
40
|
+
"types",
|
|
41
|
+
"index.js",
|
|
42
|
+
"index.d.ts"
|
|
43
|
+
],
|
|
44
|
+
"author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/NodeSecure/js-x-ray/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/NodeSecure/js-x-ray#readme",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@nodesecure/estree-ast-utils": "^4.0.0",
|
|
52
|
+
"@nodesecure/sec-literal": "^1.2.0",
|
|
53
|
+
"@nodesecure/tracer": "^2.0.0",
|
|
54
|
+
"digraph-js": "^2.2.3",
|
|
55
|
+
"estree-walker": "^3.0.1",
|
|
56
|
+
"frequency-set": "^1.0.2",
|
|
57
|
+
"is-minified-code": "^2.0.0",
|
|
58
|
+
"meriyah": "^6.0.0",
|
|
59
|
+
"safe-regex": "^2.1.1",
|
|
60
|
+
"ts-pattern": "^5.0.6"
|
|
61
|
+
}
|
|
62
|
+
}
|