d726e3adfe
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.
112 lines
3.5 KiB
Python
112 lines
3.5 KiB
Python
"""Canonical domain enums for Aegis.
|
|
|
|
These enums represent core domain concepts and are the single source of
|
|
truth. ``models/enums.py`` re-exports them so that existing ORM code
|
|
continues to work without changes.
|
|
"""
|
|
|
|
# Import enum
|
|
import enum
|
|
|
|
|
|
# Define class TechniqueStatus
|
|
class TechniqueStatus(str, enum.Enum):
|
|
"""Coverage and evaluation status for a MITRE ATT&CK technique."""
|
|
|
|
# Assign not_evaluated = "not_evaluated"
|
|
not_evaluated = "not_evaluated"
|
|
# Assign in_progress = "in_progress"
|
|
in_progress = "in_progress"
|
|
# Assign validated = "validated"
|
|
validated = "validated"
|
|
# Assign partial = "partial"
|
|
partial = "partial"
|
|
# Assign not_covered = "not_covered"
|
|
not_covered = "not_covered"
|
|
# Assign review_required = "review_required"
|
|
review_required = "review_required"
|
|
|
|
|
|
# Define class TestState
|
|
class TestState(str, enum.Enum):
|
|
"""Lifecycle states in the security test state machine."""
|
|
|
|
# Assign draft = "draft"
|
|
draft = "draft"
|
|
# Assign red_executing = "red_executing"
|
|
red_executing = "red_executing"
|
|
# Red Lead reviews the operator's work before it queues for Blue Team
|
|
red_review = "red_review"
|
|
# Assign blue_evaluating = "blue_evaluating"
|
|
blue_evaluating = "blue_evaluating"
|
|
# Blue Lead reviews the operator's work before cross-validation
|
|
blue_review = "blue_review"
|
|
# Assign in_review = "in_review"
|
|
in_review = "in_review"
|
|
# Assign validated = "validated"
|
|
validated = "validated"
|
|
# Assign rejected = "rejected"
|
|
rejected = "rejected"
|
|
disputed = "disputed" # one lead approved, the other rejected
|
|
|
|
|
|
# Define class TeamSide
|
|
class TeamSide(str, enum.Enum):
|
|
"""Identifies which team (red or blue) an action belongs to."""
|
|
|
|
# Assign red = "red"
|
|
red = "red"
|
|
# Assign blue = "blue"
|
|
blue = "blue"
|
|
|
|
|
|
# Define class TestResult
|
|
class TestResult(str, enum.Enum):
|
|
"""Outcome of a red-team test from a detection perspective."""
|
|
|
|
# Assign detected = "detected"
|
|
detected = "detected"
|
|
# Assign not_detected = "not_detected"
|
|
not_detected = "not_detected"
|
|
# Assign partially_detected = "partially_detected"
|
|
partially_detected = "partially_detected"
|
|
|
|
|
|
# Define class ContainmentResult
|
|
class ContainmentResult(str, enum.Enum):
|
|
"""Outcome of the blue team's containment effort."""
|
|
|
|
contained = "contained"
|
|
partially_contained = "partially_contained"
|
|
not_contained = "not_contained"
|
|
|
|
|
|
class AttackSuccessResult(str, enum.Enum):
|
|
"""Outcome of a red-team attack from a success perspective."""
|
|
|
|
successful = "successful"
|
|
not_successful = "not_successful"
|
|
partially_successful = "partially_successful"
|
|
|
|
|
|
# Define class DataClassification
|
|
class DataClassification(str, enum.Enum):
|
|
"""Data sensitivity classification levels for compliance and retention policies.
|
|
|
|
Matches Jira's "Data Sensitivity" field (customfield_11814) exactly, since
|
|
that is the organization's actual data protection scheme:
|
|
- public: approved for external/public release
|
|
- general_use: general internal information, no special restriction
|
|
- internal_use_only: internal use only
|
|
- trusted_people: shared only with a limited/trusted audience
|
|
- customer_content: contains customer data
|
|
- pii: contains personally identifiable information
|
|
"""
|
|
|
|
public = "public"
|
|
general_use = "general_use"
|
|
internal_use_only = "internal_use_only"
|
|
trusted_people = "trusted_people"
|
|
customer_content = "customer_content"
|
|
pii = "pii"
|