@contrast/config 1.3.0 → 1.3.2
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/lib/index.d.ts +17 -17
- package/lib/options.js +2 -11
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { RulesConfig } from '@contrast/common';
|
|
17
17
|
import { Level } from 'pino';
|
|
18
18
|
|
|
19
|
-
type SyslogLevel =
|
|
19
|
+
export type SyslogLevel =
|
|
20
20
|
| 'alert'
|
|
21
21
|
| 'critical'
|
|
22
22
|
| 'error'
|
|
@@ -81,34 +81,34 @@ export interface Config {
|
|
|
81
81
|
path: string;
|
|
82
82
|
|
|
83
83
|
syslog: {
|
|
84
|
-
enable
|
|
84
|
+
enable?: boolean;
|
|
85
85
|
|
|
86
|
-
ip
|
|
86
|
+
ip?: string;
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
port: number;
|
|
88
|
+
port?: number;
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* The facility code of the messages the agent sends to Syslog.
|
|
93
|
-
* Values: 0-23, inclusive.
|
|
92
|
+
* Values: 0-23, inclusive.
|
|
94
93
|
*/
|
|
95
|
-
facility
|
|
94
|
+
facility?: number;
|
|
96
95
|
|
|
97
|
-
/** Log level of 'Blocked' attacks.
|
|
98
|
-
severity_blocked
|
|
96
|
+
/** Log level of 'Blocked' attacks. */
|
|
97
|
+
severity_blocked?: SyslogLevel;
|
|
99
98
|
|
|
100
|
-
/** Log level of 'Exploited' attacks.
|
|
101
|
-
severity_exploited
|
|
99
|
+
/** Log level of 'Exploited' attacks. */
|
|
100
|
+
severity_exploited?: SyslogLevel;
|
|
102
101
|
|
|
103
|
-
/** Log level of 'Probed' attacks.
|
|
104
|
-
severity_probed
|
|
102
|
+
/** Log level of 'Probed' attacks. */
|
|
103
|
+
severity_probed?: SyslogLevel;
|
|
105
104
|
|
|
106
|
-
/** Log level of 'Blocked at Perimeter' attacks.
|
|
107
|
-
severity_blocked_perimeter
|
|
105
|
+
/** Log level of 'Blocked at Perimeter' attacks. */
|
|
106
|
+
severity_blocked_perimeter?: SyslogLevel;
|
|
108
107
|
|
|
109
|
-
/** Log level of suspcious but not blocked attacks.
|
|
110
|
-
severity_suspicious
|
|
108
|
+
/** Log level of suspcious but not blocked attacks. */
|
|
109
|
+
severity_suspicious?: SyslogLevel;
|
|
111
110
|
};
|
|
111
|
+
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
node: {
|
package/lib/options.js
CHANGED
|
@@ -173,7 +173,7 @@ const api = [
|
|
|
173
173
|
name: 'api.proxy.url',
|
|
174
174
|
arg: '<url>',
|
|
175
175
|
desc: 'url of proxy for communicating agent data',
|
|
176
|
-
}
|
|
176
|
+
}
|
|
177
177
|
];
|
|
178
178
|
|
|
179
179
|
const agent = [
|
|
@@ -194,7 +194,6 @@ const agent = [
|
|
|
194
194
|
arg: '<level>',
|
|
195
195
|
fn: lowercase,
|
|
196
196
|
enum: ['error', 'warn', 'info', 'debug', 'trace'],
|
|
197
|
-
default: 'error',
|
|
198
197
|
desc: 'logging level (error, warn, info, debug, trace). overrides FeatureSet:logLevel',
|
|
199
198
|
},
|
|
200
199
|
{
|
|
@@ -218,12 +217,11 @@ const agent = [
|
|
|
218
217
|
// NOTE: syslog actually specifies 8 levels, starting with 0-emergency, but
|
|
219
218
|
// we do not let the user set emergency for whatever reason
|
|
220
219
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
221
|
-
default: 'debug',
|
|
222
220
|
desc: 'security logging level (alert, crit, err, warning, notice, info, debug)',
|
|
223
221
|
},
|
|
224
222
|
{
|
|
225
223
|
name: 'agent.security_logger.path',
|
|
226
|
-
|
|
224
|
+
default: 'security.log',
|
|
227
225
|
fn: toAbsolutePath,
|
|
228
226
|
arg: '<path>',
|
|
229
227
|
desc: 'where to log security events',
|
|
@@ -241,7 +239,6 @@ const agent = [
|
|
|
241
239
|
{
|
|
242
240
|
name: 'agent.security_logger.syslog.port',
|
|
243
241
|
desc: 'Set the port of the Syslog server to which the agent should send messages',
|
|
244
|
-
default: 514,
|
|
245
242
|
arg: '<port>',
|
|
246
243
|
fn: parseNum,
|
|
247
244
|
},
|
|
@@ -252,14 +249,12 @@ const agent = [
|
|
|
252
249
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
|
253
250
|
21, 22, 23,
|
|
254
251
|
],
|
|
255
|
-
default: 19,
|
|
256
252
|
arg: '<facility>',
|
|
257
253
|
},
|
|
258
254
|
{
|
|
259
255
|
name: 'agent.security_logger.syslog.severity_blocked',
|
|
260
256
|
desc: 'Set the log level of Blocked attacks. Value options are ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFO/DEBUG',
|
|
261
257
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
262
|
-
default: 'notice',
|
|
263
258
|
arg: '<level>',
|
|
264
259
|
fn: lowercase,
|
|
265
260
|
},
|
|
@@ -267,7 +262,6 @@ const agent = [
|
|
|
267
262
|
name: 'agent.security_logger.syslog.severity_exploited',
|
|
268
263
|
desc: 'Set the log level of Exploited attacks. Value options are ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFO/DEBUG',
|
|
269
264
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
270
|
-
default: 'alert',
|
|
271
265
|
arg: '<level>',
|
|
272
266
|
fn: lowercase,
|
|
273
267
|
},
|
|
@@ -275,7 +269,6 @@ const agent = [
|
|
|
275
269
|
name: 'agent.security_logger.syslog.severity_probed',
|
|
276
270
|
desc: 'Set the log level of Probed attacks. Value options are ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFO/DEBUG',
|
|
277
271
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
278
|
-
default: 'warning',
|
|
279
272
|
arg: '<level>',
|
|
280
273
|
fn: lowercase,
|
|
281
274
|
},
|
|
@@ -283,7 +276,6 @@ const agent = [
|
|
|
283
276
|
name: 'agent.security_logger.syslog.severity_blocked_perimeter',
|
|
284
277
|
desc: 'Set the log level of Blocked at Perimeter attacks. Value options are ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFO/DEBUG',
|
|
285
278
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
286
|
-
default: 'notice',
|
|
287
279
|
arg: '<level>',
|
|
288
280
|
fn: lowercase,
|
|
289
281
|
},
|
|
@@ -291,7 +283,6 @@ const agent = [
|
|
|
291
283
|
name: 'agent.security_logger.syslog.severity_suspicious',
|
|
292
284
|
desc: 'Set the log level of suspicious but not blocked attacks. Value options are ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFO/DEBUG',
|
|
293
285
|
enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
|
|
294
|
-
default: 'warning',
|
|
295
286
|
arg: '<level>',
|
|
296
287
|
fn: lowercase,
|
|
297
288
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "An API for discovering Contrast agent configuration data",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "../scripts/test.sh"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contrast/common": "1.1.
|
|
20
|
+
"@contrast/common": "1.1.4",
|
|
21
21
|
"yaml": "^2.0.1"
|
|
22
22
|
}
|
|
23
23
|
}
|