openapi: Use the Spider add-on when available
- CHANGELOG > Added change note.
- Build file > Included spider extension and updated dependencies.
- Separated spider functionality into a static class which is now used by both spider parser implementations (core & add-on).
Part of zaproxy/zaproxy#3113
Signed-off-by: kingthorin [email protected]
The typo is also in the commit message.
This pull request introduces 1 alert when merging 8eac604e8eec6e1996b966386a1f3ea911887387 into 3660172eb2a3c3c54e3f9ff67a02ce76e184b123 - view on LGTM.com
new alerts:
- 1 for Dereferenced variable may be null
I believe the LGTM thing is an FP and the null guard there can likely go away.
The extension can be null there, when disabled.
This pull request introduces 1 alert when merging d28ec889755278e3c0957de585692627998b95af into 3660172eb2a3c3c54e3f9ff67a02ce76e184b123 - view on LGTM.com
new alerts:
- 1 for Dereferenced variable may be null
I'm not sure what to do about the test failure. It seems to have something to do with Model being set in the new tests. I'm not sure how to unset or reset it afterwards. I tried doing an aftereach nulling it but that didn't help.
I did encounter something similar on my dev box but there doing a "build project" before doing a "gradle test" seemed to resolve things.
Edit: assemble then test seems to work locally as well.
Edit 2: This seems to have started failing consistently when I addressed: https://github.com/zaproxy/zap-extensions/pull/3920#discussion_r937307172
Thanks for the test fix, I'll get back to that other part this evening.
I hope/think I finally got this done.
Updated:
modified: .../openapi/src/main/java/org/zaproxy/zap/extension/openapi/ExtensionOpenApi.java
modified: .../openapi/src/main/java/org/zaproxy/zap/extension/openapi/OpenApiSpider.java
modified: .../openapi/src/main/java/org/zaproxy/zap/extension/openapi/spider/ExtensionOpenApiSpider.java
modified: .../openapi/src/main/java/org/zaproxy/zap/extension/openapi/spider/OpenApiSpider.java
modified: .../openapi/src/main/java/org/zaproxy/zap/extension/openapi/spider/OpenApiSpiderFunctionality.java
modified: .../openapi/src/test/java/org/zaproxy/zap/extension/openapi/spider/OpenApiSpiderFunctionalityUnitTest.java
to use Supplier<ValueGenerator>
Done
Thank you!