You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feat: Auto-generate security regression tests for verified vulnerabilities #41
Extend OpenHack's existing vulnerability discovery, verification, and remediation pipeline to automatically generate permanent security regression tests. This is to ensure that vulnerabilities discovered and fixed by OpenHack cannot silently reappear following future code changes.
Proposed Feature
When OpenHack verifies a vulnerability, it should:
Identify the security invariant being violated (e.g., users must not access another user's private resources).
Generate an executable regression test using the repository's existing testing framework.
Validate the test by confirming it fails against vulnerable code and passes against the patched implementation.
Include the test in the remediation PR, allowing it to run automatically in CI/CD.
Optionally generate broader invariant tests to prevent related vulnerabilities, not just the original exploit.
Example
OpenHack discovers an IDOR vulnerability allowing User A to access User B's documents.
After remediation, OpenHack automatically adds a test verifying that cross-user document access is denied.
If a future refactor accidentally removes the authorization check, CI catches the regression before deployment.
Acceptance Criteria
Generate executable tests from verified vulnerabilities.
Support existing repository testing frameworks.
Verify tests fail before remediation and pass afterward.
Include generated tests in remediation PRs.
Ensure tests run independently without additional LLM inference.
Make regression test generation configurable.
Value
Transforms OpenHack from a tool that discovers and fixes vulnerabilities into one that continuously prevents previously discovered security failures from recurring, while reducing the need for repeated AI-powered scans.
Activity
Updated with fixes from Greptile feedback (openhackai#41)