socket 0.14.13 → 0.14.14
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 +8 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -90,7 +90,12 @@ const yargsConfig = {
|
|
|
90
90
|
//evidence: false,
|
|
91
91
|
//'include-crypto': false,
|
|
92
92
|
//'include-formulation': false,
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
// Default 'install-deps' to `false` and 'lifecycle' to 'pre-build' to
|
|
95
|
+
// sidestep arbitrary code execution during a cdxgen scan.
|
|
96
|
+
// https://github.com/CycloneDX/cdxgen/issues/1328
|
|
97
|
+
'install-deps': false,
|
|
98
|
+
lifecycle: 'pre-build',
|
|
94
99
|
//output: 'bom.json',
|
|
95
100
|
//profile: 'generic',
|
|
96
101
|
//'project-version': '',
|
|
@@ -127,7 +132,7 @@ const yargsConfig = {
|
|
|
127
132
|
type: 'string'
|
|
128
133
|
}],
|
|
129
134
|
boolean: ['auto-compositions', 'babel', 'deep', 'evidence', 'fail-on-error', 'generate-key-and-sign', 'help', 'include-formulation', 'include-crypto', 'install-deps', 'print', 'required-only', 'server', 'validate', 'version'],
|
|
130
|
-
string: ['api-key', 'output', 'parent-project-id', 'profile', 'project-group', 'project-name', 'project-version', 'project-id', 'server-host', 'server-port', 'server-url', 'spec-version']
|
|
135
|
+
string: ['api-key', 'lifecycle', 'output', 'parent-project-id', 'profile', 'project-group', 'project-name', 'project-version', 'project-id', 'server-host', 'server-port', 'server-url', 'spec-version']
|
|
131
136
|
};
|
|
132
137
|
function argvToArray(argv) {
|
|
133
138
|
if (argv['help']) return ['--help'];
|
|
@@ -144,7 +149,7 @@ function argvToArray(argv) {
|
|
|
144
149
|
} else if (value === true) {
|
|
145
150
|
result.push(`--${key}`);
|
|
146
151
|
} else if (typeof value === 'string') {
|
|
147
|
-
result.push(`--${key}
|
|
152
|
+
result.push(`--${key}`, String(value));
|
|
148
153
|
} else if (Array.isArray(value)) {
|
|
149
154
|
result.push(`--${key}`, ...value.map(String));
|
|
150
155
|
}
|