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

[SIEM] Server NP Followup #64010

Merged
merged 10 commits into from
Apr 21, 2020
Merged

[SIEM] Server NP Followup #64010

merged 10 commits into from
Apr 21, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Apr 20, 2020

Summary

A few quick "good citizen" changes now that SIEM is on the new platform (#63430)

  • Exports our plugin contracts (which are currently empty)
  • Adds mocks for plugin API (currently: SiemClient)
  • Removes some unused files/constants

For maintainers

rylnd added 7 commits April 20, 2020 14:58
This was moved to a constant in common/constants.
Omit is now part of Typescript, and Pick3 is unused.
Instead of our plugin index, which could only cause circular
dependencies.
We were backgrounding the process (&) instead of ANDing it with the
linting. Whoops!
@rylnd rylnd added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.8.0 labels Apr 20, 2020
@rylnd rylnd self-assigned this Apr 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@@ -5,7 +5,7 @@
"private": true,
"license": "Elastic-License",
"scripts": {
"extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js & node ../../../scripts/eslint ../../legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix",
"extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js && node ../../../scripts/eslint ../../legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@XavierM @FrankHassanabad With this fix, when I run the script I get a single change:

diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts
index 16ab733652..160e006c4d 100644
--- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts
+++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts
@@ -187,7 +187,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [
   },
 ];
 
-export const technique = [
+export const techniques = [
   {
     name: '.bash_profile and .bashrc',
     id: 'T1156',

which looks to be because #55883 changed the generated file but not the script itself. Should I just update the script to match?

Copy link
Contributor

Choose a reason for hiding this comment

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

That is true, you want the name technique without an s. I was rushed to get that fix in before FF and forgot to update and run these scripts.

@rylnd rylnd requested review from XavierM and spong April 20, 2020 21:09
rylnd added 2 commits April 20, 2020 19:58
I missed this one when grepping, but typescript and CI saved me.
This was causing some test failures as I forgot to update the client mock
@rylnd rylnd marked this pull request as ready for review April 21, 2020 14:24
@rylnd rylnd requested a review from a team as a code owner April 21, 2020 14:24
Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for removing the older Types we don't need anymore that are part of TypeScript now.

My my how ⏲️ flys

This was changed in elastic#55883 but the
script was not updated accordingly.
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@rylnd rylnd merged commit ff5971a into elastic:master Apr 21, 2020
@rylnd rylnd deleted the siem_server_np_followup branch April 21, 2020 19:27
rylnd added a commit that referenced this pull request Apr 21, 2020
* Remove unused file

This was moved to a constant in common/constants.

* Remove unused types

Omit is now part of Typescript, and Pick3 is unused.

* Define and export SIEM's plugin contracts

They're empty for now.

* Import config type from config file

Instead of our plugin index, which could only cause circular
dependencies.

* SiemClient API uses getter function instead of direct property access

* Add public mock for SiemClient

* Fix typo in extract-mitre-attacks script

We were backgrounding the process (&) instead of ANDing it with the
linting. Whoops!

* Remove missed instance of old siemClient API

I missed this one when grepping, but typescript and CI saved me.

* Use our client mock in our test suite

This was causing some test failures as I forgot to update the client mock

* Update script following updates to the output's usage

This was changed in #55883 but the
script was not updated accordingly.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 22, 2020
* master: (29 commits)
  [Dashboard] Deangularize navbar, attempt nr. 2 (elastic#61611)
  refactor action filter creation utils (elastic#62969)
  Refresh index pattern list before redirecting (elastic#63329)
  [APM]fixing custom link unit tests (elastic#64045)
  [Ingest] EPM & Fleet are enabled when Ingest is enabled (elastic#64103)
  [Alerting] Fixed bug with no possibility to edit the index name after adding (elastic#64033)
  [Maps] Map settings: min and max zoom (elastic#63714)
  [kbn-storybook] Use raw loader for text files (elastic#64108)
  [EPM] /packages/{package} endpoint to support upgrades (elastic#63629)
  [SIEM] New Platform Saved Objects Registration (elastic#64029)
  [Endpoint] Hook to handle events needing navigation via Router (elastic#63863)
  Fixed small issue in clone functionality (elastic#64085)
  [Endpoint]EMT-146: use ingest agent for status info (elastic#63921)
  [SIEM] Server NP Followup (elastic#64010)
  Register uiSettings on New Platform (elastic#64015)
  [Reporting] Integration polling config with client code (elastic#63754)
  [Docs]7.7 SIEM doc updates (elastic#63951)
  [SIEM] [Cases] Tags suggestions (elastic#63878)
  Include datasource UUID in agent config yaml, adjust overflow height of yaml view (elastic#64027)
  [DOCS] Add file size setting for Data Visualizer (elastic#64006)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 22, 2020
…ana into task-manager/cancel-logging

* 'task-manager/cancel-logging' of github.com:gmmorris/kibana: (28 commits)
  [Dashboard] Deangularize navbar, attempt nr. 2 (elastic#61611)
  refactor action filter creation utils (elastic#62969)
  Refresh index pattern list before redirecting (elastic#63329)
  [APM]fixing custom link unit tests (elastic#64045)
  [Ingest] EPM & Fleet are enabled when Ingest is enabled (elastic#64103)
  [Alerting] Fixed bug with no possibility to edit the index name after adding (elastic#64033)
  [Maps] Map settings: min and max zoom (elastic#63714)
  [kbn-storybook] Use raw loader for text files (elastic#64108)
  [EPM] /packages/{package} endpoint to support upgrades (elastic#63629)
  [SIEM] New Platform Saved Objects Registration (elastic#64029)
  [Endpoint] Hook to handle events needing navigation via Router (elastic#63863)
  Fixed small issue in clone functionality (elastic#64085)
  [Endpoint]EMT-146: use ingest agent for status info (elastic#63921)
  [SIEM] Server NP Followup (elastic#64010)
  Register uiSettings on New Platform (elastic#64015)
  [Reporting] Integration polling config with client code (elastic#63754)
  [Docs]7.7 SIEM doc updates (elastic#63951)
  [SIEM] [Cases] Tags suggestions (elastic#63878)
  Include datasource UUID in agent config yaml, adjust overflow height of yaml view (elastic#64027)
  [DOCS] Add file size setting for Data Visualizer (elastic#64006)
  ...
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants