node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Sqreen Node.js Agent

Sqreen agent monitors functions in the application (I/O, authentication, network, command execution, etc.) and provides dedicated security logic at run-time.

Sqreen protects applications against common security threats.

Here are some security events which can be blocked and reported:

  • Database injection (SQL/NoSQL)
  • Cross-site scripting attack
  • Significant bad bot / scan activity against the application (scans which require attention)
  • Peak of HTTP errors (40x, 50x) related to security activity against the application
  • Target (human) investigation led against your application
  • New vulnerabilities detected in a third-party modules used by the application

Sqreen also monitors authentication activity inside the application to detect and block account takeover attacks.

For more details, visit


You will need first to signup to get a token.

Then, where your package.json file stands, run:

# Node.js 4 and higher 
$ npm install --save sqreen
echo '{ "token": "your token" }' > sqreen.json

At the top of the main module of your app, add:



This agent is compatible with Node.js 4 and higher.

For other compatibility related information, please visit the compatibility page.


Documentation is available on this page.