Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sqliteai/sqlite-agent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.1.9
Choose a base ref
...
head repository: sqliteai/sqlite-agent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.2.0
Choose a head ref
  • 6 commits
  • 15 files changed
  • 3 contributors

Commits on May 11, 2026

  1. Update README.md

    marcobambini authored May 11, 2026
    Configuration menu
    Copy the full SHA
    0a4da96 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2026

  1. Update LICENSE

    marcobambini authored Oct 20, 2026
    Configuration menu
    Copy the full SHA
    6a1900f View commit details
    Browse the repository at this point in the history
  2. Update README.md

    marcobambini authored Oct 20, 2026
    Configuration menu
    Copy the full SHA
    f91aa32 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2026

  1. fix: correctness and hardening fixes, release 0.2.0

    Fixes found while auditing the sources, with three behaviour changes.
    
    Breaking:
    - agent_run() is registered SQLITE_DIRECTONLY, so it can no longer be
      reached from a VIEW, TRIGGER, CHECK constraint, generated column or
      index expression. It makes network calls and writes rows, so querying
      a database file prepared elsewhere could otherwise trigger those side
      effects on the caller's behalf.
    - max_iterations must be in 1..100. Non-positive values divided by zero;
      an unbounded value let one statement spend unbounded time and money.
    - A tool is invoked only if the MCP server advertised it.
    
    Memory safety and resource handling:
    - Fix a stack buffer overflow at ~22 columns: the INSERT was built with
      unbounded strcat() into two 512-byte buffers. It is now assembled once
      per call with sqlite3_str. Same fix for the embedding statements.
    - Stop destroying the caller's transaction. BEGIN/COMMIT/ROLLBACK ran
      with return codes ignored while one of the caller's statements was
      already executing, so the inner ROLLBACK discarded the caller's
      uncommitted work. Use a SAVEPOINT, which nests safely.
    - Cut the agent_run() stack frame from ~155KB to ~6KB by moving scratch
      buffers to the heap; the old frame exceeded musl's 128KB thread stack.
    - Fix four leaks of the 64KB tool list on table-mode error paths.
    
    Parsing and data handling:
    - Delimit JSON objects by matching braces, honouring nesting and string
      literals, and decode escape sequences. The first '}' used to end the
      object, losing every field after a nested one and mis-splitting rows.
    - Bind values by SQLite type affinity. Columns declared INT, BIGINT,
      FLOAT, DOUBLE, NUMERIC or VARCHAR(n) took the string path, where an
      unquoted JSON number was never bound and the column became NULL.
    - Feed tool results back to the model in text mode; the system prompt
      was re-sent unchanged, so the model never saw what a tool returned.
    - Cap the truncation budget by the buffer that holds the message.
    
    Prompt-injection controls:
    - Fence MCP-supplied text with a per-call random delimiter and tell the
      model it is data, so injected instructions cannot escape the data
      region. Quote identifiers with %w and string literals with %q.
    
    Supply chain and build:
    - Restrict Apple signing secrets to main, pass secrets through env, and
      clean up the keychain even after a failure.
    - Pin actions to commit SHAs, default workflow permissions to
      contents: read, and verify the SQLite amalgamation against a pinned
      SHA-256 before compiling it.
    - Enable stack protector and _FORTIFY_SOURCE everywhere, RELRO and a
      non-executable stack on Linux/Android, NX and ASLR on Windows.
    - Track package-lock.json to pin the toolchain that builds the bundle.
    - Fail package generation when a platform binary is missing.
    
    Node package:
    - Fix the ESM entry point, which always threw ExtensionNotFoundError
      because the bundler rewrites a bare require() into a throwing stub.
    
    Add CHANGELOG.md and a "Security model" section to API.md.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    marcobambini and claude committed Nov 1, 2026
    Configuration menu
    Copy the full SHA
    02f9229 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from sqliteai/fix/correctness-and-hardening-0.2.0

    fix: correctness and hardening fixes, release 0.2.0
    marcobambini authored Nov 1, 2026
    Configuration menu
    Copy the full SHA
    ae02599 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d1f7f88 View commit details
    Browse the repository at this point in the history
Loading