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

[Attack discovery] Add utils for testing #182918

Merged

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented May 8, 2024

Summary

Add load_attack_discovery_data script that populates alerts data for Attack discovery testing

To load Attack discovery data to the existing instance:

node x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js --kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl http://127.0.0.1:9220

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski patrykkopycinski marked this pull request as ready for review May 15, 2024 09:29
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner December 19, 2024 16:00
Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

LGTM! Left a small question :-)

{
description: `Loads data into a environment for testing/development`,
flags: {
string: ['kibanaUrl', 'username', 'password'],
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't we have elasticsearchUrl here?

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #10 / FileActionsPopoverButton clicking the button opens the popover
  • [job] [logs] x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts / Serverless Observability - Deployment-agnostic API integration tests observability AI Assistant When there are knowledge base entries (from 8.15 or earlier) that does not contain semantic_text embeddings "after all" hook in "When there are knowledge base entries (from 8.15 or earlier) that does not contain semantic_text embeddings"
  • [job] [logs] x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts / Serverless Observability - Deployment-agnostic API integration tests observability AI Assistant When there are knowledge base entries (from 8.15 or earlier) that does not contain semantic_text embeddings "before all" hook in "When there are knowledge base entries (from 8.15 or earlier) that does not contain semantic_text embeddings"

Metrics [docs]

✅ unchanged

History

cc @patrykkopycinski

@patrykkopycinski patrykkopycinski merged commit 2c9e55d into elastic:main Jan 14, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@patrykkopycinski patrykkopycinski deleted the feat/attack-discovery-e2e branch January 14, 2025 21:45
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 14, 2025
## Summary

Add `load_attack_discovery_data` script that populates alerts data for
Attack discovery testing

To load Attack discovery data to the existing instance:
```
node x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js --kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl http://127.0.0.1:9220
```

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Mark Hopkin <[email protected]>
(cherry picked from commit 2c9e55d)
@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 Jan 14, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Attack discovery] Add utils for testing
(#182918)](#182918)

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

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-14T21:45:28Z","message":"[Attack
discovery] Add utils for testing (#182918)\n\n## Summary\r\n\r\nAdd
`load_attack_discovery_data` script that populates alerts data
for\r\nAttack discovery testing\r\n\r\nTo load Attack discovery data to
the existing instance:\r\n```\r\nnode
x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js
--kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl
http://127.0.0.1:9220\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Mark Hopkin
<[email protected]>","sha":"2c9e55dc44a27f4781ae50e55e9b42dc5eb6f1fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Feature:Security
Assistant","Team:Security Generative AI"],"title":"[Attack discovery]
Add utils for
testing","number":182918,"url":"https://github.com/elastic/kibana/pull/182918","mergeCommit":{"message":"[Attack
discovery] Add utils for testing (#182918)\n\n## Summary\r\n\r\nAdd
`load_attack_discovery_data` script that populates alerts data
for\r\nAttack discovery testing\r\n\r\nTo load Attack discovery data to
the existing instance:\r\n```\r\nnode
x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js
--kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl
http://127.0.0.1:9220\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Mark Hopkin
<[email protected]>","sha":"2c9e55dc44a27f4781ae50e55e9b42dc5eb6f1fb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182918","number":182918,"mergeCommit":{"message":"[Attack
discovery] Add utils for testing (#182918)\n\n## Summary\r\n\r\nAdd
`load_attack_discovery_data` script that populates alerts data
for\r\nAttack discovery testing\r\n\r\nTo load Attack discovery data to
the existing instance:\r\n```\r\nnode
x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js
--kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl
http://127.0.0.1:9220\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Mark Hopkin
<[email protected]>","sha":"2c9e55dc44a27f4781ae50e55e9b42dc5eb6f1fb"}}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
## Summary

Add `load_attack_discovery_data` script that populates alerts data for
Attack discovery testing

To load Attack discovery data to the existing instance:
```
node x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js --kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl http://127.0.0.1:9220
```

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Mark Hopkin <[email protected]>
patrykkopycinski added a commit that referenced this pull request Jan 24, 2025
## Summary

Followup for #182918. 
Compressed content and switched to load `.ndjson.gz`directly
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 24, 2025
## Summary

Followup for elastic#182918.
Compressed content and switched to load `.ndjson.gz`directly

(cherry picked from commit 67bedde)
kibanamachine added a commit that referenced this pull request Jan 24, 2025
#208255)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Attack discovery] Optimize attack discovery test data
(#206885)](#206885)

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

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-24T18:15:07Z","message":"[Attack
discovery] Optimize attack discovery test data (#206885)\n\n##
Summary\r\n\r\nFollowup for
#182918. \r\nCompressed content
and switched to load
`.ndjson.gz`directly","sha":"67bedde849b502ee366b341ae66a19eb03f71ac3","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative
AI","backport:version","v8.18.0"],"title":"[Attack discovery] Optimize
attack discovery test
data","number":206885,"url":"https://github.com/elastic/kibana/pull/206885","mergeCommit":{"message":"[Attack
discovery] Optimize attack discovery test data (#206885)\n\n##
Summary\r\n\r\nFollowup for
#182918. \r\nCompressed content
and switched to load
`.ndjson.gz`directly","sha":"67bedde849b502ee366b341ae66a19eb03f71ac3"}},"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/206885","number":206885,"mergeCommit":{"message":"[Attack
discovery] Optimize attack discovery test data (#206885)\n\n##
Summary\r\n\r\nFollowup for
#182918. \r\nCompressed content
and switched to load
`.ndjson.gz`directly","sha":"67bedde849b502ee366b341ae66a19eb03f71ac3"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Jan 27, 2025
## Summary

Followup for elastic#182918. 
Compressed content and switched to load `.ndjson.gz`directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.