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

[7.x] Fixes runtime error with meta when it is missing (#75844) #75991

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

FrankHassanabad
Copy link
Contributor

Backports the following commits to 7.x:

## Summary

Found in 7.9.0, if you post a rule with an action that has a missing "meta" then you are going to get errors in your UI that look something like:

```ts
An error occurred during rule execution: message: "Cannot read property 'kibana_siem_app_url' of null"
name: "Unusual Windows Remote User" id: "1cc27e7e-d7c7-4f6a-b918-8c272fc6b1a3"
rule id: "1781d055-5c66-4adf-9e93-fc0fa69550c9" signals index: ".siem-signals-default"
```

This fixes the accidental referencing of the null/undefined property and adds both integration and unit tests in that area of code.

If you have an action id handy you can manually test this by editing the json file of:

```ts
test_cases/queries/action_without_meta.json
```

to have your action id and then posting it like so:

```ts
./post_rule.sh ./rules/test_cases/queries/action_without_meta.json
```

### Checklist

Delete any items that are not applicable to this PR.

- [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
@FrankHassanabad
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

distributable file count

id value diff baseline
total 54920 +1 54919

History

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

@FrankHassanabad FrankHassanabad merged commit 57637ef into elastic:7.x Aug 26, 2020
@FrankHassanabad FrankHassanabad deleted the backport/7.x/pr-75844 branch August 26, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants