01 / The question

Is the Web App Your AI Built
Really Secure?

h5i is an unified Rust framework for building, verifying, and hacking web apps.

BUILD / RUST KERNELSVERIFY / LEAN 4HACK / RUNNING APPS
h5i / secure web development01
02 / The founding insight

Software security has two sides

A lesson from my PhD: we need both.

RED-TEAMING

Find Bugs ∃

Find a counterexample in the running application.

FORMAL VERIFICATION

Prove Properties ∀

Prove a stated rule for the modeled logic under explicit assumptions.

h5i / a counterexample and a proof answer different questions02
03 / The product

h5i: Build, Verify, and Hack Web Apps

01 / BUILD

Composable Rust kernels

Axum-based framework with a separate kernel for application decisions and GPU support for suitable batch workloads.

02 / VERIFY

Lean 4 proofs

Extract Rust logic, prove critical properties, and test proof sensitivity with mutations.

03 / HACK

Agent-led red-teaming

Explore any web app, replay HTTP requests, and turn confirmed findings into CI tests.

h5i / secure web development03
04 / Build

Kernel-based design enables
Lean 4 verification and GPU optimization

Rust / parallel/kernel/src/lib.rs · pure kernel
pub fn push_rule(event: &[u8], pattern: &[u8],
    display: &[u8], members: u64,
    minimum: u64, maximum: u64, power: u64,
    required: u64, enabled: bool,
    require_display: bool) -> u32 {
    if !enabled { return 0; }
    if power < required { return 0; }
    if members < minimum
        || members > maximum { return 0; }
    if !glob(event, pattern) { return 0; }
    // display-name check omitted
    1
}
No I/O and no allocation: Axum and storage adapters stay outside.
Lean 4 / Proofs.lean · verify
theorem insufficient_power_denies ...
    (h : power < required) :
    push_rule event pattern display members
      minimum maximum power required true
      requireDisplay = ok 0#u32 := by
  simp [push_rule, h]
CUDA / device/src/lib.rs · optimize
#[kernel]
pub unsafe fn push_batch(...) {
    let i = thread::index_1d() as usize;
    ... shared::push_rule(&events[row(i)], ...)
}
15.6×1M push-rule rows vs one CPU thread · RTX 3090
Same kernel source on CPU, in Lean, and on GPU / GPU backend is experimental; Lean does not prove CPU/GPU equivalence04
05 / Verify

Verify application logic with Lean 4

Rust / kernel/src/lib.rs
fn delete(user: u64, s: &Snapshot,
          id: u64) -> Outcome {
    match find_post(&s.posts, id) {
        None => Err(Error::NotFound),
        Some(p) => {
            if p.author == user
                || is_moderator(&s.moderators, user) {
                Ok((one(Write::DelPost(id)),
                    Reply::Done))
            } else {
                Err(Error::Forbidden)
            }
        }
    }
}
Charon
Aeneas
Lean 4 / Theorems.lean · excerpt
theorem authorized (a : Principal) (s : Snapshot)
    (c : Command) ws r
    (hinv : Inv (Snapshot.toSt s))
    (h : transition a s c = .ok (.Ok (ws, r))) :
    ∀ w ∈ ws.val, allowed (Snapshot.toSt s) a.user.val w := by -- proof body omitted
h5i ui / theorem–spec dependency graph · excerpt
Proofs apply to stated properties under documented assumptions05
06 / Hack

Red-team any web app to find vulnerabilities

AI agent / shell
$ h5i browser snapshot
  @e7 Order 1041

$ h5i websec replay req_3 \
    --set query.id=1042
  → req_4 · HTTP 200

$ h5i websec diff res_3 res_4
  owner: Alice → Bob
Illustrative shell + actual h5i ui / local demo; confirmed findings can become CI tests06
07 / Early traction

Open-source traction

1.6k+RELEASE DOWNLOADS
700+GITHUB STARS
Maintainer-reported · October 11, 2026Repository ↗Releases ↗
Open-source interest / downloads and stars07
08 / What comes next

Build, Verify, and Hack

NEXT

  • Work with design partners on real applications
  • Improve the workflow
  • Build toward the first paid pilots