Skip to content

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Sep 9, 2025

Proposed commit message

snyk: fix parameter handling and allow issue update ingestion

The previous implementation of the issues data stream did not correctly
handle request parameters; type and scan_item.id are not multiple value
parameters[1], and effective_severity_level and status use a comma
separated element syntax[2]. scan_item.id and scan_item.type are
corequisites[2] so this is documented in the configuration UI to avoid
confusion.

The previous design of the data stream intentionally only collected the
first seen occurrence of an issue, this behaviour has been changed so
that all updates are collected.

The stack version is updated to allow for deletion of old request trace logs.

[1]https://docs.snyk.io/snyk-api/reference/issues#get-orgs-org_id-issues
[2]experimentally determined

Note

Tested against a real endpoint.

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

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

efd6 added 4 commits September 9, 2025 11:36
type and scan_item.id are not multiple value parameters[1], and
effective_severity_level and status use a comma separated element
syntax[2]. scan_item.id and scan_item.type are corequisites[2].

[1]https://docs.snyk.io/snyk-api/reference/issues#get-orgs-org_id-issues
[2]experimental observation
@efd6 efd6 self-assigned this Sep 9, 2025
@efd6 efd6 added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request breaking change Integration:snyk Snyk bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Sep 9, 2025
@efd6 efd6 force-pushed the 14356-snyk-breaking branch from fadf9da to 6691f3f Compare September 9, 2025 03:49
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

Package snyk 👍(1) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
issues 4329 3636.36 -692.64 (-16%) 💔

To see the full report comment with /test benchmark fullreport

@efd6 efd6 marked this pull request as ready for review September 9, 2025 04:14
@efd6 efd6 requested a review from a team as a code owner September 9, 2025 04:14
@elasticmachine
Copy link

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

@clement-fouque
Copy link
Contributor

I confirm that it's working as expected with the default configuration. There are no error generated.
image

Copy link
Contributor

@clement-fouque clement-fouque left a comment

Choose a reason for hiding this comment

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

The new fingerprint is working: we have now 2 docs when an issue is updated.

Image

But the timestamp is incorrect. I believe it should be set on field snyk.issues.attributes.updated_at and not snyk.issues.attributes.created_at

@andrewkroh andrewkroh removed the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Sep 9, 2025
@efd6 efd6 requested a review from clement-fouque September 9, 2025 20:42
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @efd6

Copy link

@clement-fouque
Copy link
Contributor

clement-fouque commented Sep 15, 2025

I tested this branch again and I can attest the following:

image

Both issues can be closed when this PR is merged.

cc @mitchell-rutigliano @smiller-elastic

@efd6
Copy link
Contributor Author

efd6 commented Sep 15, 2025

@clement-fouque If this is satisfactory, please either dismiss your review or approve the change.

Copy link
Contributor

@clement-fouque clement-fouque left a comment

Choose a reason for hiding this comment

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

LGTM

@efd6 efd6 merged commit a8b9678 into elastic:main Sep 15, 2025
9 checks passed
@elastic-vault-github-plugin-prod

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bugfix Pull request that fixes a bug issue enhancement New feature or request 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.

[snyk]: Fingerprint should include the status [snyk]: Invalid format for parameter scan_item.type: multiple values for single value parameter
5 participants