]> xenbits.xensource.com Git - ovmf.git/commitdiff
.github/codeql/edk2.qls: Enable CWE 120, 787, and 805 queries
authorMichael Kubacki <michael.kubacki@microsoft.com>
Wed, 9 Nov 2022 15:34:07 +0000 (10:34 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 3 Apr 2023 15:29:08 +0000 (15:29 +0000)
As recommended by CodeQL this change replaces
cpp/potential-buffer-overflow with cpp/overrunning-write-with-float
and cpp/overrunning-write.

Enables:

1. cpp/overrunning-write
   - @name Likely overrunning write
   - @description Buffer write operations that do not control the length
                  data written may overflow
   - @kind problem
   - @problem.severity error
   - @security-severity 9.3
   - @precision high
   - @id cpp/very-likely-overrunning-write
   - @tags reliability
     - security
     - external/cwe/cwe-120
     - external/cwe/cwe-787
     - external/cwe/cwe-805
2. cpp/overrunning-write-with-float
   - @name Potentially overrunning write with float to string conversion
   - @description Buffer write operations that do not control the length
                  of data written may overflow when floating point inputs
                  take extreme values.
   - @kind problem
   - @problem.severity error
   - @security-severity 9.3
   - @precision medium
   - @id cpp/overrunning-write-with-float
   - @tags reliability
     - security
     - external/cwe/cwe-120
     - external/cwe/cwe-787
     - external/cwe/cwe-805
3. cpp/very-likely-overrunning-write
   - @name Likely overrunning write
   - @description Buffer write operations that do not control the length
                  of data written may overflow
   - @kind problem
   - @problem.severity error
   - @security-severity 9.3
   - @precision high
   - @id cpp/very-likely-overrunning-write
   - @tags reliability
     - security
     - external/cwe/cwe-120
     - external/cwe/cwe-787
     - external/cwe/cwe-805

- CWEs:
  - https://cwe.mitre.org/data/definitions/120.html
  - https://cwe.mitre.org/data/definitions/787.html
  - https://cwe.mitre.org/data/definitions/805.html

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
.github/codeql/edk2.qls

index dc2d87764e93e15de93bb700e80ac1bfb036b674..9bea9ba01f245bbc7293613e7dbba005317a9c81 100644 (file)
     id: cpp/infinite-loop-with-unsatisfiable-exit-condition\r
 - include:\r
     id: cpp/overflow-buffer\r
+- include:\r
+    id: cpp/overrunning-write\r
+- include:\r
+    id: cpp/overrunning-write-with-float\r
 - include:\r
     id: cpp/pointer-overflow-check\r
 - include:\r
-    id: cpp/potential-buffer-overflow\r
-\r
+    id: cpp/very-likely-overrunning-write\r