Skip to content

[Security Solution] Add ESLint rules used at Observability#169277

Closed
banderror wants to merge 1 commit intoelastic:mainfrom
banderror:add-eslint-rules-for-security-solution
Closed

[Security Solution] Add ESLint rules used at Observability#169277
banderror wants to merge 1 commit intoelastic:mainfrom
banderror:add-eslint-rules-for-security-solution

Conversation

@banderror
Copy link
Contributor

@banderror banderror commented Oct 18, 2023

Summary

Over the past couple months, Observability folks have developed some ESLint rules that help them with writing JSX:

  • @kbn/telemetry/event_generating_elements_should_be_instrumented. An ESLint rule which can auto-add a data-test-subj value to event-generating Eui elements (buttons, inputs, etc). The suggested value is based on the location of the file, component name, and Eui component name. ESLint Telemetry Rule #153108

  • @kbn/i18n/strings_should_be_translated_with_i18n, @kbn/i18n/strings_should_be_translated_with_formatted_message An ESLint rule which can auto-replace a text string in a component with either a i18n.translate or <FormattedMessage /> with a suggested id based on the location of the file, component name and parent wrapping element name. Add ESLint rule for Translations #168001

They're currently enabled for all Observability and ML apps, they haven't been enabled for Security yet. Perhaps they can be of use to us too.

eslint.mov
telemetry.mov

@banderror banderror added Team:Detections and Resp Security Detection Response Team Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Detection Rule Management Security Detection Rule Management Team Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team Team:Threat Hunting:Explore es-lint labels Oct 18, 2023
@banderror banderror self-assigned this Oct 18, 2023
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 3 times, most recently from bfcfb1b to 2f1931c Compare November 7, 2023 10:21
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 3 times, most recently from d567747 to bdf3bf2 Compare November 13, 2023 12:39
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 4 times, most recently from 5e1452c to 0ca47b5 Compare November 24, 2023 13:17
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 3 times, most recently from 5511a6c to 6f56881 Compare December 5, 2023 11:49
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch from 2f8c206 to 0ee2618 Compare December 7, 2023 12:34
@kibana-ci
Copy link

kibana-ci commented Dec 7, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #6 / Authentication Host Table Component rendering it renders the host authentication table
  • [job] [logs] Jest Tests #6 / Authentication User Table Component rendering it renders the user authentication table
  • [job] [logs] Jest Tests #13 / Details Panel Component DetailsPanel:EventDetails: rendering it should render the Event Details Panel when the panelView is set and the associated params are set
  • [job] [logs] Jest Tests #16 / ImportDataModal renders correctly against snapshot
  • [job] [logs] Jest Tests #16 / ImportDataModal should import file, with warnings
  • [job] [logs] Jest Tests #16 / ImportDataModal should import file, with warnings but no action_connectors_success_count
  • [job] [logs] Jest Tests #6 / IndexPatternsMissingPrompt renders correctly against snapshot
  • [job] [logs] Jest Tests #16 / item_details_card ItemDetailsAction should render correctly
  • [job] [logs] Jest Tests #16 / JobsTableFilters renders correctly against snapshot
  • [job] [logs] Jest Tests #16 / LinkToApp component should render with href
  • [job] [logs] Jest Tests #16 / LinkToApp component should render with minimum input
  • [job] [logs] Jest Tests #6 / Paginated Table Component rendering it renders the default load more table

Metrics [docs]

Async chunks

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

id before after diff
cases 443.5KB 444.5KB +1.0KB
securitySolution 15.3MB 15.3MB +21.8KB
securitySolutionEss 42.7KB 42.8KB +75.0B
securitySolutionServerless 361.1KB 361.5KB +445.0B
total +23.3KB

History

  • 💔 Build #181760 failed 2f8c206f7867564d30014c63e53c6d35708822aa
  • 💔 Build #180899 failed 5511a6c1374a9f5826f08ab9f638e2363d5e5d16
  • 💔 Build #180233 failed 1ab7c5025c7403b282f33ed36a04155ca17a98c4
  • 💔 Build #178807 failed 10a2a2ef4be11103b34bd8434f48499da0f18a80

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

cc @banderror

@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 5 times, most recently from a7f3d55 to 90013e5 Compare December 18, 2023 10:19
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch from 90013e5 to 6629d00 Compare December 19, 2023 11:39
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 3 times, most recently from 4ad0e01 to 5c961ef Compare February 13, 2024 11:38
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 4 times, most recently from 01243ce to 76216b5 Compare February 21, 2024 11:15
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 2 times, most recently from f37b763 to 3a8f65c Compare February 23, 2024 11:00
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 4 times, most recently from 17acbc2 to dfb6376 Compare March 11, 2024 10:38
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 2 times, most recently from 299b0bb to 4ce1243 Compare March 18, 2024 11:01
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 5 times, most recently from 9332d2c to 0a401ad Compare March 27, 2024 17:03
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 2 times, most recently from ed68fb8 to 25796f5 Compare April 5, 2024 13:11
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch from 25796f5 to 8708384 Compare April 16, 2024 09:46
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch from 8708384 to f8df1c1 Compare April 25, 2024 15:52
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 2 times, most recently from 4f2595c to a11a5df Compare May 8, 2024 20:26
@banderror banderror force-pushed the add-eslint-rules-for-security-solution branch 3 times, most recently from d0a9c72 to c000dc6 Compare May 31, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

es-lint skip-ci Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants