@aws-sdk/credential-provider-env
Advanced tools
Comparing version 3.609.0 to 3.620.1
@@ -24,2 +24,3 @@ "use strict"; | ||
__export(src_exports, { | ||
ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, | ||
ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, | ||
@@ -41,2 +42,3 @@ ENV_EXPIRATION: () => ENV_EXPIRATION, | ||
var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; | ||
var fromEnv = /* @__PURE__ */ __name((init) => async () => { | ||
@@ -50,2 +52,3 @@ var _a; | ||
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; | ||
const accountId = process.env[ENV_ACCOUNT_ID]; | ||
if (accessKeyId && secretAccessKey) { | ||
@@ -57,3 +60,4 @@ return { | ||
...expiry && { expiration: new Date(expiry) }, | ||
...credentialScope && { credentialScope } | ||
...credentialScope && { credentialScope }, | ||
...accountId && { accountId } | ||
}; | ||
@@ -71,4 +75,5 @@ } | ||
ENV_CREDENTIAL_SCOPE, | ||
ENV_ACCOUNT_ID, | ||
fromEnv | ||
}); | ||
@@ -7,2 +7,3 @@ import { CredentialsProviderError } from "@smithy/property-provider"; | ||
export const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
export const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; | ||
export const fromEnv = (init) => async () => { | ||
@@ -15,2 +16,3 @@ init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); | ||
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; | ||
const accountId = process.env[ENV_ACCOUNT_ID]; | ||
if (accessKeyId && secretAccessKey) { | ||
@@ -23,2 +25,3 @@ return { | ||
...(credentialScope && { credentialScope }), | ||
...(accountId && { accountId }), | ||
}; | ||
@@ -25,0 +28,0 @@ } |
@@ -27,2 +27,6 @@ import type { CredentialProviderOptions } from "@aws-sdk/types"; | ||
* @internal | ||
*/ | ||
export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; | ||
/** | ||
* @internal | ||
* | ||
@@ -29,0 +33,0 @@ * Source AWS credentials from known environment variables. If either the |
@@ -9,4 +9,5 @@ import { CredentialProviderOptions } from "@aws-sdk/types"; | ||
export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; | ||
export declare const fromEnv: ( | ||
init?: FromEnvInit | ||
) => AwsCredentialIdentityProvider; |
{ | ||
"name": "@aws-sdk/credential-provider-env", | ||
"version": "3.609.0", | ||
"version": "3.620.1", | ||
"description": "AWS credential provider that sources credentials from known environment variables", | ||
@@ -5,0 +5,0 @@ "main": "./dist-cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19441
151
12