Skip to content

Commit

Permalink
Merge pull request #188 from splunk/small_api_tweak
Browse files Browse the repository at this point in the history
Small Model Tweak
  • Loading branch information
pyth0n1c authored Jul 12, 2024
2 parents bb76f86 + 2938ec6 commit 861a475
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contentctl/objects/detection_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def risk_score(self)->int:
return round((self.confidence * self.impact)/100)


mitre_attack_id: List[Annotated[str, Field(pattern="^T\d{4}(.\d{3})?$")]] = []
mitre_attack_id: List[Annotated[str, Field(pattern="^T[0-9]{4}(.[0-9]{3})?$")]] = []
nist: list[NistCategory] = []
observable: List[Observable] = []
message: Optional[str] = Field(...)
Expand Down Expand Up @@ -138,6 +138,7 @@ def serialize_model(self):
"risk_score": self.risk_score,
"security_domain": self.security_domain,
"risk_severity": self.risk_severity,
"mitre_attack_id": self.mitre_attack_id,
"mitre_attack_enrichments": self.mitre_attack_enrichments
}

Expand Down Expand Up @@ -248,4 +249,4 @@ def mapAtomicGuidsToAtomicTests(cls, v:List[UUID4], info:ValidationInfo)->List[A
print(missing_tests_string)

return matched_tests + [AtomicTest.AtomicTestWhenTestIsMissing(test) for test in missing_tests]


0 comments on commit 861a475

Please sign in to comment.