Fortify scans the code to detect security vulnerabilities and sonar as well does that. Lets look at what are the differences between both

CategorySonarFortify
PurposeStatic code analysis tool which provides code quality report for duplicate code, code smells, security vulnerabilitiesStatic code analysis tool which provides report on security vulnerabilities that impact the application
LicenseFree to use (Community Edition) & have licensed as wellLicensed Software
Open SourceYesNo
Quality Rules CustomisationCan be doneCan’t be done
Quality MetricsCode Coverage, Security, Code Smells, Bugs, Duplicate code, Comments etcSecurity
Security Standards CoverageCWE, OWASP Top 10, SANS Top 25 – outdatedOWASP Top 10 , CWE/SANS Top 25, DISA STIG, and PCI DSS