r/java • • 23h ago

Java RCE CVE-2026-114938

Thumbnail aikido.dev
234 Upvotes

r/java • • 22h ago

Calif discloses Java4Shell flaw in OpenJDK's Base64 decoder

Thumbnail runtimewire.com
109 Upvotes

r/java • • 6h ago

Java4Shell is a reason to use Java

Thumbnail mccue.dev
45 Upvotes

r/java • • 12h ago

Regex Parser for Static Analysis

Thumbnail google.github.io
3 Upvotes

This is a parser that I created a while back, in order to build some regex static analysis tools (detecting ReDos, validating supported regex features etc.).

I built it because I didn't find an OSS regex parser that produces and exposes the AST for custom analysis (the regex engines I looked at all keep their parser internal, and only execute the regex).

The parser supports advanced features such as back references, lookarounds, unicode properties, posix char classes, inline and global comment mode (a.k.a free-spacing mode) etc.

Using it with pattern matching is easy:

switch (RegexPattern.of("\\w+:\\d+")) {
  case Sequence(var elements) -> ...;
  case Alternation(var alternatives) -> ...;
  ...
  default -> ...;
}

To keep it simple, A few obscure features are omitted: such as \12 being parsed differently depending on the number of capture groups defined (\1 followed by literal 2 if no 12 capture groups are present).

The code is combinator-based, mostly pair-programmed by AI and me. It's actually what I built the dot-parse library for: to be able to have AI do the chores of generating readable parser for the wide surface area and arcane regex grammar rules; so I don't have to get a degree in regex.

It has served the purpose of static analysis well.

Feedbacks are welcome!

javadoc

repo