mirror of
https://github.com/github/codeql.git
synced 2026-04-20 14:34:04 +02:00
Java: Deprecate the local content of UrlRedirectLocalQuery and remove the local query variant.
This commit is contained in:
@@ -7,13 +7,15 @@ private import semmle.code.java.security.UrlRedirect
|
||||
/**
|
||||
* A taint-tracking configuration to reason about URL redirection from local sources.
|
||||
*/
|
||||
module UrlRedirectLocalConfig implements DataFlow::ConfigSig {
|
||||
deprecated module UrlRedirectLocalConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink }
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `UrlRedirectFlow` instead and configure threat model sources to include `local`.
|
||||
*
|
||||
* Taint-tracking flow for URL redirection from local sources.
|
||||
*/
|
||||
module UrlRedirectLocalFlow = TaintTracking::Global<UrlRedirectLocalConfig>;
|
||||
deprecated module UrlRedirectLocalFlow = TaintTracking::Global<UrlRedirectLocalConfig>;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<include src="UrlRedirect.qhelp" /></qhelp>
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @name URL redirection from local source
|
||||
* @description URL redirection based on unvalidated user-input
|
||||
* may cause redirection to malicious web sites.
|
||||
* @kind path-problem
|
||||
* @problem.severity recommendation
|
||||
* @security-severity 6.1
|
||||
* @precision medium
|
||||
* @id java/unvalidated-url-redirection-local
|
||||
* @tags security
|
||||
* external/cwe/cwe-601
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.security.UrlRedirectLocalQuery
|
||||
import UrlRedirectLocalFlow::PathGraph
|
||||
|
||||
from UrlRedirectLocalFlow::PathNode source, UrlRedirectLocalFlow::PathNode sink
|
||||
where UrlRedirectLocalFlow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Untrusted URL redirection depends on a $@.", source.getNode(),
|
||||
"user-provided value"
|
||||
Reference in New Issue
Block a user