Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .codeqlmanifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"provide": [
"cpp/baseline_suites/qlpack.yml",
"cpp/*/src/qlpack.yml",
"cpp/*/test/qlpack.yml",
"c/baseline_suites/qlpack.yml",
"c/*/src/qlpack.yml",
"c/*/test/qlpack.yml",
"scripts/generate_modules/queries/qlpack.yml"
Expand Down
24 changes: 24 additions & 0 deletions c/baseline_suites/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 4.0.3
codeql/dataflow:
version: 2.0.3
codeql/mad:
version: 1.0.19
codeql/rangeanalysis:
version: 1.0.19
codeql/ssa:
version: 1.0.19
codeql/tutorial:
version: 1.0.19
codeql/typeflow:
version: 1.0.19
codeql/typetracking:
version: 2.0.3
codeql/util:
version: 2.0.6
codeql/xml:
version: 1.0.19
compiled: false
10 changes: 10 additions & 0 deletions c/baseline_suites/codeql-suites/c-baseline-default.qls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- description: C Baseline Coding Standards Queries
- qlpack: codeql/cert-c-coding-standards
- qlpack: codeql/misra-c-coding-standards
- include:
kind:
- problem
- path-problem
tags contain:
- coding-standards/baseline/safety
- coding-standards/baseline/style
8 changes: 8 additions & 0 deletions c/baseline_suites/codeql-suites/c-baseline-safety.qls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- description: C Baseline Safety Coding Standards Queries
- qlpack: codeql/misra-c-coding-standards
- include:
kind:
- problem
- path-problem
tags contain:
- coding-standards/baseline/safety
8 changes: 8 additions & 0 deletions c/baseline_suites/codeql-suites/c-baseline-style.qls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- description: C Baseline Style Coding Standards Queries
- qlpack: codeql/coding-standards-c-baseline
- include:
kind:
- problem
- path-problem
tags contain:
- coding-standards/baseline/style
9 changes: 9 additions & 0 deletions c/baseline_suites/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: advanced-security/coding-standards-c-baseline
version: 0.0.2
description: A set of baseline coding standards for C projects, combining hand picked rules from MISRA C and CERT C.
suites: codeql-suites
license: MIT
default-suite-file: codeql-suites/c-baseline-default.qls
dependencies:
codeql/misra-c-coding-standards: 2.51.0
codeql/cert-c-coding-standards: 2.51.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p8
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/CON30-C/CleanUpThreadSpecificStorage.ql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p8
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p2
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p2
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p8
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p2
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/DCL38-C/DeclaringAFlexibleArrayMember.ql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* external/cert/priority/p3
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/style
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/DCL41-C/VariablesInsideSwitchStatement.ql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/style
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/ENV32-C/ExitHandlersMustReturnNormally.ql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p12
* external/cert/level/l1
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/ERR30-C/ErrnoReadBeforeReturn.ql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p8
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/ERR30-C/SetlocaleMightSetErrno.ql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p8
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p3
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/EXP40-C/DoNotModifyConstantObjects.ql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p2
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p9
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/style
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p18
* external/cert/level/l1
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p12
* external/cert/level/l1
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/FIO38-C/DoNotCopyAFileObject.ql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p2
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* external/cert/priority/p4
* external/cert/level/l3
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
1 change: 1 addition & 0 deletions c/cert/src/rules/FIO47-C/UseValidSpecifiers.ql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* external/cert/priority/p6
* external/cert/level/l2
* external/cert/obligation/rule
* coding-standards/baseline/safety
*/

import cpp
Expand Down
Loading
Loading