NextGuardHQ/nextguard-strapi-v5

GitHub: NextGuardHQ/nextguard-strapi-v5

NextGuard 是 Strapi 5 的官方 TypeScript 安全插件,通过每日自动同步检测已安装软件包的 CVE 漏洞与安全公告。

Stars: 0 | Forks: 0

# NextGuard — Strapi 5 插件 监控您已安装的 Strapi 软件包是否存在 CVE 和安全公告。 每天自动同步至 [nextguardhq.com](https://nextguardhq.com)。 ## 要求 - Strapi **5.x** - Node.js 18+ - NextGuard Starter 计划(或更高版本) ## 安装 ### 选项 A — npm 软件包 ``` npm install nextguard-strapi-plugin ``` 在 `config/plugins.ts` 中启用: ``` export default { nextguard: { enabled: true }, }; ``` ### 选项 B — 本地插件 将此文件夹复制到您的 Strapi 5 项目中的 `src/plugins/nextguard/` 并构建: ``` cd src/plugins/nextguard npm install npm run build ``` 在 `config/plugins.ts` 中启用: ``` export default { nextguard: { enabled: true, resolve: './src/plugins/nextguard', }, }; ``` ## 配置 1. 转到 Strapi 管理面板中的 **Settings → NextGuard**。 2. 输入您来自 [nextguardhq.com → Account → API Keys](https://nextguardhq.com/account) 的 API key。 3. 点击 **Get activation code**。 4. 打开 [nextguardhq.com → Account → Connected Devices](https://nextguardhq.com/account) 并输入代码。 5. 完成 — 首次同步将自动运行。 ## 同步内容 | 软件包类型 | 示例 | |---|---| | Strapi core | `@strapi/strapi` | | 官方插件 | `@strapi/plugin-users-permissions`, `@strapi/plugin-i18n` | | 社区插件 | `strapi-plugin-io` | | Providers | `@strapi/provider-upload-aws-s3` | ## 构建(适用于本地插件或发布) ``` npm run build # compiles TypeScript → dist/ npm run watch # watch mode ``` `dist/` 文件夹包含编译后的 JS 和类型声明。 ## 环境变量 | 变量 | 默认值 | 描述 | |---|---|---| | `NEXTGUARD_HOST` | `https://nextguardhq.com` | 覆盖 API host | ## 许可证 MIT
标签:MITM代理, Strapi, TypeScript, 安全合规, 安全插件, 插件, 暗色界面, 网络代理, 自动化攻击