Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Amazon Web Services node.js module. Currently under development. This is basically a fork of aws-lib which served as most of the inspiration for this module. While it resembles its original structure, some of the internal workings are changed due to obvious reasons.
Either manually clone this repository into your node_modules directory, or the recommended method:
npm install aws2js
For example, the EC2 client, as implemented into the library is just:
exports.ec2 = client({ prefix: 'ec2', path: '/', query: { Version: '2011-05-15', SignatureMethod: 'HmacSHA256', SignatureVersion: '2' } });
Abstracting most of the AWS APIs plumbing is the actual goal behind the client simplicity.
More will come. Remember, this is under active development, but an early release. I still need S3 support (at least) for my own usage.
var ec2 = require('aws2js').ec2; ec2.setCredentials('accessKeyId', 'secretAccessKey'); // Mandatory. ec2.setRegion('eu-east-1'); // Optional. The us-east-1 region is the default API entry point anyway. // action, query, callback - for the action and query parameters, check the EC2 API reference. ec2.call('DescribeVolumes', {}, function (error, response) { if ( ! error) { for (var i in response.volumeSet.item) { console.log(response.volumeSet.item[i]); } } else { console.error(error); } });
A config() method is provided for the service client. You may invoke it as:
ec2.config({ accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', host: 'ec2.us-west-1.amazonaws.com' });
This is the equivalent of calling setCredentials() and setRegion() but it is more verbose and error prone. However, it may change the internals of the service client, therefore usable for fine tuning the service client at a lower level if a direct approach via implemented properties isn't available.
The returned error into the callback is an Error instance. If it's an error generated by the AWS API itself, the response argument contains the raw object returned by the AWS API. Currently there isn't implemented a method to get the actual error message from the response error due to the fact that the AWS APIs don't use a standardized format for all the APIs. Implementing the errors specifications into the service client is planned.
FAQs
AWS (Amazon Web Services) APIs client implementation for node.js
We found that aws2js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.