Skip to content

Commit 728688a

Browse files
hyperpolymathclaude
andcommitted
feat(storage): wire VeriSimDB HTTP push via direct verisim-api
- Replace V-lang gateway pattern (/api/v1/hexads) with direct verisim-api calls (POST /octads) using OctadRequest payload mapping - Port all HTTP functions from ureq v2 API to v3: .send(), .body_mut() .read_to_string(), builder-style headers, no attach_auth helper - Add hexad_to_octad_request() mapping: title/body/types/metadata/provenance - Persist VerisimDb mode now does HTTP push when VERISIMDB_URL is set, filesystem fallback otherwise (both in persist_report and persist_assemblyline_report) - Fix bridge/intelligence.rs OSV API call for ureq v3 (same pattern) - ROADMAP: mark v2.2.0 HTTP integration and per-project instance done Requires: VERISIMDB_URL=http://verisim-panic-api.flycast:8080 VERISIM_API_TOKEN=<secret> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 82f2e6b commit 728688a

3 files changed

Lines changed: 234 additions & 123 deletions

File tree

ROADMAP.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ binary, panicbot (gitbot-fleet CI integration), and mass-panic (org-scale batch
4141
== v2.2.0 -- VeriSimDB Integration
4242

4343
* [x] Filesystem persistence for scan results
44-
* [ ] VeriSimDB HTTP API integration: push hexads via REST
44+
* [x] VeriSimDB HTTP API integration: push octads via REST (ureq v3; VERISIMDB_URL env var; http feature; filesystem fallback)
45+
* [x] Per-project VeriSimDB instance: `deploy/panic-attack/fly.toml` for `verisim-panic-api` (6PN internal, lhr)
4546
* [ ] Delta reporting: only report changes since last scan
4647
* [ ] Hexad persistence for Patch Bridge mitigation registry (currently JSON file)
47-
* [ ] Historical trend queries via VQL-UT
48+
* [ ] Historical trend queries via VCL
4849

4950
== v2.3.0 -- Shell and UX
5051

@@ -83,7 +84,7 @@ coverage: none beyond `unsafe_blocks` (too blunt).
8384
* [x] Detect constant-time comparison violations (using `==` on secret values) — PA022, Rust/Python
8485
* [ ] Detect key-reuse patterns across contexts (not reliably detectable statically — deferred)
8586
* [ ] Detect nonce reuse in symmetric encryption (not reliably detectable statically — deferred)
86-
* [ ] Detect missing signature verification before use
87+
* [x] Detect JWT signature verification bypass — `dangerous_insecure_decode` (Rust/jsonwebtoken), `jwt.decode()` without `jwt.verify()` / `decodeJwt()` without `jwtVerify()` (JS/jose), `jwt.ParseUnverified()` (Go), `verify_signature: False` / `algorithms=["none"]` (Python/PyJWT)
8788

8889
=== `proof_drift` — Formal verification drift
8990

@@ -96,7 +97,7 @@ stay in sync with their formal counterparts.
9697
* [x] Detect `@test x isa Y` (no value check) standing in for a formally proven theorem in Julia mirror files
9798
* [x] Detect `# sorry` / `# TODO: prove` / `# admitted` comments in Julia mirror implementations
9899
* [ ] Flag Rust/Julia functions whose name matches an Isabelle definition but whose signature has drifted
99-
* [ ] Detect `Obj.magic` in Coq-extracted OCaml (upstream axiom bypass in extracted artifacts)
100+
* [x] Detect `Obj.magic` in Coq-extracted OCaml (upstream axiom bypass in extracted artifacts) — distinguished from hand-written OCaml via `type __ = Obj.t` extraction marker
100101

101102
=== `input_boundary` — Structured-data parsing and deserialization
102103

src/bridge/intelligence.rs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,20 @@ pub fn query_osv_batch(deps: &[LockedDependency]) -> Result<Vec<Vulnerability>>
134134
.collect(),
135135
};
136136

137-
let body = serde_json::to_string(&request)?;
138-
139-
let resp = match ureq::post("https://api.osv.dev/v1/querybatch")
140-
.set("Content-Type", "application/json")
141-
.send_string(&body)
142-
{
143-
Ok(resp) => resp,
144-
Err(ureq::Error::Status(code, resp)) => {
145-
let body_text = resp.into_string().unwrap_or_default();
146-
anyhow::bail!("OSV API returned HTTP {}: {}", code, body_text);
147-
}
148-
Err(e) => {
149-
anyhow::bail!("OSV API request failed: {}", e);
150-
}
151-
};
137+
let body_bytes = serde_json::to_vec(&request)?;
138+
139+
let mut resp = ureq::post("https://api.osv.dev/v1/querybatch")
140+
.header("Content-Type", "application/json")
141+
.send(&body_bytes[..])
142+
.map_err(|e| anyhow::anyhow!("OSV API request failed: {}", e))?;
143+
144+
let status = resp.status().as_u16();
145+
if !(200..300).contains(&status) {
146+
let buf = resp.body_mut().read_to_string().unwrap_or_default();
147+
anyhow::bail!("OSV API returned HTTP {}: {}", status, buf);
148+
}
152149

153-
let response_text = resp.into_string()?;
150+
let response_text = resp.body_mut().read_to_string()?;
154151
let response: OsvBatchResponse = serde_json::from_str(&response_text)?;
155152

156153
// Map OSV results back to dependencies

0 commit comments

Comments
 (0)