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

Failing test: X-Pack Detection Engine API Integration Tests.x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/threat_match·ts - detection engine api security and spaces enabled - rule execution logic Threat match type rules terms and match should have the same alerts with pagination #155304

Closed
Tracked by #161531
kibanamachine opened this issue Apr 19, 2023 · 21 comments
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Apr 19, 2023

A test failed on a tracked branch

Error: expected [ { 'kibana.version': '8.8.0-SNAPSHOT',
    'kibana.alert.rule.category': 'Indicator Match Rule',
    'kibana.alert.rule.consumer': 'siem',
    'kibana.alert.rule.producer': 'siem',
    'kibana.alert.rule.revision': 0,
    'kibana.alert.rule.rule_type_id': 'siem.indicatorRule',
    'kibana.space_ids': [ 'default' ],
    'kibana.alert.rule.tags': [],
    agent: 
     { ephemeral_id: '1b4978a0-48be-49b1-ac96-323425b389ab',
       hostname: 'zeek-sensor-amsterdam',
       id: 'e52588e6-7aa3-4c89-a2c4-d6bc5c286db1',
       type: 'auditbeat',
       version: '8.0.0' },
    auditd: 
     { data: [Object],
       message_type: 'user_err',
       result: 'fail',
       sequence: 2267,
       session: 'unset',
       summary: [Object] },
    cloud: 
     { instance: [Object],
       provider: 'digitalocean',
       region: 'ams3' },
    ecs: { version: '1.0.0-beta2' },
    host: 
     { architecture: 'x86_64',
       containerized: false,
       hostname: 'zeek-sensor-amsterdam',
       id: '2ce8b1e7d69e4a1d9c6bcddc473da9d9',
       name: 'zeek-sensor-amsterdam',
       os: [Object] },
    network: { direction: 'incoming' },
    process: { executable: '/usr/sbin/sshd', pid: 32739 },
    service: { type: 'auditd' },
    source: { ip: '46.101.47.213' },
    user: { audit: [Object], id: '0', name: 'root' },
    threat: { enrichments: [Object] },
    'event.action': 'error',
    'event.category': 'user-login',
    'event.module': 'auditd',
    'event.kind': 'signal',
    'kibana.alert.original_time': '2019-02-19T20:42:05.202Z',
    'kibana.alert.ancestors': [ [Object] ],
    'kibana.alert.status': 'active',
    'kibana.alert.workflow_status': 'open',
    'kibana.alert.depth': 1,
    'kibana.alert.severity': 'high',
    'kibana.alert.risk_score': 55,
    'kibana.alert.rule.actions': [],
    'kibana.alert.rule.author': [],
    'kibana.alert.rule.created_by': 'elastic',
    'kibana.alert.rule.description': 'Detecting root and admin users',
    'kibana.alert.rule.enabled': true,
    'kibana.alert.rule.exceptions_list': [],
    'kibana.alert.rule.false_positives': [],
    'kibana.alert.rule.from': '1900-01-01T00:00:00.000Z',
    'kibana.alert.rule.immutable': false,
    'kibana.alert.rule.interval': '5m',
    'kibana.alert.rule.indices': [ 'auditbeat-*' ],
    'kibana.alert.rule.max_signals': 100,
    'kibana.alert.rule.references': [],
    'kibana.alert.rule.risk_score_mapping': [],
    'kibana.alert.rule.severity_mapping': [],
    'kibana.alert.rule.threat': [],
    'kibana.alert.rule.to': 'now',
    'kibana.alert.rule.type': 'threat_match',
    'kibana.alert.rule.updated_by': 'elastic',
    'kibana.alert.rule.version': 1,
    'kibana.alert.rule.risk_score': 55,
    'kibana.alert.rule.severity': 'high',
    'kibana.alert.original_event.action': 'error',
    'kibana.alert.original_event.category': 'user-login',
    'kibana.alert.original_event.module': 'auditd' },
  { 'kibana.version': '8.8.0-SNAPSHOT',
    'kibana.alert.rule.category': 'Indicator Match Rule',
    'kibana.alert.rule.consumer': 'siem',
    'kibana.alert.rule.producer': 'siem',
    'kibana.alert.rule.revision': 0,
    'kibana.alert.rule.rule_type_id': 'siem.indicatorRule',
    'kibana.space_ids': [ 'default' ],
    'kibana.alert.rule.tags': [],
    agent: 
     { ephemeral_id: '1b4978a0-48be-49b1-ac96-323425b389ab',
       hostname: 'zeek-sensor-amsterdam',
       id: 'e52588e6-7aa3-4c89-a2c4-d6bc5c286db1',
       type: 'auditbeat',
       version: '8.0.0' },
    auditd: 
     { data: [Object],
       message_type: 'user_login',
       result: 'fail',
       sequence: 2266,
       session: 'unset',
       summary: [Object] },
    cloud: 
     { instance: [Object],
       provider: 'digitalocean',
       region: 'ams3' },
    ecs: { version: '1.0.0-beta2' },
    host: 
     { architecture: 'x86_64',
       containerized: false,
       hostname: 'zeek-sensor-amsterdam',
       id: '2ce8b1e7d69e4a1d9c6bcddc473da9d9',
       name: 'zeek-sensor-amsterdam',
       os: [Object] },
    network: { direction: 'incoming' },
    process: { executable: '/usr/sbin/sshd', pid: 32739 },
    service: { type: 'auditd' },
    source: { ip: '46.101.47.213' },
    user: { audit: [Object], id: '0', name: 'root' },
    threat: { enrichments: [Object] },
    'event.action': 'logged-in',
    'event.category': 'user-login',
    'event.module': 'auditd',
    'event.kind': 'signal',
    'kibana.alert.original_time': '2019-02-19T20:42:05.194Z',
    'kibana.alert.ancestors': [ [Object] ],
    'kibana.alert.status': 'active',
    'kibana.alert.workflow_status': 'open',
    'kibana.alert.depth': 1,
    'kibana.alert.severity': 'high',
    'kibana.alert.risk_score': 55,
    'kibana.alert.rule.actions': [],
    'kibana.alert.rule.author': [],
    'kibana.alert.rule.created_by': 'elastic',
    'kibana.alert.rule.description': 'Detecting root and admin users',
    'kibana.alert.rule.enabled': true,
    'kibana.alert.rule.exceptions_list': [],
    'kibana.alert.rule.false_positives': [],
    'kibana.alert.rule.from': '1900-01-01T00:00:00.000Z',
    'kibana.alert.rule.immutable': false,
    'kibana.alert.rule.interval': '5m',
    'kibana.alert.rule.indices': [ 'auditbeat-*' ],
    'kibana.alert.rule.max_signals': 100,
    'kibana.alert.rule.references': [],
    'kibana.alert.rule.risk_score_mapping': [],
    'kibana.alert.rule.severity_mapping': [],
    'kibana.alert.rule.threat': [],
    'kibana.alert.rule.to': 'now',
    'kibana.alert.rule.type': 'threat_match',
    'kibana.alert.rule.updated_by': 'elastic',
    'kibana.alert.rule.version': 1,
    'kibana.alert.rule.risk_score': 55,
    'kibana.alert.rule.severity': 'high',
    'kibana.alert.original_event.action': 'logged-in',
    'kibana.alert.original_event.category': 'user-login',
    'kibana.alert.original_event.module': 'auditd' },
  { 'kibana.version': '8.8.0-SNAPSHOT',
    'kibana.alert.rule.category': 'Indicator Match Rule',
    'kibana.alert.rule.consumer': 'siem',
    'kibana.alert.rule.producer': 'siem',
    'kibana.alert.rule.revision': 0,
    'kibana.alert.rule.rule_type_id': 'siem.indicatorRule',
    'kibana.space_ids': [ 'default' ],
    'kibana.alert.rule.tags': [],
    agent: 
     { ephemeral_id: '1b4978a0-48be-49b1-ac96-323425b389ab',
       hostname: 'zeek-sensor-amsterdam',
       id: 'e52588e6-7aa3-4c89-a2c4-d6bc5c286db1',
       type: 'auditbeat',
       version: '8.0.0' },
    auditd: 
     { data: [Object],
       message_type: 'user_login',
       result: 'fail',
       sequence: 2265,
       session: 'unset',
       summary: [Object] },
    cloud: 
     { instance: [Object],
       provider: 'digitalocean',
       region: 'ams3' },
    ecs: { version: '1.0.0-beta2' },
    host: 
     { architecture: 'x86_64',
       containerized: false,
       hostname: 'zeek-sensor-amsterdam',
       id: '2ce8b1e7d69e4a1d9c6bcddc473da9d9',
       name: 'zeek-sensor-amsterdam',
       os: [Object] },
    network: { direction: 'incoming' },
    process: { executable: '/usr/sbin/sshd', pid: 32739 },
    service: { type: 'auditd' },
    source: { ip: '46.101.47.213' },
    user: { audit: [Object], id: '0', name: 'root' },
    threat: { enrichments: [Object] },
    'event.action': 'logged-in',
    'event.category': 'user-login',
    'event.module': 'auditd',
    'event.kind': 'signal',
    'kibana.alert.original_time': '2019-02-19T20:42:05.190Z',
    'kibana.alert.ancestors': [ [Object] ],
    'kibana.alert.status': 'active',
    'kibana.alert.workflow_status': 'open',
    'kibana.alert.depth': 1,
    'kibana.alert.severity': 'high',
    'kibana.alert.risk_score': 55,
    'kibana.alert.rule.actions': [],
    'kibana.alert.rule.author': [],
    'kibana.alert.rule.created_by': 'elastic',
    'kibana.alert.rule.description': 'Detecting root and admin users',
    'kibana.alert.rule.enabled': true,
    'kibana.alert.rule.exceptions_list': [],
    'kibana.alert.rule.false_positives': [],
    'kibana.alert.rule.from': '1900-01-01T00:00:00.000Z',
    'kibana.alert.rule.immutable': false,
    'kibana.alert.rule.interval': '5m',
    'kibana.alert.rule.indices': [ 'auditbeat-*' ],
    'kibana.alert.rule.max_signals': 100,
    'kibana.alert.rule.references': [],
[report_failure] output truncated to 8192 characters

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Apr 19, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 19, 2023
@kibanamachine kibanamachine added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Apr 19, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 19, 2023
@MadameSheema MadameSheema added the Team:Detections and Resp Security Detection Response Team label Apr 20, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@MadameSheema MadameSheema added the Team:Security Solution Platform Security Solution Platform Team label Apr 20, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@jbudz
Copy link
Member

jbudz commented Apr 27, 2023

/skip

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.8

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

jbudz added a commit that referenced this issue Apr 28, 2023
jbudz added a commit that referenced this issue Apr 28, 2023
@jbudz
Copy link
Member

jbudz commented Apr 28, 2023

Skipped

main: 24927cb
8.8: d050720

@yctercero yctercero added Team:Detection Engine Security Solution Detection Engine Area and removed Team:Security Solution Platform Security Solution Platform Team labels May 14, 2023
@rylnd
Copy link
Contributor

rylnd commented May 17, 2023

For posterity: this test was introduced to cover the changes in #144511.

As an aside: the failure message for this test is not helpful as the diff is too large to output. Perhaps it would make sense to compare these alerts in series, so that the failure shows two single objects? Just a thought.

@yctercero
Copy link
Contributor

Merged in the PR unskipping these as running them multiple times locally and on the flakey test runner did not reveal any failures.

Lets keep in mind @rylnd 's suggestion if this pops up again.

PR: #156489

@rylnd
Copy link
Contributor

rylnd commented May 18, 2023

If anyone happens to have reproduced this locally and was able to actually observe full failure message, please share here! Do we think this was simply a false negative?

@kibanamachine kibanamachine reopened this May 22, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

mistic added a commit that referenced this issue May 22, 2023
@mistic
Copy link
Member

mistic commented May 22, 2023

Skipped.

main: 39dad65

delanni pushed a commit to delanni/kibana that referenced this issue May 25, 2023
@nkhristinin nkhristinin mentioned this issue Jun 21, 2023
nkhristinin added a commit that referenced this issue Jun 22, 2023
## Unskip IM rule tests

It's a tricky test fail, which not reproduces locally, also in the [PR]
CI can be green(#156489) but
eventually [can failed on
main](#155304)

In this attempt, I change the test to narrow amount of alerts for a rule
which has 2 potential benefits:

1. if there is a resources problem this rule will execute faster

2. We can read the error message if it fails on the maiт.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@yctercero
Copy link
Contributor

Unskipped here #160094

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@MadameSheema
Copy link
Member

Hey @yctercero may you please take a look at this new failure when you have the chance? Thanks!

@yctercero
Copy link
Contributor

@MadameSheema the detections team is working 8.10 to address all open flakey and skipped tests. Will add this one to the list.

@nkhristinin
Copy link
Contributor

There another PR which should address it

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@WafaaNasr
Copy link
Contributor

WafaaNasr commented Jul 13, 2023

Running it through flaky runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2625

@WafaaNasr
Copy link
Contributor

After successfully running this test through the Flaky Test Runner for 100 iterations without any failures, it has been determined that the test is not truly flaky or failing. As a result, the ticket can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

9 participants