Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@cosva-lab/aws-xray-sdk-prisma
Advanced tools
Readme
A prisma plugin to log requests and subsegments through AWSXray.
The AWS X-Ray Prisma package automatically records query information and request
and response data. Simply patch the Prisma package via capturePrisma
as shown below.
The AWS X-Ray SDK Core has two modes - manual
and automatic
.
Automatic mode uses the cls-hooked
package 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.
import { PrismaClient } from '@prisma/client';
import AWSXRay from 'aws-xray-sdk';
import { capturePrisma } from 'aws-xray-sdk-prisma';
const ns = AWSXRay.getNamespace();
const prisma = new PrismaClient();
const client = capturePrisma(prisma, { namespace: 'remote' });
const segment = new AWSXRay.Segment('prisma-xray-sample-auto');
ns.run(async () => {
const subSegment = segment.addNewSubsegment('Prisma');
AWSXRay.setSegment(subSegment);
await client.company.upsert({
create: {
name: 'Prisma',
createdAt: new Date(),
},
update: {},
where: {
id: 1,
},
});
const companies = await client.company.findMany();
console.log(companies);
subSegment.close();
// ...
});
import { PrismaClient } from '@prisma/client';
import AWSXRay from 'aws-xray-sdk-core';
import { capturePrisma } from 'aws-xray-sdk-prisma';
AWSXRay.enableManualMode();
const prisma = new PrismaClient();
const client = capturePrisma(prisma, { namespace: 'remote' });
const segment = new AWSXRay.Segment('prisma-xray-sample');
const run = async () => {
const subSegment = segment.addNewSubsegment('Prisma');
await client.company.upsert(
{
create: {
name: 'Prisma',
createdAt: new Date(),
},
update: {},
where: {
id: 1,
},
},
// @ts-ignore
subSegment
);
const companies = await client.company.findMany(
// @ts-ignore
subSegment
);
console.log(companies);
subSegment.close();
// ...
};
run();
FAQs
AWS X-Ray Patcher for prisma (Javascript)
We found that @cosva-lab/aws-xray-sdk-prisma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.