mirror of
https://github.com/github/codeql.git
synced 2026-01-03 17:50:19 +01:00
Gets rid of ``` PathNode is incompatible with PathNode (the type of the edge relation). ``` warnings.
24 lines
628 B
Plaintext
24 lines
628 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import ruby
|
|
import TestUtilities.InlineFlowTest
|
|
import TaintFlow::PathGraph
|
|
import codeql.ruby.frameworks.Sinatra
|
|
import codeql.ruby.Concepts
|
|
|
|
module SinatraConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node source) {
|
|
source instanceof Http::Server::RequestInputAccess::Range
|
|
}
|
|
|
|
predicate isSink(DataFlow::Node sink) { DefaultFlowConfig::isSink(sink) }
|
|
}
|
|
|
|
import FlowTest<DefaultFlowConfig, SinatraConfig>
|
|
|
|
from TaintFlow::PathNode source, TaintFlow::PathNode sink
|
|
where TaintFlow::flowPath(source, sink)
|
|
select sink, source, sink, "$@", source, source.toString()
|