From 730551aeba35e6b53b3dc6dd69cecc391937b896 Mon Sep 17 00:00:00 2001 From: prog1764 Date: Tue, 4 Aug 2026 19:38:36 +0400 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B0=D0=BB=D0=B8=D0=B0=D1=81=D1=8B=20?= =?UTF-8?q?item.*=20=D0=B2=20=D1=86=D0=B8=D0=BA=D0=BB=D0=B5=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=8A=D0=B5=D0=BA=D1=82=D0=BE=D0=B2=20=D0=9A=D0=98=D0=98=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=20?= =?UTF-8?q?=C2=AB=D0=A1=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F=C2=BB=20?= =?UTF-8?q?(=D0=A4=D0=A1=D0=A2=D0=AD=D0=9A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - item.objective→purpose, item.standard_name→typical_object, item.network_category→net_category, item.provider→net_operator, item.interaction_purpose→net_purpose, item.interaction_method→net_method, item.hardware→hw_sw, item.system_software→os_sw, item.defense_tools→defense_tools_list, item.component→subject_element, item.exploiting_org→subject_name, item.exploiting_inn→subject_inn, item.domain→domain_name, item.threat_actor→attacker_category, item.threat_justification→threats - логика: item.* — только переменные циклов --- dokogen/variables.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dokogen/variables.py b/dokogen/variables.py index d31b14a..0923711 100644 --- a/dokogen/variables.py +++ b/dokogen/variables.py @@ -328,6 +328,22 @@ def _build_loop_data(company: Company, is_list: List) -> Dict[str, List[Dict]]: 'balance_value': getattr(isys, 'balance_value', '') or '—', 'attacker_category': getattr(isys, 'attacker_category', '') or '—', 'threats': getattr(isys, 'threats', '') or '—', + # Алиасы под шаблон «Сведения о результатах категорирования» (ФСТЭК) + 'objective': getattr(isys, 'purpose', '') or '—', + 'standard_name': getattr(isys, 'typical_object', '') or '—', + 'network_category': getattr(isys, 'net_category', '') or '—', + 'provider': getattr(isys, 'net_operator', '') or '—', + 'interaction_purpose': getattr(isys, 'net_purpose', '') or '—', + 'interaction_method': getattr(isys, 'net_method', '') or '—', + 'hardware': getattr(isys, 'hw_sw', '') or '—', + 'system_software': getattr(isys, 'os_sw', '') or '—', + 'defense_tools': ', '.join(isys.defense_tools_list or []) or '—', + 'component': getattr(isys, 'subject_element', '') or '—', + 'exploiting_org': getattr(isys, 'subject_name', '') or '—', + 'exploiting_inn': getattr(isys, 'subject_inn', '') or '—', + 'domain': getattr(isys, 'domain_name', '') or '—', + 'threat_actor': getattr(isys, 'attacker_category', '') or '—', + 'threat_justification': getattr(isys, 'threats', '') or '—', 'incidents': getattr(isys, 'incidents', '') or '—', 'criteria_values': getattr(isys, 'criteria_values', '') or '—', 'criteria_justification': getattr(isys, 'criteria_justification', '') or '—',