
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
Mongoose schema and ref integrity validator
Motivation: create simple tool to validate mongoose schema and references integrity
How it works: It takes a mongoose connection instance from your code and interate thru each model and each document using async iterable interface provided by mongoose. Due to limitations of mongoose api, it will create custom model clone if verifyRefs option set to true to avoid mutating original model. This models will be automatically deleted later.
Additional features:
npm i -S manggis
import { Connection } from 'mongoose';
import { validate } from 'manggis'
async function main() {
/* !!! place your mongoose connection instance here !!! */
const connection: Connection = {} as Connection
await validate(connection, {
onError: ({ model, path, message }) => {
console.log(` error [${model}.${path}]: ${message}`)
},
onModel(model) {
console.log('validating model:', model.modelName);
},
onDocument(doc) {
console.log(' validating document:', doc._id);
}
});
console.log('all models has been verified');
process.exit();
}
if (require.main === module) {
main()
}
Feel free to send PR's or suggest new features in Issues.
FAQs
Mongoose schema and ref integrity validator
We found that manggis 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 Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.