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 Cloud Security Posture API Tests.x-pack/test/cloud_security_posture_api/routes/vulnerabilities_dashboard·ts - Cloud Security Posture Vulnerability Dashboard API responds with a 200 status code and matching data mock #195839

Closed
kibanamachine opened this issue Oct 10, 2024 · 5 comments · Fixed by #195993
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Cloud Security Cloud Security team related

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 10, 2024

A test failed on a tracked branch

Error: expected { cnvmStatistics: 
   { criticalCount: 0,
     highCount: 1,
     mediumCount: 1,
     resourcesScanned: 2,
     cloudAccounts: 1 },
  vulnTrends: 
   [ { high: 0,
       policy_template: 'vuln_mgmt',
       critical: 0,
       low: 0,
       vulnerabilities_stats_by_cloud_account: {},
       medium: 0 } ],
  topVulnerableResources: 
   [ { resource: [Object],
       vulnerabilityCount: 1,
       cloudRegion: 'eu-west-1' },
     { resource: [Object],
       vulnerabilityCount: 1,
       cloudRegion: 'eu-west-1' } ],
  topPatchableVulnerabilities: 
   [ { cve: 'CVE-2015-8390',
       cvss: [Object],
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       vulnerabilityCount: 1 },
     { cve: 'CVE-2015-8394',
       cvss: [Object],
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       vulnerabilityCount: 1 } ],
  topVulnerabilities: 
   [ { cve: 'CVE-2015-8390',
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       packageName: 'glib2',
       packageVersion: '2.56.1-9.amzn2.0.5',
       severity: 'MEDIUM',
       vulnerabilityCount: 1,
       cvss: [Object] },
     { cve: 'CVE-2015-8394',
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       packageName: 'glib2',
       packageVersion: '2.56.1-9.amzn2.0.5',
       severity: 'HIGH',
       vulnerabilityCount: 1,
       cvss: [Object] } ] } to sort of equal { cnvmStatistics: 
   { criticalCount: 0,
     highCount: 1,
     mediumCount: 1,
     resourcesScanned: 2,
     cloudAccounts: 1 },
  vulnTrends: 
   [ { high: 1,
       policy_template: 'vuln_mgmt',
       critical: 0,
       low: 0,
       vulnerabilities_stats_by_cloud_account: [Object],
       medium: 1 } ],
  topVulnerableResources: 
   [ { resource: [Object],
       vulnerabilityCount: 1,
       cloudRegion: 'eu-west-1' },
     { resource: [Object],
       vulnerabilityCount: 1,
       cloudRegion: 'eu-west-1' } ],
  topPatchableVulnerabilities: 
   [ { cve: 'CVE-2015-8390',
       cvss: [Object],
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       vulnerabilityCount: 1 },
     { cve: 'CVE-2015-8394',
       cvss: [Object],
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       vulnerabilityCount: 1 } ],
  topVulnerabilities: 
   [ { cve: 'CVE-2015-8390',
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       packageName: 'glib2',
       packageVersion: '2.56.1-9.amzn2.0.5',
       severity: 'MEDIUM',
       vulnerabilityCount: 1,
       cvss: [Object] },
     { cve: 'CVE-2015-8394',
       packageFixVersion: '2.56.1-9.amzn2.0.6',
       packageName: 'glib2',
       packageVersion: '2.56.1-9.amzn2.0.5',
       severity: 'HIGH',
       vulnerabilityCount: 1,
       cvss: [Object] } ] }
    at Assertion.assert (expect.js:100:11)
    at Assertion.eql (expect.js:244:8)
    at Context.<anonymous> (vulnerabilities_dashboard.ts:145:30)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.apply (wrap_function.js:74:16) {
  actual: '{\n' +
    '  "cnvmStatistics": {\n' +
    '    "cloudAccounts": 1\n' +
    '    "criticalCount": 0\n' +
    '    "highCount": 1\n' +
    '    "mediumCount": 1\n' +
    '    "resourcesScanned": 2\n' +
    '  }\n' +
    '  "topPatchableVulnerabilities": [\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8390"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8394"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "topVulnerabilities": [\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8390"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "packageName": "glib2"\n' +
    '      "packageVersion": "2.56.1-9.amzn2.0.5"\n' +
    '      "severity": "MEDIUM"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8394"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "packageName": "glib2"\n' +
    '      "packageVersion": "2.56.1-9.amzn2.0.5"\n' +
    '      "severity": "HIGH"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "topVulnerableResources": [\n' +
    '    {\n' +
    '      "cloudRegion": "eu-west-1"\n' +
    '      "resource": {\n' +
    '        "id": "02d62a7df23951b19"\n' +
    '        "name": "name-ng-1-Node"\n' +
    '      }\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cloudRegion": "eu-west-1"\n' +
    '      "resource": {\n' +
    '        "id": "09d11277683ea41c5"\n' +
    '        "name": "othername-june12-8-8-0-1"\n' +
    '      }\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "vulnTrends": [\n' +
    '    {\n' +
    '      "critical": 0\n' +
    '      "high": 0\n' +
    '      "low": 0\n' +
    '      "medium": 0\n' +
    '      "policy_template": "vuln_mgmt"\n' +
    '      "vulnerabilities_stats_by_cloud_account": {}\n' +
    '    }\n' +
    '  ]\n' +
    '}',
  expected: '{\n' +
    '  "cnvmStatistics": {\n' +
    '    "cloudAccounts": 1\n' +
    '    "criticalCount": 0\n' +
    '    "highCount": 1\n' +
    '    "mediumCount": 1\n' +
    '    "resourcesScanned": 2\n' +
    '  }\n' +
    '  "topPatchableVulnerabilities": [\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8390"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8394"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "topVulnerabilities": [\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8390"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "packageName": "glib2"\n' +
    '      "packageVersion": "2.56.1-9.amzn2.0.5"\n' +
    '      "severity": "MEDIUM"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cve": "CVE-2015-8394"\n' +
    '      "cvss": {\n' +
    '        "score": 9.800000190734863\n' +
    '        "version": "3.1"\n' +
    '      }\n' +
    '      "packageFixVersion": "2.56.1-9.amzn2.0.6"\n' +
    '      "packageName": "glib2"\n' +
    '      "packageVersion": "2.56.1-9.amzn2.0.5"\n' +
    '      "severity": "HIGH"\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "topVulnerableResources": [\n' +
    '    {\n' +
    '      "cloudRegion": "eu-west-1"\n' +
    '      "resource": {\n' +
    '        "id": "02d62a7df23951b19"\n' +
    '        "name": "name-ng-1-Node"\n' +
    '      }\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '    {\n' +
    '      "cloudRegion": "eu-west-1"\n' +
    '      "resource": {\n' +
    '        "id": "09d11277683ea41c5"\n' +
    '        "name": "othername-june12-8-8-0-1"\n' +
    '      }\n' +
    '      "vulnerabilityCount": 1\n' +
    '    }\n' +
    '  ]\n' +
    '  "vulnTrends": [\n' +
    '    {\n' +
    '      "critical": 0\n' +
    '      "high": 1\n' +
    '      "low": 0\n' +
    '      "medium": 1\n' +
    '      "policy_template": "vuln_mgmt"\n' +
    '      "vulnerabilities_stats_by_cloud_account": {\n' +
    '        "704479110758": {\n' +
    '
[report_failure] output truncated to 8192 characters

First failure: kibana-on-merge - 8.x

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 10, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 10, 2024
@kibanamachine kibanamachine added the Team:Cloud Security Cloud Security team related label Oct 10, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 10, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

@opauloh
Copy link
Contributor

opauloh commented Oct 11, 2024

Initial triage: Tried to reproduce it locally without success,

I'm wondering if the changes made here had an impact.

For now I pushed a PR to skip the test: #195993

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 12, 2024
## Summary

It fixes elastic#195839

Skipping flaky test, opening a follow-up ticket to re-enabled test:
elastic#194046

(cherry picked from commit 2be7a20)
kibanamachine added a commit that referenced this issue Oct 12, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Skipping flaky test
(#195993)](#195993)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Paulo
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-12T02:42:56Z","message":"[Cloud
Security] Skipping flaky test (#195993)\n\n## Summary\r\n\r\nIt fixes
#195839\r\n\r\nSkipping flaky test, opening a follow-up ticket to
re-enabled
test:\r\nhttps://github.com//issues/194046","sha":"2be7a203e14931ae17c9b00349f608ec72e6b835","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","v8.16.0","backport:version"],"title":"[Cloud Security]
Skipping flaky
test","number":195993,"url":"https://github.com/elastic/kibana/pull/195993","mergeCommit":{"message":"[Cloud
Security] Skipping flaky test (#195993)\n\n## Summary\r\n\r\nIt fixes
#195839\r\n\r\nSkipping flaky test, opening a follow-up ticket to
re-enabled
test:\r\nhttps://github.com//issues/194046","sha":"2be7a203e14931ae17c9b00349f608ec72e6b835"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195993","number":195993,"mergeCommit":{"message":"[Cloud
Security] Skipping flaky test (#195993)\n\n## Summary\r\n\r\nIt fixes
#195839\r\n\r\nSkipping flaky test, opening a follow-up ticket to
re-enabled
test:\r\nhttps://github.com//issues/194046","sha":"2be7a203e14931ae17c9b00349f608ec72e6b835"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Paulo Silva <[email protected]>
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:Cloud Security Cloud Security team related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants