Closed asterictnl-lvdw closed 2 years ago
We believe the issue is a result of failing to define a delimiter character in the script. Delimiting on a comma character may result in unwanted behavior as some of the affected objects results return comma separated lists. We will work on a better method of exporting to the various formats.
For now is the workaround to disable the following lines:
$result | Add-Member -MemberType NoteProperty -name Finding -Value $finding.Description -ErrorAction SilentlyContinue
$result | Add-Member -MemberType NoteProperty -name AffectedObjects -Value $("$($finding.AffectedObjects)" | Out-String).Trim() -ErrorAction SilentlyContinue
$result | Add-Member -MemberType NoteProperty -name Remediation -Value $finding.Remediation -ErrorAction SilentlyContinue
$result | Add-Member -MemberType NoteProperty -name References -Value $($refs | Out-String) -ErrorAction SilentlyContinue
Those lines might have problems with the delimitation and or the objects exceeding more than 255 characters per column.
Looks good. Will test it out with the private version and report back the results.
~Leonardo
Describe the bug When you export to a CSV or XML, because of the column limit the Finding, AffectedObjects, Remediation and References property will bug the whole CSV file.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clean CSV file where you eventually could convert to colums by selecting the , delimiter.
Desktop (please complete the following information):
Additional context To make it work properly you can comment out the Finding, AffectedObjects, Remediation and References Add-Member scripts at both XML and CSV to get a clean .CSV file.