#049Guide4 min
Avoid reintroducing a vulnerability
Preserve the security rule behind a repair and check later changes against it.
Hackaiz team · updated 21/11/2026

01Turn the repair into a lasting requirement
A regression happens when a previously addressed weakness becomes possible again. It can return during a feature rewrite, a copied component, a policy replacement, or an update that restores an older implementation. Keep the security rule explicit in your development process. Instead of recording only “fixed access,” write that one customer must never retrieve another customer’s invoice by changing an identifier. That statement remains useful even if the route or user interface is redesigned.
Link the requirement to the original finding and to the source change your team accepted. Save a minimal test example with invented records rather than real customer data. These are practices for your own repository and review process; Hackaiz does not automatically turn every repair into a permanent application test. The aim is to preserve why the code exists, so that a later developer or coding assistant does not remove it as apparently unnecessary complexity.
02Test the forbidden path alongside normal behavior
Add a regression test to the project’s existing test suite. For a database policy, include the record owner, a different signed-in account, and an anonymous request where relevant. For a query repair, use parameter handling and verify that unusual input is treated as data rather than query syntax. Check that the useful feature still works too. A test that makes every request fail can hide a broken application rather than establish a correct authorization boundary.
Review the actual change when an AI rewrites nearby code. Ask it to preserve the security requirement, but do not treat that instruction as evidence that it did. Look for privilege checks moved into the browser, public variables used for secret provider keys, and commands assembled from uncontrolled text. Hackaiz has repository rules for exposed AI keys and variable-built shell commands, but a pattern detector cannot decide every application-specific permission rule. Human code review remains necessary.
03Use optional monitoring with the right expectations
On a project, the Monitor this project area provides the project monitoring context and the last automatic check information. Monitoring is optional and is only for connected systems. Decide whether to enable it as part of your own release process; it is not a protective barrier that intercepts bad code. A later observation can help your team notice a returning issue, but it does not undo a deployment or replace a test that should have blocked the change.
Keep scope comparable when following results over time. A repository scan of one version and a website analysis of another environment cannot be treated as identical tests. For any website or API analysis, domain control must first be proven with a DNS TXT record named _hackaiz, the HTTPS file /.well-known/hackaiz-verification.txt, or the project AI creating the file. Monitoring and other analysis work consume credits. Checks you untick are not executed or billed, so a deliberately excluded check is not continuing coverage.
04Respond when the original scenario returns
If the same issue appears again, compare the deployed revision and the original scenario before assigning a cause. The correction classifier treats a replay that is still present as regression and also prevents successful verification when automated tests fail. A network error or timeout, on the other hand, is not proof that the weakness returned; it can leave the result inconclusive. Investigate the evidence rather than inferring regression from a changed summary alone.
Use Fixes to distinguish Applied · verify from Verified and inspect Change details and validation for the affected change. A rescan alone does not verify a correction. Verified repair needs resolved replay evidence, passing continuous-integration tests, and a deployment matching the corrected commit. If a new proposal is needed, it remains a draft GitHub pull request requiring human review and approval, never an automatic merge. After repairing the regression, strengthen the test that failed to prevent it instead of merely restoring the old code.
Frequently asked questions
Take the next step
Was this article helpful?