Guides
Step-by-step answers about letting an AI agent act on a real database, payments or customer data. Each one starts with what you can do with Postgres and your agent client alone, and every command was run before it was written down.
Guides
- How to give Claude Code or Cursor write access to Postgres safely
Give the agent a read-only role first. If it must write, add a narrow writer role with a statement timeout, make a person approve destructive verbs, and check what Postgres committed afterwards, with a way to put rows back.
Step by step, on the blog
Checklists and tested setups, each with the SQL or the commands and the output they printed.
- Zero-PHI Provenance: How AAP-H Audits Clinical AI
Auditing clinical AI tools without storing patient identifiers is required under HIPAA and DPDP 2023. Here is how SHA-256 digests and transparency log entries safeguard patient privacy.
- Safe Postgres Guardrails for Claude Code and Cursor
Coding agents like Claude Code and Cursor can issue raw SQL against development and staging databases. Here is the hardening checklist to keep them contained.
- Securing MCP servers against SQL injection and table drops
Model Context Protocol servers execute database queries directly from agent prompts. When an agent receives malicious context or hallucinates syntax, conversational guardrails fail to stop destructive execution.
- The AI agent blast radius formula: mathematical safety in production
Traditional security audits measure network perimeters. For autonomous AI agents, safety is a function of credential depth, mutation scope, and reversibility. Here is how to calculate agent blast radius.
- Autonomous AI agent due diligence: what enterprise CISOs and VCs require
Enterprise CISO reviews and venture capital due diligence have shifted from model benchmarks to execution safety. Technical teams must demonstrate deterministic control over database mutations before autonomous agents are funded or deployed on production infrastructure.
- How to build an insurable autonomous AI agent: the technical specification
Cyber insurance underwriters and enterprise risk officers are declining policies for unmonitored AI agents that mutate production databases. Here is the engineering architecture required to deploy insurable autonomous systems.
- Indirect prompt injection via tool outputs: why prompt boundaries fail
When an AI agent ingests untrusted text from a database, web scraper, or ticket queue, embedded adversarial commands execute with agent authority. Here is why outbound tool gates are the only deterministic defense.
- Why multi-agent hallucination cascades corrupt production databases
When autonomous agent swarms coordinate, an error from one worker becomes factual context for the next. Without storage-level verification, database mutations compound silently across worker boundaries.
- How to protect MCP servers against tool poisoning and unconstrained writes
Model Context Protocol connects AI agents directly to tools, APIs, and databases. But MCP provides no native policy enforcement. Here is how to wrap MCP servers with declarative CEL rules, intercept destructive tool calls, and verify storage reality.
- What is Deed Glass? The AI agent execution layer explained
Deed Glass (officially Deedglass) sits between an autonomous AI agent and the tools it uses. Rules decide each tool call before execution; write-ahead logs verify what committed.
- Why AI agent retry loops compound database corruption
When an automated agent encounters a database error, standard retry loops ask the language model to fix its mistake. Without storage-layer ground truth, the model hallucinates compensating queries that turn single-row errors into multi-table cascades.
- How to safely connect Claude Code and Cursor to your databases
Developers are giving autonomous coding agents like Claude Code and Cursor direct database access. Here is how to configure MCP policy rules and change log verification so agents never drop tables or execute unconstrained writes.
- How to connect AI agents to hospital systems running SQL Server or Oracle
Most hospital systems sit on SQL Server or Oracle, but letting AI agents write directly to relational clinical databases is a critical risk. Here are the three practical architectures hospital IT teams use to gate and verify agent actions safely.
- How to govern LangGraph ToolNode tools with Deedglass
LangGraph agents execute tool calls through ToolNode components. Here is how govern_tool wraps standalone tools to enforce pre-execution policy checks, handle pending approvals, and return model-readable error messages without halting graph execution.
- How to govern Medplum FHIR agent writes
AI scribes and clinical agents update patient records via FHIR APIs. Here is how Deedglass enforces pre-write policies, requires approval, and verifies committed Medplum rows.
- How to govern NVIDIA Nemotron database agents
NVIDIA Nemotron 3 Ultra models excel at complex reasoning and tool use. Here is how Deedglass enforces pre-execution SQL rules, gates sensitive database writes, and verifies committed changes.
- How to govern LlamaIndex database agent tool calls
LlamaIndex agents connect to databases through tool specs or workflows. Here is how Deedglass intercepts each tool call, pauses sensitive writes for approval, and verifies committed rows.
- Using NVIDIA Nemotron 3 Ultra to check AI agent blast radius before execution
When an AI agent plans a database write or API call, how do you know what it will really change? Here is how we integrated NVIDIA Nemotron 3 Ultra to inspect agent requests and synthesize policy rules in real time.
- How to stop an AI coding agent from running redis-cli flushall
An agent debugging a queue or resetting tests can run redis-cli flushall in seconds, wiping caches, jobs and user sessions across the instance. Here is how to lock down Redis and ask before dangerous commands run.
- Why prompt firewalls fail to protect production databases from AI agents
Most AI guardrails inspect prompt text before execution. At the database layer, that model falls apart. Here is why an agent claiming to update one row can silently change hundreds, and why verification must happen at the commit level.
- AI receptionists and booking bots in dental clinics: what can go wrong with your records
A booking bot answers the phone at 10 pm and changes your schedule and patient records. Here is what can go wrong, what the rules say, and a setup a small clinic can run.
- A dental clinic's checklist before letting an AI tool touch patient records
A few decisions before go-live save a lot of untangling later. A printable checklist for dentists and practice managers, from contract to the first bad day.
- AI agent governance in a hospital: a setup you can run with the staff you have
Governance frameworks tell hospitals what to care about. They don't say who meets on Tuesday. Here is a working setup for AI tools that write to hospital systems, mapped to NIST's AI RMF and India's guidance.
- AI scribes and the EHR: an audit trail that shows who drafted and who approved
An AI scribe drafts the note and may queue orders; a clinician signs. Months later, can you show which words came from the AI, who changed them and who approved? Here is what the trail needs.
- Reviewing AI scribe notes: a checklist built from the published error studies
AI scribes save typing, not responsibility. Studies show their errors cluster in a few places: omissions, made-up details and flipped negatives. Here is a review routine aimed at those, so a careful check doesn't take long.
- The AI vendor security questionnaire: what hospitals should add to the usual one
Hospital security questionnaires ask about encryption, hosting and access. AI tools that read and write clinical systems raise new questions. Here are 30, grouped, with what a good answer looks like.
- How to audit an MCP config: a ten-minute review, server by server
An MCP config file decides what your coding agent can change. Here is a checklist to review one, and a worked example where nine servers graded D became four that graded B.
- Claude Agent SDK permissions: canUseTool vs PreToolUse, and which one sees every call
The Claude Agent SDK gives you two places to check a tool call: the canUseTool callback and a PreToolUse hook. They run at opposite ends of the permission flow. Put a check in the wrong one and it never runs.
- Claude Code checkpoints and /rewind: what they undo, and what they leave behind
Claude Code takes a checkpoint before every prompt, and /rewind can put your files back. It covers less than the menu suggests. Here is what the docs say it tracks, what it skips, and what to use instead.
- Claude Code --dangerously-skip-permissions: what it skips and what still holds
The flag removes Claude Code's permission prompts. Not all of them, and not your deny rules. Here is exactly what bypass mode changes, what survives it, and how to run it with less risk.
- Cline auto-approve settings: what each toggle allows, and who decides what is safe
Cline's auto-approve is a set of per-category toggles, plus YOLO mode. The toggle that surprises people is Execute safe commands: Cline has no fixed list, so the model itself decides what counts as safe.
- Which migration commands delete your data? A table for 12 frameworks
Every ORM ships a reset command for development, and coding agents use them to get unstuck. Here is which commands destroy data, which ones don't, and what we tested.
- GitHub Copilot CLI permissions: --allow-tool, --deny-tool and the patterns behind them
Copilot CLI asks before it runs commands or writes files, unless you tell it not to. The flags that tell it are short and easy to get wrong. Here is how the patterns match, what wins, and where approvals persist.
- Cursor auto-run settings: the allowlist, permissions.json and sandbox.json, explained
Cursor's auto-run is now three run modes plus two config files. Each file controls a different thing, and mixing them up is how a broad allowlist entry ends up running a destructive command.
- Cursor checkpoints: what Restore Checkpoint undoes, what it misses, what to use instead
Cursor checkpoints snapshot the files an Agent changes, so you can roll back a bad edit. They're useful and narrow. Here is what they cover, what they don't, and the backups to keep.
- Da Vinci CRD, DTR and PAS: how the prior authorization guides fit together
CMS-0057-F points payers at three HL7 Da Vinci guides for prior authorization. Each does one job. Here is what CRD, DTR and PAS do, how a request flows through them, and where automation needs checks.
- One command adds a shell guard to Claude Code, Cursor, Codex, Gemini CLI and Copilot
Five coding agents, five hook formats. Here is what npx deedglass protect writes into each agent's config, what each agent does with an ask, and how to take it all out again.
- Django migrations and AI coding agents: which manage.py commands to allow
An agent that can run manage.py can run flush and migrate zero. Here is a workflow that lets it write migrations while a person reviews the SQL, and what a command check sees.
- The European Health Data Space, explained for health IT and software teams
The EHDS regulation is law, with the first obligations landing in 2027 and 2029. For EHR vendors and hospitals, it brings patient access dashboards, a logging component and new duties. Here is what the Commission says.
- FHIR delete vs expunge: what a DELETE really removes, and when data is gone for good
On most FHIR servers a DELETE is a soft delete: reads return 410 and search skips it, but history keeps the data. Expunge is the hard delete. Here is how they differ and who should hold each.
- AI-drafted orders and clinician sign-off: modelling it in FHIR R4
AI tools now draft orders for clinicians to sign. FHIR R4 already has the fields to keep a draft from being acted on. Here is how to use status, intent and requester so the sign-off is real and recorded.
- FHIR If-Match version conflicts: why you get 409 when the spec says 412
FHIR R4 says a stale If-Match gets 412 Precondition Failed. In our October 2026 study, all four server setups answered 409 instead. The write was refused either way. Here is how to handle both.
- FHIR PATCH with JSON Patch: five pitfalls, and how an agent should write patches
JSON Patch looks like the safe way for an agent to change one field. On FHIR resources full of arrays, it's easy to replace a whole list, edit the wrong entry, or skip validation. Here are the traps.
- How to run the GitHub MCP server safely: read-only, toolsets and lockdown
The GitHub MCP server's default toolsets include write tools. Three switches and one token setting cut it down to what your agent needs. Here is each one, for the local and the remote server.
- HIPAA breach notification and AI vendors: what counts, who tells whom, and by when
An AI tool sends a summary to the wrong patient, or a vendor's prompt logs leak. Is it a HIPAA breach, and whose clock starts when? Here is the rule, step by step, with AI cases.
- Do you need a business associate agreement for an AI tool? HIPAA, explained for AI
If an AI tool creates, receives, keeps or sends PHI for a covered entity, its vendor is usually a business associate and needs a BAA. Here is the rule, the required terms, and the AI-specific clauses worth adding.
- HIPAA de-identification for AI: the 18 safe harbor identifiers and where AI data trips
Teams building AI on health data often say the data is de-identified. Under HIPAA, that has a precise meaning: remove 18 kinds of identifier, or get an expert's documented determination. Here is the rule and the traps.
- HIPAA's minimum necessary standard for AI tools: send the model less
AI tools work better with more context, and HIPAA asks for the minimum necessary. The two pull in opposite directions. Here is when the rule applies to AI, when it doesn't, and how to design for it.
- HIPAA risk analysis for AI tools: a worked method with an example register
HIPAA requires an accurate and thorough risk analysis of everything that holds ePHI. AI tools add data flows and threats the usual template misses. Here is a method, with an example risk register for an AI scribe.
- Building an HL7 v2 to FHIR pipeline: stages, the HL7 mapping guide, and where agents fit
Most hospital data still moves as HL7 v2 messages. Converting them to FHIR takes five stages, with several places to lose data quietly. Here is the shape, the official mappings, and where agents fit.
- Incident response for AI errors in a hospital: a runbook for IT and governance
When an AI tool writes the wrong thing into a hospital system, the first hour decides how much damage spreads. Here is a runbook built on NIST's incident guidance, with the Indian and US reporting clocks.
- The information blocking rule: who it covers, what counts, and the exceptions
US health providers, networks and some health IT developers must not interfere with access to electronic health information without a reason the rule recognises. Here is the rule, its exceptions, and where AI tools fit.
- AI in cashless pre-authorisation: the audit trail insurers and hospitals should keep
IRDAI gives insurers one hour to decide a cashless request. AI is being used to meet that clock. When a decision is questioned later, these are the records that let anyone reconstruct what happened.
- IRDAI Information and Cyber Security Guidelines 2026: logs, reporting and changes
IRDAI replaced its 2023 cyber security guidelines in April 2026. If you run IT for an Indian insurer, TPA or broker, or sell software to one, here is what the new text asks for.
- Laravel migrations and AI coding agents: migrate yes, migrate:fresh no
An agent that hits Laravel's production prompt learns --force. One line in a service provider stops migrate:fresh and db:wipe whatever flag it adds. Here is the setup, tested.
- Linear MCP server security: read-only by URL, by scope or by key
Linear's MCP server can create and update issues, projects and comments by default. It also offers three ways to make it read-only. Here is each one, and which to pick.
- Malaffi, Abu Dhabi's health information exchange: what facilities and vendors need to know
Malaffi links nearly every healthcare facility in Abu Dhabi to one patient record. Connection is tied to licensing and claims. Here is what Malaffi's own pages say about joining, security and access to sensitive data.
- MCP Toolbox for Databases security: what to configure before an agent touches your data
MCP Toolbox for Databases gives agents database tools from a YAML file. Its safest mode is the one most quick starts skip. Here is what each mode allows, and the settings that matter.
- A MongoDB read-only user for an AI agent, and the MCP server's read-only mode
MongoDB's readWrite role can drop collections. Here is a user an agent can't write with, a role that can write but not drop, and the MCP server flag that hides write tools.
- NABIDH, Dubai's health information exchange: what DHA's standards ask of software
NABIDH connects Dubai's public and private healthcare facilities. If you build or run software for a DHA-licensed facility, its standards shape your interfaces, consent handling and audit logs. Here is what DHA's documents say.
- The NAIC model bulletin on AI: what insurers and their vendors need to have ready
The NAIC's 2023 model bulletin is the closest thing US insurance has to a common AI rulebook. It asks for a written program and lists the documents a regulator may request. Here is what the text says.
- Notion MCP server security: what an agent can read, change and trash
Connect Notion to a coding agent and it can do anything in Notion that you can. Here is what the hosted server's tools cover, how its delete confirmation works, and how to narrow the reach.
- NPHIES explained: how Saudi Arabia's eClaims exchange works, from its implementation guide
Private health insurance claims in Saudi Arabia go through NPHIES. If you build hospital billing, insurer or TPA software for the Kingdom, its FHIR guide sets the rules. Here is what it says.
- statement_timeout, lock_timeout and friends: timeouts for an AI agent's Postgres role
An agent that runs a slow query, waits on a lock or leaves a transaction open can stall a production database. Four Postgres timeouts on the agent's own role stop that. We ran each one, and found their limit.
- Prisma MCP server: what it can do, which tools are risky, and how to set it up safely
Prisma's remote MCP server lets an AI agent create databases, run SQL, restore backups and manage deployments. Prisma's own docs warn that its CLI safeguard doesn't apply to these tools. Here is the map.
- Rails migrations and AI coding agents: db:migrate yes, db:reset no
Rails has a built-in brake on destructive database tasks in production. An agent can release it with one environment variable. Here is how the brake works and what to add.
- Saudi PDPL and health data: what the law and its Implementing Regulation require
Saudi Arabia's Personal Data Protection Law gives health data its own article, and the Implementing Regulation adds specific controls. If you build or run health software in the Kingdom, here is what the texts say.
- Scan MCP and agent configs on every pull request with a GitHub Action
Someone adds a database MCP server for a demo and it ships. A check on the pull request catches it. Here is a free Action that grades agent config, comments the change and stays read-only.
- Sentry MCP server security: scope it to a project, keep the write skills off
Sentry's MCP server lets an agent read errors and traces, and with the right skills, resolve issues and edit alert rules. Here is how to give it the first without the second.
- AIHGle 2.0 explained: what Singapore's AI in healthcare guidelines ask of deployers
In March 2026 Singapore's MOH and HSA launched AIHGle 2.0, the update to the 2021 AI in Healthcare Guidelines. It splits duties between developers, deployers and users. Here is what the text says.
- Singapore's Health Information Act: NEHR contribution, access rules and penalties
Singapore passed its Health Information Bill in 2026 as the Health Information Act. It makes NEHR contribution compulsory and sets security duties for providers. Here is what MOH's own documents say.
- Slack MCP server security: the scopes each tool needs, and the ones to leave out
Slack's MCP server can search, read, post, create channels and upload files as the user who signed in. The scope list decides which. Here is the full map and three minimal sets.
- SMART Backend Services for AI agents: how an agent gets a FHIR token, and the gaps
An AI agent that works without a person logged in needs its own FHIR credentials. SMART Backend Services is the standard way. Here is how it works, how to scope it for an agent, and what it leaves to you.
- How to stop an AI coding agent deleting RDS databases and S3 buckets
A coding agent with your AWS profile can delete a database and its automated backups in one command. Here are four settings that make that hard, with the commands to turn each on.
- How to stop an AI coding agent deleting Docker volumes and the data in them
Your local Postgres lives in a Docker volume. An agent resetting a broken environment runs compose down -v and it's gone. Here is which commands delete volumes, what a guard catches, and what it misses.
- How to stop an AI coding agent from running kubectl delete namespace
One kubectl delete namespace removes everything in it, and a deleted claim can take the disk with it. Here is how to give an agent read access to a cluster without that power.
- How to stop an AI coding agent from running terraform destroy
An agent that can run terraform apply can run terraform destroy. Here are four layers that each stop it a different way, what each one misses, and the commands we tested.
- Running a synthetic-data pilot for AI in a hospital: a practical plan
Before an AI tool touches a real chart, a hospital can test how it writes, what it records and who approves what, on synthetic patients. Here is a plan, the measures that fit, and where synthetic data stops helping.
- What is TEFCA? The Common Agreement, QHINs and exchange purposes, explained
TEFCA is the US framework that lets health information networks exchange data under one agreement instead of hundreds. Here is how it's structured, what it can be used for, and what it means for AI tools pulling records.
- Where each AI client keeps its MCP config: paths, keys and secrets
Eight clients, at least twelve file locations, three different top-level keys. Here is one table of where each client reads MCP servers from, how it takes secrets, and how to limit tools.
- Which EHR writes should an AI agent need approval for? A tiering method
Approving every AI write wears reviewers out; approving none is reckless. Here is a way to sort EHR writes into five tiers by what they can affect and how hard they are to undo.
- Windsurf Cascade auto-execution: Turbo mode, allow lists, deny lists and hooks
Cascade can run terminal commands on its own at four levels, from Disabled to Turbo. The lists that steer it match by prefix, and a deny entry means ask, not block. Here is how each piece behaves.
- ABDM building blocks explained: ABHA, HFR, HPR, HIP, HIU and the consent manager
ABDM is a set of registries and gateways, not one app. Here is what each block does, how a record moves between hospitals with consent, and what a hospital's software has to handle.
- Your AI coding agent can read your .env file. Here's what stops it, and what doesn't.
A coding agent runs in your project with your permissions, so the keys in .env are within reach. Ignore rules help with the built-in file tools. Shell commands and scripts are another matter.
- AI agent framework guardrails compared: where nine frameworks let you stop a tool call
Every major agent framework has somewhere to check a tool call before it runs. They differ in what that check sees, whether it can block, and what it skips. One table, sourced to each framework's docs.
- Ayushman Bharat Digital Mission statistics, from official sources only
ABDM numbers get quoted everywhere, often without a date. These come only from PIB and health ministry documents, each with its date, so you can see the trend and cite it properly.
- How to benchmark an AI agent guardrail, including the one you sell
Most guardrail claims are demos. A benchmark needs ground truth the tool can't influence, scores that don't blur together, and cases the tool is expected to fail. Here is a method, and a harness you can reuse.
- The best Postgres MCP server depends on its brakes: five compared
Every Postgres MCP server can run SQL. They differ in how you narrow them: read-only modes, project scoping, confirmations and what their own docs say about production. Here are five, side by side.
- CERT-In's 2022 directions for hospitals: 6-hour reports, 180-day logs and clock sync
CERT-In's April 2022 directions apply to body corporates and government organisations, so to many hospitals. Four of them change day-to-day IT: incident reports, logs, clocks and a named contact.
- A Claude Code hook that asks before DROP TABLE, migrate reset and rm -rf
Claude Code runs a PreToolUse hook before every Bash command. Here is a 14-line hook that asks first on destructive database and file commands, tested, plus the ways around it you should know.
- Claude Code managed settings: enforce agent guardrails across a team
Per-developer settings are suggestions; managed settings are policy. Claude Code applies them above every other level. Here's a starter policy for agent safety, where the file goes, and its honest limits.
- Claude Code permissions: how deny, ask and allow rules work, and when they don't
Claude Code checks deny rules first, then ask, then allow. That order is simple; what a rule actually covers is not. Here is the model, the public bug reports, and a test routine.
- Claude Code sandbox settings: what the sandbox covers, and what still runs outside it
Claude Code's sandbox is an OS-level boundary around shell commands. It's off by default, writes stay in the project when it's on, and reads don't. Here are the defaults, the settings and the gaps.
- CMS-0057-F and the prior authorization API: what it requires, and where automation fits
The CMS prior authorization rule sets decision deadlines from 2026 and a FHIR-based prior authorization API from 2027. If you build or automate prior authorization, here is what the fact sheet says, and what it means for records.
- Codex CLI sandbox and approval modes: what each one allows, tested on macOS
Codex CLI pairs two settings: a sandbox that limits what commands can touch, and an approval policy that decides when it asks you. We read the docs and ran the sandbox to see what it actually blocks.
- GitHub Copilot preToolUse hooks: how they decide, and the edge cases that matter
Copilot's cloud agent and CLI can run a hook before every tool call. Its rules for exit codes, timeouts and ask are different from Claude Code's. Here they are in one table, with a hook we tested.
- CrewAI tool call hooks: how to block a tool call or ask a person first
CrewAI runs hooks before and after every tool call. A before hook can stop the call, change its input or ask a person in the terminal. Here's how each works, and three traps from the docs.
- Cursor agent deleted my files: what let it, and the settings that stop it
If a Cursor agent deleted files, the command almost always ran from the terminal without a prompt. Here is which settings cover that, which don't, and a small hook that asks first.
- Personal data breach notification for Indian hospitals: the 6-hour and 72-hour clocks
A breach at an Indian hospital can start two separate reporting clocks and a duty to tell every affected patient. Here is what each report must contain, with a worked timeline.
- AI vendors as Data Processors under DPDP: contracts, logs and erasure
An AI scribe, chatbot or coding agent handling patient data for a hospital is usually a Data Processor. The hospital stays responsible, so the contract and the logs have to carry the weight.
- The DPDP Rules 2025 for hospitals: what changes, and by when
Most DPDP duties start eighteen months after the November 2025 rules. For a hospital that means notices, safeguards, breach reporting and log retention by around May 2027. Here is the list, rule by rule.
- drizzle-kit push --force deleted data: why it happens and how to stop it
drizzle-kit push compares your schema with the database and applies the difference. With --force it accepts every statement that loses data, without asking. Here is what that means and a safer flow.
- How to dry-run an UPDATE before an AI agent commits it
Before an agent's UPDATE runs for real, you want to know how many rows it will change. EXPLAIN guesses. A rolled-back transaction counts exactly, with side effects you need to know about. Tested on PostgreSQL 18.
- How to enable logical replication on Supabase, Neon, RDS, Cloud SQL and Azure
Logical replication needs wal_level = logical, a role with REPLICATION and a slot someone reads. Each managed Postgres exposes those differently. Here is the setting, the restart and the disk trap for each.
- How to evaluate what an AI agent did, not what it said
The agent benchmarks researchers trust most share one idea: grade the effect on the system, not the agent's description of it. Here is how five benchmarks apply it, and a template to evaluate your own agent the same way.
- FHIR Bulk Data export security: one request, every patient, and where agents fit
Bulk Data export is the FHIR operation built for moving whole populations of records. That makes it the largest blast radius on a FHIR server. Here's how the flow works, what the spec requires, and an agent policy.
- Validating FHIR resources against a profile before an agent writes them
An AI agent that builds FHIR resources will sometimes build them wrong. You can catch that before the write, with the HL7 validator, a server's $validate operation, or rules on the server itself. Here's what each checks.
- Filesystem MCP server security: what allowed directories do, and how they were escaped
The filesystem MCP server keeps an agent inside the directories you list. In 2025 two advisories showed that boundary leaking through a name prefix and through symlinks. Here's the setup we'd use now.
- Gemini CLI trusted folders: keep a cloned repo from configuring your agent
A repository can ship settings, MCP servers and an .env that change how your coding agent behaves. Gemini CLI's trusted folders feature ignores all of that until you say the folder is yours. It's off by default.
- Gemini CLI yolo mode: what it auto-approves, and how to make it less dangerous
Yolo mode in Gemini CLI approves every action without asking. That's fine in a throwaway container and risky on your laptop. Here are the approval modes, the policy engine and the settings that narrow yolo.
- Google ADK before_tool_callback: tool-call guardrails, and when a plugin is better
In Google's Agent Development Kit, a before_tool_callback runs after the model asks for a tool and before the tool runs. Return None and it runs; return a dict and it doesn't. Plugins do the same for every agent.
- Validating FHIR writes in HAPI: request validation, repository validation, agents
When an AI agent writes to a HAPI FHIR server, you want malformed resources refused, not stored. HAPI offers two places to check. They differ in one way that matters for agents: PATCH.
- HIPAA audit controls and AI agents: what 164.312(b) asks, and what to record
HIPAA asks for mechanisms that record and examine activity in systems holding ePHI. It doesn't say what an AI agent's record should contain. Here is the rule's text, and a practical record design.
- India's AI Governance Guidelines (2025), read for hospitals and health-tech teams
India chose guidelines over a new AI law. They are voluntary, but they say what regulators will look for: human oversight, audit trails, incident reporting and extra safeguards in health.
- India's EHR Standards on audit trails: log every view, never overwrite, detect edits
India's EHR Standards ask more of audit logs than most systems do by default: record viewing, never overwrite a record, and detect any change to the logs themselves.
- LangGraph interrupt() or HumanInTheLoopMiddleware: which to use for tool approval
LangChain gives you two ways to pause an agent for a person: a ready-made middleware that reviews tool calls, and the lower-level interrupt() it's built on. They differ in effort and in one trap: nodes re-run on resume.
- How to let an AI agent write database migrations without letting it run them
Writing a migration is a good job for an agent. Running one against a shared database is not. Split the two, and most of the risk goes away. Here is the workflow, the review checklist and the guardrails.
- Securing a local MCP server: the Origin check, the Host check and DNS rebinding
Binding an MCP server to localhost doesn't keep web pages out. A page can reach it through the browser, and DNS rebinding makes that worse. Three checks close it; here they are, tested.
- Mastra tool approval: requireToolApproval, requireApproval and what happens on a crash
Mastra can pause an agent before a tool runs and wait for someone to approve or decline. It has two switches, a dynamic form that fails closed, and one requirement people miss: storage.
- MCP token passthrough and the confused deputy problem, explained
Two of the MCP spec's security rules are about tokens: never accept a token issued for someone else, and never let a proxy skip the user's consent. Here's what each attack looks like and what to check.
- MySQL point-in-time recovery with the binary log: undo one bad statement from an agent
An agent ran a DELETE or DROP on MySQL. If binary logging is on, which it is by default in 8.4, you can replay everything except that statement. Here's the procedure from MySQL's docs, step by step.
- A MySQL read-only user for an AI agent: grants, limits and the gaps
The safest MySQL connection for an AI agent or MCP server is a user that can only SELECT what the task needs. Here is the setup, statement by statement, and why server-wide read_only is a different tool.
- A Neon database branch per pull request: where an agent's changes meet data first
When an agent opens a pull request with a migration, the safest first run is on a copy of the data made for that pull request. Neon's GitHub Actions create, diff, reset and delete such branches.
- Is the Neon MCP server safe to use on production?
Neon's own docs say no: use its MCP server for development and testing. Here is what each setting narrows, what stays open, and how to give an agent Neon access without pointing it at production.
- NHCX explained: the claims flows, the FHIR bundles, and where AI fits
NHCX moves cashless claims between hospitals and insurers as FHIR bundles. If an AI tool helps build a pre-auth or a claim, here is what the bundle carries and what to check before it goes out.
- OpenAI Agents SDK human-in-the-loop: pausing a run for approval with needs_approval
The OpenAI Agents SDK can pause a run before a tool executes and wait for a person, even across a restart. Approvals also reach tools that guardrails skip, such as the shell and hosted MCP.
- OpenAI Agents SDK tool guardrails: how to use them on MCP tools, and what they skip
The OpenAI Agents SDK can check every tool call before it runs. That check covers function tools and local MCP servers, and skips hosted MCP, the shell tool and handoffs. Here is the map.
- Hide personal data columns from an AI agent with Postgres column grants
An agent often needs a customers table but not the email and phone columns in it. Postgres can grant single columns. We tested what the agent can and can't do with that.
- Postgres default privileges and an AI agent's role: new tables, granted or not
You grant an agent's role read access, a migration adds a table, and the agent either can't see it or can see too much. Postgres default privileges decide which. We ran both cases.
- Block DROP TABLE and ALTER TABLE for an AI agent's role with a Postgres event trigger
Sometimes an agent's role has to own tables, and owners can drop them. A Postgres event trigger can refuse that DDL for one role. We tested it, including the agent trying to switch it off, and found the gap.
- Postgres SET ROLE per user: making an AI agent query as the person it serves
An agent serving many users through one connection pool should see only the current user's rows. SET LOCAL ROLE plus a transaction-scoped setting does that, until the model can send the SET itself.
- Your Postgres view bypasses row-level security. Here's the fix.
Row-level security on a table doesn't follow it into a view by default. The view checks its owner's rights, not the caller's. A local test, the fix and an audit query.
- Pydantic AI tool approval: requires_approval and deferred tool results, tested
Pydantic AI handles approval by ending the run: the agent returns the pending calls instead of an answer, and a second run carries your decisions. We ran it with the built-in TestModel.
- Questions to ask an AI scribe or assistant vendor, before you sign
A demo shows you a good note. These questions show you what happens to patient data, who reviews the draft, what gets logged, and how you leave. Non-clinical, for doctors and clinic managers.
- rds_superuser and neon_superuser: what your agent inherits, and what to give it instead
Managed Postgres has no true superuser for you, but the admin role you do get is close. Connect an agent with it and the agent holds the same power. Here's what each provider's admin role carries.
- A replication slot is filling your disk with WAL: find it, cap it, drop it
A logical replication slot that nobody reads keeps every WAL file since it stopped. By default there's no limit. We reproduced it, capped it, and watched the slot get invalidated.
- An AI agent deleted data on Neon: restore the branch or copy rows back
Neon keeps a history of changes, so data an agent deleted is often minutes from recovery. The choice is between rolling the whole branch back and copying back only what was lost.
- How to restore one Postgres table to a point in time
PostgreSQL can't roll back one table by itself. You recover a side copy of the cluster to just before the bad statement, then copy that table's rows back. Here's the run, step by step.
- An AI agent deleted data in Supabase: how to get it back
Supabase can restore a backup over your project, but that rolls back everything written since. Usually it's better to restore beside production and copy back only the rows the agent deleted.
- Semantic Kernel function invocation filters as tool-call guardrails
In Semantic Kernel, a function invocation filter wraps every function call. Don't call next and the function never runs. We used that to hold large refunds for a person, and ran it.
- SMART on FHIR v2 scopes: how to give an AI agent only the access it needs
SMART App Launch 2 replaced read and write scopes with five letters: create, read, update, delete, search. Add a query filter and a scope can name one category of one resource. Here is the syntax and an agent-sized scope set.
- Stripe restricted keys for AI agents: let an agent handle refunds without a secret key
Stripe now has a way to hand an AI agent a key: a restricted key tagged for agent access, with approval rules on refunds and payouts by default. Here's a setup for a refund agent.
- Supabase branching for agent-written migrations: the merge button is the approval
Supabase can give every pull request its own instance, built from your repository's migrations, with no production data unless you add it. Merging then deploys to production automatically. That changes what reviewing an agent's PR means.
- The Supabase service_role key and AI agents: why it skips every policy
An AI agent holding a Supabase secret or service_role key reads and writes past every row-level security policy. Here is what the key is, a local test of the mechanism, and what to hand the agent instead.
- Vercel AI SDK tool approval: moving from needsApproval to toolApproval
The AI SDK's per-tool needsApproval flag is deprecated; approval now lives in a toolApproval setting on the call. We ran both against a mock model to see exactly when a tool executes.
- VS Code agent mode auto-approve: which terminal commands run without asking
VS Code's agent mode can run terminal commands with or without a prompt, decided by a few settings. Here's how the rules combine, the defaults, and why VS Code calls them a convenience, not a boundary.
- AI agent audit logs under India's DPDP Rules: what Rule 6 asks for
India's DPDP Rules ask for logs of who accessed personal data, kept for a year. An AI agent that reads or changes customer records is one more accessor, and its actions belong in those logs.
- An AI agent ran prisma migrate reset on production. What actually stops it?
Prisma has its own check for AI agents. We ran it inside Claude Code, then went around it three ways. One fix held every time: a database role that can't drop what it doesn't own.
- How to check agent records without our software
A signed audit log is only worth something if someone other than its writer can check it. Here is what an independent check covers, step by step, with three verifiers run on the same records.
- Hooks that block dangerous commands in Codex CLI, Gemini CLI, Copilot and Cursor
Each of these coding agents runs a hook of yours before a shell command. They differ on one thing that matters: whether the hook can ask you first, or only refuse.
- Is Supabase MCP safe? A 10-point setup checklist, and what read-only mode doesn't stop
Safe enough for development, if you set it up that way: one project, read-only, few tools, a person approving each call, and no secrets the session can reach.
- Lockdown mode for hospitals: how to make every AI agent write wait for a person
Some systems are too sensitive for rules alone. Lockdown is a pattern for them: every agent write waits for a person, the riskiest writes never run, and an unchecked result stops the agent until someone looks.
- AI agents are writing to patient records. Who checks what they changed?
AI in hospitals and insurers has moved from suggesting to writing. The hard question is no longer only what the AI said. It is what the record holds afterwards, and who can show it.
- Require approval for MCP tool calls: Claude Code, Cursor, then a gateway
Both clients can ask before a tool runs. Here is the configuration, a hook we tested, what each layer can't see, and the point where approvals belong outside the editor.
- A practical checklist before you let an AI agent near production
Twenty checks, grouped by what goes wrong. Most need no new tools, just SQL and a few decisions written down. Start with the first section; it finds most of the problems.
- MCP security checklist: what to check before an agent gets a tool
Twelve checks for any MCP server that touches real data, with the command or query that answers each. Most come down to what the server can reach, who can talk to it, and what reaches the model.
- How to give an AI agent safe Postgres access: the role, RLS and statement limits
Three layers, each tested on PostgreSQL 18.6 with the output below: what the agent may change, which rows, and for how long. Then the gap all three share when the agent writes its own SQL.
With Deedglass, in the docs
The same jobs with Deedglass doing the checking. The docs own the reference and the step-by-step setup.
- Scan in 60 seconds
Grade what your agents could change, A to F, from your configs and database role.
- Govern an MCP server
Put an existing MCP server behind rules with one wrapper in the client config.
- Block destructive SQL
Refuse DROP, TRUNCATE and unbounded writes before they reach the database.
- Scan every pull request
Run the scan in CI and fail a pull request when the grade drops.
Terms these guides use are in the glossary; what went wrong when nobody followed them is in AI agent incidents.