Expand|Select|Wrap|Line Numbers
- ECHO prime clean
- sourceanalyzer -b prime -clean
- ECHO prime translate
- sourceanalyzer -b prime %1 -debug -verbose -logfile prime.log -Dcom.fortify.sca.Phase0HigherOrder.Languages=python,ruby,javascript
- ECHO prime show files
- sourceanalyzer -b prime -show-files> files_prime
- ECHO prime scan
- sourceanalyzer -b prime -logfile prime.scan -scan -f prime.fpr
- ECHO prime upload to SSC
- fortifyclient -url http://Fortify/ssc -authtoken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx uploadFPR -file prime.fpr -project prime-upload -version version-1.0
Expand|Select|Wrap|Line Numbers
- $Appname = "Fortify Command Line Scanner"
- $src = "src/**/*.js"
- Write-Host $Appname
- ForEach ($Item in $args){
- $ThePath = $Item
- $ChildPath = Split-Path $ThePath -Leaf
- $ParPath = Split-Path $ThePath -Parent
- Write-Host "Processing Application located at $ThePath"
- Write-Host "Cleaning"
- sourceanalyzer -b $ChildPath -clean
- Write-Host "Translation"
- sourceanalyzer -b $ChildPath $ThePath$src -debug -verbose -logfile + $ChildPath.log -Dcom.fortify.sca.Phase0HigherOrder.Languages=python,ruby,javascript
- Write-Host "Show Files"
- sourceanalyzer -b $ChildPath -show-files> + files_$ChildPath
- Write-Host "Scanning"
- sourceanalyzer -b $ChildPath -logfile + $ChildPath.scan -scan -f + $ChildPath.fpr
- Write-Host "Uploading to SSC"
- fortifyclient -url http://Fortify/ssc -authtoken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx uploadFPR -file $ChildPath.fpr -project $ChildPath -upload -version version-1.0
- }
Expand|Select|Wrap|Line Numbers
- Translation
- sourceanalyzer : [error]: No parameter specified for argument -logfile
- At C:\powershell\FortifyCLS.ps1:31 char:4
- + sourceanalyzer -b $ChildPath $ThePath$src -debug -verbose -logfile $ChildPath ...
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: ([error]: No par...gument -logfile:String) [], RemoteException
- + FullyQualifiedErrorId : NativeCommandError
- HP Fortify Static Code Analyzer 6.40.0089 (using JVM 1.8.0_45)
- HP Fortify Static Code Analyzer 6.40.0089
- Copyright (c) 2003-2015 Hewlett Packard Enterprise Development LP
- For command-line help, type 'sourceanalyzer -h'
- sourceanalyzer -b sampleOutput C:\Program Files\HP_Fortify\HP_Fortify_SCA_and_Apps_4.40\Samples\basic\sampleOutputsrc/**/*.js -debug -verbose -logfile sampleOutput.log -D
- com.fortify.sca.Phase0HigherOrder.Languages=python,ruby,javascript
- Show Files
- sourceanalyzer : [error]: Unrecognized or invalid command line argument '-show-files>'
- At C:\powershell\FortifyCLS.ps1:35 char:4
- + sourceanalyzer -b $ChildPath -show-files> files_$ChildPath
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: ([error]: Unreco... '-show-files>':String) [], RemoteException
- + FullyQualifiedErrorId : NativeCommandError
- HP Fortify Static Code Analyzer 6.40.0089
- Copyright (c) 2003-2015 Hewlett Packard Enterprise Development LP
- For command-line help, type 'sourceanalyzer -h'
- sourceanalyzer -b sampleOutput -show-files> files_sampleOutput
- Scanning
- sourceanalyzer : [error]: No parameter specified for argument -logfile
- At C:\powershell\prime.ps1:39 char:4
- + sourceanalyzer -b $ChildPath -logfile $ChildPath.scan -scan -f $ChildPath.fpr
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: ([error]: No par...gument -logfile:String) [], RemoteException
- + FullyQualifiedErrorId : NativeCommandError