|
| 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 | +.. image:: images/howto-7-vulnerability-triage-configuration/add-ruleset-form.jpg |
| 39 | + |
| 40 | +2. Configure Rules |
| 41 | +------------------ |
| 42 | + |
| 43 | +Below the base fields, each built-in rule appears as a collapsible section. |
| 44 | + |
| 45 | +1. Expand the rule sections you want to activate. |
| 46 | +2. Check the :guilabel:`Enable [Rule Name]` checkbox to include that rule in the |
| 47 | + ruleset evaluation. |
| 48 | +3. For rules that support parameters, adjust the threshold values: |
| 49 | + |
| 50 | + - **Risk Score**: set :guilabel:`Min risk score` (default 8.0) to restrict |
| 51 | + detection to vulnerabilities at or above that score. |
| 52 | + - **Weighted Risk**: set :guilabel:`Min weighted risk score` (default 8.0) to |
| 53 | + restrict detection by weighted package exposure. |
| 54 | + - **Stale Vulnerability**: set :guilabel:`Max days` (default 30) and |
| 55 | + :guilabel:`Min risk score` (default 8.0). |
| 56 | + |
| 57 | +A ruleset must have at least one rule enabled to produce any triage records. |
| 58 | + |
| 59 | +Click :guilabel:`Save` to create the ruleset. Disabling a rule that was previously |
| 60 | +active removes the triage records it produced on the next evaluation. |
| 61 | + |
| 62 | +.. image:: images/howto-7-vulnerability-triage-configuration/rule-sections.jpg |
| 63 | + :width: 500 |
| 64 | + |
| 65 | +3. Set Up an Analysis Preset |
| 66 | +---------------------------- |
| 67 | + |
| 68 | +An **Analysis Preset** instructs the engine to automatically apply default analysis |
| 69 | +values to each vulnerability matched by the ruleset. This is useful when you want to |
| 70 | +pre-fill new analyses with a known state, such as marking newly detected vulnerabilities |
| 71 | +as ``in_triage``. |
| 72 | + |
| 73 | +To create an Analysis Preset: |
| 74 | + |
| 75 | +1. Navigate to :guilabel:`Vulnerabilities > Analysis Presets`. |
| 76 | +2. Click :guilabel:`Add Analysis Preset`. |
| 77 | +3. Fill in the **Name** and optionally a **Description**. |
| 78 | +4. Under **Analysis defaults**, configure the fields you want the engine to apply: |
| 79 | + |
| 80 | + - **State**: e.g., ``in_triage`` to mark all new analyses as being evaluated. |
| 81 | + - **Justification**, **Responses**, **Detail**, **Is Reachable**: leave blank to |
| 82 | + leave that field unchanged on any existing analysis. |
| 83 | + |
| 84 | +5. Click :guilabel:`Save`. |
| 85 | + |
| 86 | +To attach the preset to a ruleset, open the ruleset form and select the preset in the |
| 87 | +:guilabel:`Analysis Preset` field, then save. |
| 88 | + |
| 89 | +.. image:: images/howto-7-vulnerability-triage-configuration/add-preset-form.jpg |
| 90 | + |
| 91 | +.. note:: |
| 92 | + Only analyses created by the preset are updated on subsequent evaluation runs. |
| 93 | + Any analysis modified by a user is never overwritten. |
| 94 | + |
| 95 | +4. Link a Request Template |
| 96 | +-------------------------- |
| 97 | + |
| 98 | +When a **Request Template** is linked to a ruleset, the engine opens one DejaCode |
| 99 | +request per new triage record automatically. This routes newly detected vulnerabilities |
| 100 | +into a review workflow without manual intervention. |
| 101 | + |
| 102 | +Prerequisites: |
| 103 | + |
| 104 | +- A **Request Template** of content type **Product** must already exist under |
| 105 | + :guilabel:`Workflow > Request Templates`. |
| 106 | +- The template must have a creator (the user who created it): they are used as the |
| 107 | + automatic requester. A template with no creator is rejected when you try to select |
| 108 | + it on a ruleset. |
| 109 | + |
| 110 | +To link a template to a ruleset: |
| 111 | + |
| 112 | +1. Open the ruleset form in the Admin interface. |
| 113 | +2. Select the template in the :guilabel:`Request Template` field. Only product-type |
| 114 | + templates are listed. |
| 115 | +3. Click :guilabel:`Save`. |
| 116 | + |
| 117 | +From the next evaluation, new triage records will have a DejaCode request opened |
| 118 | +automatically. Triage records that already have a linked request are not affected by |
| 119 | +subsequent evaluations. |
| 120 | + |
| 121 | +.. _how_to_7_assign_rulesets: |
| 122 | + |
| 123 | +5. Assign Rulesets to Products |
| 124 | +------------------------------ |
| 125 | + |
| 126 | +A ruleset has no effect until it is assigned to one or more products. |
| 127 | + |
| 128 | +1. Open a product detail page. |
| 129 | +2. Navigate to the :guilabel:`Vulnerabilities` tab. |
| 130 | +3. Click :guilabel:`Manage Triage Rulesets` in the triage panel header. |
| 131 | +4. In the modal that opens, select the rulesets you want to assign to this product. |
| 132 | +5. Click :guilabel:`Save`. |
| 133 | + |
| 134 | +.. image:: images/howto-7-vulnerability-triage-configuration/manage-rulesets-modal.jpg |
| 135 | + |
| 136 | +The engine evaluates all assigned and enabled rulesets immediately. The |
| 137 | +**Recommendation** column appears in the Vulnerabilities tab as soon as at least one |
| 138 | +enabled ruleset is assigned. |
| 139 | + |
| 140 | +To unassign a ruleset, open the same modal and deselect it. Existing triage records |
| 141 | +for that ruleset are deleted (a record with an open request is kept so reassigning the |
| 142 | +ruleset later reconnects to it instead of opening a duplicate). Preset-applied analyses |
| 143 | +are left in place: only the tracking record is removed, not the analysis itself. |
| 144 | + |
| 145 | +6. Manage Precedence |
| 146 | +-------------------- |
| 147 | + |
| 148 | +When multiple rulesets are assigned to a product and their rules overlap on the same |
| 149 | +vulnerability, only the record from the highest-precedence ruleset is displayed in the |
| 150 | +Recommendation column. Lower-precedence records still exist and are maintained by the |
| 151 | +engine, but are hidden from the product view. |
| 152 | + |
| 153 | +To adjust precedence: |
| 154 | + |
| 155 | +1. Open the ruleset form in the Admin interface. |
| 156 | +2. Change the :guilabel:`Precedence` value. A higher number raises the ruleset's |
| 157 | + priority. |
| 158 | +3. Click :guilabel:`Save`. |
| 159 | + |
| 160 | +Re-evaluation of all assigned products is triggered automatically after saving. |
0 commit comments