fix(bindings): derive sqlite limits from host time and memory caps#1600
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | d5bec39 | Commit Preview URL | May 08 2026, 09:10 AM |
feb16af to
d5bec39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
SqliteLimits::default(), which allowed large result materialisation and rendering to bypass hostExecutionLimitsand risk in-process DoS.Description
apply_sqlite_confignow acceptstimeout_secondsandmax_memory, maps them toSqliteLimits::max_duration/max_db_bytes, and usesbuilder.sqlite_with_limits(...)instead ofbuilder.sqlite(); constructor and reset call sites updated to pass the host limits.derive_sqlite_limits(state)which mapstimeout_msandmax_memory(MiB) intoSqliteLimits, and switched the JS opt-in tobuilder.sqlite_with_limits(derive_sqlite_limits(state)).BASHKIT_ALLOW_INPROCESS_SQLITE=1) and preserved existing deny-list defaults; changes restrict sqlite runtime budgets to host-specified limits.Testing
cargo fmt --allwhich completed successfully.cargo check -p bashkit-python -p bashkit-jswhich completed successfully.Codex Task