Skip to content

Commit

Permalink
Merge branch 'main' into lcartey/update-to-2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
lcartey committed Aug 16, 2023
2 parents 91c5a92 + c5bf50b commit ea0d11f
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 31 deletions.
2 changes: 1 addition & 1 deletion c/cert/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/cert-c-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
description: CERT C 2016
suites: codeql-suites
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion c/cert/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/cert-c-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion c/common/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/common-c-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
license: MIT
dependencies:
codeql/common-cpp-coding-standards: '*'
Expand Down
2 changes: 1 addition & 1 deletion c/common/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/common-c-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion c/misra/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/misra-c-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
description: MISRA C 2012
suites: codeql-suites
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion c/misra/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/misra-c-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/autosar-cpp-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03
suites: codeql-suites
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/autosar-cpp-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion cpp/cert/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/cert-cpp-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
description: CERT C++ 2016
suites: codeql-suites
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion cpp/cert/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/cert-cpp-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion cpp/common/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/common-cpp-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
license: MIT
dependencies:
codeql/cpp-all: 0.6.1
2 changes: 1 addition & 1 deletion cpp/common/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/common-cpp-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion cpp/misra/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/misra-cpp-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
description: MISRA C++ 2008
suites: codeql-suites
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion cpp/misra/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/misra-cpp-coding-standards-tests
version: 2.21.0-dev
version: 2.22.0-dev
extractor: cpp
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion cpp/report/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: codeql/report-cpp-coding-standards
version: 2.21.0-dev
version: 2.22.0-dev
license: MIT
dependencies:
codeql/cpp-all: 0.6.1
37 changes: 22 additions & 15 deletions docs/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
| 0.14.0 | 2022-11-03 | Remco Vermeulen | Add guideline recategorization plan. |
| 0.15.0 | 2023-05-24 | Mauro Baluda | Clarify AUTOSAR C++ supported versions. |
| 0.16.0 | 2023-07-03 | Luke Cartey | Remove reference to LGTM, update the name of the query pack |
| 0.17.0 | 2023-08-16 | Luke Cartey | Update list of supported compiler configurations. |

## Release information

