Skip to content

Releases

v1.5.3

Choose a tag to compare

@github-actions github-actions released this 27 Nov 19:14
add3de1

Metadata only. No rule, CLI flag, default, report field, MCP tool or archive
layout changed. The library crates stay at 1.5.0, except rg-render 1.5.3
(same code; it carries the tool version). 1.5.2 cannot be listed on the
GitHub Actions Marketplace: its action description was 136 characters, and
the form requires fewer than 125.

Changed

  • The action's description is 113 characters (was 136), so the GitHub
    Marketplace accepts it (the limit is fewer than 125). tests/docs.rs now
    checks the name, description length, branding and that action.yml is the
    only action metadata file at the root. server.json versions are pinned
    to the crate version in the same test file.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.5.3 x86_64-unknown-linux-musl

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 27 Nov 16:53
ad8d65b

Metadata only. No rule, CLI flag, default, report field, MCP tool or archive
layout changed. The library crates stay at 1.5.0, except rg-render 1.5.2
(same code; it carries the tool version).

Changed

  • MCP Registry name is io.github.KhomDev/rgate (was
    io.github.khomdev/rgate). The registry namespace follows the GitHub login
    and is case-sensitive, so the lowercase name could not be published. The
    name changed in server.json, the README mcp-name: line, the
    realism-gate-mcp --help text and the docs. 1.5.1 is not in the registry.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.5.2 x86_64-unknown-linux-musl

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 15:31
77c89d9

This is a patch release on the MCP server only. No rule, rule severity, CLI
flag, default, report field or archive layout changed; the new MCP tools and
settings wrap existing CLI commands. 1.5.0 shipped the broken transport, and
1.5.1 supersedes it for MCP use. The library crates are unchanged and stay at 1.5.0,
except rg-render 1.5.1 (same code; it carries the tool version printed in
reports, SARIF and cards).

Fixed (MCP)

  • realism-gate-mcp speaks the MCP stdio transport. Up to and including
    1.5.0 it wrote every response with an LSP-style Content-Length header.
    MCP's stdio transport is one JSON message per line, so current clients did
    not connect: the MCP Inspector timed out after 15 s on tools/list against
    the 1.5.0 binary. Responses are now one line each. A request framed with
    Content-Length is still read and answered in that framing
    (src/mcp.rs serve, read_message; docs/agents.md).
  • initialize echoes the client's protocol revision when it is 2025-06-18,
    2025-03-26 or 2024-11-05 (it always said 2024-11-05).
  • JSON-RPC error codes: unknown method -32601, bad arguments -32602,
    invalid request -32600 (batches, a null or fractional id, a missing
    jsonrpc), unreadable JSON -32700. A complete line that is not JSON no
    longer stops the server. Every error used to be -32601.
  • A checker that cannot start is a tool result with isError: true and the
    reason, not a protocol error.

Added (MCP)

  • Three more tools: dump_program (check --dump-program), list_rules
    (rules --format json) and explain_rule (explain -- RULE). All five
    tools carry readOnlyHint annotations and additionalProperties: false
    schemas; an argument a tool does not list is refused. check_poc takes
    fragment.
  • Limits the operator sets: REALISM_GATE_MCP_ROOT (every path argument
    must resolve inside it, symlinks followed), REALISM_GATE_MCP_TIMEOUT_SECS
    (default 120; the run is killed past it), a 4 MiB cap per output stream
    (refused, not cropped), a 4096-byte cap per argument. The checker's stdin is
    closed.
  • realism-gate-mcp --version and --help. serverInfo is rgate /
    realism-gate, and initialize returns instructions that carry the
    DEV-ONLY caveat.
  • MCP Registry metadata: server.json (io.github.khomdev/rgate,
    registryType: cargo) and a visible mcp-name: line in the README, which
    is how the registry checks a crates.io package.
  • Tests: tests/mcp_props.rs (9 proptest properties), tests/mcp_bounded.rs
    (deadline, cap, closed stdin, against a real child process),
    tests/mcp_stdio.rs (a real newline-delimited client session whose tool
    text is compared byte for byte with direct CLI runs), and 38 unit tests in
    src/mcp.rs (was 11).
  • The skill names the five tools and says the measured numbers are
    DEV-ONLY.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.5.1 x86_64-unknown-linux-musl

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 13:22
c28122a

