doc: Add CVE catalog to documentation
PATCH RESEND v5 1/2 doc: Add CVE catalog to documentation
Add a new CVE catalog page that automatically generates a comprehensive list of all CVE reproducers available in LTP. The catalog extracts CVE information from test metadata tags and presents them in a table format with links to corresponding test cases.
Changes:
- Add doc/users/cve_catalog.rst as new documentation page
- Implement generate_cve_catalog() in doc/conf.py to extract CVE tags from metadata/ltp.json and generate _static/cve.rst
- Configure autosectionlabel with document prefixes to prevent duplicate label warnings when same test names appear in multiple files
- Update doc/Makefile to clean generated _static/cve.rst file
- Add CVE catalog link to main documentation index
The catalog displays CVEs in descending order (newest first) with cross-references to test cases in the test catalog, making it easy to find reproducers for specific CVEs.
---
V5 changes:
- Rewrite CVE catalog logic to only use ltp.json metadata
- Remove the dependency on runtest/cve file
- v4 link https://lore.kernel.org/ltp/[email protected]/T/#t
V4 changes:
- Simplified the CVE table (id, test name)
- Removed individual CVE pages
- v3 link https://lore.kernel.org/ltp/[email protected]/T/#u
V3 changes:
- CVEs sorted in descending order
- append test name to CVE id : CVE (Test Name)
- Separate page for CVE catalog
- Link cve testcases to Test catalog entry
- v2 link https://lore.kernel.org/ltp/[email protected]/
V2 changes:
- Replace Fixes tag by Closes
- V1 link https://lore.kernel.org/ltp/[email protected]/T/#u
--- doc/Makefile | 2 +- doc/conf.py | 84 +++++++++++++++++++++++++++++++++++++++ doc/index.rst | 4 ++ doc/users/cve_catalog.rst | 6 +++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 doc/users/cve_catalog.rst
doc/Makefile +1 -1
@@ -31,7 +31,7 @@ spelling: clean: rm -rf html/ build/ _static/syscalls.rst _static/tests.rst syscalls.tbl \ - ${abs_top_builddir}/metadata/ltp.json + _static/cve.rst ${abs_top_builddir}/metadata/ltp.json distclean: clean rm -rf $(VENV_DIR)
doc/conf.py +84 -0
100 lines not on this page · raw message
doc/index.rst +4 -0
@@ -12,6 +12,7 @@ users/testers_guide users/supported_systems users/stats + users/cve_catalog users/test_catalog .. toctree::
@@ -58,6 +59,9 @@ For users :doc:`users/stats` Some LTP statistics +:doc:`users/cve_catalog` + LTP reproducers for known CVEs + :doc:`users/test_catalog` The LTP test catalog
doc/users/cve_catalog.rst new file +6 -0
@@ -0,0 +1,6 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +CVE catalog +=========== + +.. include:: ../_static/cve.rst
Signature · 5 lines
2.39.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH RESEND 2/2 doc: Rename statistics page to 'Supported syscalls'
Rename the documentation page from 'Statistics' to 'Supported syscalls' to better reflect its content, which focuses on syscall coverage.
- Renamed doc/users/stats.rst to doc/users/supported_syscalls.rst
- Updated page title and description
- Updated references in doc/index.rst
- Updated spelling exclusion pattern in doc/conf.py
- Renamed function definition from generate_syscalls_stats to generate_supported_syscalls
- Updated app.connect() call to use the new function name
--- doc/conf.py | 13 +++++++------ doc/index.rst | 6 +++--- doc/users/stats.rst | 9 --------- doc/users/supported_syscalls.rst | 9 +++++++++ 4 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 doc/users/stats.rst create mode 100644 doc/users/supported_syscalls.rst
doc/conf.py +7 -6
@@ -55,7 +55,7 @@ manpages_url = 'https://man7.org/linux/man-pages/man{section}/{page}.{section}.h spelling_lang = "en_US" spelling_warning = True -spelling_exclude_patterns = ['users/stats.rst'] +spelling_exclude_patterns = ['users/supported_syscalls.rst'] spelling_word_list_filename = "spelling_wordlist" # -- Options for HTML output -------------------------------------------------
@@ -65,11 +65,12 @@ html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] -def generate_syscalls_stats(_): +def generate_supported_syscalls(_): """ - Generate statistics for syscalls. We fetch the syscalls list from the kernel - sources, then we compare it with testcases/kernel/syscalls folder and - generate a file that is included in the statistics documentation section. + Generate supported syscalls documentation. We fetch the syscalls list + from the kernel sources, then we compare it with testcases/kernel/syscalls + folder and generate a file that is included in the supported syscalls + documentation section. """ output = '_static/syscalls.rst'
@@ -625,6 +626,6 @@ def setup(app): customizations. """ app.add_css_file('custom.css') - app.connect('builder-inited', generate_syscalls_stats) + app.connect('builder-inited', generate_supported_syscalls) app.connect('builder-inited', generate_cve_catalog) app.connect('builder-inited', generate_test_catalog)
doc/index.rst +3 -3
@@ -11,7 +11,7 @@ users/setup_tests users/testers_guide users/supported_systems - users/stats + users/supported_syscalls users/cve_catalog users/test_catalog
@@ -56,8 +56,8 @@ For users :doc:`users/supported_systems` A list of supported technologies by the LTP framework -:doc:`users/stats` - Some LTP statistics +:doc:`users/supported_syscalls` + Syscalls supported by LTP tests :doc:`users/cve_catalog` LTP reproducers for known CVEs
doc/users/stats.rst deleted +0 -9
@@ -1,9 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0-or-later - -Statistics -========== - -In this section we collect some statistics related to the current state of -LTP tests. - -.. include:: ../_static/syscalls.rst
doc/users/supported_syscalls.rst new file +9 -0
@@ -0,0 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Supported syscalls +================== + +In this section we collect information about syscalls that are currently +tested by LTP. + +.. include:: ../_static/syscalls.rst
Signature · 5 lines
2.39.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
doc/Makefile spelling: · line 34
Quoted 4 lines
clean:
doc/Makefile +1
-1rm -rf html/ build/ _static/syscalls.rst _static/tests.rst syscalls.tbl \ - ${abs_top_builddir}/metadata/ltp.json + _static/cve.rst ${abs_top_builddir}/metadata/ltp.json
Hmm, so this rule to clean ltp.json was there before. I guess that I will just send a patch to remove it after this has been merged.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp