MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / compliance_report_json

Function compliance_report_json

webapp_modern.py:6511–6524  ·  view source on GitHub ↗

Return a CIS or PCI compliance view as JSON.

(framework)

Source from the content-addressed store, hash-verified

6509
6510 if hostname:
6511 existing_hostnames = [h.strip() for h in row.get('Hostnames', '').split(';') if h.strip()]
6512 existing_hostnames.append(hostname)
6513 row['Hostnames'] = ';'.join(sorted(set(existing_hostnames)))
6514
6515 row['Alive'] = alive_value
6516 # CRITICAL: NEVER clear the Ports field here!
6517 # Ports are managed by scanning.py - we only update Alive/MAC/Hostname
6518 # Preserve existing ports to prevent data loss
6519 updated_row = row
6520 break
6521
6522 if updated_row is None:
6523 new_row = {header: '' for header in headers}
6524 new_row['IPs'] = ip
6525 new_row['Hostnames'] = hostname or ''
6526 if mac_to_store:
6527 new_row['MAC Address'] = mac_to_store

Callers

nothing calls this directly

Calls 6

build_cis_reportMethod · 0.95
build_pci_reportMethod · 0.95
ComplianceReporterClass · 0.90
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected