
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
npm i -g ajv-helper
ajvp -h
Usage: ajvp <command>
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
build|b [options] Build schema json file
ajvp build
Options:
-o, --output 指定输出json文件地址
schema: 验证的ajv schema片段 matchFn: 匹配关键字的函数 默认支持3种keyword host: host或hosts结尾的key,value验证为url类型 avatar: avatar或avatars或logo或logos结尾的key,value验证为url类型 email: email或emails结尾的key,value验证为email类型
// demo
const AjvParser = require('ajv-helper')
const ins = new AjvParser()
// host或hosts结尾的key,value应为url格式
ins.addKeyword('host', {
type: 'string',
format: 'url'
}, function (str) {
return /hosts?$/i.test(str)
})
// {"webHost": "xxx"} => {"webHost": {type: 'string', format: 'url'}}
// {"mail": {host: "xxx"}}
// =>
// {"mail": {
// type: 'object',
// properties: {
// "host": {
// type: 'string', format: 'url'
// }
// }
// }}
FAQs
a helper to convert your config to a ajv schema
We found that ajv-helper 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.