

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Beispiele für Automatisierungsregeln
<a name="examples-automation-rules"></a>

Dieser Abschnitt enthält Beispiele für Automatisierungsregeln für gängige Security Hub CSPM-Anwendungsfälle. Diese Beispiele entsprechen Regelvorlagen, die auf der Security Hub CSPM-Konsole verfügbar sind.

## Erhöhen Sie den Schweregrad auf Kritisch, wenn eine bestimmte Ressource, z. B. ein S3-Bucket, gefährdet ist
<a name="example-automation-rule-severity-resource"></a>

In diesem Beispiel werden die Regelkriterien erfüllt, wenn es sich `ResourceId` bei einem Ergebnis um einen bestimmten Amazon Simple Storage Service (Amazon S3) -Bucket handelt. Die Regelaktion besteht darin, den Schweregrad der übereinstimmenden Ergebnisse auf zu ändern`CRITICAL`. Sie können diese Vorlage ändern, um sie auf andere Ressourcen anzuwenden.

**Beispiel für eine API-Anfrage**:

```
{
    "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}}"
            }
        }
    }]
}
```

**Beispiel für einen CLI-Befehl:**

```
$ 
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}}
```

## Erhöhen Sie den Schweregrad von Feststellungen, die sich auf Ressourcen in Produktionskonten beziehen
<a name="example-automation-rule-severity-change"></a>

In diesem Beispiel werden die Regelkriterien erfüllt, wenn in bestimmten Produktionskonten ein `HIGH` Schweregrad festgestellt wird. Die Regelaktion besteht darin, den Schweregrad der übereinstimmenden Ergebnisse auf zu ändern`CRITICAL`.

**Beispiel für eine API-Anfrage**:

```
{
    "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}}"
            }
        }
    }]
}
```

**Beispiel für einen CLI-Befehl**:

```
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}}
```

## Informative Ergebnisse unterdrücken
<a name="example-automation-rule-change-workflow"></a>

In diesem Beispiel werden die Regelkriterien für die Ergebnisse des `INFORMATIONAL` Schweregrads, die von Amazon an Security Hub CSPM gesendet wurden, abgeglichen. GuardDuty Die Regelaktion besteht darin, den Workflow-Status der übereinstimmenden Ergebnisse auf zu ändern. `SUPPRESSED`

**Beispiel für eine API-Anfrage**:

```
{
    "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}}"
            }
        }
    }]
}
```

**Beispiel für einen CLI-Befehl**:

```
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}}
```