Skip to content

Conversation

@chemamartinez
Copy link
Contributor

@chemamartinez chemamartinez commented Nov 5, 2025

Proposed commit message

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.

Note

This is a continuation of #15332

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

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

opencti-config

@chemamartinez chemamartinez self-assigned this Nov 5, 2025
@chemamartinez chemamartinez added enhancement New feature or request Integration:ti_opencti OpenCTI Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Nov 5, 2025
@chemamartinez chemamartinez marked this pull request as ready for review November 5, 2025 14:39
@chemamartinez chemamartinez requested a review from a team as a code owner November 5, 2025 14:39
@elasticmachine
Copy link

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

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label 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, {
Copy link
Contributor

Choose a reason for hiding this comment

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

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()
Copy link
Contributor

Choose a reason for hiding this comment

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

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: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if: |
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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do these values come from? (this is probably more a question for @SamuelHassine)

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @chemamartinez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:ti_opencti OpenCTI Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants