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.
@goodware/mysql
Advanced tools
Better documentation is coming
ES 2017
npm i --save @goodware/mysql
All runtime dependencies in version 3 were changed to use peer dependencies.
If you're missing a dependency, you have three options:
npm i --save @goodware/mysql@2
Or, in package.json dependencies:
"@goodware/mysql": "^2.0.0"
npm i -g npm@7
The options provided by the constructor and all other methods accept an optional 'logger' function or object. If an object is provided, it must have the method log():
interface Logger {
/**
* @param tags Typically includes a logging level name, like info or debug.
* @param message An object with at least a message property
*/
log(tags: string[] | string, message: Record<string, unknown>): void;
}
The following program outputs 'success' to the console.
const mysql = require('@goodware/mysql');
const pack = require('../package.json');
const config = {
// host: '0.0.0.0', // This is the default
// port: 3306, // This is the default
// user: 'root', // This is the default
// database: 'mysql', This is the default
password: '',
};
const connector = new mysql(config, console.log); // The second parameter is a logger function
async () => {
const result = await connector.execute( async (connection) => {
const [results] = await connection.query(`select 'success' AS status`);
return results[0].status;
});
console.log(result);
await connector.stop();
}().then(console.info, console.error);
FAQs
A mysql2-based connection helper
The npm package @goodware/mysql receives a total of 7 weekly downloads. As such, @goodware/mysql popularity was classified as not popular.
We found that @goodware/mysql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
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.