
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
A tiny Joi validator for Zeit's micro
const qs = require('querystring');
const parse = require('url').parse;
const { validate, Joi } = require('joinotate');
const handler = async (req) => {
const query = qs.parse(parse(req.url).query);
return `Hi, ${query.name}`;
};
handler.joi = {
query: {
name: Joi.required(),
},
};
module.exports = validate(handler);
joinotate also has a decorator for swarfless:
const micro = require('micro');
const qs = require('querystring');
const parse = require('url').parse;
const router = require('swarfless');
const { decorate, Joi } = require('joinotate');
const { get, post, route } = decorate({ get: router.get, post: router.post })
// okay to omit `.joi` annotation if no validate to be performed
get('/', async () => 'Root of server');
// swarfless adds req.params
const hiworld = (req) => `Hi, ${req.params.name}`;
hiworld.joi = {
params: {
name: Joi.required(),
},
};
get('/hello/:name', hiname);
// `decorate` has already wrapped each handler in `validate`,
// so no need to explicitly do so here
module.exports = route;
FAQs
A tiny micro handler annotation validator using Joi
The npm package joinotate receives a total of 6 weekly downloads. As such, joinotate popularity was classified as not popular.
We found that joinotate 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.