Socket
Socket
Sign inDemoInstall

@contrast/assess

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/assess - npm Package Compare versions

Comparing version 1.30.0 to 1.31.0

2

lib/dataflow/sources/install/fastify/fastify.js

@@ -31,3 +31,3 @@ /*

install() {
depHooks.resolve({ name: 'fastify', version: '>=3.0.0' }, (fastify) => patcher.patch(fastify, {
depHooks.resolve({ name: 'fastify', version: '>=3.2.0' }, (fastify) => patcher.patch(fastify, {
name: 'fastify.constructor',

@@ -34,0 +34,0 @@ patchType,

@@ -47,51 +47,57 @@ /*

pre(data) {
const origCtx = data.args[0];
data.args[0] = function(...args) {
patcher.patch(args[0].cookies, 'set', {
name: 'ctx.cookies',
patchType,
pre({ args }) {
const sourceContext = getSourceContext();
if (!sourceContext) return;
if (data.args?.length === 0) return;
const [origCtx] = data.args;
const [name,, options] = args;
if (typeof origCtx !== 'function') return;
data.args[0] = patcher.patch(origCtx, {
name: 'ctx',
patchType,
pre({ args }) {
patcher.patch(args[0].cookies, 'set', {
name: 'ctx.cookies',
patchType,
pre({ args }) {
const sourceContext = getSourceContext();
if (!sourceContext) return;
const httpOnly = options?.httpOnly;
const secure = options?.secure;
if (httpOnly && secure) return;
const [name,, options] = args;
const displayArg = inspect(options);
const sessionEvent = createSessionEvent({
args: [{
tracked: false,
value: displayArg
}],
context: `ctx.cookies.set(${displayArg})`,
history: [],
name: 'koaCookie',
moduleName: 'koa',
methodName: '',
object: {
tracked: false,
value: 'koa',
},
result: {
tracked: false,
},
source: 'P',
stack: [],
tags: {},
framework: 'koa',
});
if (!httpOnly) {
handleHttpOnly(sourceContext, name, sessionEvent);
}
const httpOnly = options?.httpOnly;
const secure = options?.secure;
if (httpOnly && secure) return;
if (!secure) {
handleSecure(sourceContext, name, sessionEvent);
const displayArg = inspect(options);
const sessionEvent = createSessionEvent({
args: [{
tracked: false,
value: displayArg
}],
context: `ctx.cookies.set(${displayArg})`,
history: [],
name: 'koaCookie',
moduleName: 'koa',
methodName: '',
object: {
tracked: false,
value: 'koa',
},
result: {
tracked: false,
},
source: 'P',
stack: [],
tags: {},
framework: 'koa',
});
if (!httpOnly) {
handleHttpOnly(sourceContext, name, sessionEvent);
}
if (!secure) {
handleSecure(sourceContext, name, sessionEvent);
}
}
}
});
return origCtx.apply(this, args);
};
});
}
});
}

@@ -98,0 +104,0 @@ });

{
"name": "@contrast/assess",
"version": "1.30.0",
"version": "1.31.0",
"description": "Contrast service providing framework-agnostic Assess support",

@@ -20,3 +20,3 @@ "license": "SEE LICENSE IN LICENSE",

"dependencies": {
"@contrast/common": "1.21.3",
"@contrast/common": "1.22.0",
"@contrast/distringuish": "^5.0.0",

@@ -23,0 +23,0 @@ "@contrast/scopes": "1.4.1"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc