Socket
Book a DemoInstallSign in
Socket

csp-report-lite

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csp-report-lite

A lightweight sink (target) for Content Security Policy `report-uri` reporting that does initial filtering to hopefully report only as much as a human could reasonably read.

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

csp-report-lite

A lightweight sink (target) for Content Security Policy report-uri reporting that does initial filtering to hopefully report only as much as a human could reasonably read.

Surface:

  • a docker container with an entire server accepting input and logging json to stdout, errors to stderr
  • a request handler for a node server
  • a report aggregator function for doing the logic

More docs coming soon. Typings are available to explain more details

Usage

See usage example in server.js file

API

Docs generated using docts

Interface AggrOptions

Aggregator options
Source code: <>

Properties:

.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation string

Interface HandlerOptions

Handler options
Source code: <>

Properties:

.beforeReport (req: any) => any
.maxBytes number
.logger (...params: any[]) => any
.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation string

Function reportAggregator

Source code: <>

reportAggregator( ) AcceptReport <>
 ▪ options AggrOptions

Function requestHandler

Request handler compatible with Node's http .reateServer
Source code: <>

requestHandler( ) RequestListener <>
 ▪ options HandlerOptions

FAQs

Package last updated on 25 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts