Skip to content

Chronos DB 0.9.0

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 30 Nov 04:32

Security fixes from the 2026-11-30 review, and confined SQL for gateways. A static review of 0.8.0 found six
High, sixteen Medium and fourteen Low findings; all are fixed here. The sql op over HTTP and MCP's sql tool take
"confined": true, which holds a session to its own world: Chronos Gateway 0.5.0 sends it for every run statement
it relays, so pair the two. Breaking: a CHRONOS_KEY_FILE that others may read is refused; chmod 600 it.
Nothing changes in how rows are stored: 0.9.0 opens and writes data format 8 as 0.8.0 does, and reads the plaintext
records and ledger rows older releases wrote. Built and signed on the maintainer's Mac as 0.8.0 was.

  • Security: the 2026-11-30 review. A static review of main found six High, sixteen Medium and fourteen Low
    findings; this fixes them.
    • One query no longer takes the server down. XML nests at most 256 levels (libxml's limit) and an XPath
      expression at most 1000: a deeper one is refused (2200N, XX000) where it overflowed the stack and ended the
      process.
    • Merges. Approving a held merge of some tables or rows, or one INTO another world, merges just what was
      held, not the whole world. MERGE ... INTO w DRY RUN and MCP merge_preview need the right to see w. MCP
      branches lists only the worlds the agent may see, and merge_policies only its own unless it may list all.
      check_reads can't be turned off while a policy of the world checks reads, and a world's metadata can't
      change while a proposal for it is open. Merge operation ids are each agent's own and bound to the world's id.
    • What a session sees. pg_stat_activity shows other roles' query text as <insufficient privilege> (and
      their address and times as NULL) unless the caller is a superuser, has the role's privileges or
      pg_read_all_stats; an agent sees its own sessions, and every session only its own database's.
    • Rules. A rule's actions are SELECT, INSERT, UPDATE, DELETE or NOTIFY, as in Postgres (else 42601), and they
      run as the table's owner. A tenant agent may not make or drop rules on main's tables or tables held to its
      tenant, nor casts or operators.
    • Agents. The row API (get, find, put, delete) checks the table and column GRANTs the same SQL would.
      An agent without unmask may not make a foreign key to masked columns, nor a tenant agent to tables held to
      its tenant (each was a test of whether a value exists). Memory tools keep an agent to its own memories. An
      expired agent no longer logs in over the Postgres port.
    • Logins. A SCRAM verifier given as a password has at most 10,000,000 iterations (22023), and checking one
      stops when asked; scram_iterations is capped there too. A name is held back by its failed logins only, not
      by logins left hanging. Certificate and Studio logins refuse a role dropped while they were under way, rather
      than continuing as the superuser.
    • HTTP and Studio. An unauthenticated keep-alive (/v1/health, Studio's pages) closes after one reply and no
      longer escapes the limit on connections before login. IPv6 clients are limited per /64. Studio tables
      needs CONNECT. Under --studio-api, /v1/backup and imports from private or loopback addresses are refused.
    • Types. User range and base types are each world's (and database's) own: one made in a fork no longer
      changes main's. Past 65,536 record shapes a query fails (54000) instead of reading another shape.
      gen_random_uuid() draws from the operating system's generator; setseed() no longer makes it repeat
      (simulations still do).
    • Audit. The security audit records role changes, GRANT and REVOKE, history_retention, synchronous commit,
      WAL shipping, BACKUP, lo_export and COPY to or from a server file. Its lines are chained (keyed when the
      folder is encrypted), checked by Core::verify_security_audit. New setting audit_required: a privileged
      action is refused (58030) if its audit line can't be written first. Only the database's own user may shorten
      history_retention.
    • Storage and secrets. In an encrypted folder the attach records, the bucket's folder-settings and new merge
      ledger rows (hash_v 2, keyed) are sealed; older plaintext ones are still read. Restore copies regular files
      only. chronos eval commands get a short list of environment variables, not the key or tokens, and serve
      drops them from its environment once read. A CHRONOS_KEY_FILE that others may read is refused (breaking:
      chmod 600 it). --token and --admin-token on the command line print a warning.
    • Follow-ups. New setting md5_logins (on by default): off, a role kept with an MD5 password is asked for SCRAM
      and refused like a name that is no role, so the login no longer tells MD5 roles apart; serve with a token warns
      while any are left. A hosted Studio import connects to exactly the addresses it checked (the name is still used
      for TLS), so a name can't answer public, then private. The security audit's head (its last synced line and
      oldest month) is kept in audit/head, sealed when the folder is, so lines cut from its end or months deleted
      by hand are found; agent, merge policy and world grant, revoke, transfer and assign actions are audited before
      they run, like settings. Anonymous record shapes are swept once nothing holds them, rather than counted to a
      limit of 65,536 for the life of the process.
    • Merge checks. A merge check runs as the database's own and sees masked values; an agent that reads masked
      columns masked is now told how many rows a check found, not what they are.
    • Confined requests. The sql op over HTTP and MCP's sql tool take "confined": true: its statements may
      change their own world only (no merge, switching or statements on other worlds, roles, agents, policies or
      settings), as a rehearsal's session. For a caller that relays SQL it did not write, such as a gateway's run.

Release checks. On the release commit: the supply-chain check, the release gate (crash, durability, Jepsen with 12 kills, the shuttle simulation, 100,000 fuzz rounds of the parser tests, the review suites), a 10-minute soak, every test on macOS (2,878 run, 0 new failures) and on Linux (linux-gate-summary.md, attached; it passed on its second run, the first failed one timing test, pg::a_client_that_stops_reading_lets_its_locks_go), and the drivers and ORMs (psycopg, SQLAlchemy, Django, Alembic, LangGraph, node-postgres, Knex, Prisma, TypeORM, Sequelize, JDBC, Flyway, Hibernate; pgx and GORM not run). cargo-fuzz was not run.

Every change in detail: https://github.com/2090-labs/Chronos-DB/blob/main/CHANGELOG.md