Added (P2)

  • Claude Code plugin. plugin/ and the root .claude-plugin/marketplace.json.
    The plugin version is the crates.io release realism-gate-ensure installs.
    A release bumps plugin/.claude-plugin/plugin.json and the marketplace
    entry with Cargo.toml; tests/plugin.rs fails if they disagree. The
    SessionStart hook only reports a missing or mismatched CLI. The plugin does
    not register realism-gate-mcp (see plugin/README.md).
  • Program model (RG-A1). check --dump-program DIR reads a protocol
    working tree and reports, per entry point, the authority it requires
    (Signer(account), Role(name), Owner, None, Unknown(reason)) with
    source spans. Anchor #[derive(Accounts)] constructs, native is_signer /
    owner / key checks and Solidity modifiers and body guards are resolved; an
    IDL fills gaps but the source wins and records the conflict; a resolution
    failure is Unknown, never a guess. The model reads only the target tree.
  • Exploit model (RG-A2). Actors carry provenance (generated, loaded,
    derived PDA, funded, granted, deployer); steps carry program, entry point,
    signers, a separate payer and the required authority; mutations, assertions
    and data-dependency phases are recorded, with position only a tiebreaker.
    An authority over an account the attacker created or funded is
    attacker-owned, and a payer is never a role signer. --dump-model FILE
    writes the model deterministically with no absolute paths;
    --model-target DIR supplies the protocol checkout the rules read.
    On the opened v2 corpus the model removes all 28 RG02 and 8 RG03 false
    positives with no other rule moved and readability unchanged (in-sample;
    not a fresh precision claim).

Changed (build)

  • The crate is a Cargo workspace. rg-ir, rg-frontend-sol,
    rg-frontend-rust, rg-frontend-ts, rg-frontend-move, rg-program,
    rg-model, rg-rules, rg-exec and rg-render are separate library
    crates; the realism-gate package keeps its name, its three binaries, its
    CLI flags and exit codes, the report/v1 and card/v1 schemas and the
    SARIF output. A golden test pins the CLI output over every committed
    fixture to prove the split changed no bytes.
  • The ten library crates are published to crates.io, each at the same
    version as realism-gate (rg-ir, rg-frontend-sol, rg-frontend-rust,
    rg-frontend-ts, rg-frontend-move, rg-program, rg-model, rg-rules,
    rg-exec, rg-render), in the dependency order of PACKAGING.md, because
    realism-gate cannot be packaged without them. They are internal: no API
    stability guarantee outside realism-gate. publish = false is removed;
    each carries a README, the MIT LICENSE and keywords.
  • tests/golden.rs restores the recorded tool version before hashing
    the CLI output, so a version bump no longer changes all 109 recorded hashes;
    every other byte is still compared.
  • Release cadence exception. 1.5.0 is the fourth release in three days
    (1.1.0, 1.2.0 and 1.4.0 shipped on 2026-11-25), which RELEASING.md's
    one-minor-per-week rule does not allow. It is a recorded exception
    decided by the maintainer; see RELEASING.md.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.5.0 x86_64-unknown-linux-musl

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 20:28
618410d

Changed (severity)

  • RG02 and RG03 ship at note on Solana. The 1.3.0 fresh held-out round
    measured RG02 at 0/16 and RG03 at 0/5: the remaining flags are the fee payer
    of an instruction whose accounts mark the role account non-signing, the
    attacker's own fixture key, or a setup helper. A rule at warn with zero
    fresh precision is noise. RG01, RG04 and RG06 were already notes. The
    Solidity severities are unchanged.
  • RG08 and RG09 ship at warn on Solana; no Solana rule ships at error
    in this release.
    The floor is a fresh held-out Wilson lower bound of at
    least 0.80. RG08 is right 10/10 on the v2 held-out split, but 10/10 has a
    lower bound of 0.7225, so error is not supported yet; it returns there at
    16/16, where the lower bound reaches 0.8064. RG09's only fresh flag was
    labelled unclear, so it has no rate at all. warn is reported and is not a
    CI failure under the default --fail-on error.
  • The floor is now enforced against the fresh measurement: measure.py in
    eval/solana-poc-v2/ regenerates measured.json from the committed
    held-out labels, and tests/precision_floor.rs reads it. A Solana rule at
    error with no fresh cell of n >= 5 fails the test, so an unmeasured error
    rule cannot ship. Previously the test read a file with no fresh cells and
    passed vacuously.

