September 2018
Intermediate to advanced
250 pages
8h 22m
English
But to make better sense of that json, we need to format it in a way that pulls out the critical info (for example, severity, description, and location) while leaving out noise (for example, dependency graphs). Let's use Python, which is great for string manipulation and general data munging, to write a script that formats that json into a plain text report. We'll call the script formatjs.py to associate it with our other tool. The first thing we need to do is pull in json from STDIN and encode it as a Python data structure:
#!/usr/bin/env python2.7import sys, jsondata = json.load(sys.stdin)
Our goal is to create a table to display the data from the report, covering the severity, summary, info, and file attributes ...
Read now
Unlock full access