Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contrast/architecture-components

Package Overview
Dependencies
Maintainers
0
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/architecture-components - npm Package Compare versions

Comparing version 1.19.2 to 1.19.3

68

lib/install/pg.js

@@ -34,36 +34,46 @@ /*

function install() {
depHooks.resolve({ name: 'pg', file: 'lib/client.js' }, (Client) => {
patcher.patch(Client.prototype, '_handleReadyForQuery', {
name: 'pg.lib/Client',
patchType,
pre({ obj: client }) {
client?.once('connect', () => {
let urlStr = process.env.PGHOST || client.host;
const port = process.env.PGPORT || client.port;
const post = ({ result: client }) => {
client?.once('connect', () => {
let urlStr = process.env.PGHOST ?? client.host;
const remotePort = process.env.PGPORT ?? client.port ?? 0;
if (!urlStr) {
return;
}
if (!urlStr) {
return;
}
if (urlStr.indexOf('://') === -1) {
urlStr = `postgresql://${urlStr}`;
}
if (urlStr.indexOf('://') === -1) {
urlStr = `postgresql://${urlStr}`;
}
const url = getUrl(urlStr);
if (!url) {
logger.warn({ urlStr }, 'unable to report %s architecture component', vendor);
return;
}
const url = getUrl(urlStr);
if (!url) {
logger.warn({ urlStr }, 'unable to report %s architecture component', vendor);
return;
}
messages.emit(Event.ARCHITECTURE_COMPONENT, {
remoteHost: '',
remotePort: port || 0,
type: 'db',
url,
vendor,
});
});
}
messages.emit(Event.ARCHITECTURE_COMPONENT, {
remoteHost: '',
remotePort,
type: 'db',
url,
vendor,
});
});
});
};
depHooks.resolve({ name: 'pg', file: 'lib/client.js' }, (Client) =>
patcher.patch(Client, {
name: 'pg.Client',
patchType,
post,
})
);
depHooks.resolve({ name: 'pg', file: 'lib/native/client.js' }, (NativeClient) =>
patcher.patch(NativeClient, {
name: 'pg.native.Client',
patchType,
post,
})
);
}

@@ -70,0 +80,0 @@

{
"name": "@contrast/architecture-components",
"version": "1.19.2",
"version": "1.19.3",
"description": "Detects external systems being connected to by applications.",

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

"dependencies": {
"@contrast/common": "1.21.2"
"@contrast/common": "1.21.3"
}
}
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