静态代码分析工具汇总

Juliet Test Suite v1.3 实战:基于118个CWE类别构建静态分析工具评测基准 本文详细介绍了Juliet Test Suite v1.3在静态分析工具评测中的应用,该测试套件包含118个CWE类别的6万+测试用例,覆盖常见安全漏洞。通过‘坏函数+好函数’设计和多维度评估框架,帮助开发者精确计算检出率和误报率,提升工具实战能力。 阅读详情

静态代码扫描,借用一段网上的原文解释一下(这里叫静态检查):“静态测试包括代码检查、静态结构分析、代码质量度量等。它可以由人工进行,充分发挥人的逻辑思维优势,也可以借助软件工具自动进行。代码检查代码检查包括代码走查、桌面检查、代码审查等,主要检查代码和设计的一致性,代码对标准的遵循、可读性,代码的逻辑表达的正确性,代码结构的合理性等方面;可以发现违背程序编写标准的问题,程序中不安全、不明确和模糊的部分,找出程序中不可移植部分、违背程序编程风格的问题,包括变量检查、命名和类型审查、程序逻辑审查、程序语法检查和程序结构检查等内容。”。

我看了一系列的静态代码扫描或者叫静态代码分析工具后,总结对工具的看法:静态代码扫描工具,和编译器的某些功能其实是很相似的,他们也需要词法分析,语法分析,语意分析...但和编译器不一样的是他们可以自定义各种各样的复杂的规则去对代码进行分析。

以下将会列出的静态代码扫描工具,会由于实现方法,算法,分析的层次不同,功能上会差异很大。有的可以做SQL注入的检查,有的则不能(当然,由于时间问题还没有对规则进行研究,但要检查复杂的代码安全漏洞,是需要更高深分析算法的,所以有的东西应该不是设置规则库就可以检查到的,但在安全方面的检查,一定程度上也是可以通过设置规则进行检查的)。

  以下我在网上搜集到的分析工具,我整理了以下挑了一些出来,这里只是一部分,另外一些可以到参考链接上看一下:

工具名 静态扫描语言 开源/付费 厂商 介绍 主页网址
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/

......

以下是直接提供代码检查/相关帮助的厂商:

Fortify:  

http://www.fortify.com/

ASPECT: 

http://www.aspectsecurity.com/

OWASP:   

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

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/

注:以上链接列举了大量相关工具

Linux 静态代码检查工具:smatch 的安装和使用 介绍 Smatch is a static analysis tool for C. Most of the checks are for the linux kernel. Smatch 分析程序代码的逻辑错误。它可以检测到诸如“为一个没锁上的 spinlock 执行解锁”的逻辑错误。所以提前修复一些代码中隐含的BUG是很有必要的。 官方: http://smatch.sourceforge.net/ Smatch需要自己下载和编译: git clone git://repo.or.cz/smatch. 阅读详情

相关推荐

C/C++ 静态代码检查工具cppCheck

Cppcheck是一个用于C/C++代码的静态分析工具,它可以帮助开发者检测代码中的错误;Cppcheck可以检测出许多类型的错误,包括语法错误、未使用的函数、内存泄漏、未初始化的变量等;Cppcheck还支持用户自定义规则,这使得开发者可以根据自己的需求定制Cppcheck的行为;使用--suppress如果你想要忽略某些警告,可以在命令行中使用 --suppress 选项。

贝勒里恩的博客 4949

静态代码检测

静态代码分析是一种在软件开发过程中对源代码进行分析的技术。它通过检查代码的结构、语法、语义等方面,以发现潜在的错误、安全漏洞、性能问题等,并提供相应的建议和警告。与动态测试方法(如单元测试)不同,静态代码分析是在代码执行之前进行的,而不需要实际运行代码。发现潜在问题:静态代码分析可以帮助开发人员在早期发现代码中的潜在问题,包括语法错误、逻辑错误、未初始化的变量、空指针引用等。通过发现和修复这些问题,可以减少后期调试和修复的工作量,提高代码的质量和稳定性。

指南针的博客 3140

flawfinder:一种用于在 CC++ 源代码中查找漏洞的静态分析工具

