@aws-sdk/credential-provider-env
Advanced tools
Comparing version 3.468.0 to 3.485.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fromEnv = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0; | ||
exports.fromEnv = exports.ENV_CREDENTIAL_SCOPE = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0; | ||
const property_provider_1 = require("@smithy/property-provider"); | ||
@@ -9,2 +9,3 @@ exports.ENV_KEY = "AWS_ACCESS_KEY_ID"; | ||
exports.ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; | ||
exports.ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
const fromEnv = () => async () => { | ||
@@ -15,2 +16,3 @@ const accessKeyId = process.env[exports.ENV_KEY]; | ||
const expiry = process.env[exports.ENV_EXPIRATION]; | ||
const credentialScope = process.env[exports.ENV_CREDENTIAL_SCOPE]; | ||
if (accessKeyId && secretAccessKey) { | ||
@@ -22,2 +24,3 @@ return { | ||
...(expiry && { expiration: new Date(expiry) }), | ||
...(credentialScope && { credentialScope }), | ||
}; | ||
@@ -24,0 +27,0 @@ } |
@@ -6,2 +6,3 @@ import { CredentialsProviderError } from "@smithy/property-provider"; | ||
export const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; | ||
export const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
export const fromEnv = () => async () => { | ||
@@ -12,2 +13,3 @@ const accessKeyId = process.env[ENV_KEY]; | ||
const expiry = process.env[ENV_EXPIRATION]; | ||
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; | ||
if (accessKeyId && secretAccessKey) { | ||
@@ -19,2 +21,3 @@ return { | ||
...(expiry && { expiration: new Date(expiry) }), | ||
...(credentialScope && { credentialScope }), | ||
}; | ||
@@ -21,0 +24,0 @@ } |
@@ -20,2 +20,6 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; | ||
* @internal | ||
*/ | ||
export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
/** | ||
* @internal | ||
* | ||
@@ -22,0 +26,0 @@ * Source AWS credentials from known environment variables. If either the |
@@ -6,2 +6,3 @@ import { AwsCredentialIdentityProvider } from "@smithy/types"; | ||
export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; | ||
export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; | ||
export declare const fromEnv: () => AwsCredentialIdentityProvider; |
{ | ||
"name": "@aws-sdk/credential-provider-env", | ||
"version": "3.468.0", | ||
"version": "3.485.0", | ||
"description": "AWS credential provider that sources credentials from known environment variables", | ||
@@ -27,5 +27,5 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.468.0", | ||
"@aws-sdk/types": "3.485.0", | ||
"@smithy/property-provider": "^2.0.0", | ||
"@smithy/types": "^2.7.0", | ||
"@smithy/types": "^2.8.0", | ||
"tslib": "^2.5.0" | ||
@@ -32,0 +32,0 @@ }, |
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 2 instances 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
17440
96
10
+ Added@aws-sdk/types@3.485.0(transitive)
- Removed@aws-sdk/types@3.468.0(transitive)
Updated@aws-sdk/types@3.485.0
Updated@smithy/types@^2.8.0