Skip to content

Commit

Permalink
Merge branch 'main' into CA-674-Step-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Dec 6, 2024
2 parents 76f84ef + 6f60f14 commit 475a7b0
Show file tree
Hide file tree
Showing 10 changed files with 1,626 additions and 197 deletions.
4 changes: 2 additions & 2 deletions backend/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,9 @@ def build_scenario_clusters(risk_assessment: RiskAssessment):
"created_at"
):
if ri.current_level >= 0:
risk_matrix_current[ri.current_proba][ri.current_impact].add(ri.rid)
risk_matrix_current[ri.current_proba][ri.current_impact].add(ri.ref_id)
if ri.residual_level >= 0:
risk_matrix_residual[ri.residual_proba][ri.residual_impact].add(ri.rid)
risk_matrix_residual[ri.residual_proba][ri.residual_impact].add(ri.ref_id)

return {"current": risk_matrix_current, "residual": risk_matrix_residual}

Expand Down
2 changes: 1 addition & 1 deletion backend/core/templates/snippets/mp_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{% for scenario in context %}
<tr class="bg-gray-100">
<td class="text-lg p-3" colspan="9">
<p class="text-indigo-500 hover:text-indigo-700">{{ scenario.rid }}: {{ scenario.name }}</p>
<p class="text-indigo-500 hover:text-indigo-700">{{ scenario.ref_id }}: {{ scenario.name }}</p>
<span class="text-xs text-center p-1 mx-1 rounded"
{% if scenario.treatment == 'open' %}
style="background-color: #fed7aa"
Expand Down
2 changes: 1 addition & 1 deletion backend/core/templates/snippets/ri_list_nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% for scenario in scenarios %}
<tr class="hover:text-indigo-500 cursor-pointer hover:scale-[0.99] duration-500 text-center">
<td class="px-5 py-5 border-b border-gray-200 text-sm">
{{ scenario.rid }}
{{ scenario.ref_id }}
</td>
<td class="px-4 py-5 border-b border-gray-200 text-sm">
<div class="flex items-center">
Expand Down
1,769 changes: 1,586 additions & 183 deletions backend/library/libraries/anssi-guide-hygiene.yaml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -930,5 +930,8 @@
"ebiosRmStudies": "Ebios RM studies",
"bringTheEvidences": "Bring the evidences",
"bringTheEvidencesHelpText": "If disabled, the object will be duplicated without its evidences",
"gravity": "Gravity"
"gravity": "Gravity",
"existingControlsHelper": "What do you currently have to manage this risk",
"extraControlsHelper": "What will you do to mitigate this risk",
"existingContextHelper": "Description of the existing mitigations (this field will be deprecated soon)"
}
5 changes: 4 additions & 1 deletion frontend/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -898,5 +898,8 @@
"ebiosWs5_5": "Mettre en place le cadre de suivi des risques",
"activity": "Activité",
"bringTheEvidences": "Apportez les preuves",
"bringTheEvidencesHelpText": "Si désactivé, l'objet sera dupliqué sans ses preuves"
"bringTheEvidencesHelpText": "Si désactivé, l'objet sera dupliqué sans ses preuves",
"existingControlsHelper": "Que disposez-vous actuellement pour gérer ce risque",
"extraControlsHelper": "Que ferez-vous pour atténuer ce risque",
"existingContextHelper": "Description des mesures existantes (ce champ sera bientôt obsolète)"
}
24 changes: 22 additions & 2 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,28 @@ export const listViewFields: ListViewFieldsConfig = {
}
},
policies: {
head: ['name', 'description', 'csfFunction', 'eta', 'owner', 'domain', 'referenceControl'],
body: ['name', 'description', 'csf_function', 'eta', 'owner', 'folder', 'reference_control'],
head: [
'ref_id',
'name',
'priority',
'status',
'csfFunction',
'eta',
'owner',
'domain',
'referenceControl'
],
body: [
'ref_id',
'name',
'priority',
'status',
'csf_function',
'eta',
'owner',
'folder',
'reference_control'
],
filters: {
folder: DOMAIN_FILTER,
status: STATUS_FILTER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
<div class="flex flex-row space-x-4 card px-4 py-2 bg-white shadow-lg justify-between">
<div class="flex flex-col w-1/2">
<h4 class="h4 font-semibold">{m.residualRisk()}</h4>
<p class="text-sm font-semibold text-gray-400">{m.appliedControls()}</p>
<p class="text-sm font-semibold text-gray-400">{m.extraAppliedControls()}</p>
<ModelTable
source={data.tables['risk_scenarios']}
hideFilters={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@
extra_fields: [['folder', 'str']]
})}
field="existing_applied_controls"
label="Existing controls"
helpText="Current measures to manage this risk"
label={m.existingControls()}
helpText={m.existingControlsHelper()}
/>
</div>
<div class="flex items-center justify-center">
Expand All @@ -254,7 +254,7 @@
{form}
field="existing_controls"
label="context"
helpText="Description of the existing mitigations ( ℹ️ this field will be deprecated soon)"
helpText={m.existingContextHelper()}
regionContainer="w-1/2"
rows={3}
/>
Expand Down Expand Up @@ -311,8 +311,8 @@
extra_fields: [['folder', 'str']]
})}
field="applied_controls"
label="Additional controls"
helpText="Extra measures needed to mitigate this risk"
label={m.extraAppliedControls()}
helpText={m.extraControlsHelper()}
/>
</div>
<div class="flex items-center justify-center">
Expand Down
Binary file modified tools/anssi/anssi-guide-hygiene.xlsx
Binary file not shown.

0 comments on commit 475a7b0

Please sign in to comment.