Skip to content

Conversation

@efd6
Copy link
Contributor

@efd6 efd6 commented Aug 1, 2023

What does this PR do?

Retains a calculated vulnerability age in days from the first and last seen dates.

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added enhancement New feature or request Team:Security-External Integrations Integration:tenable_sc Tenable Security Center labels Aug 1, 2023
@efd6 efd6 self-assigned this Aug 1, 2023
@efd6 efd6 force-pushed the 7198-tenable_sc branch from 7c83049 to eaf38cd Compare August 1, 2023 23:28
@elasticmachine
Copy link

elasticmachine commented Aug 1, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-02T01:03:31.053+0000

  • Duration: 20 min 31 sec

Test stats 🧪

Test Results
Failed 0
Passed 19
Skipped 0
Total 19

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Retain a calculated vulnerability age in days from the first and last seen dates.
@efd6 efd6 force-pushed the 7198-tenable_sc branch from eaf38cd to c804e62 Compare August 2, 2023 01:03
@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (3/3) 💚
Files 100.0% (3/3) 💚 5.0
Classes 100.0% (3/3) 💚 5.0
Methods 100.0% (45/45) 💚 12.923
Lines 96.978% (1123/1158) 👍 10.715
Conditionals 100.0% (0/0) 💚
@efd6 efd6 marked this pull request as ready for review August 2, 2023 01:42
@efd6 efd6 requested a review from a team as a code owner August 2, 2023 01:42
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

Copy link
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

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

Looks good!

For me it is counterintuitive that a vulnerability doesn't "age" unless it continues to be seen. I might have called it "exposure_duration" or "days_observed" or something. However, "age" was requested by someone who knows Tenable SC and the domain better than I do so I assume it'll be fine. Also the field description is clear.

@chemamartinez
Copy link
Contributor

For me it is counterintuitive that a vulnerability doesn't "age" unless it continues to be seen. I might have called it "exposure_duration" or "days_observed" or something. However, "age" was requested by someone who knows Tenable SC and the domain better than I do so I assume it'll be fine. Also the field description is clear.

Probably when this event arises it is because the vulnerability was detected in the last scan performed, so in theory it would still exist.

@efd6
Copy link
Contributor Author

efd6 commented Aug 2, 2023

@jgreene-TrappTech Are you able to comment on the concerns above?

@jgreene-TrappTech
Copy link

jgreene-TrappTech commented Aug 2, 2023

Certainly. We have no attachment to age vs duration or another field. All that we seek is to have this as a calculated field via the pipeline so that we are not modifying the default pipelines or adding to them.

Typically, Vulnerability SLA's mandate that after a vulnerability is discovered, the product owner has N number of days to remediate. So the selection of age or vulnerability.age was derived from that language. As the SLA's vary between compliance initiatives, we simply represent days between first and last seen in the end user's reporting.

Currently we are using tenable_sc.vulnerability.age as a positive integer to indicate the time in days since first_seen and last_seen.

Hope that helps.

@efd6
Copy link
Contributor Author

efd6 commented Aug 2, 2023

Thanks, the second part of the concern is whether events ever come through without a last seen, but with a first seen. Is this ever the case?

For the language and unit choice, I think days is the best given that it matches other fields in the tenable documents.

@jgreene-TrappTech
Copy link

jgreene-TrappTech commented Aug 2, 2023

First time seen and last time seen appear to be in every tenable_sc.vulnerability document. Where the vulnerability is seen for the first time, the first and last time seen are set to the time that the scan was completed. In a one week look back for one data_stream.namespace there were 4,260,444 hits and zero documents without both last_seen and first_seen populated.

Here is an example:

image

@efd6
Copy link
Contributor Author

efd6 commented Aug 2, 2023

Thanks

@efd6 efd6 merged commit 76ef9c1 into elastic:main Aug 2, 2023
@elasticmachine
Copy link

Package tenable_sc - 1.13.0 containing this change is available at https://epr.elastic.co/search?package=tenable_sc

1 similar comment
@elasticmachine
Copy link

Package tenable_sc - 1.13.0 containing this change is available at https://epr.elastic.co/search?package=tenable_sc

@efd6 efd6 deleted the 7198-tenable_sc branch February 5, 2025 22:04
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:tenable_sc Tenable Security Center

5 participants