Fixed (CI)

  • The weekly fuzz workflow names the GNU triple. The prebuilt
    cargo-fuzz installed by install-action is a musl binary, and cargo-fuzz
    derives its default build target from its own triple; a musl target links
    libc statically, which the sanitizer refuses ("sanitizer is incompatible
    with statically linked libc"). cargo fuzz run --target x86_64-unknown-linux-gnu pins the dynamic-libc target. The workflow now
    builds and fuzzes again (run 45690709031). On that first run the TypeScript
    target found an input that trips a debug_assert! inside the upstream
    oxc_parser 0.146.0 lexer (trivia_builder.rs:62, comment.is_pure()).
    Release builds compile debug assertions out, so the shipped binaries do not
    panic on it; the weekly job stays red until the upstream assertion is fixed
    or the input is handled, and this entry does not call the fuzz job green.

Fixed (P1-C precision round, proposed 1.3.0)

  • A helper file with no test is no longer read as a fragment. The script
    reader wrapped every import-only helper passed alongside the PoC as
    it("fragment") and flagged RG08 on it. Script mode now requires an
    executable top-level statement (or a main call), and auto-detection only
    wraps the unit's first file, not its imported helpers.
  • A test title that says the attack is blocked is a control test. Titles
    with blocks, blocked, denies, cannot, does not allow, not allowed or must fail join the existing secure/control/prevents/
    rejects/fails when class, so RG01/RG02/RG03/RG04/RG06 do not fire on
    them. A leading ✓/✔ (the secure-suite convention) is included.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.4.0 x86_64-unknown-linux-musl

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 18:44

Added (P1-C, 1.2.0)

  • Four readers for the PoCs judges receive. A Rust #[test] that calls
    program functions directly is checked (the direct call is modelled as the
    exploit transaction); a Rust fn main that drives a PoC framework
    (poc-framework, LocalEnvironment, Environment::…_client) is read as one
    test; a TypeScript script that drives an Anchor/web3.js/LiteSVM client is read
    as one test, with main() inlined; and check --fragment <file> wraps a
    pasted fragment as one test body. A .rs/.ts/.js file given explicitly
    that has no top-level test is auto-detected. The report gains
    fragment: true when the boundary is the tool's.
  • tests/precision_floor.rs enforces the severity floor in
    docs/precision.md: a rule ships at error on Solana only when its fresh
    held-out Wilson lower bound is at least 0.80.
  • eval/solana-poc-v2/ is the sealed fresh corpus: 81 counted units (28
    judged, 53 exploit-by-construction), pinned before the first src/ change.

Changed (P1-C, proposed 1.2.0)

  • RG01, RG04 and RG06 ship at note on Solana. Their P1 PoC held-out
    precision was 16.7%, 0% and 0%; a rule at error now needs a fresh held-out
    lower bound of at least 0.80. The Solidity severities are unchanged. The
    catalog gains solana_severity(); the generated rule pages say which ids
    moved.
  • RG01 no longer counts an attacker-signed grant as a harness grant. An
    attacker that initialises the program as its own admin, or re-initialises
    itself, took the role through the bug; that is the exploit, not the harness.
  • RG04/RG06 fixtures and preconditions. A write of an account a later
    initialise/create instruction sets up is not reported. A precondition
    written while setting up is reported at note with Precondition fabricated: and says the drained balance never passed through the program.
  • RG10 accepts a read of the same account before the attack as a baseline,
    whatever the local is called, not only a name like before.
  • Control tests (expects failure, or a title saying secure / control /
    prevents / rejects / fails when) no longer fire RG01, RG02, RG03, RG04
    or RG06; RG08 still applies.
  • A fresh keypair the test never gives a role (by a grant, a role field, an
    initialise/configure call, or a declaration) is not privileged. A role
    granted by another signer, or shown by a role-named signer of a gated
    instruction, still is.

Fixed (P1-C, proposed 1.2.0)

  • Fragments: bare statements and it() blocks pasted into an issue parse.
  • Scripts: an Anchor script with main() is no longer silent.
  • PoC-framework binaries: execute_as_transaction is a transaction with
    its signers and instructions; LocalEnvironment is a harness and
    Environment::devnet_client is a live cluster.
  • RG08: the rule's scope is the exploit part of the trace, matching its own
    definition; the study rubric is updated to agree.
  • Docs: the rule pages and README example blocks are regenerated for the
    1.2.0 severities and the four readers.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.2.0 x86_64-unknown-linux-musl

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 05:47

Added

  • rules and explain print measured precision per language. The rule
    catalog embeds eval/solana/measured.json; a rule with no fresh or held-out
    label prints unmeasured, never 100%. The JSON rule rows gain a measured
    object keyed by language with status, tp, fp, labelled, precision,
    wilson95, split, population and, for cells with fewer than five labels,
    count_only (printed as k/n (n<5, count only), never a percentage). The
    Rust and Anchor TypeScript numbers are the held-out split of the Solana PoC
    study (eval/solana-poc/), not the earlier test-suite measurement, which
    stays published in eval/solana/RESULTS.md; the Solidity number uses only the
    fresh (out-of-sample) corpus. docs/precision.md states the population and
    the limits, and the generated rule pages carry the same line.

Changed

  • rules --format json: languages lists javascript for every rule
    that checks Solana tests. The tool already read JavaScript Anchor/web3.js
    tests; the list said only rust and typescript. eval/results/rules-v0.6.0.json
    is regenerated (only languages and the new measured objects change; the
    precision tables and the R3 check are unchanged).

Fixed

  • Release workflow: the checksums job did not list verify in needs, so
    the version it repacks with was empty; and scripts/package-release.sh wrote
    the zip to a relative output directory from inside the staging directory.
    Both were caught by the 1.1.0 dry runs, before any tag. A regression case in
    scripts/test-package-release.sh covers the relative output directory.
  • Attestation test on Linux/macOS: the fake gh in
    scripts/test-verify-attestation.sh was not executable, so command -v gh
    found the runner's real gh. The Action itself runs the script with bash
    and was not affected.
  • CI package check now allows eval/solana/measured.json, which the crate
    embeds for rules/explain.

Documentation

  • Solana PoC measurement (P1-A redo, 2026-11-25). eval/solana-poc/
    measures the frozen 1.0.4 rules on 99 public Solana PoC units (12 judged,
    82 exploit-by-construction, 5 patched negative controls) from 45 pinned
    sources, preregistered before any run or label. The tool reads 1 of 12
    judged PoCs (8.3% [1.5-35.4]) and 72 of 82 exploit-by-construction ones;
    held-out precision over all rules is 46/106 = 43.4% [34.4-52.9], with RG08
    29/30 and RG09 7/7 against RG01 2/12, RG02 8/30, RG04 0/16 and RG06 0/6.
    docs/precision.md carries the summary (checked by tests/docs.rs).
    No rule logic changed.
  • Correction. eval/solana/{README,RESULTS}.md and docs/precision.md
    said a public Solana PoC corpus does not exist in a form the tool reads.
    That was wrong: the search checked three repositories and stopped, and the
    Neodyme workshop PoCs it cited are unsolved templates. The text now says so
    and links the PoC measurement.
  • P1 Rust/Anchor TypeScript measurement. Four pinned public test suites,
    174 flags, 133 sampled, 63 held-out labels, Wilson 95% intervals per rule and
    language. The report says plainly that the corpus is test suites, not PoCs,
    and records the missing PoC corpus as a gap rather than widening the claim.
  • Correction. docs/precision.md said the 264ca72 solana-program-library
    pin had five program/tests directories; at that commit only token-lending
    and governance have one. The text is corrected.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

Built with rustc 1.95.0 and repacked deterministically, so the
archives can be compared with a local rebuild. From a checkout of this
repository:

scripts/reproduce-release.sh v1.1.0 x86_64-unknown-linux-musl

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 22 Nov 09:30

A security and robustness release, from a self-review of 1.0.3. No rule id,
flag, default or output field changed; the JSON and SARIF formats are
unchanged. Reporter: self-review.

Security

  • verify-fix reads ffi from TOML under a conservative key
    normalization.
    Foundry resolves case and separator aliases: FFI, Ffi,
    ffi_ and ffi__ all set ffi (verified against forge 1.5.1). The guard
    applies a deliberately coarser normalization than Foundry (lowercase ASCII;
    keeps ASCII alphanumerics only, dropping Unicode too), which catches every alias Foundry
    resolves and also refuses some spellings Foundry treats as unknown (f_f_i). Only
    exactly ffi with the boolean value false is accepted, a boolean true
    is refused, any other value is refused conservatively, and every
    non-canonical spelling is refused whatever its value. The scan is document-wide: spacing, tabs, quoted keys,
    dotted keys, inline tables, the top-level table and profiles the program has
    never heard of are all covered. Foundry's global config (~/.foundry/foundry.toml, or
    %USERPROFILE%\.foundry\foundry.toml), the root tree, the --patched tree
    and the copy after --patch are checked before the tree is used, with the
    global config and both copies parsed again immediately before each forge
    start. A foundry.toml that does not parse is
    refused rather than assumed off. A config in an ancestor directory of the
    temp copy is not checked; on Windows Foundry may resolve the OS known
    profile folder while this check uses USERPROFILE/HOME, so the two can
    differ; docs/threat-model.md H5 records both residuals.
    FOUNDRY_FFI=false is not described as a control: Foundry documents the
    variable as an explicit exception to its environment overrides. Tests:
    ffi_is_seen_however_toml_spells_it,
    foundry_key_aliases_and_non_boolean_ffi_values_are_refused,
    ffi_is_refused_in_the_root_the_patched_tree_and_after_a_patch (17 exact
    and alias spellings),
    a_global_config_with_an_ffi_alias_is_refused_before_forge_starts,
    a_minimal_top_level_ffi_alias_is_refused_before_forge
    (src/verify_fix.rs, tests/verify_fix_ffi.rs).
  • Write fs_permissions and its aliases are refused, closing the
    config-rewrite path.
    A PoC could set fs_permissions = [{ access = "read-write", path = "C:/" }] and use vm.writeFile to rewrite the other
    copy's or the global config to an ffi alias between the two runs; the key
    itself has aliases too (FS_PERMISSIONS, FS-PERMISSIONS, fsPermissions,
    fs_Permissions, Fs-Permissions, fs__permissions, the quoted key
    "fs.permissions", and spaces), which Foundry resolves to the same setting.
    The unquoted dotted form fs.permissions = ... parses as nested
    fs/permissions keys; neither Foundry nor the guard resolves it as
    fs_permissions, so there is no gap. Any key normalized to fs_permissions must be
    the exact spelling, and every entry in every checked config must grant
    exactly access = "read"; a write or read-write entry, a missing or
    non-string access, a non-array value, a non-table entry, or an alias is
    refused before any forge run. Both copies and the global config are also
    re-parsed immediately before each run, which catches a simple rewrite; the
    fs_permissions refusal is the primary control. Tests:
    fs_permissions_must_be_read_only,
    write_fs_permissions_are_refused_in_every_config_the_guard_reads,
    fs_permissions_aliases_are_refused_in_every_config_the_guard_reads,
    a_global_config_with_a_fs_permissions_alias_is_refused_before_forge_starts,
    the_alias_cross_run_combination_is_refused_before_forge,
    read_only_fs_permissions_reach_forge,
    a_rewritten_tree_or_global_config_is_refused_before_the_next_run,
    a_global_config_rewritten_by_the_first_run_is_refused_before_the_second.
  • The dotenv redirect is closed. Foundry loads a .env after it starts,
    and dotenvy does not override an already-set variable. Removing
    FOUNDRY_CONFIG therefore let a --patch that created .env +
    evil.toml point forge at an unparsed ffi = true config. FOUNDRY_CONFIG
    is now pinned to the absolute path of a config the guard checked inside the
    copy (a minimal [profile.default] file is created when the tree has none),
    and any .env in a copied tree is refused before each forge run. Tests:
    a_patch_that_adds_dotenv_and_an_evil_config_is_refused,
    a_clean_dotenv_is_still_refused,
    the_forge_child_gets_the_pinned_absolute_config (src/verify_fix.rs,
    tests/verify_fix_ffi.rs).
  • Relative --patch and --forge paths are resolved before the copy's
    working directory applies.
    --patch ../fix.diff (outside --root) and a
    --forge value containing a separator keep working; a bare forge keeps
    PATH lookup (src/verify_fix.rs, tests/verify_fix_paths.rs).
  • The host policy is enforced in the library. verify refuses a request
    with no HostPolicy before copying a tree or starting forge, so a library
    caller is covered like the CLI (src/verify_fix.rs,
    no_attestation_is_refused_before_forge_is_started).
  • --patch requires git. git apply --check runs first and the
    hand-written fallback applier is gone, so a tree the patch does not describe
    is never run (src/verify_fix.rs, docs/verify-fix.md).
  • A Foundry config is size-checked before it is parsed. A tree or global
    foundry.toml must be a regular file of at most 1 MiB; a larger one is
    refused before the read (src/verify_fix.rs,
    an_oversized_foundry_toml_is_refused_before_forge_starts).
  • Each forge run is time- and output-bounded. A run longer than 10 minutes,
    or one that prints more than 64 MiB of stdout or 1 MiB of stderr, is killed
    and is a VerifyError (exit 2), never a fail verdict; the verdict is not
    taken from a truncated log (wait_forge,
    a_forge_that_runs_past_the_timeout_is_killed_and_is_not_a_verdict,
    a_forge_that_floods_stdout_is_killed_and_is_not_a_verdict).
  • The copied tree is bounded. The project or --patched tree is
    attacker-controlled; the copy is capped at 50 000 files, 512 MiB in total,
    50 000 directories and 64 levels deep, checked from metadata while copying,
    so a hostile tree cannot fill the disk with files or empty directories before
    forge's own limits apply (copy_tree, copy_tree_with_limits,
    the_copy_file_byte_and_directory_caps_are_enforced,
    a_tree_larger_than_the_copy_limit_is_refused_before_forge_starts,
    a_tree_deeper_than_the_copy_limit_is_refused_before_forge_starts).
  • MCP framing is bounded. Content-Length is refused above 8 MiB before
    any allocation. The server writes a JSON-RPC error and stops (exit 2): it
    does not claim to resynchronise past a body it refused, so a following ping
    is not served. A header line is capped at 8 KiB; empty lines are skipped in a
    loop instead of by recursion (src/mcp.rs, tests/mcp_stdio.rs).
  • Control characters and bidi formatting from source and claims do not
    reach terminal output.
    The text, Markdown and evidence-card renderers
    replace newline, carriage return, tab and U+2028/U+2029 with a space, and
    drop other Unicode control characters plus the bidi controls U+061C, U+200E,
    U+200F, U+202A-U+202E and U+2066-U+2069, from finding messages, evidence,
    paths, suite and test names, claim text and evidence, suppression notes and
    parse errors, before any colour wrapper. A Linux file name containing a
    newline can no longer fabricate a report line. JSON and SARIF keep their
    serde escaping (src/render/mod.rs,
    control_characters_in_source_never_reach_text_or_markdown_output,
    a_newline_or_bidi_in_a_path_cannot_fabricate_a_report_line).

