Tutorial - Creating a Java Path checker
Prerequisite: Ant must be installed.
For this tutorial, we will create a Security Vulnerability (SV) checker named JNDI.PRINT. For more information about the types of Java Path checkers you can create, see Types of Java Path checkers. The process for creating a Java path checker is the same regardless of whether you are creating an SV, RLK, or common checker.
The snippet containing the issue we want to detect is in Sample1.java:
import javax.naming.*; public class Sample1 { public void test(final Context context) throws Exception { final NamingEnumeration<NameClassPair> enumeration = context.list("*"); System.out.println(enumeration ); } }