target / mmk-ui-api

UI, API, and Scanner (Rules Engine) services for Merry Maker
Apache License 2.0
122 stars 15 forks source link

scanner totalResponseSchema required field 'total' not being provided #55

Closed deckersdevsecops closed 2 years ago

deckersdevsecops commented 2 years ago

/scanner/src/rules/base.ts totalResponseSchema requires the field 'total', however responses from the backend on a couple of API calls are an empty set without the total provided. This has the effect of tests running, but not logging rules results properly.

Reproduced easily using a fresh docker-compose-all.yml and running a source with just a goto and htmlShapshot of www.target.com.

I bypassed it by removing 'total' from the required array on totalResponseSchema (icky). If I have time before the issue is resolved I'll dig through and submit a PR on the faulty API call(s).