[TENABLE_IO] Use script to convert strings to numeric in asset datastream - #14681
Merged
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
StacieClark-Elastic
force-pushed
the
bugfix/tenable-io-asset-datastream-use-script-for-long-conversion
branch
from
July 24, 2025 18:32
9c4e98b to
bdc349a
Compare
Contributor
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
asset |
2450.98 | 1742.16 | -708.82 (-28.92%) | 💔 |
To see the full report comment with /test benchmark fullreport
StacieClark-Elastic
force-pushed
the
bugfix/tenable-io-asset-datastream-use-script-for-long-conversion
branch
from
July 24, 2025 20:47
bdc349a to
7999c84
Compare
Fixes issue where string values that represent longs started to be returned from the tenable io asset API as strings with decimals. This caused the convert processor for strings to long to fail. Replaced the convert processor with a painless sctipt that handles strings as longs or decimals as well as primtive long, integer and double values. The issue is a due to the source changing returned values and violating the API contract
StacieClark-Elastic
force-pushed
the
bugfix/tenable-io-asset-datastream-use-script-for-long-conversion
branch
from
July 24, 2025 22:37
7999c84 to
0416d37
Compare
|
💚 Build Succeeded
History
|
kcreddy
approved these changes
Jul 25, 2025
Contributor
|
Package tenable_io - 4.2.1 containing this change is available at https://epr.elastic.co/package/tenable_io/4.2.1/ |
efd6
reviewed
Jul 27, 2025
| # newer versions go on top | ||
| - version: "4.2.1" | ||
| changes: | ||
| - description: | |
Contributor
There was a problem hiding this comment.
We don't need to preserve new lines so
Suggested change
| - description: | | |
| - description: >- |
| if: ctx.json?.acr_score != '' | ||
| ignore_missing: true | ||
| - script: | ||
| if: ctx.json?.acr_score != null && ctx.json?.acr_score != '' |
Contributor
There was a problem hiding this comment.
Suggested change
| if: ctx.json?.acr_score != null && ctx.json?.acr_score != '' | |
| if: ctx.json?.acr_score != null && ctx.json.acr_score != '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




The tenable io API for fetching asset data changed the response definition to return decimal values in strings that are defined by the API as integers. The convert processor for string to long fails on decimals. We replaced the convert processor with a painless script for fields exposure_score which becomes tenable_io.asset.exposure_score and acr_score which becomes tenable_io.asset.acr_score.
Proposed commit message
Fixes issue where string values that represent longs in fields acr_score and exposure score started to be returned from the tenable io asset API as strings with decimals. This caused the convert processor for strings to long to fail. Replaced the convert processor with a painless sctipt that handles strings as longs or decimals as well as primtive long, integer and double values. The issue is a due to the source changing returned values and violating the API contract
Checklist
changelog.ymlfile.Closes #14684