Files
codeql/ruby/ql/test/library-tests/frameworks/grape/Flow.ql
Chad Bentz c5e3be2c4c Grape - detect params calls inside helper methods
- added unit tests for flow using inline format
- removed grape from Arel tests (temporary)
2025-09-16 17:09:18 -04:00

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()