mirror of
https://github.com/github/codeql.git
synced 2026-02-24 02:43:40 +01:00
Attempt to use information-leak sink category
This commit is contained in:
@@ -79,6 +79,7 @@ private module Frameworks {
|
||||
private import semmle.code.java.frameworks.guava.Guava
|
||||
private import semmle.code.java.frameworks.jackson.JacksonSerializability
|
||||
private import semmle.code.java.security.ResponseSplitting
|
||||
private import semmle.code.java.security.InformationLeak
|
||||
private import semmle.code.java.security.XSS
|
||||
private import semmle.code.java.security.LdapInjection
|
||||
private import semmle.code.java.security.XPath
|
||||
|
||||
23
java/ql/src/semmle/code/java/security/InformationLeak.qll
Normal file
23
java/ql/src/semmle/code/java/security/InformationLeak.qll
Normal file
@@ -0,0 +1,23 @@
|
||||
/** Provides classes to reason about System Information Leak vulnerabilities. */
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.dataflow.ExternalFlow
|
||||
|
||||
/** CSV sink models representing methods not susceptible to XSS but outputing to an HTTP response body. */
|
||||
private class DefaultInformationLeakSinkModel extends SinkModelCsv {
|
||||
override predicate row(string row) {
|
||||
row =
|
||||
[
|
||||
"javax.servlet.http;HttpServletResponse;false;sendError;(int,String);;Argument[1];information-leak"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
/** A sink that represent a method that outputs data to an HTTP response. */
|
||||
abstract class InformationLeakSink extends DataFlow::Node { }
|
||||
|
||||
/** A default sink representing methods outputing data to an HTTP response. */
|
||||
private class DefaultInformationLeakSink extends InformationLeakSink {
|
||||
DefaultInformationLeakSink() { sinkNode(this, "information-leak") }
|
||||
}
|
||||
Reference in New Issue
Block a user