Skip to content

[cloud_security_posture] Adding vulnerability fields#6823

Merged
jeniawhite merged 9 commits intoelastic:mainfrom
jeniawhite:evgb-VulnIndex
Aug 15, 2023
Merged

[cloud_security_posture] Adding vulnerability fields#6823
jeniawhite merged 9 commits intoelastic:mainfrom
jeniawhite:evgb-VulnIndex

Conversation

@jeniawhite
Copy link
Copy Markdown
Contributor

@jeniawhite jeniawhite commented Jul 5, 2023

What does this PR do?

Added additional fields to the vulnerability mappings.
Added an ingest upgrade for older vulnerability findings to include type.
This PR is based on changes:

Related Issues

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

@jeniawhite jeniawhite added the enhancement New feature or request label Jul 5, 2023
@jeniawhite jeniawhite requested a review from a team as a code owner July 5, 2023 12:24
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Jul 5, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-15T12:31:47.166+0000

  • Duration: 15 min 43 sec

Test stats 🧪

Test Results
Failed 0
Passed 4
Skipped 0
Total 4

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Copy Markdown
Contributor

@amirbenun amirbenun left a comment

Choose a reason for hiding this comment

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

ECS compliant fields should go to ecs.yml

@jeniawhite
Copy link
Copy Markdown
Contributor Author

@amirbenun
Notice that I did not update the ECS fields due to this:

@jeniawhite jeniawhite requested a review from amirbenun July 5, 2023 14:03
@amirbenun
Copy link
Copy Markdown
Contributor

I think that non-ECS fields should also declare type in their mapping, so I thought it will be easier to use ecs.yml instead of declaring all the types.
@kfirpeled am I correct here?

@andrewkroh andrewkroh added the Integration:cloud_security_posture Security Posture Management label Jul 7, 2023
@andrewkroh andrewkroh changed the title Adding vulnerability fields [cloud_security_posture] Adding vulnerability fields Jul 7, 2023
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should just bump the version, no need to add another section

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we might want to have network and security here as well

Copy link
Copy Markdown
Contributor

@kfirpeled kfirpeled left a comment

Choose a reason for hiding this comment

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

requested changes to move security to be under cloud_security_posture

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

consider capitalization for custom fields to avoid future conflicts
see guideline suggestion: https://www.elastic.co/guide/en/ecs/current/ecs-custom-fields-in-ecs.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets avoid top-level custom fields (security is not part of ECS)
the current guideline is to move security to be under a field that is named with the plugin name. In our case that is cloud_security_posture.

So the final field here would be cloud_security_posture.security.security_groups

cc: @eyalkraft , @oren-zohar

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

consider capitalization for custom fields to avoid future conflicts
see guideline suggestion: https://www.elastic.co/guide/en/ecs/current/ecs-custom-fields-in-ecs.html

@kfirpeled
Copy link
Copy Markdown
Contributor

@amirbenun Notice that I did not update the ECS fields due to this:

Currently, using the auto-import is blocked and it is not clear if it will be available for 8.10 release.
@jeniawhite I suggest to update ECS fields as well

I think that non-ECS fields should also declare type in their mapping, so I thought it will be easier to use ecs.yml instead of declaring all the types.
@kfirpeled am I correct here?

I would keep the convention of using ecs.yml to declare only ecs fields. And anything else is for custom fields (aka non-ECS).

@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Aug 13, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 25.0% (2/8) 👎 -59.0
Lines 100.0% (0/0) 💚 12.766
Conditionals 100.0% (0/0) 💚

…elds/resource.yml

Co-authored-by: Amir Ben Nun <34831306+amirbenun@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@kfirpeled kfirpeled left a comment

Choose a reason for hiding this comment

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

lgtm

@jeniawhite jeniawhite merged commit b8ea6bf into elastic:main Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:cloud_security_posture Security Posture Management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CNVM] Index vulnerable resource fields

5 participants