Update Invoke-FortifyScan.ps1
This commit is contained in:
parent
6aed28ba8e
commit
b101443cfd
|
|
@ -21,22 +21,13 @@ function Invoke-VswhereDownload (
|
|||
try {
|
||||
$RepositoryRoot = [System.IO.Path]::GetFullPath($RepositoryRoot)
|
||||
|
||||
Invoke-VswhereDownload -Outfile "$PSScriptRoot\vswhere.exe"
|
||||
& "$PSScriptRoot\vswhere.exe" -version 16.0 -property installationPath > "$PSScriptRoot\vswhereproductpath.txt"
|
||||
$vspath = Get-Content -Path "$PSScriptRoot\vswhereproductpath.txt"
|
||||
$env:Path = "$env:Path;$vspath\MSBuild\Current\Bin\"
|
||||
|
||||
& sourceanalyzer -b $FortifyBuildId -clean -logfile "$PSScriptRoot\fortify-clean.txt"
|
||||
|
||||
& dotnet restore "$RepositoryRoot\contrib\oauth2-proxy_autocomplete.sln" -s "https://api.nuget.org/v3/index.json" --ignore-failed-sources
|
||||
|
||||
& dotnet restore "$RepositoryRoot\contrib\oauth2-proxy_autocomplete.sln"
|
||||
& sourceanalyzer -b $FortifyBuildId msbuild.exe "$RepositoryRoot\contrib\oauth2-proxy_autocomplete.sln" /t:rebuild /p:Configuration=Release /p:Platform="Any CPU" /p:TreatWarningsAsErrors=false
|
||||
|
||||
& sourceanalyzer -b $FortifyBuildId -Xmx8G -scan -f $FortifyFprPath -logfile "$PSScriptRoot\fortify-scan.txt"
|
||||
& sourceanalyzer -Xmx8G -b $FortifyBuildId "$RepositoryRoot\client"
|
||||
& sourceanalyzer -b $FortifyBuildId -show-files
|
||||
& sourceanalyzer -Xmx8G -b $FortifyBuildId -Dcom.fortify.sca.Phase0HigherOrder.Languages=javascript,typescript -scan -f $FortifyFprPath -logfile "$PSScriptRoot\fortify-scan.txt"
|
||||
|
||||
#Upload fpr reports to fortify server
|
||||
|
||||
Write-Output "Uploading '$FortifyFprPath' of '$FortifyProjectId' with version '$FortifyVersionId' to '$PublishURL'"
|
||||
& cmd /c fortifyclient.bat -url $PublishURL -authtoken $PublishAuthToken uploadFPR -file $FortifyFprPath -application $FortifyProjectId -applicationVersion "$FortifyVersionId"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue