Skip to content

Commit c53a945

Browse files
chg: [documenation] Added output from Sphinx in /static/documentation.
1 parent 0082d34 commit c53a945

File tree

165 files changed

+26837
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+26837
-2
lines changed

content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Vulnerability-Lookup facilitates quick correlation of vulnerabilities from vario
1313
{{< cards >}}
1414
{{< card link="https://github.com/cve-search/vulnerability-lookup" title="The project on GitHub" icon="github" >}}
1515
{{< card link="https://vulnerability.circl.lu" title="Instance operated by CIRCL" icon="server" >}}
16-
{{< card link="https://vulnerability.circl.lu/documentation" title="Docs" icon="book-open" >}}
16+
{{< card link="/documentation" title="Documentation" icon="book-open" >}}
1717
{{< card link="about" title="About" icon="user" >}}
1818
{{< /cards >}}
1919

hugo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ menu:
3030
pageRef: /news
3131
weight: 1
3232
- name: Docs
33-
url: "https://vulnerability.circl.lu/documentation"
33+
pageRef: /documentation
3434
weight: 2
3535
- name: About
3636
pageRef: /about
Loading
36.2 KB
Loading
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
API v1
2+
======
3+
4+
.. _OpenAPI:
5+
6+
7+
`PyVulnerabilityLookup <https://github.com/cve-search/PyVulnerabilityLookup>`_
8+
is a Python library to access Vulnerability-Lookup its REST API.
9+
10+
11+
OpenAPI specicification
12+
-----------------------
13+
14+
15+
.. openapi:: _static/files/swagger.json
16+
17+
18+
Examples
19+
--------
20+
21+
Comments
22+
~~~~~~~~
23+
24+
Getting the list of comments:
25+
26+
.. code-block:: bash
27+
28+
$ curl -X 'GET' 'http://127.0.0.1:5000/api/comment/' -H 'accept: application/json'
29+
30+
31+
Getting the list of comments made by a specific author:
32+
33+
.. code-block:: bash
34+
35+
$ curl -X 'GET' 'http://127.0.0.1:5000/api/comment/?author=john' -H 'accept: application/json'
36+
37+
38+
Getting the list of comments related to a vulnerability:
39+
40+
.. code-block:: bash
41+
42+
$ curl -X 'GET' 'http://127.0.0.1:5000/api/comment/?vuln_id=cve-2024-38063' -H 'accept: application/json'
43+
44+
45+
Getting the list of comments that are related to a Proof of Concept:
46+
47+
.. code-block:: bash
48+
49+
$ curl -X 'GET' 'http://127.0.0.1:5000/api/comment/?meta=[{"tags":["PoC"]}]' -H 'accept: application/json'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
High level architecture
2+
=======================
3+
4+
.. figure:: _static/img/vulnerability-lookup.png
5+
:alt: High level architecture
6+
:target: _static/img/vulnerability-lookup.png
7+
8+
High level architecture
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
Command Line Interface
2+
======================
3+
4+
Section to explain the various commands available.
5+
6+
Core
7+
----
8+
9+
Start all the services
10+
~~~~~~~~~~~~~~~~~~~~~~
11+
12+
.. code-block:: bash
13+
14+
$ start
15+
16+
17+
Stop all the services
18+
~~~~~~~~~~~~~~~~~~~~~
19+
20+
.. code-block:: bash
21+
22+
$ stop
23+
24+
25+
Start only the website
26+
~~~~~~~~~~~~~~~~~~~~~~
27+
28+
.. code-block:: bash
29+
30+
$ start_website
31+
32+
33+
Restart only the website
34+
~~~~~~~~~~~~~~~~~~~~~~~~
35+
36+
.. code-block:: bash
37+
38+
$ restart_website
39+
40+
41+
Dump a source in a JSON file
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
44+
.. code-block:: bash
45+
46+
$ dump --feed nvd
47+
48+
Update the documentation
49+
~~~~~~~~~~~~~~~~~~~~~~~~
50+
51+
.. code-block:: bash
52+
53+
$ cd docs; make hmtl
54+
55+
56+
57+
Web service
58+
-----------
59+
60+
This section describes the main commands related to the web service.
61+
62+
63+
Init the database
64+
~~~~~~~~~~~~~~~~~
65+
66+
.. code-block:: bash
67+
68+
$ flask --app website.app db_init --help
69+
Usage: flask db_init [OPTIONS]
70+
71+
Will create the database from conf parameters.
72+
73+
Options:
74+
--help Show this message and exit.
75+
76+
77+
Create a user
78+
~~~~~~~~~~~~~
79+
80+
.. code-block:: bash
81+
82+
$ flask --app website.app create_user --help
83+
Usage: flask create_user [OPTIONS]
84+
85+
Initializes a user
86+
87+
Options:
88+
--login TEXT Login
89+
--email TEXT Email
90+
--password TEXT Password
91+
--help Show this message and exit.
92+
93+
94+
Create an admin
95+
~~~~~~~~~~~~~~~
96+
97+
.. code-block:: bash
98+
99+
$ flask --app website.app create_admin
100+
101+
102+
List all users
103+
~~~~~~~~~~~~~~
104+
105+
.. code-block:: bash
106+
107+
$ flask --app website.app user_list
108+
109+
110+
Delete a user
111+
~~~~~~~~~~~~~
112+
113+
.. code-block:: bash
114+
115+
$ flask --app website.app user_delete --login <login>
116+
117+
118+
Update MISP warning lists
119+
~~~~~~~~~~~~~~~~~~~~~~~~~
120+
121+
.. code-block:: bash
122+
123+
$ flask --app website.app update_warninglists
124+
125+
During the update of Vulnerability Lookup, the administrator will be prompted to execute this command.
126+
127+
128+
Backup the PostgreSQL database
129+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130+
131+
.. code-block:: bash
132+
133+
$ flask --app website.app db_backup
134+
135+
This command is executed automatically during the update ot Vulnerability Lookup.
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
Feed syndication
2+
================
3+
4+
Available feeds
5+
---------------
6+
7+
.. list-table:: Available feeds
8+
:widths: 25 25 50
9+
:header-rows: 1
10+
11+
* - Endpoint
12+
- Methods
13+
- Rule
14+
15+
* - bundles_bp.feed_bundles
16+
- GET
17+
- /bundles/feed.<string:format>[?user=<login>]
18+
19+
* - comments_bp.feed_comments
20+
- GET
21+
- /comments/feed.<string:format>[?user=<login>]
22+
23+
* - user_bp.feed_activity
24+
- GET
25+
- /user/<string:login>.<string:format>
26+
27+
* - home_bp.feed_recent
28+
- GET
29+
- /recent/<string:source>.<string:format>[?vulnerability=<vuln-id>]
30+
31+
32+
The value of ``format`` can be ``rss`` or ``atom``.
33+
34+
The value of ``source`` can be one of the following:
35+
"all",
36+
"github",
37+
"cvelistv5",
38+
"nvd",
39+
"pysec",
40+
"gsd",
41+
"ossf_malicious_packages",
42+
"csaf_certbund",
43+
"csaf_siemens",
44+
"csaf_redhat",
45+
"csaf_cisa",
46+
"csaf_cisco",
47+
"csaf_sick",
48+
"csaf_nozominetworks",
49+
"csaf_ox",
50+
"variot".
51+
52+
53+
Examples
54+
--------
55+
56+
Recent vulnerabilities from all sources
57+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58+
59+
.. code-block:: bash
60+
61+
$ curl https://vulnerability.circl.lu/recent/all.atom
62+
63+
64+
Recent vulnerabilities from pysec
65+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
.. code-block:: bash
68+
69+
$ curl https://vulnerability.circl.lu/recent/pysec.atom
70+
71+
72+
Recent vulnerabilities related to a vendor
73+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
75+
.. code-block:: bash
76+
77+
$ curl 'https://vulnerability.circl.lu/recent/cvelistv5.atom?vendor=MISP&per_page=2&page=8'
78+
<?xml version='1.0' encoding='UTF-8'?>
79+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
80+
<id>https://vulnerability.circl.lu/rss/recent/cvelistv5/2</id>
81+
<title>Most recent entries from cvelistv5</title>
82+
<updated>2024-11-26T08:02:41.668408+00:00</updated>
83+
<author>
84+
<name>Vulnerability Lookup</name>
85+
<email>[email protected]</email>
86+
</author>
87+
<link href="https://vulnerability.circl.lu" rel="alternate"/>
88+
<generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
89+
<subtitle>Contains only the most 2 recent entries.</subtitle>
90+
<entry>
91+
<id>https://vulnerability.circl.lu/vuln/cve-2021-37534</id>
92+
<title>cve-2021-37534</title>
93+
<updated>2024-11-26T08:02:41.670402+00:00</updated>
94+
<link href="https://vulnerability.circl.lu/vuln/cve-2021-37534"/>
95+
</entry>
96+
<entry>
97+
<id>https://vulnerability.circl.lu/vuln/cve-2022-29528</id>
98+
<title>cve-2022-29528</title>
99+
<updated>2024-11-26T08:02:41.670364+00:00</updated>
100+
<link href="https://vulnerability.circl.lu/vuln/cve-2022-29528"/>
101+
</entry>
102+
</feed>
103+
104+
105+
106+
Recent vulnerabilities linked to the specified vulnerability
107+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108+
109+
.. code-block:: bash
110+
111+
$ curl 'https://vulnerability.circl.lu/recent/all.atom?vulnerability=cve-2021-22280'
112+
<?xml version='1.0' encoding='UTF-8'?>
113+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
114+
<id>https://vulnerability.circl.lu/rss/recent/all/10</id>
115+
<title>Most recent entries from all</title>
116+
<updated>2024-11-26T08:03:09.000211+00:00</updated>
117+
<author>
118+
<name>Vulnerability Lookup</name>
119+
<email>[email protected]</email>
120+
</author>
121+
<link href="https://vulnerability.circl.lu" rel="alternate"/>
122+
<generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
123+
<subtitle>Contains only the most 10 recent entries.</subtitle>
124+
<entry>
125+
<id>https://vulnerability.circl.lu/vuln/ghsa-x53h-2cjp-mwcx</id>
126+
<title>ghsa-x53h-2cjp-mwcx</title>
127+
<updated>2024-11-26T08:03:09.013675+00:00</updated>
128+
<link href="https://vulnerability.circl.lu/vuln/ghsa-x53h-2cjp-mwcx"/>
129+
</entry>
130+
<entry>
131+
<id>https://vulnerability.circl.lu/vuln/gsd-2021-22280</id>
132+
<title>gsd-2021-22280</title>
133+
<updated>2024-11-26T08:03:09.013602+00:00</updated>
134+
<link href="https://vulnerability.circl.lu/vuln/gsd-2021-22280"/>
135+
</entry>
136+
</feed>
137+
138+
139+
Subscribing to the activity related to a vulnerability
140+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141+
142+
The request will return recent observations (sightings) related to a vuln.
143+
144+
$ curl 'https://vulnerability.circl.lu/sightings/feed.atom?vulnerability=CVE-2024-0012'

0 commit comments

Comments
 (0)