Skip to content

Fix missing field in transforms of ti packages - #11008

Merged
jsoriano merged 3 commits into
elastic:mainfrom
jsoriano:ti-missing-transform-field
Sep 5, 2024
Merged

Fix missing field in transforms of ti packages#11008
jsoriano merged 3 commits into
elastic:mainfrom
jsoriano:ti-missing-transform-field

Conversation

@jsoriano

@jsoriano jsoriano commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

Issue detected in #10919, there is a field in transforms that is not documented.

This was only detected when enabling synthetic source (through logsdb), because only in this case we check fields that are not in the source, but are in the index, such as constant_keywords.

Not having these fields defined will be a problem when we enable testing with logsdb, and/or when we fix validation of these fields.

@jsoriano jsoriano self-assigned this Sep 4, 2024
@jsoriano
jsoriano requested a review from a team as a code owner September 4, 2024 16:19
- name: osint
type: boolean
- name: "*"
type: keyword

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a different case, that causes issues after enabling synthetic source because of elastic/package-spec#784.

@elasticmachine

elasticmachine commented Sep 4, 2024

Copy link
Copy Markdown

🚀 Benchmarks report

Package ti_abusech 👍(1) 💚(0) 💔(3)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
malwarebazaar 3623.19 2801.12 -822.07 (-22.69%) 💔
threatfox 4739.34 3546.1 -1193.24 (-25.18%) 💔
url 5208.33 4115.23 -1093.1 (-20.99%) 💔

Package ti_crowdstrike 👍(1) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
ioc 4784.69 3623.19 -1161.5 (-24.28%) 💔

Package ti_eset 👍(2) 💚(2) 💔(3)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
cc 12500 9009.01 -3490.99 (-27.93%) 💔
ip 12987.01 9345.79 -3641.22 (-28.04%) 💔
url 14084.51 8547.01 -5537.5 (-39.32%) 💔

Package ti_maltiverse 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
indicator 2624.67 2066.12 -558.55 (-21.28%) 💔

Package ti_mandiant_advantage 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
threat_intelligence 1557.63 1267.43 -290.2 (-18.63%) 💔

Package ti_misp 👍(1) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
threat_attributes 3134.8 2659.57 -475.23 (-15.16%) 💔

Package ti_opencti 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
indicator 2020.2 1602.56 -417.64 (-20.67%) 💔

Package ti_threatconnect 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
indicator 534.76 444.84 -89.92 (-16.82%) 💔

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @jsoriano

@elastic-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
14.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@efd6

efd6 commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

@jsoriano Can you link to the failure this fixes?

@andrewkroh andrewkroh added Integration:ti_threatconnect ThreatConnect Integration:ti_cif3 Collective Intelligence Framework v3 (Community supported) Integration:ti_eset ESET Threat Intelligence (Partner supported) Integration:ti_mandiant_advantage Mandiant Advantage (Partner supported) Integration:ti_threatq ThreatQuotient (Partner supported) Integration:ti_rapid7_threat_command Rapid7 Threat Command (Partner supported) Integration:ti_recordedfuture Recorded Future Integration:ti_abusech abuse.ch Integration:ti_cybersixgill Cybersixgill Integration:ti_anomali Anomali ThreatStream Integration:ti_crowdstrike CrowdStrike Falcon Intelligence Integration:ti_maltiverse Maltiverse (Partner supported) Integration:ti_opencti OpenCTI Integration:ti_misp MISP Integration:ti_otx AlienVault OTX Integration:ti_eclecticiq EclecticIQ (Partner supported) Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Sep 5, 2024
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@jsoriano

jsoriano commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

@jsoriano Can you link to the failure this fixes?

You can find them in https://buildkite.com/elastic/integrations/builds/15135

Basically:

test case failed: errors found in documents of preview for transform logs-ti_cif3.latest_threat-default-0.2.0 for data stream logs-ti_cif3.feed-43358: [0] field "labels.is_ioc_transform_source" is undefined

The issue is only reproduced if logsdb (or synthetic source) is enabled.

@jsoriano
jsoriano merged commit 2ff7753 into elastic:main Sep 5, 2024
@jsoriano
jsoriano deleted the ti-missing-transform-field branch September 5, 2024 11:15
@elasticmachine

Copy link
Copy Markdown

Package ti_abusech - 2.3.2 containing this change is available at https://epr.elastic.co/search?package=ti_abusech

@elasticmachine

Copy link
Copy Markdown

Package ti_anomali - 1.22.2 containing this change is available at https://epr.elastic.co/search?package=ti_anomali

@elasticmachine

Copy link
Copy Markdown

Package ti_cif3 - 1.14.2 containing this change is available at https://epr.elastic.co/search?package=ti_cif3

@elasticmachine

Copy link
Copy Markdown

Package ti_crowdstrike - 1.1.5 containing this change is available at https://epr.elastic.co/search?package=ti_crowdstrike

@elasticmachine

Copy link
Copy Markdown

Package ti_cybersixgill - 1.30.2 containing this change is available at https://epr.elastic.co/search?package=ti_cybersixgill

