Skip to content

[7.9] Fixes runtime error with meta when it is missing (#75844)#75992

Merged
FrankHassanabad merged 1 commit intoelastic:7.9from
FrankHassanabad:backport/7.9/pr-75844
Aug 26, 2020
Merged

[7.9] Fixes runtime error with meta when it is missing (#75844)#75992
FrankHassanabad merged 1 commit intoelastic:7.9from
FrankHassanabad:backport/7.9/pr-75844

Conversation

@FrankHassanabad
Copy link
Contributor

Backports the following commits to 7.9:

## 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 FrankHassanabad added the backport This PR is a backport of another PR label Aug 26, 2020
@FrankHassanabad
Copy link
Contributor Author

@elasticmachine merge upstream

@FrankHassanabad
Copy link
Contributor Author

retest this

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@FrankHassanabad FrankHassanabad merged commit b737548 into elastic:7.9 Aug 26, 2020
@FrankHassanabad FrankHassanabad deleted the backport/7.9/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

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants