Socket
Socket
Sign inDemoInstall

@contrast/agent-lib

Package Overview
Dependencies
Maintainers
14
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/agent-lib - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

30

index.d.ts

@@ -59,3 +59,3 @@ /// <reference types="node" />

type RuleBitMask = number;
type JsString = string | String;
type JsString = string | String | Buffer;

@@ -216,8 +216,8 @@ type PairedInputs = [string, string];

*
* @param {JsString|Buffer} body a string or a buffer encoded as utf8 containing the full response
* @param - body a string or a buffer encoded as utf8 containing the full response
* body.
* @param {JsString[]} inputs both the source and propagation history
* @returns {boolean} true if any input is an XSS attack in the context of the body, else false.
* @param - inputs both the source and propagation history
* @returns - true if any input is an XSS attack in the context of the body, else false.
*/
isXssAttack(body: JsString|Buffer, inputs: JsString[]): boolean;
isXssAttack(body: JsString, inputs: JsString[]): boolean;

@@ -235,6 +235,6 @@ /**

*
* @param {JsString[]} inputs both the source and propagation history
* @returns {XssState} the initial state to pass to isXssAttackStateful(body_chunk, state).
* @param - inputs both the source and propagation history
* @returns - the initial state to pass to isXssAttackStateful(body_chunk, state).
*/
makeXssState(inputs: JsString[]): XssState;
makeXssState(inputs: string[]): XssState;

@@ -249,8 +249,8 @@ /**

*
* @param {JsString|Buffer} body a string or a buffer encoded as utf8 containing a chunk of the
* @param - body a string or a buffer encoded as utf8 containing a chunk of the
* response body.
* @param {XssState} state the state object created by makeXssState(). It will be updated each call.
* @returns {boolean} true if any input is an XSS attack in the context of the body, else false.
* @param - state the state object created by makeXssState(). It will be updated each call.
* @returns - true if any input is an XSS attack in the context of the body, else false.
*/
isXssAttackStateful(body: JsString|Buffer, state: XssState): boolean;
isXssAttackStateful(body: JsString, state: XssState): boolean;

@@ -266,6 +266,6 @@ /**

*
* @param {JsString[]} inputs An array of the saved source inputs, NOT propagation history.
* @returns {boolean} true if an egregious XSS attack found, else false.
* @param - inputs An array of the saved source inputs, NOT propagation history.
* @returns - true if an egregious XSS attack found, else false.
*/
isXssObviousAttack(inputs: JsString[]): boolean;
isXssObviousAttack(inputs: string[]): boolean;

@@ -272,0 +272,0 @@ /**

{
"name": "@contrast/agent-lib",
"version": "8.1.0",
"version": "8.1.1",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

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

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