SQLGuard

Field note 06

Readonly flags are not receipts.

Appending ?mode=readonly or connecting as a SELECT-only role is excellent hygiene. The day you flip back to read-write, you still need a decision artifact for the allowed mutate.

Readonly defaults are how serious MCP authors ship. Disable execute, wrap SELECT in a read-only transaction, reject DDL. That prevents a whole class of accidents.

It does not create a trail for the intentional write. When a human or agent needs to run one UPDATE, the flag comes off — and the control surface often collapses to “the tool is enabled.”

Kill switch vs permission

A kill switch is binary. Permission is per-statement. You want both: default deny at the mode layer, then a verified PASS for the exception that must run.

If your only control is “readonly or not,” every allowed write looks the same in the incident review. Bind the exception.

If this is your write path

Use Challenge to feel a DENY, then Graduate when you need a paid authorize window. Standing teams: Gateway.