Lucent Sky AVM CLI 參考資料

2023/6/30 |

這個文章提供關於 Lucent Sky AVM CLI 功能的參考資料。

Lucent Sky AVM CLI 分為以下功能類別:「Application」、「Autopilot」、「Config」、「Maintenance」、「Query」、「Scan」、「Tools」、「User」,它們被稱為介面。每個介面含有多個方法,每個方法則接受一個或多個引數。若一個方法被標示為內部,則表示這個方法是設計給其他 Lucent Sky AVM 的介面(例如 IDE 擴充套件)使用。使用內部方法是不被支援的。

功能、方法和參數的名稱是不分大小寫的。

本文內容

Application

Application 介面包含以下方法:CreateDeleteGetEncodedListGetListGetRulePackagesGetRuleRuntime

Create

建立一個新的應用程式。

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method Create [--Key] --ApplicationId --Name --Framework [--Tags] [--WeaknessPolicies] [--Vectors] [--AnalysisTarget] [--Repository] [--Arguments] [--RulePackageId] [--RuntimeId]

這個方法需要內建的 Users 群組的會員身分。

要深入了解如何使用自訂則套件,請參考 Lucent Sky 知識庫:
使用自訂則套件掃描應用程式

要深入了解如何使用特定的執行環境,請參考 Lucent Sky 知識庫:
使用特定執行環境掃描應用程式

範例

建立一個 DotNet 應用程式、名稱為 ContosoWeb

$applicationId = New-Guid

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method Create --ApplicationId $applicationId --Name "ContosoWeb" --Framework "DotNet"

建立一個 DotNet 應用程式、名稱為 ContosoWeb、標籤為 prodbay。弱點原則為 CWE79,0CWE501,2,並將 DatabaseWebRequest 視為不被信任的資料來源。專案檔案的相對路徑為 ContosoWeb\ContosoWeb.csprojbig5 為本地編碼,並設定指定的自訂規則套件和自訂執行環境。

$applicationId = New-Guid

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method Create --ApplicationId $applicationId --Name "ContosoWeb" --Framework "DotNet" --Tags "prod;bay" --WeaknessPolicies "CWE79,0;CWE501,2" --Vectors "Database,WebRequest" --AnalysisTarget "ContosoWeb\ContosoWeb.csproj" --Arguments "encoding,big5" --RulePackageid $rulePackId --RuntimeId $runtimeId

需要的引數

  • --Name

    應用程式的名稱。

  • --Framework

    應用程式的框架類型,有效的框架有 DotNetAndroidASPCppGoiOSJavaPHPPythonStaticWebUniversalVisualBasic

選擇性引數

  • --Key

    API 金鑰。

  • --ApplicationId

    一個用來辨識這個應用程式的 GUID。若此引數不存在,則會自動產生一個。

  • --Tags

    應用程式的標籤。每個標籤應以分號分開。

  • --WeaknessPolicies

    弱點原則,以分號串聯。例如:CWE79,0;CWE501,2 設定 CWE-79 為忽略並設定 CWE-501 為偵測和修正。

  • --Vectors

    不信任的資料來源,以逗號分隔,例如:Database,WebRequest。若此引數不存在,則會使用系統預設值。

  • --AnalysisTarget

    專案檔案在程式碼壓縮檔案或目錄中的相對路徑。

  • --Repository

    用於下載程式碼的儲存庫連接字串。

  • --Arguments

    設定為這個應用程式預設值的掃描參數。

  • --RulePackageId

    設定為這個應用程式預設值的規則套件 GUID。若此引數不存在,則會使用系統預設值。

  • --RuntimeId

    設定為這個應用程式預設值的執行環境 GUID。若此引數不存在,則會使用系統預設值。

Delete

刪除一個應用程式。

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method Delete [--Key] --ApplicationId

這個方法需要應用程式的 Owner 角色,或 Application API 介面的 Write 權限。

範例

刪除指定的應用程式。

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method Delete --ApplicationId 'AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA'

需要的引數

  • --ApplicationId

    一個用來辨識這個應用程式的 GUID。

選擇性引數

  • --Key

    API 金鑰。

GetEncodedList

內部方法:取得應用程式清單。

GetList

傳回應用程式清單。

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method GetList [--Key] [--Filter]

這個方法需要應用程式的 Member 或 Owner 角色,或 Application API 介面的 Execute 和 Read 權限。

範例

取得所有應用程式的清單。

.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method GetList

選擇性引數

  • --Key

    API 金鑰。

  • --Filter

    要使用的篩選設定。有效的篩選設定有 allmy

GetRulePackages

內部方法:取得規則套件清單。

GetRuntimes

內部方法:取得執行環境清單。

Autopilot

Autopilot 介面包含以下方法:Start

Start

對指定的程式碼壓縮檔開始執行 autopilot。

.\SkyAnalyzer.Interface.Console.exe --Interface Autopilot --Method Start [--Key] [--Name] [--Tags] [--WeaknessPolicies] [--Vectors] [--Arguments] [--RulePackageId] --SourceCodePath

這個方法需要內建的 Users 群組的會員身分。

範例

偵測指定的程式碼壓縮檔案中的應用程式框架、建立對應的應用程式(名稱為 ContosoWeb),並開始掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Autopilot --Method Start --Name "ContosoWeb" --SourceCodePath "C:\Source.zip"

偵測指定的程式碼壓縮檔案中的應用程式框架、使用 autopilot 識別碼為 AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA 的既有應用程式,並開始掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Autopilot --Method Start --Tag "autopilot-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" --SourceCodePath "C:\Source.zip"

需要的引數

  • --SourceCodePath

    要分析的程式碼壓縮檔案或目錄的路徑。若為壓縮檔案,這個路徑的副檔名必須是以下之一:7zzip

