Abstract
An AI agent is allowed to call one stored procedure. That procedure fires a trigger, which calls a second procedure, which runs dynamically built SQL under a more privileged identity. It then starts an autonomous transaction that commits on its own, and queues a payment message. The agent was authorised for the first call. It was never authorised for any of what followed, and rolling back the original transaction does not undo the parts that already committed or left the database. Today's database access control checks who may invoke an entry point. It does not check what that call actually reaches.
This disclosure (Embodiment 31 of a 39-part series) describes a technical architecture for closing that gap. Before a protected database operation takes effect, the system reconstructs the transitive effect of the requested entry point: the stored programs, triggers, dynamic statements, referential cascades, privilege transitions, autonomous or deferred transactions and remote or external calls it can reach. It separates the database privilege a stored program uses from the business or task authority of the originating principal. It classifies each effect by transaction domain, so that effects governed by the parent transaction are distinguished from independently committing, queued, remote or external ones. An independent validator compares the reconstructed effects with a protected operation-specific authority contract. Only an exact, narrowly scoped, authenticated capability bound to the task, execution path, effect scope and current program or policy version lets an effect take place, and it is enforced at a protected database endpoint (a stored-program guard, trusted operation broker, credential-isolated service or transactional admission control) before commit. If a change in program version, trigger, role or configuration invalidates the analysis, or an effect cannot be established with enough assurance, the operation is withheld, narrowed to a permitted path, or sent for separate authorisation. The disclosure covers invoker-rights and definer-rights reconciliation, dynamic SQL reconstruction at the execution boundary, partial-commit prevention, distributed and deferred execution, replay resistance, and banking and supply-chain examples.
What this teaches, in plain words
- Being allowed to press a button is not the same as being allowed to do everything the button sets off. A safe system checks what will really happen, not just who pressed it.
- Databases hide a lot of "chain reactions": triggers, helper procedures, scheduled jobs and messages sent out. An AI agent can set these off without ever naming them.
- Some actions commit on their own and cannot be taken back by cancelling the first step. They need a guard in front of them, placed before the point of no return.
- A permit should be exact and short-lived. It should name the task, the real effect and the current version of the code, and it should stop working if any of those change.
- If the system cannot tell what an action will do, the safe answer is to hold it, not let it through.
Industry relevance
- Databases and stored-program engines. Oracle Database (PL/SQL definer-rights and invoker-rights units, and autonomous transactions that commit independently of the caller), Microsoft SQL Server and Azure SQL (triggers, EXECUTE AS contexts, and xp_/CLR calls that reach outside the database), PostgreSQL (SECURITY DEFINER functions, triggers and dblink), IBM Db2, SAP HANA, and MySQL/MariaDB (stored routines and event schedulers). In each, the disclosed closure check would sit before commit and ask what the requested entry point can actually reach, not only whether the caller may invoke it.
- Cloud and data platforms. Amazon Aurora and RDS, Google Cloud SQL, AlloyDB, Spanner and BigQuery, Microsoft Azure SQL, and Snowflake. Where an agent runs SQL or calls procedures through these services, the protected endpoint would be a credential-isolated broker or admission control in front of the commit. It would check an exact effect capability and reject any effect that was not part of the approved path.
- AI agent platforms. Anthropic (Claude agents using tool or MCP database connectors), OpenAI (agents and function calling against enterprise databases), Google (Gemini agents with database tools) and Microsoft (Copilot and agent frameworks). A model that has permission to call one procedure does not thereby have permission to trigger a payment message, a privilege change or a hidden autonomous commit. The disclosed gate would sit between the agent's tool call and the database effect, so that the agent's task authority, not the procedure's own privilege, decides what may become final.
- Sectors. Core banking and payments, ERP and supply-chain systems, healthcare records, and cloud database services.
This company and product alignment is AI-generated and prospective. Readers must cross-check it against the original PCT filings and each company's own documentation before drawing any conclusion. It is not an endorsement, validation, collaboration or infringement statement about any company or product.
Basis and first disclosure
Based on the Mothership application PCT/IB2026/055615, filed 4 June 2026 and publicly disclosed 16 July 2026, and on Indian Provisional Filing 202631136555 (as reported by the applicant). The related ALF application PCT/IB2026/053385 (WO 2026/115520) was filed 7 April 2026 and disclosed 4 June 2026. First disclosure: the Mothership at https://www.tdcommons.org/dpubs_series/12542/ and the Mothership copy at https://zenodo.org/records/23245054. The European disclosure of 16 November 2026, "EUROPE'S NEXT AI SECURITY CHALLENGE: WHO CONTROLS THE FINAL ACTION? — From EU AI Act and NIS2 to 6G, the Digital Euro, Industrial AI and Critical Infrastructure", is at https://zenodo.org/records/24274259.
Where to read the PCT filing
Search "Sangam Das" on WIPO PATENTSCOPE, or search PCT/IB2026/055615 (pctib202655615). The full filing can also be read directly on TD Commons using the link above.
Notices
The underlying invention is human-originated. AI-assisted tools were used to prepare summaries, examiner guides and threat scenarios in this document, so it may contain errors. Please check all claims, dates and priority against the original publicly available filings.
Contact: [email protected] | [email protected]
Licence: CC BY-NC 4.0
Keywords
AI safety; agent security; AI agent authorization; database security; stored procedures; database triggers; autonomous transactions; dynamic SQL; SQL injection; privilege escalation; definer rights; invoker rights; confused deputy; least privilege; transaction integrity; two-phase commit; distributed transactions; zero trust; policy enforcement point; capability-based security; non-repudiation; audit logging; fail-closed; agentic AI; enterprise databases; core banking security; ERP security; supply-chain security; cloud database security
Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial 4.0 License
Recommended Citation
Das, Sangam Kumar, "AI Safety: Protected Transitive Database-Effect Closure, Stored-Program Authority Reconciliation and Autonomous Transaction Fencing in Agentic Enterprise Databases", Technical Disclosure Commons, ()
https://www.tdcommons.org/dpubs_series/13370