자동화 규칙의 예 - AWS Security Hub

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

자동화 규칙의 예

이 섹션에서는 일반적인 Security Hub CSPM 사용 사례에 대한 자동화 규칙의 예를 제공합니다. 이 예제는 Security Hub CSPM 콘솔에서 사용할 수 있는 규칙 템플릿에 해당합니다.

S3 버킷과 같은 특정 리소스가 위험에 처한 경우, 심각도를 Critical로 상향 조정합니다.

이 예제에서는 결과의 ResourceId이(가) 특정 Amazon Simple Storage Service(S3) 버킷일 때 규칙 기준을 일치시킵니다. 규칙 작업은 일치하는 조사 결과의 심각도를 CRITICAL(으)로 변경하는 것입니다. 이 템플릿을 수정하여 다른 리소스에 적용할 수 있습니다.

API 요청 예제:

{ "IsTerminal": true, "RuleName": "Elevate severity of findings that relate to important resources", "RuleOrder": 1, "RuleStatus": "ENABLED", "Description": "Elevate finding severity to CRITICAL when specific resource such as an S3 bucket is at risk", "Criteria": { "ProductName": [{ "Value": "Security Hub CSPM", "Comparison": "EQUALS" }], "ComplianceStatus": [{ "Value": "FAILED", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "WorkflowStatus": [{ "Value": "NEW", "Comparison": "EQUALS" }], "ResourceId": [{ "Value": "arn:aws:s3:::amzn-s3-demo-bucket/developers/design_info.doc", "Comparison": "EQUALS" }] }, "Actions": [{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Severity": { "Label": "CRITICAL" }, "Note": { "Text": "This is a critical resource. Please review ASAP.", "UpdatedBy": "sechub-automation" } } }] }

CLI 명령 예제:

$ aws securityhub create-automation-rule \ --is-terminal \ --rule-name "Elevate severity of findings that relate to important resources" \ --rule-order 1 \ --rule-status "ENABLED" \ --description "Elevate finding severity to CRITICAL when specific resource such as an S3 bucket is at risk" \ --criteria '{ "ProductName": [{ "Value": "Security Hub CSPM", "Comparison": "EQUALS" }], "ComplianceStatus": [{ "Value": "FAILED", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "WorkflowStatus": [{ "Value": "NEW", "Comparison": "EQUALS" }], "ResourceId": [{ "Value": "arn:aws:s3:::amzn-s3-demo-bucket/developers/design_info.doc", "Comparison": "EQUALS" }] }' \ --actions '[{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Severity": { "Label": "CRITICAL" }, "Note": { "Text": "This is a critical resource. Please review ASAP.", "UpdatedBy": "sechub-automation" } } }]' \ --region us-east-1

프로덕션 계정의 리소스와 관련된 조사 결과의 심각도를 상향 조정합니다.

이 예제에서는 특정 프로덕션 계정에서 HIGH 심각도 조사 결과가 생성될 때 규칙 기준을 일치시킵니다. 규칙 작업은 일치하는 조사 결과의 심각도를 CRITICAL(으)로 변경하는 것입니다.

API 요청 예제:

{ "IsTerminal": false, "RuleName": "Elevate severity for production accounts", "RuleOrder": 1, "RuleStatus": "ENABLED", "Description": "Elevate finding severity from HIGH to CRITICAL for findings that relate to resources in specific production accounts", "Criteria": { "ProductName": [{ "Value": "Security Hub CSPM", "Comparison": "EQUALS" }], "ComplianceStatus": [{ "Value": "FAILED", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "WorkflowStatus": [{ "Value": "NEW", "Comparison": "EQUALS" }], "SeverityLabel": [{ "Value": "HIGH", "Comparison": "EQUALS" }], "AwsAccountId": [ { "Value": "111122223333", "Comparison": "EQUALS" }, { "Value": "123456789012", "Comparison": "EQUALS" }] }, "Actions": [{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Severity": { "Label": "CRITICAL" }, "Note": { "Text": "A resource in production accounts is at risk. Please review ASAP.", "UpdatedBy": "sechub-automation" } } }] }

CLI 명령 예제:

aws securityhub create-automation-rule \ --no-is-terminal \ --rule-name "Elevate severity of findings that relate to resources in production accounts" \ --rule-order 1 \ --rule-status "ENABLED" \ --description "Elevate finding severity from HIGH to CRITICAL for findings that relate to resources in specific production accounts" \ --criteria '{ "ProductName": [{ "Value": "Security Hub CSPM", "Comparison": "EQUALS" }], "ComplianceStatus": [{ "Value": "FAILED", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "SeverityLabel": [{ "Value": "HIGH", "Comparison": "EQUALS" }], "AwsAccountId": [ { "Value": "111122223333", "Comparison": "EQUALS" }, { "Value": "123456789012", "Comparison": "EQUALS" }] }' \ --actions '[{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Severity": { "Label": "CRITICAL" }, "Note": { "Text": "A resource in production accounts is at risk. Please review ASAP.", "UpdatedBy": "sechub-automation" } } }]' \ --region us-east-1

정보 조사 결과 표시 안 함

이 예제에서는 규칙 기준이 Amazon GuardDuty에서 Security Hub CSPM으로 전송된 INFORMATIONAL 심각도 조사 결과와 일치합니다. 규칙 작업은 일치하는 조사 결과의 워크플로 상태를 SUPPRESSED(으)로 변경하는 것입니다.

API 요청 예제:

{ "IsTerminal": false, "RuleName": "Suppress informational findings", "RuleOrder": 1, "RuleStatus": "ENABLED", "Description": "Suppress GuardDuty findings with INFORMATIONAL severity", "Criteria": { "ProductName": [{ "Value": "GuardDuty", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "WorkflowStatus": [{ "Value": "NEW", "Comparison": "EQUALS" }], "SeverityLabel": [{ "Value": "INFORMATIONAL", "Comparison": "EQUALS" }] }, "Actions": [{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Workflow": { "Status": "SUPPRESSED" }, "Note": { "Text": "Automatically suppress GuardDuty findings with INFORMATIONAL severity", "UpdatedBy": "sechub-automation" } } }] }

CLI 명령 예제:

aws securityhub create-automation-rule \ --no-is-terminal \ --rule-name "Suppress informational findings" \ --rule-order 1 \ --rule-status "ENABLED" \ --description "Suppress GuardDuty findings with INFORMATIONAL severity" \ --criteria '{ "ProductName": [{ "Value": "GuardDuty", "Comparison": "EQUALS" }], "ComplianceStatus": [{ "Value": "FAILED", "Comparison": "EQUALS" }], "RecordState": [{ "Value": "ACTIVE", "Comparison": "EQUALS" }], "WorkflowStatus": [{ "Value": "NEW", "Comparison": "EQUALS" }], "SeverityLabel": [{ "Value": "INFORMATIONAL", "Comparison": "EQUALS" }] }' \ --actions '[{ "Type": "FINDING_FIELDS_UPDATE", "FindingFieldsUpdate": { "Workflow": { "Status": "SUPPRESSED" }, "Note": { "Text": "Automatically suppress GuardDuty findings with INFORMATIONAL severity", "UpdatedBy": "sechub-automation" } } }]' \ --region us-east-1