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

@contrast/reporter

Package Overview
Dependencies
Maintainers
17
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/reporter - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

lib/reporters/security-logger/index.d.ts

7

lib/index.d.ts

@@ -1,3 +0,2 @@

import { Core } from '@contrast/core';
import BaseReporter from './reporters/base';
import BaseReporter, { Core } from './reporters/base';
export interface ReporterBus {

@@ -7,2 +6,4 @@ reporters: BaseReporter[];

}
export default function init(core: Core): ReporterBus;
export default function init(core: Core & {
reporter: ReporterBus;
}): ReporterBus;

@@ -41,3 +41,3 @@ "use strict";

function init(core) {
const { config: { agent: { reporters } } } = core;
const { reporters } = core.config.agent;
return core.reporter = {

@@ -58,2 +58,8 @@ reporters: [],

}
const { path, syslog } = core.config.agent.security_logger;
if (path || syslog.enable) {
core.logger.trace('enabling security logger');
const { default: SyslogReporter } = await Promise.resolve().then(() => __importStar(require('./reporters/security-logger')));
this.reporters.push(new SyslogReporter(core));
}
},

@@ -60,0 +66,0 @@ };

@@ -1,4 +0,14 @@

import { RequestStore } from '@contrast/common';
import { Core } from '@contrast/core';
import { AppInfo, Messages, RequestStore } from '@contrast/common';
import { Config } from '@contrast/config';
import { Scopes } from '@contrast/scopes';
import { Logger } from '@contrast/logger';
import { Protect } from '@contrast/protect';
export interface Core {
readonly appInfo: AppInfo;
readonly config: Config;
readonly logger: Logger;
readonly messages: Messages;
readonly protect: Protect;
readonly scopes: Scopes;
}
export default abstract class BaseReporter {

@@ -5,0 +15,0 @@ name: string;

@@ -67,2 +67,5 @@ "use strict";

function default_1() {
const untrustedDeserializationDetailsBuilder = (el) => el.details?.[0];
const virtualPatchDetailsBuilder = (el) => el.details?.[0] || {};
const ipDenylistDetailsBuilder = (el) => el.details?.[0] || {};
const ssjsDetailsBuilder = (el) => {

@@ -132,5 +135,2 @@ if (!el.details || el.details.length === 0) {

};
const untrustedDeserializationDetailsBuilder = (el) => el.details?.[0];
const virtualPatchDetailsBuilder = (el) => el.details?.[0] || {};
const ipDenylistDetailsBuilder = (el) => el.details?.[0] || {};
const buildRequestObject = (reqData) => {

@@ -137,0 +137,0 @@ const searchParams = new URLSearchParams(reqData.queries);

/// <reference types="node" />
import { RequestStore, Messages } from '@contrast/common';
import { AppInfo, RequestStore, Messages } from '@contrast/common';
import { AxiosInstance } from 'axios';
import { Core, AppInfo } from '@contrast/core';
import { Config } from '@contrast/config';
import { Logger } from '@contrast/logger';
import { Scopes } from '@contrast/scopes';
import BaseReporter from '../base';
import BaseReporter, { Core } from '../base';
import { AttackModel } from './types';

@@ -10,0 +9,0 @@ export default class ContrastUIReporter extends BaseReporter {

@@ -89,2 +89,4 @@ "use strict";

.put('/api/ng/servers/', {
environment: this.config.server.environment,
tags: this.config.server.tags,
version: this.protectVersion,

@@ -91,0 +93,0 @@ })

import { RequestStore } from '@contrast/common';
import BaseReporter from './base';
import { Core } from '@contrast/core';
import BaseReporter, { Core } from './base';
export default class FileReporter extends BaseReporter {

@@ -5,0 +4,0 @@ private stream;

{
"name": "@contrast/reporter",
"version": "1.4.2",
"version": "1.5.0",
"description": "Subscribes to agent messages and reports them",

@@ -11,3 +11,2 @@ "license": "SEE LICENSE IN LICENSE",

"main": "lib/index.js",
"types": "lib/index.d.ts",
"engines": {

@@ -22,4 +21,7 @@ "npm": ">=6.13.7 <7 || >= 8.3.1",

"dependencies": {
"@contrast/common": "1.1.2",
"@contrast/common": "1.1.3",
"axios": "^0.27.2",
"@contrast/pino-cef": "^1.0.0",
"pino": "^8.6.1",
"pino-socket": "^7.2.0",
"safe-stable-stringify": "^2.3.1",

@@ -26,0 +28,0 @@ "sonic-boom": "^2.8.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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