Files
codeql/go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql
2025-02-27 13:32:45 +00:00

25 lines
689 B
Plaintext

import go
import utils.test.InlineExpectationsTest
import experimental.frameworks.CleverGo
module HttpResponseBodyTest implements TestSig {
string getARelevantTag() { result = ["contentType", "responseBody"] }
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(Http::ResponseBody rd |
rd.getLocation() = location and
(
element = rd.getAContentType().toString() and
value = rd.getAContentType().toString() and
tag = "contentType"
or
element = rd.toString() and
value = rd.toString() and
tag = "responseBody"
)
)
}
}
import MakeTest<HttpResponseBodyTest>