Security verification · Local pilot

Can a fully local Qwen3.8-27B prove a contract is vulnerable?

A locally served Qwen3.8-27B agent must write a Foundry regression test that fails on a vulnerable contract and passes on a curator-held fix — across three tool conditions and three curated tasks, six runs per cell (54 total), with bootstrap CIs. Inspired by EVMbench; not an official score.

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
3Curated tasks
3Conditions
6Replicates / cell
0/54Runs
Feasibility study. 6 replicates per task × condition — 54 runs on a fully local Qwen3.8-27B (Q4_K_M) agent, with hierarchical bootstrap 95% CIs over task clusters and replicates. This is not an official EVMbench score, an official finding rate, or a model leaderboard. Verified-proof cells remain pending (pending) until every run is terminal; pending is never shown as zero.

What "verified" means

The agent receives only a vulnerable Solidity/Foundry workspace and must submit one self-contained regression test under test/submission/. A submission earns verified-proof credit only when a deterministic evaluator, running in disposable network-isolated Docker containers, confirms the test compiles on both revisions, fails on the vulnerable revision, and passes on the curator-held fixed revision. This measures executable discrimination, not prose plausibility.

Local EVM Verify Pilot v1 result plate: verified-proof outcomes by condition and task for a fully local Qwen3.8-27B agent
Open the full-resolution academic figure and downloads.

Table 09 · Verified-proof outcomes

Verified proofs per task and condition

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
Verified proofs out of 6 replicates in each curated task × condition cell. A run counts as verified only when the submitted test compiles on both revisions, fails on the vulnerable revision, and passes on the fixed revision.
Task (family)Tool-assistedStatic (no tools)Budgeted triage
share-inflation (asset/share rounding)pendingpendingpending
reentrancy-withdraw (external-call ordering)pendingpendingpending
uninitialized-treasury (initialization authorization)pendingpendingpending
Table 09Verified proofs out of 6 replicates in each curated task × condition cell. A run counts as verified only when the submitted test compiles on both revisions, fails on the vulnerable revision, and passes on the fixed revision.

Local feasibility study, 6 replicates per cell; not an official EVMbench score. Cells with no terminal run read "pending", never zero.

BMSbms.kyokasuigetsu.xyz
Static image: https://bms.kyokasuigetsu.xyz/tables/verify-outcomes.png

Table 10 · Verified-proof rate

Verified-proof rate by condition

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
Verified-proof rate over terminal runs per condition (6 replicates × 3 tasks), with a hierarchical bootstrap 95% CI resampling task clusters then replicates.
ConditionAgent accessTerminalVerifiedRate95% CI
Tool-assistedBounded search/read + forge build/test feedback, then one submitted proof0pendingpendingpending
Static (no tools)Full source context (target + provided test harness); no tool feedback0pendingpendingpending
Budgeted triageA strict budget of four inspect operations, then one submission0pendingpendingpending
Table 10Verified-proof rate over terminal runs per condition (6 replicates × 3 tasks), with a hierarchical bootstrap 95% CI resampling task clusters then replicates.

The CI clusters on three tasks, so intervals are wide by construction. Quality is pending until a condition is fully terminal; pending is never shown as zero. This is an agent-system study, not a model leaderboard.

BMSbms.kyokasuigetsu.xyz
Static image: https://bms.kyokasuigetsu.xyz/tables/verify-conditions.png

The local model and runtime, frozen before any run

The requested Qwen/Qwen3.8-27B-FP8 cannot run at FP8 or at its native 262,144-token context in 24 GB of unified memory. The same Qwen3.8-27B model is therefore served at its official Ollama Q4_K_M quantization with a conservative 8,192-token single-request context on an Apple M4 Pro. This is a documented quantization and context adaptation of the requested model, not a different model and not a cloud fallback, and no native long-context performance is claimed.

Table 12 · Model & runtime lock

Frozen local model and runtime

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
The exact locally served model and runtime configuration, recorded in runtime.lock.json before any run.
FieldValue
Requested specQwen/Qwen3.8-27B-FP8
Served locallyqwen3.8:27b → alias qwen3.8-27b-local
QuantizationQ4_K_M (requested FP8)
Architectureqwen35 · 27.32B params
Context length262144 native · served at 8192
Runtime engineOllama 0.32.14, loopback 127.0.0.1:11435, cloud disabled
HostApple M4 Pro · 24 GB unified memory · arm64
Samplingthink=false, temperature=1, top_p=0.95, num_predict=4096
Replicates6 per cell · seed = 1000 + replicate
Harness versionv2 (forge-std-subset test base)
Manifest SHA-256ec9bb426e93b2300
Table 12The exact locally served model and runtime configuration, recorded in runtime.lock.json before any run.

