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.
@acuris/aws-es-connection
Advanced tools
AWS ElasticSearch connection for the @elastic/elasticsearch ES client
AWS ES connection for the new elasticsearch client (@elastic/elasticsearch)
Javascript:
const { Client } = require('@elastic/elasticsearch')
const { createAWSConnection, awsGetCredentials } = require('@acuris/aws-es-connection')
const awsCredentials = await awsGetCredentials()
const AWSConnection = createAWSConnection(awsCredentials)
const client = new Client({
...AWSConnection,
node: 'https://node-name.eu-west-1.es.amazonaws.com'
})
// inside async func
await client.cat.help()
Typescript:
import { createAWSConnection, awsGetCredentials } from '@acuris/aws-es-connection'
import AWS from 'aws-sdk'
import { Client } from '@elastic/elasticsearch'
const awsCredentials = await awsGetCredentials()
const AWSConnection = createAWSConnection(awsCredentials)
const client = new Client({
...AWSConnection,
node: 'https://node-name.eu-west-1.es.amazonaws.com'
})
// inside async func
await client.cat.help()
This package creates a Connection class that signs the requests to AWS elasticsearch and a Transport class that checks that the AWS credentials haven't expired before every call, and refreshes them when needed.
Make sure that your AWS credentials are available to your env, for example you could set them in your ENV.
You need a running AWS ES instance for the tests to run against. Set the endpoint URL as the env AWS_ES_ENDPOINT
.
AWS_ES_ENDPOINT=https://xxxx.es.amazonaws.com npm test
This package has been tested on versions of the official elasticsearch client up to 7.13.0.
FAQs
AWS ElasticSearch connection for the @elastic/elasticsearch ES client
The npm package @acuris/aws-es-connection receives a total of 6,782 weekly downloads. As such, @acuris/aws-es-connection popularity was classified as popular.
We found that @acuris/aws-es-connection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.