azsk / ADOScanner-docs

Welcome to the documentation of ADO Security Scanner!
MIT License
64 stars 14 forks source link

pipeline failing because of Document size cannot be larger than 5244928B. Current size: 5289542B and ##[error]Unable to find type [VstsTaskSdk.TerminationException]. #78

Closed vikasrathi1987 closed 6 months ago

vikasrathi1987 commented 8 months ago

Hello,

The scanner was working fine, but the token was expired so we changed the token after that, we got the following error,

Sending scan report to extension storage Scan result will be save with id: Phoenix_BuildId_259586_20-12-2023-11-27-15 {"$id":"1","innerException":null,"message":"Document size cannot be larger than 5244928B. Current size: 5289542B. ","typeName":"Microsoft.VisualStudio.Services.ExtensionManagement.WebApi.MaximumDocumentSizeException, Microsoft.VisualStudio.Services.ExtensionManagement.WebApi","typeKey":"MaximumDocumentSizeException","errorCode":0,"eventId":3000} Cleaning logs from temp directory...

[error]Unable to find type [VstsTaskSdk.TerminationException].

[error]Exit code 1 returned from process: file name 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', arguments '-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". ([scriptblock]::Create('if ([Console]::InputEncoding -is [Text.UTF8Encoding] -and [Console]::InputEncoding.GetPreamble().Length -ne 0) { [Console]::InputEncoding = New-Object Text.UTF8Encoding $false } if (!$PSHOME) { $null = Get-Item -LiteralPath ''variable:PSHOME'' } else { Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1'')) ; Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1'')) }')) 2>&1 | ForEach-Object { Write-Verbose $_.Exception.Message -Verbose } ; Import-Module -Name 'c:\agents\1_work_tasks\ADOSecurityScanner_0f42e73b-1b51-41b9-8bd2-c1a864393316\1.5.7\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1' -ArgumentList @{ NonInteractive = $true } -ErrorAction Stop ; $VerbosePreference = 'SilentlyContinue' ; $DebugPreference = 'SilentlyContinue' ; Invoke-VstsTaskScript -ScriptBlock ([scriptblock]::Create('. ''c:\agents\1_work_tasks\ADOSecurityScanner_0f42e73b-1b51-41b9-8bd2-c1a864393316\1.5.7\ADOSecurityScannerSVTRuntime.ps1'''))"'.

Finishing: ADO Security Scanner

v-dpardeshi commented 6 months ago

Apologies for the inactivity on this thread. You encountered this error because it is a limitation of the ADO extension storage. However, to scan large projects and analyze the results, you can use our Continuous Assurance (CA) solution to obtain logs in Azure Log Analytics Workspace. Please refer to the link below for more information on the CA option. ADOScanner-docs/04-Running ADOScanner as Azure Function at master · azsk/ADOScanner-docs (github.com)