socket 1.1.179 → 1.1.180
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 -0
- package/README.md +5 -5
- package/dist/cli.js +26 -11
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +1 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +4 -0
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +1 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.1.180](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.180) - 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- A failed Conda manifest step now stops `--auto-manifest` instead of uploading a scan that under-reports your `pip:` dependencies, matching how Gradle, Maven and sbt already behave.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `--auto-manifest` now reads whichever Conda environment file your project uses, `environment.yml` or `environment.yaml`. Repos on the `.yaml` spelling no longer need a `socket.json` workaround.
|
|
14
|
+
- The Conda `requirements.txt` now lands in the directory you targeted, so scans pick it up even when you run the CLI from somewhere else.
|
|
15
|
+
|
|
7
16
|
## [1.1.179](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.179) - 2026-09-24
|
|
8
17
|
|
|
9
18
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Socket CLI
|
|
2
2
|
|
|
3
3
|
[](https://socket.dev/npm/package/socket)
|
|
4
|
-
[](https://twitter.com/SocketSecurity)
|
|
5
|
+
[](https://bsky.app/profile/socket.dev)
|
|
6
6
|
|
|
7
7
|
CLI for [Socket.dev](https://socket.dev) — scan dependencies, audit packages, apply security patches, and gate installs from your terminal or CI. This is the 1.x line of the published `socket` package on npm.
|
|
8
8
|
|
|
@@ -138,8 +138,8 @@ MIT
|
|
|
138
138
|
<br/>
|
|
139
139
|
<div align="center">
|
|
140
140
|
<picture>
|
|
141
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.
|
|
142
|
-
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.
|
|
143
|
-
<img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.
|
|
141
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.180/assets/fleet/socket-combomark-dark.svg">
|
|
142
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.180/assets/fleet/socket-combomark-light.svg">
|
|
143
|
+
<img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.180/assets/fleet/socket-combomark-light.svg">
|
|
144
144
|
</picture>
|
|
145
145
|
</div>
|
package/dist/cli.js
CHANGED
|
@@ -4002,6 +4002,16 @@ async function runDynamicSbomInference({
|
|
|
4002
4002
|
// The point here is to attempt to detect the various supported manifest files
|
|
4003
4003
|
// the CLI can generate. This would be environments that we can't do server side
|
|
4004
4004
|
|
|
4005
|
+
// Conda reads both spellings of the environment file.
|
|
4006
|
+
function findCondaFile(cwd) {
|
|
4007
|
+
if (fs$1.existsSync(path.join(cwd, constants.ENVIRONMENT_YML))) {
|
|
4008
|
+
return constants.ENVIRONMENT_YML;
|
|
4009
|
+
}
|
|
4010
|
+
if (fs$1.existsSync(path.join(cwd, constants.ENVIRONMENT_YAML))) {
|
|
4011
|
+
return constants.ENVIRONMENT_YAML;
|
|
4012
|
+
}
|
|
4013
|
+
return '';
|
|
4014
|
+
}
|
|
4005
4015
|
async function detectManifestActions(
|
|
4006
4016
|
// Passing in null means we attempt detection for every supported language
|
|
4007
4017
|
// regardless of local socket.json status. Sometimes we want that.
|
|
@@ -4012,6 +4022,7 @@ sockJson, cwd = process.cwd()) {
|
|
|
4012
4022
|
// TODO
|
|
4013
4023
|
count: 0,
|
|
4014
4024
|
conda: false,
|
|
4025
|
+
condaFile: '',
|
|
4015
4026
|
gradle: false,
|
|
4016
4027
|
maven: false,
|
|
4017
4028
|
sbt: false
|
|
@@ -4049,13 +4060,11 @@ sockJson, cwd = process.cwd()) {
|
|
|
4049
4060
|
if (sockJson?.defaults?.manifest?.conda?.disabled) {
|
|
4050
4061
|
debug.debugLog('notice', `[DEBUG] - conda auto-detection is disabled in ${constants.SOCKET_JSON}`);
|
|
4051
4062
|
} else {
|
|
4052
|
-
const
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
const hasEnvyaml = !hasEnvyml && fs$1.existsSync(envyaml);
|
|
4056
|
-
if (hasEnvyml || hasEnvyaml) {
|
|
4057
|
-
debug.debugLog('notice', '[DEBUG] - Detected an environment.yml Conda file');
|
|
4063
|
+
const condaFile = findCondaFile(cwd);
|
|
4064
|
+
if (condaFile) {
|
|
4065
|
+
debug.debugLog('notice', `[DEBUG] - Detected the Conda file ${condaFile}`);
|
|
4058
4066
|
output.conda = true;
|
|
4067
|
+
output.condaFile = condaFile;
|
|
4059
4068
|
output.count += 1;
|
|
4060
4069
|
}
|
|
4061
4070
|
}
|
|
@@ -6898,7 +6907,10 @@ async function handleManifestConda({
|
|
|
6898
6907
|
verbose
|
|
6899
6908
|
}) {
|
|
6900
6909
|
const data = await convertCondaToRequirements(filename, cwd, verbose);
|
|
6901
|
-
|
|
6910
|
+
|
|
6911
|
+
// --auto-manifest only collects the generated file when it lands inside
|
|
6912
|
+
// the dir being scanned.
|
|
6913
|
+
await outputRequirements(data, outputKind, out === '-' ? out : path.resolve(cwd, out));
|
|
6902
6914
|
}
|
|
6903
6915
|
|
|
6904
6916
|
// Under --auto-manifest, a manifest generator that failed — raising the exit
|
|
@@ -7018,14 +7030,17 @@ async function generateAutoManifest({
|
|
|
7018
7030
|
abortManifestRunIfFailed('maven', beforeExitCode);
|
|
7019
7031
|
}
|
|
7020
7032
|
if (!sockJson?.defaults?.manifest?.conda?.disabled && detected.conda) {
|
|
7021
|
-
|
|
7033
|
+
const condaFile = sockJson.defaults?.manifest?.conda?.infile || detected.condaFile || constants.ENVIRONMENT_YML;
|
|
7034
|
+
logger.logger.log(`Detected ${condaFile}, running default Conda generator...`);
|
|
7035
|
+
const beforeExitCode = process.exitCode;
|
|
7022
7036
|
await handleManifestConda({
|
|
7023
7037
|
cwd,
|
|
7024
|
-
filename:
|
|
7038
|
+
filename: condaFile,
|
|
7025
7039
|
outputKind,
|
|
7026
7040
|
out: sockJson.defaults?.manifest?.conda?.outfile ?? constants.REQUIREMENTS_TXT,
|
|
7027
7041
|
verbose: Boolean(sockJson.defaults?.manifest?.conda?.verbose)
|
|
7028
7042
|
});
|
|
7043
|
+
abortManifestRunIfFailed('conda', beforeExitCode);
|
|
7029
7044
|
}
|
|
7030
7045
|
if (!sockJson?.defaults?.manifest?.bazel?.disabled && detected.bazel) {
|
|
7031
7046
|
const bazelConfig = sockJson?.defaults?.manifest?.bazel;
|
|
@@ -12420,7 +12435,7 @@ async function run$F(argv, importMeta, {
|
|
|
12420
12435
|
filename = sockJson.defaults?.manifest?.conda?.infile;
|
|
12421
12436
|
logger.logger.info(`Using default --file from ${constants.SOCKET_JSON}:`, filename);
|
|
12422
12437
|
} else {
|
|
12423
|
-
filename = constants.ENVIRONMENT_YML;
|
|
12438
|
+
filename = findCondaFile(cwd) || constants.ENVIRONMENT_YML;
|
|
12424
12439
|
}
|
|
12425
12440
|
}
|
|
12426
12441
|
if (stdout === undefined && sockJson.defaults?.manifest?.conda?.stdout !== undefined) {
|
|
@@ -24131,5 +24146,5 @@ process.on('unhandledRejection', async (reason, promise) => {
|
|
|
24131
24146
|
// eslint-disable-next-line n/no-process-exit
|
|
24132
24147
|
process.exit(1);
|
|
24133
24148
|
});
|
|
24134
|
-
//# debugId=
|
|
24149
|
+
//# debugId=d61b6b1f-4e7a-4403-b8f9-087745dd936f
|
|
24135
24150
|
//# sourceMappingURL=cli.js.map
|