Java Analyzer (Scanner)

What it does

Inputs and precedence

  1. Installed archive inventory: parse Maven coordinates from META-INF/maven/**/pom.properties in each discovered archive.
  2. pom.xml fallback: when no pom.properties in the archive, parse META-INF/maven/**/pom.xml and emit a Maven PURL only when groupId, artifactId, and version are concrete (no placeholders like ${...}).
  3. Lock augmentation (current): when a lock entry matches an installed artifact, merge lock metadata onto the component; unmatched lock entries still emit declared-only components.
  4. Multi-module lock precedence (pending): deterministic precedence rules are tracked in SCAN-JAVA-403-003 (blocked).
  5. Runtime images (pending): runtime component identity is tracked in SCAN-JAVA-403-004 (blocked).

Embedded archives (fat JAR / WAR / EAR layouts)

The analyzer scans embedded library jars without extracting them to disk:

Locator format

Evidence locators are nested deterministically using ! separators:

Bounds and skip markers

Embedded scanning is bounded and deterministic:

When embedded scanning is skipped or truncated, the outer component metadata includes deterministic markers:

Embedded components include:

Evidence and hashing

pom.xml with incomplete coordinates

When pom.xml is present but coordinates are incomplete (missing values or ${...} placeholders), the analyzer emits an explicit-key component:

JNI metadata (bytecode-based)

JNI hints are derived from parsed bytecode (native method flags and load call sites), not raw ASCII scanning.

When bytecode analysis finds JNI edges (jni.edgeCount > 0), components are annotated with bounded, deterministic metadata:

Known limitations

References