@opscompass/opscompass-cli 1.0.47 → 1.3.1
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/colors.js +5 -5
- package/credentials.js +20 -29
- package/environment/current.js +6 -6
- package/environment/demo.js +6 -6
- package/environment/dev.js +6 -6
- package/environment/local.js +6 -6
- package/environment/production.js +6 -6
- package/error.js +1 -1
- package/index.js +20 -20
- package/lib/cliHelpers.js +34 -15
- package/lib/consts.js +2 -11
- package/lib/homeInteraction.js +21 -22
- package/lib/maskValues.js +17 -17
- package/lib/parseMetrics.js +25 -21
- package/lib/pgpTools.js +8 -10
- package/lib/utils.js +15 -19
- package/login.js +90 -40
- package/modules/accounts.js +32 -26
- package/modules/compliance.js +75 -76
- package/modules/data-gathering-scripts.js +41 -41
- package/modules/defaults.js +12 -12
- package/modules/expiration-info.js +54 -25
- package/modules/license-manager/microsoft.js +95 -72
- package/modules/license-manager/nutanix.js +31 -22
- package/modules/license-manager/vcenter.js +31 -22
- package/modules/license-manager.js +89 -91
- package/modules/resources.js +140 -70
- package/modules.js +31 -15
- package/oauth.js +2 -2
- package/opscompass.js +8 -9
- package/package.json +3 -2
- package/updates.js +9 -11
package/modules/compliance.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { getOpsCompassClient } from "../opscompass.js";
|
|
2
|
+
import { getCredentials } from "../credentials.js";
|
|
3
3
|
|
|
4
4
|
async function transferOracleDatabaseMetadata(args) {
|
|
5
5
|
const callParams = genericMetadataTrasfer(args);
|
|
@@ -7,7 +7,7 @@ async function transferOracleDatabaseMetadata(args) {
|
|
|
7
7
|
const response = await client.compliance.transferOracleDatabaseMetadata(
|
|
8
8
|
callParams.company,
|
|
9
9
|
callParams.type,
|
|
10
|
-
callParams.filePath
|
|
10
|
+
callParams.filePath,
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -39,7 +39,7 @@ async function getUpcomingExceptionInfo(args) {
|
|
|
39
39
|
const response = await client.compliance.getUpcomingExceptionInfo(
|
|
40
40
|
callParams.company,
|
|
41
41
|
callParams.accounts,
|
|
42
|
-
callParams.frameworkId
|
|
42
|
+
callParams.frameworkId,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -71,7 +71,7 @@ async function getCheckStatusOverview(args) {
|
|
|
71
71
|
const response = await client.compliance.getCheckStatusOverview(
|
|
72
72
|
callParams.company,
|
|
73
73
|
callParams.accounts,
|
|
74
|
-
callParams.frameworkId
|
|
74
|
+
callParams.frameworkId,
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -114,7 +114,7 @@ async function getComplianceProblemsOverTime(args) {
|
|
|
114
114
|
callParams.accounts,
|
|
115
115
|
callParams.startDate,
|
|
116
116
|
callParams.endDate,
|
|
117
|
-
callParams.frameworkId
|
|
117
|
+
callParams.frameworkId,
|
|
118
118
|
);
|
|
119
119
|
|
|
120
120
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -157,7 +157,7 @@ async function listFrameworksWithDetails(args) {
|
|
|
157
157
|
const client = await getOpsCompassClient();
|
|
158
158
|
const response = await client.compliance.listFrameworksWithDetails(
|
|
159
159
|
callParams.company,
|
|
160
|
-
callParams.accounts
|
|
160
|
+
callParams.accounts,
|
|
161
161
|
);
|
|
162
162
|
|
|
163
163
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -185,7 +185,7 @@ async function listChecksWithDetails(args) {
|
|
|
185
185
|
const client = await getOpsCompassClient();
|
|
186
186
|
const response = await client.compliance.listChecksWithDetails(
|
|
187
187
|
callParams.company,
|
|
188
|
-
callParams.accounts
|
|
188
|
+
callParams.accounts,
|
|
189
189
|
);
|
|
190
190
|
|
|
191
191
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -213,7 +213,7 @@ async function listDisabledChecks(args) {
|
|
|
213
213
|
const client = await getOpsCompassClient();
|
|
214
214
|
const response = await client.compliance.listDisabledChecks(
|
|
215
215
|
callParams.company,
|
|
216
|
-
callParams.accounts
|
|
216
|
+
callParams.accounts,
|
|
217
217
|
);
|
|
218
218
|
|
|
219
219
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -224,7 +224,7 @@ async function transferNutanixPrismMetadata(args) {
|
|
|
224
224
|
const client = await getOpsCompassClient();
|
|
225
225
|
const response = await client.compliance.transferNutanixPrismMetadata(
|
|
226
226
|
callParams.company,
|
|
227
|
-
callParams.filePath
|
|
227
|
+
callParams.filePath,
|
|
228
228
|
);
|
|
229
229
|
|
|
230
230
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -235,7 +235,7 @@ async function transferVMwareVsphereMetadata(args) {
|
|
|
235
235
|
const client = await getOpsCompassClient();
|
|
236
236
|
const response = await client.compliance.transferVMwareVsphereMetadata(
|
|
237
237
|
callParams.company,
|
|
238
|
-
callParams.filePath
|
|
238
|
+
callParams.filePath,
|
|
239
239
|
);
|
|
240
240
|
|
|
241
241
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -246,7 +246,7 @@ async function transferNetworkDiscoveryMetadata(args) {
|
|
|
246
246
|
const client = await getOpsCompassClient();
|
|
247
247
|
const response = await client.compliance.transferNetworkDiscoveryMetadata(
|
|
248
248
|
callParams.company,
|
|
249
|
-
callParams.filePath
|
|
249
|
+
callParams.filePath,
|
|
250
250
|
);
|
|
251
251
|
|
|
252
252
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -258,7 +258,7 @@ async function transferSqlServerDatabaseMetadata(args) {
|
|
|
258
258
|
const response = await client.compliance.transferSqlServerDatabaseMetadata(
|
|
259
259
|
callParams.company,
|
|
260
260
|
callParams.type,
|
|
261
|
-
callParams.filePath
|
|
261
|
+
callParams.filePath,
|
|
262
262
|
);
|
|
263
263
|
|
|
264
264
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -283,7 +283,6 @@ function genericMetadataTrasfer(args) {
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
async function listComplianceExceptions(args) {
|
|
286
|
-
let company = undefined;
|
|
287
286
|
let optionalParams = {
|
|
288
287
|
fromIndex: undefined,
|
|
289
288
|
numberOfRecords: undefined,
|
|
@@ -301,7 +300,7 @@ async function listComplianceExceptions(args) {
|
|
|
301
300
|
for (let i = 0; i < args.length - 1; i++) {
|
|
302
301
|
switch (args[i].toLowerCase()) {
|
|
303
302
|
case "--company":
|
|
304
|
-
company = args[++i];
|
|
303
|
+
global.company = args[++i];
|
|
305
304
|
break;
|
|
306
305
|
case "--from-index":
|
|
307
306
|
case "--fromindex":
|
|
@@ -356,8 +355,8 @@ async function listComplianceExceptions(args) {
|
|
|
356
355
|
|
|
357
356
|
const client = await getOpsCompassClient();
|
|
358
357
|
const complianceExceptions = await client.compliance.getComplianceExceptions(
|
|
359
|
-
company,
|
|
360
|
-
optionalParams
|
|
358
|
+
global.company,
|
|
359
|
+
optionalParams,
|
|
361
360
|
);
|
|
362
361
|
|
|
363
362
|
console.log(JSON.stringify(complianceExceptions, null, 2));
|
|
@@ -388,7 +387,7 @@ async function updateComplianceException(args) {
|
|
|
388
387
|
const client = await getOpsCompassClient();
|
|
389
388
|
const complianceException = await client.compliance.updateComplianceException(
|
|
390
389
|
callParams.id,
|
|
391
|
-
callParams
|
|
390
|
+
callParams,
|
|
392
391
|
);
|
|
393
392
|
console.log(JSON.stringify(complianceException, null, 2));
|
|
394
393
|
}
|
|
@@ -467,7 +466,7 @@ async function createComplianceResourceCheckException(args) {
|
|
|
467
466
|
complianceResourceCheckId,
|
|
468
467
|
complianceExceptionType,
|
|
469
468
|
reason,
|
|
470
|
-
expiresAt
|
|
469
|
+
expiresAt,
|
|
471
470
|
);
|
|
472
471
|
console.log(JSON.stringify(complianceExceptions, null, 2));
|
|
473
472
|
console.log();
|
|
@@ -499,7 +498,7 @@ async function listBreachedEmails(args) {
|
|
|
499
498
|
|
|
500
499
|
const client = await getOpsCompassClient();
|
|
501
500
|
const response = await client.compliance.listBreachedEmails(
|
|
502
|
-
callParams.company
|
|
501
|
+
callParams.company,
|
|
503
502
|
);
|
|
504
503
|
|
|
505
504
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -516,7 +515,7 @@ async function listBreachedEmailsOfConcern(args) {
|
|
|
516
515
|
|
|
517
516
|
const client = await getOpsCompassClient();
|
|
518
517
|
const response = await client.compliance.listBreachedEmailsOfConcern(
|
|
519
|
-
callParams.company
|
|
518
|
+
callParams.company,
|
|
520
519
|
);
|
|
521
520
|
|
|
522
521
|
console.log(JSON.stringify(response, null, 2));
|
|
@@ -527,7 +526,7 @@ async function printHelp() {
|
|
|
527
526
|
console.log();
|
|
528
527
|
console.log(
|
|
529
528
|
"list-checks-with-details",
|
|
530
|
-
"Retrieves the list of compliance checks for the specified company, with the amount of active resource problems and compliance score impact for each check"
|
|
529
|
+
"Retrieves the list of compliance checks for the specified company, with the amount of active resource problems and compliance score impact for each check",
|
|
531
530
|
);
|
|
532
531
|
console.log("Parameters:");
|
|
533
532
|
console.log("--company [company_slug]");
|
|
@@ -535,7 +534,7 @@ async function printHelp() {
|
|
|
535
534
|
console.log();
|
|
536
535
|
console.log(
|
|
537
536
|
"list-disabled-checks",
|
|
538
|
-
"Retrieves the list of disabled compliance checks for the specified company, with the amount of resources that each check is not scanning against."
|
|
537
|
+
"Retrieves the list of disabled compliance checks for the specified company, with the amount of resources that each check is not scanning against.",
|
|
539
538
|
);
|
|
540
539
|
console.log("Parameters:");
|
|
541
540
|
console.log("--company [company_slug]");
|
|
@@ -543,14 +542,14 @@ async function printHelp() {
|
|
|
543
542
|
console.log();
|
|
544
543
|
console.log(
|
|
545
544
|
"list-frameworks",
|
|
546
|
-
"Retrieves the list of compliance frameworks available for the specified company"
|
|
545
|
+
"Retrieves the list of compliance frameworks available for the specified company",
|
|
547
546
|
);
|
|
548
547
|
console.log("Parameters:");
|
|
549
548
|
console.log("--company [company_slug]");
|
|
550
549
|
console.log();
|
|
551
550
|
console.log(
|
|
552
551
|
"list-frameworks-with-details",
|
|
553
|
-
"Retrieves the list of compliance frameworks available for the specified company, with the amount of active control problems and compliance score for each framework"
|
|
552
|
+
"Retrieves the list of compliance frameworks available for the specified company, with the amount of active control problems and compliance score for each framework",
|
|
554
553
|
);
|
|
555
554
|
console.log("Parameters:");
|
|
556
555
|
console.log("--company [company_slug]");
|
|
@@ -558,7 +557,7 @@ async function printHelp() {
|
|
|
558
557
|
console.log();
|
|
559
558
|
console.log(
|
|
560
559
|
"get-upcoming-exception-info",
|
|
561
|
-
"Retrieves the soon to be expiring compliance exception information for the specified company."
|
|
560
|
+
"Retrieves the soon to be expiring compliance exception information for the specified company.",
|
|
562
561
|
);
|
|
563
562
|
console.log("Parameters:");
|
|
564
563
|
console.log("--company [company_slug]");
|
|
@@ -567,210 +566,210 @@ async function printHelp() {
|
|
|
567
566
|
console.log();
|
|
568
567
|
console.log(
|
|
569
568
|
"get-check-status-overview",
|
|
570
|
-
"Retrieves an overview of compliance check statuses, associated with a company."
|
|
569
|
+
"Retrieves an overview of compliance check statuses, associated with a company.",
|
|
571
570
|
);
|
|
572
571
|
console.log("Parameters:");
|
|
573
572
|
console.log("--company [company_slug]");
|
|
574
573
|
console.log(
|
|
575
|
-
"--accounts (optional) [account_id] Ex. --accounts account_123,account_456"
|
|
574
|
+
"--accounts (optional) [account_id] Ex. --accounts account_123,account_456",
|
|
576
575
|
);
|
|
577
576
|
console.log(
|
|
578
|
-
"--frameworkId (optional) [compliance_framework_id] Ex. --frameworkId 28"
|
|
577
|
+
"--frameworkId (optional) [compliance_framework_id] Ex. --frameworkId 28",
|
|
579
578
|
);
|
|
580
579
|
console.log();
|
|
581
580
|
console.log(
|
|
582
581
|
"get-compliance-problems-over-time",
|
|
583
|
-
"Retrieves a list of aggregated information about compliance problems over a specified timeframe."
|
|
582
|
+
"Retrieves a list of aggregated information about compliance problems over a specified timeframe.",
|
|
584
583
|
);
|
|
585
584
|
console.log("Parameters:");
|
|
586
585
|
console.log("--company [company_slug]");
|
|
587
586
|
console.log("--start-date [2020-11-11 00:00:00.000]");
|
|
588
587
|
console.log("--end-date [2020-11-15 00:00:00.000");
|
|
589
588
|
console.log(
|
|
590
|
-
"--accounts (optional) [account_id] Ex. --accounts account_123,account_456"
|
|
589
|
+
"--accounts (optional) [account_id] Ex. --accounts account_123,account_456",
|
|
591
590
|
);
|
|
592
591
|
console.log(
|
|
593
|
-
"--frameworkId (optional) [compliance_framework_id] Ex. --frameworkId 28"
|
|
592
|
+
"--frameworkId (optional) [compliance_framework_id] Ex. --frameworkId 28",
|
|
594
593
|
);
|
|
595
594
|
console.log();
|
|
596
595
|
console.log(
|
|
597
596
|
"transfer-oracle-database-metadata",
|
|
598
|
-
"Transfers OpsCompass Oracle Database metadata report into OpsCompass for processing"
|
|
597
|
+
"Transfers OpsCompass Oracle Database metadata report into OpsCompass for processing",
|
|
599
598
|
);
|
|
600
599
|
console.log("Parameters:");
|
|
601
600
|
console.log("--company [company_slug]");
|
|
602
601
|
console.log("--type [licensing | compliance | ebusiness]");
|
|
603
602
|
console.log(
|
|
604
|
-
"--filePath [path] Path of the file to transfer to OpsCompass for processing."
|
|
603
|
+
"--filePath [path] Path of the file to transfer to OpsCompass for processing.",
|
|
605
604
|
);
|
|
606
605
|
console.log();
|
|
607
606
|
console.log(
|
|
608
607
|
"transfer-nutanix-prism-metadata",
|
|
609
|
-
"Transfers Nutanix Prism server metadata report into OpsCompass for processing"
|
|
608
|
+
"Transfers Nutanix Prism server metadata report into OpsCompass for processing",
|
|
610
609
|
);
|
|
611
610
|
console.log("Parameters:");
|
|
612
611
|
console.log("--company [company_slug]");
|
|
613
612
|
console.log(
|
|
614
|
-
"--filePath [path] Path of the file to transfer to OpsCompass for processing."
|
|
613
|
+
"--filePath [path] Path of the file to transfer to OpsCompass for processing.",
|
|
615
614
|
);
|
|
616
615
|
console.log();
|
|
617
616
|
console.log(
|
|
618
617
|
"transfer-vmware-vsphere-metadata",
|
|
619
|
-
"Transfers OpsCompass VMware VSphere metadata report into OpsCompass for processing"
|
|
618
|
+
"Transfers OpsCompass VMware VSphere metadata report into OpsCompass for processing",
|
|
620
619
|
);
|
|
621
620
|
console.log("Parameters:");
|
|
622
621
|
console.log("--company [company_slug]");
|
|
623
622
|
console.log(
|
|
624
|
-
"--filePath [path] Path of the file to transfer to OpsCompass for processing."
|
|
623
|
+
"--filePath [path] Path of the file to transfer to OpsCompass for processing.",
|
|
625
624
|
);
|
|
626
625
|
console.log();
|
|
627
626
|
console.log(
|
|
628
627
|
"transfer-sql-server-database-metadata",
|
|
629
|
-
"Transfers OpsCompass SQL Server Database metadata report into OpsCompass for processing"
|
|
628
|
+
"Transfers OpsCompass SQL Server Database metadata report into OpsCompass for processing",
|
|
630
629
|
);
|
|
631
630
|
console.log("Parameters:");
|
|
632
631
|
console.log("--company [company_slug]");
|
|
633
632
|
console.log("--type [licensing | compliance]");
|
|
634
633
|
console.log(
|
|
635
|
-
"--filePath [path] Path of the file to transfer to OpsCompass for processing."
|
|
634
|
+
"--filePath [path] Path of the file to transfer to OpsCompass for processing.",
|
|
636
635
|
);
|
|
637
636
|
console.log();
|
|
638
637
|
console.log(
|
|
639
638
|
"transfer-network-discovery-metadata",
|
|
640
|
-
"Transfers OpsCompass Network Discovery metadata into OpsCompass for processing"
|
|
639
|
+
"Transfers OpsCompass Network Discovery metadata into OpsCompass for processing",
|
|
641
640
|
);
|
|
642
641
|
console.log("Parameters:");
|
|
643
642
|
console.log("--company [company_slug]");
|
|
644
643
|
console.log(
|
|
645
|
-
"--filePath [path] Path of the file to transfer to OpsCompass for processing."
|
|
644
|
+
"--filePath [path] Path of the file to transfer to OpsCompass for processing.",
|
|
646
645
|
);
|
|
647
646
|
console.log();
|
|
648
647
|
console.log(
|
|
649
648
|
"list-compliance-exceptions",
|
|
650
|
-
"Gets list of policy exceptions and mitigations"
|
|
649
|
+
"Gets list of policy exceptions and mitigations",
|
|
651
650
|
);
|
|
652
651
|
console.log("Parameters:");
|
|
653
652
|
console.log("--company [company_slug]");
|
|
654
653
|
console.log(
|
|
655
|
-
"--from-index (optional) [number] the record index to start at when fetching the next round of records (helps with fetching all records over multiple requests)"
|
|
654
|
+
"--from-index (optional) [number] the record index to start at when fetching the next round of records (helps with fetching all records over multiple requests)",
|
|
656
655
|
);
|
|
657
656
|
console.log(
|
|
658
|
-
"--number-of-records (optional) [number] the number of records to fetch with one request"
|
|
657
|
+
"--number-of-records (optional) [number] the number of records to fetch with one request",
|
|
659
658
|
);
|
|
660
659
|
console.log(
|
|
661
|
-
"--compliance-exception-sort: (optional) [resource | check | type | created-at | expires-at | reason] the column on which to sort records by"
|
|
660
|
+
"--compliance-exception-sort: (optional) [resource | check | type | created-at | expires-at | reason] the column on which to sort records by",
|
|
662
661
|
);
|
|
663
662
|
console.log(
|
|
664
|
-
"--compliance-exception-sort-direction: (optional) [asc | desc] the direction to sort records by"
|
|
663
|
+
"--compliance-exception-sort-direction: (optional) [asc | desc] the direction to sort records by",
|
|
665
664
|
);
|
|
666
665
|
console.log("--search-text: (optional) [string] search columns by this text");
|
|
667
666
|
console.log(
|
|
668
|
-
'--type-filter: (optional) [mitigation and/or policy_exception] filter results by type. Ex: --type-filter "policy_exception, mitigation"'
|
|
667
|
+
'--type-filter: (optional) [mitigation and/or policy_exception] filter results by type. Ex: --type-filter "policy_exception, mitigation"',
|
|
669
668
|
);
|
|
670
669
|
console.log(
|
|
671
|
-
'--status-filter: (optional) [active and/or expired] filter results by status. Ex: --status-filter "expired, active"'
|
|
670
|
+
'--status-filter: (optional) [active and/or expired] filter results by status. Ex: --status-filter "expired, active"',
|
|
672
671
|
);
|
|
673
672
|
console.log(
|
|
674
|
-
"--expires-at-from: (optional) [string] the date at which to not show records before."
|
|
673
|
+
"--expires-at-from: (optional) [string] the date at which to not show records before.",
|
|
675
674
|
);
|
|
676
675
|
console.log(
|
|
677
|
-
"Format: UTC, example: '2022-08-23T17:00:00Z' to filter by August 8th, 2022 at 17:00 UTC."
|
|
676
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to filter by August 8th, 2022 at 17:00 UTC.",
|
|
678
677
|
);
|
|
679
678
|
console.log(
|
|
680
|
-
"--expires-at-to: (optional) [string] the date at which to not show records after."
|
|
679
|
+
"--expires-at-to: (optional) [string] the date at which to not show records after.",
|
|
681
680
|
);
|
|
682
681
|
console.log(
|
|
683
|
-
"Format: UTC, example: '2022-08-23T17:00:00Z' to filter by August 8th, 2022 at 17:00 UTC."
|
|
682
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to filter by August 8th, 2022 at 17:00 UTC.",
|
|
684
683
|
);
|
|
685
684
|
console.log(
|
|
686
|
-
'--check-ids-filter: (optional) [string] check ids to filter records by. Ex: --check-ids-filter "123, 456, 789"'
|
|
685
|
+
'--check-ids-filter: (optional) [string] check ids to filter records by. Ex: --check-ids-filter "123, 456, 789"',
|
|
687
686
|
);
|
|
688
687
|
console.log(
|
|
689
|
-
'--resource-ids-filter: (optional) [string] resource ids to filter records by. Ex: --resource-ids-filter "123, 456, 789"'
|
|
688
|
+
'--resource-ids-filter: (optional) [string] resource ids to filter records by. Ex: --resource-ids-filter "123, 456, 789"',
|
|
690
689
|
);
|
|
691
690
|
console.log(
|
|
692
|
-
'--creator-ids-filter: (optional) [string] user ids to filter records by. Ex: --creator-ids-filter "123, 456, 789"'
|
|
691
|
+
'--creator-ids-filter: (optional) [string] user ids to filter records by. Ex: --creator-ids-filter "123, 456, 789"',
|
|
693
692
|
);
|
|
694
693
|
console.log();
|
|
695
694
|
console.log(
|
|
696
695
|
"update-compliance-exception",
|
|
697
|
-
"Updates single compliance exception record (i.e. mitigations and policy exceptions)"
|
|
696
|
+
"Updates single compliance exception record (i.e. mitigations and policy exceptions)",
|
|
698
697
|
);
|
|
699
698
|
console.log("Parameters:");
|
|
700
699
|
console.log("--id [record id]");
|
|
701
700
|
console.log("--reason [string] the reason for the compliance exception");
|
|
702
701
|
console.log(
|
|
703
|
-
"--expiresAt [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date."
|
|
702
|
+
"--expiresAt [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date.",
|
|
704
703
|
);
|
|
705
704
|
console.log(
|
|
706
|
-
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC. To remove this field, pass in null."
|
|
705
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC. To remove this field, pass in null.",
|
|
707
706
|
);
|
|
708
707
|
console.log();
|
|
709
708
|
console.log(
|
|
710
709
|
"update-compliance-exceptions",
|
|
711
|
-
"Updates multiple compliance exceptions (i.e. mitigations and policy exceptions)"
|
|
710
|
+
"Updates multiple compliance exceptions (i.e. mitigations and policy exceptions)",
|
|
712
711
|
);
|
|
713
712
|
console.log("Parameters:");
|
|
714
713
|
console.log("--id [record id]");
|
|
715
714
|
console.log(
|
|
716
|
-
"--reason (optional) [string] the reason for the compliance exception"
|
|
715
|
+
"--reason (optional) [string] the reason for the compliance exception",
|
|
717
716
|
);
|
|
718
717
|
console.log(
|
|
719
|
-
"--expiresAt (optional) [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date."
|
|
718
|
+
"--expiresAt (optional) [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date.",
|
|
720
719
|
);
|
|
721
720
|
console.log(
|
|
722
|
-
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC. To remove this field, pass in null."
|
|
721
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC. To remove this field, pass in null.",
|
|
723
722
|
);
|
|
724
723
|
console.log("OR --json-updates [stringified json objects with your updates]");
|
|
725
724
|
console.log("For quick updates, you may use the above parameters");
|
|
726
725
|
console.log(
|
|
727
|
-
'e.g. opscompass compliance update-compliance-exceptions --id 18 --reason "Valid exception reason" --id 3 --expires-at "09/15/2022"'
|
|
726
|
+
'e.g. opscompass compliance update-compliance-exceptions --id 18 --reason "Valid exception reason" --id 3 --expires-at "09/15/2022"',
|
|
728
727
|
);
|
|
729
728
|
console.log(
|
|
730
|
-
"For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
|
|
729
|
+
"For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag",
|
|
731
730
|
);
|
|
732
731
|
console.log(
|
|
733
|
-
`e.g. opscompass compliance update-compliance-exceptions --json-updates '[{\"id\":\"18\",\"reason\":\"Valid exception reason\"},{\"id\":\"3\",\"expiresAt\":\"2022-08-23T17:00:00Z\"}]'
|
|
732
|
+
`e.g. opscompass compliance update-compliance-exceptions --json-updates '[{\"id\":\"18\",\"reason\":\"Valid exception reason\"},{\"id\":\"3\",\"expiresAt\":\"2022-08-23T17:00:00Z\"}]'`,
|
|
734
733
|
);
|
|
735
734
|
console.log();
|
|
736
735
|
console.log(
|
|
737
736
|
"create-compliance-resource-check-exceptions",
|
|
738
|
-
"Creates a new compliance resource check exception"
|
|
737
|
+
"Creates a new compliance resource check exception",
|
|
739
738
|
);
|
|
740
739
|
console.log("Parameters:");
|
|
741
740
|
console.log(
|
|
742
|
-
"--compliance-resource-check-id [the compliance resource check id]"
|
|
741
|
+
"--compliance-resource-check-id [the compliance resource check id]",
|
|
743
742
|
);
|
|
744
743
|
console.log(
|
|
745
|
-
"--compliance-exception-type [string] the type of compliance exception: 'mitigation' or 'policy_exception'"
|
|
744
|
+
"--compliance-exception-type [string] the type of compliance exception: 'mitigation' or 'policy_exception'",
|
|
746
745
|
);
|
|
747
746
|
console.log(
|
|
748
|
-
"--reason [string] the reason for the compliance resource check exception"
|
|
747
|
+
"--reason [string] the reason for the compliance resource check exception",
|
|
749
748
|
);
|
|
750
749
|
console.log(
|
|
751
|
-
"--expires-at (optional) [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date."
|
|
750
|
+
"--expires-at (optional) [string] the date at which to expire. If you want to remove a compliance exception from the list, set the expiresAt to todays date.",
|
|
752
751
|
);
|
|
753
752
|
console.log(
|
|
754
|
-
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC."
|
|
753
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to expire August 8th, 2022 at 17:00 UTC.",
|
|
755
754
|
);
|
|
756
755
|
console.log();
|
|
757
756
|
console.log(
|
|
758
757
|
"list-breaches",
|
|
759
|
-
"Retrieves the list of breaches company emails have been involved in."
|
|
758
|
+
"Retrieves the list of breaches company emails have been involved in.",
|
|
760
759
|
);
|
|
761
760
|
console.log("Parameters:");
|
|
762
761
|
console.log("--company [company_slug]");
|
|
763
762
|
console.log();
|
|
764
763
|
console.log(
|
|
765
764
|
"list-breached-emails",
|
|
766
|
-
"Retrieves the list of breached emails associated with a provided company"
|
|
765
|
+
"Retrieves the list of breached emails associated with a provided company",
|
|
767
766
|
);
|
|
768
767
|
console.log("Parameters:");
|
|
769
768
|
console.log("--company [company_slug]");
|
|
770
769
|
console.log();
|
|
771
770
|
console.log(
|
|
772
771
|
"list-breached-emails-of-concern",
|
|
773
|
-
"Retrieves the list of breached emails that have not performed a password reset since a data breach."
|
|
772
|
+
"Retrieves the list of breached emails that have not performed a password reset since a data breach.",
|
|
774
773
|
);
|
|
775
774
|
console.log("Parameters:");
|
|
776
775
|
console.log("--company [company_slug]");
|
|
@@ -830,4 +829,4 @@ complianceModule.requiresLogin = true;
|
|
|
830
829
|
complianceModule.description =
|
|
831
830
|
"Provides access to details about resource Compliance in OpsCompass.";
|
|
832
831
|
|
|
833
|
-
|
|
832
|
+
export default complianceModule;
|