Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
本依赖仅适用于 Laf!相同 K8S 集群下可以跨应用操作数据库。
如:laf.dev 的不同账号或者不同应用可以互相操作数据库
laf.dev 和 laf.run 的无法互通,他们不在一个 K8S 集群内!
左下角添加 NPM 依赖,搜索 nw-db
,并安装
新建一个云函数,打印数据库链接地址
console.log(process.env.DB_URI)
import cloud from '@lafjs/cloud'
import { createDb } from 'nw-db'
export default async function (ctx: FunctionContext) {
// 填入上一步中获取的 uri 地址
const uri = 'mongodb://sc64px:EuV9oK1F036zf89vGg8wb6WdqHqk7NiHN2xCig1iKB1y6vc5uoJSD7pbIIxk6h0t@mongodb-0.mongo.laf-system.svc.cluster.local:27017/sc64px?authSource=sc64px&replicaSet=rs0&w=majority'
const db2 = await createDb(uri)
const res2 = await db2.collection("user").get()
console.log(res2)
const db = cloud.database()
const res = await db.collection("user").get()
console.log(res)
}
FAQs
nw-db for Laf
The npm package nw-db receives a total of 0 weekly downloads. As such, nw-db popularity was classified as not popular.
We found that nw-db 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.