zap-extensions icon indicating copy to clipboard operation
zap-extensions copied to clipboard

openapi: Use the Spider add-on when available

Open kingthorin opened this issue 3 years ago • 7 comments

  • 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]

kingthorin avatar Aug 01 '22 00:08 kingthorin

The typo is also in the commit message.

thc202 avatar Aug 01 '22 07:08 thc202

This pull request introduces 1 alert when merging 8eac604e8eec6e1996b966386a1f3ea911887387 into 3660172eb2a3c3c54e3f9ff67a02ce76e184b123 - view on LGTM.com

new alerts:

  • 1 for Dereferenced variable may be null

lgtm-com[bot] avatar Aug 01 '22 14:08 lgtm-com[bot]

I believe the LGTM thing is an FP and the null guard there can likely go away.

kingthorin avatar Aug 01 '22 14:08 kingthorin

The extension can be null there, when disabled.

thc202 avatar Aug 01 '22 15:08 thc202

This pull request introduces 1 alert when merging d28ec889755278e3c0957de585692627998b95af into 3660172eb2a3c3c54e3f9ff67a02ce76e184b123 - view on LGTM.com

new alerts:

  • 1 for Dereferenced variable may be null

lgtm-com[bot] avatar Aug 01 '22 17:08 lgtm-com[bot]

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

kingthorin avatar Aug 04 '22 02:08 kingthorin

Thanks for the test fix, I'll get back to that other part this evening.

kingthorin avatar Aug 04 '22 11:08 kingthorin

I hope/think I finally got this done.

kingthorin avatar Aug 20 '22 00:08 kingthorin

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>

kingthorin avatar Aug 20 '22 17:08 kingthorin

Done

kingthorin avatar Aug 20 '22 19:08 kingthorin

Thank you!

thc202 avatar Aug 20 '22 19:08 thc202