
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.
@pubinfo/openapi
Advanced tools
Generate request files according to the OpenAPI.
Need config file in your project root directory:
// openapi.config.js / openapi.config.ts
export default {
/* options */
}
and then run:
npx @pubinfo/openapi@latest generate
import { defineConfig } from '@pubinfo/openapi'
export default defineConfig({
// 是否启用,默认 true
enabled: true,
// 忽略缓存强制生成接口文件,默认 false
force: false,
// 预设配置
presets: [
presetName({ /* preset options */ }),
],
// 文件默认导入
imports: {
'@/api': 'request', // import request from '@/api'
'request': ['foo', 'bar'], // import { foo , bar } from 'request'
'./api': [{ name: 'foo', as: 'bar' }] // import { foo as bar } from './api'
},
// Swagger2.0 / OpenAPI3.0 地址,直接指向JSON的地址
input: 'http://your/api-doc',
// 文件输出目录
output: '/src/api',
// 缓存目录
cacheDir: 'node_modules/.pubinfo-openapi',
// 自定义 hooks, 透传 `@umijs/openapi` 的 `hook` 配置
hooks: {
customFunctionName: data => data.operationId
},
// 接口文档登录凭证
credentials: {
username: '',
password: ''
},
// 请求远程文档时的超时时间, 为0不限制超时时间
timeout: 5000,
// 批量配置
batch: [
{
imports: {},
input: '',
output: '',
hooks: {},
presets: [],
credentials: {},
timeout: 0
}
]
})
FAQs
Generate request files according to the OpenAPI.
We found that @pubinfo/openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
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.