Реализовать лабораторную 7: mTLS, OpenBao и защита worker
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"""Static graphs from measured incident repetitions, no invented data."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
root=Path(__file__).resolve().parents[1];r=json.loads((root/'evidence/compromise-research.json').read_text())['repeats']
|
||||
fig,axes=plt.subplots(1,2,figsize=(11,4))
|
||||
axes[0].bar([x['repeat'] for x in r],[x['recovery_seconds'] for x in r],color='#3577b8')
|
||||
axes[0].set(xlabel='Incident repetition',ylabel='Recovery, seconds',xticks=[1,2,3],title='Revoke, rotate and recover accepted jobs')
|
||||
axes[1].bar(['Broad baseline','Scoped worker'],[sum(r[0]['broad'].values()),sum(r[0]['least_privilege'].values())],color=['#bc5555','#408f6b'])
|
||||
axes[1].set(ylabel='Allowed probe operations / 14',title='Measured privilege reduction',ylim=(0,14))
|
||||
fig.tight_layout();fig.savefig(root/'evidence/compromise-results.png',dpi=150);plt.close(fig)
|
||||
print('Generated evidence/compromise-results.png from measured JSON')
|
||||
Reference in New Issue
Block a user