Skip to content

initial @kbn/scout-security plugin#210433

Merged
MadameSheema merged 87 commits intoelastic:mainfrom
MadameSheema:scout/security
Mar 21, 2025
Merged

initial @kbn/scout-security plugin#210433
MadameSheema merged 87 commits intoelastic:mainfrom
MadameSheema:scout/security

Conversation

@MadameSheema
Copy link
Contributor

@MadameSheema MadameSheema commented Feb 10, 2025

Summary

Closes #210298

In this PR we are adding the initial structure for the @kibana/scout-security package, note that this is not ready to be used and any new test using this package, is not going to be executed as part of the regular pipelines, meaning, you are not going to add coverage to the application.


@kibana/scout-security package is a test package that extends @kbn/scout with test helpers specifically designed to test Security Solution functionalities in Kibana. All tests under Security plugins should only import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom Playwright fixtures, page objects, and utilities tailored for Security-related testing scenarios.

Things to follow-up:



  • CustomQueryRule interface is already declared in x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts as QueryRuleCreateProps
  • DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are already declared in @kbn/security-solution-plugin/common/constants

It would be great if all of that is extracted from the plugin to a package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to the different teams, appex-qa and myself will be the owners of it to make sure that best practices are followed

@MadameSheema
Copy link
Contributor Author

/ci

@MadameSheema
Copy link
Contributor Author

/ci

@MadameSheema
Copy link
Contributor Author

/ci

@MadameSheema
Copy link
Contributor Author

/ci

@csr
Copy link
Contributor

csr commented Mar 20, 2025

Scout will take a look at the .buildkite/scout_ci_config.yml file to see which Playwright tests to run.

Scout will run the tests of the plugins that are enabled, otherwise it will ignore those tests.

Unless you or Dima say otherwise, we can put the Security plugin in the disabled list so the Scout tests aren't run. I recommend this because you mentioned the following in the description:

note that this is not ready to be used and any new test using this package, is not going to be executed as part of the regular pipelines

No strong preference, and I'll wait for you and/or Dima to chime in on this, as you have better knowledge of the Security UI tests.

@MadameSheema
Copy link
Contributor Author

@csr completely fine with having the test disabled for now, at least until teams are properly onboarded :)

Lots of thanks for the clarification!

@dmlemeshko
Copy link
Contributor

Unless you or Dima say otherwise, we can put the Security plugin in the disabled list so the Scout tests aren't run. I recommend this because you mentioned the following in the description:

kbn-scout-security has few important customisations that might be good to test in CI while kbn-scout being in active develpment. I'm voting for adding it to enabled

@MadameSheema
Copy link
Contributor Author

kbn-scout-security has few important customisations that might be good to test in CI while kbn-scout being in active develpment. I'm voting for adding it to enabled

Enabling it then 🫡

Please note that in case of failure appex-qa or me should take action on it since no one from Security Solution has been onboarded yet in Scout :)

@dmlemeshko
Copy link
Contributor

dmlemeshko commented Mar 20, 2025

Quick checks also reported this


2025-03-20 14:57:31 UTC | warn [quick-checks] --- Lint TS Projects
2025-03-20 14:57:31 UTC | ERROR The following files do not belong to a tsconfig.json file
2025-03-20 14:57:31 UTC | - x-pack/solutions/security/plugins/security_solution/ui_tests/parallel.playwright.config.ts
2025-03-20 14:57:31 UTC | - xpack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts
2025-03-20 14:57:31 UTC | - x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/global_setup.ts
2025-03-20 14:57:31 UTC | ERROR see above errors

Upd: I pushed a fix

@dmlemeshko dmlemeshko self-requested a review March 20, 2025 15:22
Copy link
Contributor

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM! Great work! Thanks a lot for keeping it updated with all the requests we raised, we appriciate the effort 🚀 👏

@MadameSheema MadameSheema enabled auto-merge (squash) March 20, 2025 17:29
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 21, 2025

💛 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
@kbn/scout 113 119 +6
@kbn/scout-security - 66 +66
total +72

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/scout-security - 2 +2

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/scout 17 15 -2
@kbn/scout-security - 6 +6
total +4
Unknown metric groups

API count

id before after diff
@kbn/scout 424 441 +17
@kbn/scout-security - 356 +356
total +373

ESLint disabled line counts

id before after diff
securitySolution 577 578 +1

Total ESLint disabled count

id before after diff
securitySolution 660 661 +1

Unreferenced deprecated APIs

