Skip to content

Commit 846e18e

Browse files
committed
Add a new "Create a Product Vulnerability Report" tutorial #226
Signed-off-by: tdruez <[email protected]>
1 parent 74df785 commit 846e18e

21 files changed

+228
-1
lines changed

docs/howto-3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ the REST API:
2525

2626
Replace ``{uuid}`` with the unique identifier of your product.
2727

28-
You can also provide your prefered CycloneDX spec version using the ``spec_version``
28+
You can also provide your preferred CycloneDX spec version using the ``spec_version``
2929
query argument such as: ``/api/v2/products/{uuid}/cyclonedx_sbom/?spec_version=1.6``
Loading
65.9 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Welcome to the very start of your DejaCode journey!
2222
tutorial-3
2323
tutorial-4-vulnerabilities
2424
tutorial-5-sboms
25+
tutorial-6-vuln-report
2526

2627
.. toctree::
2728
:maxdepth: 1

docs/tutorial-6-vuln-report.rst

+226
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
.. _user_tutorial_6_vuln_report:
2+
3+
Tutorial 6 - Create a Product Vulnerability Report
4+
==================================================
5+
6+
You received a Software Bill of Materials (SBOM) from your supplier, and you have
7+
loaded it into a DejaCode Product as described in :ref:`user_tutorial_5_sboms`.
8+
You would like to create a Report to analyze the vulnerabilities in
9+
that Product, share it with your team, and track your issue resolution progress.
10+
11+
Sign into DejaCode.
12+
13+
Create a DejaCode Query
14+
-----------------------
15+
16+
1. Select :guilabel:`Dashboard` from the dropdown menu under your user name.
17+
18+
.. image:: images/tutorial-6-vuln-report/go-to-admin-dashboard.png
19+
:width: 200
20+
21+
2. Scroll down and select :guilabel:`Queries` from the Reporting section of the
22+
Administrator dashboard.
23+
24+
.. image:: images/tutorial-6-vuln-report/go-to-admin-queries.png
25+
:width: 300
26+
27+
3. Click the :guilabel:`Add query` button in the upper right section of the
28+
Administrator Queries changelist form.
29+
30+
.. image:: images/tutorial-6-vuln-report/add-query.png
31+
:width: 500
32+
33+
4. Identify the Query.
34+
35+
* Enter the **Name** "Product Packages with Vulnerabilities".
36+
* Enter the **Description** "Select the Packages assigned to a Product for which
37+
there are known vulnerabilities."
38+
* Select the **Object type** "Product Portfolio | product package relationship".
39+
* Accept the default **Operator** value "and".
40+
41+
.. image:: images/tutorial-6-vuln-report/enter-query-header-info.png
42+
43+
5. Define the Query Filters.
44+
45+
* Scroll down to the :guilabel:`Filters` section of the form and click the
46+
**Add another filter** command.
47+
* Select "Product>>" from the :guilabel:`Field Name` list.
48+
* Select "name" from the list of Product fields.
49+
* Select "Case-insensitive exact match" from the :guilabel:`Lookup` list.
50+
* Enter "Starship Controller" (without the quotes) in the :guilabel:`Value` field.
51+
* Check the :guilabel:`Runtime Parameter` option.
52+
* Accept the default unchecked :guilabel:`Negate` option.
53+
54+
* Click the **Add another filter** command.
55+
* Select "Product>>" from the :guilabel:`Field Name` list.
56+
* Select "version" from the list of Product fields.
57+
* Select "Case-insensitive exact match" from the :guilabel:`Lookup` list.
58+
* Enter "2.0" (without the quotes) in the :guilabel:`Value` field.
59+
* Check the :guilabel:`Runtime Parameter` option.
60+
* Accept the default unchecked :guilabel:`Negate` option.
61+
62+
* Click the **Add another filter** command.
63+
* Select "weighted_risk_score" from the :guilabel:`Field Name` list.
64+
* Select "Greater than or equal to" from the :guilabel:`Lookup` list.
65+
* Enter "3" (without the quotes) in the :guilabel:`Value` field.
66+
* Check the :guilabel:`Runtime Parameter` option.
67+
* Accept the default unchecked :guilabel:`Negate` option.
68+
69+
* In the lower right section of the form, click the
70+
:guilabel:`Save and continue editing` button.
71+
72+
.. image:: images/tutorial-6-vuln-report/save-query-1.png
73+
74+
6. Define the Query Order.
75+
76+
* In the :guilabel:`Order Fields` section of the form click the
77+
**Add another order field** command.
78+
* Select "weighted_risk_score" from the :guilabel:`Field Name` list.
79+
* Select "descending" from the :guilabel:`Sort` list.
80+
81+
* Click the **Add another order field** command.
82+
* Select "package" from the :guilabel:`Field Name` list.
83+
* Select "ascending" from the :guilabel:`Sort` list.
84+
85+
* In the lower right section of the form, click the
86+
:guilabel:`Save and continue editing` button.
87+
88+
.. image:: images/tutorial-6-vuln-report/save-query-2.png
89+
90+
Create a DejaCode Column Template
91+
---------------------------------
92+
93+
1. In the upper left section of the Change query form, click the
94+
:guilabel:`Reporting` option in the navigation path.
95+
96+
.. image:: images/tutorial-6-vuln-report/go-to-admin-reporting.png
97+
:width: 500
98+
99+
2. On the Reporting Administration form select :guilabel:`Column templates` .
100+
101+
.. image:: images/tutorial-6-vuln-report/go-to-admin-column-templates.png
102+
:width: 500
103+
104+
3. Click the :guilabel:`Add column template` button in the upper right section of the
105+
Administrator Column templates changelist form.
106+
107+
.. image:: images/tutorial-6-vuln-report/add-column-template.png
108+
:width: 500
109+
110+
4. Identify the Column Template.
111+
112+
* Enter the **Name** "Product Packages with Vulnerabilities".
113+
* Enter the **Description** "Identify the Packages in a Product that require
114+
attention due to known vulnerabilities."
115+
* Select the **Object type** "Product Portfolio | product package relationship".
116+
117+
.. image:: images/tutorial-6-vuln-report/enter-column-template-info.png
118+
119+
5. Define the Column Template Fields.
120+
121+
* Scroll down to the :guilabel:`Column Template Assigned Fields` section of the
122+
form and click the **Add another column template assigned field** command.
123+
* Select "product>>" from the :guilabel:`Field Name` list.
124+
* Select "name" from the list of Product fields.
125+
* Enter "Product" in the :guilabel:`Display name` field.
126+
127+
* Click the **Add another column template assigned field** command.
128+
* Select "product>>" from the :guilabel:`Field Name` list.
129+
* Select "version" from the list of Product fields.
130+
* Enter "Version" in the :guilabel:`Display name` field.
131+
132+
* Click the **Add another column template assigned field** command.
133+
* Select "weighted_risk_score" from the :guilabel:`Field Name` list.
134+
* Enter "Risk" in the :guilabel:`Display name` field.
135+
136+
* Click the **Add another column template assigned field** command.
137+
* Select "package>>" from the :guilabel:`Field Name` list.
138+
* Select "filename" from the list of package fields.
139+
* Enter "Filename" in the :guilabel:`Display name` field.
140+
141+
* Click the **Add another column template assigned field** command.
142+
* Select "is_deployed" from the :guilabel:`Field Name` list.
143+
* Enter "Deployed" in the :guilabel:`Display name` field.
144+
145+
* Click the **Add another column template assigned field** command.
146+
* Select "is_modified" from the :guilabel:`Field Name` list.
147+
* Enter "Modified" in the :guilabel:`Display name` field.
148+
149+
* Click the **Add another column template assigned field** command.
150+
* Select "notes" from the :guilabel:`Field Name` list.
151+
* Enter "Notes" in the :guilabel:`Display name` field.
152+
153+
Continue adding fields as illustrated below.
154+
155+
* In the lower right section of the form, click the
156+
:guilabel:`Save and continue editing` button.
157+
158+
.. image:: images/tutorial-6-vuln-report/save-column-template-1.png
159+
160+
Optionally select and hold the "Move" button on the right side of the
161+
Column Template Assigned Fields grid to re-order the Fields.
162+
163+
.. image:: images/tutorial-6-vuln-report/move-column-template-fields.png
164+
:width: 200
165+
166+
.. note::
167+
For the purpose of this tutorial, you are instructed to define a column template
168+
from scratch. You may also find it useful to open an existing column template
169+
to use as a starting point, add and delete the columns that you need, provide a
170+
new Name, and use the :guilabel:`Save as new` button to create the new one.
171+
172+
Create a DejaCode Report
173+
------------------------
174+
175+
1. In the upper left section of the Change column template form, click the
176+
:guilabel:`Reporting` option in the navigation path.
177+
178+
.. image:: images/tutorial-6-vuln-report/go-to-admin-reporting-2.png
179+
180+
2. On the Reporting Administration form select :guilabel:`Reports` .
181+
182+
.. image:: images/tutorial-6-vuln-report/go-to-admin-reports.png
183+
:width: 500
184+
185+
3. Click the :guilabel:`Add report` button in the upper right section of the
186+
Administrator Reports changelist form.
187+
188+
.. image:: images/tutorial-6-vuln-report/add-report.png
189+
190+
4. Specify the Report.
191+
192+
* Enter the **Name** "Product Packages with Vulnerabilities".
193+
* Enter the **Description** "Identify the Packages in a Product that require
194+
attention due to known vulnerabilities."
195+
* Select the **Product Packages with Vulnerabilities** Query.
196+
* Select the **Product Packages with Vulnerabilities** Column Template.
197+
* Check the :guilabel:`User available` option.
198+
199+
* In the lower right section of the form, click the
200+
:guilabel:`Save and continue editing` button.
201+
202+
.. image:: images/tutorial-6-vuln-report/enter-report-info.png
203+
204+
5. View the Report.
205+
206+
* In the upper right section of the Change Report form, click the
207+
:guilabel:`View` button.
208+
* Review the Report results.
209+
* Optionally, modify the weighted_risk_score parameter value to 9 and click the
210+
:guilabel:`Rerun Report` button.
211+
* Review the impact of your parameter change.
212+
213+
.. image:: images/tutorial-6-vuln-report/view-report-results.png
214+
215+
6. Share the Report.
216+
217+
* Just above the Report Parameters section, accept the default "xlsx" format and
218+
click the :guilabel:`Export` button.
219+
* Share the exported spreadsheet with your team.
220+
221+
.. image:: images/tutorial-6-vuln-report/export-report-to-xlsx.png
222+
223+
.. note::
224+
Since you specified "User available" for this report, it is also available on
225+
the Reports page. Access that page using the "Reports" option of the "Tools"
226+
dropdown from the main DejaCode menu bar.

0 commit comments

Comments
 (0)