def METHOD_NAME(json_source):
    """Format source with credentials and most recent connection scan.
    :param json_source: JSON source data from serializer
    :returns: JSON data
    """
    expand_credential(json_source)
    conn_job_id = json_source.pop("most_recent_connect_scan", None)
    if conn_job_id:
        scan_job = ScanJob.objects.get(pk=conn_job_id)
        json_scan_job = expand_scanjob_with_times(scan_job, connect_only=True)
        source_id = json_source.get("id")
        task_for_source = scan_job.tasks.filter(source=source_id).first()
        if task_for_source is not None:
            json_scan_job["source_systems_count"] = task_for_source.systems_count
            json_scan_job["source_systems_scanned"] = task_for_source.systems_scanned
            json_scan_job["source_systems_failed"] = task_for_source.systems_failed
            json_scan_job[
                "source_systems_unreachable"
            ] = task_for_source.systems_unreachable
        json_source["connection"] = json_scan_job
    return json_source