mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
This query finds cases where a potentially unsafe file is downloaded over an unsecured connection.
23 lines
771 B
Plaintext
23 lines
771 B
Plaintext
import ruby
|
|
import codeql.ruby.DataFlow
|
|
import PathGraph
|
|
import TestUtilities.InlineFlowTest
|
|
import codeql.ruby.security.InsecureDownloadQuery
|
|
|
|
class FlowTest extends InlineFlowTest {
|
|
override DataFlow::Configuration getValueFlowConfig() { result = any(Configuration config) }
|
|
|
|
override DataFlow::Configuration getTaintFlowConfig() { none() }
|
|
|
|
override string getARelevantTag() { result = "BAD" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "BAD" and
|
|
super.hasActualResult(location, element, "hasValueFlow", value)
|
|
}
|
|
}
|
|
|
|
from DataFlow::PathNode source, DataFlow::PathNode sink, Configuration conf
|
|
where conf.hasFlowPath(source, sink)
|
|
select sink, source, sink, "$@", source, source.toString()
|