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

[Security Assistant] Adds Security Labs Knowledge Base content #184885

Merged
merged 38 commits into from
Oct 3, 2024

Conversation

spong
Copy link
Member

@spong spong commented Jun 5, 2024

Summary

This PR adds the Elastic Security Labs content to the Security Assistant Knowledge Base. Content is currently indexed and embedded from its source .mdx, and we're using the same default chunking strategy as with the ESQL documentation at the moment. Since some of this content is quite large, we may want to explore other chunking strategies.

Now you can ask to fetch your recent alerts and ask if there's any Elastic Security Labs content about them 🙂.

LangSmith trace here.

Malware alerts courtesy of @jamesspi's https://github.com/jamesspi/ohmymalware project

image

Checklist

Delete any items that are not applicable to this PR.

@spong spong marked this pull request as ready for review July 9, 2024 16:05
@spong spong requested review from a team as code owners July 9, 2024 16:05
@spong spong added the ci:cloud-deploy Create or update a Cloud deployment label Jul 9, 2024
@elastic elastic deleted a comment from kibana-ci Jul 16, 2024
@spong spong added the ci:cloud-persist-deployment Persist cloud deployment indefinitely label Jul 17, 2024
Copy link
Contributor

@patrykkopycinski patrykkopycinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file can be fully reverted now, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
elasticAssistant 38 37 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.5MB 20.5MB +205.0B
Unknown metric groups

API count

id before after diff
elasticAssistant 53 52 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @spong

@patrykkopycinski patrykkopycinski merged commit 3499fbb into elastic:main Oct 3, 2024
51 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11171211328

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 3, 2024
…ic#184885)

## Summary

