Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cypress | create detector specs update #518

Merged
merged 76 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1b688fe
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 24, 2023
9daf6d9
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
bb04a08
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
0d7362e
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
b952bb3
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
3d2a1f3
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
4e0b834
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 26, 2023
ee8afd9
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 27, 2023
dea7ddc
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 27, 2023
7649e8c
[FEATURE] Create global state object for async requests #491
jovancacvetkovic Mar 27, 2023
fae75fb
[FEATURE] Provide empty states for Findings and Alerts page #471
jovancacvetkovic Mar 28, 2023
25e736d
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Mar 31, 2023
9997e3b
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 3, 2023
b2af923
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 3, 2023
a29bb41
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 4, 2023
01ebf2d
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 4, 2023
03a33b9
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 4, 2023
cf61b42
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 5, 2023
d8d0c5f
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic Apr 5, 2023
f933e28
[FEATURE] Create detector \ Refactor and move field mapping to first …
jovancacvetkovic Apr 5, 2023
8b2e529
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic Apr 5, 2023
ebe7665
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic Apr 5, 2023
9302003
[FEATURE] Create global state object for async requests #493
jovancacvetkovic Apr 6, 2023
62055c8
[FEATURE] Create global state object for async requests #493
jovancacvetkovic Apr 6, 2023
e3afea6
[FEATURE] Create detector \ Refactor alert triggers per mocks #498
jovancacvetkovic Apr 6, 2023
43209b5
[FEATURE] Create global state object for async requests #493
jovancacvetkovic Apr 7, 2023
9612f85
[FEATURE] Create global state object for async requests #493
jovancacvetkovic Apr 7, 2023
2260cfc
[FEATURE] Create detector \ Refactor alert triggers per mocks #498
jovancacvetkovic Apr 7, 2023
e6bec6a
[FEATURE] Create detector \ Refactor alert triggers per mocks #498
jovancacvetkovic Apr 7, 2023
45eacc0
[FEATURE] Update detector details component #502
jovancacvetkovic Apr 7, 2023
5b0e4ec
[FEATURE] Update detector details component #502
jovancacvetkovic Apr 7, 2023
cbde065
[FEATURE] Update detector details component #502
jovancacvetkovic Apr 7, 2023
0abac6b
[FEATURE] Update detector details component #502
jovancacvetkovic Apr 7, 2023
a7632b1
Feature] update detector details component #504
jovancacvetkovic Apr 7, 2023
4531714
Merge branch 'Provide_empty_states_for_Findings_and_Alerts_page' of h…
jovancacvetkovic Apr 10, 2023
28bcb15
Merge branch '_FEATURE]_Update_detector_details_component_#502' of ht…
jovancacvetkovic Apr 10, 2023
a89c6e6
Merge branch 'move_field_mappings_to_first_page' of https://github.co…
jovancacvetkovic Apr 10, 2023
1ff249e
Merge branch 'detector_async_global_state' of https://github.com/jova…
jovancacvetkovic Apr 10, 2023
2c019b7
Feature] update detector details component #504
jovancacvetkovic Apr 10, 2023
b4a1c2e
Update detector details component #504
jovancacvetkovic Apr 12, 2023
c51c159
[FEATURE] Deleting detectors should delete all related dashboards (in…
jovancacvetkovic Apr 12, 2023
5333bc6
cypress tests
jovancacvetkovic Apr 13, 2023
c19365f
cypress tests
jovancacvetkovic Apr 13, 2023
5132463
cypress tests
jovancacvetkovic Apr 13, 2023
c960a56
cypress tests
jovancacvetkovic Apr 13, 2023
2788f6c
cypress tests
jovancacvetkovic Apr 13, 2023
f9674c2
cypress tests
jovancacvetkovic Apr 13, 2023
97c29be
cypress tests
jovancacvetkovic Apr 15, 2023
6f7766e
cypress tests
jovancacvetkovic Apr 15, 2023
db214d1
cypress tests
jovancacvetkovic Apr 15, 2023
915e490
cypress tests
jovancacvetkovic Apr 15, 2023
8b98a73
cypress tests
jovancacvetkovic Apr 17, 2023
9a76799
cypress tests
jovancacvetkovic Apr 17, 2023
35b9d90
[BUG] No space between the detector details and the rule panel #522
jovancacvetkovic Apr 17, 2023
37b9483
[BUG] No space between the detector details and the rule panel #522
jovancacvetkovic Apr 18, 2023
f10b5b6
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic Apr 20, 2023
27cb71a
updated create detectors cypress specs
jovancacvetkovic Apr 24, 2023
03ffd68
updated create detectors cypress specs
jovancacvetkovic Apr 24, 2023
c0056fe
updated create detectors cypress specs
jovancacvetkovic Apr 24, 2023
1c12d60
updated create detectors cypress specs
jovancacvetkovic Apr 24, 2023
036d5dc
updated create detectors cypress specs
jovancacvetkovic Apr 24, 2023
e2172d4
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
c63e602
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
3c22dd8
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
9b30a64
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
00ca405
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
dbf3623
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
15fd5ce
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
a424bd6
updated create detectors cypress specs
jovancacvetkovic Apr 25, 2023
c24eefc
refactored util methods into cypress commands
jovancacvetkovic Apr 27, 2023
fcdc332
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic Apr 27, 2023
c3decdd
refactored util methods into cypress commands
jovancacvetkovic Apr 27, 2023
272b58d
Merge branch 'main' of https://github.com/opensearch-project/security…
jovancacvetkovic May 3, 2023
70a7b2c
cypress tests
jovancacvetkovic May 3, 2023
c6de200
cypress tests wait interval updated to 400
jovancacvetkovic May 3, 2023
f2350a9
Merge branch 'main' into cypress_tests
amsiglan May 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"requestTimeout": 300000,
"responseTimeout": 300000,
"baseUrl": "http://localhost:5601",
"retries": 1,
"env": {
"opensearch_url": "localhost:9200",
"opensearch_dashboards": "http://localhost:5601",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
"triggers": [
{
"name": "DNS name alert",
"sev_levels": ["low"],
"tags": ["dns.low"],
"sev_levels": ["high"],
"tags": ["dns.high"],
"actions": [
{
"id": "",
"name": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: Cypress DNS Detector",
"name": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: Cypress DNS Detector",
"destination_id": "",
"subject_template": {
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: Cypress DNS Detector",
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: Cypress DNS Detector",
"lang": "mustache"
},
"message_template": {
"source": "Triggered alert condition: \nSeverity: 1 (Highest)\nThreat detector: Cypress DNS Detector\nDescription: Detects DNS names.\nDetector data sources:\n\tdns",
"source": "Triggered alert condition: \nSeverity: 1 (Highest) \nThreat detector: Cypress DNS Detector\nDescription: Detects DNS names.\nDetector data sources:\n\tdns",
"lang": "mustache"
},
"throttle_enabled": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"properties": {
"dns-answers-type": {
"type": "alias",
"path": "DnsAnswerType"
"path": "dns.answers.type"
},
"dns-question-name": {
"type": "alias",
"path": "DnsQuestionName"
"path": "dns.question.name"
},
"dns-question-registered_domain": {
"type": "alias",
"path": "DnsQuestionRegisteredDomain"
"path": "dns.question.registered_domain"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
"triggers": [
{
"name": "USB plugged in alert",
"sev_levels": ["low"],
"sev_levels": ["high"],
"tags": ["windows.usb"],
"actions": [
{
"id": "",
"name": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: USB Detector",
"destination_id": "",
"subject_template": {
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: USB Detector",
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: USB Detector",
"lang": "mustache"
},
"message_template": {
"source": "Triggered alert condition: \nSeverity: 1 (Highest)\nThreat detector: USB Detector\nDescription: Detect USB plugged in.\nDetector data sources:\n\twindows",
"source": "Triggered alert condition: \nSeverity: 1 (Highest) \nThreat detector: USB Detector\nDescription: Detect USB plugged in.\nDetector data sources:\n\twindows",
"lang": "mustache"
},
"throttle_enabled": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
{
"properties": {
"event_uid": {
"winlog-event_id": {
"type": "alias",
"path": "EventID"
"path": "winlog.event_id"
},
"windows-event_data-CommandLine": {
"winlog-provider_name": {
"type": "alias",
"path": "CommandLine"
},
"windows-hostname": {
"type": "alias",
"path": "HostName"
},
"windows-message": {
"type": "alias",
"path": "Message"
},
"windows-provider-name": {
"type": "alias",
"path": "Provider_Name"
},
"windows-servicename": {
"type": "alias",
"path": "ServiceName"
"path": "winlog.provider_name"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"DnsAnswerType": "QWE",
"DnsQuestionRegisteredDomain": "EC2AMAZ-EPWO7HKA",
"DnsQuestionName": "QWE"
"dns.answers.type": "AnswerType",
"dns.question.registered_domain": "EC2AMAZ-EPWO7HKA",
"dns.question.name": "QuestionName"
}
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
{
"EventTime": "2020-02-04T14:59:39.343541+00:00",
"HostName": "EC2AMAZ-EPO7HKA",
"Keywords": "9223372036854775808",
"SeverityValue": 2,
"Severity": "ERROR",
"EventID": 2003,
"SourceName": "Microsoft-Windows-Sysmon",
"ProviderGuid": "{5770385F-C22A-43E0-BF4C-06F5698FFBD9}",
"Version": 5,
"TaskValue": 22,
"OpcodeValue": 0,
"RecordNumber": 9532,
"ExecutionProcessID": 1996,
"ExecutionThreadID": 2616,
"Channel": "Microsoft-Windows-Sysmon/Operational",
"Domain": "NT AUTHORITY",
"AccountName": "SYSTEM",
"UserID": "S-1-5-18",
"AccountType": "User",
"Message": "Dns query:\r\nRuleName: \r\nUtcTime: 2020-02-04 14:59:38.349\r\nProcessGuid: {b3c285a4-3cda-5dc0-0000-001077270b00}\r\nProcessId: 1904\r\nQueryName: EC2AMAZ-EPO7HKA\r\nQueryStatus: 0\r\nQueryResults: 172.31.46.38;\r\nImage: C:\\Program Files\\nxlog\\nxlog.exe",
"Category": "Dns query (rule: DnsQuery)",
"Opcode": "Info",
"UtcTime": "2020-02-04 14:59:38.349",
"ProcessGuid": "{b3c285a4-3cda-5dc0-0000-001077270b00}",
"ProcessId": "1904",
"QueryName": "EC2AMAZ-EPO7HKA",
"QueryStatus": "0",
"QueryResults": "172.31.46.38;",
"Image": "C:\\Program Files\\nxlog\\regsvr32.exe",
"EventReceivedTime": "2020-02-04T14:59:40.780905+00:00",
"SourceModuleName": "in",
"SourceModuleType": "im_msvistalog",
"CommandLine": "eachtest",
"Initiated": "true",
"Provider_Name": "Service_ws_Control_ws_Manager",
"TargetObject": "\\SOFTWARE\\Microsoft\\Office\\Outlook\\Security",
"EventType": "SetValue"
"winlog.event_id": "2003"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"mappings": {
"properties": {
"DnsAnswerType": {
"dns.answers.type": {
"type": "text"
},
"DnsQuestionRegisteredDomain": {
"dns.question.name": {
"type": "text"
},
"DnsQuestionName": {
"dns.question.registered_domain": {
"type": "text"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
{
"mappings": {
"properties": {
"CommandLine": {
"type": "text"
},
"EventID": {
"winlog.event_id": {
"type": "integer"
},
"HostName": {
"type": "text"
},
"Message": {
"type": "text"
},
"Provider_Name": {
"type": "text"
},
"ServiceName": {
"winlog.provider_name": {
"type": "text"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
],
"tags": [
{
"value": "dns.low"
"value": "dns.high"
}
],
"log_source": "",
"detection": "selection:\n query:\n - QWE\n - ASD\n - YXC\ncondition: selection",
"level": "low",
"detection": "selection:\n dns-question-name:\n - QuestionName\ncondition: selection",
"level": "high",
"false_positives": [
{
"value": ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"id": "25b9c01c-350d-4b95-bed1-836d04a4f325",
"category": "dns",
"title": "Cypress DNS Type Rule",
"description": "Detects DNS type as QWE",
"status": "experimental",
"author": "Cypress Tests",
"references": [
{
"value": ""
}
],
"tags": [
{
"value": "dns.high"
}
],
"log_source": "",
"detection": "selection:\n dns-answers-type:\n - AnswerType\ncondition: selection",
"level": "high",
"false_positives": [
{
"value": ""
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
],
"tags": [
{
"value": "network.low"
"value": "network.high"
}
],
"log_source": "",
"detection": "selection:\n keywords:\n - erase\n - delete\n - YXC\ncondition: selection",
"level": "low",
"level": "high",
"false_positives": [
{
"value": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}
],
"log_source": "",
"detection": "selection:\n EventID:\n - 2003\n - 2100\n - 2102\ncondition: selection",
"level": "low",
"detection": "selection:\n winlog-event_id:\n - 2003\n - 2100\n - 2102\ncondition: selection",
"level": "high",
"false_positives": [
{
"value": ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dns-question-registered_domain": "dns.question.registered_domain",
"dns-question-name": "dns.question.name",
"dns-answers-type": "dns.answers.type"
}
12 changes: 2 additions & 10 deletions cypress/fixtures/sample_alias_mappings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{
"properties": {
"source_ip": {
"winlog-event_id": {
"type": "alias",
"path": "src_ip"
},
"windows-event_data-CommandLine": {
"path": "CommandLine",
"type": "alias"
},
"event_uid": {
"path": "EventID",
"type": "alias"
"path": "winlog.event_id"
}
}
}
14 changes: 9 additions & 5 deletions cypress/fixtures/sample_detector.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,30 @@
"id": "1a4bd6e3-4c6e-405d-a9a3-53a116e341d4"
}
],
"custom_rules": []
"custom_rules": [
{
"id": ""
}
]
}
}
],
"triggers": [
{
"name": "sample_alert_condition",
"sev_levels": [],
"sev_levels": ["high"],
"tags": [],
"actions": [
{
"id": "",
"name": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: sample_detector",
"destination_id": "",
"subject_template": {
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: sample_detector",
"source": "Triggered alert condition: - Severity: 1 (Highest) - Threat detector: sample_detector",
"lang": "mustache"
},
"message_template": {
"source": "Triggered alert condition: \nSeverity: 1 (Highest)\nThreat detector: sample_detector\nDescription: Description for sample_detector.\nDetector data sources:\n\twindows",
"source": "Triggered alert condition: \nSeverity: 1 (Highest) \nThreat detector: sample_detector\nDescription: Description for sample_detector.\nDetector data sources:\n\twindows",
"lang": "mustache"
},
"throttle_enabled": false,
Expand All @@ -51,7 +55,7 @@
],
"types": ["windows"],
"severity": "4",
"ids": ["1a4bd6e3-4c6e-405d-a9a3-53a116e341d4"]
"ids": []
}
]
}
21 changes: 21 additions & 0 deletions cypress/fixtures/sample_dns_index_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"mappings": {
"properties": {
"dns.question.name": {
"type": "text"
},
"dns.answers.type": {
"type": "text"
},
"dns.question.registered_domain": {
"type": "text"
}
}
},
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "1"
}
}
}
Loading