選擇性引數

  • --Key

    API 金鑰。

  • --Name

    應用程式的名稱。若未在 --Tags 引數中指定已存在的 autopilot 識別碼,此引數為必要;否則此引數會被忽略。

  • --Tags

    應用程式的標籤。每個標籤應以分號分開。若未在此引數中指定 autopilot 識別碼,將會自動產生一個。若有在此引數中指定已存在的 autopilot 識別碼,其他的標籤會被忽略。若 --Tags 引數中指定了已存在的 autopilot 識別碼,此引數會被忽略。

  • --WeaknessPolicies

    弱點原則,以分號串聯。例如:CWE79,0;CWE501,2 設定 CWE-79 為忽略並設定 CWE-501 為偵測和修正。若 --Tags 引數中指定了已存在的 autopilot 識別碼,此引數會被忽略。

  • --Vectors

    不信任的資料來源,以逗號分隔,例如:Database,WebRequest。若此引數不存在,則會使用系統預設值。若 --Tags 引數中指定了已存在的 autopilot 識別碼,此引數會被忽略。

  • --Arguments

    設定為這個應用程式預設值的掃描參數。不適用於偵測到框架的參數會被忽略。若 --Tags 引數中指定了已存在的 autopilot 識別碼,此引數會被忽略。

  • --RulePackageId

    設定為這個應用程式預設值的規則套件 GUID。若此引數不存在,則會使用系統預設值。若 --Tags 引數中指定了已存在的 autopilot 識別碼,此引數會被忽略。

Config

Config 介面包含以下方法:Set

Set

設定一個設定選項。

.\SkyAnalyzer.Interface.Console.exe --Interface Config --Method Set --Value

這個方法不需要驗證。

範例

設定 CLI 使用 TCP 端點 clear.contoso.com 和連接埠 5759 來和一個 CLEAR Engine 實體溝通。

.\SkyAnalyzer.Interface.Console.exe --Interface Config --Method Set --Value "endpoint = clear.contoso.com:5759"

設定 CLI 使用 namedpipe 端點來和一個 CLEAR Engine 實體溝通。

.\SkyAnalyzer.Interface.Console.exe --Interface Config --Method Set --Value "endpoint = namedpipe"

需要的引數

  • --Value

    要設定的鍵和值,格式為 key = value。有效的鍵有:endpoint

Group

Group 介面包含以下方法:CreateDeleteEditGetEncodedListGetList

Create

建立一個新的群組。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Create [--Key] --Name

這個方法需要 Group API 介面的 Full Control 權限。

範例

建立一個名稱為 Auditors 的群組:

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Create --Name "Auditors"

需要的引數

  • --Name

    群組的名稱。

選擇性引數

  • --Key

    API 金鑰。

Delete

刪除一個群組。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Delete [--Key] --GroupId

這個方法需要 Group API 介面的 Full Control 權限。

範例

刪除指定的群組。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Delete --GroupId "0A0A0A0A-0A0A-00AA-0A00-0A0A0A0A00A0"

需要的引數

  • GroupId

    指定群組的 GUID。

選擇性引數

  • --Key

    API 金鑰。

Edit

編輯一個群組。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Edit [--Key] --GroupId --Name --Members --Permissions

這個方法需要 Group API 介面的 Full Control 權限。

範例

編輯指定的群組,讓其對 Application 和相關 API 介面有 read 權限。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Edit --GroupId "0A0A0A0A-0A0A-00AA-0A00-0A0A0A0A00A0" --Permissions "Application,4"

編輯指定的群組,讓其成員為使用者 01010101-0101-0011-0100-01010101001002020202-0202-0022-0200-020202020020

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method Edit --GroupId "0A0A0A0A-0A0A-00AA-0A00-0A0A0A0A00A0" --Members "01010101-0101-0011-0100-010101010010,02020202-0202-0022-0200-020202020020"

需要的引數

  • GroupId

    指定群組的 GUID。

選擇性引數

  • --Key

    API 金鑰。

  • --Name

    群組的名稱。若此引數不存在或為空白,將不會變更群組的名稱。

  • --Members

    要編輯的群組的成員使用者的 GUID,以逗號分隔。若此引數不存在,將不會變更群組的成員。若此引數為空白,所有成員將會被由群組中移除。

  • --Permissions

    群組的成員所擁有的 API 權限,其中介面和權限以逗號分隔,權限項目則以分號分開。有效的介面有 ProjectSettings、*User。權限為位元欄位(一組旗標)。0** 代表沒有權限,1 代表 execute 或 list 權限,2 代表 write 權限,4 代表 read 權限。例如 Application,7;Settings,4 給予 Project 和相關 API 介面的 full control 權限(execute、write、read 權限),Settings 和相關 API 介面的 read 權限,其他介面則沒有權限。若此引數不存在,將不會變更群組的權限。若此引數為空白,群組的所有 API 權限會被移除。

GetEncodedList

內部:取得群組清單。

GetList

取得群組清單。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method GetList [--Key]

這個方法需要驗證但不需要特別的權限。

範例

取得所有群組的清單。

.\SkyAnalyzer.Interface.Console.exe --Interface Group --Method GetList

選擇性引數

  • --Key

    API 金鑰。

Maintenance

Maintenance 介面包含以下方法:DownloadAplDownloadLogsGetLicenseGetSystemStatus

DownloadApl

下載指定框架的 APL 位元碼。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method DownloadApl [--Key] --Framework --AplPath

這個方法需要驗證但不需要特別的權限。

範例

下載 DotNet 的 APL 位元碼至 C:\APL-DotNet.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method DownloadApl --Framework "DotNet" --AplPath "C:\APL-DotNet.zip"

需要的引數

  • --Framework

    APL 位元碼的框架。有效的框架有:DotNetJavaPhp

  • --AplPath

    要儲存 APL 位元碼的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

DownloadLogs

下載指定日期的系統記錄。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method DownloadLogs [--Key] --LogsDate --LogsPath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

下載 2020/4/1 的系統記錄檔至 C:\System-Logs-20200401.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method DownloadLogs --LogsDate "2020/4/1" --LogsPath "C:\System-Logs-20200401.zip"

需要的引數

  • --LogsDate

    要下載系統記錄的日期,為系統時間。

  • --LogsPath

    要儲存記錄檔案的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

GetLicense

傳回 CLEAR Engine 實體的授權資訊。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method GetLicense [--Key]

這個方法需要驗證但不需要特別的權限。

範例

取得 CLEAR Engine 實體的授權資訊。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method GetLicense

選擇性引數

  • --Key

    API 金鑰。