This PR adds the [Elastic Security
Labs](https://www.elastic.co/security-labs) content to the Security
Assistant Knowledge Base. Content is currently indexed and embedded from
its source `.mdx`, and we're using the same default chunking strategy as
with the ESQL documentation at the moment. Since some of this content is
quite large, we may want to explore other chunking strategies.

Now you can ask to fetch your recent alerts and ask if there's any
Elastic Security Labs content about them 🙂.

LangSmith trace
[here](https://smith.langchain.com/public/0e906acd-ab56-479d-b6d2-9c7538f54d45/r).

Malware alerts courtesy of @jamesspi's
https://github.com/jamesspi/ohmymalware project <img width="16"
src="https://user-images.githubusercontent.com/2946766/141219243-86619f7f-c300-4355-96f5-316d70aa6a0e.png"
/>

<p align="center">
<img width="375"
src="https://github.com/elastic/kibana/assets/2946766/750b6dc5-90b9-444e-be1d-c3df892dae61"
/> <img width="375"
src="https://github.com/elastic/kibana/assets/2946766/e052cea0-ada4-4099-8b97-be05c1379b00"
/>
</p>

<img width="2056" alt="image"
src="https://github.com/user-attachments/assets/9a58a064-deb3-4ad4-a3a9-bb72d056e8b4">

### Checklist

Delete any items that are not applicable to this PR.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
* Feature currently behind feature flag. Documentation to be added
before flag is removed. Tracked in
elastic/security-docs#5337
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 3499fbb)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 4, 2024
…184885) (#194886)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Assistant] Adds Security Labs Knowledge Base content
(#184885)](#184885)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Garrett
Spong","email":"spong@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-03T23:22:03Z","message":"[Security
Assistant] Adds Security Labs Knowledge Base content (#184885)\n\n##
Summary\r\n\r\nThis PR adds the [Elastic
Security\r\nLabs](https://www.elastic.co/security-labs) content to the
Security\r\nAssistant Knowledge Base. Content is currently indexed and
embedded from\r\nits source `.mdx`, and we're using the same default
chunking strategy as\r\nwith the ESQL documentation at the moment. Since
some of this content is\r\nquite large, we may want to explore other
chunking strategies.\r\n\r\nNow you can ask to fetch your recent alerts
and ask if there's any\r\nElastic Security Labs content about them
🙂.\r\n\r\nLangSmith
trace\r\n[here](https://smith.langchain.com/public/0e906acd-ab56-479d-b6d2-9c7538f54d45/r).\r\n\r\nMalware
alerts courtesy of
@jamesspi's\r\nhttps://github.com/jamesspi/ohmymalware project <img
width=\"16\"\r\nsrc=\"https://user-images.githubusercontent.com/2946766/141219243-86619f7f-c300-4355-96f5-316d70aa6a0e.png\"\r\n/>\r\n\r\n\r\n<p
align=\"center\">\r\n<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/750b6dc5-90b9-444e-be1d-c3df892dae61\"\r\n/>
<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/e052cea0-ada4-4099-8b97-be05c1379b00\"\r\n/>\r\n</p>
\r\n\r\n<img width=\"2056\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9a58a064-deb3-4ad4-a3a9-bb72d056e8b4\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n* Feature
currently behind feature flag. Documentation to be added\r\nbefore flag
is removed. Tracked
in\r\nhttps://github.com/elastic/security-docs/issues/5337\r\n- [X]
[Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk Kopycinski
<contact@patrykkopycinski.com>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3499fbbc831ce6b9e65f73a9eb11b9677701c963","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative
AI","v8.16.0","backport:version"],"title":"[Security Assistant] Adds
Security Labs Knowledge Base
content","number":184885,"url":"https://github.com/elastic/kibana/pull/184885","mergeCommit":{"message":"[Security
Assistant] Adds Security Labs Knowledge Base content (#184885)\n\n##
Summary\r\n\r\nThis PR adds the [Elastic
Security\r\nLabs](https://www.elastic.co/security-labs) content to the
Security\r\nAssistant Knowledge Base. Content is currently indexed and
embedded from\r\nits source `.mdx`, and we're using the same default
chunking strategy as\r\nwith the ESQL documentation at the moment. Since
some of this content is\r\nquite large, we may want to explore other
chunking strategies.\r\n\r\nNow you can ask to fetch your recent alerts
and ask if there's any\r\nElastic Security Labs content about them
🙂.\r\n\r\nLangSmith
trace\r\n[here](https://smith.langchain.com/public/0e906acd-ab56-479d-b6d2-9c7538f54d45/r).\r\n\r\nMalware
alerts courtesy of
@jamesspi's\r\nhttps://github.com/jamesspi/ohmymalware project <img
width=\"16\"\r\nsrc=\"https://user-images.githubusercontent.com/2946766/141219243-86619f7f-c300-4355-96f5-316d70aa6a0e.png\"\r\n/>\r\n\r\n\r\n<p
align=\"center\">\r\n<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/750b6dc5-90b9-444e-be1d-c3df892dae61\"\r\n/>
<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/e052cea0-ada4-4099-8b97-be05c1379b00\"\r\n/>\r\n</p>
\r\n\r\n<img width=\"2056\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9a58a064-deb3-4ad4-a3a9-bb72d056e8b4\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n* Feature
currently behind feature flag. Documentation to be added\r\nbefore flag
is removed. Tracked
in\r\nhttps://github.com/elastic/security-docs/issues/5337\r\n- [X]
[Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk Kopycinski
<contact@patrykkopycinski.com>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3499fbbc831ce6b9e65f73a9eb11b9677701c963"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184885","number":184885,"mergeCommit":{"message":"[Security
Assistant] Adds Security Labs Knowledge Base content (#184885)\n\n##
Summary\r\n\r\nThis PR adds the [Elastic
Security\r\nLabs](https://www.elastic.co/security-labs) content to the
Security\r\nAssistant Knowledge Base. Content is currently indexed and
embedded from\r\nits source `.mdx`, and we're using the same default
chunking strategy as\r\nwith the ESQL documentation at the moment. Since
some of this content is\r\nquite large, we may want to explore other
chunking strategies.\r\n\r\nNow you can ask to fetch your recent alerts
and ask if there's any\r\nElastic Security Labs content about them
🙂.\r\n\r\nLangSmith
trace\r\n[here](https://smith.langchain.com/public/0e906acd-ab56-479d-b6d2-9c7538f54d45/r).\r\n\r\nMalware
alerts courtesy of
@jamesspi's\r\nhttps://github.com/jamesspi/ohmymalware project <img
width=\"16\"\r\nsrc=\"https://user-images.githubusercontent.com/2946766/141219243-86619f7f-c300-4355-96f5-316d70aa6a0e.png\"\r\n/>\r\n\r\n\r\n<p
align=\"center\">\r\n<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/750b6dc5-90b9-444e-be1d-c3df892dae61\"\r\n/>
<img
width=\"375\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/e052cea0-ada4-4099-8b97-be05c1379b00\"\r\n/>\r\n</p>
\r\n\r\n<img width=\"2056\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9a58a064-deb3-4ad4-a3a9-bb72d056e8b4\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n* Feature
currently behind feature flag. Documentation to be added\r\nbefore flag
is removed. Tracked
in\r\nhttps://github.com/elastic/security-docs/issues/5337\r\n- [X]
[Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk Kopycinski
<contact@patrykkopycinski.com>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3499fbbc831ce6b9e65f73a9eb11b9677701c963"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
tiansivive pushed a commit to tiansivive/kibana that referenced this pull request Oct 7, 2024
…ic#184885)

## Summary

This PR adds the [Elastic Security
Labs](https://www.elastic.co/security-labs) content to the Security
Assistant Knowledge Base. Content is currently indexed and embedded from
its source `.mdx`, and we're using the same default chunking strategy as
with the ESQL documentation at the moment. Since some of this content is
quite large, we may want to explore other chunking strategies.

Now you can ask to fetch your recent alerts and ask if there's any
Elastic Security Labs content about them 🙂.

LangSmith trace
[here](https://smith.langchain.com/public/0e906acd-ab56-479d-b6d2-9c7538f54d45/r).

Malware alerts courtesy of @jamesspi's
https://github.com/jamesspi/ohmymalware project <img width="16"
src="https://user-images.githubusercontent.com/2946766/141219243-86619f7f-c300-4355-96f5-316d70aa6a0e.png"
/>


<p align="center">
<img width="375"
src="https://github.com/elastic/kibana/assets/2946766/750b6dc5-90b9-444e-be1d-c3df892dae61"
/> <img width="375"
src="https://github.com/elastic/kibana/assets/2946766/e052cea0-ada4-4099-8b97-be05c1379b00"
/>
</p> 

<img width="2056" alt="image"
src="https://github.com/user-attachments/assets/9a58a064-deb3-4ad4-a3a9-bb72d056e8b4">


### Checklist

Delete any items that are not applicable to this PR.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
* Feature currently behind feature flag. Documentation to be added
before flag is removed. Tracked in
elastic/security-docs#5337
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants