Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sails-hook-mongoat2
Advanced tools
Provides advanced mongo indexing options for sails models that use the sails-mongo adapter.
Provides advanced mongo indexing options for sails.js models that use the sails-mongo adapter.
npm i sails-hook-mongoat
Then simply add an 'indexes' array property to your sails model(s) that you want to add custom indexers on. This contains all your indexes.
Index properties:
Creating a 'expires after' index
// MY MODEL WITH A DATE FIELD
module.exports = {
attributes: {
myDate: {
type: 'date',
required: true
}
},
indexes: [
{
attributes: {
myDate: 1
},
options: {
expireAfterSeconds: 60 // expire 60s after myDate
}
}
]
};
Creating a composite unique index
// MY EVENTS MODEL
module.exports = {
attributes: {
event_id: {
type: 'integer',
required: true
},
match_id: {
type: 'integer',
required: true
}
},
indexes: [
//event & match composite index
{
attributes: {
event_id: -1, // desc
match: 1 // asc
},
options: {
unique: true
}
}
]
};
FAQs
Provides advanced mongo indexing options for sails models that use the sails-mongo adapter.
We found that sails-hook-mongoat2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.