Return a CIS or PCI compliance view as JSON.
(framework)
| 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 |
nothing calls this directly
no test coverage detected