GetSystemStatus

傳回 CLEAR Engine 實體的系統狀態。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method GetSystemStatus [--Key]

這個方法需要驗證但不需要特別的權限。取得效能計數器需要內建的 Users 群組的會員身分。

範例

取得 CLEAR Engine 實體的系統狀態。

.\SkyAnalyzer.Interface.Console.exe --Interface Maintenance --Method GetSystemStatus

選擇性引數

  • --Key

    API 金鑰。

Query

Query 介面包含以下的方法:Execute

Execute

對資料來源執行指定的查詢。

.\SkyAnalyzer.Interface.Console.exe --Interface Query --Method Execute [--Key] --QueryDataSource --QueryStatement

這個方法在對本地資料來源查詢時不需要驗證,在對 CLEAR Engine 實體查詢時需要 Query API 介面的 Execute 和 Read 權限。

範例

查詢 XML 報告中急迫性為 12 的結果。

.\SkyAnalyzer.Interface.Console.exe --Interface Query --Method Execute --QueryDataSource "C:\Report.xml" --QueryStatement "SELECT COUNT(ID) FROM Results WHERE PRIORITY <= 2"

查詢所有應用程式中在最近一次的掃描中有發現版本低於 1.4.2.1jquery 相依性的應用程式 ID。

.\SkyAnalyzer.Interface.Console.exe --Interface Query --Method Execute --QueryDataSource "Engine" --QueryStatement "SELECT ApplicationId FROM Dependencies WHERE Name = 'jquery' AND Version < '1.4.2.1'"

需要的引數

  • --QueryDataSource

    用來執行查詢的資料來源。有效的值有 Engine 或是一個 XML 報告的路徑。

  • --QueryStatement

    要執行的查詢。

選擇性引數

  • --Key

    API 金鑰。

Result

Result 介面包含以下方法:HideUnhide

Hide

隱藏一個結果。

.\SkyAnalyzer.Interface.Console.exe --Interface Result --Method Hide [--Key] --ResultId

這個方法需要應用程式或掃描的 Owner 角色,或 Result API 介面的 Read 權限。

範例

隱藏指定結果。

.\SkyAnalyzer.Interface.Console.exe --Interface Result --Method Hide --ResultId "01010010-0101-0010-0101-001001010010"

需要的引數

  • --ResultId

    指定結果的 GUID。

選擇性引數

  • --Key

    API 金鑰。

Unhide

取消隱藏一個結果。

.\SkyAnalyzer.Interface.Console.exe --Interface Result --Method Unhide [--Key] --ResultId

這個方法需要應用程式或掃描的 Owner 角色,或 Result API 介面的 Read 權限。

範例

取消隱藏指定結果。

.\SkyAnalyzer.Interface.Console.exe --Interface Result --Method Unhide --ResultId "01010010-0101-0010-0101-001001010010"

需要的引數

  • --ResultId

    指定結果的 GUID。

選擇性引數

  • --Key

    API 金鑰。

Scan

Scan 介面包含以下方法:AnalyzeArchiveBeginAnalyzeBeginImportBeginRemediateBeginReportCreateDeleteDownloadLogsEndRemediateEndReportGetRemediateStatusGetReportStatusGetResultGetStageGetStatusImportPurgeRemediateReport

Analyze

上傳程式碼並開始進行掃描。這是同步方法,掃描完成後才會結束。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Analyze [--Key] --ScanId --SourceCodePath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。它也需要內建 Users 群組的會員身分。

要深入了解建立應用程式程式碼壓縮檔的相關資訊,請參考 Lucent Sky 知識庫:
準備應用程式以進行掃描

範例

上傳位於 C:\Source.zip 的程式碼壓縮檔到指定的掃描並開始掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Analyze --ScanId "55555555-5555-5555-5555-555555555555" --SourceCodePath "C:\Source.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --SourceCodePath

    要分析的程式碼壓縮檔案或目錄的路徑。若為壓縮檔案,這個路徑的副檔名必須是以下之一:7zjarwarzip。若要使用應用程式或掃描的儲存庫連接字串下載程式碼,將這個路徑設為 .repository

選擇性引數

  • --Key

    API 金鑰。

Archive

封存一個日期和時間前所建立的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Archive [--Key] --PurgeThreshold

這個方法 Scan API 介面的 Execute 和 Write 權限。

範例

封存 2019 年 6 月 15 日 下午 1:45:30 PM (UTC) 前建立的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Archive --PurgeThreshold "2019-06-15T13:45:30"

需要的引數

  • --PurgeThreshold

    要封存或清除掃描的時間和日期閾值(UTC)。閾值至少需為現在時間的 168 小時以前。在閾值之前開始的掃描會被封存或清除,除非它們正在進行中或在佇列中。在清除後沒有掃描的應用程式也會被刪除,除非 CascadePurge 引數設定為 False。日期和時間格式需符合 .NET 中的標準日期和時間格式字串,例如 2009-06-15T13:45:30

選擇性引數

  • --Key

    API 金鑰。

  • --CascadePurge

    True(預設)時會將 purge 後沒有掃描的應用程式刪除,False 時會保留 purge 後沒有掃描的應用程式。

BeginAnalyze

上傳程式碼並開始進行掃描。這是非同步方法,開始掃描後即會結束。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginAnalyze [--Key] --ScanId --SourceCodePath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。它也需要內建 Users 群組的會員身分。

範例

上傳位於 C:\Source.zip 的程式碼壓縮檔到指定的掃描並開始進行掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginAnalyze --ScanId "55555555-5555-5555-5555-555555555555" --SourceCodePath "C:\Source.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --SourceCodePath

    要分析的程式碼壓縮檔案或目錄的路徑。若為壓縮檔案,這個路徑的副檔名必須是以下之一:7zjarwarzip。若要使用應用程式或掃描的儲存庫連接字串下載程式碼,將這個路徑設為 .repository

選擇性引數

  • --Key

    API 金鑰。

BeginImport

上傳程式碼和外部掃描報告並開始進行掃描。這是非同步方法,開始掃描後即會結束。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginImport [--Key] --ScanId --ForeignReportPath --SourceCodePath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。它也需要內建 Users 群組的會員身分。

