<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ejohn20</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ejohn20"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Ejohn20"/>
		<updated>2026-04-26T12:08:34Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=246364</id>
		<title>Source Code Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=246364"/>
				<updated>2019-01-03T19:59:48Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: /* Commercial Tools Of This Type */ Minor updates to Puma Scan Professional description.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source code analysis tools, also referred to as Static Application Security Testing (SAST) Tools, are designed to analyze source code and/or compiled versions of code to help find security flaws. &lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
== Strengths and Weaknesses ==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
&lt;br /&gt;
* Scales well -- can be run on lots of software, and can be run repeatedly (as with nightly builds or continuous integration)&lt;br /&gt;
* Useful for things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, and so forth&lt;br /&gt;
* Output is good for developers -- highlights the precise source files, line numbers, and even subsections of lines that are affected&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
&lt;br /&gt;
* Many types of security vulnerabilities are difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. However, tools of this type are getting better.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your programming language, but not usually a key factor once it does.&lt;br /&gt;
* Types of vulnerabilities it can detect (out of the [[OWASP Top Ten]]?) (plus more?)&lt;br /&gt;
* How accurate is it? False Positive/False Negative rates?&lt;br /&gt;
** Does the tool have an OWASP [[Benchmark]] score?&lt;br /&gt;
* Does it understand the libraries/frameworks you use?&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* How hard is it to setup/use?&lt;br /&gt;
* Can it be run continuously and automatically?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
&lt;br /&gt;
==OWASP Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [[OWASP SonarQube Project]]&lt;br /&gt;
* [http://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project]&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]]&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
Disclaimer: &amp;lt;b&amp;gt;The tools listed in the tables below are presented in alphabetical order. &amp;lt;i&amp;gt;OWASP does not endorse any of the vendors or tools by listing them in the table below.&amp;lt;/i&amp;gt; We have made every effort to provide this information as accurately as possible. If you are the vendor of a tool below and think that this information is incomplete or incorrect, please send an e-mail to our mailing list and we will make every effort to correct this information.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Source or Free Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.openstack.org/wiki/Security/Projects/Bandit Bandit] - bandit is a comprehensive source vulnerability scanner for Python&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] - Brakeman is an open source vulnerability scanner specifically designed for Ruby on Rails applications&lt;br /&gt;
* [http://rubygems.org/gems/codesake-dawn Codesake Dawn] - Codesake Dawn is an open source security source code analyzer designed for Sinatra, Padrino for Ruby on Rails applications. It also works on non-web applications written in Ruby&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] - (Legacy - NOT Maintained - Use SpotBugs (see below) instead) - Find bugs (including a few security flaws) in Java programs&lt;br /&gt;
* [https://find-sec-bugs.github.io/ FindSecBugs] - A security specific plugin for SpotBugs that significantly improves SpotBugs's ability to find security vulnerabilities in Java programs. Works with the old FindBugs too,&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ Flawfinder] Flawfinder - Scans C and C++&lt;br /&gt;
* [https://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/ Google CodeSearchDiggity] - Uses Google Code Search to identifies vulnerabilities in open source code projects hosted by Google Code, MS CodePlex, SourceForge, Github, and more. The tool comes with over 130 default searches that identify SQL injection, cross-site scripting (XSS), insecure remote and local file includes, hard-coded passwords, and much more.  ''Essentially, Google CodeSearchDiggity provides a source code security analysis of nearly every single open source code project in existence – simultaneously.''&lt;br /&gt;
* [https://github.com/wireghoul/graudit/ Graudit] - Scans multiple languages for various security flaws.&lt;br /&gt;
* [https://lgtm.com/help/lgtm/about-lgtm LGTM] - A free for open source static analysis service that automatically monitors commits to publicly accessible code in: Bitbucket Cloud, GitHub, or GitLab. Supports C/C++, C#, COBOL (in beta), Java, JavaScript/TypeScript, Python&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] - PMD scans Java source code and looks for potential code problems (this is a code quality tool that does not focus on security issues)&lt;br /&gt;
* [https://github.com/designsecurity/progpilot Progpilot] - Progpilot is a static analyzer tool for PHP that detects security vulnerabilities such as XSS and SQL Injection.&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx PreFast] (Microsoft) - PREfast is a static analysis tool that identifies defects in C/C++ programs. Last update 2006.&lt;br /&gt;
* [https://pumascan.com/ Puma Scan] - Puma Scan is a .NET C# open source static source code analyzer that runs as an IDE plugin for Visual Studio and via MSBuild in CI pipelines.&lt;br /&gt;
* [https://dotnet-security-guard.github.io/ .NET Security Guard] - Roslyn analyzers that aim to help security audits on .NET applications. It will find SQL injections, LDAP injections, XXE, cryptography weakness, XSS and more.&lt;br /&gt;
* [http://rips-scanner.sourceforge.net/ RIPS] - RIPS is a static source code analyzer for vulnerabilities in PHP web applications. Please see notes on the sourceforge.net site.&lt;br /&gt;
* [https://github.com/FloeDesignTechnologies/phpcs-security-audit phpcs-security-audit] - phpcs-security-audit is a set of PHP_CodeSniffer rules that finds flaws or weaknesses related to security in PHP and its popular CMS or frameworks.  It currently has core PHP rules as well as Drupal 7 specific rules.&lt;br /&gt;
* [http://www.sonarqube.org/ SonarQube] - Scans source code for more than 20 languages for Bugs, Vulnerabilities, and Code Smells. SonarQube IDE plugins for Eclipse, Visual Studio, and IntelliJ provided by [http://www.sonarlint.org/ SonarLint].&lt;br /&gt;
* [https://spotbugs.github.io/ SpotBugs] - This is the active fork replacement for FindBugs, which is not maintained anymore.&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper (VCG)] - Scans C/C++, C#, VB, PHP, Java, and PL/SQL for security issues and for comments which may indicate defective code. The config files can be used to carry out additional checks for banned functions or functions which commonly cause security issues.&lt;br /&gt;
&lt;br /&gt;
==Commercial Tools Of This Type==&lt;br /&gt;
* [https://www.ptsecurity.com/ww-en/products/ai/ Application Inspector] (Positive Technologies) - combines SAST, DAST, IAST, SCA, configuration analysis and other technologies, incl. unique abstract interpretation; has capability to generate test queries (exploits) to verify detected vulnerabilities during SAST analysis; Supported languages include: Java, C#, PHP, JavaScript, Objective C, VB.Net, PL/SQL, T-SQL, and others. &lt;br /&gt;
* [https://www.ibm.com/us-en/marketplace/application-security-on-cloud Application Security on Cloud] (IBM) - Provides SAST, DAST and mobile security testing as well as OpenSource library known vulnerability detection as a cloud service. &lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ AppScan Source] (IBM)&lt;br /&gt;
* [http://www.blueclosure.com BlueClosure BC Detect] (BlueClosure) - Analyzes client-side JavaScript.&lt;br /&gt;
* [https://buguroo.com/products/bugblast-next-gen-appsec-platform/bugscout-sca bugScout] (Buguroo Offensive Security)&lt;br /&gt;
* [http://www.castsoftware.com/solutions/application-security/cwe#SupportedSecurityStandards CAST AIP] (CAST) Performs static and architectural analysis to identify numerous types of security issues. Supports over 30 languages.&lt;br /&gt;
* [https://www.codacy.com/ Codacy] Offers security patterns for languages such as Python, Ruby, Scala, Java, JavaScript and more. Integrates with tools such as Brakeman, Bandit, FindBugs, and others. (free for open source projects)&lt;br /&gt;
* [https://www.grammatech.com/products/codesonar CodeSonar] tool that supports C, C++, Java and C# and maps against the OWASP top 10 vulnerabilities.&lt;br /&gt;
* [http://www.contrastsecurity.com/ Contrast] (Contrast Security) - Contrast performs code security without actually doing static analysis. Contrast does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.coverity.com/products/code-advisor/ Coverity Code Advisor] (Synopsys)&lt;br /&gt;
* [https://www.checkmarx.com/technology/static-code-analysis-sca/ CxSAST] (Checkmarx)&lt;br /&gt;
* [http://www8.hp.com/us/en/software-solutions/static-code-analysis-sast/ Fortify] (Micro Focus, Formally HP)&lt;br /&gt;
* [http://www.juliasoft.com/solutions Julia] (JuliaSoft) - SaaS Java static analysis&lt;br /&gt;
* [http://www.klocwork.com/capabilities/static-code-analysis KlocWork] (KlocWork)&lt;br /&gt;
* [https://www.kiuwan.com/code-analysis/ Kiuwan] (an [http://www.optimyth.com Optimyth] company) - SaaS Software Quality &amp;amp; Security Analysis&lt;br /&gt;
* [http://www.parasoft.com/jsp/capabilities/static_analysis.jsp?itemId=547 Parasoft Test] (Parasoft)&lt;br /&gt;
* [https://pitss.com/products/pitss-con/ PITSS.CON] (PITTS)&lt;br /&gt;
* [https://www.ptsecurity.com/ww-en/products/ai/ PT Application Inspector] combines SAST, DAST, IAST, SCA, configuration analysis and other technologies, incl. unique abstract interpretation for high accuracy rate with minimum false positives; has a unique capability to generate special test queries (exploits) to verify detected vulnerabilities during SAST analysis; integrates with CI/CD, VCS, etc. PT AI helps to easily understand, verify, and fix flaws; has a simple UI; is highly automated and easy to use. Supported languages are Java, C#, PHP, JavaScript, Objective C, VB.Net, PL/SQL, T-SQL, and others.&lt;br /&gt;
* [https://pumascanpro.com/ Puma Scan Professional] - A .NET C# static source code analyzer that runs as a Visual Studio IDE extension, Azure DevOps extension, and Command Line (CLI) executable.&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio] (PVS-Studio) - For C/C++, C#&lt;br /&gt;
* [https://www.softwaresecured.com/reshift reshift] - A CI/CD tool that uses static code analysis to scan for vulnerabilities and use machine learning to give a prediction on false positives.&lt;br /&gt;
* [https://www.ripstech.com/ RIPS Code Analysis] (RIPS Technologies) - A SAST solution specialized for PHP that detects unknown security vulnerabilities and code quality issues.&lt;br /&gt;
* [https://www.synopsys.com/software-integrity/resources/datasheets/secureassist.html SecureAssist] (Synopsys) - Scans code for insecure coding and configurations automatically as an IDE plugin for Eclipse, IntelliJ, and Visual Studio etc. Supports (Java, .NET, PHP, and JavaScript)&lt;br /&gt;
* [https://www.whitehatsec.com/products/static-application-security-testing/ Sentinel Source] (Whitehat)&lt;br /&gt;
* [https://www.synopsys.com/software-integrity/products/interactive-application-security-testing.html Seeker] (Synopsys) Seeker performs code security without actually doing static analysis. Seeker does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis with simulated attacks. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.sourcepatrol.co.uk/ Source Patrol] (Pentest)&lt;br /&gt;
* [https://www.defensecode.com/thunderscan.php Thunderscan SAST] (DefenseCode)&lt;br /&gt;
* [http://www.veracode.com/products/binary-static-analysis-sast Veracode Static Analysis] (Veracode)&lt;br /&gt;
* [http://www.xanitizer.net Xanitizer] - Scans Java for security vulnerabilities, mainly via taint analysis. Free for academic and open source projects (see [https://www.rigs-it.com/xanitizer-pricing/]).&lt;br /&gt;
&lt;br /&gt;
==More info==&lt;br /&gt;
&lt;br /&gt;
* [[Appendix_A:_Testing_Tools | Appendix A: Testing Tools]]&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST's list of Source Code Security Analysis Tools]&lt;br /&gt;
* [[:Category:Vulnerability_Scanning_Tools | DAST Tools]] - Similar info on Dynamic Application Security Testing (DAST) Tools&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=246363</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=246363"/>
				<updated>2019-01-03T19:55:21Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: /* Commercial */ Minor language update to Puma Scan.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'.&amp;lt;sup&amp;gt;[0]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Software&lt;br /&gt;
! Language(s)&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:OWASP_Code_Crawler|OWASP Code Crawler]]&lt;br /&gt;
| .NET, Java&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:OWASP_Orizon_Project|OWASP Orizon Project]]&lt;br /&gt;
| Java&lt;br /&gt;
|-&lt;br /&gt;
| [[OWASP LAPSE Project]]&lt;br /&gt;
| Java&lt;br /&gt;
|-&lt;br /&gt;
| [[OWASP O2 Platform]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
| PHP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Software&lt;br /&gt;
! Language(s)&lt;br /&gt;
! OS(es)&lt;br /&gt;
|-&lt;br /&gt;
| [https://sourceforge.net/projects/agnitiotool/ Agnitio]&lt;br /&gt;
| ASP, ASP.NET, C#, Java, Javascript, Perl, PHP, Python, Ruby, VB.NET, XML&lt;br /&gt;
| Windows&lt;br /&gt;
|-&lt;br /&gt;
| [https://brakemanscanner.org/ Brakeman]&lt;br /&gt;
| Ruby, Rails&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/ Google CodeSearchDiggity]&lt;br /&gt;
| Multiple&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.devbug.co.uk DevBug]&lt;br /&gt;
| PHP&lt;br /&gt;
| web-based&lt;br /&gt;
|-&lt;br /&gt;
| [http://findbugs.sourceforge.net/ FindBugs]&lt;br /&gt;
| Java&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://find-sec-bugs.github.io/ Find Security Bugs]&lt;br /&gt;
| Java, Scala, Groovy&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://dwheeler.com/flawfinder/ FlawFinder]&lt;br /&gt;
| C, C++&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-3.0/bb429476(v=vs.80) Microsoft FxCop]&lt;br /&gt;
| .NET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://security-code-scan.github.io/ .NET Security Guard]&lt;br /&gt;
| .NET, C#, VB.net&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/FloeDesignTechnologies/phpcs-security-audit phpcs-security-audit]&lt;br /&gt;
| PHP&lt;br /&gt;
| Windows, Unix&lt;br /&gt;
|-&lt;br /&gt;
| [https://pmd.github.io/ PMD]&lt;br /&gt;
| Java, JavaScript, Salesforce.com Apex and Visualforce, PLSQL, Apache Velocity, XML, XSL&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.pumascan.com/ Puma Scan]&lt;br /&gt;
| .NET, C#&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms933794(v=msdn.10) Microsoft PREFast]&lt;br /&gt;
| C, C++&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://rips-scanner.sourceforge.net/ RIPS]&lt;br /&gt;
| PHP&lt;br /&gt;
| any&lt;br /&gt;
|-&lt;br /&gt;
| [https://sonarcloud.io/about SonarCloud]&lt;br /&gt;
| ABAP, C, C++, Objective-C, COBOL, C#, CSS, Flex, Go, HTML, Java, Javascript, Kotlin, PHP, PL/I, PL/SQL, Python, RPG, Ruby, Swift, T-SQL, TypeScript, VB6, VB, XML&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.splint.org/ Splint]&lt;br /&gt;
| C&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper]&lt;br /&gt;
| C/C++, C#, VB, PHP, Java, PL/SQL&lt;br /&gt;
| Windows&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Software&lt;br /&gt;
! Language(s)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.microfocus.com/en-us/products/static-code-analysis-sast/overview Fortify]&lt;br /&gt;
| ABAP/BSP, ActionScript/MXML (Flex), ASP.NET, VB.NET, C# (.NET), C/C++, Classic ASP (w/VBScript), COBOL, ColdFusion CFML, HTML, Java (including Android), JavaScript/AJAX, JSP, Objective-C, PHP, PL/SQL, Python, T-SQL, Ruby, Swift, Visual Basic, VBScript, XML&lt;br /&gt;
| OWASP Member&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.veracode.com/ Veracode]&lt;br /&gt;
| Android, ASP.NET, C#, C, C++, Classic ASP, COBOL, ColdFusion/Java, Go, Groovy, iOS, Java, JavaScript, Perl, PhoneGap/Cordova, PHP, Python, React Native, RPG, Ruby on Rails, Scala, Titanium, TypeScript, VB.NET, Visual Basic 6, Xamarin&lt;br /&gt;
| OWASP Member&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.grammatech.com/ CodeSonar]&lt;br /&gt;
| C, C++, Java&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.parasoft.com/ ParaSoft]&lt;br /&gt;
| C, C++, Java, .NET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;[http://www.armorize.com/codesecure/ Armorize CodeSecure]&amp;lt;/s&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
| OWASP Member; acquired by Proofpoint in 2013&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.checkmarx.com/ Checkmarx Static Code Analysis]&lt;br /&gt;
| Android, Apex, ASP.NET, C#, C++, Go, Groovy, HTML5, Java, JavaScript, JSP, .NET, Objective-C, Perl, PHP, PL/SQL, Python, Ruby, Scala, Swift, TypeScript, VB.NET, Visual Basic 6, Windows Phone&lt;br /&gt;
| OWASP Member&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.ibm.com/us-en/marketplace/ibm-appscan-source IBM AppScan Source]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.synopsys.com/software-integrity/security-testing/static-analysis-sast.html Coverity]&lt;br /&gt;
| Android, C#, C, C++, Java, JavaScript, Node.js, Objective-C, PHP, Python, Ruby, Scala, Swift, VB.NET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.viva64.com/en/pvs-studio/ PVS-Studio]&lt;br /&gt;
| C, C++, C#&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://pumascan.com/pricing/ Puma Scan Professional]&lt;br /&gt;
| .NET, C#&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.roguewave.com/products-services/klocwork/static-code-analysis Klocwork]&lt;br /&gt;
| C, C++, C#, Javaa&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.mathworks.com/products/polyspace.html Polyspace Static Analysis]&lt;br /&gt;
| C, C++, Ada&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [https://www.ripstech.com/ RIPS NextGen]&lt;br /&gt;
| PHP&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[0] {{cite web |url=http://www.software-supportability.org/Docs/00-55_Part_2.pdf |title=Requirements for Safety Related Software in Defence Equipment |date=August 1, 1997 |format=pdf |publisher=Ministry of Defence |access-date=December 17, 2018}}&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
Authorization Control&lt;br /&gt;
Authentication Control&lt;br /&gt;
Concurrency Control&lt;br /&gt;
Configuration Control&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
Encoding Control&lt;br /&gt;
Error Handling Control&lt;br /&gt;
Input Validation Control&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Appendix_A:_Testing_Tools&amp;diff=233889</id>
		<title>Appendix A: Testing Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Appendix_A:_Testing_Tools&amp;diff=233889"/>
				<updated>2017-09-29T18:07:59Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: /* Open Source / Freeware */ Added puma scan (open source) and puma scan pro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
==Open Source Black Box Testing tools==&lt;br /&gt;
&lt;br /&gt;
=== General Testing ===&lt;br /&gt;
* '''[https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project OWASP ZAP]'''&lt;br /&gt;
**The Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing.&lt;br /&gt;
**ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually.&lt;br /&gt;
* '''[[OWASP_WebScarab_Project|OWASP WebScarab]]'''&lt;br /&gt;
** WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is portable to many platforms. WebScarab has several modes of operation that are implemented by a number of plugins.&lt;br /&gt;
* '''[[OWASP_CAL9000_Project|OWASP CAL9000]]'''&lt;br /&gt;
** CAL9000 is a collection of browser-based tools that enable more effective and efficient manual testing efforts.&lt;br /&gt;
** Includes an XSS Attack Library, Character Encoder/Decoder, HTTP Request Generator and Response Evaluator, Testing Checklist, Automated Attack Editor and much more.&lt;br /&gt;
*  '''[[:Category:OWASP Pantera Web Assessment Studio Project|OWASP Pantera Web Assessment Studio Project]]'''&lt;br /&gt;
** Pantera uses an improved version of SpikeProxy to provide a powerful web application analysis engine. The primary goal of Pantera is to combine automated capabilities with complete manual testing to get the best penetration testing results.&lt;br /&gt;
* '''[[:OWASP Mantra - Security Framework]]'''&lt;br /&gt;
**Mantra is a web application security testing framework built on top of a browser. It supports Windows, Linux(both 32 and 64 bit) and Macintosh. In addition, it can work with other software like ZAP using built in proxy management function which makes it much more convenient. Mantra is available in 9 languages: Arabic, Chinese - Simplified, Chinese - Traditional, English, French, Portuguese, Russian, Spanish and Turkish.&lt;br /&gt;
* '''SPIKE''' - http://www.immunitysec.com/resources-freesoftware.shtml&lt;br /&gt;
** SPIKE designed to analyze new network protocols for buffer overflows or similar weaknesses. It requires a strong knowledge of C to use and only available for the Linux platform.&lt;br /&gt;
* '''Burp Proxy''' - http://www.portswigger.net/Burp/&lt;br /&gt;
** Burp Proxy is an intercepting proxy server for security testing of web applications it allows Intercepting and modifying all HTTP(S) traffic passing in both directions, it can work with custom SSL certificates and non-proxy-aware clients.&lt;br /&gt;
* '''Odysseus Proxy''' - http://www.wastelands.gen.nz/odysseus/&lt;br /&gt;
** Odysseus is a proxy server, which acts as a man-in-the-middle during an HTTP session. A typical HTTP proxy will relay packets to and from a client browser and a web server. It will intercept an HTTP session's data in either direction.&lt;br /&gt;
* '''Webstretch Proxy''' - http://sourceforge.net/projects/webstretch&lt;br /&gt;
** Webstretch Proxy enable users to view and alter all aspects of communications with a web site via a proxy. It can also be used for debugging during development. &lt;br /&gt;
*  '''WATOBO''' - http://sourceforge.net/apps/mediawiki/watobo/index.php?title=Main_Page&lt;br /&gt;
** WATOBO works like a local proxy, similar to Webscarab, ZAP or BurpSuite and it supports passive and active checks.&lt;br /&gt;
* '''Firefox LiveHTTPHeaders''' - https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/&lt;br /&gt;
** View HTTP headers of a page and while browsing.&lt;br /&gt;
* '''Firefox Tamper Data''' - https://addons.mozilla.org/en-US/firefox/addon/tamper-data/&lt;br /&gt;
** Use tamperdata to view and modify HTTP/HTTPS headers and post parameters&lt;br /&gt;
* '''Firefox Web Developer Tools''' - https://addons.mozilla.org/en-US/firefox/addon/web-developer/&lt;br /&gt;
** The Web Developer extension adds various web developer tools to the browser.&lt;br /&gt;
* '''DOM Inspector''' - https://developer.mozilla.org/en/docs/DOM_Inspector&lt;br /&gt;
**  DOM Inspector is a developer tool used to inspect, browse, and edit the Document Object Model (DOM)&lt;br /&gt;
* '''Firefox Firebug''' - http://getfirebug.com/&lt;br /&gt;
** Firebug integrates with Firefox to edit, debug, and monitor CSS, HTML, and JavaScript.&lt;br /&gt;
* '''Grendel-Scan''' - http://securitytube-tools.net/index.php?title=Grendel_Scan&lt;br /&gt;
** Grendel-Scan is an automated security scanning of web applications and also supports manual penetration testing.&lt;br /&gt;
*  '''OWASP SWFIntruder''' - http://www.mindedsecurity.com/swfintruder.html&lt;br /&gt;
** SWFIntruder (pronounced Swiff Intruder) is the first tool specifically developed for analyzing and testing security of Flash applications at runtime.&lt;br /&gt;
* '''SWFScan''' - http://h30499.www3.hp.com/t5/Following-the-Wh1t3-Rabbit/SWFScan-FREE-Flash-decompiler/ba-p/5440167 &lt;br /&gt;
** Flash decompiler&lt;br /&gt;
*  '''Wikto''' - http://www.sensepost.com/labs/tools/pentest/wikto&lt;br /&gt;
** Wikto features including fuzzy logic error code checking, a back-end miner, Google-assisted directory mining and real time HTTP request/response monitoring.&lt;br /&gt;
* '''w3af''' - http://w3af.org&lt;br /&gt;
** w3af is a Web Application Attack and Audit Framework. The project’s goal is finding and exploiting web application vulnerabilities.&lt;br /&gt;
* '''skipfish''' - http://code.google.com/p/skipfish/&lt;br /&gt;
** Skipfish is an active web application security reconnaissance tool.&lt;br /&gt;
* '''Web Developer toolbar''' - https://chrome.google.com/webstore/detail/bfbameneiokkgbdmiekhjnmfkcnldhhm&lt;br /&gt;
** The Web Developer extension adds a toolbar button to the browser with various web developer tools. This is the official port of the Web Developer extension for Firefox.&lt;br /&gt;
* '''HTTP Request Maker''' - https://chrome.google.com/webstore/detail/kajfghlhfkcocafkcjlajldicbikpgnp?hl=en-US&lt;br /&gt;
** Request Maker is a tool for penetration testing. With it you can easily capture requests made by web pages, tamper with the URL, headers and POST data and, of course, make new requests&lt;br /&gt;
* '''Cookie Editor''' - https://chrome.google.com/webstore/detail/fngmhnnpilhplaeedifhccceomclgfbg?hl=en-US&lt;br /&gt;
** Edit This Cookie is a cookie manager. You can add, delete, edit, search, protect and block cookies&lt;br /&gt;
* '''Cookie swap''' - https://chrome.google.com/webstore/detail/dffhipnliikkblkhpjapbecpmoilcama?hl=en-US&lt;br /&gt;
** Swap My Cookies is a session manager, it manages cookies, letting you login on any website with several different accounts. &lt;br /&gt;
* '''Firebug lite for Chrome&amp;quot;&amp;quot; -  https://chrome.google.com/webstore/detail/bmagokdooijbeehmkpknfglimnifench'''&lt;br /&gt;
**Firebug Lite is not a substitute for Firebug, or Chrome Developer Tools. It is a tool to be used in conjunction with these tools. Firebug Lite provides the rich visual representation we are used to see in Firebug when it comes to HTML elements, DOM elements, and Box Model shading. It provides also some cool features like inspecting HTML elements with your mouse, and live editing CSS properties&lt;br /&gt;
* '''Session Manager&amp;quot;&amp;quot; -  https://chrome.google.com/webstore/detail/bbcnbpafconjjigibnhbfmmgdbbkcjfi'''&lt;br /&gt;
**With Session Manager you can quickly save your current browser state and reload it whenever necessary. You can manage multiple sessions, rename or remove them from the session library. Each session remembers the state of the browser at its creation time, i.e the opened tabs and windows.&lt;br /&gt;
* '''Subgraph Vega''' - http://www.subgraph.com/products.html &lt;br /&gt;
**Vega is a free and open source scanner and testing platform to test the security of web applications. Vega can help you find and validate SQL Injection, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities. It is written in Java, GUI based, and runs on Linux, OS X, and Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Testing for specific vulnerabilities ===&lt;br /&gt;
&lt;br /&gt;
==== Testing for JavaScript Security, DOM XSS ====&lt;br /&gt;
* BlueClosure BC Detect - http://www.blueclosure.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing AJAX ====&lt;br /&gt;
* '''[[:Category:OWASP Sprajax Project|OWASP Sprajax Project]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing for SQL Injection ====&lt;br /&gt;
* '''[[:Category:OWASP_SQLiX_Project|OWASP SQLiX]]'''&lt;br /&gt;
* Sqlninja: a SQL Server Injection &amp;amp; Takeover Tool - http://sqlninja.sourceforge.net&lt;br /&gt;
* Bernardo Damele A. G.: sqlmap, automatic SQL injection tool - http://sqlmap.org/&lt;br /&gt;
* Absinthe 1.1 (formerly SQLSqueal) - http://sourceforge.net/projects/absinthe/&lt;br /&gt;
* SQLInjector - Uses inference techniques to extract data and determine the backend database server.  http://www.databasesecurity.com/sql-injector.htm&lt;br /&gt;
* Bsqlbf-v2: A perl script allows extraction of data from Blind SQL Injections - http://code.google.com/p/bsqlbf-v2/&lt;br /&gt;
* Pangolin: An automatic SQL injection penetration testing tool - http://www.darknet.org.uk/2009/05/pangolin-automatic-sql-injection-tool/&lt;br /&gt;
* Antonio Parata: Dump Files by sql inference on Mysql - SqlDumper - http://www.ruizata.com/&lt;br /&gt;
* Multiple DBMS Sql Injection tool - SQL Power Injector - http://www.sqlpowerinjector.com/&lt;br /&gt;
* MySql Blind Injection Bruteforcing, Reversing.org - sqlbftools - http://packetstormsecurity.org/files/43795/sqlbftools-1.2.tar.gz.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing Oracle ====&lt;br /&gt;
* TNS Listener tool (Perl) - http://www.jammed.com/%7Ejwa/hacks/security/tnscmd/tnscmd-doc.html&lt;br /&gt;
* Toad for Oracle - http://www.quest.com/toad &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Testing SSL ====&lt;br /&gt;
* Foundstone SSL Digger - http://www.mcafee.com/us/downloads/free-tools/ssldigger.aspx&lt;br /&gt;
* O-Saft - https://www.owasp.org/index.php/O-Saft&lt;br /&gt;
* sslyze - https://github.com/iSECPartners/sslyze&lt;br /&gt;
* TestSSLServer - http://www.bolet.org/TestSSLServer/&lt;br /&gt;
* SSLScan - http://sourceforge.net/projects/sslscan/&lt;br /&gt;
* SSLScan windows - https://github.com/rbsec/sslscan/releases&lt;br /&gt;
* SSLLabs - https://www.ssllabs.com/ssltest/&lt;br /&gt;
&lt;br /&gt;
==== Testing for Brute Force Password ====&lt;br /&gt;
* THC Hydra - http://www.thc.org/thc-hydra/&lt;br /&gt;
* John the Ripper - http://www.openwall.com/john/&lt;br /&gt;
* Brutus - http://www.hoobie.net/brutus/ &lt;br /&gt;
* Medusa - http://www.foofus.net/~jmk/medusa/medusa.html&lt;br /&gt;
* Ncat - http://nmap.org/ncat/&lt;br /&gt;
* HashCat - http://hashcat.net/hashcat/#features-algos&lt;br /&gt;
* fgdump - http://foofus.net/goons/fizzgig/fgdump/&lt;br /&gt;
* Password Dictionary - https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htm&lt;br /&gt;
&lt;br /&gt;
==== Testing Buffer Overflow ====&lt;br /&gt;
*  OllyDbg - http://www.ollydbg.de&lt;br /&gt;
** &amp;quot;A windows based debugger used for analyzing buffer overflow vulnerabilities&amp;quot;&lt;br /&gt;
* Spike - http://www.immunitysec.com/downloads/SPIKE2.9.tgz&lt;br /&gt;
** A fuzzer framework that can be used to explore vulnerabilities and perform length testing&lt;br /&gt;
* Brute Force Binary Tester (BFB) - http://bfbtester.sourceforge.net&lt;br /&gt;
** A proactive binary checker&lt;br /&gt;
* Metasploit - http://www.metasploit.com/&lt;br /&gt;
** A rapid exploit development and Testing frame work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fuzzer  ====&lt;br /&gt;
* '''[[:Category:OWASP_WSFuzzer_Project|OWASP WSFuzzer]]'''&lt;br /&gt;
* Wfuzz - http://www.darknet.org.uk/2007/07/wfuzz-a-tool-for-bruteforcingfuzzing-web-applications/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Googling ====&lt;br /&gt;
* Bishop Fox's Google Hacking Diggity Project - http://www.bishopfox.com/resources/tools/google-hacking-diggity/&lt;br /&gt;
* Foundstone Sitedigger (Google cached fault-finding) - http://www.mcafee.com/us/downloads/free-tools/sitedigger.aspx&lt;br /&gt;
* Google Hacking database - https://www.exploit-db.com/google-hacking-database/&lt;br /&gt;
&lt;br /&gt;
==== Slow HTTP ====&lt;br /&gt;
* Slowloris http://ckers.org/slowloris&lt;br /&gt;
* slowhttptest https://github.com/shekyan/slowhttptest&lt;br /&gt;
&lt;br /&gt;
==Commercial Black Box Testing tools==&lt;br /&gt;
* NGS Typhon III - http://www.nccgroup.com/en/our-services/security-testing-audit-compliance/information-security-software/ngs-typhon-iii/&lt;br /&gt;
* NGSSQuirreL - http://www.nccgroup.com/en/our-services/security-testing-audit-compliance/information-security-software/ngs-squirrel-vulnerability-scanners/&lt;br /&gt;
* IBM AppScan - http://www-01.ibm.com/software/awdtools/appscan/&lt;br /&gt;
* Trustwave App Scanner (Formerly Cenzic Hailstorm) - https://www.trustwave.com/Products/Application-Security/App-Scanner-Family/App-Scanner-Enterprise/ &lt;br /&gt;
* Burp Intruder - http://www.portswigger.net/burp/intruder.html&lt;br /&gt;
* Acunetix Web Vulnerability Scanner - http://www.acunetix.com&lt;br /&gt;
* Sleuth - http://www.sandsprite.com&lt;br /&gt;
* NT Objectives NTOSpider - http://www.ntobjectives.com/products/ntospider.php&lt;br /&gt;
* MaxPatrol Security Scanner - http://www.maxpatrol.com&lt;br /&gt;
* Ecyware GreenBlue Inspector - http://www.ecyware.com&lt;br /&gt;
* Parasoft SOAtest (more QA-type tool)- http://www.parasoft.com/jsp/products/soatest.jsp?itemId=101&lt;br /&gt;
* MatriXay - http://www.dbappsecurity.com/webscan.html&lt;br /&gt;
* N-Stalker Web Application Security Scanner - http://www.nstalker.com&lt;br /&gt;
* HP WebInspect - http://www.hpenterprisesecurity.com/products/hp-fortify-software-security-center/hp-webinspect&lt;br /&gt;
* SoapUI (Web Service security testing) - http://www.soapui.org/Security/getting-started.html&lt;br /&gt;
* Netsparker - http://www.mavitunasecurity.com/netsparker/&lt;br /&gt;
* SAINT - http://www.saintcorporation.com/&lt;br /&gt;
* QualysGuard WAS - http://www.qualys.com/enterprises/qualysguard/web-application-scanning/&lt;br /&gt;
* Indusface WAS- https://www.indusface.com/products/application-security/web-application-scanning&lt;br /&gt;
* Retina Web - http://www.eeye.com/Products/Retina/Web-Security-Scanner.aspx&lt;br /&gt;
&lt;br /&gt;
==Linux Distrubtion==&lt;br /&gt;
* PenTestBox  https://tools.pentestbox.com/&lt;br /&gt;
* Samurai https://sourceforge.net/p/samurai/wiki/Home/&lt;br /&gt;
* Santoku https://sourceforge.net/projects/santoku/&lt;br /&gt;
* ParrotSecurity https://sourceforge.net/projects/parrotsecurity/?source=navbar&lt;br /&gt;
* Kali https://www.kali.org/&lt;br /&gt;
* Matriux https://sourceforge.net/projects/matriux/?source=navbar&lt;br /&gt;
* BlackArch http://www.blackarch.org/downloads.html&lt;br /&gt;
* Cyborg Hawk Linux http://cyborg.ztrela.com/tools/&lt;br /&gt;
* PenToo http://www.pentoo.ch/download/&lt;br /&gt;
* bugtraq http://bugtraq-team.com/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Source Code Analyzers==&lt;br /&gt;
===Open Source / Freeware===&lt;br /&gt;
* [[:Category:OWASP_Orizon_Project|Owasp Orizon]]&lt;br /&gt;
* '''[[:Category:OWASP_LAPSE_Project|OWASP LAPSE]]''' &lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
* Boon - http://www.cs.berkeley.edu/~daw/boon&lt;br /&gt;
* FindBugs - http://findbugs.sourceforge.net&lt;br /&gt;
* Find Security Bugs - https://find-sec-bugs.github.io/&lt;br /&gt;
* FlawFinder - http://www.dwheeler.com/flawfinder&lt;br /&gt;
* Google CodeSearchDiggity - http://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/&lt;br /&gt;
* phpcs-security-audit - https://github.com/FloeDesignTechnologies/phpcs-security-audit&lt;br /&gt;
* PMD - http://pmd.sourceforge.net/&lt;br /&gt;
* Microsoft’s [[FxCop]]&lt;br /&gt;
* .NET Security Guard - https://dotnet-security-guard.github.io/&lt;br /&gt;
* Oedipus - http://www.darknet.org.uk/2006/06/oedipus-open-source-web-application-security-analysis/&lt;br /&gt;
* Puma Scan - https://pumascan.com&lt;br /&gt;
* Splint - http://splint.org&lt;br /&gt;
* SonarQube - http://sonarqube.org&lt;br /&gt;
* W3af - http://w3af.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Commercial ===&lt;br /&gt;
&lt;br /&gt;
* Armorize CodeSecure - http://www.armorize.com/index.php?link_id=codesecure&lt;br /&gt;
* Parasoft C/C++ test - http://www.parasoft.com/jsp/products/cpptest.jsp/index.htm&lt;br /&gt;
* Checkmarx CxSuite  - http://www.checkmarx.com&lt;br /&gt;
* HP Fortify - http://www.hpenterprisesecurity.com/products/hp-fortify-software-security-center/hp-fortify-static-code-analyzer&lt;br /&gt;
* GrammaTech - http://www.grammatech.com&lt;br /&gt;
* ITS4 - http://seclab.cs.ucdavis.edu/projects/testing/tools/its4.html&lt;br /&gt;
* Appscan - http://www-01.ibm.com/software/rational/products/appscan/source/&lt;br /&gt;
* ParaSoft - http://www.parasoft.com&lt;br /&gt;
* Puma Scan Professional - https://pumascanpro.com&lt;br /&gt;
* Virtual Forge CodeProfiler for ABAP - http://www.virtualforge.de&lt;br /&gt;
* Veracode - http://www.veracode.com&lt;br /&gt;
* Armorize CodeSecure - http://www.armorize.com/codesecure/&lt;br /&gt;
* Peach Fuzzer - http://www.peachfuzzer.com/&lt;br /&gt;
* Burp Suite - https://portswigger.net/burp/&lt;br /&gt;
&lt;br /&gt;
==Acceptance Testing Tools==&lt;br /&gt;
Acceptance testing tools are used to validate the functionality of web applications.  Some follow a scripted approach and typically make use of a Unit Testing framework to construct test suites and test cases.  Most, if not all, can be adapted to perform security specific tests in addition to functional tests.&lt;br /&gt;
* BDD Security - https://github.com/continuumsecurity/bdd-security&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open Source Tools===&lt;br /&gt;
&lt;br /&gt;
* WATIR - http://wtr.rubyforge.org&lt;br /&gt;
** A Ruby based web testing framework that provides an interface into Internet Explorer.&lt;br /&gt;
** Windows only.&lt;br /&gt;
* HtmlUnit - http://htmlunit.sourceforge.net &lt;br /&gt;
** A Java and JUnit based framework that uses the Apache HttpClient as the transport.&lt;br /&gt;
** Very robust and configurable and is used as the engine for a number of other testing tools.&lt;br /&gt;
* jWebUnit - http://jwebunit.sourceforge.net&lt;br /&gt;
** A Java based meta-framework that uses htmlunit or selenium as the testing engine.&lt;br /&gt;
* Canoo Webtest - http://webtest.canoo.com&lt;br /&gt;
** An XML based testing tool that provides a facade on top of htmlunit.&lt;br /&gt;
** No coding is necessary as the tests are completely specified in XML.&lt;br /&gt;
** There is the option of scripting some elements in Groovy if XML does not suffice.&lt;br /&gt;
** Very actively maintained.&lt;br /&gt;
* HttpUnit - http://httpunit.sourceforge.net&lt;br /&gt;
** One of the first web testing frameworks, suffers from using the native JDK provided HTTP transport, which can be a bit limiting for security testing.&lt;br /&gt;
* Watij - http://watij.com&lt;br /&gt;
** A Java implementation of WATIR.&lt;br /&gt;
** Windows only because it uses IE for its tests (Mozilla integration is in the works).&lt;br /&gt;
* Solex - http://solex.sourceforge.net&lt;br /&gt;
** An Eclipse plugin that provides a graphical tool to record HTTP sessions and make assertions based on the results.&lt;br /&gt;
* Selenium - http://seleniumhq.org/&lt;br /&gt;
** JavaScript based testing framework, cross-platform and provides a GUI for creating tests.&lt;br /&gt;
** Mature and popular tool, but the use of JavaScript could hamper certain security tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Tools==&lt;br /&gt;
&lt;br /&gt;
===Runtime Analysis===&lt;br /&gt;
&lt;br /&gt;
* Rational PurifyPlus - http://www-01.ibm.com/software/awdtools/purify/&lt;br /&gt;
* Seeker by Quotium - http://www.quotium.com/prod/security.php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Binary Analysis===&lt;br /&gt;
&lt;br /&gt;
* BugScam IDC Package - http://sourceforge.net/projects/bugscam&lt;br /&gt;
* Veracode - http://www.veracode.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Requirements Management===&lt;br /&gt;
&lt;br /&gt;
* Rational Requisite Pro - http://www-306.ibm.com/software/awdtools/reqpro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Site Mirroring===&lt;br /&gt;
* wget - http://www.gnu.org/software/wget, http://www.interlog.com/~tcharron/wgetwin.html&lt;br /&gt;
* curl - http://curl.haxx.se &lt;br /&gt;
* Sam Spade - http://www.samspade.org&lt;br /&gt;
* Xenu's Link Sleuth - http://home.snafu.de/tilman/xenulink.html&lt;br /&gt;
&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=233888</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=233888"/>
				<updated>2017-09-29T18:05:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: Added puma scan professional to the commercial tools list.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [https://find-sec-bugs.github.io/ Find Security Bugs] (Java, Scala, Groovy)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [https://dotnet-security-guard.github.io/ .NET Security Guard] (C# and VB.net)&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [https://www.pumascan.com Puma Scan] (.NET)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [http://sonarqube.com SonarQube] (20+ languages including Java, C#, and JavaScript)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
* [http://rips-scanner.sourceforge.net/ RIPS] (PHP)&lt;br /&gt;
* [https://github.com/FloeDesignTechnologies/phpcs-security-audit phpcs-security-audit] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [https://pumascanpro.com Puma Scan Professional] (.NET)&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
* [https://www.ripstech.com/ RIPS NextGen] (PHP)&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
Authorization Control&lt;br /&gt;
Authentication Control&lt;br /&gt;
Concurrency Control&lt;br /&gt;
Configuration Control&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
Encoding Control&lt;br /&gt;
Error Handling Control&lt;br /&gt;
Input Validation Control&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=233887</id>
		<title>Source Code Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=233887"/>
				<updated>2017-09-29T18:03:57Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: Added puma scan professional edition to the commercial tools list.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source code analysis tools, also referred to as Static Application Security Testing (SAST) Tools, are designed to analyze source code and/or compiled versions of code to help find security flaws. Ideally, such tools would automatically find security flaws with such a high degree of confidence that what's found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that just automatically finds flaws. If you are interested in the effectiveness of SAST tools, check out the OWASP [[Benchmark]] project, which is scientifically measuring the effectiveness of all types of vulnerability detection tools, including SAST.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
== Strengths and Weaknesses ==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
&lt;br /&gt;
* Scales well -- can be run on lots of software, and can be run repeatedly (as with nightly builds or continuous integration)&lt;br /&gt;
* Useful for things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, and so forth&lt;br /&gt;
* Output is good for developers -- highlights the precise source files, line numbers, and even subsections of lines that are affected&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. However, tools of this type are getting better.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your programming language, but not usually a key factor once it does.&lt;br /&gt;
* Types of vulnerabilities it can detect (out of the [[OWASP Top Ten]]?) (plus more?)&lt;br /&gt;
* How accurate is it? False Positive/False Negative rates?&lt;br /&gt;
** Does the tool have an OWASP [[Benchmark]] score?&lt;br /&gt;
* Does it understand the libraries/frameworks you use?&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* How hard is it to setup/use?&lt;br /&gt;
* Can it be run continuously and automatically?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
&lt;br /&gt;
==OWASP Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [[OWASP SonarQube Project]]&lt;br /&gt;
* [http://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project]&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]]&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
Disclaimer: &amp;lt;b&amp;gt;The tools listed in the tables below are presented in alphabetical order. &amp;lt;i&amp;gt;OWASP does not endorse any of the vendors or tools by listing them in the table below.&amp;lt;/i&amp;gt; We have made every effort to provide this information as accurately as possible. If you are the vendor of a tool below and think that this information is incomplete or incorrect, please send an e-mail to our mailing list and we will make every effort to correct this information.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Source or Free Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.openstack.org/wiki/Security/Projects/Bandit Bandit] - bandit is a comprehensive source vulnerability scanner for Python&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] - Brakeman is an open source vulnerability scanner specifically designed for Ruby on Rails applications&lt;br /&gt;
* [http://rubygems.org/gems/codesake-dawn Codesake Dawn] - Codesake Dawn is an open source security source code analyzer designed for Sinatra, Padrino for Ruby on Rails applications. It also works on non-web applications written in Ruby&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] - Find Bugs (including a few security flaws) in Java programs&lt;br /&gt;
* [https://find-sec-bugs.github.io/ FindSecBugs] - A security specific plugin for FingBugs that significantly improves FindBug's ability to find security vulnerabilities in Java programs&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ Flawfinder] Flawfinder - Scans C and C++&lt;br /&gt;
* [https://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/ Google CodeSearchDiggity] - Uses Google Code Search to identifies vulnerabilities in open source code projects hosted by Google Code, MS CodePlex, SourceForge, Github, and more. The tool comes with over 130 default searches that identify SQL injection, cross-site scripting (XSS), insecure remote and local file includes, hard-coded passwords, and much more.  ''Essentially, Google CodeSearchDiggity provides a source code security analysis of nearly every single open source code project in existence – simultaneously.'' &lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] - PMD scans Java source code and looks for potential code problems (this is a code quality tool that does not focus on security issues)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx PreFast] (Microsoft) - PREfast is a static analysis tool that identifies defects in C/C++ programs. Last update 2006.&lt;br /&gt;
* [https://pumascan.com/ Puma Scan] - Puma Scan is a .NET C# open source static source code analyzer that runs as an IDE plugin for Visual Studio and via MSBuild in CI pipelines.&lt;br /&gt;
* [https://dotnet-security-guard.github.io/ .NET Security Guard] - Roslyn analyzers that aim to help security audits on .NET applications. It will find SQL injections, LDAP injections, XXE, cryptography weakness, XSS and more.&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] - RIPS is a static source code analyzer for vulnerabilities in PHP web applications. Please see notes on the sourceforge.net site.&lt;br /&gt;
* [https://github.com/FloeDesignTechnologies/phpcs-security-audit phpcs-security-audit] - phpcs-security-audit is a set of PHP_CodeSniffer rules that finds flaws or weaknesses related to security in PHP and its popular CMS or frameworks.  It currently has core PHP rules as well as Drupal 7 specific rules.&lt;br /&gt;
* [http://www.sonarqube.org/ SonarQube] - Scans source code for more than 20 languages for Bugs, Vulnerabilities, and Code Smells. SonarQube IDE plugins for Eclipse, Visual Studio, and IntelliJ provided by [http://www.sonarlint.org/ SonarLint].&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper (VCG)] - Scans C/C++, C#, VB, PHP, Java, and PL/SQL for security issues and for comments which may indicate defective code. The config files can be used to carry out additional checks for banned functions or functions which commonly cause security issues.&lt;br /&gt;
* [http://www.xanitizer.net Xanitizer] - Scans Java for security vulnerabilities, mainly via taint analysis. The tool comes with a number of predefined vulnerability detectors which can additionally be extended by the user.&lt;br /&gt;
&lt;br /&gt;
==Commercial Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ AppScan Source] (IBM)&lt;br /&gt;
* [http://www.blueclosure.com BlueClosure BC Detect] (BlueClosure)&lt;br /&gt;
* [https://buguroo.com/products/bugblast-next-gen-appsec-platform/bugscout-sca bugScout] (Buguroo Offensive Security) Latest generation source code analysis tool bugScout detects source code vulnerabilities and makes possible an accurate management of the life cycles due to its easy use.&lt;br /&gt;
* [http://www.castsoftware.com/solutions/application-security/cwe#SupportedSecurityStandards CAST AIP] (CAST) Performs static and architectural analysis to check for: SQL Injection, Cross Site Scripting (XSS), Input Validation,  Insecure Cryptographic Storage, Information Leakage and Improper Error Handling, Data Access, API Abuse, Encapsulation on over 30 languages.&lt;br /&gt;
* [https://www.codacy.com/ Codacy] is free for open source projects, and integrates with tools such as Brakeman, Bandit, FindBugs, and a number of others. It offers security patterns for languages such as Python, Ruby, Scala, Java, Javascript and more.&lt;br /&gt;
* [http://www.contrastsecurity.com/ Contrast from Contrast Security] Contrast performs code security without actually doing static analysis. Contrast does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.coverity.com/products/code-advisor/ Coverity Code Advisor] (Synopsys)&lt;br /&gt;
* [https://www.checkmarx.com/technology/static-code-analysis-sca/ CxSAST] (Checkmarx)&lt;br /&gt;
* [http://www8.hp.com/us/en/software-solutions/static-code-analysis-sast/ Fortify] (HP)&lt;br /&gt;
* [http://www.juliasoft.com/solutions Julia] - SaaS Java static analysis (JuliaSoft)&lt;br /&gt;
* [http://www.klocwork.com/capabilities/static-code-analysis KlocWork] (KlocWork)&lt;br /&gt;
* [https://www.kiuwan.com/code-analysis/ Kiuwan] - SaaS Software Quality &amp;amp; Security Analysis (an [http://www.optimyth.com Optimyth] company)&lt;br /&gt;
* [http://www.parasoft.com/jsp/capabilities/static_analysis.jsp?itemId=547 Parasoft Test] (Parasoft)&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio] (PVS-Studio) For C/C++, C#&lt;br /&gt;
* [https://pumascanpro.com/ Puma Scan Professional]  - Puma Scan Professional is a .NET C# static source code analyzer that runs as an IDE plugin for Visual Studio and via MSBuild in CI pipelines.&lt;br /&gt;
* [https://www.whitehatsec.com/products/static-application-security-testing/ Sentinel Source] (Whitehat)&lt;br /&gt;
* [https://www.synopsys.com/software-integrity/products/interactive-application-security-testing.html Seeker] (Synopsys) Seeker performs code security without actually doing static analysis. Seeker does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis with simulated attacks. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.sourcepatrol.co.uk/ Source Patrol] (Pentest)&lt;br /&gt;
* [http://www.veracode.com/products/binary-static-analysis-sast Veracode Static Analysis] (Veracode)&lt;br /&gt;
&lt;br /&gt;
==More info==&lt;br /&gt;
&lt;br /&gt;
* [[Appendix_A:_Testing_Tools | Appendix A: Testing Tools]]&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST's list of Source Code Security Analysis Tools]&lt;br /&gt;
* [[:Category:Vulnerability_Scanning_Tools | DAST Tools]] - Similar info on Dynamic Application Security Testing (DAST) Tools&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=232046</id>
		<title>Static Code Analysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Static_Code_Analysis&amp;diff=232046"/>
				<updated>2017-08-07T14:29:05Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: Added an open source scanning tool.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Every '''[[Control]]''' should follow this template.&lt;br /&gt;
&lt;br /&gt;
{{Template:Control}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as white-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within 'static' (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.&lt;br /&gt;
&lt;br /&gt;
Ideally, such tools would automatically find security flaws with a high degree of confidence that what is found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that simply finds flaws automatically.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the Integrated Development Environment (IDE). For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development lifecycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful as compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
The UK Defense Standard 00-55 requires that Static Code Analysis be used on all 'safety related software in defense equipment'. [0]&lt;br /&gt;
&lt;br /&gt;
==Techniques==&lt;br /&gt;
There are various techniques to analyze static source code for potential vulnerabilities that maybe combined into one solution. These techniques are often derived from compiler technologies.&lt;br /&gt;
&lt;br /&gt;
===Data Flow Analysis===&lt;br /&gt;
Data flow analysis is used to collect run-time (dynamic) information about data in software while it is in a static state (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
There are three common terms used in data flow analysis, basic block (the code), Control Flow Analysis (the flow of data) and Control Flow Path (the path the data takes):&lt;br /&gt;
&lt;br /&gt;
Basic block: A sequence of consecutive instructions where control enters at the beginning of a block, control leaves at the end of a block and the block cannot halt or branch out except at its end (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example PHP basic block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. $a = 0;&lt;br /&gt;
2. $b = 1;&lt;br /&gt;
3. &lt;br /&gt;
4. if ($a == $b) &lt;br /&gt;
5. { # start of block&lt;br /&gt;
6.   echo “a and b are the same”;&lt;br /&gt;
7. } # end of block &lt;br /&gt;
8. else &lt;br /&gt;
9. { # start of block &lt;br /&gt;
10. echo “a and b are different”;&lt;br /&gt;
11.} # end of block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Control Flow Graph (CFG) ===&lt;br /&gt;
An abstract graph representation of software by use of nodes that represent basic blocks. A node in a graph represents a block; directed edges are used to represent jumps (paths) from one block to another. If a node only has an exit edge, this is known as an ‘entry’ block, if a node only has a entry edge, this is know as an ‘exit’ block (Wögerer, 2005).&lt;br /&gt;
&lt;br /&gt;
Example Control Flow Graph; ‘node 1’ represents the entry block and ‘node 6’ represents the exit block.&lt;br /&gt;
&lt;br /&gt;
￼[[File:Control_flow_graph.png|400x200px]]&lt;br /&gt;
&lt;br /&gt;
===Taint Analysis===&lt;br /&gt;
Taint Analysis attempts to identify variables that have been 'tainted' with user controllable input and traces them to possible vulnerable functions also known as a 'sink'. If the tainted variable gets passed to a sink without first being sanitized it is flagged as a vulnerability.&lt;br /&gt;
&lt;br /&gt;
Some programming languages such as Perl and Ruby have Taint Checking built into them and enabled in certain situations such as accepting data via CGI.&lt;br /&gt;
&lt;br /&gt;
===Lexical Analysis===&lt;br /&gt;
Lexical Analysis converts source code syntax into ‘tokens’ of information in an attempt to abstract the source code and make it easier to manipulate (Sotirov, 2005).&lt;br /&gt;
&lt;br /&gt;
Pre tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?php $name = &amp;quot;Ryan&amp;quot;; ?&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Post tokenised PHP source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
T_OPEN_TAG&lt;br /&gt;
T_VARIABLE&lt;br /&gt;
=&lt;br /&gt;
T_CONSTANT_ENCAPSED_STRING&lt;br /&gt;
;&lt;br /&gt;
T_CLOSE_TAG&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strengths and Weaknesses==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
* Scales Well (Can be run on lots of software, and can be repeatedly (like in nightly builds))&lt;br /&gt;
* For things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, etc. they are great.&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. Tools of this type are getting better, however.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
===False Positives===&lt;br /&gt;
A static code analysis tool will often produce false positive results where the tool reports a possible vulnerability that in fact is not. This often occurs because the tool cannot be sure of the integrity and security of data as it flows through the application from input to output.&lt;br /&gt;
&lt;br /&gt;
False positive results might be reported when analysing an application that interacts with closed source components or external systems because without the source code it is impossible to trace the flow of data in the external system and hence ensure the integrity and security of the data.&lt;br /&gt;
&lt;br /&gt;
===False Negatives===&lt;br /&gt;
The use of static code analysis tools can also result in false negative results where vulnerabilities result but the tool does not report them. This might occur if a new vulnerability is discovered in an external component or if the analysis tool has no knowledge of the runtime environment and whether it is configured securely.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your language, but not usually a key factor once it does.&lt;br /&gt;
* Types of Vulnerabilities it can detect (The OWASP Top Ten?) (more?)&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
* Does it support Object-oriented programming (OOP)?&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===RIPS PHP Static Code Analysis Tool===&lt;br /&gt;
[[File:Rips.jpg|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
===OWASP LAPSE+ Static Code Analysis Tool===&lt;br /&gt;
[[File:LapsePlusScreenshot.png|400px|thum|]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===OWASP Tools===&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Code_Crawler OWASP Code Crawler] (.NET &amp;amp; Java)&lt;br /&gt;
* [https://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project] (Java,PHP,C &amp;amp; JSP)&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]] (Java)&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Open Source/Free ===&lt;br /&gt;
&lt;br /&gt;
* [http://sourceforge.net/projects/agnitiotool/ Agnitio] (Objective-C, C#, Java &amp;amp; Android)&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] (Rails)&lt;br /&gt;
* [http://www.devbug.co.uk DevBug] (PHP)&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] (Java)&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ FlawFinder] (C/C++)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx Microsoft FxCop] (.NET)&lt;br /&gt;
* [http://www.stachliu.com/resources/tools/google-hacking-diggity-project/attack-tools/ Google CodeSearchDiggity] (Multiple)&lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] (Java)&lt;br /&gt;
* [https://www.pumascan.com Puma Scan] (.NET)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx Microsoft PreFast] (C/C++)&lt;br /&gt;
* [http://sonarqube.com SonarQube] (20+ languages including Java, C#, and JavaScript)&lt;br /&gt;
* [http://www.splint.org Splint] (C)&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper] (C/C++, C#, VB, PHP, Java &amp;amp; PL/SQL)&lt;br /&gt;
* [http://rips-scanner.sourceforge.net/ RIPS] (PHP)&lt;br /&gt;
&lt;br /&gt;
=== Commercial ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.fortify.com/ Fortify] (OWASP Member)&lt;br /&gt;
* [https://www.veracode.com/ Veracode] (OWASP Member)&lt;br /&gt;
* [http://www.grammatech.com/ GrammaTech]&lt;br /&gt;
* [http://www.parasoft.com/jsp/home.jsp ParaSoft]&lt;br /&gt;
* [http://www.armorize.com/codesecure/ Armorize CodeSecure] (OWASP Member)&lt;br /&gt;
* [http://www.checkmarx.com/ Checkmarx Static Code Analysis] (OWASP Member)&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ Rational AppScan Source Edition]&lt;br /&gt;
* [http://www.coverity.com/products/static-analysis.html Coverity]&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio]&lt;br /&gt;
* [http://www.klocwork.com/products/insight.asp Insight]&lt;br /&gt;
* [http://www.mathworks.com/products/polyspace/ Polyspace Static Analysis]&lt;br /&gt;
* [https://www.ripstech.com/ RIPS NextGen] (PHP)&lt;br /&gt;
&lt;br /&gt;
===Other Tool Lists===&lt;br /&gt;
&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST - Source Code Security Analyzers]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis Wikipedia - List of tools for static code analysis]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[0] Ministry of Defence (MoD). (1997) ''SAFETY RELATED SOFTWARE IN DEFENSE EQUIPMENT'' [Online]. Available at: http://www.software-supportability.org/Docs/00-55_Part_2.pdf (Accessed: 5 January 2012).&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf OWASP Code Review Guide v1.1]&lt;br /&gt;
* http://www.crosstalkonline.org/storage/issue-archives/2003/200311/200311-German.pdf&lt;br /&gt;
* http://www.ida.liu.se/~TDDC90/papers/industrial95.pdf&lt;br /&gt;
* http://www.php-security.org/downloads/rips.pdf&lt;br /&gt;
* http://www.seclab.tuwien.ac.at/papers/pixy.pdf&lt;br /&gt;
&lt;br /&gt;
[[Category:FIXME|&lt;br /&gt;
In addition, one should classify control based on the following subcategories: Ex:&amp;lt;nowiki&amp;gt;[[Category:Error Handling Control]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Availability Control&lt;br /&gt;
Authorization Control&lt;br /&gt;
Authentication Control&lt;br /&gt;
Concurrency Control&lt;br /&gt;
Configuration Control&lt;br /&gt;
Cryptographic Control&lt;br /&gt;
Encoding Control&lt;br /&gt;
Error Handling Control&lt;br /&gt;
Input Validation Control&lt;br /&gt;
Logging and Auditing Control&lt;br /&gt;
Session Management Control&lt;br /&gt;
]]&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=229825</id>
		<title>Source Code Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Source_Code_Analysis_Tools&amp;diff=229825"/>
				<updated>2017-05-20T13:04:11Z</updated>
		
		<summary type="html">&lt;p&gt;Ejohn20: Added Puma Scan - an open source C# scanner.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source code analysis tools, also referred to as Static Application Security Testing (SAST) Tools, are designed to analyze source code and/or compiled versions of code to help find security flaws. Ideally, such tools would automatically find security flaws with such a high degree of confidence that what's found is indeed a flaw. However, this is beyond the state of the art for many types of application security flaws. Thus, such tools frequently serve as aids for an analyst to help them zero in on security relevant portions of code so they can find flaws more efficiently, rather than a tool that just automatically finds flaws. If you are interested in the effectiveness of SAST tools, check out the OWASP [[Benchmark]] project, which is scientifically measuring the effectiveness of all types of vulnerability detection tools, including SAST.&lt;br /&gt;
&lt;br /&gt;
Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.&lt;br /&gt;
&lt;br /&gt;
== Strengths and Weaknesses ==&lt;br /&gt;
&lt;br /&gt;
=== Strengths ===&lt;br /&gt;
&lt;br /&gt;
* Scales well -- can be run on lots of software, and can be run repeatedly (as with nightly builds or continuous integration)&lt;br /&gt;
* Useful for things that such tools can automatically find with high confidence, such as buffer overflows, SQL Injection Flaws, and so forth&lt;br /&gt;
* Output is good for developers -- highlights the precise source files, line numbers, and even subsections of lines that are affected&lt;br /&gt;
&lt;br /&gt;
=== Weaknesses ===&lt;br /&gt;
&lt;br /&gt;
* Many types of security vulnerabilities are very difficult to find automatically, such as authentication problems, access control issues, insecure use of cryptography, etc. The current state of the art only allows such tools to automatically find a relatively small percentage of application security flaws. However, tools of this type are getting better.&lt;br /&gt;
* High numbers of false positives.&lt;br /&gt;
* Frequently can't find configuration issues, since they are not represented in the code.&lt;br /&gt;
* Difficult to 'prove' that an identified security issue is an actual vulnerability.&lt;br /&gt;
* Many of these tools have difficulty analyzing code that can't be compiled. Analysts frequently can't compile code because they don't have the right libraries, all the compilation instructions, all the code, etc.&lt;br /&gt;
&lt;br /&gt;
==Important Selection Criteria==&lt;br /&gt;
&lt;br /&gt;
* Requirement: Must support your programming language, but not usually a key factor once it does.&lt;br /&gt;
* Types of vulnerabilities it can detect (out of the [[OWASP Top Ten]]?) (plus more?)&lt;br /&gt;
* How accurate is it? False Positive/False Negative rates?&lt;br /&gt;
** Does the tool have an OWASP [[Benchmark]] score?&lt;br /&gt;
* Does it understand the libraries/frameworks you use?&lt;br /&gt;
* Does it require a fully buildable set of source?&lt;br /&gt;
* Can it run against binaries instead of source?&lt;br /&gt;
* Can it be integrated into the developer's IDE?&lt;br /&gt;
* How hard is it to setup/use?&lt;br /&gt;
* Can it be run continuously and automatically?&lt;br /&gt;
* License cost for the tool. (Some are sold per user, per org, per app, per line of code analyzed. Consulting licenses are frequently different than end user licenses.)&lt;br /&gt;
&lt;br /&gt;
==OWASP Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www.owasp.org/index.php/Category:OWASP_Orizon_Project OWASP Orizon Project]&lt;br /&gt;
* [[OWASP_LAPSE_Project | OWASP LAPSE Project]]&lt;br /&gt;
* [[OWASP O2 Platform]]&lt;br /&gt;
* [[OWASP WAP-Web Application Protection]]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
Disclaimer: &amp;lt;b&amp;gt;The tools listed in the tables below are presented in alphabetical order. &amp;lt;i&amp;gt;OWASP does not endorse any of the vendors or tools by listing them in the table below.&amp;lt;/i&amp;gt; We have made every effort to provide this information as accurately as possible. If you are the vendor of a tool below and think that this information is incomplete or incorrect, please send an e-mail to our mailing list and we will make every effort to correct this information.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Source or Free Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.openstack.org/wiki/Security/Projects/Bandit Bandit] - bandit is a comprehensive source vulnerability scanner for Python&lt;br /&gt;
* [http://brakemanscanner.org/ Brakeman] - Brakeman is an open source vulnerability scanner specifically designed for Ruby on Rails applications&lt;br /&gt;
* [http://rubygems.org/gems/codesake-dawn Codesake Dawn] - Codesake Dawn is an open source security source code analyzer designed for Sinatra, Padrino for Ruby on Rails applications. It also works on non-web applications written in Ruby&lt;br /&gt;
* [http://findbugs.sourceforge.net/ FindBugs] - Find Bugs (including a few security flaws) in Java programs&lt;br /&gt;
* [https://find-sec-bugs.github.io/ FindSecBugs] - A security specific plugin for FingBugs that significantly improves FindBug's ability to find security vulnerabilities in Java programs&lt;br /&gt;
* [http://www.dwheeler.com/flawfinder/ Flawfinder] Flawfinder - Scans C and C++&lt;br /&gt;
* [https://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/ Google CodeSearchDiggity] - Uses Google Code Search to identifies vulnerabilities in open source code projects hosted by Google Code, MS CodePlex, SourceForge, Github, and more. The tool comes with over 130 default searches that identify SQL injection, cross-site scripting (XSS), insecure remote and local file includes, hard-coded passwords, and much more.  ''Essentially, Google CodeSearchDiggity provides a source code security analysis of nearly every single open source code project in existence – simultaneously.'' &lt;br /&gt;
* [http://pmd.sourceforge.net/ PMD] - PMD scans Java source code and looks for potential code problems (this is a code quality tool that does not focus on security issues)&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/ms933794.aspx PreFast] (Microsoft) - PREfast is a static analysis tool that identifies defects in C/C++ programs. Last update 2006.&lt;br /&gt;
* [https://pumascan.com/ Puma Scan] - Puma Scan is a .NET C# open source static source code analyzer that runs as an IDE plugin for Visual Studio and via MSBuild in CI pipelines.&lt;br /&gt;
* [http://sourceforge.net/projects/rips-scanner/ RIPS] - RIPS is a static source code analyzer for vulnerabilities in PHP web applications. Please see notes on the sourceforge.net site.&lt;br /&gt;
* [http://www.sonarqube.org/ SonarQube] - Scans source code for more than 20 languages for Bugs, Vulnerabilities, and Code Smells. SonarQube IDE plugins for Eclipse, Visual Studio, and IntelliJ provided by [http://www.sonarlint.org/ SonarLint].&lt;br /&gt;
* [http://sourceforge.net/projects/visualcodegrepp/ VisualCodeGrepper (VCG)] - Scans C/C++, C#, VB, PHP, Java, and PL/SQL for security issues and for comments which may indicate defective code. The config files can be used to carry out additional checks for banned functions or functions which commonly cause security issues.&lt;br /&gt;
* [http://www.xanitizer.net Xanitizer] - Scans Java for security vulnerabilities, mainly via taint analysis. The tool comes with a number of predefined vulnerability detectors which can additionally be extended by the user.&lt;br /&gt;
&lt;br /&gt;
==Commercial Tools Of This Type==&lt;br /&gt;
&lt;br /&gt;
* [http://www-01.ibm.com/software/rational/products/appscan/source/ AppScan Source] (IBM)&lt;br /&gt;
* [http://www.blueclosure.com BlueClosure BC Detect] (BlueClosure)&lt;br /&gt;
* [https://buguroo.com/products/bugblast-next-gen-appsec-platform/bugscout-sca bugScout] (Buguroo Offensive Security) Latest generation source code analysis tool bugScout detects source code vulnerabilities and makes possible an accurate management of the life cycles due to its easy use.&lt;br /&gt;
* [https://www.codacy.com/ Codacy] is free for open source projects, and integrates with tools such as Brakeman, Bandit, FindBugs, and a number of others. It offers security patterns for languages such as Python, Ruby, Scala, Java, Javascript and more.&lt;br /&gt;
* [http://www.contrastsecurity.com/ Contrast from Contrast Security] Contrast performs code security without actually doing static analysis. Contrast does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.coverity.com/products/code-advisor/ Coverity Code Advisor] (Synopsys)&lt;br /&gt;
* [https://www.checkmarx.com/technology/static-code-analysis-sca/ CxSAST] (Checkmarx)&lt;br /&gt;
* [http://www8.hp.com/us/en/software-solutions/static-code-analysis-sast/ Fortify] (HP)&lt;br /&gt;
* [http://www.juliasoft.com/solutions Julia] - SaaS Java static analysis (JuliaSoft)&lt;br /&gt;
* [http://www.klocwork.com/capabilities/static-code-analysis KlocWork] (KlocWork)&lt;br /&gt;
* [https://www.kiuwan.com/code-analysis/ Kiuwan] - SaaS Software Quality &amp;amp; Security Analysis (an [http://www.optimyth.com Optimyth] company)&lt;br /&gt;
* [http://www.parasoft.com/jsp/capabilities/static_analysis.jsp?itemId=547 Parasoft Test] (Parasoft)&lt;br /&gt;
* [http://www.viva64.com/en/ PVS-Studio] (PVS-Studio) For C/C++, C#&lt;br /&gt;
* [https://www.whitehatsec.com/products/static-application-security-testing/ Sentinel Source] (Whitehat)&lt;br /&gt;
* [https://www.synopsys.com/software-integrity/products/interactive-application-security-testing.html Seeker] (Synopsys) Seeker performs code security without actually doing static analysis. Seeker does Interactive Application Security Testing (IAST), correlating runtime code &amp;amp; data analysis with simulated attacks. It provides code level results without actually relying on static analysis.&lt;br /&gt;
* [http://www.sourcepatrol.co.uk/ Source Patrol] (Pentest)&lt;br /&gt;
* [http://www.veracode.com/products/binary-static-analysis-sast Veracode Static Analysis] (Veracode)&lt;br /&gt;
&lt;br /&gt;
==More info==&lt;br /&gt;
&lt;br /&gt;
* [[Appendix_A:_Testing_Tools | Appendix A: Testing Tools]]&lt;br /&gt;
* [http://samate.nist.gov/index.php/Source_Code_Security_Analyzers.html NIST's list of Source Code Security Analysis Tools]&lt;br /&gt;
* [[:Category:Vulnerability_Scanning_Tools | DAST Tools]] - Similar info on Dynamic Application Security Testing (DAST) Tools&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP .NET Project]]&lt;br /&gt;
[[Category:SAMM-CR-2]]&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Ejohn20</name></author>	</entry>

	</feed>