Skip to content

Commit f46b72b

Browse files
committed
Harden CLI with request preflight, dashboard UX, and project assets
Adds omv request/config commands, expands args validation, improves setup --project mode, and includes logo assets. Updates README with full skill table and quick-start for request preflight.
1 parent e8e5052 commit f46b72b

20 files changed

Lines changed: 768 additions & 32 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ __pycache__/
3131
.idea/
3232
*.swp
3333
*.swo
34+
.omv/repro/
35+
.omv/reports/
36+
.omv/archive/

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@
3535
| **Passive intelligence** | `/omv-radar` and `/omv-dedup` track watchlist changes and duplicate advisory risk. |
3636
| **Report drafting** | `/omv-report` generates review-friendly advisory drafts from validated findings. |
3737
| **Disclosure lifecycle** | `/omv-disclose`, `/omv-critic`, and `omv submissions ...` cover pre-submit review and post-submit tracking. |
38+
| **Request reliability** | `omv request ...` classifies rate limits, request refusals, source health, and cached metadata fetches. |
3839
| **CLI management** | `omv dashboard`, `omv doctor`, and `omv findings ...` keep local state inspectable. |
3940

4041
## Quick Start
4142

4243
```sh
4344
npx oh-my-vul setup
4445
omv doctor
46+
omv request preflight
4547
```
4648

4749
If `omv` is not on your `PATH`, use npx:
@@ -159,6 +161,23 @@ csrf xxe sql ssti sandbox redirect upload crypto infoleak
159161

160162
`/omv-find` should return evidence-backed candidates: repository, registry identity, maintenance signal, code-size estimate, **source -> sink -> guard** notes, and local audit next steps.
161163

164+
## Request Reliability
165+
166+
`/omv-find` often needs public registry metadata, GitHub metadata, raw source files, and source archives. Those sources can be rate-limited, bot-blocked, missing, or temporarily unavailable. Use the TypeScript request broker before or during request-heavy research:
167+
168+
```sh
169+
omv request preflight
170+
omv request preflight --json --refresh
171+
omv request fetch https://registry.npmjs.org/markdown-it --json
172+
omv request fetch https://api.github.com/repos/owner/repo --accept application/json --refresh
173+
```
174+
175+
The broker writes cache entries under `.omv/cache/http/`, redacts sensitive response headers, and returns structured `failure.reason`, `rateLimit`, `expiresAt`, and `recommendation` fields. GitHub API requests automatically use `GITHUB_TOKEN` or `GH_TOKEN` when present.
176+
177+
Common failure reasons are `rate_limited`, `auth_required`, `bot_blocked_or_forbidden`, `not_found`, `network_timeout`, `network_error`, `upstream_error`, and `invalid_url`. Treat these as research-state signals: keep affected fields unverified, prefer registry/source archive fallbacks, and avoid repeatedly retrying blocked URLs.
178+
179+
See [docs/request-broker.md](docs/request-broker.md) for the full request broker behavior, JSON contract, cache policy, and Playwright evaluation.
180+
162181
## Evidence Ledger
163182

164183
Project-local research state lives in `.omv/findings/`. These files are gitignored by default because they may contain private research notes.
@@ -268,6 +287,8 @@ omv dedup demo-traversal --confirm --existing-cve none --notes "searched NVD, GH
268287
| Document | Purpose |
269288
|---|---|
270289
| [README.zh-CN.md](README.zh-CN.md) | Chinese project guide. |
290+
| [docs/request-broker.md](docs/request-broker.md) | Request broker usage, failure classes, cache behavior, and Playwright evaluation. |
291+
| [docs/request-broker.zh-CN.md](docs/request-broker.zh-CN.md) | Chinese request broker guide. |
271292
| [docs/vulnerability-research-best-practices.zh-CN.md](docs/vulnerability-research-best-practices.zh-CN.md) | Chinese best-practices guide for vulnerability research with this project. |
272293
| [docs/examples/demo-finding-flow.md](docs/examples/demo-finding-flow.md) | Sanitized end-to-end finding workflow example. |
273294
| [docs/roadmap-0.8.md](docs/roadmap-0.8.md) | Planned `v0.8` CLI improvements. |

README.zh-CN.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
| **深度审计** | `/omv-audit` 用 source -> sink -> guard 证明或否定候选漏洞。 |
3434
| **本地复现** | `/omv-repro` 记录用户真实本地观测和复现材料。 |
3535
| **报告生成** | `/omv-report` 从 validated finding 生成审稿友好的报告草稿。 |
36+
| **请求可靠性** | `omv request ...` 识别限流、拒绝、来源健康和缓存元数据请求。 |
3637
| **CLI 管理** | `omv dashboard``omv doctor``omv findings ...` 管理本地状态。 |
3738

3839
## 快速开始
3940

4041
```sh
4142
npx oh-my-vul setup
4243
omv doctor
44+
omv request preflight
4345
```
4446

4547
如果没有全局安装 `omv`,用 npx 临时运行:
@@ -115,6 +117,10 @@ omv version --json
115117
| `omv-audit` | `/omv-audit` | 深入审计候选 finding,补齐 Evidence.v1 证据字段 |
116118
| `omv-repro` | `/omv-repro` | 引导本地复现,记录真实 observed_result |
117119
| `omv-report` | `/omv-report` | 从 confirmed finding 生成 VulDB/CVE/GHSA/OSV 报告草稿 |
120+
| `omv-radar` | `/omv-radar` | 被动 watchlist 情报,刷新 advisory/release 信号 |
121+
| `omv-dedup` | `/omv-dedup` | 去重分析,生成 NVD/GHSA/OSV/生态查询并更新 Evidence.v1 |
122+
| `omv-disclose` | `/omv-disclose` | 负责任披露生命周期辅助,包括时间线和沟通草稿 |
123+
| `omv-critic` | `/omv-critic` | 提交前反向审稿,找出可能被 CNA 或平台拒绝的原因 |
118124

