Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@smithy/credential-provider-imds
Advanced tools
AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service
The @smithy/credential-provider-imds package is designed to retrieve AWS credentials from the EC2 Instance Metadata Service (IMDS). It allows applications running on EC2 instances to securely obtain temporary credentials without needing to hard-code them. This is particularly useful for managing access to AWS services in a secure and scalable way.
Fetching credentials from IMDS
This feature allows the retrieval of AWS credentials from the EC2 Instance Metadata Service. The provided code sample demonstrates how to asynchronously fetch these credentials using the fromInstanceMetadata function.
const { fromInstanceMetadata } = require('@smithy/credential-provider-imds');
async function getCredentials() {
const credentials = await fromInstanceMetadata();
return credentials;
}
Similar to @smithy/credential-provider-imds, this package is part of the AWS SDK for JavaScript (v3) and provides functionality to obtain AWS credentials from the EC2 Instance Metadata Service. It offers a similar interface but is specifically tailored for use with the AWS SDK v3.
The AWS SDK for JavaScript (v2) includes built-in support for retrieving credentials from various sources, including the EC2 Instance Metadata Service. While it provides broader functionality for interacting with AWS services, it also includes credential management features similar to those in @smithy/credential-provider-imds, but as part of a larger, more comprehensive package.
An internal package
You probably shouldn't, at least directly. Please use @smithy/credential-providers instead.
FAQs
AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service
We found that @smithy/credential-provider-imds demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.