@socketsecurity/cli-with-sentry 1.0.22 → 1.0.23
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 +87 -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/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.
|
|
@@ -3280,7 +3280,9 @@ function getOctokit() {
|
|
|
3280
3280
|
debug.debugFn('notice', 'miss: SOCKET_CLI_GITHUB_TOKEN env var');
|
|
3281
3281
|
}
|
|
3282
3282
|
_octokit = new vendor.Octokit({
|
|
3283
|
-
auth: SOCKET_CLI_GITHUB_TOKEN
|
|
3283
|
+
auth: SOCKET_CLI_GITHUB_TOKEN,
|
|
3284
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
3285
|
+
baseUrl: constants.ENV.GITHUB_API_URL
|
|
3284
3286
|
});
|
|
3285
3287
|
}
|
|
3286
3288
|
return _octokit;
|
|
@@ -3452,8 +3454,8 @@ async function enablePrAutoMerge({
|
|
|
3452
3454
|
}
|
|
3453
3455
|
if (error instanceof vendor.GraphqlResponseError && Array.isArray(error.errors) && error.errors.length) {
|
|
3454
3456
|
const details = error.errors.map(({
|
|
3455
|
-
message
|
|
3456
|
-
}) =>
|
|
3457
|
+
message: m
|
|
3458
|
+
}) => m.trim());
|
|
3457
3459
|
return {
|
|
3458
3460
|
enabled: false,
|
|
3459
3461
|
details
|
|
@@ -3626,7 +3628,10 @@ async function setGitRemoteGithubRepoUrl(owner, repo, token, cwd = process.cwd()
|
|
|
3626
3628
|
cwd,
|
|
3627
3629
|
stdio: 'ignore'
|
|
3628
3630
|
};
|
|
3629
|
-
const
|
|
3631
|
+
const {
|
|
3632
|
+
host
|
|
3633
|
+
} = new URL(constants.ENV.GITHUB_SERVER_URL);
|
|
3634
|
+
const url = `https://x-access-token:${token}@${host}/${owner}/${repo}`;
|
|
3630
3635
|
try {
|
|
3631
3636
|
await spawn.spawn('git', ['remote', 'set-url', 'origin', url], stdioIgnoreOptions);
|
|
3632
3637
|
} catch (e) {
|
|
@@ -4695,7 +4700,7 @@ const config$H = {
|
|
|
4695
4700
|
$ ${command} [options] [CWD=.]
|
|
4696
4701
|
|
|
4697
4702
|
Options
|
|
4698
|
-
${utils.getFlagListOutput(config.flags
|
|
4703
|
+
${utils.getFlagListOutput(config.flags)}
|
|
4699
4704
|
|
|
4700
4705
|
Examples
|
|
4701
4706
|
$ ${command}
|
|
@@ -4926,7 +4931,7 @@ const config$G = {
|
|
|
4926
4931
|
different alias for socket on your system.
|
|
4927
4932
|
|
|
4928
4933
|
Options
|
|
4929
|
-
${utils.getFlagListOutput(config.flags
|
|
4934
|
+
${utils.getFlagListOutput(config.flags)}
|
|
4930
4935
|
|
|
4931
4936
|
Examples
|
|
4932
4937
|
|
|
@@ -5195,7 +5200,7 @@ const config$E = {
|
|
|
5195
5200
|
Logs into the Socket API by prompting for an API key
|
|
5196
5201
|
|
|
5197
5202
|
Options
|
|
5198
|
-
${utils.getFlagListOutput(config.flags
|
|
5203
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5199
5204
|
|
|
5200
5205
|
Examples
|
|
5201
5206
|
$ ${command}
|
|
@@ -5650,7 +5655,7 @@ const config$B = {
|
|
|
5650
5655
|
$ ${command} [options] [CWD=.]
|
|
5651
5656
|
|
|
5652
5657
|
Options
|
|
5653
|
-
${utils.getFlagListOutput(config.flags
|
|
5658
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5654
5659
|
|
|
5655
5660
|
Tries to figure out what language your target repo uses. If it finds a
|
|
5656
5661
|
supported case then it will try to generate the manifest file for that
|
|
@@ -5770,7 +5775,7 @@ const config$A = {
|
|
|
5770
5775
|
contents of a file to have it processed.
|
|
5771
5776
|
|
|
5772
5777
|
Options
|
|
5773
|
-
${utils.getFlagListOutput(config.flags
|
|
5778
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5774
5779
|
|
|
5775
5780
|
Examples
|
|
5776
5781
|
|
|
@@ -5910,7 +5915,7 @@ const config$z = {
|
|
|
5910
5915
|
$ ${command} [options] [CWD=.]
|
|
5911
5916
|
|
|
5912
5917
|
Options
|
|
5913
|
-
${utils.getFlagListOutput(config.flags
|
|
5918
|
+
${utils.getFlagListOutput(config.flags)}
|
|
5914
5919
|
|
|
5915
5920
|
Uses gradle, preferably through your local project \`gradlew\`, to generate a
|
|
5916
5921
|
\`pom.xml\` file for each task. If you have no \`gradlew\` you can try the
|
|
@@ -6067,7 +6072,7 @@ const config$y = {
|
|
|
6067
6072
|
$ ${command} [options] [CWD=.]
|
|
6068
6073
|
|
|
6069
6074
|
Options
|
|
6070
|
-
${utils.getFlagListOutput(config.flags
|
|
6075
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6071
6076
|
|
|
6072
6077
|
Uses gradle, preferably through your local project \`gradlew\`, to generate a
|
|
6073
6078
|
\`pom.xml\` file for each task. If you have no \`gradlew\` you can try the
|
|
@@ -6226,7 +6231,7 @@ const config$x = {
|
|
|
6226
6231
|
$ ${command} [options] [CWD=.]
|
|
6227
6232
|
|
|
6228
6233
|
Options
|
|
6229
|
-
${utils.getFlagListOutput(config.flags
|
|
6234
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6230
6235
|
|
|
6231
6236
|
Uses \`sbt makePom\` to generate a \`pom.xml\` from your \`build.sbt\` file.
|
|
6232
6237
|
This xml file is the dependency manifest (like a package.json
|
|
@@ -6533,15 +6538,15 @@ async function setupConda(config) {
|
|
|
6533
6538
|
} else {
|
|
6534
6539
|
config.disabled = true;
|
|
6535
6540
|
}
|
|
6536
|
-
const
|
|
6537
|
-
if (
|
|
6541
|
+
const infile = await askForInputFile(config.infile || 'environment.yml');
|
|
6542
|
+
if (infile === undefined) {
|
|
6538
6543
|
return canceledByUser$1();
|
|
6539
|
-
} else if (
|
|
6544
|
+
} else if (infile === '-') {
|
|
6540
6545
|
config.stdin = true;
|
|
6541
6546
|
} else {
|
|
6542
6547
|
delete config.stdin;
|
|
6543
|
-
if (
|
|
6544
|
-
config.infile =
|
|
6548
|
+
if (infile) {
|
|
6549
|
+
config.infile = infile;
|
|
6545
6550
|
} else {
|
|
6546
6551
|
delete config.infile;
|
|
6547
6552
|
}
|
|
@@ -6564,8 +6569,8 @@ async function setupConda(config) {
|
|
|
6564
6569
|
config.stdout = true;
|
|
6565
6570
|
} else {
|
|
6566
6571
|
delete config.stdout;
|
|
6567
|
-
if (out
|
|
6568
|
-
config.outfile = out
|
|
6572
|
+
if (out) {
|
|
6573
|
+
config.outfile = out;
|
|
6569
6574
|
} else {
|
|
6570
6575
|
delete config.outfile;
|
|
6571
6576
|
}
|
|
@@ -6585,8 +6590,8 @@ async function setupGradle(config) {
|
|
|
6585
6590
|
const bin = await askForBin(config.bin || './gradlew');
|
|
6586
6591
|
if (bin === undefined) {
|
|
6587
6592
|
return canceledByUser$1();
|
|
6588
|
-
} else if (bin
|
|
6589
|
-
config.bin = bin
|
|
6593
|
+
} else if (bin) {
|
|
6594
|
+
config.bin = bin;
|
|
6590
6595
|
} else {
|
|
6591
6596
|
delete config.bin;
|
|
6592
6597
|
}
|
|
@@ -6598,8 +6603,8 @@ async function setupGradle(config) {
|
|
|
6598
6603
|
});
|
|
6599
6604
|
if (opts === undefined) {
|
|
6600
6605
|
return canceledByUser$1();
|
|
6601
|
-
} else if (opts
|
|
6602
|
-
config.gradleOpts = opts
|
|
6606
|
+
} else if (opts) {
|
|
6607
|
+
config.gradleOpts = opts;
|
|
6603
6608
|
} else {
|
|
6604
6609
|
delete config.gradleOpts;
|
|
6605
6610
|
}
|
|
@@ -6617,8 +6622,8 @@ async function setupSbt(config) {
|
|
|
6617
6622
|
const bin = await askForBin(config.bin || 'sbt');
|
|
6618
6623
|
if (bin === undefined) {
|
|
6619
6624
|
return canceledByUser$1();
|
|
6620
|
-
} else if (bin
|
|
6621
|
-
config.bin = bin
|
|
6625
|
+
} else if (bin) {
|
|
6626
|
+
config.bin = bin;
|
|
6622
6627
|
} else {
|
|
6623
6628
|
delete config.bin;
|
|
6624
6629
|
}
|
|
@@ -6630,8 +6635,8 @@ async function setupSbt(config) {
|
|
|
6630
6635
|
});
|
|
6631
6636
|
if (opts === undefined) {
|
|
6632
6637
|
return canceledByUser$1();
|
|
6633
|
-
} else if (opts
|
|
6634
|
-
config.sbtOpts = opts
|
|
6638
|
+
} else if (opts) {
|
|
6639
|
+
config.sbtOpts = opts;
|
|
6635
6640
|
} else {
|
|
6636
6641
|
delete config.sbtOpts;
|
|
6637
6642
|
}
|
|
@@ -6653,8 +6658,8 @@ async function setupSbt(config) {
|
|
|
6653
6658
|
config.stdout = true;
|
|
6654
6659
|
} else {
|
|
6655
6660
|
delete config.stdout;
|
|
6656
|
-
if (out
|
|
6657
|
-
config.outfile = out
|
|
6661
|
+
if (out) {
|
|
6662
|
+
config.outfile = out;
|
|
6658
6663
|
} else {
|
|
6659
6664
|
delete config.outfile;
|
|
6660
6665
|
}
|
|
@@ -6795,7 +6800,7 @@ const config$w = {
|
|
|
6795
6800
|
$ ${command} [CWD=.]
|
|
6796
6801
|
|
|
6797
6802
|
Options
|
|
6798
|
-
${utils.getFlagListOutput(config.flags
|
|
6803
|
+
${utils.getFlagListOutput(config.flags)}
|
|
6799
6804
|
|
|
6800
6805
|
This command will try to detect all supported ecosystems in given CWD. Then
|
|
6801
6806
|
it starts a configurator where you can setup default values for certain flags
|
|
@@ -7771,7 +7776,7 @@ const config$r = {
|
|
|
7771
7776
|
$ ${command} [options] [CWD=.]
|
|
7772
7777
|
|
|
7773
7778
|
Options
|
|
7774
|
-
${utils.getFlagListOutput(config.flags
|
|
7779
|
+
${utils.getFlagListOutput(config.flags)}
|
|
7775
7780
|
|
|
7776
7781
|
Examples
|
|
7777
7782
|
$ ${command}
|
|
@@ -7938,7 +7943,7 @@ const config$q = {
|
|
|
7938
7943
|
- Permissions: none (does need token with access to target org)
|
|
7939
7944
|
|
|
7940
7945
|
Options
|
|
7941
|
-
${utils.getFlagListOutput(config.flags
|
|
7946
|
+
${utils.getFlagListOutput(config.flags)}
|
|
7942
7947
|
|
|
7943
7948
|
Examples
|
|
7944
7949
|
${command}
|
|
@@ -8062,7 +8067,7 @@ const config$p = {
|
|
|
8062
8067
|
- Permissions: license-policy:read
|
|
8063
8068
|
|
|
8064
8069
|
Options
|
|
8065
|
-
${utils.getFlagListOutput(config$p.flags
|
|
8070
|
+
${utils.getFlagListOutput(config$p.flags)}
|
|
8066
8071
|
|
|
8067
8072
|
Your API token will need the \`license-policy:read\` permission otherwise
|
|
8068
8073
|
the request will fail with an authentication error.
|
|
@@ -8190,7 +8195,7 @@ const config$o = {
|
|
|
8190
8195
|
- Permissions: security-policy:read
|
|
8191
8196
|
|
|
8192
8197
|
Options
|
|
8193
|
-
${utils.getFlagListOutput(config$o.flags
|
|
8198
|
+
${utils.getFlagListOutput(config$o.flags)}
|
|
8194
8199
|
|
|
8195
8200
|
Your API token will need the \`security-policy:read\` permission otherwise
|
|
8196
8201
|
the request will fail with an authentication error.
|
|
@@ -8331,7 +8336,7 @@ const config$n = {
|
|
|
8331
8336
|
- Permissions: none (does need a token)
|
|
8332
8337
|
|
|
8333
8338
|
Options
|
|
8334
|
-
${utils.getFlagListOutput(config$n.flags
|
|
8339
|
+
${utils.getFlagListOutput(config$n.flags)}
|
|
8335
8340
|
|
|
8336
8341
|
Examples
|
|
8337
8342
|
$ ${command}
|
|
@@ -8459,7 +8464,7 @@ const config$m = {
|
|
|
8459
8464
|
$ ${command} [options]
|
|
8460
8465
|
|
|
8461
8466
|
Options
|
|
8462
|
-
${utils.getFlagListOutput(config$m.flags
|
|
8467
|
+
${utils.getFlagListOutput(config$m.flags)}
|
|
8463
8468
|
|
|
8464
8469
|
Examples
|
|
8465
8470
|
$ ${command}
|
|
@@ -8785,7 +8790,7 @@ const config$l = {
|
|
|
8785
8790
|
- Permissions: packages:list
|
|
8786
8791
|
|
|
8787
8792
|
Options
|
|
8788
|
-
${utils.getFlagListOutput(config.flags
|
|
8793
|
+
${utils.getFlagListOutput(config.flags)}
|
|
8789
8794
|
|
|
8790
8795
|
Show deep scoring details for one package. The score will reflect the package
|
|
8791
8796
|
itself, any of its dependencies, and any of its transitive dependencies.
|
|
@@ -9136,7 +9141,7 @@ const config$k = {
|
|
|
9136
9141
|
- Permissions: packages:list
|
|
9137
9142
|
|
|
9138
9143
|
Options
|
|
9139
|
-
${utils.getFlagListOutput(config.flags
|
|
9144
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9140
9145
|
|
|
9141
9146
|
Show scoring details for one or more packages purely based on their own package.
|
|
9142
9147
|
This means that any dependency scores are not reflected by the score. You can
|
|
@@ -9490,7 +9495,7 @@ const config$h = {
|
|
|
9490
9495
|
The REPO name should be a "slug". Follows the same naming convention as GitHub.
|
|
9491
9496
|
|
|
9492
9497
|
Options
|
|
9493
|
-
${utils.getFlagListOutput(config.flags
|
|
9498
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9494
9499
|
|
|
9495
9500
|
Examples
|
|
9496
9501
|
$ ${command} test-repo
|
|
@@ -9622,7 +9627,7 @@ const config$g = {
|
|
|
9622
9627
|
- Permissions: repo:delete
|
|
9623
9628
|
|
|
9624
9629
|
Options
|
|
9625
|
-
${utils.getFlagListOutput(config.flags
|
|
9630
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9626
9631
|
|
|
9627
9632
|
Examples
|
|
9628
9633
|
$ ${command} test-repo
|
|
@@ -9903,7 +9908,7 @@ const config$f = {
|
|
|
9903
9908
|
- Permissions: repo:list
|
|
9904
9909
|
|
|
9905
9910
|
Options
|
|
9906
|
-
${utils.getFlagListOutput(config.flags
|
|
9911
|
+
${utils.getFlagListOutput(config.flags)}
|
|
9907
9912
|
|
|
9908
9913
|
Examples
|
|
9909
9914
|
$ ${command}
|
|
@@ -10089,7 +10094,7 @@ const config$e = {
|
|
|
10089
10094
|
- Permissions: repo:update
|
|
10090
10095
|
|
|
10091
10096
|
Options
|
|
10092
|
-
${utils.getFlagListOutput(config.flags
|
|
10097
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10093
10098
|
|
|
10094
10099
|
Examples
|
|
10095
10100
|
$ ${command} test-repo
|
|
@@ -10246,7 +10251,7 @@ const config$d = {
|
|
|
10246
10251
|
- Permissions: repo:list
|
|
10247
10252
|
|
|
10248
10253
|
Options
|
|
10249
|
-
${utils.getFlagListOutput(config.flags
|
|
10254
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10250
10255
|
|
|
10251
10256
|
Examples
|
|
10252
10257
|
$ ${command} test-repo
|
|
@@ -10457,7 +10462,7 @@ const config$c = {
|
|
|
10457
10462
|
- Permissions: full-scans:create
|
|
10458
10463
|
|
|
10459
10464
|
Options
|
|
10460
|
-
${utils.getFlagListOutput(config.flags
|
|
10465
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10461
10466
|
|
|
10462
10467
|
Uploads the specified dependency manifest files for Go, Gradle, JavaScript,
|
|
10463
10468
|
Kotlin, Python, and Scala. Files like "package.json" and "requirements.txt".
|
|
@@ -10745,7 +10750,7 @@ const config$b = {
|
|
|
10745
10750
|
- Permissions: full-scans:delete
|
|
10746
10751
|
|
|
10747
10752
|
Options
|
|
10748
|
-
${utils.getFlagListOutput(config.flags
|
|
10753
|
+
${utils.getFlagListOutput(config.flags)}
|
|
10749
10754
|
|
|
10750
10755
|
Examples
|
|
10751
10756
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -11045,7 +11050,7 @@ const config$a = {
|
|
|
11045
11050
|
added/removed list (similar to diffing two files with git).
|
|
11046
11051
|
|
|
11047
11052
|
Options
|
|
11048
|
-
${utils.getFlagListOutput(config.flags
|
|
11053
|
+
${utils.getFlagListOutput(config.flags)}
|
|
11049
11054
|
|
|
11050
11055
|
Examples
|
|
11051
11056
|
$ ${command} aaa0aa0a-aaaa-0000-0a0a-0000000a00a0 aaa1aa1a-aaaa-1111-1a1a-1111111a11a1
|
|
@@ -11141,7 +11146,7 @@ async function createScanFromGithub({
|
|
|
11141
11146
|
outputKind,
|
|
11142
11147
|
repos
|
|
11143
11148
|
}) {
|
|
11144
|
-
let targetRepos = repos.trim().split(',').map(
|
|
11149
|
+
let targetRepos = repos.trim().split(',').map(r => r.trim()).filter(Boolean);
|
|
11145
11150
|
if (all || targetRepos.length === 0) {
|
|
11146
11151
|
// Fetch from Socket API
|
|
11147
11152
|
const result = await fetchListAllRepos({
|
|
@@ -11154,7 +11159,7 @@ async function createScanFromGithub({
|
|
|
11154
11159
|
}
|
|
11155
11160
|
targetRepos = result.data.results.map(obj => obj.slug || '');
|
|
11156
11161
|
}
|
|
11157
|
-
targetRepos = targetRepos.map(
|
|
11162
|
+
targetRepos = targetRepos.map(s => s.trim()).filter(Boolean);
|
|
11158
11163
|
logger.logger.info(`Have ${targetRepos.length} repo names to Scan!`);
|
|
11159
11164
|
logger.logger.log('');
|
|
11160
11165
|
if (!targetRepos.filter(Boolean).length) {
|
|
@@ -11828,7 +11833,7 @@ const config$9 = {
|
|
|
11828
11833
|
You can use \`socket scan setup\` to configure certain repo flag defaults.
|
|
11829
11834
|
|
|
11830
11835
|
Options
|
|
11831
|
-
${utils.getFlagListOutput(config.flags
|
|
11836
|
+
${utils.getFlagListOutput(config.flags)}
|
|
11832
11837
|
|
|
11833
11838
|
Examples
|
|
11834
11839
|
$ ${command}
|
|
@@ -12144,7 +12149,7 @@ const config$8 = {
|
|
|
12144
12149
|
\`--branch\` to filter by branch across all repos).
|
|
12145
12150
|
|
|
12146
12151
|
Options
|
|
12147
|
-
${utils.getFlagListOutput(config.flags
|
|
12152
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12148
12153
|
|
|
12149
12154
|
Examples
|
|
12150
12155
|
$ ${command}
|
|
@@ -12302,7 +12307,7 @@ const config$7 = {
|
|
|
12302
12307
|
- Permissions: full-scans:list
|
|
12303
12308
|
|
|
12304
12309
|
Options
|
|
12305
|
-
${utils.getFlagListOutput(config.flags
|
|
12310
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12306
12311
|
|
|
12307
12312
|
Examples
|
|
12308
12313
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -12421,7 +12426,7 @@ const config$6 = {
|
|
|
12421
12426
|
$ ${command} [options] [CWD=.]
|
|
12422
12427
|
|
|
12423
12428
|
Options
|
|
12424
|
-
${utils.getFlagListOutput(config.flags
|
|
12429
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12425
12430
|
|
|
12426
12431
|
Examples
|
|
12427
12432
|
$ ${command}
|
|
@@ -12519,7 +12524,7 @@ const config$5 = {
|
|
|
12519
12524
|
- Permissions: full-scans:list security-policy:read
|
|
12520
12525
|
|
|
12521
12526
|
Options
|
|
12522
|
-
${utils.getFlagListOutput(config.flags
|
|
12527
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12523
12528
|
|
|
12524
12529
|
When no output path is given the contents is sent to stdout.
|
|
12525
12530
|
|
|
@@ -12736,10 +12741,10 @@ async function configureScan(config) {
|
|
|
12736
12741
|
if (defaultRepoName === undefined) {
|
|
12737
12742
|
return canceledByUser();
|
|
12738
12743
|
}
|
|
12739
|
-
if (defaultRepoName
|
|
12744
|
+
if (defaultRepoName) {
|
|
12740
12745
|
// Even if it's 'socket-default-repository' store it because if we change
|
|
12741
12746
|
// this default then an existing user probably would not expect the change?
|
|
12742
|
-
config.repo = defaultRepoName
|
|
12747
|
+
config.repo = defaultRepoName;
|
|
12743
12748
|
} else {
|
|
12744
12749
|
delete config.repo;
|
|
12745
12750
|
}
|
|
@@ -12752,10 +12757,10 @@ async function configureScan(config) {
|
|
|
12752
12757
|
if (defaultBranchName === undefined) {
|
|
12753
12758
|
return canceledByUser();
|
|
12754
12759
|
}
|
|
12755
|
-
if (defaultBranchName
|
|
12760
|
+
if (defaultBranchName) {
|
|
12756
12761
|
// Even if it's 'socket-default-branch' store it because if we change
|
|
12757
12762
|
// this default then an existing user probably would not expect the change?
|
|
12758
|
-
config.branch = defaultBranchName
|
|
12763
|
+
config.branch = defaultBranchName;
|
|
12759
12764
|
} else {
|
|
12760
12765
|
delete config.branch;
|
|
12761
12766
|
}
|
|
@@ -12855,23 +12860,27 @@ async function configureGithub(config) {
|
|
|
12855
12860
|
if (defaultRepos === undefined) {
|
|
12856
12861
|
return canceledByUser();
|
|
12857
12862
|
}
|
|
12858
|
-
if (defaultRepos
|
|
12859
|
-
config.repos = defaultRepos
|
|
12863
|
+
if (defaultRepos) {
|
|
12864
|
+
config.repos = defaultRepos;
|
|
12860
12865
|
} else {
|
|
12861
12866
|
delete config.repos;
|
|
12862
12867
|
}
|
|
12863
12868
|
}
|
|
12864
12869
|
const defaultGithubApiUrl = await prompts.input({
|
|
12865
12870
|
message: '(--githubApiUrl) Do you want to override the default github url?',
|
|
12866
|
-
default: config.githubApiUrl ||
|
|
12871
|
+
default: config.githubApiUrl ||
|
|
12872
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
12873
|
+
constants.ENV.GITHUB_API_URL,
|
|
12867
12874
|
required: false
|
|
12868
12875
|
// validate: async string => bool
|
|
12869
12876
|
});
|
|
12870
12877
|
if (defaultGithubApiUrl === undefined) {
|
|
12871
12878
|
return canceledByUser();
|
|
12872
12879
|
}
|
|
12873
|
-
if (defaultGithubApiUrl
|
|
12874
|
-
|
|
12880
|
+
if (defaultGithubApiUrl &&
|
|
12881
|
+
// Lazily access constants.ENV.GITHUB_API_URL.
|
|
12882
|
+
defaultGithubApiUrl !== constants.ENV.GITHUB_API_URL) {
|
|
12883
|
+
config.githubApiUrl = defaultGithubApiUrl;
|
|
12875
12884
|
} else {
|
|
12876
12885
|
delete config.githubApiUrl;
|
|
12877
12886
|
}
|
|
@@ -12884,8 +12893,8 @@ async function configureGithub(config) {
|
|
|
12884
12893
|
if (defaultOrgGithub === undefined) {
|
|
12885
12894
|
return canceledByUser();
|
|
12886
12895
|
}
|
|
12887
|
-
if (defaultOrgGithub
|
|
12888
|
-
config.orgGithub = defaultOrgGithub
|
|
12896
|
+
if (defaultOrgGithub) {
|
|
12897
|
+
config.orgGithub = defaultOrgGithub;
|
|
12889
12898
|
} else {
|
|
12890
12899
|
delete config.orgGithub;
|
|
12891
12900
|
}
|
|
@@ -12935,7 +12944,7 @@ const config$4 = {
|
|
|
12935
12944
|
$ ${command} [options] [CWD=.]
|
|
12936
12945
|
|
|
12937
12946
|
Options
|
|
12938
|
-
${utils.getFlagListOutput(config.flags
|
|
12947
|
+
${utils.getFlagListOutput(config.flags)}
|
|
12939
12948
|
|
|
12940
12949
|
Interactive configurator to create a local json file in the target directory
|
|
12941
12950
|
that helps to set flag defaults for \`socket scan create\`.
|
|
@@ -13143,7 +13152,7 @@ const config$3 = {
|
|
|
13143
13152
|
When no output path is given the contents is sent to stdout.
|
|
13144
13153
|
|
|
13145
13154
|
Options
|
|
13146
|
-
${utils.getFlagListOutput(config.flags
|
|
13155
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13147
13156
|
|
|
13148
13157
|
Examples
|
|
13149
13158
|
$ ${command} 000aaaa1-0000-0a0a-00a0-00a0000000a0
|
|
@@ -13505,7 +13514,7 @@ const config$2 = {
|
|
|
13505
13514
|
sales@socket.dev if you are interested in purchasing this access.
|
|
13506
13515
|
|
|
13507
13516
|
Options
|
|
13508
|
-
${utils.getFlagListOutput(config.flags
|
|
13517
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13509
13518
|
|
|
13510
13519
|
Valid ecosystems:
|
|
13511
13520
|
|
|
@@ -13766,7 +13775,7 @@ const config$1 = {
|
|
|
13766
13775
|
tab completion that is registered for it in bash.
|
|
13767
13776
|
|
|
13768
13777
|
Options
|
|
13769
|
-
${utils.getFlagListOutput(config.flags
|
|
13778
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13770
13779
|
|
|
13771
13780
|
Examples
|
|
13772
13781
|
|
|
@@ -13963,7 +13972,7 @@ const config = {
|
|
|
13963
13972
|
$ ${command} <"on" | "off">
|
|
13964
13973
|
|
|
13965
13974
|
Options
|
|
13966
|
-
${utils.getFlagListOutput(config.flags
|
|
13975
|
+
${utils.getFlagListOutput(config.flags)}
|
|
13967
13976
|
|
|
13968
13977
|
While enabled, the wrapper makes it so that when you call npm/npx on your
|
|
13969
13978
|
machine, it will automatically actually run \`socket npm\` / \`socket npx\`
|
|
@@ -14250,5 +14259,5 @@ void (async () => {
|
|
|
14250
14259
|
await utils.captureException(e);
|
|
14251
14260
|
}
|
|
14252
14261
|
})();
|
|
14253
|
-
//# debugId=
|
|
14262
|
+
//# debugId=3366e965-b082-456e-8e60-114997e8eaf0
|
|
14254
14263
|
//# sourceMappingURL=cli.js.map
|