Bundle
dsh-secret-scan
敏感信息扫描:递归扫描代码库中的泄露密钥/令牌/私钥/硬编码密码,输出去敏感化的位置与严重级,提交前自查安全
- Source
- uckkk
- License
- MIT
- Updated
- Updated 20 days ago
Readme
# dsh-secret-scan · 敏感信息扫描 递归扫描代码库中的敏感信息泄露(AWS/GitHub/OpenAI/npm/Stripe/Google/Slack 密钥、JWT、私钥、硬编码密码等),输出**去敏感化**的位置与严重级。纯 Node 实现,无网络、无外部服务,**绝不回显明文密钥**。 ## 提供的工具 | 工具 | 作用 | |---|---| | `secret_scan` | 扫描目录,返回「文件 + 行号 + 类型 + 严重级」的敏感信息清单 | ## 安装 ```bash dsh plugin add dsh-secret-scan ``` 安装后在 profile 的 `package.json` 的 `dsh.profile.bundles` 中加入 `"dsh-secret-scan"`。 ## 用法示例 ``` 提交前帮我扫一下项目里有没有泄露的密钥 → 调用 secret_scan(root="/workspace") ``` ## 识别范围 AWS Access/Secret Key、GitHub Token、OpenAI Key、npm Token、Stripe Live Key、Google API Key、Slack Token、JWT、PEM 私钥、硬编码密码、通用 API Key/Token 等。 ## 说明 - 自动跳过 `node_modules`、`.git`、`dist`、`build`、二进制/图片/压缩包、lock 文件等。 - 这是**启发式扫描**(高精度正则),可能有少量误报,结果需人工确认;不负责自动修复。 - 密钥/令牌正文不会被回显,只报告文件、行号、类型和严重级。 ## 安装 ```bash dsh plugin add github:uckkk/dsh-secret-scan ``` > 安装即在本机运行第三方代码,请自行审阅源码。 ## 安装 ```bash dsh plugin add github:uckkk/dsh-secret-scan ``` ## 使用 安装后在会话中调用该插件注册的工具即可。 ## 许可 MIT > 安装即在本机运行第三方代码,请自行审阅源码。
Install
dsh plugin --profile web add github:uckkk/dsh-secret-scan
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-secret-scan from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.