@elasticmachine

Copy link
Copy Markdown

Package ti_eclecticiq - 1.2.2 containing this change is available at https://epr.elastic.co/search?package=ti_eclecticiq

@elasticmachine

Copy link
Copy Markdown

Package ti_eset - 1.2.3 containing this change is available at https://epr.elastic.co/search?package=ti_eset

@elasticmachine

Copy link
Copy Markdown

Package ti_maltiverse - 1.2.2 containing this change is available at https://epr.elastic.co/search?package=ti_maltiverse

@elasticmachine

Copy link
Copy Markdown

Package ti_mandiant_advantage - 1.4.1 containing this change is available at https://epr.elastic.co/search?package=ti_mandiant_advantage

@elasticmachine

Copy link
Copy Markdown

Package ti_misp - 1.35.2 containing this change is available at https://epr.elastic.co/search?package=ti_misp

@elasticmachine

Copy link
Copy Markdown

Package ti_opencti - 2.3.3 containing this change is available at https://epr.elastic.co/search?package=ti_opencti

@elasticmachine

Copy link
Copy Markdown

Package ti_otx - 1.25.2 containing this change is available at https://epr.elastic.co/search?package=ti_otx

@elasticmachine

Copy link
Copy Markdown

Package ti_rapid7_threat_command - 2.0.2 containing this change is available at https://epr.elastic.co/search?package=ti_rapid7_threat_command

@elasticmachine

Copy link
Copy Markdown

Package ti_recordedfuture - 1.26.2 containing this change is available at https://epr.elastic.co/search?package=ti_recordedfuture

@elasticmachine

Copy link
Copy Markdown

Package ti_threatconnect - 1.2.2 containing this change is available at https://epr.elastic.co/search?package=ti_threatconnect

@elasticmachine

Copy link
Copy Markdown

Package ti_threatq - 1.28.2 containing this change is available at https://epr.elastic.co/search?package=ti_threatq

chrisberkhout added a commit that referenced this pull request Sep 26, 2024
The distinction between source and destination records was lost when
#11008 added a field definition for `labels.is_ioc_transform_source`
to the destination indices with a value of `"true"`.

Here it is restored by:
- Moving `labels.is_ioc_transform_source` field definitions into
  separate files.
- Setting the value to `"false"` in the transform destinations.
- Incrementing transform version numbers so new destination indices
  will be built with correct values.
- Adjusting dashboards to filter for not `"true"` rather than not
  exists.

Security rules already filter for not `"true"`.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
Issue detected in elastic#10919, there is a field in transforms that is not documented.

This was only detected when enabling synthetic source (through logsdb), because
only in this case we check fields that are not in the source, but are in the index,
such as constant_keywords.

Not having these fields defined will be a problem when we enable testing with
logsdb, and/or when we fix validation of these fields.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
The distinction between source and destination records was lost when
elastic#11008 added a field definition for `labels.is_ioc_transform_source`
to the destination indices with a value of `"true"`.

Here it is restored by:
- Moving `labels.is_ioc_transform_source` field definitions into
  separate files.
- Setting the value to `"false"` in the transform destinations.
- Incrementing transform version numbers so new destination indices
  will be built with correct values.
- Adjusting dashboards to filter for not `"true"` rather than not
  exists.

Security rules already filter for not `"true"`.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
Issue detected in elastic#10919, there is a field in transforms that is not documented.

This was only detected when enabling synthetic source (through logsdb), because
only in this case we check fields that are not in the source, but are in the index,
such as constant_keywords.

Not having these fields defined will be a problem when we enable testing with
logsdb, and/or when we fix validation of these fields.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
The distinction between source and destination records was lost when
elastic#11008 added a field definition for `labels.is_ioc_transform_source`
to the destination indices with a value of `"true"`.

Here it is restored by:
- Moving `labels.is_ioc_transform_source` field definitions into
  separate files.
- Setting the value to `"false"` in the transform destinations.
- Incrementing transform version numbers so new destination indices
  will be built with correct values.
- Adjusting dashboards to filter for not `"true"` rather than not
  exists.

Security rules already filter for not `"true"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:ti_abusech abuse.ch Integration:ti_anomali Anomali ThreatStream Integration:ti_cif3 Collective Intelligence Framework v3 (Community supported) Integration:ti_crowdstrike CrowdStrike Falcon Intelligence Integration:ti_cybersixgill Cybersixgill Integration:ti_eclecticiq EclecticIQ (Partner supported) Integration:ti_eset ESET Threat Intelligence (Partner supported) Integration:ti_maltiverse Maltiverse (Partner supported) Integration:ti_mandiant_advantage Mandiant Advantage (Partner supported) Integration:ti_misp MISP Integration:ti_opencti OpenCTI Integration:ti_otx AlienVault OTX Integration:ti_rapid7_threat_command Rapid7 Threat Command (Partner supported) Integration:ti_recordedfuture Recorded Future Integration:ti_threatconnect ThreatConnect Integration:ti_threatq ThreatQuotient (Partner supported) Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

4 participants