-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SIEM][Detection Engine] - Update UI to read rule exceptions_list #69939
Closed
Closed
Changes from 11 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
3b19da1
Updates list entry schema, exposes exception list client, updates tests
yctercero 3388918
create new de list schema and unit tests
yctercero e977f00
updated route unit tests and types to match new list schema
yctercero 55e29c9
updated existing DE exceptions code so it should now work as is with …
yctercero 65e47ca
test and types cleanup
yctercero a2f6286
cleanup
yctercero 6b728fe
Merge branch 'master' of github.com:yctercero/kibana into de_lists
yctercero 53536f8
update unit test
yctercero 1713e7f
Merge branch 'master' of github.com:yctercero/kibana into de_lists
yctercero 373fe8c
updates per feedback
yctercero 60c3e88
updated ui to accept exceptions list
yctercero 4a9a23f
Merge branch 'master' of github.com:yctercero/kibana into exceptions_ui
yctercero 223869e
update unit test
yctercero 1f1761f
Merge branch 'master' of github.com:yctercero/kibana into exceptions_ui
yctercero 042228a
Merge branch 'master' of github.com:yctercero/kibana into exceptions_ui
yctercero ff28bac
reverted type changes
yctercero 001be67
updated rule exception list param to also include list type
yctercero e50e831
Merge branch 'master' of github.com:yctercero/kibana into exceptions_ui
yctercero 81d26fc
[Security Solution] Renames the `Investigate in Resolver` Timeline ac…
andrew-goldstein 4f65a02
types cleanup
yctercero 113962e
Update component templates list to render empty prompt inside of cont…
cjcenizal 5fcf803
Fix saved query modal overlay (#68826)
patrykkopycinski f5b2800
[kbn/optimizer] only build specified themes (#70389)
23ea7ac
[Maps] Fix cannot select Solid fill-color when removing fields (#70621)
nreese 20237b8
[EPM] Use higher priority than default templates (#70640)
jonathan-buttner 67c70e7
Add Snapshot Restore README with quick-testing steps. (#70494)
cjcenizal 6c62c68
chore(NA): upgrade to lodash@4 (#69868)
mistic ebcec3a
[Maps] show vector tile labels on top (#69444)
nreese 21efd23
Fixed adding an extra space character on selecting alert variable in …
YulNaumenko 5226ea2
[Alerting] document requirements for developing new action types (#69…
pmuellr 54348a7
[Ingest Manager] Add ability to sort to agent configs and package con…
jen-huang 97ad58c
[ML] Changing shared module setup function parameters (#70589)
jgowdyelastic 169147b
[Uptime] Prevent duplicate requests on load for index status (#70585)
shahzad31 f1888cd
[Rum Dashbaord] Rum selected service view (#70579)
shahzad31 5159635
[Ingest Pipelines] Load from json (#70297)
jloleysens 8bc27ec
[APM] Optimize services overview (#69648)
dgieselaar bc1599e
[Composable template] Create / Edit wizard (#70220)
sebelga d1e6aa7
[Ingest Manager] Update registry URL to point to snapshot registry (#…
ruflin fa2f60e
[Uptime] Use elastic charts donut (#70364)
shahzad31 a916e0a
[Lens] Add ability to set colors for y-axis series (#70311)
mbondyra 571a610
Handle timeouts on creating templates (#70635)
72b3004
[Ingest Manager] Improve agent unenrollment with unenroll action (#70…
nchaulet e70fcc7
[Telemetry] Add documentation about Application Usage (#70624)
afharo bbda3f9
[Lens] Fitting functions (#69820)
flash1293 f3573f3
[Logs UI] Logs overview queries for the observability dashboard (#70413)
e1da6a1
Add googlecloud metricbeat module to Kibana Home (#70652)
kaiyan-sheng 97ca7bf
Update dependency @elastic/charts to v19.7.0 (#69791)
renovate[bot] 7ec48fd
[Logs UI] Reorganise log rate anomaly table (#69516)
Kerry350 78fc9fb
[SECURITY] Bug fix for topN on draggables (#70450)
XavierM c3cacba
logout from transform_poweruser user in after method of transform tes…
fd15268
[functional tests] test url field formatter on dashboard and discover…
dmlemeshko e429670
[Security Solution][Endpoint] Update to new manifest format (without …
madirey 86672a7
skip flaky suite (#70762)
mistic c96d9b4
skip flaky suite (#70764)
mistic 5418533
Merge branch 'exceptions_ui' of https://github.com/yctercero/kibana i…
yctercero 372c32f
updated failing tests
yctercero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
61 changes: 61 additions & 0 deletions
61
x-pack/plugins/lists/common/schemas/types/default_namespace.test.ts
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,61 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { pipe } from 'fp-ts/lib/pipeable'; | ||
import { left } from 'fp-ts/lib/Either'; | ||
|
||
import { foldLeftRight, getPaths } from '../../siem_common_deps'; | ||
|
||
import { DefaultNamespace } from './default_namespace'; | ||
|
||
describe('default_namespace', () => { | ||
test('it should validate "single"', () => { | ||
const payload = 'single'; | ||
const decoded = DefaultNamespace.decode(payload); | ||
const message = pipe(decoded, foldLeftRight); | ||
|
||
expect(getPaths(left(message.errors))).toEqual([]); | ||
expect(message.schema).toEqual(payload); | ||
}); | ||
|
||
test('it should validate "agnostic"', () => { | ||
const payload = 'agnostic'; | ||
const decoded = DefaultNamespace.decode(payload); | ||
const message = pipe(decoded, foldLeftRight); | ||
|
||
expect(getPaths(left(message.errors))).toEqual([]); | ||
expect(message.schema).toEqual(payload); | ||
}); | ||
|
||
test('it defaults to "single" if "undefined"', () => { | ||
const payload = undefined; | ||
const decoded = DefaultNamespace.decode(payload); | ||
const message = pipe(decoded, foldLeftRight); | ||
|
||
expect(getPaths(left(message.errors))).toEqual([]); | ||
expect(message.schema).toEqual('single'); | ||
}); | ||
|
||
test('it defaults to "single" if "null"', () => { | ||
const payload = null; | ||
const decoded = DefaultNamespace.decode(payload); | ||
const message = pipe(decoded, foldLeftRight); | ||
|
||
expect(getPaths(left(message.errors))).toEqual([]); | ||
expect(message.schema).toEqual('single'); | ||
}); | ||
|
||
test('it should NOT validate if not "single" or "agnostic"', () => { | ||
const payload = 'something else'; | ||
const decoded = DefaultNamespace.decode(payload); | ||
const message = pipe(decoded, foldLeftRight); | ||
|
||
expect(getPaths(left(message.errors))).toEqual([ | ||
`Invalid value "something else" supplied to "DefaultNamespace"`, | ||
]); | ||
expect(message.schema).toEqual({}); | ||
}); | ||
}); |
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
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
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
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
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
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
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
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
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
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
24 changes: 24 additions & 0 deletions
24
x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json
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,24 @@ | ||
{ | ||
"list_id": "endpoint_list", | ||
"item_id": "endpoint_list_item_lg_val_list", | ||
"_tags": ["endpoint", "process", "malware", "os:windows"], | ||
"tags": ["user added string for a tag", "malware"], | ||
"type": "simple", | ||
"description": "This is a sample exception list item with a large value list included", | ||
"name": "Sample Endpoint Exception List Item with large value list", | ||
"comments": [], | ||
"entries": [ | ||
{ | ||
"field": "event.module", | ||
"operator": "excluded", | ||
"type": "match_any", | ||
"value": ["zeek"] | ||
}, | ||
{ | ||
"field": "source.ip", | ||
"operator": "excluded", | ||
"type": "list", | ||
"list": { "id": "list-ip", "type": "ip" } | ||
} | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
x-pack/plugins/lists/server/scripts/lists/new/list_ip_item.json
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"id": "hand_inserted_item_id", | ||
"list_id": "list-ip", | ||
"value": "127.0.0.1" | ||
"value": "10.4.2.140" | ||
} |
7 changes: 7 additions & 0 deletions
7
x-pack/plugins/security_solution/common/detection_engine/lists_common_deps.ts
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,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export { EntriesArray, namespaceType } from '../../../lists/common/schemas'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this changed to snake case to match the request body? I would expect it to be
namespaceType
everywhere except the API call, which sendsnamespace_type: namespaceType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea it was. Would I specify that change from
namespace_type
tonamespaceType
in the graphql types?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working to update this and a found bug.