ti_opencti: support filtering of indicators and deduplication mechanism - #15876
Merged
chemamartinez merged 7 commits intoNov 12, 2025
Merged
Conversation
chemamartinez
marked this pull request as ready for review
November 5, 2025 14:39
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Closed
5 tasks
Contributor
🚀 Benchmarks reportTo see the full report comment with |
efd6
reviewed
Nov 5, 2025
Comment on lines
+156
to
+158
| .filter(f, f.condition) | ||
| // Map to create the final filter objects (removing the condition field) | ||
| .map(f, { |
Contributor
There was a problem hiding this comment.
Suggested change
| .filter(f, f.condition) | |
| // Map to create the final filter objects (removing the condition field) | |
| .map(f, { | |
| // and map to create the final filter objects (removing the condition field) | |
| .map(f, f.condition, { |
| "want_more": body.data.indicators.pageInfo.hasNextPage, | ||
| "cursor": { "value": body.data.indicators.pageInfo.endCursor }, | ||
| "last_modified": has(body.data.indicators.edges) && body.data.indicators.edges.size() > 0 ? | ||
| body.data.indicators.edges.map(e, e.node.modified).max() |
Contributor
There was a problem hiding this comment.
Suggested change
| body.data.indicators.edges.map(e, e.node.modified).max() | |
| body.data.indicators.edges.map(e, timestamp(e.node.modified)).max() |
The current code is returns the lexical match, which is accidentally correct when the precision is constant, but we don't know that that is always the case.
| - set: | ||
| field: opencti.indicator.rule_compatible | ||
| value: true | ||
| if: | |
Comment on lines
+935
to
+950
| if (score >= 80) { | ||
| ctx.opencti.indicator.detection_rule.severity = 'critical'; | ||
| ctx.opencti.indicator.detection_rule.risk_score = 90; | ||
| } else if (score >= 60) { | ||
| ctx.opencti.indicator.detection_rule.severity = 'high'; | ||
| ctx.opencti.indicator.detection_rule.risk_score = 70; | ||
| } else if (score >= 40) { | ||
| ctx.opencti.indicator.detection_rule.severity = 'medium'; | ||
| ctx.opencti.indicator.detection_rule.risk_score = 50; | ||
| } else { | ||
| ctx.opencti.indicator.detection_rule.severity = 'low'; | ||
| ctx.opencti.indicator.detection_rule.risk_score = 30; | ||
| } | ||
| } else { | ||
| ctx.opencti.indicator.detection_rule.severity = 'medium'; | ||
| ctx.opencti.indicator.detection_rule.risk_score = 50; |
Contributor
There was a problem hiding this comment.
Where do these values come from? (this is probably more a question for @SamuelHassine)
Contributor
Author
There was a problem hiding this comment.
As we couldn't find where these assignments come from, we are removing them for now.
💚 Build Succeeded
History
|
efd6
approved these changes
Nov 11, 2025
Contributor
|
Package ti_opencti - 2.10.0 containing this change is available at https://epr.elastic.co/package/ti_opencti/2.10.0/ |
tehbooom
pushed a commit
to tehbooom/integrations
that referenced
this pull request
Nov 19, 2025
…sm (elastic#15876) This PR contains changes listed below for the OpenCTI integration: - Added support for the following filters: - Pattern Types - Indicator Types - Revoked Status - Valid From - Valid Until - Label IDs (UUIDs) - Minimum Confidence Level - Author IDs (UUIDs) - Creator User IDs (UUIDs) - Created After - Modified After - Marking Definition IDs (UUIDs) - Added tracking of the last modified timestamp in state to prevent re-fetching already processed indicators. - Added fingerprint processor to prevent duplicate indicators. - Added useful fields to events for the creation of detection rules. - Updated OpenCTI logo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Note
This is a continuation of #15332
Checklist
changelog.ymlfile.How to test this PR locally
A free demo account for an OpenCTI platform with sample data can be created at https://filigran.io/filigran-account-creation/. I can provide mine if necessary.
Manual testing have been conducted to verify filters work and no duplicates indicators are ingested.
Related issues
Screenshots