@opscompass/opscompass-cli 1.3.1 → 1.3.3

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/pgpTools.js CHANGED
@@ -2,100 +2,164 @@
2
2
 
3
3
  import * as openpgp from "openpgp";
4
4
  import fs from "fs";
5
- import axios from "axios";
6
-
7
- // publicKey object is used to verify the signature
8
- let publicKey = undefined;
9
-
10
- async function Verify(scriptDownloadInfo) {
11
- // Dynamically import openpgp v6
12
-
13
- // If the download info includes a gpg signature, verify it
14
- if (scriptDownloadInfo?.gpgSignature) {
15
- // Create a readable stream for the archive file
16
- let readableStream = undefined;
17
- if (fs.existsSync(scriptDownloadInfo.filePath)) {
18
- // This might break if the file is > 128kb
19
- // readableStream = fs.createReadStream(scriptDownloadInfo.filePath);
20
- readableStream = fs.readFileSync(scriptDownloadInfo.filePath);
21
- } else {
22
- console.error("Cannot read archive file:", scriptDownloadInfo.filePath);
23
- return false;
24
- }
25
-
26
- // Run asynchronously to get the public key, if we don't already have it
27
- if (!publicKey) {
28
- // If signer is not included, assume cli-token@opscompass.com
29
- let publicKeyArmored = undefined;
30
- const gpgSigner =
31
- scriptDownloadInfo?.gpgSigner || "cli-token@opscompass.com";
32
- try {
33
- const response = await axios.get(
34
- "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=" +
35
- gpgSigner,
36
- );
37
- publicKeyArmored = response?.data;
38
- } catch (error) {
39
- console.error("Key error:", error.message || error);
40
- return false;
41
- }
42
-
43
- if (!publicKeyArmored) {
44
- console.error(
45
- "Validation error retrieving public key for: %s",
46
- gpgSigner,
47
- );
48
- return false;
49
- }
50
-
51
- // Read the (armored) public key
52
- try {
53
- publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
54
- } catch (err) {
55
- console.error("Validation error reading public key:\n", err);
56
- return false;
57
- }
58
- // Public key is good
59
- }
60
-
61
- // Read the (armored) detached signature from download info
62
- let signature = undefined;
63
- try {
64
- signature = await openpgp.readSignature({
65
- armoredSignature: scriptDownloadInfo.gpgSignature,
66
- });
67
- } catch (err) {
68
- console.error(
69
- "Validation error reading file signature:\n",
70
- scriptDownloadInfo?.gpgSignature,
71
- );
72
- console.error("ERROR:", JSON.stringify(err, null, 2));
73
- return false;
74
- }
75
-
76
- // And, finally - verify the signature and document
77
- const message = await openpgp.createMessage({ binary: readableStream });
78
- const verificationResult = await openpgp.verify({
79
- message,
80
- signature,
81
- verificationKeys: publicKey,
5
+
6
+ const SCRIPT_BUNDLE_VERIFICATION_STATUS = {
7
+ verified: "verified",
8
+ unverified: "unverified",
9
+ invalid: "invalid",
10
+ };
11
+
12
+ const DEFAULT_PINNED_SIGNER = "cli-token@opscompass.com";
13
+
14
+ const PINNED_SIGNER_KEYS = {
15
+ [DEFAULT_PINNED_SIGNER]: `-----BEGIN PGP PUBLIC KEY BLOCK-----
16
+ Comment: 85BF E879 64BE 0203 C2C1 C8D1 8874 71E6 B9D8 82DB
17
+ Comment: OpsCompass Tooling <cli-token@opscompass.com>
18
+
19
+ mDMEZS2pnRYJKwYBBAHaRw8BAQdASHC55jY2qSZ4QwKuCig7XpW0KjniaqSpmmAG
20
+ fOwDgQ+0LU9wc0NvbXBhc3MgVG9vbGluZyA8Y2xpLXRva2VuQG9wc2NvbXBhc3Mu
21
+ Y29tPoiZBBMWCgBBAhsDBQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAFiEEhb/o
22
+ eWS+AgPCwcjRiHRx5rnYgtsFAmhsNrMFCQWo3JYACgkQiHRx5rnYgtsXxgD9ExID
23
+ xjTxVRGGe4eohvrdDrmlgJs3CBJzvwI4Y6wMfJsBAKO+PgtXAHyAZv1e64tH7qAZ
24
+ pL6EC81iLmExNdGUqroLuDgEZS2pnRIKKwYBBAGXVQEFAQEHQH7ng7p5sviGKtNw
25
+ ExwTaEvXx9+fy9mhQBXtBTGzsqQzAwEIB4h+BBgWCgAmAhsMFiEEhb/oeWS+AgPC
26
+ wcjRiHRx5rnYgtsFAmhsNsEFCQWo3KQACgkQiHRx5rnYgtsghgEA9qAXuQdWlJVG
27
+ r0jA4PfkgIYcRboSlEQqS/MtFbCbNOkA/08ciTsADdoc7JkXu5rErQlHL7iD4wUX
28
+ ZT2xvhQ8oogL
29
+ =QkMP
30
+ -----END PGP PUBLIC KEY BLOCK-----`,
31
+ };
32
+
33
+ const publicKeyCache = {};
34
+
35
+ function resolveOutput(output = console) {
36
+ return {
37
+ log: output?.log?.bind(output) || (() => {}),
38
+ warn:
39
+ output?.warn?.bind(output) ||
40
+ output?.log?.bind(output) ||
41
+ (() => {}),
42
+ error:
43
+ output?.error?.bind(output) ||
44
+ output?.warn?.bind(output) ||
45
+ output?.log?.bind(output) ||
46
+ (() => {}),
47
+ };
48
+ }
49
+
50
+ function normalizeSigner(signer) {
51
+ return (signer || DEFAULT_PINNED_SIGNER).toLowerCase();
52
+ }
53
+
54
+ function verificationResult(status, details = {}) {
55
+ return { status, ...details };
56
+ }
57
+
58
+ async function getPinnedPublicKey(gpgSigner) {
59
+ const signer = normalizeSigner(gpgSigner);
60
+ const armoredKey = PINNED_SIGNER_KEYS[signer];
61
+ if (!armoredKey) {
62
+ return undefined;
63
+ }
64
+
65
+ if (!publicKeyCache[signer]) {
66
+ publicKeyCache[signer] = await openpgp.readKey({ armoredKey });
67
+ }
68
+
69
+ return publicKeyCache[signer];
70
+ }
71
+
72
+ async function Verify(scriptDownloadInfo, output = console) {
73
+ const reporter = resolveOutput(output);
74
+
75
+ // If the download info does not include a gpg signature, treat as unverified.
76
+ if (!scriptDownloadInfo?.gpgSignature) {
77
+ reporter.warn("Archive file NOT digitally signed");
78
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.unverified, {
79
+ reason: "missing-signature",
82
80
  });
83
- const { verified, keyID } = verificationResult.signatures[0];
84
- try {
85
- await verified;
86
- } catch (e) {
87
- console.log("Archive file verification failed:\n" + e.message);
88
- return false;
89
- }
90
- console.log(
91
- "Archive file digitally signed by:\n %s",
92
- publicKey?.users[0]?.userID?.userID || gpgSigner,
93
- );
94
- return true;
81
+ }
82
+
83
+ let readableStream = undefined;
84
+ if (fs.existsSync(scriptDownloadInfo.filePath)) {
85
+ readableStream = fs.readFileSync(scriptDownloadInfo.filePath);
95
86
  } else {
96
- console.log("Archive file NOT digitally signed");
97
- return false;
87
+ reporter.error("Cannot read archive file: %s", scriptDownloadInfo.filePath);
88
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.invalid, {
89
+ reason: "archive-not-found",
90
+ });
91
+ }
92
+
93
+ const gpgSigner = normalizeSigner(scriptDownloadInfo?.gpgSigner);
94
+ let publicKey = undefined;
95
+ try {
96
+ publicKey = await getPinnedPublicKey(gpgSigner);
97
+ } catch (err) {
98
+ reporter.error("Validation error reading pinned key:\n%s", err);
99
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.invalid, {
100
+ signer: gpgSigner,
101
+ reason: "pinned-key-read-failed",
102
+ });
103
+ }
104
+
105
+ if (!publicKey) {
106
+ reporter.warn(
107
+ "Signer %s is not pinned; treating archive as unverified",
108
+ gpgSigner,
109
+ );
110
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.unverified, {
111
+ signer: gpgSigner,
112
+ reason: "non-pinned-signer",
113
+ });
98
114
  }
115
+
116
+ let signature = undefined;
117
+ try {
118
+ signature = await openpgp.readSignature({
119
+ armoredSignature: scriptDownloadInfo.gpgSignature,
120
+ });
121
+ } catch (err) {
122
+ reporter.error("Validation error reading file signature:\n%s", err);
123
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.invalid, {
124
+ signer: gpgSigner,
125
+ reason: "signature-parse-failed",
126
+ });
127
+ }
128
+
129
+ const message = await openpgp.createMessage({ binary: readableStream });
130
+ const signatureVerification = await openpgp.verify({
131
+ message,
132
+ signature,
133
+ verificationKeys: publicKey,
134
+ });
135
+ const { verified, keyID } = signatureVerification.signatures[0];
136
+
137
+ try {
138
+ await verified;
139
+ } catch (e) {
140
+ reporter.error("Archive file verification failed:\n%s", e.message);
141
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.invalid, {
142
+ signer: gpgSigner,
143
+ reason: "signature-invalid",
144
+ });
145
+ }
146
+
147
+ const signerFingerprint = publicKey.getFingerprint().toUpperCase();
148
+ reporter.log(
149
+ "Archive file digitally signed by:\n %s",
150
+ publicKey?.users[0]?.userID?.userID || gpgSigner,
151
+ );
152
+
153
+ return verificationResult(SCRIPT_BUNDLE_VERIFICATION_STATUS.verified, {
154
+ signer: gpgSigner,
155
+ signerFingerprint,
156
+ keyId: keyID?.toHex?.(),
157
+ });
99
158
  }
