@socketsecurity/cli-with-sentry 1.1.97 → 1.1.98
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 +5 -0
- package/dist/cli.js +49 -17
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/utils/api.d.mts +5 -3
- package/dist/types/utils/api.d.mts.map +1 -1
- package/dist/types/utils/coana.d.mts +35 -0
- package/dist/types/utils/coana.d.mts.map +1 -1
- package/dist/utils.js +131 -28
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
10
10
|
- **`socket manifest bazel [beta]`** — Generate Bazel JVM SBOM manifests by running `bazel query` against discovered Maven repos in a Bazel workspace. Closes the inline-Maven-declaration gap that lockfile-only parsing misses for repos like envoy, ray, tensorflow, tink-java, and or-tools. Auto-detects Bzlmod and legacy `WORKSPACE`.
|
|
11
11
|
- **`socket scan create --auto-manifest`** now covers Bazel workspaces in addition to Gradle/Scala/Kotlin/Conda. Repos with `MODULE.bazel`, `WORKSPACE`, or `WORKSPACE.bazel` are detected automatically and their Maven dependencies extracted as part of the standard scan-create flow.
|
|
12
12
|
|
|
13
|
+
## [1.1.98](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.98) - 2026-05-20
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- `socket scan create --reach` now uploads the reachability facts file as brotli on the wire, shrinking mono-repo upload sizes by roughly 85% with no change to the on-disk or stored format. Faster scan submissions on slow connections.
|
|
17
|
+
|
|
13
18
|
## [1.1.97](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.97) - 2026-05-18
|
|
14
19
|
|
|
15
20
|
### Changed
|
package/dist/cli.js
CHANGED
|
@@ -2826,6 +2826,21 @@ function bazelExternalDir(cwd, outputBase) {
|
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
2828
|
|
|
2829
|
+
// Internal diagnostic: when truthy, skip the unsorted_deps.json fast path
|
|
2830
|
+
// and force the bazel-query regex fallback. Used by bazel-bench to
|
|
2831
|
+
// deterministically exercise parseBazelBuildOutput on every CI run. Truthy
|
|
2832
|
+
// values are '1', 'true', 'yes' (case-insensitive); anything else (unset,
|
|
2833
|
+
// '', '0', 'false') is treated as off. Not exposed as a user-facing CLI
|
|
2834
|
+
// flag, so it is read here rather than added to constants.mts.
|
|
2835
|
+
function isForceQueryFallbackEnabled() {
|
|
2836
|
+
const raw = process.env['SOCKET_BAZEL_FORCE_QUERY_FALLBACK'];
|
|
2837
|
+
if (!raw) {
|
|
2838
|
+
return false;
|
|
2839
|
+
}
|
|
2840
|
+
const normalized = raw.toLowerCase();
|
|
2841
|
+
return normalized === '1' || normalized === 'true' || normalized === 'yes';
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2829
2844
|
// Tries `external/<repo>/unsorted_deps.json` first; falls back to parsing the
|
|
2830
2845
|
// probe stdout the caller already captured during discovery. Discovery runs
|
|
2831
2846
|
// the same `kind("jvm_import rule|aar_import rule", @<repo>//:*)` query that
|
|
@@ -2841,7 +2856,11 @@ async function extractFromOneRepo(repoName, queryOpts, cachedProbeStdout) {
|
|
|
2841
2856
|
if (verbose) {
|
|
2842
2857
|
logger.logger.log(`[VERBOSE] @${repoName}: external dir:`, externalDir ?? '(unresolved — bazel-out symlink absent)');
|
|
2843
2858
|
}
|
|
2844
|
-
const
|
|
2859
|
+
const forceFallback = isForceQueryFallbackEnabled();
|
|
2860
|
+
if (forceFallback && verbose) {
|
|
2861
|
+
logger.logger.log(`[VERBOSE] @${repoName}: SOCKET_BAZEL_FORCE_QUERY_FALLBACK set; skipping unsorted_deps.json fast path.`);
|
|
2862
|
+
}
|
|
2863
|
+
const candidates = forceFallback ? [] : externalDir ? [path.join(externalDir, repoName, 'unsorted_deps.json')] : [];
|
|
2845
2864
|
for (const c of candidates) {
|
|
2846
2865
|
if (fs$1.existsSync(c)) {
|
|
2847
2866
|
// Bound the read to 1GB to prevent OOM on hostile content while allowing large real-world lockfiles.
|
|
@@ -3727,21 +3746,34 @@ async function handleCreateNewScan({
|
|
|
3727
3746
|
scanPaths = [...pathsForScan, ...(reachabilityReport ? [reachabilityReport] : [])];
|
|
3728
3747
|
tier1ReachabilityScanId = reachResult.data?.tier1ReachabilityScanId;
|
|
3729
3748
|
}
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3749
|
+
|
|
3750
|
+
// Brotli-compress any .socket.facts.json paths in scanPaths just before
|
|
3751
|
+
// upload. depscan's api-v0 multipart boundary streams brotli decode based
|
|
3752
|
+
// on the .br filename suffix. Coana keeps writing plain .socket.facts.json
|
|
3753
|
+
// on disk, so the local read paths (extractTier1ReachabilityScanId,
|
|
3754
|
+
// extractReachabilityErrors) stay correct. The cleanup() in the finally
|
|
3755
|
+
// block removes the temp dirs whether the upload succeeded or threw.
|
|
3756
|
+
const compressed = await utils.compressSocketFactsForUpload(scanPaths);
|
|
3757
|
+
let fullScanCResult;
|
|
3758
|
+
try {
|
|
3759
|
+
fullScanCResult = await fetchCreateOrgFullScan(compressed.paths, orgSlug, {
|
|
3760
|
+
commitHash,
|
|
3761
|
+
commitMessage,
|
|
3762
|
+
committers,
|
|
3763
|
+
pullRequest,
|
|
3764
|
+
repoName,
|
|
3765
|
+
branchName,
|
|
3766
|
+
scanType: reach.runReachabilityAnalysis ? constants.default.SCAN_TYPE_SOCKET_TIER1 : constants.default.SCAN_TYPE_SOCKET,
|
|
3767
|
+
workspace
|
|
3768
|
+
}, {
|
|
3769
|
+
cwd,
|
|
3770
|
+
defaultBranch,
|
|
3771
|
+
pendingHead,
|
|
3772
|
+
tmp
|
|
3773
|
+
});
|
|
3774
|
+
} finally {
|
|
3775
|
+
await compressed.cleanup();
|
|
3776
|
+
}
|
|
3745
3777
|
const scanId = fullScanCResult.ok ? fullScanCResult.data?.id : undefined;
|
|
3746
3778
|
if (reach && scanId && tier1ReachabilityScanId) {
|
|
3747
3779
|
await finalizeTier1Scan(tier1ReachabilityScanId, scanId);
|
|
@@ -17223,5 +17255,5 @@ process.on('unhandledRejection', async (reason, promise) => {
|
|
|
17223
17255
|
// eslint-disable-next-line n/no-process-exit
|
|
17224
17256
|
process.exit(1);
|
|
17225
17257
|
});
|
|
17226
|
-
//# debugId=
|
|
17258
|
+
//# debugId=70895ae2-8c82-49e4-a1fb-3cbc0ccb2c57
|
|
17227
17259
|
//# sourceMappingURL=cli.js.map
|