檢視次數:
包含掃瞄資訊的 JSON。具體包括:
  • type:它用來識別結果類型。其值始終為scan-result
  • timestamp:對應於掃瞄結果發布時間的唯一數字。
  • sqs_message_id:此事件的 SQS 訊息 ID。僅適用於 AWS 掃描器。
  • xamz_request_id:S3 的請求 ID。僅限 AWS 掃描器。
  • bucket:一個新欄位,包含掃描對象所在的儲存桶名稱。
  • bucket_region:一個新欄位,包含掃描對象所在的儲存桶區域。當區域不可用時,此欄位不會包含。
  • 檔案名稱:掃描的檔案名稱。僅限 AWS 掃描器。
  • file_attributes:表示與檔案相關的資訊。
    • etag:分配給每個儲存在雲端儲存服務中的物件的唯一識別碼。僅適用於 AWS 和 GCP 掃描器。
    • 校驗碼
      • crc32c:分配給儲存在 GCP Cloud Storage 儲存桶中的每個物件的 CRC32C 校驗和。僅限 GCP 掃描器。
  • file_url:在 AWS S3、Azure Blob 或 GCP Cloud Storage 中被掃描檔案的 URL。
  • scan_start_timestamp:對應掃瞄開始時間的唯一數字。
  • scanner_statusscanner_status_message:此組合具有以下值:
    • 0, "successful scan": 表示掃瞄已成功完成。
    • -1, "無效的授權狀態":通常表示檔案儲存安全性尚未完全配置。部署不完整的最可能原因是尚未透過檔案儲存安全性主控台或 API 提交 ARN。關於提交 ARN 的指示,請參閱 新增堆疊使用 API 部署堆疊。此訊息也可能表示您的授權無效,或檔案儲存安全性無法將新授權推送至您的堆疊。
    • -2, "掃瞄失敗":表示 ScannerLambda 函數無法掃瞄該檔案。
    • -3, "scanner error":表示 ScannerLambda 函數中發生了內部錯誤。
    • -4, "掃瞄器調用失敗":表示 ScannerLambda 函數無法完成掃瞄。可能是因為達到了掃瞄超時,或者需要掃瞄的檔案過多,導致 Lambda 限流錯誤。
    • -5"network error":表示掃瞄因網路錯誤而失敗。
  • scanning_result:顯示掃瞄詳細資訊,例如被掃瞄檔案的大小以及任何發現的惡意程式或錯誤。當無法執行掃瞄時,此欄位可能為null
    • TotalBytelsOfFile
    • 掃瞄結果:顯示檔案問題的掃瞄結果列表。
    • 錯誤:當 scanner_status-2 時的詳細錯誤訊息。
    • 代碼:指示掃瞄詳細資訊的狀態代碼列表。
      • 100~199:由於現有參數,部分掃描已被跳過。如需協助,請聯絡技術支援中心。
  • scan_type:指示掃瞄的觸發方式。可能的值為object createdmanualschedule

範例

以下是一些在SNS中掃描結果訊息的範例。
掃瞄成功,偵測到惡意程式
{
    "type": "scan-result",
    "timestamp": 1587969985.4258394,
    "sqs_message_id": "ed985230-e3ba-4cc3-b92e-40ed17403c32",
    "xamz_request_id": "",
    "bucket": "some-bucket",
    "bucket_region": "us-west-2",
    "file_name": "eicar.txt",
    "file_attributes": {
        "etag": "e4968ef99266df7c9a1f0637d2389dab"
    },
    "file_url": "https://some-bucket.s3.us-west-2.amazonaws.com/eicar.txt",
    "scan_start_timestamp": 1587967985.3261893,
    "scanner_status": 0,
    "scanner_status_message": "successful scan",
    "scanning_result": {
        "TotalBytesOfFile": 68,
        "Findings": [
            {
                "malware": "Eicar_test_file",
                "type": "Virus"
            }
        ],
        "Error": "",
        "Codes": []
    },
    "scan_type": "object created"
}
掃瞄成功,未偵測到惡意程式
{
    "type": "scan-result",
    "timestamp": 1587969985.4258394,
    "sqs_message_id": "ed985230-e3ba-4cc3-b92e-40ed17403c32",
    "xamz_request_id": "",
    "bucket": "some-bucket",
    "bucket_region": "us-west-2",
    "file_name": "clean-file.txt",
    "file_attributes": {
        "etag": "e4968ef99266df7c9a1f0637d2389dab"
    },
    "file_url": "https://some-bucket.s3.us-west-2.amazonaws.com/clean-file.txt",
    "scan_start_timestamp": 1587967985.3261893,
    "scanner_status": 0,
    "scanner_status_message": "successful scan",
    "scanning_result": {
        "TotalBytesOfFile": 68,
        "Findings": [],
        "Error": "",
        "Codes": []
    },
    "scan_type": "object created"
}
掃瞄失敗
{
    "type": "scan-result",
    "timestamp": 1587969985.4258394,
    "sqs_message_id": "ed985230-e3ba-4cc3-b92e-40ed17403c32",
    "xamz_request_id": "",
    "bucket": "some-bucket",
    "bucket_region": "us-west-2",
    "file_name": "some-file.txt",
    "file_attributes": {
        "etag": "e4968ef99266df7c9a1f0637d2389dab"
    },
    "file_url": "https://some-bucket.s3.us-west-2.amazonaws.com/some-file.txt",
    "scan_start_timestamp": 1587967985.3261893,
    "scanner_status": -2,
    "scanner_status_message": "unsuccessful scan",
    "scanning_result": {
        "TotalBytesOfFile": 0,
        "Findings": [],
        "Error": "unable to scan file",
        "Codes": []
    },
    "scan_type": "object created"
}
掃瞄未執行(例外)
{
    "type": "scan-result",
    "timestamp": 1587969985.4258394,
    "sqs_message_id": "ed985230-e3ba-4cc3-b92e-40ed17403c32",
    "xamz_request_id": "",
    "bucket": "some-bucket",
    "bucket_region": "us-west-2",
    "file_name": "some-file.txt",
    "file_attributes": {
        "etag": "e4968ef99266df7c9a1f0637d2389dab"
    },
    "file_url": "https://some-bucket.s3.us-west-2.amazonaws.com/some-file.txt",
    "scan_start_timestamp": 1587967985.3261893,
    "scanner_status": -2,
    "scanner_status_message": "unsuccessful scan",
    "scanning_result": null,
    "scan_type": "object created"
}