Fortify SCA指南:详解工具使用与命令解析

5星 · 超过95%的资源 需积分: 50 98 下载量 79 浏览量 更新于2024-07-18 2 收藏 327KB PDF 举报
本指南深入探讨了Fortify Security Checker (Fortify SCA) 的全面使用方法,包括其源代码扫描原理、流程和具体操作。Fortify SCA 是一种强大的静态代码分析工具,用于检测软件中的安全漏洞和代码质量问题,支持多种编程语言如Java、C/C++、.NET等。 首先,分析原理部分讲解了Fortify SCA的核心组件,如AuditWorkbench负责管理扫描项目,AnalysisEngine执行语义分析,通过Semantic、GlobalDataFlow和ControlFlow分析模式检测潜在威胁。Structural分析关注代码结构,而FortifyManager则提供规则管理和配置功能。此外,RulesBuilder允许用户创建或定制扫描规则,以适应不同的安全标准。 在分析过程中,指南详细介绍了五个主要的扫描方式:插件集成(如Eclipse、VS等IDE)、命令行工具、扫描特定目录、通过ANT或Makefile集成构建过程,以及使用Fortify SCABuildMonitor进行编译时监控。整个扫描过程分为四个步骤:Clean(清理环境)、Translation(代码转换)、Show-files(预览文件)、以及实际Scan(执行分析)。 对于命令行操作,例如针对Java项目的扫描,指南提供了sourceanalyzer命令的实例,包括如何指定Java程序的build-id,内存限制(如-Xmx1250m),以及输出结果文件名(如-fproName.fpr)。通过sourceanalyzer-h选项,用户可以获取完整的命令行参数帮助。 转换源代码这一环节,指南重点展示了如何使用命令行对Java代码进行转换,提供了Java命令行语法的示例,以便开发者根据项目需求进行相应的配置和执行。 本指南是一份实用的Fortify SCA 使用手册,无论是初学者还是经验丰富的开发者,都能从中找到所需的信息,优化软件开发过程,提高代码质量并确保安全。通过遵循指南中的步骤和参数设置,用户能够有效地利用Fortify SCA进行源代码审计,从而降低潜在的安全风险。
2019-09-06 上传
fortify扫描工具的说明手册,对实际工作有指导作用,讲的比较清晰。 Fortify SCA分析原理 Front-End 3rd party IDE Java Pug-In C/C++ MicrOsoL NET IBM.eclipse Audit workbench PLSQL XML Analysis Engine Semantic fdi/ fpr Gobal Data flow N Control Flow Configuration Structural Fortify Manager NST Rules builder Custom Pre-Packaged FORTIFY Fortify SCA分析过程 SCA Engine Intermediate Scan phase fles Using Analyzers Tt transation (NST) .Rules Analysis Result File -b build id 阶段一:转换阶段( Translation) 阶段二:分析阶段(Scan o sourceanalyzer-b <build-id>-clean o sourceanalyzer -b <build-id> sourceanalyzer-b <build-id> -Xmx1250m-scan-f results fpr FORTIFY Fortify SCA扫描的工作 Visual studio Eclipse, IBM RAD 面 Audit Workbench Java,. Net Fortify Global Build Tool C, C/C++ Analysis JSP Touchless Build Fortify PL/SQL IDE Intermediate FPR TSOL Model Cold Command Line Interface Fusion 运己 Fortify I m Manager Secure Coding Rules Fortify Customized Rules Rules FORTIFY Fortify SCA扫描的五种方式 插件方式: Plug-In(Eclipse, vs WsAd,rad) 命令行方式 Command line ●扫描目录方式: Audit workbench scan Folder 与其他工具集成: Scan with ANt, Makefile ●编译监控器方式: Fortify SCA Build Monitor FORTIFY Fortify SCA扫描的四个步骤 Fortify SCA扫描总共可以分为四个步骤: ●1. Clean:清除阶段: sourceanalyzer -b proName -clean 2. Translation:转换阶段 3.ShoW-fe:查看阶段 sourceanalyzer -b proName -show-files 4.scan:扫描阶段 sourceanalyzer-b proName -Xmx1250m -scan -f proName. fpr FORTIFY Fortify SCA命令行参数说明 查看SCA扫描命令及参数→> sourceanalyzer ca\ C:\VIRDoS\syste32\cd. exe 川 icrosoft Windows XP[版不5.1268g Kc版权所有1985-2 061 Microsoft Gorp :Documents and settings anming >sourceanalyzer --he lp Fortify Source Code Analyze4..日.回153 Copyright (c>2003-2006 Fortify Software Usage Bu⊥1d Java: sourceanalyzer -b <buildid> <files> sourceanalyzer -b <buildid> javac <compiler opts> <files> G/C++: sourceanalyzer -b <buildid> <compiler> <compiler opts> <files> NET: sourceanalyzer -b <buildin> <exe file> scan〓 sourceanalyzer -b <buildid> -scan -f results. fpr Output opt ions -format <fmt> Controls the output format. Valid options are auto, fpr. fvdl, and text. Default is auto for which type will be determined automatically based on file extension 一£<fi1e> The file to which results are written Default is stdout build-pro ject <name> The name of the project being scanned. Will be inc luded in the output bu⊥1d-1abe1<labe1> The1abe1 of the project being scanned.W主工1 be inc luded in the output build-version <version> The version of the project being scanned. wil1RTIFY. e uale OFTWARE Fortify SCA转换源代码 转换Java代码 Java程序命令行语法 JaVa命令行语法例子 转换J2EE应用程序 使用 Find bugs 转换NET源代码 o. NET Versions 1.1 and 2.0 Visual studio. net version 2003 o Visual studio.net version 2005 转换CC++代码 ●转换 PL/SQLITSQL FORTIFY SCA转换JAVA源代码命令 sourceanalyzer -b <build-id> -cp <classpath> <file-list> ●附注参数:-Xmx;- encoding-jdk;- appserver- appserver- veron -appserver-home Table 1: File specifiers File specifier Description darna盈e All files found under the named directory or any subdirectories dx己盈e/古古 Any file named Example. java found under the named Example java directory or any subdirectories dx22盈e/,ava Any file with the extension. j ava found in the named directory dxna盈e吉/古,java Any file wth the extension j ava found under the named directory or any subdirectories d工22a盈e/方/吉 All files found under the named directory or ary subdirectories (same as dirname FORTIFY