@contrast/config 1.55.0 → 1.56.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 CHANGED
@@ -1,4 +1,4 @@
1
- Copyright: 2025 Contrast Security, Inc
1
+ Copyright: 2026 Contrast Security, Inc
2
2
  Contact: support@contrastsecurity.com
3
3
  License: Commercial
4
4
 
package/lib/common.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/lib/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
@@ -14,7 +14,6 @@
14
14
  */
15
15
 
16
16
  import { ProtectRuleMode, Rule } from '@contrast/common';
17
- import { LevelWithSilent } from 'pino';
18
17
  export { ConfigSource } from './common';
19
18
 
20
19
  export interface EffectiveEntry<T> {
@@ -287,6 +286,20 @@ export interface Config {
287
286
  } & Record<Omit<Rule, Rule.BOT_BLOCKER | Rule.IP_DENYLIST | Rule.VIRTUAL_PATCH>, { mode: ProtectRuleMode }>;
288
287
  };
289
288
 
289
+ observe: {
290
+ crypto_usage: {
291
+ /** Default: `false` */
292
+ enable: boolean;
293
+ /** Default: `60_000` */
294
+ periodic_export_interval_ms: number;
295
+
296
+ crypto_usage: {
297
+ /** Default: `false` */
298
+ enable: boolean;
299
+ }
300
+ }
301
+ }
302
+
290
303
  application: {
291
304
  /** Override the reported application name. */
292
305
  name?: string;
@@ -312,7 +325,7 @@ export interface Config {
312
325
  server: {
313
326
  /** Default: `os.hostname()` */
314
327
  name: string;
315
- environment?: string;
328
+ environment?: 'QA' | 'PRODUCTION' | 'DEVELOPMENT';
316
329
  tags?: string;
317
330
  version?: string;
318
331
  /** Default: `true` */
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/lib/options.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
@@ -315,13 +315,13 @@ const options = [
315
315
  {
316
316
  name: 'agent.heap_dump.delay_ms',
317
317
  arg: '<time>',
318
- default: 10000,
318
+ default: 10_000,
319
319
  desc: 'Set the amount of time to wait, in milliseconds, after agent startup to begin taking heap dumps.',
320
320
  },
321
321
  {
322
322
  name: 'agent.heap_dump.window_ms',
323
323
  arg: '<number>',
324
- default: 10000,
324
+ default: 10_000,
325
325
  desc: 'Set the amount of time to wait, in milliseconds, between each heap dump.',
326
326
  },
327
327
  {
@@ -335,28 +335,28 @@ const options = [
335
335
  {
336
336
  name: 'agent.polling.app_activity_ms',
337
337
  arg: '<ms>',
338
- default: 5000,
338
+ default: 5_000,
339
339
  fn: parseNum,
340
340
  desc: 'Set the frequency with which the agent sends application activity to the Contrast UI.',
341
341
  },
342
342
  {
343
343
  name: 'agent.polling.app_settings_ms',
344
344
  arg: '<ms>',
345
- default: 30000,
345
+ default: 30_000,
346
346
  fn: parseNum,
347
347
  desc: 'Set the frequency with which the agent sends application settings polls to the Contrast UI.',
348
348
  },
349
349
  {
350
350
  name: 'agent.polling.app_update_ms',
351
351
  arg: '<ms>',
352
- default: 5000,
352
+ default: 5_000,
353
353
  fn: parseNum,
354
354
  desc: 'Set the the frequency with which the agent sends application updates to the Contrast UI.',
355
355
  },
356
356
  {
357
357
  name: 'agent.polling.server_settings_ms',
358
358
  arg: '<ms>',
359
- default: 30000,
359
+ default: 30_000,
360
360
  fn: parseNum,
361
361
  desc: 'Set the frequency with which the agent sends server settings polls to the Contrast UI.',
362
362
  },
@@ -564,7 +564,7 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
564
564
  {
565
565
  name: 'agent.node.metrics.warn_ms',
566
566
  arg: '<num>',
567
- default: 5000,
567
+ default: 5_000,
568
568
  fn: parseNum,
569
569
  desc: 'Set the response duration (in milliseconds) after which we will warn that a request has been hanging.'
570
570
  },
@@ -762,10 +762,16 @@ Example - \`label1, label2, label3\``,
762
762
  },
763
763
  {
764
764
  name: 'observe.periodic_export_interval_ms',
765
- arg: '[true]',
766
- default: 60000,
765
+ arg: '<number>',
766
+ default: 60_000,
767
767
  fn: parseNum,
768
768
  desc: 'Interval the metrics are flushed to the upstream collector.',
769
+ }, {
770
+ name: 'observe.crypto_usage.enable',
771
+ arg: '[true]',
772
+ default: false,
773
+ fn: castBoolean,
774
+ desc: 'Set to `true` to enable observability reporting of cryptographic library usage.',
769
775
  },
770
776
  // application
771
777
  {
package/lib/validators.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2025 Contrast Security, Inc
2
+ * Copyright: 2026 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
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)",
@@ -20,8 +20,8 @@
20
20
  "test": "bash ../scripts/test.sh"
21
21
  },
22
22
  "dependencies": {
23
- "@contrast/common": "1.39.0",
24
- "@contrast/core": "1.60.0",
23
+ "@contrast/common": "1.40.0",
24
+ "@contrast/core": "1.61.0",
25
25
  "deepmerge": "^4.3.1",
26
26
  "yaml": "^2.2.2"
27
27
  }