File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
automated_security_helper
plugin_modules/ash_aws_plugins Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 3
3
from datetime import datetime , timezone
4
4
import json
5
5
import logging
6
+ import os
6
7
from pydantic import Field
7
8
import boto3
8
9
@@ -28,8 +29,8 @@ class CloudWatchLogsReporterConfigOptions(ReporterOptionsBase):
28
29
Field (
29
30
pattern = r"(af|il|ap|ca|eu|me|sa|us|cn|us-gov|us-iso|us-isob)-(central|north|(north(?:east|west))|south|south(?:east|west)|east|west)-\d{1}"
30
31
),
31
- ] = None
32
- log_group_name : str | None = None
32
+ ] = os . environ . get ( "AWS_REGION" , os . environ . get ( "AWS_DEFAULT_REGION" , None ))
33
+ log_group_name : str | None = os . environ . get ( "ASH_LOG_GROUP_NAME" , None )
33
34
log_stream_name : str = "ASHScanResults"
34
35
35
36
Original file line number Diff line number Diff line change 1418
1418
"name": "cloudwatch-logs",
1419
1419
"options": {
1420
1420
"aws_account_id": null,
1421
- "aws_region": null ,
1421
+ "aws_region": "us-west-2" ,
1422
1422
"log_group_name": null,
1423
1423
"log_stream_name": "ASHScanResults"
1424
1424
}
2786
2786
"$ref": "#/$defs/CloudWatchLogsReporterConfigOptions",
2787
2787
"default": {
2788
2788
"aws_account_id": null,
2789
- "aws_region": null ,
2789
+ "aws_region": "us-west-2" ,
2790
2790
"log_group_name": null,
2791
2791
"log_stream_name": "ASHScanResults"
2792
2792
}
2821
2821
"type": "null"
2822
2822
}
2823
2823
],
2824
- "default": null ,
2824
+ "default": "us-west-2" ,
2825
2825
"title": "Aws Region"
2826
2826
},
2827
2827
"log_group_name": {
12916
12916
"name": "cloudwatch-logs",
12917
12917
"options": {
12918
12918
"aws_account_id": null,
12919
- "aws_region": null ,
12919
+ "aws_region": "us-west-2" ,
12920
12920
"log_group_name": null,
12921
12921
"log_stream_name": "ASHScanResults"
12922
12922
}
Original file line number Diff line number Diff line change 180
180
"name" : " cloudwatch-logs" ,
181
181
"options" : {
182
182
"aws_account_id" : null ,
183
- "aws_region" : null ,
183
+ "aws_region" : " us-west-2 " ,
184
184
"log_group_name" : null ,
185
185
"log_stream_name" : " ASHScanResults"
186
186
}
1022
1022
"$ref" : " #/$defs/CloudWatchLogsReporterConfigOptions" ,
1023
1023
"default" : {
1024
1024
"aws_account_id" : null ,
1025
- "aws_region" : null ,
1025
+ "aws_region" : " us-west-2 " ,
1026
1026
"log_group_name" : null ,
1027
1027
"log_stream_name" : " ASHScanResults"
1028
1028
}
1057
1057
"type" : " null"
1058
1058
}
1059
1059
],
1060
- "default" : null ,
1060
+ "default" : " us-west-2 " ,
1061
1061
"title" : " Aws Region"
1062
1062
},
1063
1063
"log_group_name" : {
2064
2064
"name" : " cloudwatch-logs" ,
2065
2065
"options" : {
2066
2066
"aws_account_id" : null ,
2067
- "aws_region" : null ,
2067
+ "aws_region" : " us-west-2 " ,
2068
2068
"log_group_name" : null ,
2069
2069
"log_stream_name" : " ASHScanResults"
2070
2070
}
You can’t perform that action at this time.
0 commit comments