Skip to content

Commit

Permalink
docs: add mermaid plugin and replace image
Browse files Browse the repository at this point in the history
Fixes: #2559
  • Loading branch information
orndorffgrant authored and lucasmoura committed Aug 1, 2023
1 parent 9a9c4a7 commit 58a5b35
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs-requirements.txt
Expand Up @@ -5,3 +5,4 @@ sphinx==5.1.1
sphinx_autobuild
sphinx_copybutton
sphinx_design
sphinxcontrib-mermaid
1 change: 1 addition & 0 deletions docs/conf.py
Expand Up @@ -32,6 +32,7 @@
"myst_parser",
"sphinx_copybutton",
"sphinx_design",
"sphinxcontrib.mermaid",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
22 changes: 21 additions & 1 deletion docs/explanations/cves_and_usns_explained.md
Expand Up @@ -33,7 +33,27 @@ A USN is composed of different CVEs. If the same CVE appears on multiple USNs, w
In the following image, we can see a visual representation of that concept, where USN-789 and USN-321
are related USNs because both are affected by CVE-2:

![Related USN example](../images/usn-related.png)
```{mermaid}
graph TD;
%% nodes
usn1[USN-123]
usn2[USN-456]
usn3[USN-789]
usn4[USN-321]
usn5[USN-654]
cve1((CVE-1))
cve2((CVE-2))
cve3((CVE-3))
%% arrows
usn1-->cve1
usn1-->cve2
usn1-->cve3
cve1-->usn2
cve2-->usn3
cve2-->usn4
cve3-->usn5
```


A real example can be seen in [USN-5573-1](https://ubuntu.com/security/notices/USN-5573-1).
Expand Down
Binary file removed docs/images/usn-related.png
Binary file not shown.

0 comments on commit 58a5b35

Please sign in to comment.