Git keeps what you give it. A password committed on Tuesday and deleted on Wednesday is still in the history, and once it's pushed it's on your code host too. So the useful moment to catch a secret is before the commit, which is also the moment an agent working quickly is least likely to stop and think about it. In the Agents dashboard, a possible secret in a task's changes now holds the task at three places until it's gone.
Where it stops
When an agent finishes a turn, the task's Checks tab runs Secrets on the lines the task changed. It sits with Syntax and Types, the checks a merge waits for. If it finds something, the row shows failed with the file, the line and the kind of secret, the agent is sent the finding to fix while it's still on the task, and the task can't merge until the check passes. The same scan runs when a task's changes are committed and when they're pushed. A commit is refused if the lines being committed hold a possible secret. A push is refused if any commit that hasn't been pushed yet holds one, including a secret that a later commit removed, because the push would publish it anyway. This covers direct development as well as tasks.
What counts as a secret
The scan looks for the key and token formats a secret scanner knows, and for two things that show up in agent work. One is a password inside a URL, such as a database connection string, which doesn't look like an API key and can pass a scanner's default rules. The other is a file whose name is itself a connection string, which happens when a tool mistakes a database URL for a file path. Obvious placeholders like password or changeme are left alone. Nothing here ever shows the value: the Checks tab, the message to the agent and a refused commit or push all name the file, the line and the rule.
When it isn't a secret
A scanner will sometimes flag a public identifier or a test fixture that gives access to nothing. Add gitleaks:allow in a comment on that line and the scan skips it. The check's summary counts the changed lines marked that way, so whoever reviews the task sees that something was waved through. If your repository already has a .gitleaks.toml or a .gitleaksignore, the scan uses them, and it says so when a task changes either file.
What it doesn't do
It reads only what's changing. A secret that's already on your main branch won't hold up today's task, and it won't be found here either, so an old leak still needs a search of your history and a rotated key. It also matches patterns, which means a password that looks like an ordinary word can get past it. Security is still in Checks, and it still only warns: it now covers risky code patterns, and secrets have the row of their own.