Fixed

  • Input caps. 8 MiB per source file (from metadata, before the read),
    128 MiB and 20 000 files per run, 64 levels deep, and 16 MiB for a
    --report, --claims, --declaration or --config file. Every error names
    the limit (src/project.rs, an_oversized_source_file_is_refused_by_name_before_it_is_read).
  • Policy inputs must be regular files. The 16 MiB cap alone did not bound a
    FIFO: it has length zero, so read_to_string blocked forever. The type is
    now checked with symlink_metadata, a FIFO is refused before it is opened,
    and a symlink is refused too. The check is not atomic with the open; policy
    files must come from a trusted location (src/project.rs,
    a_non_regular_policy_input_is_refused_by_name,
    a_fifo_policy_input_is_refused_without_blocking).
  • The trace is no longer quadratic in test count. A suite base (state
    initializers, constructors, setUp() and callbacks) and the RG15 whole-file
    fee-concession fact are computed once per suite; the test-function
    duplicate check uses a set. The 5 MB / 40 000-function adversarial case is
    enabled instead of ignored, and a 12 000-function case (serialised with the
    other size tests so the measurement is stable) has a 5 s release bound and a
    120 s debug bound the old quadratic run cannot meet (src/trace.rs,
    src/project.rs, src/engine.rs, tests/adversarial.rs).
  • Deleted the dead no-op context-line branch in the removed fallback applier.
  • verify-fix config errors name the offending alias key and display paths
    with one separator style on Windows.

