Classport: Designing Runtime Dependency Introspection for Java

· Source: cs.SE updates on arXiv.org · Field: Technology & Digital — Software Development & Engineering, Cybersecurity & Data Privacy, Emerging Technologies & Innovation · Depth: Expert, extended

Summary

Classport, a novel system, addresses the critical lack of runtime dependency introspection in Java, a capability fundamental for Software Supply Chain security. It embeds dependency information, specifically Group ID, Artifact ID, and Version (GAV coordinates), directly into Java class files during the build process using bytecode instrumentation. This information is then retrieved at runtime via a Java agent. Evaluated on six real-world open-source Java projects, Classport successfully embedded all dependencies and class files, for example, 12 dependencies and 7,914 class files for PDFBox. The system introduced a moderate build time overhead ranging from 0.51 to 18.86 seconds and a disk space overhead of 10% to 29%. Runtime introspection accurately identified executed dependencies with a low overhead of 0.74% to 4.27% and preserved application functional correctness. Classport enables crucial use cases like runtime permissions per dependency and enhanced vulnerability detection.

Key takeaway

For Software Engineers managing Java application security, Classport provides crucial runtime dependency introspection, a feature previously unavailable. You can accurately identify which third-party libraries are actively used, enabling precise vulnerability management and the removal of unused dependencies to reduce attack surface. Consider integrating Classport to implement granular runtime permissions and enhance your software supply chain's integrity.

Key insights

Classport enables runtime dependency introspection in Java by embedding GAV metadata into class files and dynamically extracting it.

Principles

Method

Classport's Embedder uses a Maven plugin and ASM library to inject GAV coordinates as Java annotations into class files at build time. The Introspector, a Java agent, dynamically extracts these annotations during execution.

In practice

Topics

Code references

Best for: CTO, VP of Engineering/Data, Software Engineer, AI Security Engineer, Research Scientist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.