mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add CVE and CWE roles (#11781)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f7fa020cc2
commit
09ab6edde5
@@ -249,6 +249,34 @@ There is also an :rst:role:`index` role to generate index entries.
|
||||
|
||||
The following roles generate external links:
|
||||
|
||||
.. rst:role:: cve
|
||||
|
||||
A reference to a `Common Vulnerabilities and Exposures`_ record.
|
||||
This generates appropriate index entries.
|
||||
The text "CVE *number*\ " is generated;
|
||||
with a link to an online copy of the specified CVE.
|
||||
You can link to a specific section by using ``:cve:`number#anchor```.
|
||||
|
||||
.. _Common Vulnerabilities and Exposures: https://www.cve.org/
|
||||
|
||||
For example: :cve:`2020-10735`
|
||||
|
||||
.. versionadded:: 8.1
|
||||
|
||||
.. rst:role:: cwe
|
||||
|
||||
A reference to a `Common Weakness Enumeration`_.
|
||||
This generates appropriate index entries.
|
||||
The text "CWE *number*\ " is generated; in the HTML output,
|
||||
with a link to an online copy of the specified CWE.
|
||||
You can link to a specific section by using ``:cwe:`number#anchor```.
|
||||
|
||||
.. _Common Weakness Enumeration: https://cwe.mitre.org/
|
||||
|
||||
For example: :cwe:`787`
|
||||
|
||||
.. versionadded:: 8.1
|
||||
|
||||
.. rst:role:: pep
|
||||
|
||||
A reference to a Python Enhancement Proposal. This generates appropriate
|
||||
|
||||
Reference in New Issue
Block a user