An independent, reproducible testing lab for evaluating CodeGuard AI, an AI-assisted code review tool.
This repository contains synthetic code samples, deliberately introduced defects, clean changes, regression scenarios, and testing documentation. The goal is to evaluate how CodeGuard handles real-world code review challenges without publishing private application source code.
- Security detection: Hardcoded secrets, SQL injection patterns, and other security-sensitive changes.
- Test quality: Missing tests, weak assertions, and tests that fail to verify important behavior.
- Impact analysis: Changes that may affect callers, dependent components, and existing functionality.
- Team rules: Whether configured coding standards and custom rules are enforced correctly.
- Dismissal safety: Whether dismissing a false positive accidentally hides a real finding.
- Merge policy: Whether unverified AI claims can block a merge and whether sensitive findings require human review.
- Docker integration: Whether isolated execution and supported test workflows behave as expected.
- Regression testing: Whether changes to detection rules, ranking, or suppression introduce new defects.
scenarios/
security/
test-quality/
impact-analysis/
team-rules/
dismissals/
merge-policy/
docker/
fixtures/
github-prs/
vulnerable-change/
clean-change/
results/
Directories will be populated as individual experiments are developed.
- Define the expected behavior before running a test.
- Use synthetic code and fake credentials only.
- Test both vulnerable changes and compliant changes.
- Record false positives, false negatives, and unexpected behavior.
- Keep test fixtures reproducible.
- Retest after every fix.
- Publish results honestly, including limitations and failures.
CodeGuard AI includes a labelled benchmark with three sets:
dev: cases used during development.heldout: cases reserved for checking changes outside the development set.gaps: known detection gaps that remain undetected until deliberately fixed.
The current benchmark contains 43 development cases, 12 held-out cases, and 6 known-gap cases. These are planted cases, not an independent sample of real pull requests, so their scores should not be presented as real-world accuracy.
The benchmark regression test is:
mvn -Dtest=BenchmarkRegressionTest testThis command is documentation for running tests in the CodeGuard project; it is not executed by this repository's README.
Each experiment should document:
- Test ID and feature
- Test setup and inputs
- Expected result
- Actual result
- Pass or fail
- Evidence and reproducibility notes
- Defects discovered and follow-up fixes
Never commit real API keys, access tokens, passwords, private customer data, or production secrets.
All intentionally vulnerable examples must use synthetic data and remain isolated from production systems.
This repository supports transparent development updates across GitHub, Indie Hackers, DEV Community, Contra, Instagram, and X.
Public posts will be based on actual test runs and verified evidence. A successful planted test does not, by itself, establish real-world detection accuracy.
This is a testing and documentation repository. It does not contain the complete CodeGuard AI application or establish that any particular feature is production-ready.
CodeGuard AI is evaluated through controlled experiments, regression tests, and progressively more realistic integration scenarios.