nareddyt / discover-rewards-notifier

A Chrome Extension that shows a notification when visiting sites that qualify for Discover® Deals or Cashback Rewards.
https://www.tejunareddy.com/discover-rewards-notifier/
GNU General Public License v3.0
6 stars 14 forks source link

Data schema validation in CircleCI builds #37

Open nareddyt opened 6 years ago

nareddyt commented 6 years ago

Due to the size of the json data files (for both discover deals and cashback rewards), it's hard to detect when the files are changed manually. For example, someone may accidentally delete a character in the file, making the file an invalid json. Or a malicious developer could add a link to their own website in a random deal, and then send a pull request with the modified data (claiming they updated the data with the latest discover data).

Our CircleCI build phase should parse the json data files and perform schema validation. If anything unexpected occurs, it should fail the build with an informative error message.

Example schema validations: