
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@braken/http-plugin-typeorm
Advanced tools
Braken 框架的 HTTP TypeORM 插件,提供数据库连接和事务支持。
pnpm add @braken/http-plugin-typeorm
import { Http } from '@braken/http';
import HttpTypeormPlugin from '@braken/http-plugin-typeorm';
import { DataBaseWare, DataBaseTransactionWare } from '@braken/http-plugin-typeorm';
const http = new Http();
// 添加 TypeORM 插件
http.use(HttpTypeormPlugin);
// 使用数据库中间件
@Controller.Middleware(DataBaseWare)
class UserController extends Controller {
async response(ctx, next) {
// 使用数据库连接
const connection = ctx.$typeorm_connection;
// ...
}
}
// 使用事务中间件
@Controller.Middleware(DataBaseTransactionWare)
class OrderController extends Controller {
async response(ctx, next) {
// 在事务中使用数据库连接
const connection = ctx.$typeorm_connection;
// 如果需要回滚
ctx.$typeorm_transacation_rollback(() => {
// 回滚逻辑
});
// ...
}
}
TypeORM 插件类,提供以下功能:
数据库连接中间件,提供:
数据库事务中间件,提供:
type Connection = DataSource | QueryRunner;
declare module 'koa' {
interface BaseContext {
$typeorm_connection?: Connection;
$typeorm_transacation_rollback?: (roll: () => unknown) => number;
}
}
MIT
FAQs
somethings
We found that @braken/http-plugin-typeorm demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.