What I suggested would allow it to fix the issues. Just not write a test that was directly usable as a security exploit.
This doesn't stop attackers from being able to leverage the analysis. But it does make the tool more useful for defenders than attackers. Which is the best that you can hope for from a useful tool.