11/**
22 * Provides a taint-tracking configuration for detecting "URL redirection" vulnerabilities.
33 *
4- * Note, for performance reasons: only import this file if `Configuration` is needed,
5- * otherwise `UrlRedirectCustomizations` should be imported instead.
4+ * Note, for performance reasons: only import this file if
5+ * `UrlRedirectConfig` is needed, otherwise
6+ * `UrlRedirectCustomizations` should be imported instead.
67 */
78
89private import codeql.ruby.AST
@@ -13,8 +14,9 @@ import UrlRedirectCustomizations::UrlRedirect
1314
1415/**
1516 * A taint-tracking configuration for detecting "URL redirection" vulnerabilities.
17+ * DEPRECATED: Use `UrlRedirectFlow`
1618 */
17- class Configuration extends TaintTracking:: Configuration {
19+ deprecated class Configuration extends TaintTracking:: Configuration {
1820 Configuration ( ) { this = "UrlRedirect" }
1921
2022 override predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
@@ -31,3 +33,20 @@ class Configuration extends TaintTracking::Configuration {
3133 UrlRedirect:: isAdditionalTaintStep ( node1 , node2 )
3234 }
3335}
36+
37+ private module UrlRedirectConfig implements DataFlow:: ConfigSig {
38+ predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
39+
40+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof Sink }
41+
42+ predicate isBarrier ( DataFlow:: Node node ) { node instanceof Sanitizer }
43+
44+ predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
45+ UrlRedirect:: isAdditionalTaintStep ( node1 , node2 )
46+ }
47+ }
48+
49+ /**
50+ * Taint-tracking for detecting "URL redirection" vulnerabilities.
51+ */
52+ module UrlRedirectFlow = TaintTracking:: Global< UrlRedirectConfig > ;
0 commit comments