範例

上傳位於 C:\Report.xml 的外部報告和位於 C:\Source.zip 的程式碼壓縮檔到指定的掃描並開始進行掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginImport --ScanId "55555555-5555-5555-5555-555555555555" --ForeignReportPath "C:\Report.xml" --SourceCodePath "C:\Source.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --ForeignReportPath

    要匯入的外部報告路徑。這個路徑的副檔名必須是以下之一: fprtxtxml。 例如,C:\Results.xml

  • --SourceCodePath

    要分析的程式碼壓縮檔案或目錄的路徑。若為壓縮檔案,這個路徑的副檔名必須是以下之一:7zjarwarzip

選擇性引數

  • --Key

    API 金鑰。

BeginRemediate

產生一個已完成掃描的修正後程式碼。這是非同步方法,開始產生後會回傳一個代表這個特定修正後程式碼的時間數值。

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginRemediate [--Key] --ScanId  --RemediationOption

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

開始產生指定的掃描的修正後程式碼壓縮檔,包含修正資訊及原始程式碼的資訊在修正後的程式碼檔案內。代表此修正後的程式碼壓縮檔的時間數值將被儲存到 ticks 變數。

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginRemediate --ScanId "55555555-5555-5555-5555-555555555555" --RemediationOption 3

需要的引數

  • --ScanId

    指定掃描的 GUID。

選擇性引數

  • --Key

    API 金鑰。

  • --RemediationOption

    使用這個參數來控制修正後程式碼的生成方式。此參數為位元欄位(一組旗標)。1 表示在註解中包含修正資訊,2 表示在註解中包含原始程式碼,4 表示包含檔案差異資訊檔,8 表示僅包含有修正的檔案。例如:當 RemediationOption 設為 5 時,修正後程式碼會於註解中加入修正資訊、且在壓縮檔內會包含檔案差異資訊檔。若此引數不存在,則會使用 0(不含上述任何資訊)。

BeginReport

產生一個已完成掃描的報告。這是非同步方法,開始產生後會回傳一個代表這個特定報告的時間數值。

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginReport [--Key] --ScanId --ReportFormat [--ReportLanguage]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

開始產生指定的掃描的 xml 格式掃描報告。代表此報告的時間數值將被儲存到 ticks 變數。

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method BeginReport --ScanId "55555555-5555-5555-5555-555555555555" --ReportFormat "xml"

需要的引數

  • --ScanId

    指定掃描的 GUID。 If this argument is not present, it will be generated automatically.

  • --ReportFormat

    報告的格式、風格、詳細程度。有效的值有 htmlhtml,audithtml,darkhtml,verbosehtml,audit,darkhtml,audit,verbosehtml,dark,verbosehtml,audit,dark,verbosepdfpdf,auditpdf,qualitypdf,verbosepdf,audit,qualitypdf,audit,verbosepdf,quality,verbosepdf,audit,quality,verbosexml

選擇性引數

  • --Key

    API 金鑰。

  • --ReportLanguage

    報告的語言。有效的值有 en (預設) 和 zh

Create

建立一個新的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Create [--Key] --ApplicationId --ScanId [--Tags] [--WeaknessPolicies] [--Vectors] [--AnalysisTarget] [--Repository] [--Arguments] [--Type] [--SkipValidation]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。它也需要內建 Users 群組的會員身分。

範例

在指定的應用程式下建立一個掃描。

$scanId = New-Guid

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Create --ApplicationId "A4A4A4A4-A4A4-A4A4-A4A4-A4A4A4A4A4A4" --ScanId $scanId

在指定的應用程式下建立一個掃描,標籤為 prodbay。弱點原則為 CWE79,0CWE501,2,並將 DatabaseWebRequest 視為不被信任的資料來源。分析目標的相對路徑為 ContosoWeb\ContosoWeb.csproj,掃描參數為 encoding,big5

$scanId = New-Guid

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Create --ApplicationId "A4A4A4A4-A4A4-A4A4-A4A4-A4A4A4A4A4A4" --ScanId "55555555-5555-5555-5555-555555555555" --Tags "prod;bay" --WeaknessPolicies "CWE79,0;CWE501,2" --Vectors "Database" --AnalysisTarget "ContosoWeb\ContosoWeb.csproj" --Arguments "encoding,big5"

在指定的應用程式下建立一個掃描,並忽略應用程式的弱點原則,而使用預設的弱點原則。WeaknessPolicies 設定為一個空白字元以確保其被正確分析為空白而非 null:

$scanId = New-Guid

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Create --ApplicationId "A4A4A4A4-A4A4-A4A4-A4A4-A4A4A4A4A4A4" --ScanId "55555555-5555-5555-5555-555555555555" --WeaknessPolicies " "

需要的引數

  • --ScanId

    一個用來辨識這個掃描的 GUID。若此引數不存在,則會自動產生一個。

  • --ApplicationId

    這個掃描所屬應用程式的 GUID。

選擇性引數

  • --Key

    API 金鑰。

  • --Tags

    掃描的標籤。每個標籤應以分號分開。

  • --WeaknessPolicies

    弱點原則,以分號串聯。例如:CWE79,0;CWE501,2 設定 CWE-79 為忽略並設定 CWE-501 為偵測和修正。若此引數不存在,則會使用應用程式的設定。若此引數為空白,將會使用預設的弱點原則。

  • --Vectors

    掃描不信任的資料來源,以逗號分隔,例如:Database,WebRequest。若此引數不存在,則會使用應用程式的設定。若此引數為空白,將會使用預設的資料來源。

  • --AnalysisTarget

    分析目標,例如一個專案檔案或一個二進位檔案,在程式碼壓縮檔案或目錄中的相對路徑。若此引數不存在,則會使用應用程式的設定。若此引數為空白,將會自動偵測分析目標。

  • --Repository

    用於下載程式碼的儲存庫連接字串。

  • --Arguments

    此次掃描的掃描參數。若此引數不存在,則會使用應用程式的設定。若此引數為空白,將不會設定掃描參數。

  • --Type

    掃描類別,其中 0 表示內建的靜態分析(預設)、1 表示匯入分析報告。

  • --SkipValidation

    False(預設)時會執行規則套件的完整性檢查,True 時則會跳過規則套件的完整性檢查

