Repository navigation
v0.2.0 — Semgrep Java AST Export & Compiler Overlap Clarity
What's New in v0.2.0
Driven by community feedback from r/SpringBoot, this release clarifies how mjg complements javac/IDEs and lets teams reuse the exact same version-gated rules in Semgrep CI pipelines.
Highlights
- Semgrep Java AST Ruleset (
rules/semgrep/modern-java-boot3.yaml):- Run directly without installing
mjg:semgrep --config https://raw.githubusercontent.com/wkd09/modern-java-guidance/main/rules/semgrep/modern-java-boot3.yaml . - Export a version-gated ruleset matched to your repo's
pom.xml/build.gradle(.kts):mjg export --format semgrep --path . -o .semgrep/modern-java.yaml
- All 11 rules are validated (
semgrep --validate) and unit-tested (semgrep --testagainstrules/semgrep/modern-java-boot3.java) in CI on every push.
- Run directly without installing
- Compiler (
javac) Overlap Metadata (caught_by_javac):- Every
Ruleand JSONFindingnow reportscaught_by_javac(no,compile-error,deprecated). - Documented clearly across English, Korean, and Chinese READMEs: 7 of 11 rules are completely silent in
javac(new Date(),RestTemplate,@Autowiredfield injection,Executors.newFixedThreadPool, etc.), while the other 4 catch breakages in ~31 ms inside the AI agent's edit loop before a 10–30 s Maven/Gradle build.
- Every
- Zero Third-Party Dependencies Preserved:
mjgstill runs on the Python 3.11+ standard library alone (exporters.pyemits valid YAML with zero external packages).
- Roadmap Opened:
- Tracked Spring Boot 3.x deployment (Layered JAR / AppCDS) and observability (Micrometer / OTLP) rules in #1.
Verification
unittest(Python 3.11, 3.12, 3.13): 7/7 passed- A/B eval suite: 6/6 passed (100.0%, +83.3 pp vs. unguided baseline, 0 false positives on Java 8 / Boot 2.7)
- Semgrep CI job:
diff -usync check,semgrep --validate(0 errors, 11 rules), andsemgrep --test(11/11 passed)