Skip to content

Commit 4c43fb2

Browse files
adding docs (#30)
1 parent d2b13e0 commit 4c43fb2

1 file changed

Lines changed: 95 additions & 1 deletion

File tree

README.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ To generate the id of the SRO, a UUIDv5 is generated using the namespace `d91de5
174174

175175
e.g. `CanPrecede+CWE-1423+CWE-1102` = `7a612ea9-a08b-54bd-9e21-570509ba5d25` = `relationship--7a612ea9-a08b-54bd-9e21-570509ba5d25`
176176

177-
### Grouping
177+
### Grouping (category)
178178

179179
The CWE XML also contains category entries. e.g.
180180

@@ -283,6 +283,100 @@ In some cases related weakness do not exist, as the CWE record does not exist in
283283

284284
If a reference to a Vulnerability that does not exist (e.g. Weakness ID="227") is made, the entry is ignored in the Grouping `object_refs` dictionary.
285285

286+
### Grouping (views)
287+
288+
```xml
289+
<View ID="1450" Name="Weaknesses in OWASP Top Ten RC1 (2025)" Type="Graph" Status="Incomplete">
290+
<Objective>CWE entries in this view (graph) are associated with the first release candidate (RC1) of the OWASP Top Ten, as released in 2025.</Objective>
291+
<Audience>
292+
<Stakeholder>
293+
<Type>Software Developers</Type>
294+
<Description>This view outlines the most important issues as identified by the OWASP Top Ten (2025 RC1), providing a good starting point for web application developers who want to code more securely.</Description>
295+
</Stakeholder>
296+
<Stakeholder>
297+
<Type>Product Customers</Type>
298+
<Description>This view outlines the most important issues as identified by the OWASP Top Ten (2025 RC1), providing product customers with a way of asking their software development teams to follow minimum expectations for secure code.</Description>
299+
</Stakeholder>
300+
<Stakeholder>
301+
<Type>Educators</Type>
302+
<Description>Since the OWASP Top Ten covers the most frequently encountered issues, this view can be used by educators as training material for students.</Description>
303+
</Stakeholder>
304+
</Audience>
305+
<Members>
306+
<Has_Member CWE_ID="1436" View_ID="1450"/>
307+
<Has_Member CWE_ID="1437" View_ID="1450"/>
308+
<Has_Member CWE_ID="1438" View_ID="1450"/>
309+
<Has_Member CWE_ID="1439" View_ID="1450"/>
310+
<Has_Member CWE_ID="1440" View_ID="1450"/>
311+
<Has_Member CWE_ID="1441" View_ID="1450"/>
312+
<Has_Member CWE_ID="1442" View_ID="1450"/>
313+
<Has_Member CWE_ID="1443" View_ID="1450"/>
314+
<Has_Member CWE_ID="1444" View_ID="1450"/>
315+
<Has_Member CWE_ID="1445" View_ID="1450"/>
316+
</Members>
317+
<References>
318+
<Reference External_Reference_ID="REF-1500"/>
319+
</References>
320+
<Mapping_Notes>
321+
<Usage>Prohibited</Usage>
322+
<Rationale>This entry is a View. Views are not weaknesses and therefore inappropriate to describe the root causes of vulnerabilities.</Rationale>
323+
<Comments>Use this View or other Views to search and navigate for the appropriate weakness.</Comments>
324+
<Reasons>
325+
<Reason Type="View"/>
326+
</Reasons>
327+
</Mapping_Notes>
328+
<Notes>
329+
<Note Type="Maintenance">As of CWE 4.19, the relationships in this view were pulled directly from the CWE mappings cited in the 2025 OWASP Top Ten RC1. These mappings include categories and high-level weaknesses. One mapping to a deprecated entry was removed. The CWE Program will work with OWASP to improve these mappings, possibly requiring modifications to CWE itself.</Note>
330+
</Notes>
331+
<Content_History>
332+
<Submission>
333+
<Submission_Name>CWE Content Team</Submission_Name>
334+
<Submission_Organization>MITRE</Submission_Organization>
335+
<Submission_Date>2024-12-01</Submission_Date>
336+
<Submission_Version>4.19</Submission_Version>
337+
<Submission_ReleaseDate>2025-12-11</Submission_ReleaseDate>
338+
</Submission>
339+
</Content_History>
340+
</View>
341+
```
342+
343+
Views group categories. We should model them as STIX Grouping objects..
344+
345+
```json
346+
{
347+
"type": "grouping",
348+
"spec_version": "2.1",
349+
"id": "grouping--<UUIDV5 LOGIC>",
350+
"created_by_ref": "identity--9779a2db-f98c-5f4b-8d08-8ee04e02dbb5",
351+
"created": "<Content_History.Submission_Date>",
352+
"modified": "<Modification.Modificaton Date> (latest)",
353+
"name": "<VIEW.NAME>",
354+
"description": "<Objective>",
355+
"context": "unspecified",
356+
"external_references": [
357+
{
358+
"source_name": "cwe_category",
359+
"external_id": "<VIEW ID>"
360+
},
361+
{
362+
"source_name": "<External_Reference.author>, <External_Reference.author>",
363+
"description": "<External_Reference.title>",
364+
"url": "<External_Reference.URL>",
365+
"external_id": "<Weaknesses.Weakness.External_Reference_ID>",
366+
},
367+
],
368+
"object_marking_refs": [
369+
"marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487",
370+
"marking-definition--d91de5c9-2d85-5cc9-97c0-c5ec8deb1a4b"
371+
],
372+
"object_refs": [
373+
"<STIX IDs OF ALL GROUPINGS LISTED IN Members>"
374+
]
375+
}
376+
```
377+
378+
To generate the id of the SDO, a UUIDv5 is generated using the namespace `d91de5c9-2d85-5cc9-97c0-c5ec8deb1a4b` and `name` field as the value
379+
286380
### Bundle
287381

288382
cwe2stix also creates a STIX 2.1 Bundle JSON object containing all the other STIX 2.1 Objects created at each run. The Bundle takes the format;

0 commit comments

Comments
 (0)