aiwaf 1.2.3 → 1.2.4
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/README.md +73 -37
- package/lib/injectionAnalysis.js +1204 -52
- package/lib/routeRisks.js +1 -1
- package/lib/wafMiddleware.js +1 -1
- package/package.json +2 -2
package/lib/routeRisks.js
CHANGED
|
@@ -104,7 +104,7 @@ function fileRoute(filename) {
|
|
|
104
104
|
function routesFor(finding, routes) {
|
|
105
105
|
const entry = String(finding.function || '').split(' -> ')[0];
|
|
106
106
|
const paths = Object.keys(routes);
|
|
107
|
-
const fromSource = (/^\S+ (\/\S*)$/.exec(entry) || [])[1] || fileRoute(finding.file);
|
|
107
|
+
const fromSource = (/^\S+ (\/\S*)$/.exec(entry) || [])[1] || fileRoute(finding.entry_file || finding.file);
|
|
108
108
|
if (fromSource) {
|
|
109
109
|
const wanted = trimRoute(fromSource);
|
|
110
110
|
const exact = paths.filter(path => trimRoute(path) === wanted);
|
package/lib/wafMiddleware.js
CHANGED
|
@@ -158,7 +158,7 @@ function applyAutoMiddlewareDefaults(opts, enabled, rawOpts = {}) {
|
|
|
158
158
|
|
|
159
159
|
// The first aiwaf-wasm with every engine feature from_settings relies on: stores, shared rate
|
|
160
160
|
// counts, path-rule limits, monitor mode and UUID resolvers.
|
|
161
|
-
const NATIVE_DEFAULT_WASM = '0.2.
|
|
161
|
+
const NATIVE_DEFAULT_WASM = '0.2.9';
|
|
162
162
|
|
|
163
163
|
function installedWasmVersion() {
|
|
164
164
|
const fs = require('fs');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiwaf",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "AIWAF Web Application Firewall for JavaScript applications and major Node.js frameworks",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/parser": "^7.29.2",
|
|
37
|
-
"aiwaf-wasm": "^0.2.
|
|
37
|
+
"aiwaf-wasm": "^0.2.9",
|
|
38
38
|
"express": "^4.21.2",
|
|
39
39
|
"glob": "^14.0.6",
|
|
40
40
|
"knex": "^2.4.2",
|