id before after diff
@kbn/scout-security - 18 +18

History

cc @MadameSheema

@MadameSheema MadameSheema merged commit d5a0501 into elastic:main Mar 21, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- [ResponseOps][Alerts] Create embeddable alerts table plugin (#213909)
- [Security Solution] Enable Cypress Tests for AI4DSOC effort (#214776)
- [scout] extend config-discovery with CI validator (#214403)
- [Inference] Inference CLI client (#214691)
- [Unified search] Change codeowners to presentation team (#212855)
- SKA: Update and breakdown x-pack/.gitignore (#212341)

Manual backport

To create the backport manually run:

node scripts/backport --pr 210433

Questions ?

Please refer to the Backport tool documentation

MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Mar 21, 2025
## Summary

Closes elastic#210298

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
(cherry picked from commit d5a0501)

# Conflicts:
#	.buildkite/scout_ci_config.yml
#	.github/CODEOWNERS
#	src/platform/packages/shared/kbn-es/src/stateful_resources/roles.yml
#	x-pack/solutions/security/plugins/security_solution/tsconfig.json
@MadameSheema
Copy link
Contributor Author

💚 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

@MadameSheema
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

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

Questions ?

Please refer to the Backport tool documentation

MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Mar 21, 2025
## Summary

Closes elastic#210298

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
(cherry picked from commit d5a0501)

# Conflicts:
#	.buildkite/scout_ci_config.yml
MadameSheema added a commit that referenced this pull request Mar 21, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [initial @kbn/scout-security plugin
(#210433)](#210433)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Gloria
Hornero","email":"gloria.hornero@elastic.co"},"sourceCommit":{"committedDate":"2025-03-21T10:59:30Z","message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","backport:version","Team: Sec Eng
Productivity","test:scout","v9.1.0","v8.19.0"],"title":"initial
@kbn/scout-security
plugin","number":210433,"url":"https://github.com/elastic/kibana/pull/210433","mergeCommit":{"message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210433","number":210433,"mergeCommit":{"message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/215527","number":215527,"state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
MadameSheema added a commit that referenced this pull request Mar 23, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [initial @kbn/scout-security plugin
(#210433)](#210433)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Gloria
Hornero","email":"gloria.hornero@elastic.co"},"sourceCommit":{"committedDate":"2025-03-21T10:59:30Z","message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","backport:version","Team: Sec Eng
Productivity","test:scout","v9.1.0","v8.19.0"],"title":"initial
@kbn/scout-security
plugin","number":210433,"url":"https://github.com/elastic/kibana/pull/210433","mergeCommit":{"message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210433","number":210433,"mergeCommit":{"message":"initial
@kbn/scout-security plugin (#210433)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/210298\n\nIn this PR we are
adding the initial structure for the\n@kibana/scout-security package,
note that this is not ready to be used\nand any new test using this
package, is not going to be executed as part\nof the regular pipelines,
meaning, you are not going to add coverage to\nthe
application.
\n\n@kibana/scout-security package is a test package that
extends @kbn/scout\nwith test helpers specifically designed to test
Security Solution\nfunctionalities in Kibana. All tests under Security
plugins should only\nimport from @kbn/scout-security, not
from @kbn/scout.

\n\nThis PR is a POC to start testing development by
providing custom\nPlaywright fixtures, page objects, and utilities
tailored for\nSecurity-related testing scenarios.\n\nThings to
follow-up:

\n\n- CustomQueryRule interface is already declared
in\n`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`\nas
`QueryRuleCreateProps`
\n- DETECTION_ENGINE_RULES_URL and
DETECTION_ENGINE_RULES_BULK_ACTION are\nalready declared in
`@kbn/security-solution-plugin/common/constants`\n\nIt would be great if
all of that is extracted from the plugin to a\npackage so it can be
reused instead of having to duplicate the code.\n\nUntil the package is
not ready to be used and has not been introduced to\nthe different
teams, appex-qa and myself will be the owners of it to\nmake sure that
best practices are followed\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>","sha":"d5a0501fb8148b4274a00921a6061d850b142f28"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
## Summary

Closes elastic#210298

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
cqliu1 pushed a commit to cqliu1/kibana that referenced this pull request Mar 31, 2025
## Summary

Closes elastic#210298

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
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 release_note:skip Skip the PR/issue when compiling release notes Team: Sec Eng Productivity AET Security Engineering Productivity team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. test:scout v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Scout] add kbn/scout-security with core structure for Security tests

7 participants