Update CWE-918 model coverage for Apache HttpClient execute sinks#21804
Update CWE-918 model coverage for Apache HttpClient execute sinks#21804
execute sinks#21804Conversation
Agent-Logs-Url: https://github.com/github/codeql/sessions/bd4fa112-dbc3-47e8-9cef-9b1b13c7e549 Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com>
Request sinks
|
(1) Please delete your current changes on this branch. (2) Please update java/ql/lib/ext/org.apache.http.client.model.yml to: (3) Please add tests for the models in that file. Look at the other SSRF tests in java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java for an example to follow. You will have to add stubs and add the path to them in the file java/ql/test/query-tests/security/CWE-918/options . Look at that file to see where the stubs should be located. You can look at existing stubs to see what they should be like. |
Agent-Logs-Url: https://github.com/github/codeql/sessions/3db201db-a1b5-4353-a94a-14a8d156dd3b Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com>
Done in 043ec85. I removed the previous fluent-only test/stub changes, updated Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Request sinksexecute sinks
Replaces the earlier fluent-
Requestfocused changes with targeted SSRF model updates and regression tests fororg.apache.http.client.HttpClient#executesinks.What this addresses
java/ql/lib/ext/org.apache.http.client.model.ymlto cover all requestedrequest-forgerysink overloads forHttpClient.execute(...).// $ Sourceand// $ Alertexpectations).Model updates
HttpClient.execute(HttpHost, HttpRequest)HttpClient.execute(HttpHost, HttpRequest, HttpContext)HttpClient.execute(HttpHost, HttpRequest, ResponseHandler)HttpClient.execute(HttpHost, HttpRequest, ResponseHandler, HttpContext)HttpClient.execute(HttpUriRequest)HttpClient.execute(HttpUriRequest, HttpContext)HttpClient.execute(HttpUriRequest, ResponseHandler)HttpClient.execute(HttpUriRequest, ResponseHandler, HttpContext)Test coverage added
java/ql/test/query-tests/security/CWE-918/ApacheHttpClientExecuteSSRF.javaHttpClient.executeoverloads listed above.Stub + test configuration updates
java/ql/test/stubs/apache-http-client-4.4.13/org/apache/http/client/HttpClient.javajava/ql/test/stubs/apache-http-client-4.4.13/org/apache/http/client/ResponseHandler.javajava/ql/test/query-tests/security/CWE-918/optionsto include${testdir}/../../../stubs/apache-http-client-4.4.13.Replaced previous branch content
java/ql/test/query-tests/security/CWE-918/ApacheHttpFluentSSRF.javajava/ql/test/stubs/apache-http-fluent-4.5.14/org/apache/http/client/fluent/Request.javaExample from new test
Original prompt
Created from VS Code.