
إطار استجابة تلقائي للتنبيهات الأمنية بواسطة AWS Serverless Application Model
ملاحظة: هذا المستودع قديم. المستودع الجديد موجود هنا: https://github.com/m-mizutani/deepalert
AlertResponder هو إطار عمل بدون خادم للاستجابة التلقائية للتنبيهات الأمنية.
يستقبل AlertResponder تنبيهاً يمثل حدثاً مهماً من وجهة نظر أمنية ويستجيب له تلقائياً. يحتوي AlertResponder على 3 أجزاء للاستجابة التلقائية.

يرجى استبدال المتغيرات التالية وفقاً لبيئتك:
$REGION: استبدله بمنطقة AWS الخاصة بك. (مثال: ap-northeast-1)$STACK_NAME: استبدله باسم مكدس CloudFormation$ curl -o alert_responder.yml https://s3-$REGION.amazonaws.com/cfn-assets.$REGION/AlertResponder/templates/latest.yml
$ aws cloudformation deploy --template-file alert_responder.yml --stack-name $STACK_NAME --capabilities CAPABILITY_IAM

قم بإعداد ملف معلمات، على سبيل المثال config.json وقم بتشغيل أمر make.
$ cat config.json
{
"StackName": "your-alert-responder-name",
"TestStackName": "your-test-stack-name",
"CodeS3Bucket": "your-some-bucket",
"CodeS3Prefix": "for-example-functions",
"InspectionDelay": "1",
"ReviewDelay": "10"
}
$ env AR_CONFIG=config.json make deploy
ملاحظة: يرجى التأكد من حاجتك إلى بيانات اعتماد AWS (مثل مفتاح API) والأذونات المناسبة.
بعد نشر AlertResponder، انتقل إلى دليل tester وانشر مكدساً للاختبار.
$ cd tester/
$ make AR_CONFIG=../config.json deploy
يمكنك رؤية ملف param.json الذي تم إنشاؤه بواسطة البرنامج النصي في دليل tester بعد النشر.
$ cat params.json
{
"AccountId": "214219211678",
"Region": "ap-northeast-1",
"Inspector": "slam-alert-responder-test-functions-Inspector-1OBGU89CT1P4B",
"Reporter": "slam-alert-responder-test-functions-Reporter-1NDHU0VDI8OPA"
}
ثم عد إلى الدليل الجذر لمستودع git ويمكنك تشغيل اختبار التكامل.
$ go test -v
=== RUN TestInvokeBySns
--- PASS: TestInvokeBySns (3.39s)
(snip)
PASS
ok github.com/m-mizutani/AlertResponder 20.110s