Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
express-stats
Advanced tools
express-stats enables developers to watch their express production servers. These features are supported:
Before you start provide log files in your project folder and make the logs folder writeable (chmod 700 -R logs
), e.g.:
./logs/error.log
./logs/console.log
express-stats depends on cors and ejs, so configure your Express app accordingly:
var app = require('express')(),
cors = require('cors'),
stats = require('express-stats');
var options = {
hostname: 'localhost:8080', // default to 'localhost'
logPath: __dirname + '/logs' // defaults to '/logs',
swaggerFile: 'swagger.json' //defaults to 'swagger.json'
}
app.use(cors());
app.set('views', './views');
app.engine('json', require('ejs').renderFile);
app.use(stats(options));
app.listen(8080);
Get Swagger file.
Your swagger file should contain the variable "host": "<%- hostname %>"
, that may be generated environment specific. The following Swagger describes the provided endpoints.
swagger: "2.0"
info:
version: 0.0.1
title: your application
host: <%- hostname %>
paths:
/system/logs/{logType}:
get:
responses:
200:
description: Log file found
parameters:
- name: logType
in: path
type: string
tags:
- system
delete:
responses:
200:
description: Log file empty
parameters:
- name: logType
in: path
type: string
tags:
- system
/system/swagger:
get:
responses:
200:
description: Swagger found
tags:
- system
/system/mem:
get:
responses:
200:
description: Mem usage reported
tags:
- system
MIT License. Copyright 2014-2015 Oceanhouse21 GmbH. http://www.oceanhouse21.com
You are not granted rights or licenses to the trademarks of Oceanhouse21 GmbH.
FAQs
Runtime statics for express production servers
The npm package express-stats receives a total of 1 weekly downloads. As such, express-stats popularity was classified as not popular.
We found that express-stats demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.