

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# ASFF 中的資源屬性
<a name="asff-resources-attributes"></a>

以下是 AWS 安全性調查結果格式 (ASFF) 中`Resources`物件的描述和範例。如需有關這些欄位的詳細資訊，請參閱 [Resources](asff-required-attributes.md#Resources)。

## ApplicationArn
<a name="asff-resources-applicationarn"></a>

識別問題清單所涉及應用程式的 Amazon Resource Name (ARN)。

**範例**

```
"ApplicationArn": "arn:aws:resource-groups:us-west-2:123456789012:group/SampleApp/1234567890abcdef0"
```

## ApplicationName
<a name="asff-resources-applicationname"></a>

識別問題清單所涉及的應用程式名稱。

**範例**

```
"ApplicationName": "SampleApp"
```

## DataClassification
<a name="asff-resources-dataclassification"></a>

[https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DataClassificationDetails.html](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DataClassificationDetails.html) 欄位提供有關在資源上偵測到的敏感資料的資訊。

**範例**

```
"DataClassification": {
    "DetailedResultsLocation": "Path_to_Folder_Or_File",
    "Result": {
        "MimeType": "text/plain",
        "SizeClassified": 2966026,
        "AdditionalOccurrences": false,
        "Status": {
            "Code": "COMPLETE",
            "Reason": "Unsupportedfield"
        },
       "SensitiveData": [
            {
                "Category": "PERSONAL_INFORMATION",
                "Detections": [
                    {
                        "Count": 34,
                        "Type": "GE_PERSONAL_ID",
                        "Occurrences": {
                            "LineRanges": [
                                {
                                    "Start": 1,
                                    "End": 10,
                                    "StartColumn": 20
                                }
                            ],
                            "Pages": [],
                            "Records": [],
                            "Cells": []
                        }
                    },
                    {
                        "Count": 59,
                        "Type": "EMAIL_ADDRESS",
                        "Occurrences": {
                            "Pages": [
                                {
                                    "PageNumber": 1,
                                    "OffsetRange": {
                                        "Start": 1,
                                        "End": 100,
                                        "StartColumn": 10
                                     },
                                    "LineRange": {
                                        "Start": 1,
                                        "End": 100,
                                        "StartColumn": 10
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "Count": 2229,
                        "Type": "URL",
                        "Occurrences": {
                           "LineRanges": [
                               {
                                   "Start": 1,
                                   "End": 13
                               }
                           ]
                       }
                   },
                   {
                       "Count": 13826,
                       "Type": "NameDetection",
                       "Occurrences": {
                            "Records": [
                                {
                                    "RecordIndex": 1,
                                    "JsonPath": "$.ssn.value"
                                }
                            ]
                        }
                   },
                   {
                       "Count": 32,
                       "Type": "AddressDetection"
                   }
               ],
               "TotalCount": 32
           }
        ],
        "CustomDataIdentifiers": {
            "Detections": [
                 {
                     "Arn": "1712be25e7c7f53c731fe464f1c869b8", 
                     "Name": "1712be25e7c7f53c731fe464f1c869b8", 
                     "Count": 2,
                 }
            ],
            "TotalCount": 2
        }
    }
}
```

## 詳細資訊
<a name="asff-resources-details"></a>

[https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ResourceDetails.html](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ResourceDetails.html) 欄位提供使用適當物件之單一資源的其他資訊。每個資源都必須在物件中的個別資源`Resources`物件中提供。

請注意，如果調查結果大小超過 240 KB 的上限，則會從調查結果中移除`Details`物件。對於使用 AWS Config 規則的控制項調查結果，您可以在 AWS Config 主控台上檢視資源詳細資訊。

Security Hub CSPM 為其支援的資源類型提供一組可用的資源詳細資訊。這些詳細資訊對應至 `Type` 物件的值。盡可能使用提供的類型。

例如，如果資源是 S3 儲存貯體，請將資源設定為 `Type``AwsS3Bucket`，並在 [`AwsS3Bucket`](asff-resourcedetails-awss3.md#asff-resourcedetails-awss3bucket) 物件中提供資源詳細資訊。

[`Other`](asff-resourcedetails-other.md) 物件可讓您提供自訂欄位和值。在下列情況下，您可以使用 `Other` 物件：
+ 資源類型 （資源 的值`Type`) 沒有對應的詳細資訊物件。若要提供資源的詳細資訊，您可以使用 [`Other`](asff-resourcedetails-other.md) 物件。
+ 資源類型的 物件不包含您要填入的所有欄位。在此情況下，請使用資源類型的詳細資訊物件來填入可用的欄位。使用 `Other` 物件來填入不在類型特定物件中的欄位。
+ 資源類型不是提供的類型之一。在此情況下，將 `Resource.Type`設定為 `Other`，並使用 `Other` 物件填入詳細資訊。

**範例**

```
"Details": {
  "AwsEc2Instance": {
    "IamInstanceProfileArn": "arn:aws:iam::123456789012:role/IamInstanceProfileArn",
    "ImageId": "ami-79fd7eee",
    "IpV4Addresses": ["1.1.1.1"],
    "IpV6Addresses": ["2001:db8:1234:1a2b::123"],
    "KeyName": "testkey",
    "LaunchedAt": "2018-09-29T01:25:54Z",
    "MetadataOptions": {
      "HttpEndpoint": "enabled",
      "HttpProtocolIpv6": "enabled",
      "HttpPutResponseHopLimit": 1,
      "HttpTokens": "optional",
      "InstanceMetadataTags": "disabled"
    },
    "NetworkInterfaces": [
    {
      "NetworkInterfaceId": "eni-e5aa89a3"
    }
    ],
    "SubnetId": "PublicSubnet",
    "Type": "i3.xlarge",
    "VirtualizationType": "hvm",
    "VpcId": "TestVPCIpv6"
  },
  "AwsS3Bucket": {
    "OwnerId": "da4d66eac431652a4d44d490a00500bded52c97d235b7b4752f9f688566fe6de",
    "OwnerName": "acmes3bucketowner"
  },
  "Other": { "LightPen": "blinky", "SerialNo": "1234abcd"}  
}
```

## Id
<a name="asff-resources-id"></a>

指定資源類型的識別符。

對於 Amazon Resource Name (ARNs) 識別 AWS 的資源，這是 ARN。

對於缺少 ARNs AWS 的資源，這是建立資源之 AWS 服務定義的識別符。

對於非AWS 資源，這是與資源相關聯的唯一識別符。

**範例**

```
"Id": "arn:aws:s3:::amzn-s3-demo-bucket"
```

## 分割區
<a name="asff-resources-partition"></a>

資源所在的分割區。分割區是 的群組 AWS 區域。每個 的範圍 AWS 帳戶 都是一個分割區。

支援下列分割區：
+ `aws` – AWS 區域
+ `aws-cn` - 中國區域
+ `aws-us-gov` – AWS GovCloud (US) Region

**範例**

```
"Partition": "aws"
```

## 區域
<a name="asff-resources-region"></a>

 AWS 區域 此資源所在的 程式碼。如需區域代碼清單，請參閱[區域端點](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints)。

**範例**

```
"Region": "us-west-2"
```

## ResourceRole
<a name="asff-resources-resourcerole"></a>

識別調查結果中資源的角色。資源是調查結果活動的目標或執行活動的動作者。

**範例**

```
"ResourceRole": "target"
```

## Tags (標籤)
<a name="asff-resources-tags"></a>

此欄位提供問題清單所涉及資源的標籤索引鍵和值資訊。您可以標記 AWS Resource Groups 標記 API `GetResources`操作[支援的資源](https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html)。Security Hub CSPM 透過[服務連結角色](using-service-linked-roles.md)呼叫此操作，並在 AWS Security Finding Format (ASFF) `Resource.Id` 欄位填入資源 ARN 時擷取 AWS 資源標籤。系統會忽略無效的資源 IDs。

您可以將資源標籤新增至 Security Hub CSPM 擷取的問題清單，包括整合 AWS 服務 和第三方產品的問題清單。

新增標籤會告訴您在處理問題清單時與資源相關聯的標籤。您只能針對具有關聯標籤的資源包含 `Tags` 屬性。如果資源沒有相關聯的標籤，請不要在問題清單中包含 `Tags` 屬性。

在問題清單中包含資源標籤，不需要建置資料擴充管道或手動擴充安全問題清單的中繼資料。您也可以使用標籤來搜尋或篩選問題清單和洞見，並建立[自動化規則](automation-rules.md)。

如需適用於標籤的限制資訊，請參閱[標籤命名限制和要求](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)。

您只能提供存在於此欄位中 AWS 資源上的標籤。若要提供未在 AWS 安全調查結果格式中定義的資料，請使用`Other`詳細資訊子欄位。

**範例**

```
"Tags": {
    "billingCode": "Lotus-1-2-3",
    "needsPatching": "true"
}
```

## Type
<a name="asff-resources-type"></a>

您要提供詳細資訊的資源類型。

盡可能使用提供的資源類型之一，例如 `AwsEc2Instance` 或 `AwsS3Bucket`。

如果資源類型不符合任何提供的資源類型，請將資源設定為 `Type` `Other`，並使用`Other`詳細資訊子欄位填入詳細資訊。

支援的值會列在[資源](asff-resources.md)下。

**範例**

```
"Type": "AwsS3Bucket"
```