
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
serverless-tools
Advanced tools
Serverless toolbox
npm i serverless-tools
A more node-style way to write your handler functions.
const httpless = require('serverless-tools/httpless')
exports.hello = httpless((req, res) => {
res.setHeader('Content-Type', 'text/plain')
res.end(`Hello ${req.query.name || 'gays'}! -- Provide by ${req.provider}`)
})
{
statusCode: 200,
headers: {
'content-type': 'text/plain'
},
body: 'Hello gays! -- Provide by aws'
}
A micro-style way to write your handler functions.
const microless = require('serverless-tools/microless')
const { json, send, sendError, createError } = microless
exports.hello = microless(() => {
return 'Hello world'
})
exports.ok = microless((req, res) => {
send(res, 200, { message: 'ok' })
})
exports.auth = microless((req, res) => {
if (!auth(req)) throw createError(401, 'Must signin first')
send(res, 200, 'welcome')
})
exports.download = microless((req, res) => {
if (limited) {
const err = new Error('Bandwidth limit exceeded')
err.status = 509
err.expose = true
sendError(req, res, err)
return
}
send(res, 200, base64Content)
})
Generate a report for serverless function runtime environment.
const probe = require('serverless-tools/probe')
console.log(probe())
{
os: { },
process: {
env: { },
},
'aws-sdk': { },
}
Evaluate runtime feature and guess possible env.
const evaluate = require('serverless-tools/evaluate')
console.log(evaluate())
{
provider: 'aws',
nodeEnv: 'production'
}
Write evaluate envs into process.env. This side effect happend immediately.
require('serverless-tools/setEnv')
console.log(process.env)
{
...
PROVIDER: 'aws',
NODE_ENV: 'production',
...
}
FAQs
Serverless toolbox
We found that serverless-tools 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.