socket 1.1.111 → 1.1.113
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/CHANGELOG.md +9 -1
- package/dist/cli.js +1600 -926
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts +70 -0
- package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts +14 -1
- package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts +58 -14
- package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts +43 -30
- package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts +18 -0
- package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts +12 -10
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts +70 -8
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts.map +1 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +1 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +6 -4
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +2 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
- package/dist/types/utils/glob.d.mts +1 -0
- package/dist/types/utils/glob.d.mts.map +1 -1
- package/dist/utils.js +35 -16
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
- package/requirements.json +1 -1
- package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts +0 -34
- package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glob.d.mts","sourceRoot":"","sources":["../../../src/utils/glob.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"glob.d.mts","sourceRoot":"","sources":["../../../src/utils/glob.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAA;AAMvD,eAAO,MAAM,YAAY,gIAcf,CAAA;AAmGV,mEAAmE;AACnE,kEAAkE;AAClE,qEAAqE;AACrE,uEAAuE;AACvE,uEAAqE;AACrE,4CAA4C;AAC5C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQ1D;AAuBD,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EACvC,cAAc,EAAE,sBAAsB,CAAC,yBAA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,18 +4493,36 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
4493
4493
|
...options
|
|
4494
4494
|
};
|
|
4495
4495
|
const ignores = new Set(IGNORED_DIR_PATTERNS);
|
|
4496
|
+
|
|
4497
|
+
// CLI-supplied `additionalIgnores` are already anchored minimatch — they
|
|
4498
|
+
// must not pass through the `ignore` package (whose gitignore "match
|
|
4499
|
+
// anywhere" semantics would re-interpret a bare `tests` to match
|
|
4500
|
+
// `subdir/tests/foo.json`). Keep them in fast-glob's ignore list across
|
|
4501
|
+
// both paths; only gitignore-translated entries go into the `ig` matcher.
|
|
4502
|
+
const cliMinimatchIgnores = additionalIgnores ?? [];
|
|
4496
4503
|
const projectIgnorePaths = socketConfig?.projectIgnorePaths;
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4504
|
+
const projectIgnoreGlobs = Array.isArray(projectIgnorePaths) ? ignoreFileLinesToGlobPatterns(projectIgnorePaths, path.join(cwd, '.gitignore'), cwd) : [];
|
|
4505
|
+
for (const pattern of projectIgnoreGlobs) {
|
|
4506
|
+
ignores.add(pattern);
|
|
4507
|
+
}
|
|
4508
|
+
|
|
4509
|
+
// The .gitignore discovery walk has to honor the same directory exclusions
|
|
4510
|
+
// as the package walk below. Otherwise an unreadable subtree (e.g. a
|
|
4511
|
+
// postgres `pgdata` dir owned by another uid, or a Docker volume mount) makes
|
|
4512
|
+
// fast-glob throw `EACCES: permission denied, scandir` *here* — before
|
|
4513
|
+
// --exclude-paths (`cliMinimatchIgnores`) or projectIgnorePaths are ever
|
|
4514
|
+
// applied to the main walk, which is why excluding the path did not help.
|
|
4515
|
+
// `suppressErrors` is the backstop: a directory the user simply cannot read
|
|
4516
|
+
// cannot contain manifests they could scan anyway, so skip it instead of
|
|
4517
|
+
// aborting the whole `socket fix` / `socket scan` run. Negated patterns are
|
|
4518
|
+
// dropped — for a discovery walk they could only re-include a subtree (never
|
|
4519
|
+
// prevent a crash), and fast-glob treats `!` ignore entries inconsistently.
|
|
4503
4520
|
const gitIgnoreStream = vendor.outExports.globStream(['**/.gitignore'], {
|
|
4504
4521
|
absolute: true,
|
|
4505
4522
|
cwd,
|
|
4506
4523
|
dot: true,
|
|
4507
|
-
ignore: DEFAULT_IGNORE_FOR_GIT_IGNORE
|
|
4524
|
+
ignore: [...DEFAULT_IGNORE_FOR_GIT_IGNORE, ...projectIgnoreGlobs, ...cliMinimatchIgnores].filter(p => p.charCodeAt(0) !== 33 /*'!'*/).map(stripTrailingSlash),
|
|
4525
|
+
suppressErrors: true
|
|
4508
4526
|
});
|
|
4509
4527
|
for await (const ignorePatterns of streams.transform(gitIgnoreStream, async filepath => ignoreFileToGlobPatterns((await fs$1.safeReadFile(filepath)) ?? '', filepath, cwd), {
|
|
4510
4528
|
concurrency: 8
|
|
@@ -4520,20 +4538,20 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
4520
4538
|
break;
|
|
4521
4539
|
}
|
|
4522
4540
|
}
|
|
4523
|
-
|
|
4524
|
-
// CLI-supplied `additionalIgnores` are already anchored minimatch — they
|
|
4525
|
-
// must not pass through the `ignore` package (whose gitignore "match
|
|
4526
|
-
// anywhere" semantics would re-interpret a bare `tests` to match
|
|
4527
|
-
// `subdir/tests/foo.json`). Keep them in fast-glob's ignore list across
|
|
4528
|
-
// both paths; only gitignore-translated entries go into the `ig` matcher.
|
|
4529
|
-
const cliMinimatchIgnores = additionalIgnores ?? [];
|
|
4530
4541
|
const globOptions = {
|
|
4531
4542
|
__proto__: null,
|
|
4532
4543
|
absolute: true,
|
|
4533
4544
|
cwd,
|
|
4534
4545
|
dot: true,
|
|
4535
4546
|
ignore: hasNegatedPattern ? [...globs.defaultIgnore, ...cliMinimatchIgnores] : [...ignores, ...cliMinimatchIgnores].map(stripTrailingSlash),
|
|
4536
|
-
...additionalOptions
|
|
4547
|
+
...additionalOptions,
|
|
4548
|
+
// Skip directories the running user cannot read rather than aborting the
|
|
4549
|
+
// whole walk on the first `EACCES` (see the .gitignore discovery walk
|
|
4550
|
+
// above for the full rationale). Pinned after `...additionalOptions` so a
|
|
4551
|
+
// caller's options bag cannot accidentally flip it back to `false` and
|
|
4552
|
+
// re-introduce the crash — `suppressErrors` is a safety invariant here, not
|
|
4553
|
+
// a tunable.
|
|
4554
|
+
suppressErrors: true
|
|
4537
4555
|
};
|
|
4538
4556
|
|
|
4539
4557
|
// When no filter is provided and no negated patterns exist, use the fast path.
|
|
@@ -8127,6 +8145,7 @@ function safeNpmSpecToPurl(pkgSpec) {
|
|
|
8127
8145
|
exports.ALL_PACKAGE_MANAGERS = ALL_PACKAGE_MANAGERS;
|
|
8128
8146
|
exports.AuthError = AuthError;
|
|
8129
8147
|
exports.COMPLETION_CMD_PREFIX = COMPLETION_CMD_PREFIX;
|
|
8148
|
+
exports.IGNORED_DIRS = IGNORED_DIRS;
|
|
8130
8149
|
exports.InputError = InputError;
|
|
8131
8150
|
exports.RangeStyles = RangeStyles;
|
|
8132
8151
|
exports.apiFetch = apiFetch;
|
|
@@ -8261,5 +8280,5 @@ exports.updateConfigValue = updateConfigValue;
|
|
|
8261
8280
|
exports.walkNestedMap = walkNestedMap;
|
|
8262
8281
|
exports.webLink = webLink;
|
|
8263
8282
|
exports.writeSocketJson = writeSocketJson;
|
|
8264
|
-
//# debugId=
|
|
8283
|
+
//# debugId=3b36bb48-c24b-4b38-abfd-00291354493e
|
|
8265
8284
|
//# sourceMappingURL=utils.js.map
|