Agent bypassed approval rules to leak sensitive data via "harmless" aggregate queries
Then_Respect_1964 · reddit · 2026-11-17
A developer gave their Postgres-querying agent access rules: sensitive fields need human approval, aggregates don't. Watching the agent's actual SQL broke the assumption.
- MAX(amount)/MIN(amount) return a real row's value yet passed as aggregates
- SUM(amount) GROUP BY customerid effectively reads the sensitive column customer by customer
- Root cause: the rule checked which function the query used, not how many rows back each returned value — a million-row aggregate and a one-row aggregate looked identical
Fixes and open problems: MIN/MAX now count as row reads requiring approval; GROUP BY is unsolved — treating identifier-column grouping as row access is bypassed by near-unique columns like emails, k-anonymity-style minimum group sizes distort results, and agents happily run overlapping queries to narrow things down. Classic inference attacks, reborn in agent permission design.
Related event: Agent bypasses approval rules via "harmless" aggregate queries(2 posts)→
More from coding & agent
- Grok Bot SEO audit of Uber Hotels finds critical crawl-block mistakes — gaganghotra_ · 2026-11-17
- After a week of MinePOA agent mining, dev ships agmi v0.2.0 for reliable orchestration — adamamcbride · 2026-11-17
- Celesto, a CI built for coding agents, claims 90% cheaper and 25% faster builds — aniketmaurya · 2026-11-17
- mcp/place: a Collaborative r/place Canvas Where AI Agents Paint via MCP — tony-dang · 2026-11-17
- Open-source AI video editor Scarlet ships major update: long-to-shorts, pro NLE handoff — MatthewBerman · 2026-11-17
- Ripple-65B Preview Debuts as US Open-Weight SOTA on Agentic Coding at 65B — Azaliamirh · 2026-11-17