ScanFolder
說明
掃描指定的資料夾以及執行與掃描相關的其他動作。
語法
ounceauto ScanFolder
-folder_path <path to folder>
[-name <assessment name>]
[-scanconfig <scan_configuration_name>]
[-waitforlicense <wait_time>]
[-save <filename>]
[-caller <caller>]
[-publish]
[-clearcache]
[-report <report type> <output format> <output location>]
[-export <export type> <output location>]
[-includeSrcBefore <n>]
[-includeSrcAfter <n>]
[-includeTraceDefinitive]
[-includeTraceSuspect]
[-includeTraceCoverage]
[-includeHowToFix]
[-enablesecrets <true/false>]
[-secretsonly <true/false>]
[-sourcecodeonly <true/false>]
-folder_path <path to folder>:必須提供。要掃描的現有資料夾路徑。-name <assessment name>:選用。評量的名稱。-scanconfig <scan_configuration_name>:選用。指定要用於掃描的掃描配置名稱。如果未指定掃描配置,掃描時會使用預設掃描配置。-waitforlicense <wait_time>:選用。指定當 AppScan® Source for Automation 授權不可用時,掃描所要等待的時間(以分鐘為單位)。若沒有使用-waitforlicense指示等待時間,則會從CLI.ozsettings取得預設值。可以透過將值設定為 0 來停用等待時間。-save <filename>:選用。將評量結果儲存到這個檔案。-caller <caller>:選用。將呼叫者指派至該作業。呼叫者可以是實際的使用者,但這不是必要的。呼叫者名稱會寫至 ounceauto 日誌檔。-publish:選用。在掃描之後發佈評量。-clearcache:選用。掃描之前,移除漏洞分析快取和自訂規則簽章資料。-report:選用。在掃描之後產生報告。- 必要的
-report指令選項:<report type>:報告的類型。報告類型是由發現項目報告、AppScan® Source 報告及自訂報告所組成。請參閱 GenerateReport 中的選項。<output format>:指定報告格式。請參閱 GenerateReport 中的選項。<output location>:儲存報告的位置。
- 選用的
-report指令選項:-includeSrcBefore <n>:要包括在每一個發現項目之前的原始碼行數。-includeSrcAfter <n>:要包括在每一個發現項目之後的原始碼行數。-includeTraceDefinitive:在明確發現項目的報告中併入追蹤資訊(請參閱分類以瞭解發現項目分類)。-includeTraceSuspect:在可疑項目發現項目的報告中併入追蹤資訊。-includeTraceCoverage:在掃描涵蓋面發現項目的報告中併入追蹤資訊。
- 必要的
-export:選用。將掃描發現項目匯出至 CSV 或 SARIF 檔。如果使用,則需要下列指令選項。<export type>:匯出報告的格式,可以是 CSV 或 SARIF。<output location>:用來儲存報告的路徑和檔名。
-includeHowToFix:選用。包括有關如何處理和更正發現項目的諮詢資訊。-enablesecrets <true/false>:選用。指定以使用秘密掃描器及其他相關掃描器來掃描原始檔。有效值為 true 和 false。-secretsonly <true/false>:選用。指定以僅使用秘密掃描器來掃描原始檔。有效值為 true 和 false。-sourcecodeonly <true/false>:選用。請指定只掃描原始檔,並忽略其他支援的檔案類型(.dll、.exe)。有效值為 true 和 false
附註:-enablesecrets 和 -secretsonly 互斥。此兩者不能同時為 true。
回覆值
要求 ID(如果成功)或 -1(如果要求提交不成功)。
範例
- 掃描 WebGoat 資料夾:
ounceauto scanfolder -folder_path "C:\WebGoat"
- 掃描 WebGoat 資料夾,以及在 C:\WebGoat 目錄中建立發現項目報告。在報告中,併入明確發現項目的追蹤資訊:
ounceauto scanfolder -folder_path "C:\WebGoat" -report Findings html "C:\WebGoat\MyReport.html" -includeTraceDefinitive