mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
- added unit tests for flow using inline format - removed grape from Arel tests (temporary)
26 lines
622 B
Plaintext
26 lines
622 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import ruby
|
|
import utils.test.InlineFlowTest
|
|
import PathGraph
|
|
import codeql.ruby.frameworks.Grape
|
|
import codeql.ruby.Concepts
|
|
|
|
module GrapeConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node source) {
|
|
source instanceof Http::Server::RequestInputAccess::Range
|
|
or
|
|
DefaultFlowConfig::isSource(source)
|
|
}
|
|
|
|
predicate isSink(DataFlow::Node sink) { DefaultFlowConfig::isSink(sink) }
|
|
}
|
|
|
|
import FlowTest<DefaultFlowConfig, GrapeConfig>
|
|
|
|
from PathNode source, PathNode sink
|
|
where flowPath(source, sink)
|
|
select sink, source, sink, "$@", source, source.toString()
|