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
at New-Report,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\CreateReport\CreateReport.psm1:
line 66
at Invoke-ReportCreation,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1: line 1277
at Invoke-SCuBA,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1: line 440
at , C:\Users\Administrator\Documents\gcc1test.ps1: line 6
at , : line 1
At C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1:1371 char:13
at New-Report, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\CreateReport\Cre
ateReport.psm1: line 66
at Invoke-ReportCreation, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modu
les\Orchestrator.psm1: line 1277
at Invoke-SCuBA, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orche
strator.psm1: line 440
at , C:\Users\Administrator\Documents\gcc1test.ps1: line 6
at , : line 1
When reviewing the associated ScubaResults JSON file, it appears the risky_third_party_service_principals key has no value, resulting in the parsing error.
Steps to reproduce
Setup tenant environment where there may be one or more risky apps, but no risky SPs (if possible).
A very quick look at the code starting in ExportAADProvider.psm1:192 shows where the key value is set. It looks like it only considers when both SP and Apps values are null, and not if one or the other may be null.
Recommend looking at how the conditional handles one or the other being null as a possible code path that isn't covered and might result in null JSON values.
Prerequisites
ScubaGear Version
v1.5.0
Operating System
Windows 11
PowerShell Version
5.1
M365 Environment and License(s)
M365 Environment: GCC high
License Types:
🐛 Summary
When running ScubaGear, receive the following error running against a particular GCC high tenant environment.
Fatal Error involving the Report Creation.
Ending ScubaGear execution. Error: Invalid JSON primitive: .
at New-Report,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\CreateReport\CreateReport.psm1:
line 66
at Invoke-ReportCreation,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1: line 1277
at Invoke-SCuBA,
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1: line 440
at , C:\Users\Administrator\Documents\gcc1test.ps1: line 6
at , : line 1
At C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orchestrator.psm1:1371 char:13
Ending ScubaGear execution. Error: Invalid JSON primitive: .
at New-Report, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\CreateReport\Cre
ateReport.psm1: line 66
at Invoke-ReportCreation, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modu
les\Orchestrator.psm1: line 1277
at Invoke-SCuBA, C:\Users\Administrator\Documents\WindowsPowerShell\Modules\ScubaGear\1.5.0\Modules\Orche
strator.psm1: line 440
at , C:\Users\Administrator\Documents\gcc1test.ps1: line 6
at , : line 1
When reviewing the associated ScubaResults JSON file, it appears the
risky_third_party_service_principals
key has no value, resulting in the parsing error.Steps to reproduce
Expected behavior
ScubaGear should generate a complete report without errors.
Output from Initialize-SCuBA (optional)
No response
The text was updated successfully, but these errors were encountered: