npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trend_app_protect

v4.5.2

Published

Trend Micro Cloud One - Application Security provides real-time application security as a service for modern applications, APIs, serverless and other computing platforms

Downloads

113

Readme

Trend Micro Cloud One Application Security for Node

What is it?

Trend Micro Cloud One - Application Security provides real-time application security as a service for modern applications, APIs, serverless and other computing platforms. When Application Security is deployed, threats to your web applications will be detected and protected against, minimizing your risk.

Features

Application Security detects and protects against a wide range of attacks at runtime within your entire application, including: SQL injections Remote command execution Illegal file access Malicious file uploads Malicious payloads URL redirects And more

Support

The agent currently supports the following:
  • Ubuntu, Debian, RedHat, CentOS or Alpine on x86 64 bits architecture
  • Node 10, 12, 14
  • ECMA 5 & 6
Some features require specific components to work:

| Feature | Required Component | | :----: | :---- | | SQLi | body-parser ^1.19 or busboy ^0.2.14 and one of the following:pg 7 or 8pg-native 3mysql 2+ sqlite3 3, 4 and 5| | Open Redirect | Express 3 and 4 | | Malicious Payload | body-parser1 ^1.19 or busboy ^ 0.2.14 |

Installation

From the root of your Node app:

$ npm install --save trend_app_protect

Usage

To activate Application Security, add the following as the first line of your app setup code:

require('trend_app_protect');

//import support added in version 4.5.0 and above for projects that require/support es6 modules
import 'trend_app_protect';

The choice of statements to use between require or import are dependant on the the application itself, the modules used and declarations in the package files. It's independant of Application Security.

Generally, require must be used. When the server setup is done within an ES module, import can be used. If the {type: module} flag is set in the package.json, import must be used.

Please refer to the official NodeJS documentation for more details. Some references and examples on when to use require versus import:

  • https://nodejs.org/dist/latest-v14.x/docs/api/all.html#esm_interoperability_with_commonjs
  • https://nodejs.org/en/knowledge/getting-started/what-is-require/
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

Configuration

The agent key and secret can be configured via the TREND_AP_KEY and TREND_AP_SECRET environment variables.

If you are using a configuration file instead of using environment variables, it needs to be called trend_app_protect.json, be in the application root folder, and needs to contain at least the following:

{
  "key": "my-key",
  "secret": "my-secret"
}

Notes

  • Environment variables will take precedence over the configuration file
  • Mutli-threaded agents is not supported. Any attempt to require or import the agent in a worker will fail and break the main event loop agent.

More information

https://cloudone.trendmicro.com/docs/application-security/