Changed

  • verify_fix::Request::host is Option<HostPolicy>; None is refused by
    verify. The library API is documented as unstable, and this is the change
    that puts the host decision inside the library.
  • #![forbid(unsafe_code)] on the library and all three binaries.
  • CI has an MSRV job that reads rust-version from Cargo.toml (1.95, the
    1.95.0 minimum) and runs cargo test --locked on that toolchain. The weekly,
    non-gating cargo-mutants job over src/rules/, src/claims/, src/bind/
    and src/verify_fix.rs lives in its own mutants.yml workflow with a
    schedule and workflow_dispatch, so the...
Read more

v1.0.3

Choose a tag to compare

@github-actions github-actions released this 21 Nov 20:18

A correctness release. Five of the eight adversarial cases recorded as ignored
in 1.0.2 now pass and are enabled; the parser no longer lowers statically dead
branches or statements after an unconditional return/revert, and a claim
field named in both places is the error docs/claims.md always said it was. No
rule id, flag, default or output field changed.

Fixed

  • Statically dead code is not lowered. if (false) { vm.prank(admin); }
    used to reach the trace, so a dead prank could contradict an attacker claim
    (RG02). A branch whose condition is a boolean literal is now lowered only when
    it runs; a dynamic condition keeps both sides, as before. while (false) and
    for (…; false; …) bodies are skipped too.
  • Statements after an unconditional return or revert are dropped. An
    assertion after return; could count as impact evidence and mark a drain
    claim SHOWN. A return in one branch of a dynamic if still falls through, so
    the branch is not treated as ending the function.
  • A claim field named both inside and outside a nested claims: block is an
    error.
    Raw::flatten silently preferred the outer value; docs/claims.md
    says the duplicate is an error, and now it is.
  • A claims.yaml that disagrees with the report's front matter is an error.
    The file used to win silently, so one finding could state two claim sets.
    When both parse as claims and differ, check exits 2 naming both sources;
    agreement is accepted.
  • Source discovery is case-insensitive on Windows and elsewhere. .SOL,
    .Rs, .Move and upper-case TypeScript extensions are found, and .d.ts
    declaration files remain excluded.
  • Simplified the vm.label classification in identity.rs (clippy's
    nonminimal_bool).

