Skip to content

snyk: fix audit_logs event type filter being silently ignored#18902

Open
kcreddy wants to merge 3 commits intoelastic:mainfrom
kcreddy:snyk-fix-events_filter
Open

snyk: fix audit_logs event type filter being silently ignored#18902
kcreddy wants to merge 3 commits intoelastic:mainfrom
kcreddy:snyk-fix-events_filter

Conversation

@kcreddy
Copy link
Copy Markdown
Contributor

@kcreddy kcreddy commented May 8, 2026

Proposed commit message

snyk: fix audit_logs event type filter being silently ignored

The CEL program reads state.events_filter (plural) but the state
template stores the configured event types under event_filter
(singular). The key mismatch means the filter is never applied and
all event types are collected regardless of user configuration.
The problem was introduced in elastic/integrations#10073.

Fix the CEL query parameter reference to use the correct key.

Fixes elastic/integrations#18653

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

Newly added system tests (with event option) passes:

--- Test results for package: snyk - START ---
╭─────────┬─────────────┬───────────┬──────────────┬────────┬───────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME    │ RESULT │  TIME ELAPSED │
├─────────┼─────────────┼───────────┼──────────────┼────────┼───────────────┤
│ snyk    │ audit_logs  │ system    │ event-filter │ PASS   │ 46.624782375s │
╰─────────┴─────────────┴───────────┴──────────────┴────────┴───────────────╯
--- Test results for package: snyk - END   ---
Done

Related issues

kcreddy added 2 commits May 8, 2026 20:06
The CEL program reads state.events_filter (plural) but the state
template stores the configured event types under event_filter
(singular). The key mismatch means the filter is never applied and
all event types are collected regardless of user configuration. The problem was introduced in elastic#10073

Fix the CEL query parameter reference to use the correct key.

Fixes elastic#18653
@kcreddy kcreddy self-assigned this May 8, 2026
@kcreddy kcreddy added Integration:snyk Snyk bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels May 8, 2026
@kcreddy kcreddy marked this pull request as ready for review May 8, 2026 14:43
@kcreddy kcreddy requested a review from a team as a code owner May 8, 2026 14:43
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

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

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

cc @kcreddy

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:snyk Snyk 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.

[bug-hunter] Snyk audit_logs event filter is ignored due to state key mismatch

2 participants