Delete

刪除一個掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Delete [--Key] --ScanId

這個方法需要應用程式的 Owner 角色,或 Scan API 介面的 Write 權限。

範例

刪除指定的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Delete --ScanId $scanId

需要的引數

  • --ScanId

    指定掃描的 GUID。

選擇性引數

  • --Key

    API 金鑰。

DownloadLogs

下載和一個掃描有關的記錄檔案。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method DownloadLogs [--Key] --ScanId --LogsPath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

下載指定的掃描的掃描記錄檔至 C:\Logs.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method DownloadLogs --ScanId "55555555-5555-5555-5555-555555555555" --LogsPath "C:\Logs.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --LogsPath

    要儲存記錄檔的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

EndRemediate

下載一個已完成掃描的特定時間數值的修正後程式碼。若沒有時間數值,則下載這個已完成掃描的最新一個修正後程式碼。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method EndRemediate [--Key] --ScanId --RemediatedSourceCodePath [--Ticks]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

下載指定的掃描中指定 ticks 代表的修正後的程式碼壓縮檔至 C:\RemediatedSource.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method EndRemediate --ScanId "55555555-5555-5555-5555-555555555555" --RemediatedSourceCodePath "C:\RemediatedSource.zip" --Ticks "637449696000000000"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --RemediatedSourceCodePath

    要儲存修正後的程式碼壓縮檔的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

  • --Ticks

    所指定修正後程式碼壓縮檔案的時間數值。若此引數不存在,則會下載最新的修正後程式碼壓縮檔案。

EndReport

下載一個已完成掃描的特定時間數值的報告。若沒有時間數值,則下載這個已完成掃描的最新一個報告。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method EndReport [--Key] --ScanId --ReportPath --ReportFormat [--ReportLanguage] [--Ticks]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

下載指定的掃描中指定 ticks 代表的 xml 報告至 C:\RemediatedSource.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method EndReport --ScanId "55555555-5555-5555-5555-555555555555" --ReportPath "C:\Report.zip" --ReportFormat "xml" --Ticks "637449696000000000"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --ReportFormat

    The format, style, and verbosity of the report. Valid values are html, html,audit, html,dark, html,verbose, html,audit,dark, html,audit,verbose, html,dark,verbose, html,audit,dark,verbose, pdf, pdf,audit, pdf,quality, pdf,verbose, pdf,audit,quality, pdf,audit,verbose, pdf,quality,verbose, pdf,audit,quality,verbose, and xml

  • --ReportPath

    要儲存報告的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

  • --ReportLanguage

    報告的語言。有效的值有 en (預設) 和 zh

  • --Ticks

    所指定報告的時間數值。若此引數不存在,則會下載指定或預設語言最新的報告。

GetRemediateStatus

傳回修正後程式碼產生的狀態。0 代表仍在產生中,1 代表產生完成,2 代表產生失敗。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetRemediateStatus [--Key] --ScanId --Ticks

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

取得確認指定的掃描中所指定的 ticks 代表的修正後的程式碼壓縮檔目前產生的狀態。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetRemediateStatus --ScanId "55555555-5555-5555-5555-555555555555" --Ticks "637449696000000000"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --Ticks

    所指定修正後的程式碼壓縮檔的時間數值。

選擇性引數

  • --Key

    API 金鑰。

GetReportStatus

傳回報告產生的狀態。0 代表仍在產生中,1 代表產生完成,2 代表產生失敗。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetReportStatus [--Key] --ScanId --Ticks --ReportFormat

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

Get the status of the xml report of the specified scan that is associated with the ticks variable.

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetReportStatus --ScanId "55555555-5555-5555-5555-555555555555" --Ticks "637449696000000000" --ReportFormat "xml"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --ReportFormat

    報告的格式、風格、詳細程度。有效的值有 htmlhtml,audithtml,darkhtml,verbosehtml,audit,darkhtml,audit,verbosehtml,dark,verbosehtml,audit,dark,verbosepdfpdf,auditpdf,qualitypdf,verbosepdf,audit,qualitypdf,audit,verbosepdf,quality,verbosepdf,audit,quality,verbosexml

  • --Ticks

    所指定修正後的程式碼壓縮檔的時間數值。

選擇性引數

  • --Key

    API 金鑰。

GetResult

傳回已完成掃描的掃描結果碼。若掃描成功將會回傳 0(不論掃描是否有警告);若掃描失敗將會回傳實際的結果碼。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetResult [--Key] --ScanId

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

取得指定的掃描的掃描結果碼,

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetResult --ScanId $scanId

需要的引數

  • --ScanId

    指定掃描的 GUID。

選擇性引數

  • --Key

    API 金鑰。

GetStage

內部方法:取得掃描目前的執行階段。

GetStatus

查詢掃描是否已完成。True 代表已完成將會回傳 (即使掃描失敗了),False 代表仍在進行。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetStatus [--Key] --ScanId

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

取得指定的掃描目前進行的狀態。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method GetStatus --ScanId $scanId

需要的引數

  • --ScanId

    指定掃描的 GUID。

選擇性引數

  • --Key

    API 金鑰。

Import

上傳程式碼和外部掃描報告並開始進行掃描。這是同步方法,掃描完成後才會結束。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Import [--Key] --ScanId --ForeignReportPath --SourceCodePath

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。它也需要內建 Users 群組的會員身分。

範例

上傳位於 C:\Report.xml 的外部報告和位於 C:\Source.zip 的程式碼壓縮檔到指定的掃描並開始進行掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Import --ScanId "55555555-5555-5555-5555-555555555555" --ForeignReportPath "C:\Report.xml" --SourceCodePath "C:\Source.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --ForeignReportPath

    要匯入的外部報告路徑。這個路徑的副檔名必須是以下之一: fprtxtxml。 例如,C:\Results.xml

  • --SourceCodePath

    要分析的程式碼壓縮檔案或目錄的路徑。若為壓縮檔案,這個路徑的副檔名必須是以下之一:7zjarwarzip

選擇性引數

  • --Key

    API 金鑰。

Purge

