Boavizta / cloud-scanner

📡 Get Boavizta impact data for your aws cloud account usage.
GNU Affero General Public License v3.0
32 stars 7 forks source link

Improve data validation when passing a json inventory #511

Open demeringo opened 4 months ago

demeringo commented 4 months ago

Problem

When passing a json inventory as input for evaluation, the data validation is very basic (it loads or not according to if it can be parsed into the correct struct).

The error message may not be helpful to the user.

Solution

Investigate a more elaborate validation (likely using / producing a json schema) and validating against it.

Alternatives

Additional context or elements

https://blog.logrocket.com/json-input-validation-in-rust-web-services/