You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ehaines1 and then @tkol2022 noticed an issue with Invoke-ScubaCached where running the function on the same JSON file will eventually cause a System out of memory error as the file gets bigger and bigger.
A quick diff between subsequent JSON runs shows the under the protection_alerts key in the JSON (This is the output of Get-ProtectionAlert in the Defender provider code) gibberish text that gets longer and longer on each run. Seems exponential.
To reproduce
Run Invoke-ScubaCached with -ExportProvider $false on the same ScubaResults JSON.
This issues DOES NOT appear when running Invoke-ScubaCached -KeepProviderExport is used.
However, when trying to convert ProviderSettingsExport.json to ScubaResults.json this issue DOES appear.
The issue seems to revolve around the conversion of ProviderSettingsExport.json to ScubaResults.json.
Only thing I can think of is that ProviderSettingsExport.json is UTF-8 NoBOM by default and ScubaResults.json is still UTF-8 BOM
Expected behavior
For there to be no memory leaks caused by encoding errors.
Exact fix is undetermined at this time. Will need to dig into this further.
🐛 Summary
@ehaines1 and then @tkol2022 noticed an issue with
Invoke-ScubaCached
where running the function on the same JSON file will eventually cause a System out of memory error as the file gets bigger and bigger.A quick diff between subsequent JSON runs shows the under the
protection_alerts
key in the JSON (This is the output ofGet-ProtectionAlert
in the Defender provider code) gibberish text that gets longer and longer on each run. Seems exponential.To reproduce
Run Invoke-ScubaCached with
-ExportProvider $false
on the same ScubaResults JSON.This issues DOES NOT appear when running
Invoke-ScubaCached -KeepProviderExport
is used.However, when trying to convert
ProviderSettingsExport.json
toScubaResults.json
this issue DOES appear.The issue seems to revolve around the conversion of
ProviderSettingsExport.json
toScubaResults.json
.Only thing I can think of is that
ProviderSettingsExport.json
isUTF-8 NoBOM
by default and ScubaResults.json is stillUTF-8 BOM
Expected behavior
For there to be no memory leaks caused by encoding errors.
The text was updated successfully, but these errors were encountered: