Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fortify command line usage

Has anyone used command line to run fortify? I tryin to incorporate fortify run in my CI build and I dont know how to do it.

like image 986
alice7 Avatar asked Oct 13 '10 15:10

alice7


People also ask

What is fortify used for?

Fortify Software Security Center: An AppSec platform that enables organizations to automate an application security program. It provides management, development, and security teams a way to work together to triage, track, validate, and manage software security activities.

What is the difference between Sonarqube and fortify?

Fortify essentially classifies the code quality issues in terms of its security impact on the solution. While Sonarqube is more of a Static code analysis tool which also gives you like "code smells," though Sonarqube also lists out the vulnerabilities as part of its analysis.


2 Answers

Since I can't add a comment, I'll have to offer this as an answer. Our company has integrated the scan process into our TFS build environment and it works pretty well.

We use a series of "Invoke Process" build activities to make this happen. The entire security scan sequence is wrapped in a conditional which is exposed as an argument to the build definition. This allows us to enable or disable scans as needed. We also expose a few other things like Fortify Project, Fortify Project Version, and another conditional for uploading the FPR file.

The gist of it is this:

Clean

sourceanalyzer -b "Build ID" -clean

Build

sourceanalyzer -b "Build ID" devenv BuildID.sln /Rebuild Debug /out "C:\SSCLogs\SSCBuild.log"

Scan

sourceanalyzer -b "Build ID" -scan -format fpr -f BuildID.fpr

Upload to SSC

fortifyclient.bat -url SSCServerUrl -authtoken XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX uploadFPR -file BuildID.fpr -project "MyProject" -version "MyProject v1.0.0"

If you'd like a full rundown and/or some screen captures, I'd be happy to provide something for you.

like image 81
Steve L. Avatar answered Oct 13 '22 14:10

Steve L.


The commands for a typical scan would look something like this.

  1. builds the code using

sourceanalyzer -b <build ID> <sourcecode>

  1. scans the build with

sourceanalyzer -b <build ID> -scan -f <test>.fpr

  1. (If you are using 360 server) uploads the result to fortify server with

fortifyclient uploadFPR -f <test>.fpr -project <projectname> -version <versionname> -urlhttps://fortify.com/f360 -user <username> -password <password> /// <authtoken>

However, I request help with the build labels. When we invoke SCA, we can assign a build label to it. However I am not sure what options to provide to the commands.

sourceanalyzer -b testid codebase -build-label <option>

If anyone know the format of the please do let me know.

like image 23
user2122786 Avatar answered Oct 13 '22 14:10

user2122786