Skip to content

ti_rapid7_threat_command: Add IOC expiration - #9925

Merged
kcreddy merged 18 commits into
elastic:mainfrom
kcreddy:rapid7_ioc_expire
Jun 26, 2024
Merged

ti_rapid7_threat_command: Add IOC expiration#9925
kcreddy merged 18 commits into
elastic:mainfrom
kcreddy:rapid7_ioc_expire

Conversation

@kcreddy

@kcreddy kcreddy commented May 21, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

See title

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.

Author's Checklist

How to test this PR locally

elastic-package stack down && elastic-package build && elastic-package stack up -d -v && eval "$(elastic-package stack shellinit)" && elastic-package test pipeline --generate -v

--- Test results for package: ti_rapid7_threat_command - START ---
╭──────────────────────────┬───────────────┬───────────┬───────────────────────────────┬────────┬──────────────╮
│ PACKAGE                  │ DATA STREAM   │ TEST TYPE │ TEST NAME                     │ RESULT │ TIME ELAPSED │
├──────────────────────────┼───────────────┼───────────┼───────────────────────────────┼────────┼──────────────┤
│ ti_rapid7_threat_command │ alert         │ pipeline  │ test-alert-event.json         │ PASS   │   2.722958ms │
│ ti_rapid7_threat_command │ ioc           │ pipeline  │ test-ioc-event.json           │ PASS   │     6.5205ms │
│ ti_rapid7_threat_command │ vulnerability │ pipeline  │ test-vulnerability-event.json │ PASS   │   2.470875ms │
╰──────────────────────────┴───────────────┴───────────┴───────────────────────────────┴────────┴──────────────╯
--- Test results for package: ti_rapid7_threat_command - END   ---
Done

elastic-package stack down && elastic-package build && elastic-package stack up -d -v && eval "$(elastic-package stack shellinit)" && elastic-package test system --generate -v

...
2024/06/21 11:11:28 DEBUG found 2 hits in logs-ti_rapid7_threat_command.alert-ep data stream
2024/06/21 11:12:14 DEBUG found 4 hits in logs-ti_rapid7_threat_command.ioc-ep data stream
2024/06/21 11:13:02 DEBUG found 3 hits in logs-ti_rapid7_threat_command.vulnerability-ep data stream
...
--- Test results for package: ti_rapid7_threat_command - START ---
╭──────────────────────────┬───────────────┬───────────┬───────────┬────────┬───────────────╮
│ PACKAGE                  │ DATA STREAM   │ TEST TYPE │ TEST NAME │ RESULT │  TIME ELAPSED │
├──────────────────────────┼───────────────┼───────────┼───────────┼────────┼───────────────┤
│ ti_rapid7_threat_command │ alert         │ system    │ default   │ PASS   │ 33.193950833s │
│ ti_rapid7_threat_command │ ioc           │ system    │ default   │ PASS   │ 30.954459875s │
│ ti_rapid7_threat_command │ vulnerability │ system    │ default   │ PASS   │ 33.032822708s │
╰──────────────────────────┴───────────────┴───────────┴───────────┴────────┴───────────────╯
--- Test results for package: ti_rapid7_threat_command - END   ---
Done

Related issues

Screenshots

Updated dashboards (querying only on the newly created destination indices):

1. Alerts Overview
Screenshot 2024-06-18 at 6 49 29 PM

2. Vulnerability Overview
Screenshot 2024-06-18 at 6 52 57 PM

3. IOC Overview
Screenshot 2024-06-18 at 6 57 21 PM

@kcreddy kcreddy added enhancement New feature or request Integration:ti_rapid7_threat_command Rapid7 Threat Command (Partner supported) labels May 21, 2024
@kcreddy kcreddy self-assigned this May 21, 2024
@elasticmachine

elasticmachine commented Jun 18, 2024

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

kcreddy added 5 commits June 20, 2024 12:39
This ensures that something is
broken to the users. A required value must be set to proceed further
The transform filters out any doc with error message, so error shouldn't be written. It would be nice to capture this in some comments field though
@kcreddy
kcreddy marked this pull request as ready for review June 20, 2024 13:17
@kcreddy
kcreddy requested a review from a team as a code owner June 20, 2024 13:17
@kcreddy kcreddy added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Jun 20, 2024
@elasticmachine

Copy link
Copy Markdown

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

Comment on lines +26 to +33
- name: ioc_expiration_duration
type: text
title: IOC Expiration Duration
multi: false
required: true
show_user: true
description: >-
Enforces all active IOCs to expire after this duration since their last seen time indicated in the feed. Use [Elasticsearch time units](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#time-units) in days, hours, or minutes (e.g `10d`). If invalid units are provided, default value `90d` i.e., 90 days is used. Check `README` for more details how IOC expiration works and removal of custom transforms and views used in older versions.

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.

Intentionally didn't add any default, so that user checks on IOC expiration and removes existing transforms, and rules. If we use default, the users may not notice the major changes during the upgrade.

@kcreddy
kcreddy requested a review from efd6 June 21, 2024 06:11
@kcreddy

kcreddy commented Jun 21, 2024

Copy link
Copy Markdown
Contributor Author

To be merged after elastic/detection-rules#3800 is out next week

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @kcreddy

@kcreddy
kcreddy merged commit 3da25c3 into elastic:main Jun 26, 2024
@elasticmachine

Copy link
Copy Markdown

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

@kcreddy
kcreddy deleted the rapid7_ioc_expire branch February 7, 2025 09:11
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:ti_rapid7_threat_command Rapid7 Threat Command (Partner supported) Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants