靜態分析工具彙總

靜態代碼掃描,借用一段網上的原文解釋一下(這裏叫靜態檢查):「靜態測試包括代碼檢查、靜態結構分析、代碼質量度量等。它能夠由人工進行,充分發揮人的邏輯思惟優點,也能夠藉助軟件工具自動進行。代碼檢查代碼檢查包括代碼走查、桌面檢查、代碼審查等,主要檢查代碼和設計的一致性,代碼對標準的遵循、可讀性,代碼的邏輯表達的正確性,代碼結構的合理性等方面;能夠發現違背程序編寫標準的問題,程序中不安全、不明確和模糊的部分,找出程序中不可移植部分、違背程序編程風格的問題,包括變量檢查、命名和類型審查、程序邏輯審查、程序語法檢查和程序結構檢查等內容。」。

我看了一系列的靜態代碼掃描或者叫靜態代碼分析工具後,總結對工具的見解:靜態代碼掃描工具,和編譯器的某些功能實際上是很類似的,他們也須要詞法分析,語法分析,語意分析...但和編譯器不同的是他們能夠自定義各類各樣的複雜的規則去對代碼進行分析。

如下將會列出的靜態代碼掃描工具,會因爲實現方法,算法,分析的層次不一樣,功能上會差別很大。有的能夠作SQL注入的檢查,有的則不能(固然,因爲時間問題尚未對規則進行研究,但要檢查複雜的代碼安全漏洞,是須要更高深分析算法的,因此有的東西應該不是設置規則庫就能夠檢查到的,但在安全方面的檢查,必定程度上也是能夠經過設置規則進行檢查的)
php

.NEThtml

Ç,C ++ 

  • Astrée  -查找全部可能的運行時錯誤抽象解釋,能夠證實不存在運行時錯誤,並能證實功能的斷言; 針對對安全相當重要的C代碼(例如航空電子設備)。
  • BLAST  - (伯克利懶惰抽象軟件驗證工具) -對C程序的基礎上慵懶抽象的開源軟件模型檢測(後續項目CPAchecker。[5])。
  • Cppcheck  -開源的工具來檢查幾種類型的錯誤,包括使用STL。
  • cpplint  -一個開源的工具,它檢查是否符合谷歌的風格指南對C ++編碼。
  • Clang   -一個開放源代碼編譯器,它包括一個靜態分析器它包括一個靜態分析器
  • Coccinelle的  -一個開源的源代碼模式匹配和改造。
  • Cppdepend  -簡化了管理,經過分析和可視化代碼的依賴關係,經過定義設計規則,這樣作影響分析,並比較不一樣版本的代碼的複雜的C / C ++代碼庫。
  • ECLAIR  -對於自動分析,驗證,C和C ++程序的測試和轉化的平臺。
  • Eclipse(軟件)  -一種開放源碼的IDE,包括靜態代碼分析儀(CODAN)。
  • Fluctuat  - 抽象解釋的程序數值屬性的驗證。
  • Frama-C  -一個開源的靜態分析框架C.
  • Goanna  -軟件分析工具,用於C / C ++。
  • Klocwork的靜態代碼分析  -靜態分析工具,用於C / C ++。
  • Lint -原來的靜態代碼分析儀C.
  • LDRA Testbed  -軟件分析與測試工具套件的C / C ++。
  • Parasoft C / C ++test  - C / C ++工具,它的靜態分析,單元測試,代碼審查,而且運行時錯誤檢測; 可用於插件的Visual StudioEclipse的基礎的集成開發環境。
  • PC-Lint -軟件分析工具,用於C / C ++。
  • Polyspace  -使用抽象解釋檢測和證實不存在的運行時間錯誤,在死代碼的源代碼以及用於檢查全部MISRA(2004,2012),規則(指令,非指令)。
  • PVS-Studio  -軟件分析工具,用於C,C ++,C ++ 11,C ++ / CX(組件擴展)。
  • PRQA QA·C與QA·C ++  -的C / C ++質量保證和方針/編碼標準執法與MISRA支持深度靜態分析。
  • SLAM project  -一期工程微軟研究院檢查它使用的接口軟件知足的關鍵行爲屬性。
  • Sparse  -一個開源工具,旨在發現故障的Linux內核。
  • Splint  -一個開源的進化版皮棉,爲C.
  • ...

