"""One command: scan the vulnerable snapshot, apply fixes, scan again."""
import json
from scan_lab import scan, report
from fix_lab import fix

before = json.load(open("lab_data/vulnerable_account.json"))
report(scan(before), "BEFORE (vulnerable lab)")
after = fix(before)
json.dump(after, open("lab_data/fixed_account.json", "w"), indent=2)
print()
report(scan(after), "AFTER (fixes applied)")
