feat(techniques): add external_references storage and display MITRE sources with links
Aegis CI / lint-and-test (push) Waiting to run
Snyk Security Scan / Python vulnerabilities (backend) (push) Waiting to run
Snyk Security Scan / npm vulnerabilities (frontend) (push) Waiting to run
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Waiting to run
Aegis CI / lint-and-test (push) Waiting to run
Snyk Security Scan / Python vulnerabilities (backend) (push) Waiting to run
Snyk Security Scan / npm vulnerabilities (frontend) (push) Waiting to run
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Waiting to run
This commit is contained in:
@@ -263,6 +263,8 @@ def sync_mitre(db: Session) -> dict:
|
||||
is_subtechnique = "." in mitre_id
|
||||
# Assign parent_mitre_id = mitre_id.split(".")[0] if is_subtechnique else None
|
||||
parent_mitre_id = mitre_id.split(".")[0] if is_subtechnique else None
|
||||
# Assign external_references = obj.get("external_references", [])
|
||||
external_references = obj.get("external_references", [])
|
||||
|
||||
# Assign existing = existing_techniques.get(mitre_id)
|
||||
existing = existing_techniques.get(mitre_id)
|
||||
@@ -289,6 +291,8 @@ def sync_mitre(db: Session) -> dict:
|
||||
is_subtechnique=is_subtechnique,
|
||||
# Keyword argument: parent_mitre_id
|
||||
parent_mitre_id=parent_mitre_id,
|
||||
# Keyword argument: external_references
|
||||
external_references=external_references,
|
||||
# Keyword argument: status_global
|
||||
status_global=TechniqueStatus.not_evaluated,
|
||||
# Keyword argument: review_required
|
||||
@@ -331,6 +335,8 @@ def sync_mitre(db: Session) -> dict:
|
||||
existing.is_subtechnique = is_subtechnique
|
||||
# Assign existing.parent_mitre_id = parent_mitre_id
|
||||
existing.parent_mitre_id = parent_mitre_id
|
||||
# Assign existing.external_references = external_references
|
||||
existing.external_references = external_references
|
||||
|
||||
# Check: changes
|
||||
if changes:
|
||||
|
||||
Reference in New Issue
Block a user