scan (sc)

描述

扫描一个应用程序(或所有应用程序)、项目或文件。使用此命令需要有效的 AppScan® Source for Automation 许可证。

重要: 如果您所处理的是在开发环境中具有依赖性的 AppScan 源 项目(例如 IBM®MobileFirst Platform 项目),请确保在导入该项目之前在开发环境中对其进行构建。导入该项目后,如果您修改其中的文件,请确保在 AppScan 源 中进行扫描之前在开发环境中重新构建该项目(如果不执行此操作,那么 AppScan 源 将忽略对文件做出的修改)。

语法

scan [path][config <proj_config>][-name <assessment_name>]
[-scanconfig <scan_configuration_name>]
  • path:可选。所导出评估将另存为的完整路径和文件名 (.ozasmt)。
    注:
    • 如果指定有效目录但不指定文件名,那么将根据应用程序名称、项目名称以及创建评估时使用的扫描配置来为您创建评估文件 (.ozasmt)。
    • 如果指定有效目录但文件名不存在,那么将使用所指定的文件名在该位置创建评估文件。
    • 如果指定已存在的文件,那么将覆盖现有文件。
    • 如果在不存在的目录中指定文件名 (.ozasmt),那么将不保存任何评估。
  • config <proj_config>:可选。此参数仅对项目级别评估有效。如果您的项目具有配置文件,请使用此参数来指定配置文件。
  • -name <assessment_name>:可选。提供评估的名称。该名称在 AppScan 源 客户机产品中用于将评估彼此区分开(例如,在 AppScan Source for Analysis 中,该名称将出现在“我的评估”视图的名称列中)。
  • -scanconfig <scan_configuration_name>:可选。指定要用于扫描的扫描配置的名称。如果未指定扫描配置,那么缺省扫描配置将用于扫描。

示例

  • 扫描所有应用程序中项目的缺省配置:
    AllApplications>> Scan

    结果显示为:

    New Scan started
    		.
    		.
    Preparing for Vulnerability Analysis...
    Performing Vulnerability Analysis...
    Generating Findings...
    Preparing project for scan...
    		.
    		.
    Scanned Project:
      Total files: 15
      Total findings: 167
      Total lines: 385
    	vkloc: 0.44448395412925595
    	v-Density: 22.446439683527426
    Scanned Application:
      Total files: 15
      Total findings: 167
      Total lines: 385
    	vkloc: 0.44448395412925595
    	v-Density: 22.446439683527426
    Scan completed:
      Total files: 15
      Total findings: 167
      Total lines: 385
    	vkloc: 0.44448395412925595
    	v-Density: 22.446439683527426
    Elapsed Time - 18 Seconds
    New Scan started. Please wait...
    Assessment complete
    -------------------
    Total Call Sites: 75
    Total Definitive Security Findings with High Severity: 25
    Total Definitive Security Findings with Medium Severity: 37
    Total Definitive Security Findings with Low Severity: 9
    Total Suspect Security Findings with High Severity: 20
    Total Suspect Security Findings with Medium Severity: 80
    Total Suspect Security Findings with Low Severity: 60
    Total Scan Coverage Findings with High Severity: 50
    Total Scan Coverage Findings with Medium Severity: 33
    Total Scan Coverage Findings with Low Severity: 17
    Total Lines: 3000
    ...
  • 扫描 Prj1 的调试配置:
    AllApplications\Prj1>> SC config debug