Repository navigation
fix(deps): bump rusqlite for RUSTSEC-2026-0459 - #728
Conversation
libsqlite3-sys 0.35.0 bundles SQLite before 3.54.0. rusqlite 0.41.0 locks libsqlite3-sys 0.39.0, which bundles SQLite 3.54.0. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
lazyxeon
left a comment
There was a problem hiding this comment.
Clear at c433520848665b65442f94b836c41e671a57e99b. No blocking findings.
Scope. 3 files: Cargo.lock (+7/−7), astraweave-memory/Cargo.toml (+5/−1), docs/architecture/ai_pipeline.md (+1/−1). Only rusqlite 0.37.0→0.41.0, libsqlite3-sys 0.35.0→0.39.0 and hashlink 0.10.0→0.12.2 move. hashlink's dependency edge moves to hashbrown 0.17.1, which is already in the lock at base. No crate is added or removed, and no other crate moves.
Advisory. RUSTSEC-2026-0459 (advisory-db) gives patched libsqlite3-sys >= 0.39.0. The bundled sqlite3.h in 0.39.0 is 3.54.0. rusqlite 0.41 requires libsqlite3-sys 0.39.0 on non-wasm targets, so the manifest floor 0.41 can't resolve back to a vulnerable sys crate.
Nested lockfiles. There are 3 (astraweave-ecs/fuzz, crates/astraweave-blend/fuzz, tools/parse_probe). None pins rusqlite, libsqlite3-sys or hashlink.
API and features. The only usage is astraweave-memory/src/storage.rs (Connection, params!, execute, execute_batch, prepare, query_row, query_map, Error::QueryReturnedNoRows).
- 0.38 turned off
u64/usizeToSql by default and made the statement cache optional. The code already casts toi64. default-features = false+["bundled","cache"]keeps the 0.37 behavior and drops the wasm-onlyffi-sqlite-wasm-rs. No workflow builds wasm.- MSRV: rusqlite 0.41.0 needs 1.89.0, libsqlite3-sys 0.39 needs 1.88 and hashlink 0.12.2 needs 1.85. The repo pins 1.89.0.
Reproduced on a clean checkout at head (rustc 1.89.0):
cargo test -p astraweave-memory --locked: exit 0, 1022 passed.cargo check --locked --all-targets -p astraweave-memory -p astraweave-persistence-ecs -p astraweave-persona -p companion_profile -p llm_integration: exit 0.cargo check --locked -p astraweave-memory --all-features: exit 0.cargo clippy -p astraweave-memory --locked --lib --no-deps -- -D warnings: exit 0.cargo audit0.22.2: exit 0.cargo deny check advisories0.20.2: exit 0 (advisories ok).- Mutation: I put
libsqlite3-sysback to 0.35.0 in the lock and rancargo audit -n -f. It exits 1 with RUSTSEC-2026-0459 (Upgrade to >=0.39.0), and baseee337b9dflags the same way.
PR body. It says Fixes #726. The report matches what I reproduced, the skips are stated with reasons, and the docs cite Cargo.toml:25 is correct. Not yet green: CI is in progress, and there are no cursor[bot] or Codex reviews or inline threads yet. Both are still merge gates.
Non-blocking.
- rusqlite 0.41.1 and libsqlite3-sys 0.39.1 (SQLite 3.54.1) are out. A later
cargo updatecan pick them up. - BS-015 evidence, outside this PR:
cargo audit -fon the nested locks finds RUSTSEC-2026-0007 (bytes) incrates/astraweave-blend/fuzz/Cargo.lockandtools/parse_probe/Cargo.lock. → Astrix/Annubis via #703. - Security: whether any
MemoryStorage::new(path)caller opens a DB or-walthat a less trusted party could write is for @annubis to rule on.
lazyxeon
left a comment
There was a problem hiding this comment.
Docs: blocking at c433520848665b65442f94b836c41e671a57e99b.
The edited cell at docs/architecture/ai_pipeline.md line 458 is correct. astraweave-memory/Cargo.toml line 25 is the rusqlite dependency, and Cargo.lock resolves rusqlite 0.41.0 and libsqlite3-sys 0.39.0. The new Cargo.toml comment checks out against crates.io and RUSTSEC-2026-0459:
rusqlite0.41.0 is the first release that requireslibsqlite3-sys ^0.39.0.libsqlite3-sys0.39.0 bundles SQLite 3.54.0, and the advisory lists>= 0.39.0as patched.cacheis a feature from 0.38 on, and 0.37 has no such feature.
No doc, README, CHANGELOG, deny.toml or audit config cites RUSTSEC-2026-0459 or the old rusqlite/libsqlite3-sys/hashlink versions. The rusqlite 0.31 mentions in docs/archive/ and docs/journey/ are dated records.
docs/architecture/ai_pipeline.mdline 1062 says "astraweave-memory/Cargo.toml:23, 27declaresbevy_ecs = { version = "0.17", optional = true }andbevy = ["bevy_ecs"]." This pull request adds four comment lines aboverusqlite. At this headbevy_ecsis at line 26 andbevy = ["bevy_ecs"]is at line 30. On main they were at 22 and 26. Replaceastraweave-memory/Cargo.toml:23, 27withastraweave-memory/Cargo.toml:26, 30.
Not blocking: the cell at line 458 says "bundled feature". The dependency now also turns off default features and turns on cache. If you want it complete, write "bundled and cache features, default features off".
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon
left a comment
There was a problem hiding this comment.
Clear at f2ca6e7 (scope re-clear; supersedes c433520, review 5834119536).
Delta c433520..f2ca6e7 is one commit touching only docs/architecture/ai_pipeline.md (+1/-1). Cargo.toml and Cargo.lock are unchanged, so my dependency findings stand. The body still says Fixes #726. Merge needs Astranox's docs clear, cursor[bot] at head and green CI.
lazyxeon
left a comment
There was a problem hiding this comment.
Docs: blocking at f2ca6e7061ecf8a39f66b39ef05cbfc204613005.
f2ca6e70 fixes line 1062 correctly: bevy_ecs is at astraweave-memory/Cargo.toml line 26 and bevy = ["bevy_ecs"] at line 30. The other cites to that file, line 458 (:25, rusqlite) and lines 1060 and 1091 (:11-13), still hold. My review 5834174516 missed two more cites of the same two lines, which the four new comment lines also moved:
docs/architecture/ai_pipeline.mdline 1092 says "Cargo.toml:23, 27declares an optionalbevy_ecs = "0.17"dependency under featurebevy". ReplaceCargo.toml:23, 27withCargo.toml:26, 30.docs/architecture/ai_pipeline.mdline 469 (thecomponents.rsfile-map row) says "Cargo.toml:27declaresbevy = ["bevy_ecs"]". ReplaceCargo.toml:27withCargo.toml:30.
Neither cite was right on main either (main has the two lines at 22 and 26). After these two edits, every astraweave-memory/Cargo.toml cite in the doc matches this head.
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon
left a comment
There was a problem hiding this comment.
Clear at 8bd9fa4 (scope re-clear; supersedes f2ca6e7, review 5834195573).
Delta f2ca6e7..8bd9fa4 is one commit touching only docs/architecture/ai_pipeline.md (+2/-2). Cargo.toml and Cargo.lock are unchanged, so my dependency findings from 5834119536 stand. The body still says Fixes #726. Merge needs Astranox's docs clear, cursor[bot] at head and green CI.
lazyxeon
left a comment
There was a problem hiding this comment.
Docs: cleared at 8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1.
8bd9fa4d changes only docs/architecture/ai_pipeline.md, and only the two cites from my review 5834196737. Line 469 now cites Cargo.toml:30 (bevy = ["bevy_ecs"]), and line 1092 cites Cargo.toml:26, 30 (bevy_ecs, bevy). Both match astraweave-memory/Cargo.toml at this head. Every astraweave-memory/Cargo.toml cite in the doc now matches the head: line 458 (:25), lines 1060 and 1091 (:11-13), and lines 469, 1062 and 1092. The remaining Cargo.toml:N cites in the file belong to other crates. My earlier checks of the line 458 cell and the RUSTSEC-2026-0459 version comment (5834174516) still hold, because Cargo.toml and Cargo.lock are unchanged since c4335208.
There was a problem hiding this comment.
Stale comment
Verdict
Not blocking. This is not an approval. Not green.
Head
8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1. Baseee337b9def74e6cf27f518c91c0a307e9ac0409c. Three commits. The lock andastraweave-memory/Cargo.tomlarec433520848665b65442f94b836c41e671a57e99b. The two later commits only renumber Bevy cites indocs/architecture/ai_pipeline.md. Those cites match the file:rusqliteis line 25,bevy_ecsis line 26,bevy = ["bevy_ecs"]is line 30, and the llm/embeddings/rag deps are still lines 11–13.lib.rs:66-69gatesmod componentsonfeature = "bevy". No consumer enables that feature.The bump is the minimum that patches RUSTSEC-2026-0459. rusqlite 0.40.2 pins
libsqlite3-sys0.38.2. rusqlite 0.41.0 pinslibsqlite3-sys0.39.0 exactly. That amalgamation is SQLite 3.54.0 (SQLITE_VERSION,SQLITE_SOURCE_ID2026-10-09 15:46:58 be8d059e9a…).sqlite3WalReadFramezero-fills a short WAL frame (if( nOut>sz ) memset(pOut+sz, 0, nOut-sz)). The 0.35.0 amalgamation (SQLite 3.50.2) does not. Crate checksums match the lock. None of the three versions are yanked.deny.tomldid not gain an ignore.What holds
default-features = falsedropsffi-sqlite-wasm-rs.bundledstill enablesmodern_sqliteandlibsqlite3-sys/bundled, which compiles the vendoredsqlite3.c.cacherestores the statement cache that 0.37 always linked through hashlink.cargo tree -e featuresshows rusqlite featuresbundled,cache,modern_sqlite, andhashlink, and libsqlite3-sys featuresbundled,bundled_bindings, andcc.bundled-sqlcipheris off, andsqlcipher-srcis not in the lock. The storage test binary has no dynamiclibsqlite3and contains3.54.0.No new crate name. hashlink 0.10.0 is replaced by 0.12.2, which uses hashbrown 0.17.1, already in the lock. Nested locks do not pin these crates.
Connection::openflags stayREADWRITE | CREATE | NO_MUTEX | URI.Error::QueryReturnedNoRowsis still the miss variantstorage.rsmatches. TheMemoryStoragequeries are unchanged.
MemoryStorage::newcallers are tests.astraweave-persistence-ecsdepends onastraweave-memoryand does not call it. persona and dialogue link the same stack and do not callMemoryStorage. The hashed crates do not depend on it. Onc433520, replay hash succeeded on ubuntu-latest and macos-latest (42716370697); the Windows job was cancelled when the branch moved. The ubuntuhashjob in42716370338also succeeded; macOS, Windows, and compare were cancelled. Expected unchanged on this head.Report
- Head
8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1. Onc433520, deny and cargo-audit42716370695succeeded, Gate (fmt, clippy, check) succeeded inside42716371247, and trace sync42716370484succeeded. Those runs do not cover this head. Checks on8bd9fa4were in progress, including deny42718851673. The PR body still namesc433520. Not green.- Commands run, exit 0, against the lock at
c433520(identical to this head):cargo tree -p astraweave-memory -e features -i rusqlite;cargo tree -p astraweave-memory -e features -i libsqlite3-sys;cargo test -p astraweave-memory --locked --test storage_tests(14 passed); lib filterstorage(8 passed).- Not run: the rest of the
astraweave-memorysuite. The crate compiled, and the rusqlite suite passed. Replay hashes were not re-run locally. GPU frame budget. This is not a render change.- Measurements: not measured.
- Replay hashes: not re-run locally. Ubuntu and macOS replay-hash jobs passed on
c433520before the doc commits cancelled the workflow. Expected unchanged.- Deferred issue links: none.
Residuals
rusqlite 0.41.1 is published and still pins
libsqlite3-sys0.39.0, so it does not move this patch. The bundled build no longer passes-DSQLITE_ENABLE_MEMORY_MANAGEMENT, which 0.35 did. This crate does not callsqlite3_release_memory.bundled-sqlcipheron 0.39.0 still builds SQLCipher from SQLite 3.53.4 and would stay affected. This dependency does not enable it. The edited storage row still says four indexes andstorage.rs:46-80; the same file at line 929 listsidx_tagsas a fifth index. That count was already on main.Sent by Cursor Automation: ASTRA PR AUDIT AGENT
There was a problem hiding this comment.
Verdict
Not blocking. Review state is a comment. Not green.
Head 8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1. Base ee337b9def74e6cf27f518c91c0a307e9ac0409c. Three commits. The lock and astraweave-memory/Cargo.toml are c433520848665b65442f94b836c41e671a57e99b. f2ca6e706 and 8bd9fa4d only renumber Bevy cites in docs/architecture/ai_pipeline.md. Those cites match this file: rusqlite is line 25, bevy_ecs is line 26, bevy = ["bevy_ecs"] is line 30, and astraweave-llm / astraweave-embeddings / astraweave-rag are still lines 11–13. astraweave-memory/src/lib.rs:66-69 gates mod components on feature = "bevy". No consumer enables that feature. The pull request body names this head.
Security
RUSTSEC-2026-0459 (CVE-2026-119375) is patched at libsqlite3-sys >= 0.39.0. The lock is 0.39.0. Its amalgamation header is SQLite 3.54.0, SQLITE_SOURCE_ID 2026-10-09 15:46:58 be8d059e9a49089ab2dce5ed26dd87aaf598fdc5fbe0b107c0dd758464bcd5e3. In that sqlite3.c, sqlite3WalReadFrame zero-fills when the caller buffer is larger than the WAL frame page (if( nOut>sz ) memset(pOut+sz, 0, nOut-sz)). The 0.35.0 amalgamation is SQLite 3.50.2 and reads nOut bytes with no fill. That is the uninitialized page-cache disclosure.
Crate checksums match the crates.io downloads. The index lists rusqlite 0.41.0, libsqlite3-sys 0.39.0, and hashlink 0.12.2 as not yanked. deny.toml and .cargo/audit.toml are unchanged. No RUSTSEC ignore was added. rusqlite 0.40.2 still requires libsqlite3-sys ^0.38; 0.41.0 is the first release that requires ^0.39.0. rust-version 1.89.0 matches rust-toolchain.toml.
default-features = false drops the 0.41 default ffi-sqlite-wasm-rs. bundled still enables modern_sqlite and libsqlite3-sys/bundled. build.rs compiles vendored sqlite3.c on that feature before the pkg-config branch. cache puts back the StatementCache field that 0.37 always constructed. Connection::prepare does not use that cache in 0.37 or 0.41, and MemoryStorage calls prepare. bundled-sqlcipher is off. sqlcipher-src and sqlite-wasm-rs are not in the lock. The Rust load_extension feature stays off. OpenFlags::default is still READWRITE | CREATE | NO_MUTEX | URI.
The MemoryStorage statements are unchanged and bound with params!. MemoryStorage::new is called only from storage_tests.rs. No other crate names MemoryStorage. Lock ancestors of rusqlite are astraweave-memory, astraweave-persona, astraweave-dialogue, astraweave-persistence-ecs, astraweave-stress-test, companion_profile, and aw_editor (through dialogue). astraweave-persistence-ecs declares the dependency and has no Rust reference to it.
On this SHA, Cargo Deny and cargo-audit passed (42718851673, jobs 129507365412 and 129507365886).
Determinism
No hashed crate depends on rusqlite except astraweave-persistence-ecs, which does not call it. persist_replay hashes the save id, the tick, and the replay records. hashlink's only lock parent is rusqlite. hashbrown 0.17.1 was already in the lock; hashlink 0.10.0 is replaced by 0.12.2. No new crate name.
Aravath replay_matches_golden_hash passed on ubuntu-latest (42718851493, job 129508387224). That test is aravath_runtime, which does not depend on rusqlite. macOS and Windows of that workflow were still pending. The determinism-replay hash jobs on three OS were still pending. Expected unchanged. Not re-run locally.
Docs
Trace sync passed (42718851923). Doc-truth lint and the docs build passed. The edited storage row still says four indexes and storage.rs:46-80. idx_tags is a fifth index. That count was already on main.
Report
- Head
8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1. Deny, cargo-audit, trace sync, doc-truth, docs build, net-tests, pack guard, and scorecard passed on this SHA. Gate was still pending. Aravath replay hash passed on ubuntu; macOS and Windows were pending. determinism-replayhashwas pending. Not green. - Commands: sha256 of rusqlite 0.41.0, libsqlite3-sys 0.39.0, libsqlite3-sys 0.35.0, and hashlink 0.12.2 matched the lock. crates.io index walk for rusqlite 0.37.0 through 0.41.1.
sqlite3WalReadFramecompared in the two amalgamations. Lock ancestor walk.gh pr checks 728. - Not run:
cargo test -p astraweave-memory.cargo tree -p astraweave-memory -e features -i rusqlite --offlinefailed because hashlink 0.12.2 is not in the local registry. Replay hashes were not re-run locally. GPU frame budget. This is not a render change. - Measurements: not measured.
- Replay hashes: ubuntu Aravath golden passed on this SHA. Cross-OS determinism-replay has not finished. Expected unchanged.
persist_replaydoes not call this stack. - Deferred issue links: none.
Residuals
libsqlite3-sys 0.39.1 bundles SQLite 3.54.1. That patch fixes a heap-buffer overflow on 32-bit builds and other problems reported in 3.54.0. 64-bit builds are outside the overflow. rusqlite 0.41.0 and 0.41.1 both require libsqlite3-sys ^0.39.0, so the lock can move to 0.39.1 without a rusqlite bump. This pull request stops at the advisory floor. The toolchain targets are x86_64 and aarch64. rusqlite 0.41.1 also fixes a panic in a zero-argument deterministic scalar function and a SQLCipher PRAGMA check. This crate registers neither, and bundled-sqlcipher is off. The bundled 0.39 build drops -DSQLITE_ENABLE_MEMORY_MANAGEMENT, which 0.35 passed. This crate does not call sqlite3_release_memory. The other bundled flags match, including SQLITE_DEFAULT_FOREIGN_KEYS=1 and SQLITE_USE_URI.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT
|
I ran the devastation protocol (T2 D-DEPS) at
|


