Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@wizeapps/sequelize-audit
Advanced tools
Enables auditing on sequelize models. It works on CREATE, UPDATE, DESTROY events on sequelize model instance.
GET
] /api/wizeaudits - Lists all changes performed across all modelsGET
] /api/wizeaudits/:id - Fetches specific change set for the identifierGET
] /api/wizeauditmodels - Lists all models for which auditing is enabledPOST
] /api/wizeauditmodels - Enable auditing on a specific model ({"modelName": "User", "displayField": "FirstName"})
DELETE
] /api/wizeauditmodels/:id - Remove auditing on a specific model{
"id": <Auto-increment> INTEGER,
"diff": JSONB (Difference deep-diff),
"email": STRING (Actor),
"identifier": INTEGER (Instance ID),
"model": STRING (Model),
"action": CHAR(1) (Action),
"oldValue": JSONB (Previous state of instance)
}
npm install --save @wizeapps/sequelize-audit
import wizeSequelizeAudit from '@wizeapps/sequelize-audit';
.
.
.
/*
app: koa-app returned from 'const app = createServer({});'
sequelizeSource: sequelize object returned from 'import sequelizeSource from './sources/postgresql';'
opts: JSON object
*/
wizeSequelizeAudit(app, sequelizeSource, opts);
{
"exclude": ["id", "createdAt", "updatedAt"]
}
Module assumes that model has system fields - createdBy and modifiedBy, which are used to store the actor. These system fields are used to capture the actor information in audit table. Supply createdBy in instance during Create and modifiedBy during Update and Delete operations.
npm run test
MIT License
FAQs
Provides auditing of sequelize models
We found that @wizeapps/sequelize-audit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.