diff --git a/cliv2/cmd/cliv2/main.go b/cliv2/cmd/cliv2/main.go index 84519f99d6..2844da07af 100644 --- a/cliv2/cmd/cliv2/main.go +++ b/cliv2/cmd/cliv2/main.go @@ -94,6 +94,10 @@ func initApplicationConfiguration(config configuration.Configuration) { config.AddAlternativeKeys(configuration.ORGANIZATION, []string{"snyk_cfg_org"}) config.AddAlternativeKeys(configuration.PREVIEW_FEATURES_ENABLED, []string{"snyk_preview"}) config.AddAlternativeKeys(configuration.LOG_LEVEL, []string{debug_level_flag}) + + // we'll also need to explicitly add support for these environment variables + config.SetSupportedEnvVarPrefixes("snyk_", "internal_", "test_") + config.SetSupportedEnvVars("NODE_EXTRA_CA_CERTS", "disable-analytics", "disable_analytics", "endpoint", "api") } func getFullCommandString(cmd *cobra.Command) string { diff --git a/cliv2/go.mod b/cliv2/go.mod index 0342057196..1d4d46139a 100644 --- a/cliv2/go.mod +++ b/cliv2/go.mod @@ -17,7 +17,7 @@ require ( github.com/snyk/cli-extension-sbom v0.0.0-20240820111700-68258cba52c7 github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7 github.com/snyk/error-catalog-golang-public v0.0.0-20240809094525-c48d19c27edb - github.com/snyk/go-application-framework v0.0.0-20241011135148-71eca49aa231 + github.com/snyk/go-application-framework v0.0.0-20241016204737-72e7fd400ae3 github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 github.com/snyk/snyk-iac-capture v0.6.5 github.com/snyk/snyk-ls v0.0.0-20241009134219-56a46746f0be diff --git a/cliv2/go.sum b/cliv2/go.sum index 60148b51b1..9d0de444d9 100644 --- a/cliv2/go.sum +++ b/cliv2/go.sum @@ -762,8 +762,8 @@ github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7 h1:Zn5BcV76oFAb github.com/snyk/container-cli v0.0.0-20240821111304-7ca1c415a5d7/go.mod h1:38w+dcAQp9eG3P5t2eNS9eG0reut10AeJjLv5lJ5lpM= github.com/snyk/error-catalog-golang-public v0.0.0-20240809094525-c48d19c27edb h1:w9tJhpTFxWqAhLeraGsMExDjGK9x5Dwj1NRFwb+t+QE= github.com/snyk/error-catalog-golang-public v0.0.0-20240809094525-c48d19c27edb/go.mod h1:Ytttq7Pw4vOCu9NtRQaOeDU2dhBYUyNBe6kX4+nIIQ4= -github.com/snyk/go-application-framework v0.0.0-20241011135148-71eca49aa231 h1:mLiZHx8m36ySB+KZ9x1OR+VR84YJuOXv0/9zYsPkReU= -github.com/snyk/go-application-framework v0.0.0-20241011135148-71eca49aa231/go.mod h1:LeMsRM1FxIfO/8QpOs9V/dI46ie/RAQl02ulAh6aKys= +github.com/snyk/go-application-framework v0.0.0-20241016204737-72e7fd400ae3 h1:pJnx0dJmYXFGHMFtPehk8qFCNlxsPx5vm+bmXQWku6g= +github.com/snyk/go-application-framework v0.0.0-20241016204737-72e7fd400ae3/go.mod h1:LeMsRM1FxIfO/8QpOs9V/dI46ie/RAQl02ulAh6aKys= github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 h1:CEQuYv0Go6MEyRCD3YjLYM2u3Oxkx8GpCpFBd4rUTUk= github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65/go.mod h1:88KbbvGYlmLgee4OcQ19yr0bNpXpOr2kciOthaSzCAg= github.com/snyk/policy-engine v0.31.3 h1:FepCg6QN/X8uvxYjF+WwB2aiBPJB+NENDgKQeI/FwLg= diff --git a/test/jest/acceptance/iac/capture.spec.ts b/test/jest/acceptance/iac/capture.spec.ts index 502bd56579..94b6ee84a1 100644 --- a/test/jest/acceptance/iac/capture.spec.ts +++ b/test/jest/acceptance/iac/capture.spec.ts @@ -32,7 +32,7 @@ describe('iac capture', () => { `snyk iac capture ./iac/drift/`, { ...process.env, - ORG: '0d9905be-7914-42c3-ada5-9c95d6fe7eb8', + SNYK_CFG_ORG: '0d9905be-7914-42c3-ada5-9c95d6fe7eb8', SNYK_API: apiUrl, }, ); @@ -56,7 +56,7 @@ describe('iac capture', () => { `snyk iac capture ${statePath}`, { ...process.env, - ORG: orgId, + SNYK_CFG_ORG: orgId, SNYK_API: apiUrl, }, );