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.
avalon-server-util
Advanced tools
npm install avalon-server-util
作用:sql相关的操作,目前只支持mysql
原理:使用mysqljs/mysql库实现
作用:对程序自身的mysql数据库进行版本管理,代替运维操作,只适用于数据量较小的库;注意:该库不做异常捕获
原理:创建一个sql更新记录的table,每次启动服务器时对比sql文件和历史记录,如果是新sql则执行更新
Demo示例
const {avalonSql} = require("avalon-server-util")
await sqlVersionManager.load({
mysqlConnection:{
host:mysql主机名,
port:mysql端口,
user:mysql用户名,
password:mysql密码,
database:mysql库名(运维建库名称),
},
sqlDir:存放sql文件的目录,
databaseDevName:数据库的开发名称(区别于运维建库的名称)
})
const {system: {requireUncached}} = require("avalon-server-util")
const path = require("path")
const doSomeThing = ()=>{
//此处只能使用相对路径
const m = requireUncached(path.resolve(__dirname, "../xxx/xxx"))
}
FAQs
avalon server side common util
We found that avalon-server-util 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.