
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@ysfe/signature
Advanced tools
前端签名生成工具
略
安装: 执行 yarn add @ysfe/signature
使用:
const res = signature({
data: {
// your params
}
}).toString()
参数及用法, 请看
./src或 单测用例
| 参数 | 描述 | 类型 | 默认值 | 其他说明 | | ----------- | ------------------------------ | ----------------------------------------------------- | ------ | -------- | -------------------- | --- | --- | | data | 请求参数 | {[key:string]:any} | {} | | | suffix | 自定义后缀 (参数盐值) | string | 无 | | | sort | 是否启用排序 or 自定义排序方法 | boolean / (key1:string, key2:string)=> number / false | | | hashFactory | 签名 hash 计算方法 | 'MD5' | 'SHA1' | 'SHA256' | (str:string)=>string | MD5 | |
参数及用法, 请看
./src或 单测用例
| 方法 | 描述 |
|---|---|
| serialize | 参数序列化, 生成 query 字符串 |
| toString | 输出签名字符串 |
| addToUrl | 将参数携带签名附加给 url |
const res = signByStr(
'http://test.com/',
{ a: '123', c: '234' },
{ sort: true }
)
略
arrayFormat: 'brackets', 如果出现问题, 变更这里或提前进行 stringify 即可[其他说明事项]
FAQs
We found that @ysfe/signature demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.