mirage
strukto-ai
The World's First Unified Virtual Filesystem For AI Agents
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:LeslieWylie/dsh-fleet-audit
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DSH agent 舰队卫生审计插件:只读、零依赖、确定性。检查三件事,输出全程脱敏:
~/.gitconfig、~/.netrc、~/.npmrc、~/.env、~/.ssh/)应收紧为 600/《700,组/其他可读一律标记为tooOpen`~/.gitconfig 与给定目录下的 .git/config,识别 https://user:pass@host、https://oauth2:TOKEN@host、token 型用户名等;输出 URL 中凭据以 *** 掩码,逐字节保证不泄露原文多 agent 时代的机器上,凭据散落在 ~/.gitconfig、agent 配置、.git/config 与各种 .env 里。git 的 url.*.insteadof 或 pushurl 一旦嵌了 token(例如 https://oauth2:<token>@gitlab.example.com/...),任何 git remote -v 都会把密钥打印进日志/对话/CI。一键只读审计 + 脱敏输出,是安全基线体检的第一道。
# 本地验证
dsh plugin --profile web add /path/to/dsh-fleet-audit
# 发布后(npm / GitHub)
dsh plugin --profile web add dsh-fleet-audit
# 或
dsh plugin --profile web add github:LeslieWylie/dsh-fleet-audit
安装后重启 dsh web,直接说「审计一下本机凭据卫生 / run fleet_audit」。
| 参数 | 类型 | 说明 |
|---|---|---|
roots |
string[] | 递归扫描 .git/config 的目录(可选;默认只查 ~/.gitconfig) |
files |
string[] | 额外要查权限的凭据文件绝对路径 |
scanSecrets |
boolean | 是否扫描 token 前缀字面量(默认 true) |
maxGitConfigs |
number | git config 扫描上限(默认 200,上限 2000) |
maxDepth |
number | 目录递归深度(默认 5,上限 20) |
{
"ok": true,
"summary": { "files": 5, "tooOpen": 1, "gitLeaks": 2, "secretFiles": 1, "issues": 4, "scannedGitConfigs": 12 },
"checks": {
"credentialFiles": [
{ "path": "/Users/alice/.gitconfig", "exists": true, "mode": "644", "tooOpen": true }
],
"gitRemoteLeaks": [
{ "file": "/Users/alice/code/proj/.git/config", "host": "gitlab.example.com", "maskedUrl": "https://***:***@gitlab.example.com/group/proj.git" }
],
"secrets": [
{ "file": "/Users/alice/.gitconfig", "providers": [ { "provider": "github", "count": 1 } ] }
]
},
"note": "Read-only audit; secret-like values are masked in the output. Fix permissions with chmod 600 and rotate any exposed credentials."
}
npm install
npm run check # typecheck + vitest + build
roots / files 显式指定chmod 600 并轮换密钥dsh plugin --profile <p> remove dsh-fleet-audit # 或从 dsh.profile.bundles 删除该行
插件只读、无状态,卸载不影响任何用户数据。
本项目为独立社区插件,与 DeepSeek 官方或其 DSH 仓库无隶属关系;"official"
身份仅通过官方渠道授予。发布时会给仓库添加 dsh-plugin topic 以便发现。
MIT © LeslieWylie
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: audit、security。