清除一個日期和時間前所建立的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Purge [--Key] --PurgeThreshold [--CascadePurge]

這個方法 Scan API 介面的 Execute 和 Write 權限。

範例

清除 2019 年 6 月 15 日 下午 1:45:30 PM (UTC) 前建立的掃描。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Purge --PurgeThreshold "2019-06-15T13:45:30"

需要的引數

  • --PurgeThreshold

    要封存或清除掃描的時間和日期閾值(UTC)。閾值至少需為現在時間的 168 小時以前。在閾值之前開始的掃描會被封存或清除,除非它們正在進行中或在佇列中。在清除後沒有掃描的應用程式也會被刪除,除非 CascadePurge 引數設定為 False。日期和時間格式需符合 .NET 中的標準日期和時間格式字串,例如 2009-06-15T13:45:30

選擇性引數

  • --Key

    API 金鑰。

  • --CascadePurge

    True(預設)時會將 purge 後沒有掃描的應用程式刪除,False 時會保留 purge 後沒有掃描的應用程式。

Remediate

產生一個已完成掃描的修正後程式碼,並在產生完成後下載它。這是同步方法,產生完成後才會結束。

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Remediate [--Key] --ScanId  --RemediatedSourceCodePath [--RemediationOption]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

開始產生指定的掃描的修正後程式碼壓縮檔,包含修正資訊及原始程式碼的資訊在修正後的程式碼檔案內,並下載至 C:\RemediatedSource.zip

$ticks = .\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Remediate --ScanId "55555555-5555-5555-5555-555555555555" --RemediationOption 3 --RemediatedSourceCodePath "C:\RemediatedSource.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --RemediatedSourceCodePath

    要儲存修正後的程式碼壓縮檔的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

  • --RemediationOption

    使用這個參數來控制修正後程式碼的生成方式。此參數為位元欄位(一組旗標)。1 表示在註解中包含修正資訊,2 表示在註解中包含原始程式碼,4 表示包含檔案差異資訊檔,8 表示僅包含有修正的檔案。例如:當 RemediationOption 設為 5 時,修正後程式碼會於註解中加入修正資訊、且在壓縮檔內會包含檔案差異資訊檔。若此引數不存在,則會使用 0(不含上述任何資訊)。

Report

