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

@mediamonks/self-xss-console-banner

Package Overview
Dependencies
Maintainers
10
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mediamonks/self-xss-console-banner

Self XSS warning module

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
10
Weekly downloads
 
Created
Source

self-xss console banner

This module will log a self-xss banner to warn users about the self-xss security risk. This banner should be used for projects that have data behind a login.

Installation

npm i @mediamonks/self-xss-console-banner

Implementation

Displaying the default warning:

import xssBanner from '@mediamonks/self-xss-console-banner';

xssBanner();

Displaying a custom warning:

import xssBanner from '@mediamonks/self-xss-console-banner';

xssBanner(false, 'Stop!', 'Do not paste anything here, close this window!', 'Please contact us via security@example.com');

SSR (Server Side Rendering)

When using SSR make sure that this module is not included. It's possible to use a dynamic import to execute it only on client side.

const selfXssBanner = (await import('@mediamonks/self-xss-console-banner')).default;

selfXssBanner();

Default warning

default warning

Contributing

git clone git@github.com:mediamonks/self-xss-console-banner.git

After cloning run npm i; npm run postinstall

Keywords

FAQs

Package last updated on 21 Apr 2023

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

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