Java

  • Checkstyle  -除了一些靜態代碼分析,它能夠用來顯示侵犯一個配置編碼標準。
  • FindBugs  -一個開源的靜態分析字節碼的Java(基於雅加達 BCEL馬里蘭大學)。
  • IntelliJ IDEA -跨平臺的Java IDE,具備本身的一套幾百代碼檢查可在即時在整個項目的編輯和批量分析分析代碼。
  • JArchitect  -簡化了分析和可視化代碼的依賴關係,經過定義設計規則,這樣作影響分析,並經過比較不一樣版本的代碼管理複雜的Java代碼庫。
  • Jtest  -測試和靜態代碼分析產品經過Parasoft的
  • LDRA Testbed   -軟件分析與測試工具套件的Java。
  • PMD  -靜態規則集基於Java源代碼分析器,可以識別潛在問題。
  • SemmleCode  -面向對象的代碼查詢靜態程序分析。
  •  Sonargraph(原SonarJ) -代碼爲目的的架構顯示器的一致性,也計算了普遍的軟件度量。
  • Soot  -一個語言處理和優化框架由中間語言的Java。
  • Squale  -管理軟件質量的平臺(也可用於其餘語言,使用商業分析工具雖然)。
  • SonarQube  -對代碼質量的持續檢查的開源平臺。
  • SourceQube  -一個獨立於平臺的命令行靜態源代碼分析器用於Java,C / C ++,RPG IV(AS / 400)和Python。
  • ThreadSafe  -一個靜態分析工具,用於Java的重點是尋找併發錯誤。
  • ...

JavaScript

 

Objective-C, Objective-C++

  • Clang -免費鏘項目包括靜態分析。做爲版本3.2,該分析儀包括在Xcode中 。[6]

Perl

Python的編輯]

  • pylint -靜態代碼分析。很嚴格的; 包括許多文體警告也是如此。
  • PyCharm  -跨平臺的Python IDE,具備代碼檢查可在即時在整個項目的編輯和批量分析分析代碼。


  如下我在網上搜集到的分析工具,我整理了如下挑了一些出來,這裏只是一部分,另一些能夠到參考連接上看一下:java

工具名 靜態掃描語言 開源/付費 廠商 介紹 主頁網址
ounec5.0 VB.Net、C、C++和C#,
還支持Java。
付  費 Ounce Labs \ http://www.ouncelabs.com/
Coverity Prevent C/C++,C#,JAVA 付費 Coverity 還有其餘輔助工具:
1.Coverity Thread Analyzer for Java
2.Coverity Software Readiness Manager for Java
3.Coverity Architecture Analyzer
http://www.coverity.com/index.html
@stake SmartRisk™ 
Analyzer
C/C++,Java 付費 Symantec 
Corporation
@stake SmartRisk™ Analyzer harnesses the power of 
static analysis of binary executables (C, C++, and Java) to 
identify, categorize and prioritize security。
注:在Symantec沒有搜到此產品?!
http://www.symantec.com/business/index.jsp
Rational Purify C/C++,Java 付費 IBM Provides memory leak and memory corruption detection for 
Windows,Runtime?!
http://www-01.ibm.com/software/awdtools/purify/
PREfix \ \ microsoft 微軟用的靜態分析工具,但暫時沒有找到下載,
如今好像在考慮發佈中!
\
Jtext Java 付費 parasoft 同時還有其餘靜態分析代碼的產品,如:C++Test...
詳細請查詢官網
http://www.parasoft.com/jsp/cn/support.jsp
flawfinder C/C++ 開源 \ 用Python編寫的c、c++程序安全審覈工具,
能夠檢查潛在的安全風險。
http://www.dwheeler.com/flawfinder/
Static Code 
Analyzer
C/C++,C#,JAVA 付費 Fortify \ http://www.fortify.com/
Klocwork Insight C/C++ ,Java 付費 Klocwork \ http://www.klocwork.com/products/insight.asp
PolySpace
Client/Server
C/C++、Ada語言 付費 MathWorks \ http://www.mathworks.cn/
rats C/C++, Python,
Perl, 
PHP代碼進行安全審覈的工具
開源 \ \ http://www.fortify.com/security-resources/rats.jsp
LAPSE Java 開源 \ LAPSE stands for a Lightweight Analysis for Program 
Security in Eclipse. LAPSE is designed to help with 
the task of auditing Java J2EE applications for common 
types of security vulnerabilities found in Web applications.
LAPSE was developed by Benjamin Livshits as part of the 
Griffin Software Security Project.
http://www.owasp.org/index.php/Category:OWASP_LAPSE_Project
Fluid java 開源 \ We have explored properties including:

    * race conditions and locking policies,
    * unique references and other programmer-significant