The requested FP8 spec and native 262144-token context do not fit 24 GB; the same model is served at Q4_K_M with an 8192-token context. This is a documented adaptation, not a different model and not a cloud fallback. No native long-context performance is claimed.

BMSbms.kyokasuigetsu.xyz
Static image: https://bms.kyokasuigetsu.xyz/tables/verify-model.png

Three curated task families

Each task is a small, purpose-built offline fixture of a canonical vulnerability class: an ERC-4626-style first-depositor share inflation, a classic reentrant withdrawal, and an unprotected initializer. The vulnerable workspace is public to the agent; the fixed revision is curator-held and never mounted. Because these are curated fixtures of familiar patterns, they do not establish performance on real audit repositories.

Three conditions over the same tasks

Table 11 · Frozen protocol

Conditions and budgets

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
The three frozen conditions run over the same three tasks, with their turn/tool budgets and wall-time caps.
ConditionAgent accessTurn / tool budgetWall cap
Tool-assistedBounded search/read + forge build/test feedback, then one submitted proof12 turns / 10 tools1200 s
Static (no tools)Full source context (target + provided test harness); no tool feedback3 turns / 0 tools900 s
Budgeted triageA strict budget of four inspect operations, then one submission6 turns / 4 tools900 s
Table 11The three frozen conditions run over the same three tasks, with their turn/tool budgets and wall-time caps.

The agent receives only the vulnerable workspace; the fixed revision is never mounted. Foundry ffi and filesystem permissions are disabled in every task.

BMSbms.kyokasuigetsu.xyz
Static image: https://bms.kyokasuigetsu.xyz/tables/verify-protocol.png

The agent interacts through a tiny JSON action protocol — read, search, run (forge build/forge test only), write (to test/submission/ only), and final. It is never given a shell, and it is told the exact test-harness contract it must satisfy.

Operational telemetry, kept separate from quality

Table 13 · Operational telemetry

Wall time, generated tokens, and localisation

Local · fully offlineFeasibility pilot6 replicates / cell0/54 runs terminalQuality pending
Operational aggregates across all terminal runs. These are operational observations only and do not measure finding quality.
MetricValue
Median wall time / runpending
Total collection wall timepending
Generated tokens (total)pending
Generated tokens (median / run)pending
Tool calls (total)pending
Source localised (tool-enabled runs)pending
Table 13Operational aggregates across all terminal runs. These are operational observations only and do not measure finding quality.

Operational telemetry is kept separate from the verified-proof endpoint. Wall time and generated tokens do not prove correctness. Pending cells are never shown as zero.

BMSbms.kyokasuigetsu.xyz
Static image: https://bms.kyokasuigetsu.xyz/tables/verify-operational.png
Operational metrics are not quality. Wall time, generated tokens, and source-localisation counts describe how the runs executed. They do not prove any submission was correct; correctness is decided only by the verified-proof gate.

Fully local and sandboxed

During every run the model endpoint is a loopback-only Ollama server with cloud disabled; the agent has no browser, web, provider API, RPC, wallet, or live chain. Untrusted build and test execution runs in a disposable Docker container with --network none, a read-only root filesystem, all Linux capabilities dropped, no-new-privileges, bounded CPU/memory/PIDs, a single workspace bind mount, a non-root user, and no mounted credentials. Foundry FFI and filesystem permissions are disabled in every task.

What this pilot does not claim

Six runs per cell over three task clusters give a distribution and a bootstrap interval, but three clusters make those intervals wide; this study does not license a decisive between-condition or between-system claim. The tasks are curated fixtures of familiar patterns that may be represented in training data; the 8,192-token context is a hardware constraint, so long-context behaviour is untested; and Q4_K_M quantization, the Ollama runtime, thinking-disabled decoding, and the tool prompting are material confounds recorded in every run ledger. A patch-differentiating test shows an executable regression check exists, not that a full audit was performed.

Read the methods behind the numbers.

View methodology