mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Add basic test for SQL injection vs Jakarta Persistence
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import jakarta.persistence.EntityManager;
|
||||
|
||||
public class JakartaPersistence {
|
||||
|
||||
public static String source() { return null; }
|
||||
|
||||
public static void test(EntityManager entityManager) {
|
||||
|
||||
entityManager.createNativeQuery(source()); // $ sqlInjection
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/mongodbClient:${testdir}/../../../../../stubs/springframework-5.8.x:${testdir}/../../../../../stubs/apache-hive --release 21
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/mongodbClient:${testdir}/../../../../../stubs/springframework-5.8.x:${testdir}/../../../../../stubs/apache-hive:${testdir}/../../../../../stubs/jakarta-persistence-api-3.2.0 --release 21
|
||||
|
||||
Reference in New Issue
Block a user