aliasing properties,
    * effects,
    * appropriate typing,
    * realtime threading policies, and
    * single-threading policies.
http://www.fluid.cs.cmu.edu:8080/Fluid
Splint C 開源 University of 
Virginia,
Department of 
Computer
Science
靜態檢測針對C語言的安全工具和漏洞檢測。 http://www.splint.org/
cqual C/C++ 開源 馬里蘭大學 輕量級的靜態掃描器,在類Linux系統下運行。 http://www.cs.umd.edu/~jfoster/cqual/
MOPS C 開源 berkeley大學 MOPS is a tool for finding security bugs in C programs 
and for verifying conformance to rules of defensive programming
http://www.cs.berkeley.edu/~daw/mops/
BOON C 開源 berkeley大學 BOON is a tool for automatically finding buffer overrun 
vulnerabilities in C source code. Buffer overruns are one
of the most common types of security holes, and we hope 
that BOON will enable software developers and code auditors
to improve the quality of security-critical programs.
http://www.cs.berkeley.edu/~daw/boon/
BLAST C 開源 The BLAST 
2.0 Team
BLAST is a software model checker for C programs.  
The goal of BLAST is to be able to check that software
satisfies behavioral properties of the interfaces it uses.
BLAST uses counterexample-driven automatic abstraction
refinement to construct an abstract model which is model
checked for safety properties. The abstraction is constructed
on-the-fly, and only to the required precision.
http://mtc.epfl.ch/software-tools/blast/
SpikeWAMP Php 開源 \ for analyzing PHP programs http://developer.spikesource.com/wiki/index.php/SpikeWAMP
Pixy Php 開源 \ Finding XSS and SQLI vulnerabilities http://pixybox.seclab.tuwien.ac.at/pixy/
Mike Java 開源 \ Java source code security scanner built on top of Orizon.
They are connected to OWASP.
http://milk.sourceforge.net/download.html
Smatch C 開源 \ \ http://smatch.sourceforge.net/
Oink C++ 開源 \ C++ Static Analysis Tools http://www.cubewano.org/oink
Frama-C C 開源 \ static analyzers for the C language. http://frama-c.cea.fr/
RTL-check \ 開源 \ RTL-check is an extensible and powerful abstract interpretation
framework for static analysis of programs from a safety and
security perspective
http://rtlcheck.sourceforge.net/
PMD Java 開源 \ PMD scans Java source code and looks for potential problems like:

    * Possible bugs - empty try/catch/finally/
switch statements
    * Dead code - unused local variables, parameters
and private methods
    * Suboptimal code - wasteful String/StringBuffer usage
    * Overcomplicated expressions - unnecessary if statements,
