Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not finding EOL software in container images #266

Closed
bisbell-ngc opened this issue Jan 5, 2024 · 5 comments
Closed

Not finding EOL software in container images #266

bisbell-ngc opened this issue Jan 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@bisbell-ngc
Copy link

bisbell-ngc commented Jan 5, 2024

What happened: Not reporting on EOL'ed software in container images.

What you expected to happen: EOL'ed software in container images will be reported.

How to reproduce it (as minimally and precisely as possible):

1: Pull container image with EOL'ed software, and save as tar ball

$ docker pull mysql:5.5.42
$ docker save mysql:5.5.42 > mysql_5.5.42.tar

2: Generate SBOM using syft-json output.

$ docker run --rm -v $(pwd):/tmp anchore/syft:v0.99.0 mysql_5.5.42.tar -o syft-json > mysql.json

3: Run xeol on SBOM. Expectation is that it would include MySQL 5.5 as an EOL'ed product.

$ docker run --rm -v $(pwd):/tmp noqcks/xeol:v0.9.10 sbom:mysql.json
NAME              VERSION  EOL         DAYS EOL  TYPE 
Debian GNU/Linux  7        2016-04-25  2811      os

Anything else we need to know?:

Increasing verbosity shows that it is finding MySQL, but the package type is binary.

$ docker run --rm -v $(pwd):/tmp noqcks/xeol:v0.9.10 -vv sbom:mysql.json 2>&1 | grep mysql
[0001] DEBUG searching for eol matches for pkg=Pkg(type=binary, name=mysql, version=5.5.42, upstreams=0)

Other test I have run.

  • Using cyclonedx-json output from Syft.
  • Scanning the container image tar file instead of the SBOM.

Other container images I have tested. All software versions are listed as EOL'ed on endoflife.date / xeol.db.

  • nginx:1.23.3
  • haproxy:2.5.14

MySQL 5.5 EOL on 2018-12-31

$ sqlite3 xeol.db "select cycles.* from products join cycles on products.id=cycles.product_id where products.name = 'MySQL' AND cycles.release_cycle = '5.5'"
1629|0|5.5|2018-12-31|||2018-12-21|2010-12-03|2015-12-31|154

nginx 1.23 EOL on 2023-05-23

$ sqlite3 xeol.db "select cycles.* from products join cycles on products.id=cycles.product_id where products.name = 'nginx' AND cycles.release_cycle = '1.23'"
1670|0|1.23|2023-05-23|||2023-03-28|2022-06-21|0|160

Environment:
All versions of tools are based on container tags.

@noqcks
Copy link
Collaborator

noqcks commented Jan 5, 2024

hey @bisbell-ngc thanks for opening this issue!

This is because endoflife.date didn't have identifiers for mysql yet, I've added them in this PR endoflife-date/endoflife.date#4424

Once the PR is merged then the xeol database should be updated within 24 hours and it will detect mysql.

@bisbell-ngc
Copy link
Author

Thank you.
In the future should I submit these requests directly to endoflife-data as issues?
I have a feeling we're going to run across a lot of these in container images; I don't see many entries in the database for generic or binary purls.

@noqcks
Copy link
Collaborator

noqcks commented Jan 8, 2024

You can submit them here, since it could actually be the case that it's not just endoflife.date that was the problem.

In this case there were actually two problems

  1. endoflife.date didn't contain the right purls
  2. the version of syft we're using didn't pick up binary mysql (added in Add binary classifiers for MySQL and MariaDB  anchore/syft#2316)

Im working on the second one right now.

@noqcks
Copy link
Collaborator

noqcks commented Jan 9, 2024

mysql is now detected in v0.9.11

$ xeol mysql:5.5.42
 ✔ EOL DB                          [no update available]
 ✔ Scanned for EOL                 [2 eol matches]
NAME              VERSION  EOL         DAYS EOL  TYPE
Debian GNU/Linux  7        2016-04-25  2815      os
mysql             5.5.42   2018-12-31  1835      binary

@noqcks noqcks closed this as completed Jan 9, 2024
@noqcks
Copy link
Collaborator

noqcks commented Jan 9, 2024

Thanks again for opening all these issues @bisbell-ngc and making the tool better for everyone 🙏

@noqcks noqcks closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants