feat(classification): org data classification scheme, tactic-based initial default, operator edit rights

This commit is contained in:
kitos
2026-07-07 11:16:35 +02:00
parent 949e5d42c4
commit a66fefa30b
12 changed files with 205 additions and 29 deletions
+12
View File
@@ -79,6 +79,7 @@ JIRA_FIELD_ATTACK_SUCCESS = "customfield_11815"
JIRA_FIELD_ATTACK_DETECTED = "customfield_11809"
JIRA_FIELD_TIME_TO_DETECT = "customfield_11810"
JIRA_FIELD_TIME_TO_CONTAIN = "customfield_11811"
JIRA_FIELD_DATA_SENSITIVITY = "customfield_11233"
_ATTACK_SUCCESS_TO_JIRA = {
"successful": "Yes",
@@ -92,6 +93,13 @@ _DETECTION_TO_JIRA = {
"partially_detected": "Partial",
}
_DATA_CLASSIFICATION_TO_JIRA = {
"public_release": "Public Release",
"general_use": "General Use",
"confidential": "Confidential",
"restricted": "Restricted",
}
# Assign logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@ -667,6 +675,10 @@ def auto_create_test_issue(
JIRA_FIELD_SEVERITY: severity,
}
data_sensitivity = _DATA_CLASSIFICATION_TO_JIRA.get(_enum_value(test.data_classification))
if data_sensitivity:
fields[JIRA_FIELD_DATA_SENSITIVITY] = data_sensitivity
# Inherit campaign start date if available, otherwise use today
from datetime import date as _date
effective_start = campaign_start_date or _date.today()