Tests

  • Enabled five ignored adversarial cases: the dead prank, the assertion after
    return, the assertion inside if (false), the duplicate claim field and
    the claims/front-matter disagreement.
  • New parser unit tests for statically dead branches and unreachable code.
  • New claims unit tests for the duplicate-field error.
  • New property test: a literal-condition branch reaches the trace exactly when
    it can run.
  • New unit test for case-insensitive source extensions.

Three tracked gaps remain ignored and unchanged: a privileged prank inside a
helper contract the test calls, an address round-tripped through
abi.encode/abi.decode, and super-linear time on very large files.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 19 Nov 20:10

A security and fix release. RG02 now catches a prank as a contract the PoC
deploys from its own file (#17). --changed-since and verify-fix no
longer let an untrusted repository or patch run a program or write outside
the copy. New adversarial, fuzz-corpus and property tests ship with it; eight
adversarial cases the checker gets wrong today are committed as ignored tests
with their inputs (cargo test -- --ignored), so the gaps are on record. No
rule id, flag, default or output field changed, and the published precision
numbers are unchanged (re-measured on this build).

Security

  • --changed-since no longer lets a repository's own config run a program.
    A .git/config in the working tree could set core.fsmonitor, which git
    runs on an index refresh, and a filter attribute in .gitattributes or
    .git/info/attributes could name a clean filter, which git runs for a
    worktree comparison. Both ran. Every git call now goes through one helper
    that turns core.fsmonitor off. git is no longer asked to compare the
    worktree: realism-gate lists the blob ids at the revision (ls-tree) and
    hashes the current files with hash-object --no-filters, then compares the
    ids itself. A file that differs from the revision only in line endings is
    listed, which is checked rather than missed; a symbolic link is listed
    without being read. tests/security.rs plants each program and asserts it
    does not run.
  • --target-commit and --changed-since values that start with - are
    refused
    (exit 2). Tested; this was already enforced, and is now a regression
    test.
  • verify-fix refuses a patch that creates a symbolic link, and a patch
    over 8 MiB.
    git apply turns a mode 120000 entry into a link whose target
    is not checked, so a later read could leave the temp tree. The check runs
    before any apply. The size cap stops a huge patch being read whole into
    memory, with a clear error. A project symlink is not copied (already true;
    now tested), and drive-letter, verbatim and UNC spellings of an absolute path
    are tested as refused.
  • The host decision for verify-fix is pinned by tests.
    REALISM_GATE_SANDBOX=1 (and the /.dockerenv and /run/.containerenv
    markers) still count as an attestation, and docs/verify-fix.md says so. The
    policy is unchanged; tests/verify_fix_limits.rs makes a change visible.
  • Every third-party action in the workflows and action.yml is pinned to a
    commit SHA.
    Each uses: line names the commit and its version in a comment
    (# v7.0.1), and the major version is unchanged. Two taiki-e/install-action
    tags are named after the tool, with no version tag on the same commit, so
    their comment says cargo-audit tag and cargo-binstall tag. Local ./
    references are not affected.

Fixed

  • RG02 fires on a prank as a contract the test deployed from a type in its
    own file (#17).
    vm.prank(address(vault)) and vm.startPrank(address(vault))
    with vault = new Vault(), where Vault is defined in the PoC file, was
    read as a helper and not as the protocol, so the attacker claim was SHOWN.
    It is now flagged, and the claim is CONTRADICTED. Three cases stay quiet: a
    contract named for the attacker, a contract the attacker deploys under
    startPrank(attacker), and a hard-coded literal address (unchanged, out of
    scope). The published measurements do not change; see the PR for the
    before and after numbers.

Documentation

  • SECURITY.md states the guarantee per command. It said the tool "runs no
    Solidity", which was true of check and false of verify-fix, which runs
    forge on the PoC. The table now says what each command executes and what
    it reaches on the network.
  • docs/threat-model.md is new. A short STRIDE-light model: assets,
    attackers, trust boundaries with file:line references, the guarantees and
    what proves each one, and the open hypotheses with their status.

Tests

  • tests/adversarial.rs: PoCs and reports written to fool the checker. It
    covers a privileged address reached through a local variable, a helper
    contract, and an abi.encode/abi.decode round trip; a prank and an
    assertion inside if (false) or after return; a claims file and front
    matter that disagree; a non-ASCII identifier; a 5 MB file; and a deeply
    nested expression. Each case states what the tool should do. Eight cases fail
    today and are #[ignore]d with the reason, and the inputs are listed in the
    pull request. No rule changed.
  • Fuzz targets for every parser, in fuzz/. One cargo-fuzz target each
    for the Solidity, Rust, TypeScript and Move frontends, the claims YAML and
    front matter (with the prose heuristics), and realism.yaml. The property is
    that no target panics. The crate is excluded from the main workspace, so a
    normal build needs no nightly. Its seed corpus is copied from the test
    fixtures and examples.
  • tests/fuzz_corpus.rs replays the corpus on every cargo test. It runs
    the same target bodies over each seed and over a fixed set of deterministic
    mutations. cargo-fuzz does not run on Windows, so this is the check that runs
    everywhere.
  • fuzz.yml, a weekly five-minute fuzz run per target on Linux. It uploads
    crashing inputs as an artifact.
  • Property tests (proptest) in tests/properties.rs. For generated inputs,
    not only the fixtures: the JSON report does not depend on the order the files
    are given; adding an unrelated test function does not change the findings of
    the tests already in the file; every JSON report validates against
    docs/output-schema.json, and every SARIF log has the keys SARIF 2.1.0
    requires. The schema checker moved to tests/support/ so both tests share it.
  • docs/test-quality.md: line coverage and the mutant count for the rule
    code.
    Whole-crate line coverage is 87.77%; the least-covered rule files are
    listed. Mutation outcomes are not recorded yet: a full cargo mutants run
    takes hours here, so the page says so rather than estimating a survival rate.
    Linked from CONTRIBUTING.md. Nothing is gated on these numbers.

Install

cargo binstall realism-gate

or download an archive below and check it:

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive> --repo KhomDev/realism-gate

Three binaries are included: realism-gate (the checker), rgate
(the same program under a short name) and realism-gate-mcp (the MCP
server). cargo binstall installs all three. Linux builds are static
(musl).