for loops that could be while loops
    * Duplicate code - copied/pasted code means copied/pasted bugs
http://pmd.sourceforge.net/
FindBugs Java 開源 馬里蘭大學 uses static analysis to look for bugs in Java code.
注意:提供Eclipse插件。
http://findbugs.sourceforge.net/
ITS4 C\C++ 開源 \ Cigital developed ITS4 to help automate source code
review for security.
http://www.cigital.com/its4/
QJ-Pro Java 開源 \ QJ-Pro is a comprehensive software inspection tool targeted 
towards the software developer.

QJ-Pro checks:
    * conformance to coding standards,
    * misuse of the Java language,
    * best practice conformence
    * code structure and
    * potential bugs at the earliest stages of development.
注意:提供各類IDE插件!
http://qjpro.sourceforge.net/
Jint Java 開源 \ Jlint will check your Java code and find bugs, inconsistencies
and synchronization problems by doing data flow analysis and
building the lock graph.
http://artho.com/jlint/
Hammurapi Java 開源 \ code review system captures coding best practices and delivers
them to developers' fingertips. It also generates consolidated
reports for lead developers, architects, and managers to
monitor codebase quality and evolution.
http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/index.html
DoctorJ Java 開源 \ Among what it detects:

    * misspelled words
    * parameter and exception names:
          o missing
          o misordered
          o misspelled
    * Javadoc tags:
          o invalid
          o misordered
          o missing expected arguments
          o invalid arguments
          o missing descriptions
    * undocumented classes, methods, fields, 
parameters
http://www.incava.org/projects/java/doctorj/index.html
Dependency Finder Java 開源 \ Dependency Finder is a suite of tools for analyzing
compiled Java code. At the core is a powerful dependency
analysis application that extracts dependency graphs and
mines them for useful information. This application comes
in many forms for your ease of use, including command-line 
tools, a Swing-based application, a web application ready
to be deployed in an application server, and a set of Ant
tasks.
http://depfind.sourceforge.net/
Checkstyle Java 開源 \ Checkstyle is a development tool to help programmers
write Java code that adheres to a coding standard.
It automates the process of checking Java code to spare
humans of this boring (but important) task. This makes
it ideal for projects that want to enforce a coding standard. 
注意:提供多種IDE的插件。
http://checkstyle.sourceforge.net/
Classycle Java 開源 \ Classycle's Analyser analyses the static class and package
dependencies in Java applications or libraries.
http://classycle.sourceforge.net/
JDepend Java 開源 \ JDepend traverses Java class file directories and generates
design quality metrics for each Java package. 
JDepend allows you to automatically measure the quality
of a design in terms of its extensibility, reusability,
and maintainability to manage package dependencies effectively.
http://www.clarkware.com/software/JDepend.html
JCSC Java 開源 \ JCSC is a powerful tool to check source code against a highly
definable coding standard and potential bad code.
http://jcsc.sourceforge.net/

......

如下是直接提供代碼檢查/相關幫助的廠商:
c++

Fortify:  git

http://www.fortify.com/web

ASPECT: 算法

http://www.aspectsecurity.com/express

OWASP:   編程

http://www.owasp.org/index.php/Main_Pageapi

securitycompass:

http://www.securitycompass.com/resources.shtml


參考資料:

1. http://www.dwheeler.com/flawfinder/
2. http://www.java2s.com/Product/Java/Byte-Source-Code/Source-Analysis-Diagram.htm
3. http://www.softwarelist.cn/?fsid=53&cid=530&cpath=ABAN
4. http://www.hacker.com.cn/article/view_14804.html
5. http://www.cs.cmu.edu/~aldrich/courses/654/tools/

注:以上連接列舉了大量相關工具

Source URL: http://www.pin5i.com/showtopic-22624.html

僅供學習!

相關文章
相關標籤/搜索