Description
Fixes #726.
Bump the bundled SQLite stack in
astraweave-memoryto the lowest releases that patch RUSTSEC-2026-0459 (CVE-2026-119375).MemoryStorageis unchanged.rusqlitelibsqlite3-syshashlinkhashlink0.12 is required by rusqlite 0.41'scachefeature, which is the statement cache 0.37 always compiled in. No new crate.default-features = falseleaves off the 0.41 defaultffi-sqlite-wasm-rs. That feature is wasm-only; turning it on would addsqlite-wasm-rsandrsqlite-vfs.Nested lockfiles do not pin either crate:
tools/parse_probe/Cargo.lock,crates/astraweave-blend/fuzz/Cargo.lock,astraweave-ecs/fuzz/Cargo.lock.No
RUSTSECignore was added.Docs follow-up (Astranox review):
docs/architecture/ai_pipeline.mdnow citesastraweave-memory/Cargo.toml:26, 30for Bevy ECS (§13.1.5, §13.1.7) and:30for thecomponents.rstable row; rusqlite at:25unchanged. All repo docs grep clean for stale:23, 27memory-manifest cites.Report
8bd9fa4dde57861dd7a4c3aa5fa04f28937cd3e1. Required GitHub checks have not been observed on this SHA yet.cargo test -p astraweave-memory --offline— 0 (1022 passed, 0 failed)cargo clippy -p astraweave-memory --locked --lib --no-deps -- -D warnings— 0AW_CI_PACKAGES=astraweave-memory bash scripts/ci/run-gate.sh— 0cargo deny check advisories— 0 (advisories ok; the fetched db contains RUSTSEC-2026-0459, patched>= 0.39.0)cargo audit— 0cargo run -p aw_trace_sync --locked -- --check— 0cargo run -p aw_doc_lint -- --mode warn— 0 (docs follow-up)cargo run -p aw_trace_sync -- --check— 0 (docs follow-up)astraweave-memoryis not in that step, and no hashed crate source changed.AW_CI_PROFILE=ci-pr AW_CI_PACKAGES=astraweave-memory bash scripts/ci/run-tests.sh.cargo-nextestis not installed here.cargo test -p astraweave-memoryran the crate tests.cargo clippy --all-featuresfails on a pre-existingexpectinastraweave-memory/src/components.rs(bevy feature only). That file is unchanged on this branch.Type of change
Security Considerations
No new crate.
rusqlite0.37.0 → 0.41.0,libsqlite3-sys0.35.0 → 0.39.0, and the existinghashlinkdependency 0.10.0 → 0.12.2.cargo deny check advisoriesandcargo auditare clean.The SQLite page-cache fix is inside the bundled library. The
MemoryStorageschema and queries are unchanged.Checklist
Existing
astraweave-memorytests coverMemoryStorage. The advisory is cleared by the version pin, checked withcargo denyandcargo audit.