Skip to content

Commit 5b344d5

Browse files
authored
Merge pull request #5 from bx33661/codex/intelligence-lifecycle-stability
Add request broker, pattern-packs, and CLI hardening
2 parents 069523a + 6050e44 commit 5b344d5

113 files changed

Lines changed: 7343 additions & 188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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/

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ python3 scripts/release_check.py
4545
- Do not add credential theft, exfiltration, or abuse payloads.
4646
- Keep proof-of-concept examples local and minimal.
4747
- Preserve uncertainty and unverified fields in reports.
48+
- Keep bundled skills, references, walkthroughs, and golden outputs methodology-first. Use sanitized `demo-*`, `example-*`, or `fixture-*` names for examples.
49+
- Concrete real package names, CVEs, and advisory URLs are acceptable only when they are user-provided finding data, schema/format validation examples, or explicit primary-source research outputs with appropriate context.
4850

4951
## Pull Requests
5052

README.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@
3232
| **Evidence ledger** | `.omv/findings/*.yaml` keeps structured Evidence.v1 research state. |
3333
| **Audit workflow** | `/omv-audit` proves or blocks candidate findings using source -> sink -> guard reasoning. |
3434
| **Local reproduction** | `/omv-repro` records user-observed local results and repro artifacts. |
35+
| **Passive intelligence** | `/omv-radar` and `/omv-dedup` track watchlist changes and duplicate advisory risk. |
3536
| **Report drafting** | `/omv-report` generates review-friendly advisory drafts from validated findings. |
37+
| **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. |
3639
| **CLI management** | `omv dashboard`, `omv doctor`, and `omv findings ...` keep local state inspectable. |
3740

3841
## Quick Start
3942

4043
```sh
4144
npx oh-my-vul setup
4245
omv doctor
46+
omv request preflight
4347
```
4448

4549
If `omv` is not on your `PATH`, use npx:
@@ -61,6 +65,9 @@ omv findings validate demo-traversal
6165
omv findings doctor demo-traversal
6266
6367
/omv-report demo-traversal
68+
/omv-critic demo-traversal
69+
/omv-disclose timeline demo-traversal
70+
omv submissions record demo-traversal --platform vuldb --submission-id 12345 --url https://example.test/submission/12345
6471
omv report artifacts demo-traversal
6572
```
6673

@@ -104,8 +111,10 @@ Project-level setup writes `.omv/setup-scope.json` so `omv doctor` can resolve t
104111
-> omv repro init <id>
105112
-> /omv-repro when observed_result still needs local confirmation
106113
-> omv findings validate <id>
107-
-> omv findings doctor <id>
114+
-> /omv-critic
108115
-> /omv-report
116+
-> /omv-disclose and omv submissions ...
117+
-> omv findings doctor <id>
109118
-> omv report artifacts <id>
110119
-> advisory draft for VulDB, CVE, GHSA, OSV, or Markdown
111120
```
@@ -122,6 +131,10 @@ Project-level setup writes `.omv/setup-scope.json` so `omv doctor` can resolve t
122131
| `omv-audit` | `/omv-audit` | audit | Deep-audit a candidate finding — prove or disprove the vulnerability, fill Evidence.v1 fields for omv-report |
123132
| `omv-repro` | `/omv-repro` | audit | Guide local reproduction of a finding — walk through execution, record observed_result, confirm or block |
124133
| `omv-report` | `/omv-report` | reporting | Generate VulDB/CVE/GHSA/OSV advisory reports from confirmed findings |
134+
| `omv-radar` | `/omv-radar` | intelligence | Passive watchlist intelligence — refresh local advisory/release signals and summarize radar events |
135+
| `omv-dedup` | `/omv-dedup` | intelligence | Duplicate advisory analysis — generate deterministic NVD/GHSA/OSV/ecosystem queries and update Evidence.v1 dedup fields |
136+
| `omv-disclose` | `/omv-disclose` | disclosure | Responsible disclosure lifecycle helper — draft vendor emails, timelines, and local submission bookkeeping guidance |
137+
| `omv-critic` | `/omv-critic` | reporting | Adversarial pre-submission review — identify likely CNA rejection reasons before report generation |
125138
<!-- omv:skills:end -->
126139

127140
## Finding Targets
@@ -154,6 +167,23 @@ csrf xxe sql ssti sandbox redirect upload crypto infoleak
154167

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

