[SIEM][Detections Engine] Add note markdown field to backend#59796
[SIEM][Detections Engine] Add note markdown field to backend#59796yctercero merged 7 commits intoelastic:masterfrom
Conversation
note markdown fieldnote markdown field to backend
|
Pinging @elastic/siem (Team:SIEM) |
...plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts
Show resolved
Hide resolved
...gacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts
Outdated
Show resolved
Hide resolved
...k/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts
Show resolved
Hide resolved
note markdown field to backend
...gacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts
Outdated
Show resolved
Hide resolved
...ck/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts
Show resolved
Hide resolved
|
You will want to add a note to this file: Something like this within that file: "timeline_id": "timeline_id",
"timeline_title": "timeline_title",
"note": "Some note for you",
"version": 1Test it like so: ./post_rule.sh ./rules/queries/query_with_everything.jsonThat's the file we communicate with people such as documentation and front end tests and we use it to test things manually if the need comes up. In the queries folder I would add something like this query file and contents:
{
"name": "Query with a note",
"description": "Query with a note",
"rule_id": "query-with-note",
"risk_score": 1,
"severity": "high",
"type": "query",
"query": "user.name: root or user.name: admin",
"note": "Hello I am a markdown note"
}And then in the patches and update folder I would add something similar so it's easy for us to run manual tests when we need to and that would pretty much complete the feature. You can run the |
x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
FrankHassanabad
left a comment
There was a problem hiding this comment.
Thanks for all the updates for this and the tests. I checked it out and tested it and everything looks really good and the code reads really clean. LGTM! 👍
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…#59796) * add new note markdown field to DE backend Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Summary
This is part of #59176 - breaking up into backend and frontend PRs.
Problem to solve/Customer Benefit: Analysts need as much context as possible when investigating signals. If a richer format of information can be provided to them via their UX, then they may become more effective at completing investigations and cases.
This PR adds new
notefield for markdown and updates unit tests. One of the bigger considerations in implementing this new field was how it should deal with backwards compatibility (migration, schema requirements, etc). Decided to make the new field optional (and no default if not present) on the way in and optional on the way out.Manual tests done:
notevalue./post_rule.sh./patch_rule.sh./update_rule.shnotevalue./post_rule.sh ./rules/queries/query_with_note.json./patch_rule.sh ./rules/patches/update_note.json./update_rule.sh ./rules/updates/update_note.json./update_rule.sh ./rules/updates/update_note.jsonremovingnotevalue prior to running (resulting in updated note having nonotevalue any longer)Checklist
For maintainers