
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
aws-xray-sdk-postgres
Advanced tools
AWS X-Ray SDK Core Postgres 6.1.0 or greater
The AWS X-Ray Postgres package automatically records query information and request
and response data. Simply patch the Postgres package via capturePostgres
as shown below.
The AWS X-Ray SDK Core has two modes - manual
and automatic
.
Automatic mode uses the Continuation Local Storage package (CLS) and automatically
tracks the current segment and subsegment. This is the default mode.
Manual mode requires that you pass around the segment reference. See the examples below.
POSTGRES_DATABASE_VERSION Sets additional data for the sql subsegment.
POSTGRES_DRIVER_VERSION Sets additional data for the sql subsegment.
var AWSXRay = require('aws-xray-sdk-core');
var capturePostgres = require('aws-xray-sdk-postgres');
var pg = capturePostgres(require('pg'));
...
var client = new pg.Client();
client.connect(function (err) {
...
client.query({name: 'moop', text: 'SELECT $1::text as name'}, ['brianc'], function (err, result) {
//Automatically captures query information and errors (if any)
});
});
...
var pool = new pg.Pool(config);
pool.connect(function(err, client, done) {
if(err) {
return console.error('error fetching client from pool', err);
}
var query = client.query('SELECT * FROM mytable', function(err, result) {
//Automatically captures query information and errors (if any)
});
});
var AWSXRay = require('aws-xray-sdk-core');
var capturePostgres = require('aws-xray-sdk-postgres');
var pg = capturePostgres(require('pg'));
...
var client = new pg.Client();
client.connect(function (err) {
...
client.query({name: 'moop', text: 'SELECT $1::text as name'}, ['mcmuls'], function (err, result) {
//Automatically captures query information and errors (if any)
});
});
...
var pool = new pg.Pool(config);
pool.connect(function(err, client, done) {
if(err) {
return console.error('error fetching client from pool', err);
}
var query = client.query('SELECT * FROM mytable', function(err, result) {
//Automatically captures query information and errors (if any)
}, segment));
};
FAQs
AWS X-Ray Patcher for Postgres (Javascript)
The npm package aws-xray-sdk-postgres receives a total of 199,929 weekly downloads. As such, aws-xray-sdk-postgres popularity was classified as popular.
We found that aws-xray-sdk-postgres 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.