This user manual documents release `2.21.0-dev` of the coding standards located at [https://github.com/github/codeql-coding-standards](https://github.com/github/codeql-coding-standards).
This user manual documents release `2.22.0-dev` of the coding standards located at [https://github.com/github/codeql-coding-standards](https://github.com/github/codeql-coding-standards).
The release page documents the release notes and contains the following artifacts part of the release:

- `code-scanning-cpp-query-pack-2.21.0-dev.zip`: coding standard queries and scripts to be used with GitHub Code Scanning or the CodeQL CLI as documented in the section _Operating manual_.
- `supported_rules_list_2.21.0-dev.csv`: A Comma Separated File (CSV) containing the supported rules per standard and the queries that implement the rule.
- `supported_rules_list_2.21.0-dev.md`: A Markdown formatted file with a table containing the supported rules per standard and the queries that implement the rule.
- `user_manual_2.21.0-dev.md`: This user manual.
- `code-scanning-cpp-query-pack-2.22.0-dev.zip`: coding standard queries and scripts to be used with GitHub Code Scanning or the CodeQL CLI as documented in the section _Operating manual_.
- `supported_rules_list_2.22.0-dev.csv`: A Comma Separated File (CSV) containing the supported rules per standard and the queries that implement the rule.
- `supported_rules_list_2.22.0-dev.md`: A Markdown formatted file with a table containing the supported rules per standard and the queries that implement the rule.
- `user_manual_2.22.0-dev.md`: This user manual.
- `Source Code (zip)`: A zip archive containing the contents of https://github.com/github/codeql-coding-standards
- `Source Code (tar.gz)`: A GZip compressed tar archive containing the contents of https://github.com/github/codeql-coding-standards
- `checksums.txt`: A text file containing sha256 checksums for the aforementioned artifacts.
Expand Down Expand Up @@ -89,23 +90,29 @@ In addition, the machine which performs the analysis must be able to complete a

#### C++

For C++ the codebase under analysis must:
* Comply with C++14
* Use one of the following supported compilers:
- Clang version 10
For C++ the codebase under analysis must comply with C++14 and use one of the following supported compiler configurations:

| Compiler | Version | Standard library | Target architecture | Required flags |
| -------- | ------- | ------------------- | --------------------- | -------------------------------- |
| clang | 10.0.0 | libstdc++ (default) | x86_64-linux-gnu | -std=c++14 |
| gcc | 8.4.0 | libstdc++ (default) | x86_64-linux-gnu | -std=c++14 |
| qcc | 8.3.0 | libc++ (default) | gcc_ntoaarch64le_cxx | -std=c++14 -D_QNX_SOURCE -nopipe |

Use of the queries outside these scenarios is possible, but not validated for functional safety. In particular:
- Use of the queries against codebases written with more recent versions of C++ (as supported by CodeQL) are not validated in the following circumstances:
- When new language features are used
- When language features are used which have a differing interpretation from C++14.
- Use of the queries against codebases which use other compilers or other compiler versions supported by CodeQL (e.g. gcc) is not tested or validated for functional safety.
- Use of the queries against codebases which use other compilers or other compiler versions supported by CodeQL is not tested or validated for functional safety.

#### C

For C the codebase under analysis must:
* Comply with C99 or C11.
* Use one of the following supported compilers:
- Clang version 10
For C the codebase under analysis must comply with C99 or C11 and use one of the following supported compiler configurations:

| Compiler | Version | Standard library | Target architecture | Required Flags |
| -------- | ------- | ------------------- | --------------------- | -------------------------- |
| clang | 10.0.0 | glibc (default) | x86_64-linux-gnu | -std=c11 |
| gcc | 8.4.0 | glibc (default) | x86_64-linux-gnu | -std=c11 |
| qcc | 8.3.0 | glibc (default) | gcc_ntoaarch64le | -std=c11 -nopipe |

Use of the queries outside these scenarios is possible, but not validated for functional safety. In particular:
- Use of the queries against codebases written with more recent versions of C (as supported by CodeQL) are not validated in the following circumstances:
Expand Down Expand Up @@ -460,7 +467,7 @@ This section describes known failure modes for "CodeQL Coding Standards" and des
| | Ouf of space | Less output. Some files may be only be partially analyzed, or not analyzed at all. | Error reported on the command line. | Increase space. If it remains an issue report space consumption issues via the CodeQL Coding Standards [bug tracker](https://github.com/github/codeql-coding-standards/issues). |
| | False positives | More output. Results are reported which are not violations of the guidelines. | All reported results must be reviewed. | Report false positive issues via the CodeQL Coding Standards [bug tracker](https://github.com/github/codeql-coding-standards/issues). |
| | False negatives | Less output. Violations of the guidelines are not reported. | Other validation and verification processes during software development should be used to complement the analysis performed by CodeQL Coding Standards. | Report false negative issues via the CodeQL Coding Standards [bug tracker](https://github.com/github/codeql-coding-standards/issues). |
| | Modifying coding standard suite | More or less output. If queries are added to the query set more result can be reported. If queries are removed less results might be reported. | All queries supported by the CodeQL Coding Standards are listed in the release artifacts `supported_rules_list_2.21.0-dev.csv` where VERSION is replaced with the used release. The rules in the resulting Sarif file must be cross-referenced with the expected rules in this list to determine the validity of the used CodeQL suite. | Ensure that the CodeQL Coding Standards are not modified in ways that are not documented as supported modifications. |
| | Modifying coding standard suite | More or less output. If queries are added to the query set more result can be reported. If queries are removed less results might be reported. | All queries supported by the CodeQL Coding Standards are listed in the release artifacts `supported_rules_list_2.22.0-dev.csv` where VERSION is replaced with the used release. The rules in the resulting Sarif file must be cross-referenced with the expected rules in this list to determine the validity of the used CodeQL suite. | Ensure that the CodeQL Coding Standards are not modified in ways that are not documented as supported modifications. |
| | Incorrect deviation record specification | More output. Results are reported for guidelines for which a deviation is assigned. | Analysis integrity report lists all deviations and incorrectly specified deviation records with a reason. Ensure that all deviation records are correctly specified. | Ensure that the deviation record is specified according to the specification in the user manual. |
| | Incorrect deviation permit specification | More output. Results are reported for guidelines for which a deviation is assigned. | Analysis integrity report lists all deviations and incorrectly specified deviation permits with a reason. Ensure that all deviation permits are correctly specified. | Ensure that the deviation record is specified according to the specification in the user manual. |
| | Unapproved use of a deviation record | Less output. Results for guideline violations are not reported. | Validate that the deviation record use is approved by verifying the approved-by attribute of the deviation record specification. | Ensure that each raised deviation record is approved by an independent approver through an auditable process. |
Expand Down
2 changes: 1 addition & 1 deletion scripts/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find . -name 'qlpack.yml' | grep -v './codeql_modules' | grep -v './scripts' | x

find docs -name 'user_manual.md' | xargs sed -i "s/code-scanning-cpp-query-pack-.*\.zip\`/code-scanning-cpp-query-pack-${1}.zip\`/"
find docs -name 'user_manual.md' | xargs sed -i "s/supported_rules_list_.*\.csv\`/supported_rules_list_${1}.csv\`/"
find docs -name 'user_manual.md' | xargs sed -i "s/supported_rules_list_.*\.md\`/upported_rules_list_${1}.md\`/"
find docs -name 'user_manual.md' | xargs sed -i "s/supported_rules_list_.*\.md\`/supported_rules_list_${1}.md\`/"
find docs -name 'user_manual.md' | xargs sed -i "s/user_manual_.*\.md\`/user_manual_${1}.md\`/"
find docs -name 'user_manual.md' | xargs sed -i "s/This user manual documents release \`.*\` of/This user manual documents release \`${1}\` of/"

Expand Down

0 comments on commit ea0d11f

Please sign in to comment.