@contrast/protect 1.22.0 → 1.23.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 +1 -1
- package/lib/error-handlers/common-handler.js +1 -1
- package/lib/error-handlers/constants.js +1 -1
- package/lib/error-handlers/index.js +1 -1
- package/lib/error-handlers/init-domain.js +1 -1
- package/lib/error-handlers/install/express4.js +1 -1
- package/lib/error-handlers/install/fastify.js +1 -1
- package/lib/error-handlers/install/hapi.js +1 -1
- package/lib/error-handlers/install/koa2.js +1 -1
- package/lib/esm-loader.mjs +1 -1
- package/lib/get-source-context.js +1 -1
- package/lib/hardening/constants.js +1 -1
- package/lib/hardening/handlers.js +1 -1
- package/lib/hardening/index.js +1 -1
- package/lib/hardening/install/node-serialize0.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/input-analysis/constants.js +1 -1
- package/lib/input-analysis/handlers.js +1 -1
- package/lib/input-analysis/index.js +1 -1
- package/lib/input-analysis/install/body-parser1.js +1 -1
- package/lib/input-analysis/install/busboy1.js +1 -1
- package/lib/input-analysis/install/cookie-parser1.js +1 -1
- package/lib/input-analysis/install/express4.js +1 -1
- package/lib/input-analysis/install/fastify.js +1 -1
- package/lib/input-analysis/install/formidable1.js +1 -1
- package/lib/input-analysis/install/hapi.js +1 -1
- package/lib/input-analysis/install/http.js +1 -1
- package/lib/input-analysis/install/koa-body5.js +1 -1
- package/lib/input-analysis/install/koa-bodyparser4.js +1 -1
- package/lib/input-analysis/install/koa2.js +1 -1
- package/lib/input-analysis/install/multer1.js +1 -1
- package/lib/input-analysis/install/qs6.js +1 -1
- package/lib/input-analysis/install/universal-cookie4.js +1 -1
- package/lib/input-analysis/ip-analysis.js +1 -1
- package/lib/input-analysis/virtual-patches.js +1 -1
- package/lib/input-tracing/constants.js +1 -1
- package/lib/input-tracing/handlers/index.js +1 -1
- package/lib/input-tracing/index.js +1 -1
- package/lib/input-tracing/install/child-process.js +1 -1
- package/lib/input-tracing/install/eval.js +1 -1
- package/lib/input-tracing/install/fs.js +1 -1
- package/lib/input-tracing/install/function.js +1 -1
- package/lib/input-tracing/install/http.js +1 -1
- package/lib/input-tracing/install/marsdb.js +1 -1
- package/lib/input-tracing/install/mongodb.js +1 -1
- package/lib/input-tracing/install/mssql.js +1 -1
- package/lib/input-tracing/install/mysql.js +1 -1
- package/lib/input-tracing/install/postgres.js +1 -1
- package/lib/input-tracing/install/sequelize.js +1 -1
- package/lib/input-tracing/install/sqlite3.js +1 -1
- package/lib/input-tracing/install/vm.js +1 -1
- package/lib/make-response-blocker.js +1 -1
- package/lib/make-source-context.js +1 -1
- package/lib/policy.js +4 -4
- package/lib/security-exception.js +1 -1
- package/lib/semantic-analysis/constants.js +1 -1
- package/lib/semantic-analysis/handlers.js +1 -1
- package/lib/semantic-analysis/index.js +1 -1
- package/lib/semantic-analysis/install/libxmljs.js +1 -1
- package/lib/semantic-analysis/utils/xml-analysis.js +1 -1
- package/lib/throw-security-exception.js +1 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
package/lib/esm-loader.mjs
CHANGED
package/lib/hardening/index.js
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/policy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright:
|
|
2
|
+
* Copyright: 2023 Contrast Security, Inc
|
|
3
3
|
* Contact: support@contrastsecurity.com
|
|
4
4
|
* License: Commercial
|
|
5
5
|
|
|
@@ -27,7 +27,7 @@ const {
|
|
|
27
27
|
Event: { SERVER_SETTINGS_UPDATE },
|
|
28
28
|
} = require('@contrast/common');
|
|
29
29
|
|
|
30
|
-
module.exports = function(core) {
|
|
30
|
+
module.exports = function (core) {
|
|
31
31
|
const {
|
|
32
32
|
config,
|
|
33
33
|
logger,
|
|
@@ -95,7 +95,7 @@ module.exports = function(core) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
function getModeFromConfig(ruleId) {
|
|
98
|
-
if (config.protect.disabled_rules.includes(ruleId)) {
|
|
98
|
+
if (config.protect.rules.disabled_rules.includes(ruleId)) {
|
|
99
99
|
return OFF;
|
|
100
100
|
}
|
|
101
101
|
if (ruleId === 'nosql-injection-mongo') {
|
|
@@ -262,7 +262,7 @@ module.exports = function(core) {
|
|
|
262
262
|
|
|
263
263
|
if (
|
|
264
264
|
bbEnabled != null &&
|
|
265
|
-
!config.protect.disabled_rules.includes(BOT_BLOCKER) &&
|
|
265
|
+
!config.protect.rules.disabled_rules.includes(BOT_BLOCKER) &&
|
|
266
266
|
!config.protect.rules?.[BOT_BLOCKER]?.mode
|
|
267
267
|
) {
|
|
268
268
|
policy[BOT_BLOCKER] = bbEnabled ? BLOCK_AT_PERIMETER : OFF;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/protect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "Contrast service providing framework-agnostic Protect support",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@contrast/agent-lib": "^7.0.1",
|
|
21
|
-
"@contrast/common": "1.
|
|
22
|
-
"@contrast/core": "1.
|
|
23
|
-
"@contrast/esm-hooks": "1.
|
|
21
|
+
"@contrast/common": "1.14.0",
|
|
22
|
+
"@contrast/core": "1.21.0",
|
|
23
|
+
"@contrast/esm-hooks": "1.17.0",
|
|
24
24
|
"@contrast/scopes": "1.4.0",
|
|
25
25
|
"ipaddr.js": "^2.0.1",
|
|
26
26
|
"semver": "^7.3.7"
|