
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
@edgeone/ef-cls-sdk
Advanced tools
基于 tencentcloud-cls-sdk-js 进行开发,适配 EdgeFunctions Runtime API,用于在 EdgeOne 边缘函数中进行 CLS 日志上报。
npm i @edgeone/ef-cls-sdk
import { AsyncClient, Content, LogGroup, LogItem, PutLogsRequest } from '@edgeone/ef-cls-sdk';
/** CONFIG START */
const TENCENT_SECRET_ID = 'xxxxx';
const TENCENT_SECRET_KEY = 'xxxxx';
const CLS_END_POINT = 'ap-xxxxx.cls.tencentcs.com';
const CLS_TOPIC_ID = 'xxxxx';
/** CONFIG END */
const clsAsyncClient = new AsyncClient({
endpoint: CLS_END_POINT,
secretId: TENCENT_SECRET_ID,
secretKey: TENCENT_SECRET_KEY,
sourceIp: 'edge',
retry_times: 1,
});
async function clsUpload(data: string) {
const logGroup = new LogGroup();
const logItem = new LogItem();
const logTime = Math.floor(Date.now() / 1000);
const logContent = new Content('__CONTENT__', JSON.stringify(data));
logItem.setTime(logTime);
logItem.pushBack(logContent);
logGroup.addLogs(logItem);
const clsRequest = new PutLogsRequest(CLS_TOPIC_ID, logGroup);
return await clsAsyncClient.PutLogs(clsRequest);
}
async function doClsUpload(request: Request) {
try {
const data = await request.clone().text();
await clsUpload(data);
} catch (err) {
console.error(`cls upload error: ${err}`);
}
}
async function handleRequest(event: FetchEvent) {
const { request } = event;
const contentType = request.headers.get('content-type') || '';
if (contentType.includes('application/json') || contentType.includes('text/plain')) {
// 用于通知边缘函数等待 Promise 完成,可延长事件处理的生命周期,不阻塞 fetch(request) 的返回。
event.waitUntil(doClsUpload(request));
}
return;
}
addEventListener('fetch', handleRequest);
FAQs
Edgefunctions CLS SDK
The npm package @edgeone/ef-cls-sdk receives a total of 9 weekly downloads. As such, @edgeone/ef-cls-sdk popularity was classified as not popular.
We found that @edgeone/ef-cls-sdk 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
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.