From: Sachin Sant <sachinp@linux.ibm.com>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 1/2] doc: generate CVE catalog documentation
Date: Tue, 28 Apr 2026 18:24:36 +0530 [thread overview]
Message-ID: <dd3502b7-670b-473c-b607-672695c06f4c@linux.ibm.com> (raw)
In-Reply-To: <69f05e59.7b0a0220.32d441.7979@mx.google.com>
>> Add a Sphinx builder hook to parse runtest/cve and generate a
>> comprehensive CVE catalog in a single documentation file.
>>
>> The implementation:
>> - Parses runtest/cve to extract CVE IDs, test names, and options
>> - Generates a single CVE catalog file (_static/cves.rst) containing:
> Please use just 'cve.rst' instead of 'cves.rst'. The plural is not
> providing any info here.
Sure, will change the name.
>> +def generate_cve_catalog(_):
>> + """
>> + Generate CVE catalog in a single file. Parse runtest/cve file and
>> + generate documentation with links to CVE databases and test sources.
>> + Similar to test_catalog, creates a single _static/cves.rst file with
>> + all CVE information.
>> + """
>> + output = '_static/cves.rst'
>> + runtest_cve = '../runtest/cve'
>> +
>> + # Parse runtest/cve file
>> + cve_data = {}
>> + cve_pattern = re.compile(r'^(cve-(\d{4})-\d+)\s+(\S+)(?:\s+(.*))?$')
> Do we need a regexp for this? The runtest file is well defining the
> following structure:
Yeah, we may not need a regexp here.
>
> <cve-id> <binary> <arg0> <arg1> ..
>
> We only need to split lines which are not starting with # char,
> considering space as separator.
got it. Will include this change in the next version.
>> +
>> + text.extend([
>> + f'This test reproduces the vulnerability described in {cve_id}.',
>> + 'The test verifies that the system is properly patched against',
>> + 'this known security vulnerability.',
>> + '',
>> + f'* **CVE Year:** {cve_info["year"]}',
>> + f'* **Test Command:** {test_cmd}',
>> + '',
>> + '.. raw:: html',
>> + '',
>> + ' <hr>',
>> + '',
>> + ])
> All this text is redundant and occupying space for no reason.
> Also I'm not sure about this approach, now we have tests list duplication
> inside the documentation.
>
> What about generating only a simple reference table? There are only 3
> information we need: CVE ID, test binary, year.
>
> | ID | Test name | Year |
> -------------------------
> | .. | .. | .. |
>
> etc..
Okay. Do we need year in the column since the CVE name also has year.
For cve.rst, I implemented the same logic as tests.rst.
A separate entry for CVE catalog.
Once a user clicks on this option it will expand with a list of
individual CVE pages
in the left pane. Each entry follows the following format
<CVE ID> ( <Test Name> )
Based on review comments how should the page look like?
A separate entry for CVE catalog.
Once a user clicks on this option it will display the CVE list in
tabular format
sorted by year. The table will follow (assuming Year to be retained)
| ID | Test name | Year |
-------------------------
| .. | .. | .. |
Test name will point to an entry in Test catalog.
No individual pages required for each CVE.
Can you confirm?
> There's no need to have a direct link to the CVE, since we already pointing
Okay. I can make this change. I followed the earlier
Thanks for the review.
--
Thanks
- Sachin
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-28 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 12:18 [LTP] [PATCH v3 1/2] doc: generate CVE catalog documentation Sachin Sant
2026-04-24 12:18 ` [LTP] [PATCH 2/2] doc: Rename statistics page to 'Supported syscalls' Sachin Sant
2026-04-28 6:42 ` Andrea Cervesato via ltp
2026-04-28 7:06 ` [LTP] doc: generate CVE catalog documentation linuxtestproject.agent
2026-04-28 7:14 ` [LTP] [PATCH v3 1/2] " Andrea Cervesato via ltp
2026-04-28 8:58 ` Petr Vorel
2026-04-28 12:54 ` Sachin Sant [this message]
2026-04-28 13:04 ` Andrea Cervesato via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd3502b7-670b-473c-b607-672695c06f4c@linux.ibm.com \
--to=sachinp@linux.ibm.com \
--cc=andrea.cervesato@suse.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox