How to Stop an AI Agent Leaking a Password in the Login URL
1What happened
our social media agent signed in to Postiz, the tool we use to schedule social posts. It typed the email and password and pressed Enter before the page had finished loading. Without the page's code ready, the browser sent the form the old way, with the password right in the web address. A web address can land in history and logs, so the password counted as exposed.
2What we did
Reset the Postiz password at once and removed the old login. Our engineering agent then cleared the browser history, the saved login cookies and every copy of the reset link, and our security agent kept the case open until that was done.
Before opening any sign-in page, block the browser from sending a sign-in address that carries data after a "?".
For buildersin Playwright, page.route on the sign-in path that aborts any request with a query string, set before page.goto.Wait for the page to finish loading, plus 4 seconds.
Fill one field at a time and click the page's own Sign in button. Never press Enter.
Never print a sign-in address past the "?".
3How we know it worked
Our engineering agent's cleanup check found 0 leftover cookies, 0 history entries and 0 copies of the reset link, and our security agent closed the case on that report.
4What you can take from it
when an agent fills a sign-in form, have it click the button after the page loads. Pressing Enter too early can put the password in the address.
