-
Notifications
You must be signed in to change notification settings - Fork 489
[google_scc] Add support for Security Command Center API v2 and update finding data stream to support Cloud Detection and Response (CDR) workflow #14629
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
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportTo see the full report comment with |
packages/google_scc/data_stream/finding/_dev/test/pipeline/test-finding.log-expected.json
Show resolved
Hide resolved
packages/google_scc/elasticsearch/transform/latest_cdr_misconfigurations/fields/base-fields.yml
Show resolved
Hide resolved
packages/google_scc/elasticsearch/transform/latest_cdr_misconfigurations/fields/ecs.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know what are the changes made to the dashboards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change is that dashboards are exported to version 8.19, along with below minor field changes :
Finding Dashboard
- Resource Name Filter (
google_scc.finding.resource.name
->resource.id
) - Total Finding Metric (change decimal from 2 to 0)
Overview Dashboard
- Distribution of Vulnerabilities by Severity (
google_scc.finding.severity
->vulnerability.severity
) - Top 5 Projects by Severity for Vulnerabilities (
google_scc.finding.severity
->vulnerability.severity
) - Top 5 Projects by Severity for Vulnerabilities (
google_scc.finding.severity
->vulnerability.severity
,google_scc.finding.resource.project.name
->cloud.project.id
) - Top 5 Projects by Severity for Threats (
google_scc.finding.resource.project.name
->cloud.project.id
)
Finding Essentials Details
organization.id
- google_scc.finding.name
+ resource.id
google_scc.finding.category
google_scc.finding.class
google_scc.finding.severity
- google_scc.finding.resource.project.name
- event.created
- google_scc.finding.security_marks.name
- google_scc.finding.parent
+ cloud.project.id
+ google_scc.finding.security_marks.name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like mainly ECS fields are used inside dashboards over custom fields. Could you add that to commit message?
…leet health status updates in the httpjson input. Adding do_not_log_failure: true helps prevent the logging of expected failures, which were previously resulting in test failures
9d761be
to
ccce426
Compare
/test |
- name: id | ||
type: keyword | ||
description: The ID of the resource. | ||
- name: name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kcreddy @brijesh-elastic for example this I believe is covered by ecs@mappings
even though resource is not a part of ECS itself. In the component template dynamic templates are being used which match by *.name
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is with pipeline tests. Any non-ECS field inside the *expected.json
file must be explicitly defined. Otherwise they fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, I wonder if it's smth we want to improve going forward, or is it an expected safety net? It just doesn't match well the dynamic approach taken by ecs@mappings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safety and also to do with preferring explicit mappings over dynamic mappings for Elasticsearch performanc.e
move_on_creation: true | ||
latest: | ||
unique_key: | ||
- event.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need event.id
here. Isn't a combination of rule.uuid
and resource.id
unique?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will be required.
rule.uuid
is not present in most of the cases. So, we must have to add event.id
to be unique.
move_on_creation: true | ||
latest: | ||
unique_key: | ||
- event.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, the combination of resource.id
, package.name
and package.version
should be unique enough. This way we make sure that we don't have duplicated findings, eg. if event.id
is generated for each change in the finding (eg. change of the status) we might have N finding documents for each (resource.id
, package.name
,package.version
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in here too, it will be required.
There are cases that combination of resource.id
, package.name
, package.version
isn't unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great work! Tested on the provided env, CDR flows work as expected.
Before approving I want to clarify the usage of event.id
for the transform uniqueness
… the unique field in visualizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brijesh-elastic, since the CI is failing on a known issue elastic/beats#45664, can you skip
failing system tests for source
and asset
data streams where its failing? We can add them back after fix is made by updating kibana version.
Example:
integrations/packages/aws/data_stream/securityhub_findings/_dev/test/system/test-default-config.yml
Lines 2 to 5 in 9bd4e70
skip: | |
reason: "Support backward compatibility of Current AWS package." | |
link: https://github.com/elastic/integrations/issues/3695 | |
service: securityhub |
💚 Build Succeeded
History
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Package google_scc - 2.0.0 containing this change is available at https://epr.elastic.co/package/google_scc/2.0.0/ |
Proposed commit message
Note
To Reviewers:
Checklist
changelog.yml
file.How to test this PR locally
Related issues