fix(jira): correct Data Sensitivity field ID and replicate Jira's real classification scheme
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled

The auto-create-ticket call was sending customfield_11233 (a field that
doesn't exist in the project) instead of the real Data Sensitivity field
customfield_11814, which made Jira reject the WHOLE issue and silently
block ticket creation for every new test.

Also replaces Aegis's invented 4-tier data_classification scheme
(public_release/general_use/confidential/restricted) with the 6 values
Jira's Data Sensitivity field actually uses (public/general_use/
internal_use_only/trusted_people/customer_content/pii), since that is
the classification the organization actually applies. Includes a data
migration remapping existing rows and a defensive retry if Jira ever
rejects an unscreened custom field again.
This commit is contained in:
kitos
2026-07-09 16:33:41 +02:00
parent 512b682cc5
commit d726e3adfe
12 changed files with 229 additions and 47 deletions
+2 -2
View File
@@ -90,8 +90,8 @@ class Campaign(Base):
tags = Column(JSONB, nullable=True, default=[])
# Assign created_at = Column(DateTime(timezone=True), server_default=func.now())
created_at = Column(DateTime(timezone=True), server_default=func.now())
# Assign data_classification = Column(String(20), nullable=False, server_default="internal")
data_classification = Column(String(20), nullable=False, server_default="confidential")
# Assign data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
# Recurring scheduling fields
is_recurring = Column(Boolean, default=False)
+2 -2
View File
@@ -50,8 +50,8 @@ class Evidence(Base):
team = Column(Enum(TeamSide, name="teamside"), nullable=False, default=TeamSide.red)
# Assign notes = Column(Text, nullable=True)
notes = Column(Text, nullable=True)
# Assign data_classification = Column(String(20), nullable=False, server_default="internal")
data_classification = Column(String(20), nullable=False, server_default="confidential")
# Assign data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
# Relationships
test = relationship("Test", back_populates="evidences")
+2 -2
View File
@@ -119,8 +119,8 @@ class Test(Base):
retest_of = Column(UUID(as_uuid=True), ForeignKey("tests.id"), nullable=True)
# Assign retest_count = Column(Integer, default=0)
retest_count = Column(Integer, default=0)
# Assign data_classification = Column(String(20), nullable=False, server_default="internal")
data_classification = Column(String(20), nullable=False, server_default="confidential")
# Assign data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
data_classification = Column(String(20), nullable=False, server_default="internal_use_only")
# ── Relationships ───────────────────────────────────────────────
technique = relationship("Technique", back_populates="tests")