wallarm / gotestwaf

An open-source project in Golang to asess different API Security tools and WAF for detection logic and bypasses
https://lab.wallarm.com/test-your-waf-before-hackers/
MIT License
1.54k stars 210 forks source link

OpenAPi swagger parser : unknown schema type: " #257

Open shadobot opened 3 weeks ago

shadobot commented 3 weeks ago

Hi, We have this error when we run gotestWaf with this swagger : outscale-no_oneof.txt

The attached file is an openAPI swagger file in yaml format

I don't see any error in swaggerHub could you please check the parser.

docker run --rm --network="host" -it -v ${PWD}/reports:/app/reports wallarm/gotestwaf --url=http://api.eu-west-2.outscale.com --openapiFile reports/outscale-no_oneof.yaml

INFO[0000] GoTestWAF started version=v0.5.5 ERRO[0000] caught error in main function error="couldn't create templates from OpenAPI file: couldn't parse request body schema: couldn't parse object: unknown schema type: "

Best regards

nergalex commented 5 days ago

Hi, I did the test, same issue:

# docker run --network="host" --rm -v /home/cyber/reports:/app/reports  -v ${PWD}/api.yaml:/app/api.yaml wallarm/gotestwaf --url=https://api.eu-west-2.outscale.com --noEmailReport --wafName Outscale --addHeader "goteswaf" --addDebugHeader --workers 1 --sendDelay 5 --openapiFile api.yaml
time="2024-09-30T12:47:58Z" level=info msg="GoTestWAF started" version=v0.5.5
time="2024-09-30T12:47:58Z" level=error msg="caught error in main function" error="couldn't create templates from OpenAPI file: couldn't parse request body schema: couldn't parse object: unknown schema type: "