100
159
 
101
- export { Verify };
160
+ export {
161
+ Verify,
162
+ PINNED_SIGNER_KEYS,
163
+ SCRIPT_BUNDLE_VERIFICATION_STATUS,
164
+ DEFAULT_PINNED_SIGNER,
165
+ };
package/lib/utils.js CHANGED
@@ -33,8 +33,8 @@ function hasNullOrUndefined(obj, count = Object.keys(obj).length) {
33
33
  // Function to get a timestamp
34
34
 
35
35
  // (E) MANUAL FORMAT timestamp
36
- function getTimestamp() {
37
- var dNow = new Date(),
36
+ function getTimestamp(dNow = new Date()) {
37
+ let
38
38
  tsYr = dNow.getFullYear(),
39
39
  tsMo = prezero(dNow.getMonth() + 1),
40
40
  tsDy = prezero(dNow.getDate()),
@@ -43,7 +43,6 @@ function getTimestamp() {
43
43
  tsSe = prezero(dNow.getSeconds());
44
44
  return `${tsYr}${tsMo}${tsDy}-${tsHr}${tsMi}${tsSe}`;
45
45
  }
46
- const tStamp = getTimestamp();
47
46
 
48
47
  /**
49
48
  * Process standard arguments (eg company) and remove them
@@ -128,12 +127,27 @@ function getConfigFilePath(args = []) {
128
127
  case "--save-file":
129
128
  // This means we are supposed to save the file
130
129
  explicitFilePath = args[i + 1];
130
+ if (typeof explicitFilePath === "boolean") {
131
+ explicitFilePath = explicitFilePath.toString();
132
+ }
133
+ // Normalize non-string explicitFilePath values to strings to avoid
134
+ // runtime errors when calling string methods (eg. startsWith) or
135
+ // fs APIs that expect a path string.
136
+ if (typeof explicitFilePath !== "string") {
137
+ try {
138
+ explicitFilePath = String(explicitFilePath);
139
+ } catch (e) {
140
+ explicitFilePath = undefined;
141
+ }
142
+ }
143
+
131
144
  if (["true", "false"].includes(explicitFilePath)) {
132
145
  // If the next argument is true or false, then it is not a file path
133
146
  explicitFilePath = undefined;
134
147
  } else {
135
148
  // If explicitFilePath is an existing directory, use the default file name
136
149
  if (
150
+ typeof explicitFilePath === "string" &&
137
151
  fs.existsSync(explicitFilePath) &&
138
152
  fs.lstatSync(explicitFilePath).isDirectory()
139
153
  ) {
@@ -190,7 +204,7 @@ function getConfigFilePath(args = []) {
190
204
  }
191
205
 
192
206
  // If we have an odd number of arguments the last one should be an explicit file path
193
- if (explicitFilePath && !explicitFilePath.startsWith("--")) {
207
+ if (explicitFilePath && typeof explicitFilePath === "string" && !explicitFilePath.startsWith("--")) {
194
208
  cfgFile.filePath = explicitFilePath;
195
209
  } else {
196
210
  try {
@@ -205,9 +219,9 @@ function getConfigFilePath(args = []) {
205
219
  }
206
220
  }
207
221
 
208
- // If it's a relative path prepend PWD
209
- if (!cfgFile.filePath.startsWith("/")) {
210
- cfgFile.filePath = `${process.env.PWD}/${cfgFile.filePath}`;
222
+ // If it's a relative path prepend current working directory
223
+ if (!path.isAbsolute(cfgFile.filePath)) {
224
+ cfgFile.filePath = path.join(process.cwd(), cfgFile.filePath);
211
225
  }
212
226
 
213
227
  // If it is an explicit directory or missing .json
@@ -292,6 +306,20 @@ async function readConfigFile(args) {
292
306
  * If there is an existing file (based on args), we'll create a copy first
293
307
  */
294
308
  async function writeConfigFile(args, cfgData = undefined, overwrite = false) {
309
+ const output = arguments[3] || console;
310
+ const reporter = {
311
+ log: output?.log?.bind(output) || (() => {}),
312
+ warn:
313
+ output?.warn?.bind(output) ||
314
+ output?.log?.bind(output) ||
315
+ (() => {}),
316
+ error:
317
+ output?.error?.bind(output) ||
318
+ output?.warn?.bind(output) ||
319
+ output?.log?.bind(output) ||
320
+ (() => {}),
321
+ };
322
+
295
323
  // If the cfgData has values, use them to override the global values
296
324
  // from defaults.json
297
325
  // CUST_NAME is the name of the Licensing Account. Company is not in cfgData.
@@ -325,7 +353,7 @@ async function writeConfigFile(args, cfgData = undefined, overwrite = false) {
325
353
  const cfgBaseName = path.basename(cfgFile.filePath);
326
354
  // if overwriting, delete the existing file
327
355
  if (!cfgBaseName.startsWith("opscompass-monitoring-configuration.")) {
328
- console.log("WARNING: overwriting existing config file:", cfgBaseName);
356
+ reporter.warn("WARNING: overwriting existing config file: %s", cfgBaseName);
329
357
  }
330
358
  fs.rmSync(cfgFile.filePath, { force: true });
331
359
  }
@@ -351,15 +379,26 @@ async function writeConfigFile(args, cfgData = undefined, overwrite = false) {
351
379
  cfgBase = cfgBase.replace(/_[0-9-]+/, "");
352
380
 
353
381
  // Construct the name of the backup file
354
- const buCfg = `${cfgPath}/${cfgBase}_${tStamp}.${fExt}`;
355
382
  cfgName = `${cfgPath}/${cfgBase}.${fExt}`;
356
383
 
357
384
  // Make a versioned backup of the config file (if it exists)
358
385
  try {
359
386
  fs.accessSync(cfgName, fs.constants.F_OK);
360
387
  try {
361
- // Create a copy with a current timestamp
388
+ const existingStats = fs.statSync(cfgName);
389
+ const backupStamp = getTimestamp(new Date(existingStats.mtime));
390
+ let buCfg = `${cfgPath}/${cfgBase}_${backupStamp}.${fExt}`;
391
+ let backupSuffix = 1;
392
+ while (fs.existsSync(buCfg)) {
393
+ buCfg = `${cfgPath}/${cfgBase}_${backupStamp}_${backupSuffix}.${fExt}`;
394
+ backupSuffix += 1;
395
+ }
396
+
397
+ // Create a copy with a timestamp based on the previous file mtime
362
398
  fs.copyFileSync(cfgName, buCfg);
399
+ // Touch backup to now so cleanup treats this as a fresh backup
400
+ const now = new Date();
401
+ fs.utimesSync(buCfg, now, now);
363
402
  // console.error(`renamed\n ${cfgName}\nto\n ${buCfg}`)
364
403
  fs.rmSync(cfgName, { force: true });
365
404
  } catch (err) {
@@ -386,14 +425,8 @@ async function writeConfigFile(args, cfgData = undefined, overwrite = false) {
386
425
  encryptValues(newConfig);
387
426
  const json = JSON.stringify(newConfig, null, 2) + "\n";
388
427
  fs.mkdirSync(cfgPath, { recursive: true });
389
- fs.writeFileSync(cfgName, json, (err) => {
390
- if (err) {
391
- console.error("ERROR: " + err);
392
- throw err;
393
- }
394
- fs.chmodSync(cfgName, "0600");
395
- console.log(cfgName);
396
- });
428
+ fs.writeFileSync(cfgName, json);
429
+ fs.chmodSync(cfgName, "0600");
397
430
  decryptValues(newConfig);
398
431
  newConfig.filePath = cfgName;
399
432
 
@@ -424,9 +457,11 @@ async function writeConfigFile(args, cfgData = undefined, overwrite = false) {
424
457
  */
425
458
  const algorithm = "aes-256-cbc";
426
459
  const hashType = "md5";
427
- function getCipher() {
460
+ function getCipher(accountOverride) {
428
461
  let custTok;
429
- if (global.account) {
462
+ if (typeof accountOverride === "string" && accountOverride.length > 0) {
463
+ custTok = accountOverride;
464
+ } else if (global.account) {
430
465
  custTok = global.account;
431
466
  } else {
432
467
  // Punt, try to use environment
@@ -529,32 +564,78 @@ function encryptAES(data) {
529
564
 
530
565
  // Encrypt a file, as a stream
531
566
  function encryptFileAES(args) {
532
- const enc = getCipher();
567
+ const enc = getCipher(args?.account);
533
568
  const outFname = `${args.filePath}.gpg`;
534
569
 
535
- var infile = fs.createReadStream(args.filePath);
536
- var outfile = fs.createWriteStream(outFname);
537
-
538
- // var size = fs.statSync(args.filePath).size;
539
- infile.on("data", function (data) {
540
- // var percentage = parseInt(infile.bytesRead) / parseInt(size);
541
- // console.log(percentage * 100);
542
- // var encrypted = cipher.update(data);
543
- var encrypted = Buffer.concat([
544
- Buffer.from("Salted__"),
545
- enc.salt,
546
- enc.cipher.update(data),
547
- ]);
548
- if (encrypted) {
549
- // console.log(encrypted);
550
- outfile.write(encrypted);
570
+ return new Promise((resolve, reject) => {
571
+ const infile = fs.createReadStream(args.filePath);
572
+ const outfile = fs.createWriteStream(outFname);
573
+ let settled = false;
574
+ let waitingDrain = false;
575
+ let inputEnded = false;
576
+
577
+ const fail = (err) => {
578
+ if (settled) return;
579
+ settled = true;
580
+ infile.destroy();
581
+ outfile.destroy();
582
+ reject(err);
583
+ };
584
+
585
+ const writeChunk = (chunk) => {
586
+ if (!chunk || chunk.length === 0) return;
587
+ if (!outfile.write(chunk)) {
588
+ waitingDrain = true;
589
+ infile.pause();
590
+ }
591
+ };
592
+
593
+ const maybeFinalize = () => {
594
+ if (inputEnded && !waitingDrain && !settled) {
595
+ outfile.end();
596
+ }
597
+ };
598
+
599
+ infile.on("error", (err) => fail(err));
600
+ outfile.on("error", (err) => fail(err));
601
+ outfile.on("drain", () => {
602
+ waitingDrain = false;
603
+ infile.resume();
604
+ maybeFinalize();
605
+ });
606
+
607
+ try {
608
+ // Write OpenSSL-compatible header once, even for empty files.
609
+ writeChunk(Buffer.concat([Buffer.from("Salted__"), enc.salt]));
610
+ } catch (err) {
611
+ fail(err);
612
+ return;
551
613
  }
614
+
615
+ infile.on("data", function (data) {
616
+ try {
617
+ writeChunk(enc.cipher.update(data));
618
+ } catch (err) {
619
+ fail(err);
620
+ }
621
+ });
622
+
623
+ infile.on("end", function () {
624
+ try {
625
+ writeChunk(enc.cipher.final());
626
+ inputEnded = true;
627
+ maybeFinalize();
628
+ } catch (err) {
629
+ fail(err);
630
+ }
631
+ });
632
+
633
+ outfile.on("finish", () => {
634
+ if (settled) return;
635
+ settled = true;
636
+ resolve(outFname);
637
+ });
552
638
  });
553
- infile.on("close", function () {
554
- outfile.write(enc.cipher.final());
555
- outfile.close();
556
- });
557
- return outFname;
558
639
  }
559
640
 
560
641
  /**
@@ -714,9 +795,11 @@ const utilsModule = {
714
795
  getConfigFilePath,
715
796
  getTimestamp,
716
797
  opscompassHome,
798
+ hobKey: HOBKEY,
717
799
  readConfigFile,
718
800
  readFromStdinSync,
719
801
  writeConfigFile,
802
+ encryptFileAES,
720
803
  isIPv4,
721
804
  isIPv6,
722
805
  md5sum,
@@ -2,21 +2,14 @@ import { getOpsCompassClient } from "../opscompass.js";
2
2
  import { ScriptType, cliCommand } from "../environment/current.js";
3
3
  import {
4
4
  downloadScriptsToHome,
5
- findOrCreateScriptTypeFolder,
6
5
  findOrCreateScriptsFolder,
7
- SRC_FOLDER_NAME,
8
- BASE_SCRIPTS_RUN_ALL_RELATIVE_PATH,
9
6
  getInstalledScriptVersion,
10
7
  previousScriptsDownloaded,
11
8
  } from "../lib/homeInteraction.js";
12
- import { canReadFile } from "../lib/cliHelpers.js";
13
9
 
14
10
  import semver from "semver";
15
11
  import path from "path";
16
12
  import fs from "fs-extra";
17
- import util from "util";
18
- import { exec as execSync } from "child_process";
19
- const exec = util.promisify(execSync);
20
13
 
21
14
  /**
22
15
  * Lists script types that are locally downloaded
@@ -369,33 +362,11 @@ async function autoCheckScriptUpdates(args) {
369
362
  * The runall.sh file runs all configured modules.
370
363
  */
371
364
  async function manuallyRunScripts() {
372
- try {
373
- const baseScriptFolderPath = findOrCreateScriptTypeFolder(
374
- ScriptType.baseScripts,
375
- );
376
- const runAllFilePath = path.join(
377
- baseScriptFolderPath,
378
- SRC_FOLDER_NAME,
379
- BASE_SCRIPTS_RUN_ALL_RELATIVE_PATH,
380
- );
381
-
382
- if (canReadFile(runAllFilePath)) {
383
- const runAllScript = await fs.readFile(runAllFilePath, {
384
- encoding: "utf-8",
385
- });
386
-
387
- const { stdout, stderr } = await exec(runAllScript);
388
- if (!!stderr) {
389
- console.log(`Error: ${stderr}`);
390
- } else {
391
- console.log(stdout);
392
- }
393
- } else {
394
- throw "Cannot manually run scripts. Make sure the scripts are downloaded.\nIf the issue persists, contact your OpsCompass rep.";
395
- }
396
- } catch (err) {
397
- console.log(err);
398
- }
365
+ const message =
366
+ "Command disabled for security reasons. Use `opscompass data-gathering run` instead.";
367
+ console.error(message);
368
+ process.exitCode = 1;
369
+ return { error: message, exitCode: 1 };
399
370
  }
400
371
 
401
372
  async function printHelp() {
@@ -438,7 +409,7 @@ async function printHelp() {
438
409
  console.log();
439
410
  console.log(
440
411
  "manually-run-scripts",
441
- "Do not run this unless you know what you are doing. This manually runs all the scripts.",
412
+ "Deprecated and disabled for security reasons. Use `opscompass data-gathering run`.",
442
413
  );
443
414
  console.log();
444
415
  }