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.
XMEN = Any-Frontend Mongo Express NodeJS
Website: xmen.io
XMEN requires MongoDB and NodeJS to be installed.
npm install xmenio
You must define a project configuration file that is set up for XMEN. A default config file looks like this:
// config.js
var path = require('path'),
rootPath = path.normalize(__dirname);
module.exports = {
'development': {
'DB': 'mongodb://localhost/xmen', //MongoDB connection
'PORT': 8000, //Port to run XMEN on
'SECRET': 'xmen', //Provide a project secret
'APP_ROOT': rootPath + '/app', //Define a custom app path
'STATIC_ROOT': rootPath + '/public', //Define a custom static file path
'PUBLIC_URL': 'http://localhost:8000', //Public URL
'INSTALLED_APPS': [ //Apps to be registered
'custom_app'
]
}
};
These are the project settings that are available to any installed app. Extend this configuration to provide custom project values.
XMEN needs to be bootstrapped and there is a simple way to start the server.
// app.js
var XMEN = require('xmenio'),
config = require('./config.js');
XMEN.assemble(config); //This initializes the XMEN app
Simply run node app.js
to get the server up and running.
XMEN is comprised of smaller individually accessible apps and app must be installed for it to be used.
Apps must be registered in INSTALLED_APPS
. App names are based on the directory name.
Example project structure of using the config.js
above:
project-name/
app/
custom_app/
index.js
config/
config.js
node_modules/
app.js
package.json
Registering models within XMEN works by setting up a Mongoose Schema. These models are automatically loaded.
// custom_app/index.js
module.exports = {
models: require('./models')
};
XMEN apps can provide custom routes that are structured specifically for each app. These routes are automatically loaded.
A routes module is passed the app
, passport
, and auth
middleware.
// custom_app/index.js
module.exports = {
routes: require('./routes')
};
XMEN templates are rendered from a registered app's templates/
directory.
Join in the conversation in Github Issues
FAQs
XMEN Framework - Any Frontend, MongoDB, Express, Node
The npm package xmenio receives a total of 1 weekly downloads. As such, xmenio popularity was classified as not popular.
We found that xmenio 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.