產生一個已完成掃描的報告,並在產生完成後下載它。這是同步方法,產生完成後才會結束。

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Report --ScanId --ReportFormat --ReportPath [--ReportLanguage`]

這個方法需要應用程式的 Member 或 Owner 角色,或 Scan API 介面的 Read 權限。

範例

產生指定的掃描的 html 格式掃描報告並下載至 C:\Report.zip

.\SkyAnalyzer.Interface.Console.exe --Interface Scan --Method Report --ScanId "55555555-5555-5555-5555-555555555555" --ReportFormat "html" --ReportPath "C:\Report.zip"

需要的引數

  • --ScanId

    指定掃描的 GUID。

  • --ReportFormat

    報告的格式、風格、詳細程度。有效的值有 htmlhtml,audithtml,darkhtml,verbosehtml,audit,darkhtml,audit,verbosehtml,dark,verbosehtml,audit,dark,verbosepdfpdf,auditpdf,qualitypdf,verbosepdf,audit,qualitypdf,audit,verbosepdf,quality,verbosepdf,audit,quality,verbosexml

  • --ReportPath

    要儲存報告的路徑。這個路徑的副檔名必須是 zip

選擇性引數

  • --Key

    API 金鑰。

  • --ReportLanguage

    報告的語言。有效的值有 en (預設) 和 zh

Tools

Tools 介面包含以下方法:Base64EncodeDetectFrameworks

Base64Encode

取得 base64 編碼後的使用者物件。

.\SkyAnalyzer.Interface.Console.exe --Interface Tools --Method Base64Encode --Value

這個方法不需要驗證。

範例

為內建帳戶 [email protected] 及其密碼 password 產生一個 base64 編碼的使用者物件,並儲存到變數 $userObject 中:

$userObject = .\SkyAnalyzer.Interface.Console.exe --Interface Tools --Method Base64Encode --Value "[email protected] password Sql"

需要的引數

  • --Value

    格式為 Email Password AccountType。若是內建帳號,在帳號類型輸入 Sql;若是組織帳號,請輸入 ActiveDirectory

DetectFrameworks

內部方法,偵測指定資料夾的應用程式框架。

User

Tools 介面包含以下方法:AuthenticateCreateDeleteEditGetEncodedListGetListMigrateSetPassword

Authenticate

內部方法,驗證使用者憑證是否有效。

Create

建立一個新的使用者。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Create [--Key] --Email --Provider [--Password]

這個方法需要 User API 介面的 Write 權限。

範例

建立一個本機使用者 [email protected],其密碼為 password

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Create --Provider "Sql" --Email "[email protected]" --Password "password"

建立一個組織使用者 [email protected]

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Create --Provider "ActiveDirectory" --Email "[email protected]"

需要的引數

  • --Email

    使用者的電子郵件。

  • --Provider

    使用者的會員提供者。有效的提供者為 ActiveDirectorySql

選擇性引數

  • --Key

    API 金鑰。

  • --Password

    使用者的密碼。若使用 SQL 會員提供者此引數是必要的;若使用 Active Directory 會員提供者此引數會被忽略。

Delete

刪除一個使用者。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Delete [--Key] --UserId

這個方法需要 User API 介面的 Write 權限。

範例

刪除指定的使用者。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Delete --UserId "01010101-0101-0011-0100-010101010010"

需要的引數

  • --UserId

    指定使用者的 GUID。

選擇性引數

  • --Key

    API 金鑰。

Edit

編輯一個使用者。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Edit --UserId --Groups

這個方法需要 User API 介面的 Write 和 Read 權限。

範例

更新使用者 ID 為 01010101-0101-0011-0100-010101010010 的使用者,使其為群組 0A0A0A0A-0A0A-00AA-0A00-0A0A0A0A00A00B0B0B0B-0B0B-00BB-0B00-0B0B0B0B00B0 的成員。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Edit --UserId "01010101-0101-0011-0100-010101010010" --Groups "0A0A0A0A-0A0A-00AA-0A00-0A0A0A0A00A0,0B0B0B0B-0B0B-00BB-0B00-0B0B0B0B00B0"

需要的引數

  • --UserId

    指定使用者的 GUID。

選擇性引數

  • --Key

    API 金鑰。

GetEncodedList

內部:傳回使用者清單。

GetList

傳回使用者清單。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method GetList [--Key]

這個方法需要驗證但不需要特別的權限。

範例

取得所有使用者的清單。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method GetList

選擇性引數

  • --Key

    API 金鑰。

Migrate

將一個使用者的資料移轉至另一個使用者。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Migrate [--Key] --UserId --Value

這個方法需要 User API 介面的 Write 和 Read 權限。

範例

移轉使用者 01010101-0101-0011-0100-010101010010 的資料移至目標使用者 02020202-0202-0022-0200-020202020020:

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method Migrate --UserId "01010101-0101-0011-0100-010101010010" --Value "02020202-0202-0022-0200-020202020020"

需要的引數

  • --UserId

    來源使用的 GUID。

  • --Value

    目標使用的 GUID。

選擇性引數

  • --Key

    API 金鑰。

SetPassword

設定一個使用者的密碼。

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method SetPassword [--Key] --UserId --Password

這個方法需要 User API 介面的 Write 權限。

範例

將指定的使用者的密碼設為 password

.\SkyAnalyzer.Interface.Console.exe --Interface User --Method SetPassword --UserId "01010101-0101-0011-0100-010101010010" --Password "password"

需要的引數

  • --UserId

    指定使用者的 GUID。

  • --Password

    使用者的密碼。

選擇性引數

  • --Key

    API 金鑰。

附錄

環境變數

CLEAR CLI 支援以下的環境變數:

  • --CLEAR_API_KEY

    API 金鑰。若 Key 引數和 CLEAR_API_KEY 系統環境變數皆存在,則會使用 Key 引數的值。

範例

設定 CLEAR_API_KEY 系統環境變數為 API 金鑰的值,再取得應用程式清單。

$env:CLEAR_API_KEY = "lsDZG9X9PlkuK+bv+tJFpg8tUS4ISbWTi4+kQKm7Wh0="
.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method GetList

使用帳號密碼登入

使用帳號密碼登入已被使用 API 金鑰淘汰。若要使用帳號密碼登入,略過 Key 引數並將 Credential 引數設為 Base64-編碼的使用者物件。

範例

使用本地使用者 [email protected] 及密碼 password 的使用者來取得應用程式清單。

$userObject = .\SkyAnalyzer.Interface.Console.exe --Interface Tools --Method Base64Encode --Value "[email protected] password Sql"
.\SkyAnalyzer.Interface.Console.exe --Interface Application --Method GetList --Credential $userObject

使用 CLI 的結束代碼來排除常見問題

呼叫 CLI 的一個方法後,處理程序將會回傳一個結束代碼,結束代碼預設值為 0 (零),表示處理程序順利完成。結束代碼代表的意義以及錯誤的解決方法請參照以下表格。

  • 0 - The process has completed successfully.
  • -11 - User authentication failed. (AUTHENTICATION_FAILED)
  • -12 - User authorization failed. (AUTHORIZATION_FAILED)
  • -100 - The license has expired, has no remaining scans, or is invalid. (INVALID_LICENSE)
  • -111 - The number of applications has reached the limit of the license. (PROJECT_LIMIT_REACHED)
  • -112 - The number of users has reached the limit of the license. (USER_LIMIT_REACHED)
  • -121 - The specified framework is not available. (INVALID_FRAMEWORK)
  • -122 - The specified report format is not available. (INVALID_REPORT_FORMAT)
  • -123 - The specified remediation option is not available. (INVALID_MITIGATION_OPTION)
  • -201 - The API model is null. (NULL_API_MODEL)
  • -202 - The API model is invalid. (INVALID_API_MODEL)
  • -203 - The input is invalid. (INVALID_INPUT)
  • -301 - The storage is offline. (OFFLINE)
  • -20000 - An unknown error occurred. Contact technical support.
  • -20004 - Network error. Verify the network status or try again later.
  • -20005 - Operation timeout. Verify the network status or try again later.
  • -20006 - Communication error. Verify the network status or try again later.
  • 20011 - The synchronized method has timed-out, but has started successfully.
  • 20021 - The method completed successfully, but is no longer applicable to the scan.
  • -20100 - One or more arguments is invalid.
  • -20101 - 'Interface' is missing or invalid.
  • -20102 - 'Method' is missing or invalid.
  • -20103 - One or more arguments for this method is missing.
  • -20105 - Authentication or authorization failed.
  • -20106 - 'Value' is invalid.
  • -20201 - 'Framework' is invalid.
  • -20203 - 'Repository' is invalid.
  • -20206 - 'Vectors' is invalid.
  • -20208 - 'RulePackageId' is not present.
  • -20209 - 'RuntimeId' is not present or is incompatible to the framework of the application.
  • -20211 - 'Filter' is invalid.
  • -20301 - 'Type' is invalid.
  • -20302 - 'SourceCodePath' is not a valid path or the specified file or directory does not exist.
  • -20303 - 'SourceCodePath' is in an unsupported format.
  • -20304 - 'ForeignReportPath' is not a valid file path or the specified file does not exist.
  • -20305 - 'ForeignReportPath' is in an unsupported format.
  • -20306 - 'RemediatedSourceCodePath' must have a zip extension.
  • -20307 - 'RemediationOption' is invalid.
  • -20308 - 'Ticks' is invalid.
  • -20309 - 'ReportFormat' is invalid.
  • -20310 - 'ReportPath' must have a zip extension.
  • -20311 - 'ReportLanguage' is invalid.
  • -20312 - 'PurgeThreshold' is invalid.
  • -20313 - 'LogsPath' must have a zip extension.
  • -20401 - 'AplPath' must have a zip extension.
  • -20403 - 'LogsDate' is invalid.
  • -20404 - 'Groups' is invalid.
  • -20405 - 'Members' is invalid.
  • -20406 - 'Permissions' is invalid.
  • -21000 - The 'ScanId' is invalid for this action.
  • -21001 - Failed to set password.
  • -21101 - The 'ReportProjectRoot' scan argument is not present in 'Arguments'.
  • -21102 - Failed to download the file. The file size cannot exceed 2 GB.
  • -21103 - The specified scan does not have any generated remediated source code.
  • -21104 - The remediated source code is still being generated.
  • -21105 - Failed to generate remediated source code.
  • -21106 - An I/O error occurred. Try again later.
  • -21107 - The specified scan does not have a generated report.
  • -21108 - The report is still being generated.
  • -21109 - Failed to generate report.
  • -21110 - The specified framework is invalid for this type of foreign report.
  • -21200 - The 'ApplicationId' is invalid for this action.
  • -22001 - The specified data source does not exist or is not supported.
  • -22002 - The query is not supported or invalid.
  • -22003 - An error occurred while processing the query.
  • -22101 - An error occurred while detecting frameworks.
  • -23001 - An error occurred while starting autopilot.
  • -23002 - Failed to detect the frameworks of the application.
  • -1200001 - This method is only available after the scan has succeeded. (ACTION_NOT_AVAILABLE)
  • -1200002 - The scan has an analysis or importation that is in-progress or completed. (SCAN_ALREADY_EXECUTED)
  • -1200011 - The specified scan id or ticks is invalid. (INVALID_INPUT_COMBINATION)
  • -1200012 - This method is not available for the type of the scan. (INVALID_TYPE)
  • 1200013 - No log is available for the specified scan. (LOG_FILE_NOT_EXIST)
  • -1200014 - The specified threshold is invalid. (INVALID_THRESHOLD)
  • -1400011 - An unspecified error occurred while extracting the archive file. (ARCHIVE_UNSPECIFIED_ERROR)
  • -1400012 - The archive file is in an unsupported format. (ARCHIVE_NOT_SUPPORTED)
  • -1400013 - An IO exception occurred while extracting the archive file. (ARCHIVE_IO_EXCEPTION)
  • -1400014 - The archive file is corrupted. (ARCHIVE_INVALID_DATA)
  • -1400015 - The path length of some entries in the archive exceeds the limit of the file system. (ARCHIVE_PATH_TOO_LONG)
  • -1400017 - The scan configuration file is invalid. (ARCHIVE_INVALID_CONFIG_FILE)
  • -1400121 - The action is not available. (ACTION_NOT_AVAILABLE)
  • -1400122 - The uploaded report file is invalid. (INVALID_FOREIGN_REPORT)
  • -1400131 - The repository connection string is invalid. (REPOSITORY_INVALID_CONNECTION_STRING)
  • -1400132 - A connection error occurred when connecting to the repository. (REPOSITORY_CONNECTION_ERROR)
  • -1400133 - An authentication or authorization error occurred when connecting to the repository. (REPOSITORY_AUTHENTICATION_ERROR)
  • -1400139 - A generic error occurred when connecting to the repository. (REPOSITORY_GENERIC_ERROR)
  • -1400151 - The uploaded rule package is invalid. (INVALID_RULE_PACK)
  • -1400152 - Identification rules in the rule package are invalid. (INVALID_IDENTIFICATION_RULES)
  • -1400153 - Identification source code rules in the rule package are invalid. (INVALID_IDENTIFICATION_SOURCE_CODE_RULES)
  • -1400154 - Remediation rules in the rule packages are invalid. (INVALID_REMEDIATION_RULES)
  • -1400155 - Suppression rules in the rule packages are invalid. (INVALID_SUPPRESSION_RULES)
  • -1400156 - The rule package contains files with invalid names. (INVALID_FILE_NAME)
  • -1400161 - The uploaded runtime is invalid. (INVALID_RUNTIME)
  • -1400411 - The signature is invalid. (INVALID_SIGNATURE)
  • -1700011 - The email already exists. (DUPLICATE_EMAIL)
  • -1700012 - The email is invalid. (INVALID_EMAIL)
  • -1700013 - The password is invalid. (INVALID_PASSWORD)
  • -1700014 - The user does not exist in the Active Directory. (PROVIDER_ERROR)
  • -1700021 - A generic error occurred. (GENERIC_ERROR)
  • -1700031 - The user is invalid. (INVALID_USER)
  • -3100001 - The specified scan arguments are invalid. (INVALID_SCAN_ARGUMENTS)
  • -3100015 - The specified weakness policies are invalid. (INVALID_WEAKNESS_POLICIES)
  • -3200001 - The query statement is invalid. (INVALID_QUERY_STATEMENT)
  • -4100021 - Lucent Sky AVM Server setup program is missing. Contact your system administrator. (SETUP_NOT_FOUND)
  • -4100031 - An unspecified error occurred during activation. Contact Lucent Sky support. (UNSPECIFIED_ACTIVATION_ERROR)
  • -4100032 - The product key is not well-formed. (MALFORMED_PRODUCT_KEY)
  • -4100033 - The license file is invalid. (INVALID_LICENSE_FILE)
  • -4100034 - An error occurred while communicating with the activation server. Try again later or use offline activation. (ACTIVATION_SERVER_ERROR)
  • -4100035 - The product key has expired or exceeded its activation limit. (EXPIRED_PRODUCT_KEY)
  • -4100036 - The serial number in the license file does not match the serial number of this instance. (SERIAL_NUMBER_MISMATCH)
  • -4100037 - An error occurred while setting up this instance as a node. (NODE_SETUP_ERROR)
  • -4100038 - An error occurred while converting between editions. (CONVERSION_ERROR)
  • -4100039 - An error occurred while initializing supplementary license store. (SUPPLEMENT_LICENSE_STORE_ERROR)
  • 4100041 - No log is available for the specified date range. (LOG_FILE_NOT_EXIST)
  • 4100042 - Restart CLEAR Engine to complete the maintenance. (RESTART_REQUIRED)
  • -4100043 - There is one or more scans in progress. (SCAN_IN_PROGRESS)
  • -9999960 - An I/O error occurred. (IO_ERROR)
  • -9999970 - A data error occurred. (DATA_ERROR)
  • -9999980 - A system error occurred. (SYSTEM_ERROR)
  • -9999990 - An unexpected error occurred. (ERROR)