Skip to content

[checkpoint] Update setting of event.kind and event.outcome - #20341

Merged
mjwolf merged 4 commits into
elastic:mainfrom
mjwolf:checkpoint_event_types
Jul 28, 2026
Merged

[checkpoint] Update setting of event.kind and event.outcome#20341
mjwolf merged 4 commits into
elastic:mainfrom
mjwolf:checkpoint_event_types

Conversation

@mjwolf

@mjwolf mjwolf commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

Update how event.kind and event.action fields are populated. Previously, they were being set solely on the value of checkpoint.rule_action. There are some cases where checkpoint.rule_action does not have a value, but checkpoint.action does. In these cases the value will be taken from checkpoint.action.

This adds one new testcase, and updates the expected results for several others which should have had event.outcome and event.kind set before.


The processor changes are conditional on the non-existence of rule_action, because there are several cases where the contents conflict. For example, these pipeline test logs have action: Decrypt and rule_action: Accept, and unconditionally using checkpoint.action would change the behaviour in existing logs.

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
Update how event.kind and event.action fields are populated. Previously,
they were being set solely on the value of checkpoint.rule_action. There
are some cases where checkpoint.rule_action does not have a value, but
checkpoint.action does. In these cases the value will be taken from
checkpoint.action.
@mjwolf mjwolf self-assigned this Jul 23, 2026
@mjwolf
mjwolf requested a review from a team as a code owner July 23, 2026 18:29
@mjwolf mjwolf added Integration:checkpoint Check Point bugfix Pull request that fixes a bug issue Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience] labels Jul 23, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/integration-experience (Team:Integration-Experience)

@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

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@taylor-swanson taylor-swanson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes seem fine to me.

Echoing the bot's comments, should we add the same logic to processors set_event_outcome_e1548f1e and append_event_type_c2ef1ab7 as well?

mjwolf and others added 2 commits July 28, 2026 10:55
…processors

Apply the same rule_action == null && action fallback to the Accept/Allow
event.outcome and event.type processors that was already applied to the
Drop/Reject/Block/Prevent path, so allowed events without rule_action
are categorized symmetrically with denied events.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mjwolf
mjwolf enabled auto-merge (squash) July 28, 2026 17:58
@mjwolf
mjwolf requested a review from taylor-swanson July 28, 2026 17:59
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

<134>1 2025-01-21T09:37:10Z TEST_HOSTNAME CheckPoint 16953 - [action:"Drop"; flags:"409600"; ifdir:"inbound"; logid:"0"; loguid:"{0x5e818e17,0x1,0x6401a8c0,0x108620ab}"; origin:"192.168.1.100"; originsicname:"cn=cp_mgmt,o=gw-da58d3..tmn8s8"; sequencenum:"2"; time:"1737452230"; version:"5"; __policy_id_tag:"product=VPN-1 & FireWall-1[db_tag={880771B0-FD92-2C4F-82FC-B96FC3DE5A07};mgmt=gw-da58d3;date=1585502566;policy_name=Standard\]"; drop_reason:"matched optimized drop"; layer_name:"Network"; layer_uuid:"63b7fe60-76d2-4287-bca5-21af87337b0a"; match_id:"1"; parent_rule:"0"; rule_action:"Drop"; rule_name:"Cleanup rule"; rule_uid:"1fde807b-6300-4b1a-914f-f1c1f3e2e7d2"; packet_amount:"3"; packets:" <81.2.69.142,45000,81.2.69.144,443,6> <81.2.69.142,45001,89.160.20.128,80,17> <81.2.69.142,45002,81.2.69.144,8080,6>"]
<134>1 2025-11-19T01:36:02Z TEST_HOSTNAME CheckPoint 16953 - [action:"Drop"; flags:"409600"; ifdir:"inbound"; logid:"0"; loguid:"{0x1816caef, 0x1,0x6401a8c0,0x108620ab}"; origin:"192.168.1.100"; originsicname:"CN=fw,O=fmmt.domain.com.tmn8s8"; sequencenum:"3"; time:"1763516162"; version:"5"; packet_amount:"5"; packets:"(sample only) <81.2.69.142,59912,81.2.69.144,1990,6;bond12> <81.2.69.142,40252,81.2.69.144,999,6;bond12> <81.2.69.142,60636,89.160.20.128,999,6;bond12> <81.2.69.142,43010,89.160.20.128,1898,6;bond12> <81.2.69.142,59440,81.2.69.144,1898,6;bond12>";]
<134>1 2025-03-31T09:45:12Z FW-RANDOM CheckPoint 98765 - [action:"Drop"; flags:"409600"; ifdir:"inbound"; logid:"0"; loguid:"{0xa1b2c3d4,0xe5f67890,0x12345678,0xabcdef12}"; origin:"192.168.45.23"; originsicname:"CN=FWSC-RANDOM,O=TMUK_SDMZ_RANDOM.oam.example.com.abcd12"; sequencenum:"112"; time:"1743414312"; version:"5"; __policy_id_tag:"product=VPN-1 & FireWall-1[db_tag={F1234567-89AB-CDEF-0123-456789ABCDEF};mgmt=TMUK_SDMZ_RANDOM;date=1742477474;policy_name=Standard\\]"; drop_reason:"matched optimized drop"; layer_name:"Network"; layer_uuid:"123e4567-e89b-12d3-a456-426614174000"; match_id:"8"; parent_rule:"0"; rule_action:"Drop"; rule_uid:"abcdef12-3456-7890-abcd-ef1234567890"; packet_amount:"5"; packets:" <203.0.113.45,54321,198.51.100.23,12345,6;bond1.3> <203.0.113.46,23456,198.51.100.24,34567,6;bond1.3> <203.0.113.47,45678,198.51.100.25,56789,6;bond1.3> <203.0.113.48,67890,198.51.100.26,78901,6;bond1.3> <203.0.113.49,89012,198.51.100.27,90123,6;bond1.3>"; product:"VPN-1 & FireWall-1"; proto:"6"]
<134>1 2026-03-31T06:49:33.170Z TEST_HOSTNAME CheckPoint 31085 - [action:"Drop"; flags:"393216"; ifdir:"inbound"; ifname:"bond1.992"; logid:"1"; loguid:"{0xd82800ab,0xca,0xb384aa9a,0x3331928d}"; origin:"192.168.8.200"; originsicname:"CN=fw,O=example..sdf7da"; sequencenum:"1342"; time:"1743414973170"; version:"5"; __policy_id_tag:"product=VPN-1 & FireWall-1[db_tag={8383ADC5llll0-744C-80D1-6915514EFAD5};mgmt=example;date=1743403451;policy_name=example8\]"; dst:"81.2.69.144"; product:"VPN-1 & FireWall-1"; proto:"6"; s_port:"5223"; service:"49689"; src:"81.2.69.142"; tcp_flags:"ACK"; tcp_packet_out_of_state:"First packet isn't SYN"]

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/checkpoint/data_stream/firewall/_dev/test/pipeline/test-packet-drop.log:5

