Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.
En esta sección se incluye algunos ejemplos de reglas de automatización para casos de uso comunes. Estos ejemplos corresponden a las plantillas de reglas de la AWS Security Hub consola.
Elevar la gravedad a Crítica cuando un recurso específico como un bucket S3 esté en riesgo
En este ejemplo, los criterios de la regla coinciden cuando el ResourceId
de un resultado es un bucket específico de Amazon Simple Storage Service (Amazon S3). La acción de la regla es cambiar la gravedad de los resultados coincidentes a CRITICAL
. Puede modificar esta plantilla para aplicarla a otros recursos.
Ejemplo de solicitud de 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
",
"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
"
}
}
}]
}
Ejemplo de comando de la CLI:
$
aws securityhub create-automation-rule \ --is-terminal \ --rule-name "
\ --criteria '{ "ProductName": [{ "Value": "Elevate severity of findings that relate to important resources
" \ --rule-order1
\ --rule-status "ENABLED
" \ --description "Elevate finding severity to
"CRITICAL
when specific resource such as an S3 bucket is at riskSecurity Hub
", "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
" } } }]' \ --regionus-east-1
Cómo elevar la gravedad de los resultados relacionados con los recursos en cuentas de producción
En este ejemplo, los criterios de la regla coinciden cuando se genera un resultado de gravedad HIGH
en cuentas de producción específicas. La acción de la regla es cambiar la gravedad de los resultados coincidentes a CRITICAL
.
Ejemplo de solicitud de 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
",
"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
"
}
}
}]
}
Ejemplo de comando de la CLI:
aws securityhub create-automation-rule \ --no-is-terminal \ --rule-name
"
\ --rule-orderElevate severity of findings that relate to resources in production accounts
"\ --rule-status
1
"
\ --descriptionENABLED
""
\ --criteria '{ "ProductName": [{ "Value":Elevate finding severity from
"HIGH
toCRITICAL
for findings that relate to resources in specific production accounts"
, "Comparison":Security Hub
""
}], "ComplianceStatus": [{ "Value":EQUALS
""
, "Comparison":FAILED
""
}], "RecordState": [{ "Value":EQUALS
""
, "Comparison":ACTIVE
""
}], "SeverityLabel": [{ "Value":EQUALS
""
, "Comparison":HIGH
""
}], "AwsAccountId": [ { "Value":EQUALS
""
, "Comparison":111122223333
""
}, { "Value":EQUALS
""
, "Comparison":123456789012
""
}] }' \ --actions '[{ "Type":EQUALS
""FINDING_FIELDS_UPDATE"
, "FindingFieldsUpdate": { "Severity": { "Label":"
}, "Note": { "Text":CRITICAL
""
, "UpdatedBy":A resource in production accounts is at risk. Please review ASAP.
""
} } }]' \ --regionsechub-automation
"
us-east-1
Cómo suprimir resultados informativos
En este ejemplo, los criterios de la regla coinciden con los resultados de INFORMATIONAL
gravedad enviados a Security Hub desde Amazon GuardDuty. La acción de la regla es cambiar el estado del flujo de trabajo de los resultados coincidentes a SUPPRESSED
.
Ejemplo de solicitud de 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
"
}
}
}]
}
Ejemplo de comando de la CLI:
aws securityhub create-automation-rule \ --no-is-terminal \ --rule-name
"
\ --rule-orderSuppress informational findings
"\ --rule-status
1
"
\ --descriptionENABLED
""
\ --criteria '{ "ProductName": [{ "Value":Suppress GuardDuty findings with
"INFORMATIONAL
severity"
, "Comparison":GuardDuty
""
}], "ComplianceStatus": [{ "Value":EQUALS
""
, "Comparison":FAILED
""
}], "RecordState": [{ "Value":EQUALS
""
, "Comparison":ACTIVE
""
}], "WorkflowStatus": [{ "Value":EQUALS
""
, "Comparison":NEW
""
}], "SeverityLabel": [{ "Value":EQUALS
""
, "Comparison":INFORMATIONAL
""
}] }' \ --actions '[{ "Type":EQUALS
""FINDING_FIELDS_UPDATE"
, "FindingFieldsUpdate": { "Workflow": { "Status":"
}, "Note": { "Text":SUPPRESSED
""
, "UpdatedBy":Automatically suppress GuardDuty findings with
"INFORMATIONAL
severity"
} } }]' \ --regionsechub-automation
"
us-east-1