@socketsecurity/cli-with-sentry 1.0.22 → 1.0.24
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/dist/cli.js +95 -78
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +13 -7
- package/dist/constants.js.map +1 -1
- package/dist/types/commands/fix/git.d.mts.map +1 -1
- package/dist/types/commands/fix/pull-request.d.mts.map +1 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +1 -1
- package/dist/types/constants.d.mts +2 -0
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/output-formatting.d.mts +3 -2
- package/dist/types/utils/output-formatting.d.mts.map +1 -1
- package/dist/utils.js +25 -17
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +13 -13
- package/external/@socketsecurity/registry/lib/prompts.js +1 -1
- package/package.json +9 -9
package/dist/cli.js
CHANGED
|
@@ -333,7 +333,7 @@ const config$P = {
|
|
|
333
333
|
The TIME argument must be number 7, 30, or 90 and defaults to 30.
|
|
334
334
|
|
|
335
335
|
Options
|
|
336
|
-
${utils.getFlagListOutput(flags
|
|
336
|
+
${utils.getFlagListOutput(flags)}
|
|
337
337
|
|
|
338
338
|
Examples
|
|
339
339
|
$ ${command} org 7
|
|
@@ -779,7 +779,7 @@ const config$O = {
|
|
|
779
779
|
The page arg should be a positive integer, offset 1. Defaults to 1.
|
|
780
780
|
|
|
781
781
|
Options
|
|
782
|
-
${utils.getFlagListOutput(config.flags
|
|
782
|
+
${utils.getFlagListOutput(config.flags)}
|
|
783
783
|
|
|
784
784
|
Examples
|
|
785
785
|
$ ${command}
|
|
@@ -2109,7 +2109,7 @@ const config$N = {
|
|
|
2109
2109
|
$ ${command} [options]
|
|
2110
2110
|
|
|
2111
2111
|
Options
|
|
2112
|
-
${utils.getFlagListOutput(config$N.flags
|
|
2112
|
+
${utils.getFlagListOutput(config$N.flags)}
|
|
2113
2113
|
|
|
2114
2114
|
This command is intended to use in CI runs to allow automated systems to
|
|
2115
2115
|
accept or reject a current build. When the scan does not pass your security
|
|
@@ -2401,7 +2401,7 @@ const config$M = {
|
|
|
2401
2401
|
$ ${command} [options] KEY
|
|
2402
2402
|
|
|
2403
2403
|
Options
|
|
2404
|
-
${utils.getFlagListOutput(config.flags
|
|
2404
|
+
${utils.getFlagListOutput(config.flags)}
|
|
2405
2405
|
|
|
2406
2406
|
Attempt to automatically discover the correct value for given config KEY.
|
|
2407
2407
|
|
|
@@ -2522,7 +2522,7 @@ const config$L = {
|
|
|
2522
2522
|
config then the value will come from that override.
|
|
2523
2523
|
|
|
2524
2524
|
Options
|
|
2525
|
-
${utils.getFlagListOutput(config.flags
|
|
2525
|
+
${utils.getFlagListOutput(config.flags)}
|
|
2526
2526
|
|
|
2527
2527
|
KEY is an enum. Valid keys:
|
|
2528
2528
|
|
|
@@ -2665,7 +2665,7 @@ const config$K = {
|
|
|
2665
2665
|
$ ${command} [options]
|
|
2666
2666
|
|
|
2667
2667
|
Options
|
|
2668
|
-
${utils.getFlagListOutput(config.flags
|
|
2668
|
+
${utils.getFlagListOutput(config.flags)}
|
|
2669
2669
|
|
|
2670
2670
|
Examples
|
|
2671
2671
|
$ ${command}
|
|
@@ -2766,7 +2766,7 @@ const config$J = {
|
|
|
2766
2766
|
$ ${command} [options] <KEY> <VALUE>
|
|
2767
2767
|
|
|
2768
2768
|
Options
|
|
2769
|
-
${utils.getFlagListOutput(config.flags
|
|
2769
|
+
${utils.getFlagListOutput(config.flags)}
|
|
2770
2770
|
|
|
2771
2771
|
This is a crude way of updating the local configuration for this CLI tool.
|
|
2772
2772
|
|
|
@@ -2892,7 +2892,7 @@ const config$I = {
|
|
|
2892
2892
|
$ ${command} [options] <KEY> <VALUE>
|
|
2893
2893
|
|
|
2894
2894
|
Options
|
|
2895
|
-
${utils.getFlagListOutput(config.flags
|
|
2895
|
+
${utils.getFlagListOutput(config.flags)}
|
|
2896
2896
|
|
|
2897
2897
|
Removes a value from a config key, allowing the default value to be used
|
|
2898
2898
|
for it instead.
|
|
@@ -3112,6 +3112,14 @@ async function gitCreateAndPushBranch(branch, commitMsg, filepaths, options) {
|
|
|
3112
3112
|
stdio: 'ignore'
|
|
3113
3113
|
};
|
|
3114
3114
|
try {
|
|
3115
|
+
debug.debugFn('args', {
|
|
3116
|
+
branch,
|
|
3117
|
+
user,
|
|
3118
|
+
email,
|
|
3119
|
+
cwd,
|
|
3120
|
+
filepaths,
|
|
3121
|
+
commitMsg
|
|
3122
|
+
});
|
|
3115
3123
|
await gitEnsureIdentity(user, email, cwd);
|
|
3116
3124
|
await spawn.spawn('git', ['checkout', '-b', branch], stdioIgnoreOptions);
|
|
3117
3125
|
await spawn.spawn('git', ['add', ...filepaths], stdioIgnoreOptions);
|
|
@@ -3280,7 +3288,9 @@ function getOctokit() {
|
|
|
3280
3288
|
debug.debugFn('notice', 'miss: SOCKET_CLI_GITHUB_TOKEN env var');
|
|
3281
3289
|
}
|
|
3282
3290
|
_octokit = new vendor.Octokit({
|
|
3283
|
-
auth: SOCKET_CLI_GITHUB_TOKEN
|
|
3291
|
+
auth: SOCKET_CLI_GITHUB_TOKEN,
|
|
3292
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
3293
|
+
baseUrl: constants.ENV.GITHUB_API_URL
|
|
3284
3294
|
});
|
|
3285
3295
|
}
|
|
3286
3296
|
return _octokit;
|
|
@@ -3452,8 +3462,8 @@ async function enablePrAutoMerge({
|
|
|
3452
3462
|
}
|
|
3453
3463
|
if (error instanceof vendor.GraphqlResponseError && Array.isArray(error.errors) && error.errors.length) {
|
|
3454
3464
|
const details = error.errors.map(({
|
|
3455
|
-
message
|
|
3456
|
-
}) =>
|
|
3465
|
+
message: m
|
|
3466
|
+
}) => m.trim());
|
|
3457
3467
|
return {
|
|
3458
3468
|
enabled: false,
|
|
3459
3469
|
details
|
|
@@ -3626,7 +3636,10 @@ async function setGitRemoteGithubRepoUrl(owner, repo, token, cwd = process.cwd()
|
|
|
3626
3636
|
cwd,
|
|
3627
3637
|
stdio: 'ignore'
|
|
3628
3638
|
};
|
|
3629
|
-
const
|
|
3639
|
+
const {
|
|
3640
|
+
host
|
|
3641
|
+
} = new URL(constants.ENV.GITHUB_SERVER_URL);
|
|
3642
|
+
const url = `https://x-access-token:${token}@${host}/${owner}/${repo}`;
|
|
3630
3643
|
try {
|
|
3631
3644
|
await spawn.spawn('git', ['remote', 'set-url', 'origin', url], stdioIgnoreOptions);
|
|
3632
3645
|
} catch (e) {
|
|
@@ -4695,7 +4708,7 @@ const config$H = {
|
|
|
4695
4708
|
$ ${command} [options] [CWD=.]
|
|
4696
4709
|
|
|
4697
4710
|
Options
|
|
4698
|
-
${utils.getFlagListOutput(config.flags
|
|
4711
|
+
${utils.getFlagListOutput(config.flags)}
|
|
4699
4712
|
|
|
4700
4713
|
Examples
|
|
4701
4714
|
$ ${command}
|
|
@@ -4926,7 +4939,7 @@ const config$G = {
|
|
|
4926
4939
|
different alias for socket on your system.
|
|
4927
4940
|
|
|
4928
4941
|
Options
|
|
4929
|
-
${utils.getFlagListOutput(config.flags
|
|
4942
|
+
${utils.getFlagListOutput(config.flags)}
|
|
4930
4943
|
|
|
4931
4944
|
Examples
|
|
4932
4945
|
|
|
@@ -5195,7 +5208,7 @@ const config$E = {
|
|
|
5195
5208
|
Logs into the Socket API by prompting for an API key
|
|
5196
5209
|
|
|
5197
5210
|
Options
|
|
5198
|
-
${utils.getFlagListOutput(config.flags
|
|
5211
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5199
5212
|
|
|
5200
5213
|
Examples
|
|
5201
5214
|
$ ${command}
|
|
@@ -5650,7 +5663,7 @@ const config$B = {
|
|
|
5650
5663
|
$ ${command} [options] [CWD=.]
|
|
5651
5664
|
|
|
5652
5665
|
Options
|
|
5653
|
-
${utils.getFlagListOutput(config.flags
|
|
5666
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5654
5667
|
|
|
5655
5668
|
Tries to figure out what language your target repo uses. If it finds a
|
|
5656
5669
|
supported case then it will try to generate the manifest file for that
|
|
@@ -5770,7 +5783,7 @@ const config$A = {
|
|
|
5770
5783
|
contents of a file to have it processed.
|
|
5771
5784
|
|
|
5772
5785
|
Options
|
|
5773
|
-
${utils.getFlagListOutput(config.flags
|
|
5786
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5774
5787
|
|
|
5775
5788
|
Examples
|
|
5776
5789
|
|
|
@@ -5910,7 +5923,7 @@ const config$z = {
|
|
|
5910
5923
|
$ ${command} [options] [CWD=.]
|
|
5911
5924
|
|
|
5912
5925
|
Options
|
|
5913
|
-
${utils.getFlagListOutput(config.flags
|
|
5926
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5914
5927
|
|
|
5915
5928
|
Uses gradle, preferably through your local project \`gradlew\`, to generate a
|
|
5916
5929
|
\`pom.xml\` file for each task. If you have no \`gradlew\` you can try the
|
|
@@ -6067,7 +6080,7 @@ const config$y = {
|
|
|
6067
6080
|
$ ${command} [options] [CWD=.]
|
|
6068
6081
|
|
|
6069
6082
|
Options
|
|
6070
|
-
${utils.getFlagListOutput(config.flags
|
|
6083
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6071
6084
|
|
|
6072
6085
|
Uses gradle, preferably through your local project \`gradlew\`, to generate a
|
|
6073
6086
|
\`pom.xml\` file for each task. If you have no \`gradlew\` you can try the
|
|
@@ -6226,7 +6239,7 @@ const config$x = {
|
|
|
6226
6239
|
$ ${command} [options] [CWD=.]
|
|
6227
6240
|
|
|
6228
6241
|
Options
|
|
6229
|
-
${utils.getFlagListOutput(config.flags
|
|
6242
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6230
6243
|
|
|
6231
6244
|
Uses \`sbt makePom\` to generate a \`pom.xml\` from your \`build.sbt\` file.
|
|
6232
6245
|
This xml file is the dependency manifest (like a package.json
|
|
@@ -6533,15 +6546,15 @@ async function setupConda(config) {
|
|
|
6533
6546
|
} else {
|
|
6534
6547
|
config.disabled = true;
|
|
6535
6548
|
}
|
|
6536
|
-
const
|
|
6537
|
-
if (
|
|
6549
|
+
const infile = await askForInputFile(config.infile || 'environment.yml');
|
|
6550
|
+
if (infile === undefined) {
|
|
6538
6551
|
return canceledByUser$1();
|
|
6539
|
-
} else if (
|
|
6552
|
+
} else if (infile === '-') {
|
|
6540
6553
|
config.stdin = true;
|
|
6541
6554
|
} else {
|
|
6542
6555
|
delete config.stdin;
|
|
6543
|
-
if (
|
|
6544
|
-
config.infile =
|
|
6556
|
+
if (infile) {
|
|
6557
|
+
config.infile = infile;
|
|
6545
6558
|
} else {
|
|
6546
6559
|
delete config.infile;
|
|
6547
6560
|
}
|
|
@@ -6564,8 +6577,8 @@ async function setupConda(config) {
|
|
|
6564
6577
|
config.stdout = true;
|
|
6565
6578
|
} else {
|
|
6566
6579
|
delete config.stdout;
|
|
6567
|
-
if (out
|
|
6568
|
-
config.outfile = out
|
|
6580
|
+
if (out) {
|
|
6581
|
+
config.outfile = out;
|
|
6569
6582
|
} else {
|
|
6570
6583
|
delete config.outfile;
|
|
6571
6584
|
}
|
|
@@ -6585,8 +6598,8 @@ async function setupGradle(config) {
|
|
|
6585
6598
|
const bin = await askForBin(config.bin || './gradlew');
|
|
6586
6599
|
if (bin === undefined) {
|
|
6587
6600
|
return canceledByUser$1();
|
|
6588
|
-
} else if (bin
|
|
6589
|
-
config.bin = bin
|
|
6601
|
+
} else if (bin) {
|
|
6602
|
+
config.bin = bin;
|
|
6590
6603
|
} else {
|
|
6591
6604
|
delete config.bin;
|
|
6592
6605
|
}
|
|
@@ -6598,8 +6611,8 @@ async function setupGradle(config) {
|
|
|
6598
6611
|
});
|
|
6599
6612
|
if (opts === undefined) {
|
|
6600
6613
|
return canceledByUser$1();
|
|
6601
|
-
} else if (opts
|
|
6602
|
-
config.gradleOpts = opts
|
|
6614
|
+
} else if (opts) {
|
|
6615
|
+
config.gradleOpts = opts;
|
|
6603
6616
|
} else {
|
|
6604
6617
|
delete config.gradleOpts;
|
|
6605
6618
|
}
|
|
@@ -6617,8 +6630,8 @@ async function setupSbt(config) {
|
|
|
6617
6630
|
const bin = await askForBin(config.bin || 'sbt');
|
|
6618
6631
|
if (bin === undefined) {
|
|
6619
6632
|
return canceledByUser$1();
|
|
6620
|
-
} else if (bin
|
|
6621
|
-
config.bin = bin
|
|
6633
|
+
} else if (bin) {
|
|
6634
|
+
config.bin = bin;
|
|
6622
6635
|
} else {
|
|
6623
6636
|
delete config.bin;
|
|
6624
6637
|
}
|
|
@@ -6630,8 +6643,8 @@ async function setupSbt(config) {
|
|
|
6630
6643
|
});
|
|
6631
6644
|
if (opts === undefined) {
|
|
6632
6645
|
return canceledByUser$1();
|
|
6633
|
-
} else if (opts
|
|
6634
|
-
config.sbtOpts = opts
|
|
6646
|
+
} else if (opts) {
|
|
6647
|
+
config.sbtOpts = opts;
|
|
6635
6648
|
} else {
|
|
6636
6649
|
delete config.sbtOpts;
|
|
6637
6650
|
}
|
|
@@ -6653,8 +6666,8 @@ async function setupSbt(config) {
|
|
|
6653
6666
|
config.stdout = true;
|
|
6654
6667
|
} else {
|
|
6655
6668
|
delete config.stdout;
|
|
6656
|
-
if (out
|
|
6657
|
-
config.outfile = out
|
|
6669
|
+
if (out) {
|
|
6670
|
+
config.outfile = out;
|
|
6658
6671
|
} else {
|
|
6659
6672
|
delete config.outfile;
|
|
6660
6673
|
}
|
|
@@ -6795,7 +6808,7 @@ const config$w = {
|
|
|
6795
6808
|
$ ${command} [CWD=.]
|
|
6796
6809
|
|
|
6797
6810
|
Options
|
|
6798
|
-
${utils.getFlagListOutput(config.flags
|
|
6811
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6799
6812
|
|
|
6800
6813
|
This command will try to detect all supported ecosystems in given CWD. Then
|
|
6801
6814
|
it starts a configurator where you can setup default values for certain flags
|
|
@@ -7771,7 +7784,7 @@ const config$r = {
|
|
|
7771
7784
|
$ ${command} [options] [CWD=.]
|
|
7772
7785
|
|
|
7773
7786
|
Options
|
|
7774
|
-
${utils.getFlagListOutput(config.flags
|
|
7787
|
+
${utils.getFlagListOutput(config.flags)}
|
|
7775
7788
|
|
|
7776
7789
|
Examples
|
|
7777
7790
|
$ ${command}
|
|
@@ -7938,7 +7951,7 @@ const config$q = {
|
|
|
7938
7951
|
- Permissions: none (does need token with access to target org)
|
|
7939
7952
|
|
|
7940
7953
|
Options
|
|
7941
|
-
${utils.getFlagListOutput(config.flags
|
|
7954
|
+
${utils.getFlagListOutput(config.flags)}
|
|
7942
7955
|
|
|
7943
7956
|
Examples
|
|
7944
7957
|
${command}
|
|
@@ -8062,7 +8075,7 @@ const config$p = {
|
|
|
8062
8075
|
- Permissions: license-policy:read
|
|
8063
8076
|
|
|
8064
8077
|
Options
|
|
8065
|
-
${utils.getFlagListOutput(config$p.flags
|
|
8078
|
+
${utils.getFlagListOutput(config$p.flags)}
|
|
8066
8079
|
|
|
8067
8080
|
Your API token will need the \`license-policy:read\` permission otherwise
|
|
8068
8081
|
the request will fail with an authentication error.
|
|
@@ -8190,7 +8203,7 @@ const config$o = {
|
|
|
8190
8203
|
- Permissions: security-policy:read
|
|
8191
8204
|
|
|
8192
8205
|
Options
|
|
8193
|
-
${utils.getFlagListOutput(config$o.flags
|
|
8206
|
+
${utils.getFlagListOutput(config$o.flags)}
|
|
8194
8207
|
|
|
8195
8208
|
Your API token will need the \`security-policy:read\` permission otherwise
|
|
8196
8209
|
the request will fail with an authentication error.
|
|
@@ -8331,7 +8344,7 @@ const config$n = {
|
|
|
8331
8344
|
- Permissions: none (does need a token)
|
|
8332
8345
|
|
|
8333
8346
|
Options
|
|
8334
|
-
${utils.getFlagListOutput(config$n.flags
|
|
8347
|
+
${utils.getFlagListOutput(config$n.flags)}
|
|
8335
8348
|
|
|
8336
8349
|
Examples
|
|
8337
8350
|
$ ${command}
|
|
@@ -8459,7 +8472,7 @@ const config$m = {
|
|
|
8459
8472
|
$ ${command} [options]
|
|
8460
8473
|
|
|
8461
8474
|
Options
|
|
8462
|
-
${utils.getFlagListOutput(config$m.flags
|
|
8475
|
+
${utils.getFlagListOutput(config$m.flags)}
|
|
8463
8476
|
|
|
8464
8477
|
Examples
|
|
8465
8478
|
$ ${command}
|
|
@@ -8785,7 +8798,7 @@ const config$l = {
|
|
|
8785
8798
|
- Permissions: packages:list
|
|
8786
8799
|
|
|
8787
8800
|
Options
|
|
8788
|
-
${utils.getFlagListOutput(config.flags
|
|
8801
|
+
${utils.getFlagListOutput(config.flags)}
|
|
8789
8802
|
|
|
8790
8803
|
Show deep scoring details for one package. The score will reflect the package
|
|
8791
8804
|
itself, any of its dependencies, and any of its transitive dependencies.
|
|
@@ -9136,7 +9149,7 @@ const config$k = {
|
|
|
9136
9149
|
- Permissions: packages:list
|
|
9137
9150
|
|
|
9138
9151
|
Options
|
|
9139
|
-
${utils.getFlagListOutput(config.flags
|
|
9152
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9140
9153
|
|
|
9141
9154
|
Show scoring details for one or more packages purely based on their own package.
|
|
9142
9155
|
This means that any dependency scores are not reflected by the score. You can
|
|
@@ -9490,7 +9503,7 @@ const config$h = {
|
|
|
9490
9503
|
The REPO name should be a "slug". Follows the same naming convention as GitHub.
|
|
9491
9504
|
|
|
9492
9505
|
Options
|
|
9493
|
-
${utils.getFlagListOutput(config.flags
|
|
9506
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9494
9507
|
|
|
9495
9508
|
Examples
|
|
9496
9509
|
$ ${command} test-repo
|
|
@@ -9622,7 +9635,7 @@ const config$g = {
|
|
|
9622
9635
|
- Permissions: repo:delete
|
|
9623
9636
|
|
|
9624
9637
|
Options
|
|
9625
|
-
${utils.getFlagListOutput(config.flags
|
|
9638
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9626
9639
|
|
|
9627
9640
|
Examples
|
|
9628
9641
|
$ ${command} test-repo
|
|
@@ -9903,7 +9916,7 @@ const config$f = {
|
|
|
9903
9916
|
- Permissions: repo:list
|
|
9904
9917
|
|
|
9905
9918
|
Options
|
|
9906
|
-
${utils.getFlagListOutput(config.flags
|
|
9919
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9907
9920
|
|
|
9908
9921
|
Examples
|
|
9909
9922
|
$ ${command}
|
|
@@ -10089,7 +10102,7 @@ const config$e = {
|
|
|
10089
10102
|
- Permissions: repo:update
|
|
10090
10103
|
|
|
10091
10104
|
Options
|
|
10092
|
-
${utils.getFlagListOutput(config.flags
|
|
10105
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10093
10106
|
|
|
10094
10107
|
Examples
|
|
10095
10108
|
$ ${command} test-repo
|
|
@@ -10246,7 +10259,7 @@ const config$d = {
|
|
|
10246
10259
|
- Permissions: repo:list
|
|
10247
10260
|
|
|
10248
10261
|
Options
|
|
10249
|
-
${utils.getFlagListOutput(config.flags
|
|
10262
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10250
10263
|
|
|
10251
10264
|
Examples
|
|
10252
10265
|
$ ${command} test-repo
|
|
@@ -10457,7 +10470,7 @@ const config$c = {
|
|
|
10457
10470
|
- Permissions: full-scans:create
|
|
10458
10471
|
|
|
10459
10472
|
Options
|
|
10460
|
-
${utils.getFlagListOutput(config.flags
|
|
10473
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10461
10474
|
|
|
10462
10475
|
Uploads the specified dependency manifest files for Go, Gradle, JavaScript,
|
|
10463
10476
|
Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt".
|
|
@@ -10745,7 +10758,7 @@ const config$b = {
|
|
|
10745
10758
|
- Permissions: full-scans:delete
|
|
10746
10759
|
|
|
10747
10760
|
Options
|
|
10748
|
-
${utils.getFlagListOutput(config.flags
|
|
10761
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10749
10762
|
|
|
10750
10763
|
Examples
|
|
10751
10764
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -11045,7 +11058,7 @@ const config$a = {
|
|
|
11045
11058
|
added/removed list (similar to diffing two files with git).
|
|
11046
11059
|
|
|
11047
11060
|
Options
|
|
11048
|
-
${utils.getFlagListOutput(config.flags
|
|
11061
|
+
${utils.getFlagListOutput(config.flags)}
|
|
11049
11062
|
|
|
11050
11063
|
Examples
|
|
11051
11064
|
$ ${command} aaa0aa0a-aaaa-0000-0a0a-0000000a00a0 aaa1aa1a-aaaa-1111-1a1a-1111111a11a1
|
|
@@ -11141,7 +11154,7 @@ async function createScanFromGithub({
|
|
|
11141
11154
|
outputKind,
|
|
11142
11155
|
repos
|
|
11143
11156
|
}) {
|
|
11144
|
-
let targetRepos = repos.trim().split(',').map(
|
|
11157
|
+
let targetRepos = repos.trim().split(',').map(r => r.trim()).filter(Boolean);
|
|
11145
11158
|
if (all || targetRepos.length === 0) {
|
|
11146
11159
|
// Fetch from Socket API
|
|
11147
11160
|
const result = await fetchListAllRepos({
|
|
@@ -11154,7 +11167,7 @@ async function createScanFromGithub({
|
|
|
11154
11167
|
}
|
|
11155
11168
|
targetRepos = result.data.results.map(obj => obj.slug || '');
|
|
11156
11169
|
}
|
|
11157
|
-
targetRepos = targetRepos.map(
|
|
11170
|
+
targetRepos = targetRepos.map(s => s.trim()).filter(Boolean);
|
|
11158
11171
|
logger.logger.info(`Have ${targetRepos.length} repo names to Scan!`);
|
|
11159
11172
|
logger.logger.log('');
|
|
11160
11173
|
if (!targetRepos.filter(Boolean).length) {
|
|
@@ -11828,7 +11841,7 @@ const config$9 = {
|
|
|
11828
11841
|
You can use \`socket scan setup\` to configure certain repo flag defaults.
|
|
11829
11842
|
|
|
11830
11843
|
Options
|
|
11831
|
-
${utils.getFlagListOutput(config.flags
|
|
11844
|
+
${utils.getFlagListOutput(config.flags)}
|
|
11832
11845
|
|
|
11833
11846
|
Examples
|
|
11834
11847
|
$ ${command}
|
|
@@ -12144,7 +12157,7 @@ const config$8 = {
|
|
|
12144
12157
|
\`--branch\` to filter by branch across all repos).
|
|
12145
12158
|
|
|
12146
12159
|
Options
|
|
12147
|
-
${utils.getFlagListOutput(config.flags
|
|
12160
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12148
12161
|
|
|
12149
12162
|
Examples
|
|
12150
12163
|
$ ${command}
|
|
@@ -12302,7 +12315,7 @@ const config$7 = {
|
|
|
12302
12315
|
- Permissions: full-scans:list
|
|
12303
12316
|
|
|
12304
12317
|
Options
|
|
12305
|
-
${utils.getFlagListOutput(config.flags
|
|
12318
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12306
12319
|
|
|
12307
12320
|
Examples
|
|
12308
12321
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -12421,7 +12434,7 @@ const config$6 = {
|
|
|
12421
12434
|
$ ${command} [options] [CWD=.]
|
|
12422
12435
|
|
|
12423
12436
|
Options
|
|
12424
|
-
${utils.getFlagListOutput(config.flags
|
|
12437
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12425
12438
|
|
|
12426
12439
|
Examples
|
|
12427
12440
|
$ ${command}
|
|
@@ -12519,7 +12532,7 @@ const config$5 = {
|
|
|
12519
12532
|
- Permissions: full-scans:list security-policy:read
|
|
12520
12533
|
|
|
12521
12534
|
Options
|
|
12522
|
-
${utils.getFlagListOutput(config.flags
|
|
12535
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12523
12536
|
|
|
12524
12537
|
When no output path is given the contents is sent to stdout.
|
|
12525
12538
|
|
|
@@ -12736,10 +12749,10 @@ async function configureScan(config) {
|
|
|
12736
12749
|
if (defaultRepoName === undefined) {
|
|
12737
12750
|
return canceledByUser();
|
|
12738
12751
|
}
|
|
12739
|
-
if (defaultRepoName
|
|
12752
|
+
if (defaultRepoName) {
|
|
12740
12753
|
// Even if it's 'socket-default-repository' store it because if we change
|
|
12741
12754
|
// this default then an existing user probably would not expect the change?
|
|
12742
|
-
config.repo = defaultRepoName
|
|
12755
|
+
config.repo = defaultRepoName;
|
|
12743
12756
|
} else {
|
|
12744
12757
|
delete config.repo;
|
|
12745
12758
|
}
|
|
@@ -12752,10 +12765,10 @@ async function configureScan(config) {
|
|
|
12752
12765
|
if (defaultBranchName === undefined) {
|
|
12753
12766
|
return canceledByUser();
|
|
12754
12767
|
}
|
|
12755
|
-
if (defaultBranchName
|
|
12768
|
+
if (defaultBranchName) {
|
|
12756
12769
|
// Even if it's 'socket-default-branch' store it because if we change
|
|
12757
12770
|
// this default then an existing user probably would not expect the change?
|
|
12758
|
-
config.branch = defaultBranchName
|
|
12771
|
+
config.branch = defaultBranchName;
|
|
12759
12772
|
} else {
|
|
12760
12773
|
delete config.branch;
|
|
12761
12774
|
}
|
|
@@ -12855,23 +12868,27 @@ async function configureGithub(config) {
|
|
|
12855
12868
|
if (defaultRepos === undefined) {
|
|
12856
12869
|
return canceledByUser();
|
|
12857
12870
|
}
|
|
12858
|
-
if (defaultRepos
|
|
12859
|
-
config.repos = defaultRepos
|
|
12871
|
+
if (defaultRepos) {
|
|
12872
|
+
config.repos = defaultRepos;
|
|
12860
12873
|
} else {
|
|
12861
12874
|
delete config.repos;
|
|
12862
12875
|
}
|
|
12863
12876
|
}
|
|
12864
12877
|
const defaultGithubApiUrl = await prompts.input({
|
|
12865
12878
|
message: '(--githubApiUrl) Do you want to override the default github url?',
|
|
12866
|
-
default: config.githubApiUrl ||
|
|
12879
|
+
default: config.githubApiUrl ||
|
|
12880
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
12881
|
+
constants.ENV.GITHUB_API_URL,
|
|
12867
12882
|
required: false
|
|
12868
12883
|
// validate: async string => bool
|
|
12869
12884
|
});
|
|
12870
12885
|
if (defaultGithubApiUrl === undefined) {
|
|
12871
12886
|
return canceledByUser();
|
|
12872
12887
|
}
|
|
12873
|
-
if (defaultGithubApiUrl
|
|
12874
|
-
|
|
12888
|
+
if (defaultGithubApiUrl &&
|
|
12889
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
12890
|
+
defaultGithubApiUrl !== constants.ENV.GITHUB_API_URL) {
|
|
12891
|
+
config.githubApiUrl = defaultGithubApiUrl;
|
|
12875
12892
|
} else {
|
|
12876
12893
|
delete config.githubApiUrl;
|
|
12877
12894
|
}
|
|
@@ -12884,8 +12901,8 @@ async function configureGithub(config) {
|
|
|
12884
12901
|
if (defaultOrgGithub === undefined) {
|
|
12885
12902
|
return canceledByUser();
|
|
12886
12903
|
}
|
|
12887
|
-
if (defaultOrgGithub
|
|
12888
|
-
config.orgGithub = defaultOrgGithub
|
|
12904
|
+
if (defaultOrgGithub) {
|
|
12905
|
+
config.orgGithub = defaultOrgGithub;
|
|
12889
12906
|
} else {
|
|
12890
12907
|
delete config.orgGithub;
|
|
12891
12908
|
}
|
|
@@ -12935,7 +12952,7 @@ const config$4 = {
|
|
|
12935
12952
|
$ ${command} [options] [CWD=.]
|
|
12936
12953
|
|
|
12937
12954
|
Options
|
|
12938
|
-
${utils.getFlagListOutput(config.flags
|
|
12955
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12939
12956
|
|
|
12940
12957
|
Interactive configurator to create a local json file in the target directory
|
|
12941
12958
|
that helps to set flag defaults for \`socket scan create\`.
|
|
@@ -13143,7 +13160,7 @@ const config$3 = {
|
|
|
13143
13160
|
When no output path is given the contents is sent to stdout.
|
|
13144
13161
|
|
|
13145
13162
|
Options
|
|
13146
|
-
${utils.getFlagListOutput(config.flags
|
|
13163
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13147
13164
|
|
|
13148
13165
|
Examples
|
|
13149
13166
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -13505,7 +13522,7 @@ const config$2 = {
|
|
|
13505
13522
|
sales@socket.dev if you are interested in purchasing this access.
|
|
13506
13523
|
|
|
13507
13524
|
Options
|
|
13508
|
-
${utils.getFlagListOutput(config.flags
|
|
13525
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13509
13526
|
|
|
13510
13527
|
Valid ecosystems:
|
|
13511
13528
|
|
|
@@ -13766,7 +13783,7 @@ const config$1 = {
|
|
|
13766
13783
|
tab completion that is registered for it in bash.
|
|
13767
13784
|
|
|
13768
13785
|
Options
|
|
13769
|
-
${utils.getFlagListOutput(config.flags
|
|
13786
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13770
13787
|
|
|
13771
13788
|
Examples
|
|
13772
13789
|
|
|
@@ -13963,7 +13980,7 @@ const config = {
|
|
|
13963
13980
|
$ ${command} <"on" | "off">
|
|
13964
13981
|
|
|
13965
13982
|
Options
|
|
13966
|
-
${utils.getFlagListOutput(config.flags
|
|
13983
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13967
13984
|
|
|
13968
13985
|
While enabled, the wrapper makes it so that when you call npm/npx on your
|
|
13969
13986
|
machine, it will automatically actually run \`socket npm\` / \`socket npx\`
|
|
@@ -14250,5 +14267,5 @@ void (async () => {
|
|
|
14250
14267
|
await utils.captureException(e);
|
|
14251
14268
|
}
|
|
14252
14269
|
})();
|
|
14253
|
-
//# debugId=
|
|
14270
|
+
//# debugId=80d770c9-f246-4187-bd69-9c4b33b9c563
|
|
14254
14271
|
//# sourceMappingURL=cli.js.map
|