From 271e9da3e7e482567fc6581b212bac41f5ac2580 Mon Sep 17 00:00:00 2001 From: Yangxl88 <75238236+Yangxl88@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:03:59 +0800 Subject: [PATCH] Delete .github/workflows/3.ql --- .github/workflows/3.ql | 46 ------------------------------------------ 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/3.ql diff --git a/.github/workflows/3.ql b/.github/workflows/3.ql deleted file mode 100644 index 9065068..0000000 --- a/.github/workflows/3.ql +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @kind path-problem - */ - -import java -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.dataflow.DataFlow -class Getter extends Method { - Getter() { this.getName().regexpMatch("get.+") } -} - -class Source extends Callable { - Source() { - this instanceof Getter and getDeclaringType().getASupertype*() instanceof TypeSerializable - } -} - -class GetConnectionMethod extends Method { - GetConnectionMethod() { - this.hasName("getConnection") and - this.getDeclaringType().hasQualifiedName("java.sql", "DriverManager") - } -} - -class DangerousMethod extends Callable { - DangerousMethod() { this instanceof GetConnectionMethod } -} - -class CallsDangerousMethod extends Callable { - CallsDangerousMethod() { - exists(Callable a | - this.polyCalls(a) and - a instanceof DangerousMethod - ) - } -} - -query predicate edges(Callable a, Callable b) { - a.polyCalls(b) -} - -from Source source, CallsDangerousMethod sink -where edges+(source, sink) -select source, source, sink, "$@ $@ to $@ $@", source.getDeclaringType(), - source.getDeclaringType().getName(), source, source.getName(), sink.getDeclaringType(), - sink.getDeclaringType().getName(), sink, sink.getName()