170+
## Request Reliability
171+
172+
`/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:
173+
174+
```sh
175+
omv request preflight
176+
omv request preflight --json --refresh
177+
omv request fetch https://registry.npmjs.org/markdown-it --json
178+
omv request fetch https://api.github.com/repos/owner/repo --accept application/json --refresh
179+
```
180+
181+
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.
182+
183+
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.
184+
185+
See [docs/request-broker.md](docs/request-broker.md) for the full request broker behavior, JSON contract, cache policy, and Playwright evaluation.
186+
157187
## Evidence Ledger
158188

159189
Project-local research state lives in `.omv/findings/`. These files are gitignored by default because they may contain private research notes.
@@ -175,6 +205,13 @@ Evidence files follow [contracts/evidence.v1.yaml](contracts/evidence.v1.yaml).
175205
- dedup status
176206
- unknown-field accounting
177207

208+
Optional sidecars keep richer local state without bloating Evidence.v1:
209+
210+
- `.omv/threatmaps/<id>.yaml` stores ThreatMap.v1 source -> sink -> guard graphs.
211+
- `.omv/radar/events.jsonl` stores passive watchlist intelligence events.
212+
- `.omv/submissions/<id>.yaml` stores report submission bookkeeping.
213+
- `.omv/notes/<id>.md` stores timestamped local research decisions.
214+
178215
<details>
179216
<summary><strong>Status values</strong></summary>
180217

@@ -205,6 +242,37 @@ Use `/omv-report` after you have a validated Evidence.v1 file or a complete hand
205242
- choose platform-specific wording for VulDB, GHSA, OSV, and Markdown advisories;
206243
- keep proof-of-concept language local and reviewer-safe.
207244

245+
Before reporting, `/omv-critic <id>` reviews Evidence.v1 plus any ThreatMap.v1 sidecar and returns `reject_risk: low|medium|high`. It is intentionally different from `omv findings validate`: validation checks structure, critic checks argument quality.
246+
247+
After reporting, track submissions locally:
248+
249+
The identifiers in this snippet are sanitized placeholders for command shape.
250+
251+
```sh
252+
omv submissions record demo-traversal --platform vuldb --submission-id 12345 --url https://example.test/submission/12345
253+
omv submissions track demo-traversal
254+
omv submissions close demo-traversal --cve CVE-2026-12345
255+
```
256+
257+
## Passive Intelligence
258+
259+
Create `.omv/radar/watchlist.yaml`, then run:
260+
261+
The package names in bundled examples are sanitized fixture values. Use real package names only for user-provided research targets.
262+
263+
```sh
264+
omv radar refresh --dry-run
265+
omv radar refresh
266+
omv radar brief
267+
```
268+
269+
Radar uses passive advisory, registry, and repository metadata sources only. Dedup review starts with deterministic queries:
270+
271+
```sh
272+
omv dedup demo-traversal
273+
omv dedup demo-traversal --confirm --existing-cve none --notes "searched NVD, GHSA, OSV, npm advisory DB"
274+
```
275+
208276
## Safety Boundary
209277

210278
`oh-my-vul` supports **non-destructive vulnerability research only**:
@@ -225,6 +293,8 @@ Use `/omv-report` after you have a validated Evidence.v1 file or a complete hand
225293
| Document | Purpose |
226294
|---|---|
227295
| [README.zh-CN.md](README.zh-CN.md) | Chinese project guide. |
296+
| [docs/request-broker.md](docs/request-broker.md) | Request broker usage, failure classes, cache behavior, and Playwright evaluation. |
297+
| [docs/request-broker.zh-CN.md](docs/request-broker.zh-CN.md) | Chinese request broker guide. |
228298
| [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. |
229299
| [docs/examples/demo-finding-flow.md](docs/examples/demo-finding-flow.md) | Sanitized end-to-end finding workflow example. |
230300
| [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 临时运行:
@@ -121,6 +123,10 @@ omv version --json
121123
| `omv-audit` | `/omv-audit` | 深入审计候选 finding,补齐 Evidence.v1 证据字段 |
122124
| `omv-repro` | `/omv-repro` | 引导本地复现,记录真实 observed_result |
123125
| `omv-report` | `/omv-report` | 从 confirmed finding 生成 VulDB/CVE/GHSA/OSV 报告草稿 |
126+
| `omv-radar` | `/omv-radar` | 被动 watchlist 情报,刷新 advisory/release 信号 |
127+
| `omv-dedup` | `/omv-dedup` | 去重分析,生成 NVD/GHSA/OSV/生态查询并更新 Evidence.v1 |
128+
| `omv-disclose` | `/omv-disclose` | 负责任披露生命周期辅助,包括时间线和沟通草稿 |
129+
| `omv-critic` | `/omv-critic` | 提交前反向审稿,找出可能被 CNA 或平台拒绝的原因 |
124130

125131
## 发现审计目标
126132

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

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

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

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

225248
| 文档 | 用途 |
226249
|---|---|
250+
| [README.md](README.md) | 英文项目指南 |
251+
| [docs/request-broker.zh-CN.md](docs/request-broker.zh-CN.md) | 请求代理、失败分类、缓存和 Playwright 评估 |
252+
| [docs/request-broker.md](docs/request-broker.md) | 英文 request broker 指南 |
227253
| [docs/vulnerability-research-best-practices.zh-CN.md](docs/vulnerability-research-best-practices.zh-CN.md) | 使用本项目做漏洞研究的最佳实践 |
228254
| [docs/examples/demo-finding-flow.md](docs/examples/demo-finding-flow.md) | 脱敏的端到端 finding 工作流示例 |
229255
| [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

contracts/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Skills reference these files directly rather than duplicating schema content in
1010
|---|---|
1111
| `evidence.v1.yaml` | Finding object passed between `omv-find` and `omv-report`. Replaces the old `handoff-contract.md` in both skills. |
1212
| `candidate-list.v1.yaml` | Schema for the candidate list output produced by `omv-find`. |
13-
| `threat-map.v1.yaml` | Schema for the threat map sidecar produced by `omv-audit` (future). |
13+
| `threat-map.v1.yaml` | Optional dataflow threat map sidecar produced by `omv-audit`. |
14+
| `submission.v1.yaml` | Local submission tracking sidecar for post-report bookkeeping. |
1415

1516
## Versioning
1617

0 commit comments

Comments
 (0)