mirror of
https://github.com/github/codeql.git
synced 2026-02-23 02:13:41 +01:00
24 lines
615 B
Plaintext
24 lines
615 B
Plaintext
import codeql.ruby.AST
|
|
import TestUtilities.InlineExpectationsTest
|
|
import codeql.ruby.security.InsecureDependencyQuery
|
|
|
|
module InsecureDependencyTest implements TestSig {
|
|
string getARelevantTag() { result = "result" }
|
|
|
|
predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "result" and
|
|
value = "BAD" and
|
|
exists(Expr e |
|
|
insecureDependencyUrl(e, _) and
|
|
location = e.getLocation() and
|
|
element = e.toString()
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<InsecureDependencyTest>
|
|
|
|
from Expr url, string msg
|
|
where insecureDependencyUrl(url, msg)
|
|
select url, msg
|