119125
## 发现审计目标
120126

@@ -144,6 +150,23 @@ csrf xxe sql ssti sandbox redirect upload crypto infoleak
144150

145151
`/omv-find` 应输出带证据的候选结果,包括仓库、注册表身份、维护活跃度、代码规模估计、**source -> sink -> guard** 笔记和下一步本地审计建议。
146152

153+
## 请求可靠性
154+
155+
`/omv-find` 经常要读取公开 registry 元数据、GitHub 元数据、raw 源码文件和源码归档。这些来源可能限流、拒绝、路径不存在或临时不可用。请求密集型研究前,先用 TypeScript request broker 检查来源健康:
156+
157+
```sh
158+
omv request preflight
159+
omv request preflight --json --refresh
160+
omv request fetch https://registry.npmjs.org/markdown-it --json
161+
omv request fetch https://api.github.com/repos/owner/repo --accept application/json --refresh
162+
```
163+
164+
broker 会把缓存写入 `.omv/cache/http/`,脱敏响应头,并输出结构化 `failure.reason``rateLimit``expiresAt``recommendation`。如果环境里有 `GITHUB_TOKEN``GH_TOKEN`,GitHub API 请求会自动使用 token。
165+
166+
常见失败分类包括 `rate_limited``auth_required``bot_blocked_or_forbidden``not_found``network_timeout``network_error``upstream_error``invalid_url`。这些分类应作为研究状态信号:相关字段保持未确认,优先使用 registry/source archive fallback,不要反复重试已经被拒绝的 URL。
167+
168+
完整行为、JSON 字段、缓存策略和 Playwright 评估见 [docs/request-broker.zh-CN.md](docs/request-broker.zh-CN.md)
169+
147170
## Evidence 账本
148171

149172
项目本地研究状态保存在 `.omv/findings/`。这些文件默认应视为私有研究记录,不应直接发布。
@@ -218,6 +241,9 @@ omv findings promote demo-traversal --status blocked
218241

219242
| 文档 | 用途 |
220243
|---|---|
244+
| [README.md](README.md) | 英文项目指南 |
245+
| [docs/request-broker.zh-CN.md](docs/request-broker.zh-CN.md) | 请求代理、失败分类、缓存和 Playwright 评估 |
246+
| [docs/request-broker.md](docs/request-broker.md) | 英文 request broker 指南 |
221247
| [docs/vulnerability-research-best-practices.zh-CN.md](docs/vulnerability-research-best-practices.zh-CN.md) | 使用本项目做漏洞研究的最佳实践 |
222248
| [docs/examples/demo-finding-flow.md](docs/examples/demo-finding-flow.md) | 脱敏的端到端 finding 工作流示例 |
223249
| [docs/roadmap-0.8.md](docs/roadmap-0.8.md) | `v0.8` CLI 改进计划 |
821 KB
Loading
698 KB
Loading
843 KB
Loading

assets/oh-my-vul-logo-minimal.png

850 KB
Loading

assets/oh-my-vul-logo.png

764 KB
Loading

docs/vulnerability-research-best-practices.zh-CN.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@
8585

8686
候选不是漏洞。只有当 source、sink、guard 和可复现影响都成立时,才可能进入 confirmed。
8787

88+
如果 finder 过程中大量请求被拒绝、限流或超时,先检查请求来源健康:
89+
90+
```sh
91+
omv request preflight
92+
omv request fetch https://api.github.com/repos/owner/repo --accept application/json --json
93+
```
94+
95+
`failure.reason``rateLimit``recommendation` 当成研究状态处理。比如 GitHub API `rate_limited` 时,优先使用 registry 元数据、npm/PyPI source archive 或已有缓存,不要反复请求同一个被拒绝的 URL。完整请求代理说明见 [request-broker.zh-CN.md](request-broker.zh-CN.md)
96+
8897
## 3. 建立 Evidence 文件
8998

9099
为值得继续审计的候选建立本地证据文件:
@@ -352,6 +361,7 @@ PoC 只是证据之一。还需要版本边界、根因、影响、去重、CVSS
352361
npx oh-my-vul setup
353362
omv doctor
354363
omv dashboard
364+
omv request preflight
355365
```
356366

357367
找目标:

scripts/check_npm_pack.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"dist/index.js",
2626
"registry.yaml",
2727
"contracts/evidence.v1.yaml",
28+
"contracts/candidate-list.v1.yaml",
2829
"contracts/submission.v1.yaml",
2930
"contracts/threat-map.v1.yaml",
3031
"docs/vulnerability-research-best-practices.zh-CN.md",
@@ -39,8 +40,11 @@
3940
"skills/omv-critic/SKILL.md",
4041
"shared/scripts/collect_metadata.py",
4142
"shared/scripts/estimate_loc.sh",
43+
"shared/scripts/http_client.py",
4244
"shared/scripts/resolve_source_path.py",
4345
"shared/references/patterns/npm.md",
46+
"shared/references/research-radar.md",
47+
"shared/references/pattern-packs.md",
4448
}
4549

4650
REQUIRED_PREFIXES = {

0 commit comments

Comments
 (0)