MCPcopy
hub / github.com/guelfoweb/knockpy / _print_security_checks_table

Function _print_security_checks_table

knockpy/output.py:387–404  ·  view source on GitHub ↗
(verbose: Dict[str, Any])

Source from the content-addressed store, hash-verified

385
386
387def _print_security_checks_table(verbose: Dict[str, Any]) -> None:
388 security = verbose.get("security") or {}
389 checks = security.get("checks") or {}
390 if not checks:
391 return
392
393 evidence_map = _security_evidence_map(verbose)
394 table = _new_table(title="Security Checks", box_style=box.SIMPLE_HEAVY)
395 _add_3col_columns(table, "Check", "Level", "Summary")
396
397 for key, label in SECURITY_CHECK_ORDER:
398 item = checks.get(key)
399 if not isinstance(item, dict):
400 continue
401 summary = _merge_check_summary(key, item, evidence_map)
402 table.add_row(label, _level_tag(str(item.get("level") or "info")), summary)
403
404 console.print(table)
405
406
407def _build_verbose_context(item: Dict[str, Any]) -> Dict[str, Any]:

Callers 1

output_verboseFunction · 0.85

Calls 5

_security_evidence_mapFunction · 0.85
_new_tableFunction · 0.85
_add_3col_columnsFunction · 0.85
_merge_check_summaryFunction · 0.85
_level_tagFunction · 0.85

Tested by

no test coverage detected