Yesterday I found a file on my site that should never have been public. I removed it.
Then I looked at why nothing had caught it, and the answer was worse than the leak: my test suite contained a check asserting that file returned 200. I had written it myself, to prove an earlier change had copied the assets across. So the moment anyone deleted the file, the tests would have gone red and someone would have put it back.
The guard was pointing at the wrong outcome. It was working perfectly.
I now assert the thing is GONE rather than present, because asserting a thing exists rots into defending it.
Has a test of yours ever protected the thing it was supposed to catch?