You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(api): add cwe_id, cvss arrays to threats and alias array to threat models (#108)
* feat(api): add cwe_id, cvss arrays to threats and alias array to threat models
Implements GitHub issue #86:
- Add cwe_id string array to Threat objects (CWE identifiers, pattern: CWE-[0-9]+)
- Add cvss object array to Threat objects (vector string + score float pairs)
- Add alias string array to ThreatModel objects (alternative names/identifiers)
- Add CVSSScore schema component to OpenAPI specification
- Add CVSSArray custom GORM type for cross-database compatibility
All arrays are optional but require at least one element when present (minItems: 1).
Validation constraints:
- cwe_id: 5-16 chars, pattern ^CWE-[0-9]+$, max 50 items
- cvss.vector: 26-250 chars, cvss.score: 0.0-10.0, max 10 items
- alias: 3-30 chars, pattern ^[a-zA-Z0-9_-]+$, max 20 items
Closes#86
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore(deps): update integration test dependencies
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/reference/apis/tmi-openapi.json
+78-1Lines changed: 78 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2368,6 +2368,19 @@
2368
2368
"description": "Status of the threat model in the organization's threat modeling or SDLC process. Examples: \"Not started\", \"In progress\", \"Review\", \"Approved\", \"Closed\"",
2369
2369
"maxLength": 128,
2370
2370
"pattern": "^[^\\x00-\\x1F]*$"
2371
+
},
2372
+
"alias": {
2373
+
"type": "array",
2374
+
"description": "Alternative names or identifiers for the threat model",
0 commit comments