
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@braken/react
Advanced tools
Braken 框架的 React 集成模块,提供基于 React 的前端应用开发支持。
pnpm add @braken/react
import { Application, Controller } from '@braken/react';
// 创建应用实例
const app = new Application('/app');
// 定义控制器
class HomeController extends Controller {
render() {
return <div>Welcome to Home</div>;
}
}
// 定义用户控制器
class UserController extends Controller {
render() {
const { params } = app.useLocation();
return <div>User: {params.id}</div>;
}
}
// 注册路由
app.get('/', HomeController);
app.get('/user/:id', UserController);
// 添加全局中间件
app.use('global', (props, next) => {
console.log('Global middleware');
return next();
});
// 添加路由中间件
app.use('router', (props, next) => {
console.log('Router middleware');
return next();
});
// 添加错误处理组件
app.addStatusListener(404, ({ status, message }) => (
<div>Page not found: {message}</div>
));
// 渲染应用
app.render(document.getElementById('root'));
主要的应用类,提供以下功能:
constructor(prefix: string = '/')
get(path: string, controller: Controller)
post(path: string, controller: Controller)
put(path: string, controller: Controller)
delete(path: string, controller: Controller)
use(type: MiddlewareType, ...middleware: Middleware[])
redirect(url: string)
replace(url: string)
reload()
render<T extends HTMLElement>(
id: T,
manifest: { path: string, controller: Controller }[] = [],
notfound?: ReactNode
)
控制器基类,提供以下功能:
class MyController extends Controller {
render() {
return <div>My Page</div>;
}
}
type MiddlewareType = 'global' | 'router';
type Middleware = (props: LocationProps, next: () => ReactNode) => ReactNode;
interface LocationProps {
pathname: string;
query: Record<string, string>;
hash: string;
params: Record<string, string>;
}
@Application.Injectable
class MyService {
@Application.Inject(Request)
private readonly request: Request;
}
MIT
FAQs
somethings
We found that @braken/react 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.