Skip to content

Commit

Permalink
Insert CWE's for all rules
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-at-adacore committed Jul 19, 2024
1 parent 88bac62 commit 80be60f
Show file tree
Hide file tree
Showing 41 changed files with 275 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.62 Concurrency - Premature termination [CGS]
* 6.63 Lock protocol errors [CGM]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-362 - Concurrent Execution using Shared Resource with Improper Synchronization
* CWE-367 - Time-of-check Time-of-use (TOCTOU) Race Condition
* CWE-366 - Race Condition within a Thread

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.62 Concurrency - Premature termination [CGS]
* 6.63 Lock protocol errors [CGM]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-362 - Concurrent Execution using Shared Resource with Improper Synchronization
* CWE-367 - Time-of-check Time-of-use (TOCTOU) Race Condition
* CWE-366 - Race Condition within a Thread

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.56 Undefined behaviour [EWF]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-567 - Unsynchronized Access to Shared Data in a Multithreaded Context
* CWE-667 - Improper Locking

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ Applicable Vulnerability within ISO TR 24772-2

* 4.10 Storage Pool

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-401 - Missing Release of Memory after Effective Lifetime
* CWE-415 - Double Free
* CWE-416 - Use After Free
* -

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ Applicable Vulnerability within ISO TR 24772-2

* 4.10 Storage Pool

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-401 - Missing Release of Memory after Effective Lifetime
* CWE-758 - Reliance on Undefined, Unspecified, or Implementation-Defined Behavior
* CWE-771 - Missing Reference to Active Allocated Resource
* CWE-1325 - Improperly Controlled Sequential Memory Allocation

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.14 Dangling reference to heap [XYK]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-401 - Missing Release of Memory after Effective Lifetime
* CWE-415 - Double Free
* CWE-416 - Use After Free
* CWE-771 - Missing Reference to Active Allocated Resource
* CWE-1325 - Improperly Controlled Sequential Memory Allocation

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ Applicable Vulnerability within ISO TR 24772-2

* 4.10 Storage Pool

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-401 - Missing Release of Memory after Effective Lifetime
* CWE-415 - Double Free
* CWE-416 - Use After Free
* CWE-771 - Missing Reference to Active Allocated Resource
* CWE-1325 - Improperly Controlled Sequential Memory Allocation

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ Applicable Vulnerability within ISO TR 24772-2

* 4.10 Storage Pool

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-401 - Missing Release of Memory after Effective Lifetime
* CWE-415 - Double Free
* CWE-416 - Use After Free
* -

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ Applicable Vulnerability within ISO TR 24772-2

* 4.10 Storage Pool

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-770 - Allocation of Resources Without Limits or Throttling
* CWE-789 - Uncontrolled Memory Allocation

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Applicable Vulnerability within ISO TR 24772-2

N/A

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-397 - Declaration of Throws for Generic Exception

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.36 Ignored error status and unhandled exceptions [OYB]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-248 - Uncaught Exception

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Applicable Vulnerability within ISO TR 24772-2

N/A

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-248 - Uncaught Exception

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ Applicable Vulnerability within ISO TR 24772-2

N/A

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-248 - Uncaught Exception

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.43 Redispatching [PPH]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.43 Redispatching [PPH]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.41 Inheritance [RIP]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-1074 - Class with Excessively Deep Inheritance
* CWE-1086 - Class with Excessive Number of Child Classes

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.43 Redispatching [PPH]
* 6.44 Polymorphic variables [BKK]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.34 Subprogram signature mismatch [OTR]
* 6.41 Inheritance [RIP]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-685 - Function Call With Incorrect Number of Arguments

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.42 Violations of the Liskov substitution principle or the contract model
[BLP]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.43 Redispatching [PPH]
* 6.44 Polymorphic variables [BKK]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.27 Switch statements and static analysis [CLL]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-478 - Missing Default Case in Multiple Condition Expression

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.5 Enumerator issues [CCB]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Applicable Vulnerability within ISO TR 24772-2
* 6.5 Enumerator issues [CCB]
* 6.27 Switch statements and static analysis [CLL]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-478 - Missing Default Case in Multiple Condition Expression

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.32 Passing parameters and return values [CSJ]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-457 - Use of Uninitialized Variable

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ Applicable Vulnerability within ISO TR 24772-2

N/A

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

* CWE-396 - Declaration of Catch for Generic Exception

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.24 Side-effects and order of evaluation [SAM]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.24 Side-effects and order of evaluation [SAM]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Applicable Vulnerability within ISO TR 24772-2

* 6.32 Passing parameters and return values [CSJ]

++++++++++++++++++++++++++++++++++++++++
Applicable Common Weakness Enumeration
++++++++++++++++++++++++++++++++++++++++

N/A

+++++++++++++++++++++++++++
Noncompliant Code Example
+++++++++++++++++++++++++++
Expand Down
Loading

0 comments on commit 80be60f

Please sign in to comment.