Repository navigation
v0.2.1 — Wheel-Bundled Skill, Multi-Module Detector, Scanner Hardening & Boot 3.4 Rules
What's New in v0.2.1
A major reliability, accuracy, and rule-coverage hardening release fixing every P0/P1 edge case found during full codebase & edge-case auditing, plus new Java 16+ / Spring Boot 3.3–3.4+ rules.
P0 Reliability Fixes
- Wheel-Bundled Skill Assets: Bundled
skills/modern-java-guidanceinside the Python package (bundled_skill/viapackage-data), soinstall.sh(uv tool install/pip install) +mjg setupnow reliably installs skills for both Antigravity and Claude Code (.claude/skills/modern-java-guidance). - Gradle
JavaVersion.VERSION_1_8Fix: Fixed regex parsing so Gradle Java 8 projects are accurately detected as Java 8 (0 false positives) instead of falling back to Java 21. - Multi-Module Maven / Gradle & Maven BOM Support:
detect_project()now walks upward across child → parentpom.xml, Maven<dependencyManagement>BOM (spring-boot-dependencieswith${...}property resolution), and ancestorgradle/libs.versions.toml(including camelCase keys likespringBoot/javaVersion).
P1 Scanner & Hook Hardening
- String Literal & Text-Block Sanitization: Strips
//,/* ... */,"..."(properly handling escaped backslashes like"\\"),'...', and Java 15+"""..."""text blocks before scanning—eliminating false positives in log messages and docs. - Smart
BOOT-004(@Autowired) Detection: Distinguishes field injection (both multi-line and inline@Autowired private Foo foo;) from constructor/method@Autowired, and skips test files (src/test/,*Test.java,*IT.java). - Explicit
LocaleExclusion onJAVA-003:String.format(Locale.US, ...)no longer triggers false positives (full parity with Semgrep). - Multiline
BOOT-006Detection: Catches multiline.csrf()\n.disable()chains. - Inline Suppression & Smart Claude Hook Severity:
- Suppress intentional exceptions with
// mjg:ignore JAVA-010or// mjg:ignore(inline or preceding line). - Claude Code
PostToolUsehooks now hard-block ("decision": "block") only onerrorfindings and return non-blockingadditionalContextforwarning/info(pass--strictto block all). - Updated Antigravity hook matcher to include
write_file|edit_file.
- Suppress intentional exceptions with
P2 New Rules, Guides & CLI Polish
JAVA-001&BOOT-001Expanded: AddedCalendar.getInstance()andjavax.{inject,mail,xml.bind,ws.rs}.*(bothmjgand Semgrep).JAVA-004(Java 16+):.collect(Collectors.toList())→Stream.toList()(scanner + guide + Semgrep).BOOT-008(Spring Boot 3.4+): Deprecated@MockBean/@SpyBean→@MockitoBean/@MockitoSpyBean(scanner + guide + Semgrep).BOOT-009(Spring Boot 3.0+, build files): Flags incompatiblespring-cloud-starter-sleuth→ Micrometer Tracing + OpenTelemetry OTLP (#1).BOOT-010(Spring Boot 3.3+,Dockerfile): Flags unextracted fat-JARjava -jarcontainers →-Djarmode=tools ... extract, Buildpacks, or AppCDS (#1).- CLI Polish: Added
mjg --version/-Vand strict validation for invalid--bootvalues.
Verification
unittest(Python 3.11, 3.12, 3.13): 12/12 passed- A/B eval suite: 6/6 passed (100.0%, +83.3 pp, 0 false positives on Java 8 / Boot 2.7)
- Semgrep CI job (
44530722886):diff -uYAML sync,diff -rubundled skill sync,semgrep --validate(0 errors, 13 rules),semgrep --test(13/13 passed) - Wheel inspection (
uv build --wheel): verifiedmodern_java_guidance/bundled_skill/SKILL.mdandreferences/*.mdpackaged inside wheel.