The added packet-drop sample has a syslog header timestamp (2026-03-31T06:49:33.170Z) that contradicts its own time field (1743414973170 = 2025-03-31T09:56:13.170Z). Align the header with the epoch value.

Details

The RFC 5424 header on this new sample reads 2026-03-31T06:49:33.170Z, while the structured-data time:"1743414973170" decodes to 2025-03-31T09:56:13.170Z — a different year and a different time of day. The pipeline prefers time, which is why the committed test-packet-drop.log-expected.json entry asserts "@​timestamp": "2025-03-31T09:56:13.170Z".

The test still passes, but the fixture no longer represents a record a Check Point gateway could emit, which makes it misleading for anyone using it to reason about timestamp handling. The other sample added in the same commit (line 6) is internally consistent: header 2025-11-19T02:10:00Z matches time:"1763518200".

Recommendation:

Make the header agree with the time value the fixture asserts on:

<134>1 2025-03-31T09:56:13.170Z TEST_HOSTNAME CheckPoint 31085 - [action:"Drop"; flags:"393216"; ifdir:"inbound"; ifname:"bond1.992"; logid:"1"; loguid:"{0xd82800ab,0xca,0xb384aa9a,0x3331928d}"; origin:"192.168.8.200"; originsicname:"CN=fw,O=example..sdf7da"; sequencenum:"1342"; time:"1743414973170"; version:"5"; ...]

No change to test-packet-drop.log-expected.json is required — it already expects 2025-03-31T09:56:13.170Z.


🤖 AI-Generated Review | Vera Review Bot | 📚 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 7bd73531b4b1ae (31 commits) — 1 high, 1 low
  • 🟠 The checkpoint.action fallback also fires on management/audit records, so config-change events are now tagged event.type: [allowed, connection]. Gate the fallback so it only applies to connection logs (e.g. skip records that carry checkpoint.administrator). (link) (Unresolved)
  • 🔵 The added packet-drop sample has a syslog header timestamp (2026-03-31T06:49:33.170Z) that contradicts its own time field (1743414973170 = 2025-03-31T09:56:13.170Z). Align the header with the epoch value. (link) (Unresolved)
Issues found across earlier commits e7a96f3 — 1 medium
  • 🟡 The rule_action->action fallback was added to the denied/alert/intrusion_detection paths but not to the parallel Accept/Allow processors, so allowed events lacking checkpoint.rule_action still get no event.outcome or event.type. Extend the same fallback to the Accept/Allow outcome and type processors. (link) (Resolved)

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 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @mjwolf

@mjwolf
mjwolf merged commit 9f64d9e into elastic:main Jul 28, 2026
11 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package checkpoint - 1.49.0 containing this change is available at https://epr.elastic.co/package/checkpoint/1.49.0/

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

Labels

bugfix Pull request that fixes a bug issue Integration:checkpoint Check Point Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience]

2 participants