Socket
Socket
Sign inDemoInstall

@contrast/agentify

Package Overview
Dependencies
Maintainers
9
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/agentify - npm Package Compare versions

Comparing version 1.22.3 to 1.23.0

1

lib/rewrite-hooks.js

@@ -20,3 +20,2 @@ /*

const Module = require('node:module');
const rewriteIsDeadzoned = require('./rewrite-is-deadzoned');

@@ -23,0 +22,0 @@

64

lib/rewrite-is-deadzoned.js

@@ -17,20 +17,56 @@ /*

// i'm leaving out index.js now because it doesn't really matter and i want
// to keep this list short. maybe a little bit of experimentation to figure
// out optimal way to do this lookup.
const doNotRewriteEndingPaths = [
//'node_modules/bcryptjs/index.js',
'node_modules/bcryptjs/dist/bcrypt.js',
];
const { sep } = require('path');
// todo: find optimal way to do these lookups
const DEADZONED_PATHS = [
'ast-types', // CONTRAST-33909: `String` injection causes this module to crash.
'angular',
'acorn',
'archiver',
'archiver-utils',
'bcrypt',
'bcrypt-nodejs',
'bcryptjs', // node_modules/bcryptjs/index.js, node_modules/bcryptjs/dist/bcrypt.js
'babel',
'babel-cli',
'babel-core',
'browserify',
'bunyan',
'coffee-script',
'compression',
// 'cookie', // todo: verify this doesn't break sources/propagation
// 'cookie-signature', // ditto
'gzippo',
// 'handlebars', // ditto
'handlebars-precompiler',
// 'hbs', // ditto
'html-webpack-plugin',
'jquery',
'jsrsasign',
'iconv-lite',
'less',
'logger-console',
'loopback-datasource-juggler',
'node-webpack',
'react',
'react-dom',
'react-dom/server',
'requirejs',
'semver',
'strong-remoting',
'uglify-js',
'bn.js',
'node-forge',
'moment',
'moment-timezone'
].map((pkgName) => ['node_modules', pkgName, ''].join(sep));
module.exports = function rewriteIsDeadzoned(filename) {
// make all windows separators into unix separators
filename = filename.replace(/\\/g, '/');
for (const endingPath of doNotRewriteEndingPaths) {
if (filename.endsWith(endingPath)) {
return true;
}
for (const path of DEADZONED_PATHS) {
const start = filename.indexOf(path);
if (start >= 0) return filename.indexOf('node_modules', start + path.length) == -1;
}
return false;
}
return false;
};
{
"name": "@contrast/agentify",
"version": "1.22.3",
"version": "1.23.0",
"description": "Configures Contrast agent services and instrumentation within an application",

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

"dependencies": {
"@contrast/common": "1.19.0",
"@contrast/config": "1.26.2",
"@contrast/core": "1.30.0",
"@contrast/common": "1.20.0",
"@contrast/config": "1.27.0",
"@contrast/core": "1.31.0",
"@contrast/deadzones": "1.1.2",
"@contrast/dep-hooks": "1.3.1",
"@contrast/esm-hooks": "2.4.1",
"@contrast/instrumentation": "1.6.0",
"@contrast/esm-hooks": "2.5.0",
"@contrast/instrumentation": "1.7.0",
"@contrast/logger": "1.8.0",
"@contrast/metrics": "1.6.0",
"@contrast/metrics": "1.7.0",
"@contrast/patcher": "1.7.1",
"@contrast/reporter": "1.25.1",
"@contrast/rewriter": "1.5.0",
"@contrast/reporter": "1.26.0",
"@contrast/rewriter": "1.6.0",
"@contrast/scopes": "1.4.0"
}
}
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