Inscreva-se no feed

Please note that is deprecated in favor of new security data formats and solutions. You can read more about these in The future of Red Hat security data.

As a Technical Account Manager (TAM) one of the best parts of the job is the regular contact with our customers, talking to them frequently and helping them solve interesting problems.

One of our customers came to me with an interesting challenge.  The team creates a new Gold Image every month and they wanted to provide release notes for the image, automatically generating a list of CVEs that had been fixed in this version of the image.

Red Hat publishes release notes for new product versions which include details of CVEs and RHSAs which have been fixed in a release, such as in the recently released Red Hat Enterprise Linux 8.6 

The problem with the release notes is that they only cover a specific point of time, and Red Hat releases fixes much more frequently. So, how do we get the information on what has been released between two dates? How can we find out what CVEs have been fixed and what RHSAs have been released between the last time you published an image and now?

This is where comes in.

In this blog, we explore the use of the script provided on the Red Hat Security Data page and show you how you can use it to return a list of CVEs and RHSAs included in a particular Red Hat Product between two specified dates.

Getting started with

The script requires the use of three other .txt files also published on the same page. We will create a directory to hold the script and the required files, use  wget  to download the required files from the Red Hat site, and also set the permissions on the script.

mkdir security_review
cd security_review
chmod 700

Now that you have the script and its required working files, we can explore everything that's possible by running:

./ --help

This will provide us with a long list of available options.

usage: [OPTIONS]
  --cpe <product/package to generate stats for>
            [examples: --cpe all
                       --cpe enterprise_linux
                       --cpe enterprise_linux:3
                       --cpe enterprise_linux:5::client/firefox
                       --cpe /httpd ]
            [product/package to exclude from stats]
  --severity <all|C|I|M|L|CI|CIM|IL...>
            [filter severity, 'C'ritical 'I'mportant 'M'oderate 'L'ow]
  --cvss <range>
            [filter on CVSSv2 base score, example '6.8'|'0-5'|'8-10'|'high'|...]
  --cvss3 <range>
            [filter on CVSSv3 base score, example '6.8'|'0.1-5'|'high'|'critical'|...]
  --dates [<YYYYMMDD>]-[<YYYYMMDD>]
            [date range, default is 'all', example '20090101-'|'20080203-20080303']
  --datestart [<YYYYMMDD>]
            [start date, example '20090101']
  --dateend [<YYYYMMDD>]
            [end date, example '20100101']
  --xmlsummary <filename>
            [output the XML summary to this file, default summary.xml]
            [append results as a comma-separated list]
  --quiet | verbose
            [set verbosity level]
            [show this help]

What has been updated between two dates?

Let’s say we wanted to find all the CVEs and RHSAs released between (in this example) April 1st and April 30th, 2022 for Red Hat Enterprise Linux 8.  We can do this with the following command:

./ --cpe enterprise_linux:8 --datestart 20220401 --dateend 20220430 --xmlsummary rhel-8-report.xml

This command will only take a few seconds to complete and will output a summary of the data:

** Product: Red Hat Enterprise Linux 8 (all packages)
** CPE: redhat:enterprise_linux:8
** Severity: Critical Important Moderate Low
** Dates: 20220401 - 20220430 (30 days)

** 17 advisories (I=11 L=1 M=5 )
** 35 vulnerabilities (I=10 L=7 M=18 )
** Advisory Workload index is 0.40
** Vulnerability Workload index is 0.46
** Average is 127 days
** Median is 19 days
** 0% were 0day
** 17% were within 1 day
** 45% were within 7 days
** 45% were within 14 days
** 60% were within 31 days
** 71% were within 90 days

For our use case, what we are more interested in is the generated rhel-8-report.xml.  Below is a small snippet of the information contained inside the summary xml file:


The complete file lists every CVE which was fixed between the specified dates, as well as the associated RHSA which fixed it and the date it was fixed for the specified product.


Here we have covered the basics of the script provided on the Red Hat Security Data page, including how you can use it to return a list of CVEs and RHSAs included in a Red Hat Product between two dates.

If you would like to take this a bit further, it would be possible to use a bash script to automate the download of the required .txt files to ensure each run has up to date data. It would also be possible to enhance the report by using the Red Hat Security Data API to pull in descriptions and titles, rather than just giving us the CVE and RHSA numbers, but that is outside the scope of this article.


Sobre o autor

Working in production technical support for 10 years prior, I joined Red Hat in 2021 as a Technical Account Manager. I have a passion for automation and reporting, and I live in Scotland, UK with my wife Sara and Dog Radar.

Read full bio

Navegue por canal

automation icon


Últimas novidades em automação de TI para empresas de tecnologia, equipes e ambientes

AI icon

Inteligência artificial

Descubra as atualizações nas plataformas que proporcionam aos clientes executar suas cargas de trabalho de IA em qualquer ambiente

open hybrid cloud icon

Nuvem híbrida aberta

Veja como construímos um futuro mais flexível com a nuvem híbrida

security icon


Veja as últimas novidades sobre como reduzimos riscos em ambientes e tecnologias

edge icon

Edge computing

Saiba quais são as atualizações nas plataformas que simplificam as operações na borda

Infrastructure icon


Saiba o que há de mais recente na plataforma Linux empresarial líder mundial

application development icon


Conheça nossas soluções desenvolvidas para ajudar você a superar os desafios mais complexos de aplicações

Original series icon

Programas originais

Veja as histórias divertidas de criadores e líderes em tecnologia empresarial