Skip to content

[8.x] [Security Solution] add defend insights elastic assistant tool (#198676)#201104

Merged
joeypoon merged 2 commits intoelastic:8.xfrom
joeypoon:backport/8.x/pr-198676
Nov 21, 2024
Merged

[8.x] [Security Solution] add defend insights elastic assistant tool (#198676)#201104
joeypoon merged 2 commits intoelastic:8.xfrom
joeypoon:backport/8.x/pr-198676

Conversation

@joeypoon
Copy link
Member

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…ic#198676)

### Summary
Adds the new Defend Insights Elastic Assistant tool. This assistant tool
provides Elastic Defend configuration insights. For this initial PR,
only incompatible antivirus detection is supported. Telemetry is
collected for success and error events.

For incompatible antivirus detection, Defend Insights will review the
last 200 file events for the given endpoint and output suspected
antiviruses. Improvements such as customizable event count and date
range will come in the future.

This PR does not include any UI, that will come in a separate PR. 3
internal APIs for interacting with Defend Insights are provided here:
- `POST /defend_insights` for creating a new Defend Insight
- `GET /defend_insights/{id}` for getting a Defend Insight
- `GET /defend_insights` for getting multiple Defend Insights
	- available optional query params:
		- `size` - default 10
		- `ids`
		- `connector_id`
		- `type` - `incompatible_antivirus`
		- `status` - `running`, `completed`, `failed`, `canceled`
		- `endpoint_ids`

This initial implementation does not include the LangGraph/output
chunking upgrades seen in Attack Discovery due to time constraints.
We'll look to make this upgrade in a future PR.

### Checklist

- [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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)

(cherry picked from commit efc0568)

# Conflicts:
#	.github/CODEOWNERS
@joeypoon joeypoon added the backport This PR is a backport of another PR label Nov 21, 2024
@joeypoon joeypoon enabled auto-merge (squash) November 21, 2024 10:26
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
integrationAssistant 466 471 +5
securitySolution 6203 6208 +5
total +10

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
@kbn/elastic-assistant-common 369 405 +36

Async chunks

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

id before after diff
securitySolution 13.4MB 13.4MB +97.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 86.1KB 86.1KB +18.0B
Unknown metric groups

API count

id before after diff
@kbn/elastic-assistant-common 400 442 +42

ESLint disabled in files

id before after diff
elasticAssistant 0 5 +5

ESLint disabled line counts

id before after diff
elasticAssistant 32 34 +2

Total ESLint disabled count

id before after diff
elasticAssistant 32 39 +7

@joeypoon joeypoon merged commit 5f44bd5 into elastic:8.x Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants