Skip to content

[Recorded Future] Add support for code repo leakage event - #20847

Open
moxarth-rathod wants to merge 1 commit into
elastic:mainfrom
moxarth-rathod:recorded-future-fix-17315
Open

[Recorded Future] Add support for code repo leakage event#20847
moxarth-rathod wants to merge 1 commit into
elastic:mainfrom
moxarth-rathod:recorded-future-fix-17315

Conversation

@moxarth-rathod

Copy link
Copy Markdown
Contributor

Proposed commit message

recorded_future: add support for code repo leakage event

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

Related issues

@moxarth-rathod moxarth-rathod self-assigned this Aug 21, 2026
@moxarth-rathod
moxarth-rathod requested review from a team as code owners August 21, 2026 06:13
@moxarth-rathod moxarth-rathod added enhancement New feature or request Integration:ti_recordedfuture Recorded Future Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Aug 21, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Changelog link mismatch — expected https://github.com/elastic/integrations/pull/20847 in the following file(s):

  • packages/ti_recordedfuture/changelog.yml

Tip

If expected, add the changelog-link-check:skip label to skip this check. Or, if an issue link was intended, use .../issues/<n> instead.

View Buildkite build
@moxarth-rathod

@infra-vault-gh-plugin-prod

infra-vault-gh-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

💔 Build Failed

Failed CI Steps

History

cc @moxarth-rathod

- set:
field: rule.name
tag: set_rule_name_from_playbook_alert_panel_status_alert_rule_name
copy_from: recordedfuture.playbook_alert.panel_status.alert_rule.name

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🟡 Medium confidence: medium path: packages/ti_recordedfuture/data_stream/playbook_alert/elasticsearch/ingest_pipeline/default.yml:529

rule.name is copied from panel_status.alert_rule.name but that source field is never added to the duplicate-field cleanup list, so the value is stored twice; add it to the remove_custom_duplicate_fields_d7f69209 processor.

Details

This pipeline's convention is that every custom field copied into an ECS field is dropped by the remove_custom_duplicate_fields_d7f69209 processor (line 661) unless the preserve_duplicate_custom_fields tag is set -- panel_status.case_rule_id (-> rule.id), compromised_host.computer_name (-> host.name), malware_family.name (-> threat.indicator.name) are all listed there. The new rule.name copy source, recordedfuture.playbook_alert.panel_status.alert_rule.name, is not, so it stays in the document alongside rule.name for every code_repo_leakage alert. The pipeline test does not catch this because _dev/test/pipeline/test-common-config.yml sets the preserve_duplicate_custom_fields tag for all fixtures, so the removal branch is never exercised.

Recommendation:

Add the copied source field to the duplicate-removal list:

  - remove:
      field:
        - recordedfuture.playbook_alert.panel_evidence_summary.compromised_host.computer_name
        - recordedfuture.playbook_alert.panel_evidence_summary.compromised_host.os
        - recordedfuture.playbook_alert.panel_evidence_summary.malware_family.id
        - recordedfuture.playbook_alert.panel_evidence_summary.malware_family.name
        - recordedfuture.playbook_alert.panel_status.alert_rule.name
        - recordedfuture.playbook_alert.panel_status.case_rule_id
        - recordedfuture.playbook_alert.panel_status.created
        - recordedfuture.playbook_alert.panel_status.creator_id
        - recordedfuture.playbook_alert.panel_status.creator_name
        - recordedfuture.playbook_alert.panel_status.risk_score
        - recordedfuture.playbook_alert.panel_status.updated
        - recordedfuture.playbook_alert.playbook_alert_id
      tag: remove_custom_duplicate_fields_d7f69209
      ignore_missing: true
      if: ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields'))

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

formats:
- ISO8601
on_failure:
- remove:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🔵 Low confidence: high path: packages/ti_recordedfuture/data_stream/playbook_alert/elasticsearch/ingest_pipeline/default.yml:265

Two of the newly added processors (the on_failure remove at line 265 and the nested foreach at line 273) have no tag, unlike every other processor in this pipeline; add tags to both.

Details

Version 2.8.0 of this package was released specifically to add tags to every ingest pipeline processor, and the immediately preceding, structurally identical processors do carry them (remove_ingest_value_published_056ab9b2 at line 250, foreach_ingest_value_changes_ecc8b712 at line 491). The two new untagged processors break that convention, which makes failures harder to attribute because the pipeline-level on_failure message interpolates _ingest.on_failure_processor_tag. Tags become enforced by elastic-package check at format_version >= 3.6.0; this package is on 3.3.2, so this is a consistency issue rather than a build failure.

Recommendation:

Add tags to both new processors:

  - foreach:
      field: recordedfuture.playbook_alert.panel_evidence_summary.evidence
      if: ctx.recordedfuture?.playbook_alert?.panel_evidence_summary?.evidence instanceof List
      tag: foreach_panel_evidence_summary_evidence
      processor:
        date:
          field: _ingest._value.published
          tag: date_panel_evidence_summary_evidence_published
          target_field: _ingest._value.published
          formats:
            - ISO8601
          on_failure:
            - remove:
                tag: remove_ingest_value_evidence_published
                field: _ingest._value.published
                ignore_missing: true
  - foreach:
      field: recordedfuture.playbook_alert.panel_evidence_summary.evidence
      if: ctx.recordedfuture?.playbook_alert?.panel_evidence_summary?.evidence instanceof List
      tag: foreach_panel_evidence_summary_evidence_targets
      processor:
        foreach:
          tag: foreach_ingest_value_evidence_targets
          field: _ingest._value.targets
          ignore_failure: true
          processor:
            append:
              field: related.hosts
              tag: append_evidence_target_name_into_related_hosts
              value: '{{{_ingest._value.name}}}'
              allow_duplicates: false

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

# newer versions go on top
- version: "2.9.0"
changes:
- description: Add support for code repo leakage event in playbook alert data stream.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🔵 Low confidence: medium path: packages/ti_recordedfuture/changelog.yml:4

The 2.9.0 changelog covers only the new event type, but the PR also fixes event.severity for the Moderate priority across all playbook alert categories; add a bugfix entry for it.

Details

The severity script at default.yml line 595 now also matches moderate. Recorded Future's priority enum uses Moderate (not Medium), so before this change every playbook alert of any category with priority Moderate fell through all branches and got no event.severity at all. That is a user-visible behaviour change for the pre-existing domain_abuse, cyber_vulnerability and identity_novel_exposures alerts, not just for the new code repo leakage events, and it is not mentioned in the release notes.

Recommendation:

Add a second changelog entry describing the severity fix:

- version: "2.9.0"
  changes:
    - description: Add support for code repo leakage event in playbook alert data stream.
      type: enhancement
      link: https://github.com/elastic/integrations/pull/20847
    - description: Map the `Moderate` playbook alert priority to `event.severity`.
      type: bugfix
      link: https://github.com/elastic/integrations/pull/20847

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

changes:
- description: Add support for code repo leakage event in playbook alert data stream.
type: enhancement
link: https://github.com/elastic/integrations/pull/1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🟡 Medium confidence: high path: packages/ti_recordedfuture/changelog.yml:6

Changelog links a different PR number

Details

This changelog entry's link: points at pull/1, but it was added in PR #​20847. It is likely a leftover template placeholder or a copy from another PR.

Recommendation:

Point each added changelog entry's link at this PR:

link: https://github.com/elastic/integrations/pull/20847

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@vera-review-bot

Copy link
Copy Markdown

Review summary

Issues found across the latest commits 1b9d923 — 2 medium, 2 low
  • 🟡 rule.name is copied from panel_status.alert_rule.name but that source field is never added to the duplicate-field cleanup list, so the value is stored twice (link) (Unresolved)
  • 🔵 Two of the newly added processors (the on_failure remove at line 265 and the nested foreach at line 273) have no tag, unlike every other processor in this pipeline (link) (Unresolved)
  • 🔵 The 2.9.0 changelog covers only the new event type, but the PR also fixes event.severity for the Moderate priority across all playbook alert categories (link) (Unresolved)
  • 🟡 Changelog links a different PR number (link) (Unresolved)

A new commit triggers another review — at most once every 15 minutes. I skip the PR while it's approved or has merge conflicts.

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

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_recordedfuture Recorded Future Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] 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.

[RecordedFuture]: Please add the Playbook alert type "Data Leakage on Code Repository" to the integration

1 participant