snyk 1.1228.0 → 1.1229.0
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/917.index.js +6 -5
- package/dist/cli/917.index.js.map +1 -1
- package/help/cli-commands/README.md +9 -9
- package/help/cli-commands/code.md +3 -7
- package/help/cli-commands/container.md +3 -6
- package/help/cli-commands/sbom.md +97 -5
- package/package.json +1 -1
- package/src/generated/sha256sums.txt +7 -7
- package/src/generated/version +1 -1
- package/wrapper_dist/generated/sha256sums.txt +7 -7
- package/wrapper_dist/generated/version +1 -1
package/dist/cli/917.index.js
CHANGED
|
@@ -5656,14 +5656,18 @@ async function scan(options, policyEnginePath, rulesBundlePath, rulesClientURL)
|
|
|
5656
5656
|
exports.scan = scan;
|
|
5657
5657
|
async function scanWithConfig(options, policyEnginePath, rulesBundlePath, rulesClientURL, policyPath, outputPath) {
|
|
5658
5658
|
const env = { ...process.env };
|
|
5659
|
+
const apiUrl = config_1.default.API_REST_URL;
|
|
5660
|
+
if (apiUrl.startsWith('http://')) {
|
|
5661
|
+
console.warn('\nYou configured the Snyk CLI to use an API URL with an HTTP scheme. This option is insecure and might prevent the Snyk CLI from working correctly.');
|
|
5662
|
+
}
|
|
5659
5663
|
env['SNYK_IAC_TEST_API_REST_URL'] =
|
|
5660
|
-
process.env['SNYK_IAC_TEST_API_REST_URL'] ||
|
|
5664
|
+
process.env['SNYK_IAC_TEST_API_REST_URL'] || apiUrl;
|
|
5661
5665
|
env['SNYK_IAC_TEST_API_REST_TOKEN'] =
|
|
5662
5666
|
process.env['SNYK_IAC_TEST_API_REST_TOKEN'] || getApiToken();
|
|
5663
5667
|
env['SNYK_IAC_TEST_API_REST_OAUTH_TOKEN'] =
|
|
5664
5668
|
process.env['SNYK_IAC_TEST_API_REST_OAUTH_TOKEN'] || api_token_1.getOAuthToken();
|
|
5665
5669
|
env['SNYK_IAC_TEST_API_V1_URL'] =
|
|
5666
|
-
process.env['SNYK_IAC_TEST_API_V1_URL'] ||
|
|
5670
|
+
process.env['SNYK_IAC_TEST_API_V1_URL'] || apiUrl;
|
|
5667
5671
|
env['SNYK_IAC_TEST_API_V1_TOKEN'] =
|
|
5668
5672
|
process.env['SNYK_IAC_TEST_API_V1_TOKEN'] || getApiToken();
|
|
5669
5673
|
env['SNYK_IAC_TEST_API_V1_OAUTH_TOKEN'] =
|
|
@@ -5801,9 +5805,6 @@ async function remove(path) {
|
|
|
5801
5805
|
});
|
|
5802
5806
|
});
|
|
5803
5807
|
}
|
|
5804
|
-
function getApiUrl() {
|
|
5805
|
-
return config_1.default.API_REST_URL;
|
|
5806
|
-
}
|
|
5807
5808
|
function getApiToken() {
|
|
5808
5809
|
return api_token_1.api() || '';
|
|
5809
5810
|
}
|