
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
fast lightweight rest-api builder
Add these to your package.json
file.
"scripts": {
"dev": "nodemon core/index.js",
"dbd": "knex migrate:rollback --knexfile core/db/knexfile.js",
"dbu": "knex migrate:latest --knexfile core/db/knexfile.js",
"create_table": "knex migrate:make create_${npm_config_name} --knexfile core/db/knexfile.js",
"create_seed": "knex seed:make ${npm_config_name} --knexfile core/db/knexfile.js",
"seed": "knex seed:run --knexfile core/db/knexfile.js"
},
module.exports = {
development: {
client: 'pg',
connection: {
host: 'some-host',
port: 'some-port',
user: 'some-username',
password: 'some-password',
database: 'some-database'
},
migrations: {
tableName: 'knex_migrations',
directory: 'migrations'
},
seeds: {
directory: 'seeds'
},
}
}
npm run create_table --name=users &&
npm run create_seed --name=01-users
const tableName = 'users'
const schema = (table) => {
table.increments()
table.string('public_id').notNullable().unique()
table.string('username').notNullable().unique()
table.string('email').notNullable().unique()
table.string('password').notNullable()
table.boolean('is_verified').defaultTo(false)
table.boolean('is_suspended').defaultTo(false)
table.boolean('is_deactivated').defaultTo(false)
table.timestamps(true, true)
}
exports.up = (knex) => knex.schema.createTable(tableName, schema)
exports.down = (knex) => knex.schema.dropTable(tableName)
global.apin = require('apin')()
const app = new (require('koa'))
const server = require('http').createServer(app.callback())
const bodyparser = require('koa-bodyparser')
const cors = require('kcors')
apin.io = require('socket.io')(server, {cors: {origin: '*'}})
app.use(apin.plugins.errorHandler)
app.use(bodyparser())
app.use(cors())
app.use(apin.router.routes())
app.use(apin.plugins.notFoundHandler)
server.listen(apin.config.server.port, () => {
const host = require('url').format(apin.config.server)
print('running at: %s', host)
})
module.exports = {
server: {
protocol: 'http',
hostname: 'localhost',
port:7000
},
jwt:{
access:{
key: 'some-scecret',
options:{
expiresIn: '10m',
// algorithm: 'RS256'
}
},
refresh:{
key: 'some-other-scecret',
options:{
expiresIn: '30d',
// algorithm: 'RS256'
}
},
}
}
FAQs
fast lightweight rest-api builder
We found that apin 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.