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.
QuBui is flexible query builder.
1.0.22
$ npm i qubui
Initialize (in Express)
var qubui = require('qubui');
var DB = mysql.createConnection(~~);
var qb = qubui(DB);
Initialize (in Koajs)
var qubui = require('qubui');
app.use(function* (next){
this.qubui=function(){
return new qubui(this.db, {co:true});
}
yield next;
});
Select:
// SELECT * FROM TEST
var express = qubui(DB).select().from('TEST').getList( HANDLER );
var koajs = yield this.qubui().select().from('TEST').getList();
// And...
var qb = qubui(DB).select().from('TEST');
if(req.use){ qb.where('use<?', req.id); }
if(req.zip){ qb.where('zip=?', req.zip); }
if(req.cnt){ qb.limit(req.cnt); }
if(req.srt){ qb.order(req.srt); }
qb.getList( HANDLER );
Insert:
// INSERT INTO TEST SET ?
var data = {foo:'bar',today:'NOW()',tomorrow:'NOW()+INTERVAL 1 DAY'};
var express = qubui(DB).insert().into('TEST').set(data).run( HANDLER );
var koajs = yield this.qubui().insert().into('TEST').set(data).run();
Update:
// UPDATE TEST SET ? WHERE foo=?
var data = {foo:'bar',today:'NOW()',tomorrow:'NOW()+INTERVAL 1 DAY'};
var express = qubui(DB).update().from('TEST').set(data).where('foo=?','bar').run( HANDLER );
var koajs = yield this.qubui().update().from('TEST').set(data).where('foo=?','bar').run();
Delete:
// DELETE FROM TEST WHERE foo=?
var express = qubui(DB).delete().from('TEST').where('foo=?','bar').run( HANDLER );
var koajs = yield this.qubui().delete().from('TEST').where('foo=?','bar').run();
SubQuery:
// SELECT id,(select name FROM OTHERS WHERE OTHERS.id=TEST.id) otherName FROM TEST WHERE foo=?
var qubui = require('qubui');
var bracket = qubui.bracket;
var subQuery = qubui().select().field('name').from('OTHERS').where('OTHERS.id=TEST.id');
var express = qubui(DB).select().field(['id',bracket(subQuery,'otherName')]).from('TEST').where('foo=?','bar').run( HANDLER );
var koajs = yield this.qubui().select().field(['id',bracket(subQuery,'otherName')]).from('TEST').where('foo=?','bar').run();
MIT
FAQs
make flexible query
The npm package qubui receives a total of 3 weekly downloads. As such, qubui popularity was classified as not popular.
We found that qubui 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.