Skip to content

Commit 33052c7

Browse files
committed
add Configure Vulnerability Triage how-to
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent a7765b9 commit 33052c7

1 file changed

Lines changed: 149 additions & 0 deletions

File tree

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.. _how_to_7:
2+
3+
How To 7 - Configure Vulnerability Triage
4+
==========================================
5+
6+
This chapter explains how to create and configure **Triage Rulesets** for your
7+
Dataspace and how to assign them to products. Triage rulesets automatically detect
8+
vulnerabilities that match configured conditions and recommend a remediation action to
9+
your product teams.
10+
11+
All rulesets are disabled by default. You must create and configure the rulesets that
12+
are relevant to your security program, then assign them to the products you want to
13+
monitor.
14+
15+
.. seealso::
16+
Refer to :ref:`reference_vulnerability_triage` for a complete description of all
17+
available rules, actions, triage record lifecycle, and configuration options.
18+
19+
.. tip::
20+
To get started quickly, a set of reference rulesets and presets covering common
21+
scenarios can be seeded automatically with ``./manage.py create_triage_rulesets
22+
<dataspace_name>``. This section covers creating a ruleset manually for full
23+
control over its rules and thresholds.
24+
25+
1. Create a Triage Ruleset
26+
--------------------------
27+
28+
1. From the DejaCode **Administration dashboard**, navigate to
29+
:guilabel:`Vulnerabilities > Triage Rulesets`.
30+
2. Click :guilabel:`Add Triage Ruleset`.
31+
3. Fill in the **Name** field with a descriptive label (e.g., "Critical and Exploited").
32+
4. Select an **Action** from the dropdown. This is the remediation action that will be
33+
recommended when any rule in the ruleset fires.
34+
5. Set a **Precedence** value (integer). Higher values take priority when multiple
35+
rulesets match the same vulnerability on the same product.
36+
6. Leave **Enabled** checked to make the ruleset active immediately after saving.
37+
38+
2. Configure Rules
39+
------------------
40+
41+
Below the base fields, each built-in rule appears as a collapsible section.
42+
43+
1. Expand the rule sections you want to activate.
44+
2. Check the :guilabel:`Enable [Rule Name]` checkbox to include that rule in the
45+
ruleset evaluation.
46+
3. For rules that support parameters, adjust the threshold values:
47+
48+
- **Risk Score**: set :guilabel:`Min risk score` (default 8.0) to restrict
49+
detection to vulnerabilities at or above that score.
50+
- **Weighted Risk**: set :guilabel:`Min weighted risk score` (default 8.0) to
51+
restrict detection by weighted package exposure.
52+
- **Stale Vulnerability**: set :guilabel:`Max days` (default 30) and
53+
:guilabel:`Min risk score` (default 8.0).
54+
55+
A ruleset must have at least one rule enabled to produce any triage records.
56+
57+
Click :guilabel:`Save` to create the ruleset. Disabling a rule that was previously
58+
active removes the triage records it produced on the next evaluation.
59+
60+
3. Set Up an Analysis Preset
61+
----------------------------
62+
63+
An **Analysis Preset** instructs the engine to automatically apply default analysis
64+
values to each vulnerability matched by the ruleset. This is useful when you want to
65+
pre-fill new analyses with a known state, such as marking newly detected vulnerabilities
66+
as ``in_triage``.
67+
68+
To create an Analysis Preset:
69+
70+
1. Navigate to :guilabel:`Vulnerabilities > Analysis Presets`.
71+
2. Click :guilabel:`Add Analysis Preset`.
72+
3. Fill in the **Name** and optionally a **Description**.
73+
4. Under **Analysis defaults**, configure the fields you want the engine to apply:
74+
75+
- **State**: e.g., ``in_triage`` to mark all new analyses as being evaluated.
76+
- **Justification**, **Responses**, **Detail**, **Is Reachable**: leave blank to
77+
leave that field unchanged on any existing analysis.
78+
79+
5. Click :guilabel:`Save`.
80+
81+
To attach the preset to a ruleset, open the ruleset form and select the preset in the
82+
:guilabel:`Analysis Preset` field, then save.
83+
84+
.. note::
85+
Only analyses created by the preset are updated on subsequent evaluation runs.
86+
Any analysis modified by a user is never overwritten.
87+
88+
4. Link a Request Template
89+
--------------------------
90+
91+
When a **Request Template** is linked to a ruleset, the engine opens one DejaCode
92+
request per new triage record automatically. This routes newly detected vulnerabilities
93+
into a review workflow without manual intervention.
94+
95+
Prerequisites:
96+
97+
- A **Request Template** of content type **Product** must already exist under
98+
:guilabel:`Workflow > Request Templates`.
99+
- The template must have a creator (the user who created it): they are used as the
100+
automatic requester. A template with no creator is rejected when you try to select
101+
it on a ruleset.
102+
103+
To link a template to a ruleset:
104+
105+
1. Open the ruleset form in the Admin interface.
106+
2. Select the template in the :guilabel:`Request Template` field. Only product-type
107+
templates are listed.
108+
3. Click :guilabel:`Save`.
109+
110+
From the next evaluation, new triage records will have a DejaCode request opened
111+
automatically. Triage records that already have a linked request are not affected by
112+
subsequent evaluations.
113+
114+
5. Assign Rulesets to Products
115+
------------------------------
116+
117+
A ruleset has no effect until it is assigned to one or more products.
118+
119+
1. Open a product detail page.
120+
2. Navigate to the :guilabel:`Vulnerabilities` tab.
121+
3. Click :guilabel:`Manage Triage Rulesets` in the triage panel header.
122+
4. In the modal that opens, select the rulesets you want to assign to this product.
123+
5. Click :guilabel:`Save`.
124+
125+
The engine evaluates all assigned and enabled rulesets immediately. The
126+
**Recommendation** column appears in the Vulnerabilities tab as soon as at least one
127+
enabled ruleset is assigned.
128+
129+
To unassign a ruleset, open the same modal and deselect it. Existing triage records
130+
for that ruleset are deleted (a record with an open request is kept so reassigning the
131+
ruleset later reconnects to it instead of opening a duplicate). Preset-applied analyses
132+
are left in place: only the tracking record is removed, not the analysis itself.
133+
134+
6. Manage Precedence
135+
--------------------
136+
137+
When multiple rulesets are assigned to a product and their rules overlap on the same
138+
vulnerability, only the record from the highest-precedence ruleset is displayed in the
139+
Recommendation column. Lower-precedence records still exist and are maintained by the
140+
engine, but are hidden from the product view.
141+
142+
To adjust precedence:
143+
144+
1. Open the ruleset form in the Admin interface.
145+
2. Change the :guilabel:`Precedence` value. A higher number raises the ruleset's
146+
priority.
147+
3. Click :guilabel:`Save`.
148+
149+
Re-evaluation of all assigned products is triggered automatically after saving.

0 commit comments

Comments
 (0)