-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cloudwatch and inspector discard regex tests and cases
- Loading branch information
Showing
7 changed files
with
485 additions
and
14 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ation_template/discard_regex_test_module/configuration_cloudwatch_discard_regex_json.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- sections: | ||
- section: wodle | ||
attributes: | ||
- name: aws-s3 | ||
elements: | ||
- disabled: | ||
value: 'no' | ||
- service: | ||
attributes: | ||
- type: SERVICE_TYPE | ||
elements: | ||
- aws_profile: | ||
value: qa | ||
- aws_log_groups: | ||
value: LOG_GROUP_NAME | ||
- only_logs_after: | ||
value: ONLY_LOGS_AFTER | ||
- regions: | ||
value: REGIONS | ||
- discard_regex: | ||
attributes: | ||
- field: DISCARD_FIELD | ||
value: DISCARD_REGEX |
21 changes: 21 additions & 0 deletions
21
...emplate/discard_regex_test_module/configuration_cloudwatch_discard_regex_simple_text.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- sections: | ||
- section: wodle | ||
attributes: | ||
- name: aws-s3 | ||
elements: | ||
- disabled: | ||
value: 'no' | ||
- service: | ||
attributes: | ||
- type: SERVICE_TYPE | ||
elements: | ||
- aws_profile: | ||
value: qa | ||
- aws_log_groups: | ||
value: LOG_GROUP_NAME | ||
- only_logs_after: | ||
value: ONLY_LOGS_AFTER | ||
- regions: | ||
value: REGIONS | ||
- discard_regex: | ||
value: DISCARD_REGEX |
21 changes: 21 additions & 0 deletions
21
...nfiguration_template/discard_regex_test_module/configuration_inspector_discard_regex.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- sections: | ||
- section: wodle | ||
attributes: | ||
- name: aws-s3 | ||
elements: | ||
- disabled: | ||
value: 'no' | ||
- service: | ||
attributes: | ||
- type: SERVICE_TYPE | ||
elements: | ||
- aws_profile: | ||
value: qa | ||
- only_logs_after: | ||
value: ONLY_LOGS_AFTER | ||
- regions: | ||
value: REGIONS | ||
- discard_regex: | ||
attributes: | ||
- field: DISCARD_FIELD | ||
value: DISCARD_REGEX |
17 changes: 17 additions & 0 deletions
17
...st_aws/data/test_cases/discard_regex_test_module/cases_cloudwatch_discard_regex_json.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- name: cloudwatch_discard_regex_json | ||
description: CloudWatch discard regex configuration for JSON logs | ||
configuration_parameters: | ||
SERVICE_TYPE: cloudwatchlogs | ||
LOG_GROUP_NAME: wazuh-cloudwatchlogs-integration-tests | ||
REGIONS: us-east-1 | ||
DISCARD_FIELD: networkInterfaces.networkInterfaceId | ||
DISCARD_REGEX: .*eni-networkInterfaceId* | ||
ONLY_LOGS_AFTER: 2023-JUL-03 | ||
metadata: | ||
service_type: cloudwatchlogs | ||
log_group_name: wazuh-cloudwatchlogs-integration-tests | ||
only_logs_after: 2023-JUL-03 | ||
discard_field: networkInterfaces.networkInterfaceId | ||
discard_regex: .*eni-networkInterfaceId.* | ||
regions: us-east-1 | ||
found_logs: 1 |
15 changes: 15 additions & 0 deletions
15
...data/test_cases/discard_regex_test_module/cases_cloudwatch_discard_regex_simple_text.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- name: cloudwatch_discard_regex_simple_text | ||
description: CloudWatch discard regex configuration for simple text logs | ||
configuration_parameters: | ||
SERVICE_TYPE: cloudwatchlogs | ||
LOG_GROUP_NAME: wazuh-cloudwatchlogs-integration-tests | ||
REGIONS: us-east-1 | ||
DISCARD_REGEX: .*Test.* | ||
ONLY_LOGS_AFTER: 2023-JAN-12 | ||
metadata: | ||
service_type: cloudwatchlogs | ||
log_group_name: wazuh-cloudwatchlogs-integration-tests | ||
only_logs_after: 2023-JAN-12 | ||
discard_regex: .*Test.* | ||
regions: us-east-1 | ||
found_logs: 3 |
15 changes: 15 additions & 0 deletions
15
...ion/test_aws/data/test_cases/discard_regex_test_module/cases_inspector_discard_regex.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- name: inspector_discard_regex | ||
description: Inspector discard regex configurations | ||
configuration_parameters: | ||
SERVICE_TYPE: inspector | ||
REGIONS: us-east-1 | ||
DISCARD_FIELD: assetAttributes.tags.value | ||
DISCARD_REGEX: .*inspector-integration-test.* | ||
ONLY_LOGS_AFTER: 2023-JAN-12 | ||
metadata: | ||
service_type: inspector | ||
only_logs_after: 2023-JAN-12 | ||
discard_field: assetAttributes.tags.value | ||
discard_regex: .*inspector-integration-test.* | ||
regions: us-east-1 | ||
found_logs: 4 |
Oops, something went wrong.