-
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][Detections Engine] Add note markdown field to backend #59796
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": 1 Test it like so: ./post_rule.sh ./rules/queries/query_with_everything.json That'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 |
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.
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 <[email protected]>
…#59947) * add new note markdown field to DE backend Co-authored-by: Elastic Machine <[email protected]>
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
note
field 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:
note
value./post_rule.sh
./patch_rule.sh
./update_rule.sh
note
value./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.json
removingnote
value prior to running (resulting in updated note having nonote
value any longer)Checklist
For maintainers