
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@cloudbase/extension-sms
Advanced tools
方法1: 使用npm:
npm install --save @cloudbase/extension-sms
方法2: 使用CDN
<script src="//unpkg.com/@cloudbase/extension-sms/built/index.umd.js"></script>
const extSms = require('@cloudbase/extension-sms')
tcb.init({
env:'xxx',
});
tcb.registerExtension(extSms)
const res = await tcb.invokeExtension('CloudInfinite',opts)
opts 包含以下属性
| 名称 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| action | String | 是 | 操作类型,支持 Send 和 Login |
| phone | String | 是 | 电话号码 |
| app | Tcb | 是 | tcb实例 |
| smsCode | String | 否 | 短信验证码,action 为 Login 时需要传入 |
| customDomain | String | 否 | HTTP触发的自定义域名 |
action目前包含以下类型
const app = tcb.init({
env: '您的环境ID'
});
const opts = {
action: 'Send',
app,
phone: '' // 用户输入的手机号
};
try {
await tcb.invokeExtension(extSms.name, opts); // 发送短信验证码
console.log('短信验证码发送成功')
} catch (error) {
console.log('短信验证码发送失败:', error.message)
}
注意:前往短信服务(SMS),调整短信发送频率配置
const app = tcb.init({
env: '您的环境ID'
});
const opts = {
action: 'Login',
app,
phone: '', // 用户手机号
smsCode: '', // 接收到的短信验证码
}
try {
await tcb.invokeExtension(extSms.name, opts); // 正式登录
console.log('短信验证码登录成功')
} catch (error) {
console.log('登录失败:', error.message)
}
FAQs
We found that @cloudbase/extension-sms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.