
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
doc-warrior
Advanced tools
#Doc Warrior
Document retrieval with rules!
var DocWarrior = require('doc-warrior');
var docs = new DocWarrior({
connector: {
type: 'database',
host: 'localhost',
port: 3306,
connectionLimit: 10,
user: 'root',
pass: '',
database: 'somedb',
table: 'somedocs'
}
});
The database connector also allows you to pass in your own query function which will be used in place of DocWarrior's own mysql pool and query function.
var DocWarrior = require('doc-warrior');
var docs = new DocWarrior({
connector: {
type: 'database',
table: 'somedocs',
customQuery: db.query
}
});
Note: not passing in a 'date' parameter will return the latest version of the requested document. Pass in the date parameter to get a specific version
var docOpts = {
docs: ['terms-and-conditions', 'security-policy'], // These get concatenated
params: {
somekey: 'somevalue' // These get run against the rules against the document
}
};
docs.get(docOpts, function(err, response){
console.log(response); // Your document!
});
These are stored in lib/rules and are generic rule sets with no business logic. This enables them to be used everywhere for anything!
"equals" : {
"foo": "bar"
}
"notEqual" : {
"foo": "bar"
}
We built doc-warrior with other connectors in mind, at present there is only a database connector but we'd love to see more added (S3 for instance).
Any connector can be added and just needs to expose a getDocument function which returns the requested document and associated rules.
v0.0.2
Initial commit:
FAQs
Retrieve documents, with rules!
The npm package doc-warrior receives a total of 2 weekly downloads. As such, doc-warrior popularity was classified as not popular.
We found that doc-warrior 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.