关于 这是“探伤者”。 Flawfinder 是一个简单的程序,可以扫描 C/C++ 源代码并报告潜在的安全漏洞。 它可以是检查软件漏洞的有用工具,也可以更广泛地作为对静态源代码分析工具的简单介绍。 它的设计易于安装和使用。 Flawfinder 支持 Common Weakness Enumeration (CWE) 并正式与 CWE 兼容。 有关更多信息,请参阅 平台 Flawfinder 旨在作为命令行工具在 Unix/Linux/POSIX 系统(包括 Cygwin、基于 Linux 的系统、MacOS 和各种 BSD)上使用。 它需要 Python 2.7 或 Python 3。 安装 如果你只是想使用它,你可以使用 Python 的“pip”或系统的包管理器(flawfinder 有许多系统的包)安装缺陷查找器。 它还支持按照通常的make install源安装约定轻松安装

【论文分享】An Empirical Study on the Effectiveness of Static C Code Analyzers for Vulnerability Detection

看到gossip的推送,所以细细读了一下这篇文章,感觉还是挺有收获的。

^_^ 1673

flawfinder使用说明(中文).pdf

探伤者附带了一本简单的手册,描述了如何使用它。 如果您不确定要冒险 安装程序,你可以看看 首先是文档,其中讨论了如何使用它和 它如何支持 CWE。 该文档以以下格式提供: 这是探伤仪的主要网站,一个简单的程序,用于检查 C/C++源代码并报告可能的安全漏洞(“缺陷”) 按风险级别排序。 这对于快速查找和删除至少一些非常有用 程序广泛发布之前的潜在安全问题 向公众开放。 任何人都可以免费使用,并可作为开源软件(OSS)使用。 参见“探伤仪如何工作? 下面,有关其工作原理的更多信息。 其他人在探伤仪方面取得了成功;请参阅推荐和评论/论文了解更多信息。 如果需要更多详细信息,可以跳到文档。 探伤仪经过专门设计,易于安装和使用。 你可以安装Python并使用pip,如下所示:

汇川AM系列PLC玩转CNC:手把手教你用File模式读取G代码文件(附避坑指南)

本文详细介绍了如何使用汇川AM系列PLC的File模式读取G代码文件,涵盖从CAD设计到PLC配置的全流程。特别针对路径格式、文件类型等常见问题提供避坑指南,帮助工程师快速实现CNC加工的自动化控制。

weixin_33582311的博客 403

一些静态代码分析工具汇总

总结了几款针对源代码漏洞检测的传统静态分析工具,包括一些开源和不开源的工具。

阿航的博客 3261

将CityScapes数据集转换为COCO格式的实例分割数据集

##¥##2019年结束前最后两小时,写出本年度最后一篇博客,不是博主没地方去跨年,实在是Coding乐趣无穷ahhhh ##¥## COCO数据集是研究实例分割的通用数据集,但是针对道路环境的数据较少,对于自动驾驶和移动机器人的应用并不适配。而提供道路环境的实例分割数据的数据集目前有KITTI、CityScapes、Apllo等,CityScapes算是应用较广,数据质量较高的一个,所以,本篇...

陆羽飞的博客 9940

Unity 2022.3.3 LTS + Visual Studio 2022:手把手教你复刻《吸血鬼幸存者》核心战斗(附完整项目源码)

本文详细介绍了如何使用Unity 2022.3.3 LTS和Visual Studio 2022从零构建《吸血鬼幸存者》式战斗系统。通过图文开发教程,涵盖对象池优化、ECS架构雏形、2D物理碰撞控制等关键技术,帮助开发者高效复刻这款热门游戏的自动攻击与海量刷怪机制。

weixin_30721077的博客 458

WPF 解决listview值更改时页面没有刷新

WPF 解决listview值更改时页面没有刷新。

weixin_52475977的博客 1385

国内外主流静态分析类工具汇总

笔者从事该软件安全方面工作,在工作和学习中收集了国内外比较主流的静态分析类工具,供大家参考。大多是资料来自于网络整理,如有不足或欠缺,还请在评论中指出。我进行修正。也欢迎同行多多交流。 我使用0标注北大软件CoBOT,因为他是国内第一款基于主流SAST技术的静态分析工具,填补了国内在缺陷检测、安全漏洞软件工具上的空白。值得称赞的工具。 0、北大软件CoBOT CoBOT(库博)是北京大学...

manok的专栏 2万+

Proteus8.0仿真应用设计(九十一)基于STM32CubeMX、STM32F103C8T6 、FREERTOS、MCP41010(SPI接口)的8位数字电位器应用设计仿真

MCP41010是一款SPI接口的8位数字电位器。

zhusl6688的博客 558
上一篇: 自动化测试工具—“魔爪”的束缚,“思想”的剥离
下一篇: HP ALM 11 中文教程
TIB
TIB
博客等级 码龄19年 2879粉丝 957原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值