Strangers broke through our AI agent guardrails, and the lessons from that
見知らぬ人物が当社AIエージェントのガードレールを突破した。そこから得た教訓
An external developer rebuilt the environment according to the agent data access protection article previously published by the authors' team; after getting all of its tests to pass, the developer found three ways to read customer data while posing as another customer, and all three were confirmed by the authors through reproduction. The flaws included: row-level security was not enabled on the products table, so the low-stock tool therefore returned the product catalogs of two customers; Postgres built-in setting functions allowed the model, when writing SQL itself, to change the customer identifier mid-query and disable the timeout; and connections reused from the connection pool returned unset values as empty strings, so the query did not leak data but would crash, with whether it crashed depending on which connection was assigned. Based on this, the authors changed to having the system automatically enumerate the objects that need validation, testing guardrails under production conditions, and emphasized that agent permissions should be enforced on the system side outside the model, such as in the database, and that prompts are not a boundary.