An embedded key-value database in pure Rust
This report summarizes scanner evidence for cberner/redb, a Rust project with 4,886 GitHub stars. SynthScan examined 68,554 lines of code across 119 source files, recording 141 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 2.4 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 136 finding(s).
Are imports declared and package/API names verified? 4 finding(s).
Are wrappers, guards, and repeated structures necessary? 15 finding(s).
Which changes need focused human review? 141 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 141 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deny.toml | 1 | # This template contains all of the possible sections and their default values | COMMENT |
| LOW | deny.toml | 21 | yanked = "warn" | COMMENT |
| LOW | deny.toml | 41 | # List of explictly allowed licenses | COMMENT |
| LOW | deny.toml | 61 | { allow = ["Unicode-3.0"], name = "unicode-ident", version = "*" }, # Used only by comfy-table in the benchmarks | COMMENT |
| LOW | deny.toml | 81 | # Each entry is a crate relative path, and the (opaque) hash of its contents | COMMENT |
| LOW | deny.toml | 101 | multiple-versions = "warn" | COMMENT |
| LOW | deny.toml | 121 | ] | COMMENT |
| LOW | crates/redb-derive/tests/crate_attr_tests.rs | 1 | //! Tests for `#[redb(crate = "...")]`, which names the crate the implementations are generated | COMMENT |
| LOW | crates/redb-derive/src/lib.rs | 41 | } | COMMENT |
| LOW | crates/redb-derive-rename-test/src/lib.rs | 1 | // Intentionally empty: this package exists for the integration test in tests/, which must live | COMMENT |
| LOW | tests/borrow_markers.rs | 1 | // Every lifetime marker in the crate's types is a `ScopedBorrow`. | COMMENT |
| LOW | tests/integration_tests.rs | 4441 | COMMENT | |
| LOW | src/types.rs | 161 | Self: 'a; | COMMENT |
| LOW | src/types.rs | 241 | /// to `left`, and less than `right`, under [`compare()`](Self::compare). | COMMENT |
| LOW | src/transactions.rs | 861 | // Persistent savepoints whose on-disk entry was deleted: release their | COMMENT |
| LOW | src/transactions.rs | 1141 | } | COMMENT |
| LOW | src/transactions.rs | 1301 | /// This savepoint will be freed as soon as the returned [`Savepoint`] is dropped. | COMMENT |
| LOW | src/transactions.rs | 1521 | Durability::None => InternalDurability::None, | COMMENT |
| LOW | src/transactions.rs | 1541 | /// attacker with an extremely high degree of control over the database's workload, including | COMMENT |
| LOW | src/transactions.rs | 1561 | /// Security considerations: Many hard disk drives and SSDs do not actually guarantee that data | COMMENT |
| LOW | src/transactions.rs | 1581 | /// Alternatively, you can enable quick-repair. In this mode, redb saves the allocator state | COMMENT |
| LOW | src/transactions.rs | 1681 | .rename_multimap_table(self, &name, new_name.name()) | COMMENT |
| LOW | src/transactions.rs | 1741 | /// durable as consistent with the [`Durability`] level set by [`Self::set_durability`] | COMMENT |
| LOW | src/transactions.rs | 1921 | } | COMMENT |
| LOW | src/io.rs | 1 | //! The error type that [`StorageBackend`](crate::StorageBackend) reports failures with. | COMMENT |
| LOW | src/error.rs | 681 | /// generation of the multi-process locking protocol | COMMENT |
| LOW | src/lib.rs | 21 | //! | COMMENT |
| LOW | src/lib.rs | 41 | //! fn main() -> Result<(), Error> { | COMMENT |
| LOW | src/lib.rs | 61 | //! | COMMENT |
| LOW | src/sync.rs | 21 | use core::fmt::{Debug, Formatter}; | COMMENT |
| LOW | src/db.rs | 41 | COMMENT | |
| LOW | src/db.rs | 61 | /// | COMMENT |
| LOW | src/db.rs | 181 | pub(crate) const WRITER_BYTE: u64 = LOCK_BASE; | COMMENT |
| LOW | src/db.rs | 581 | /// | COMMENT |
| LOW | src/db.rs | 601 | /// Multiple processes may open a [`ReadOnlyDatabase`], but it may not be opened concurrently | COMMENT |
| LOW | src/db.rs | 621 | /// # let tmpfile = NamedTempFile::new_in("/tmp").unwrap(); | COMMENT |
| LOW | src/db.rs | 721 | /// Opened redb database file | COMMENT |
| LOW | src/db.rs | 741 | /// | COMMENT |
| LOW | src/db.rs | 841 | COMMENT | |
| LOW | src/db.rs | 1741 | mem.check_active_transaction_id(transaction_id)?; | COMMENT |
| LOW | src/db.rs | 2001 | /// writes is chosen by `open()` or `open_read_only()`, not by the mode. | COMMENT |
| LOW | src/db.rs | 2021 | /// excluded by a writer in either mode: it must not be opened on a database such a writer has | COMMENT |
| LOW | src/db.rs | 2081 | /// Set a callback which will be invoked periodically in the event that the database file needs | COMMENT |
| LOW | src/legacy_types.rs | 1 | //! Types that open the tables written before redb 5.0, when the built-in types had no niche | COMMENT |
| LOW | src/legacy_types.rs | 21 | /// const OLD: TableDefinition<u64, Option<Legacy<&str>>> = TableDefinition::new("names"); | COMMENT |
| LOW | src/table.rs | 161 | /// | COMMENT |
| LOW | src/table.rs | 181 | /// | COMMENT |
| LOW | src/table.rs | 201 | /// `predicate` evaluates to `true` are returned in an iterator, and those which are read from the iterator are remo | COMMENT |
| LOW | src/table.rs | 261 | /// `predicate` evaluates to `false` are removed. | COMMENT |
| LOW | src/table.rs | 341 | /// Returns the old value, if the key was present in the table | COMMENT |
| LOW | src/table.rs | 381 | /// Passing `Bound::Unbounded` will return a cursor pointing to the gap | COMMENT |
| LOW | src/table.rs | 401 | /// # let tmpfile = NamedTempFile::new_in("/tmp").unwrap(); | COMMENT |
| LOW | src/table.rs | 621 | COMMENT | |
| LOW | src/table.rs | 641 | /// let mut table = write_txn.open_table(TABLE)?; | COMMENT |
| LOW | src/table.rs | 661 | /// | COMMENT |
| LOW | src/table.rs | 681 | /// table.insert("b", &1)?; | COMMENT |
| LOW | src/table.rs | 701 | fn first(&self) -> Result<Option<(AccessGuard<'_, K>, AccessGuard<'_, V>)>>; | COMMENT |
| LOW | src/table.rs | 721 | &self, | COMMENT |
| LOW | src/table.rs | 741 | &self, | COMMENT |
| LOW | src/table.rs | 761 | fn upper_bound<'a>( | COMMENT |
| 29 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/integration_tests.rs | 3862 | // Step 1: Insert initial data and commit durably | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3870 | // Step 2: In a new write transaction, create a savepoint BEFORE any modifications | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3874 | // Step 3: Open table, insert new data, then close (drop) the table handle. | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3883 | // Step 4: Restore the savepoint. This restores the table tree root to the | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3888 | // Step 5: Commit. During commit, flush_table_root_updates() drains | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3893 | // Step 6: Verify. After restoring the savepoint, keys 2 and 3 should NOT exist. | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 4578 | // Step 3: Commit an empty transaction. During durable_commit(), | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 4584 | // Step 4: Insert data into a DIFFERENT table (table_b) so that the allocator reuses | COMMENT |
| LOW | tests/integration_tests.rs | 4458 | // Step 1: Create initial data in the "original" table and commit. | COMMENT |
| LOW | tests/integration_tests.rs | 4470 | // Step 2: Modify the table and rename it in the same transaction. | COMMENT |
| LOW | tests/integration_tests.rs | 4492 | // Step 3: Reopen and verify data survives and integrity check passes. | COMMENT |
| LOW | tests/integration_tests.rs | 4525 | // Step 1: Insert initial data into table_a and commit durably. | COMMENT |
| LOW | tests/integration_tests.rs | 4547 | // Step 2: In a new write transaction, create a savepoint, then modify all of | COMMENT |
| LOW | tests/integration_tests.rs | 4596 | // Step 5: Read table_a. If the bug is present, the original pages have been freed | COMMENT |
| LOW | tests/integration_tests.rs | 4664 | // Step 1: Insert several pages worth of committed data into table_a. | COMMENT |
| LOW | tests/integration_tests.rs | 4681 | // Step 2: In a single transaction, create an ephemeral savepoint (which enables allocation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/integration_tests.rs | 3862 | // Step 1: Insert initial data and commit durably | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3870 | // Step 2: In a new write transaction, create a savepoint BEFORE any modifications | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3874 | // Step 3: Open table, insert new data, then close (drop) the table handle. | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3883 | // Step 4: Restore the savepoint. This restores the table tree root to the | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3888 | // Step 5: Commit. During commit, flush_table_root_updates() drains | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 3893 | // Step 6: Verify. After restoring the savepoint, keys 2 and 3 should NOT exist. | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 4578 | // Step 3: Commit an empty transaction. During durable_commit(), | COMMENT |
| LOW⚡ | tests/integration_tests.rs | 4584 | // Step 4: Insert data into a DIFFERENT table (table_b) so that the allocator reuses | COMMENT |
| LOW | tests/integration_tests.rs | 4458 | // Step 1: Create initial data in the "original" table and commit. | COMMENT |
| LOW | tests/integration_tests.rs | 4470 | // Step 2: Modify the table and rename it in the same transaction. | COMMENT |
| LOW | tests/integration_tests.rs | 4492 | // Step 3: Reopen and verify data survives and integrity check passes. | COMMENT |
| LOW | tests/integration_tests.rs | 4525 | // Step 1: Insert initial data into table_a and commit durably. | COMMENT |
| LOW | tests/integration_tests.rs | 4547 | // Step 2: In a new write transaction, create a savepoint, then modify all of | COMMENT |
| LOW | tests/integration_tests.rs | 4596 | // Step 5: Read table_a. If the bug is present, the original pages have been freed | COMMENT |
| LOW | tests/integration_tests.rs | 4664 | // Step 1: Insert several pages worth of committed data into table_a. | COMMENT |
| LOW | tests/integration_tests.rs | 4681 | // Step 2: In a single transaction, create an ephemeral savepoint (which enables allocation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/redb-python/test/test_api.py | 16 | def test_errors_form_a_flat_hierarchy() -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 45 | def test_create_new_database_creates_file(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 51 | def test_create_on_non_database_file_raises(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 57 | def test_create_on_open_database_raises(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 65 | def test_open_requires_an_existing_database(tmp_db_path: Path) -> None: | CODE |
| LOW | crates/redb-python/test/test_api.py | 85 | def test_completed_transaction_releases_database(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 98 | def test_drop_unfinalized_transaction_does_not_deadlock(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 107 | def test_transaction_outlives_anonymous_database(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 116 | def test_reentering_finalized_transaction_raises(tmp_db_path: Path) -> None: | CODE |
| LOW⚡ | crates/redb-python/test/test_api.py | 126 | def test_context_manager_aborts_on_exception(tmp_db_path: Path) -> None: | CODE |
| LOW | crates/redb-python/test/test_api.py | 141 | def test_finished_transaction_is_completed(tmp_db_path: Path, finish) -> None: | CODE |
| LOW | crates/redb-python/test/test_api.py | 154 | def test_exit_after_explicit_finish_is_a_noop(tmp_db_path: Path) -> None: | CODE |
| LOW | crates/redb-python/test/test_api.py | 164 | def test_blocked_writer_releases_the_gil(tmp_db_path: Path) -> None: | CODE |
| LOW | crates/redb-python/test/test_api.py | 202 | def test_table_keeps_its_transaction_alive(tmp_db_path: Path) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | crates/redb-python/test/test_fuzz.py | 82 | except OSError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/redb-python/test/conftest.py | 1 | CODE | |
| LOW | crates/redb-python/test/test_api.py | 3 | CODE | |
| LOW | crates/redb-python/test/fuzz.py | 7 | CODE | |
| LOW | crates/redb-python/test/test_fuzz.py | 8 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/redb-bench/Cargo.toml | 12 | # The shared harness is a library, so these have to be regular dependencies. Engines other than redb | COMMENT |