You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-48Lines changed: 31 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,88 +2,56 @@
2
2
3
3
This repository contains open-source components for supplemental use in developing device drivers for Windows, as well as driver specific [CodeQL](https://codeql.github.com/) query suites used for the [Windows Hardware Compatibility Program](https://learn.microsoft.com/en-us/windows-hardware/design/compatibility/). The quickstart below will get you set up to build your database and analyze your driver using CodeQL. For the full documentation, troubleshooting, and more details about the Static Tools Logo test within the WHCP Program, please visit [CodeQL and the Static Tools Logo Test](https://docs.microsoft.com/windows-hardware/drivers/devtest/static-tools-and-codeql).
4
4
5
-
### For General Use
5
+
### For General Use or Windows Hardware Compatibility Program Use
6
6
7
-
| CodeQL CLI version| microsoft/windows-drivers qlpack version | microsoft/cpp-queries version | codeql/cpp-queries version |Associated Repo Branch|
| Windows Server 2022 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_21H2 |
17
-
| Windows 11, version 22H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_22H2 |
18
-
| Windows 11, version 23H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_22H2 |
19
-
| Windows 11 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_21H2 |
20
-
| Windows 11, version 24H2 |[2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.1.0 | N/A |0.9.0 | WHCP_24H2 |
21
-
| Windows Server 2025 |[2.20.1](https://github.com/github/codeql-cli-binaries/releases/tag/v2.20.1)| 1.5.0 | 0.0.2 | N/A | WHCP_TODO |
22
-
| Windows 11, version <todo> |[2.20.1](https://github.com/github/codeql-cli-binaries/releases/tag/v2.20.1)| 1.5.0 | 0.0.2 | N/A | WHCP_TODO |
23
13
24
14
25
15
### For Testing the Latest in Development
26
16
27
17
28
-
| CodeQL CLI version| microsoft/windows-drivers qlpack version | microsoft/cpp-queries version | codeql/cpp-queries version |Associated Repo Branch|
|[Latest](https://github.com/github/codeql-cli-binaries/releases/latest)|[Latest](https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/pkgs/container/windows-drivers)|[Latest](https://github.com/orgs/microsoft/packages/container/package/cpp-queries)| N/A| Development |
18
+
| CodeQL CLI Version| microsoft/windows-drivers CodeQL Pack Version | microsoft/cpp-queries CodeQL Pack Version |Associated Repo Branch|
|[Latest](https://github.com/github/codeql-cli-binaries/releases/latest)|[Latest Beta Version](https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/pkgs/container/windows-drivers)|[Latest](https://github.com/orgs/microsoft/packages/container/package/cpp-queries)| Development |
31
21
32
22
## Quickstart
33
23
34
24
1. Create a directory where you can place the CodeQL CLI and the queries you want to use:
35
25
```
36
-
D:\> mkdir codeql-home
26
+
mkdir codeql-home
37
27
```
38
28
39
29
1. Download the CodeQL CLI
40
30
41
-
**NOTE** Visual Studio 17.8 broke compatibility with the older versions of CodeQL used in the WHCP_21H2 and WHCP_22H2 branches. [CodeQL CLI version 2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4) has been validated for use with WHCP 21H2 and WHCP 22H2 when using Visual Studio 17.8 or greater.
42
-
43
-
For the WHCP Program, use the CodeQL CLI version in accordance with the table above and Windows release you are certifying for
31
+
For the WHCP Program, use the CodeQL CLI version specified above. For special cases and more information see appendix.
44
32
1. Navigate to the [CodeQL CLI Release Page](https://github.com/github/codeql-cli-binaries/releases)
45
33
1. Find the release version based on the tables above and select the asset associated with your OS and architecture (codeql-win64.zip, codeql-linux64.zip, etc.),
46
34
1. Extract the downloaded zip to the directory you created in the previous step.
47
35
1. (Optional) Add the CodeQL install location to your PATH
48
-
49
-
1. Verify CodeQL is installed correctly by checking the version:
50
-
```
51
-
D:\codeql-home\codeql>codeql --version
52
-
CodeQL command-line toolchain release 2.15.4.
53
-
Copyright (C) 2019-2023 GitHub, Inc.
54
-
Unpacked in: D:\codeql-home\codeql
55
-
Analysis results depend critically on separately distributed query and
56
-
extractor modules. To list modules that are visible to the toolchain,
57
-
use 'codeql resolve qlpacks' and 'codeql resolve languages'.
58
-
```
36
+
1. (Optional) Verify CodeQL is installed correctly by checking the version `codeql --version`
59
37
60
38
1. Install CodeQL Packages
61
39
62
-
63
-
64
-
Download the correct version of the CodeQL packs from the Windows Hardware Compatibility Program Release Version Matrix:
40
+
Download the correct version of the CodeQL packs. For special cases and more information see appendix.
CodeQL will install the packs to the default directory `C:\Users\<current user>\.codeql\packages\microsoft\windows-drivers\<downloaded version>\`. Do not change this directory or move the installed pack.
74
50
75
-
For examples, if using WHCP_24H2, run the following command to download query the microsoft/windows-drivers pack:
D:\codeql-home\codeql>codeql database create <path to new database> --language=cpp --source-root=<driver parent directory> --command=<build command or path to build file>
54
+
codeql database create <path to new database> --language=cpp --source-root=<driver parent directory> --command=<build command or path to build file>
@@ -112,7 +80,7 @@ This repository contains open-source components for supplemental use in developi
112
80
113
81
1. ***For WHCP Users Only***: Prepare to Create a Driver Verification Log (DVL):
114
82
115
-
Tocreate a DVL, your SARIF log file must be in the parent directory of your driver project. You can modify your output location in the `codeql database analyze` step or copy the file manyally
83
+
To create a DVL, your SARIF log file must be in the parent directory of your driver project. You can modify your output location in the `codeql database analyze` step or copy the file manyally
116
84
117
85
Please refer to the continued instructions at [CodeQL and the Static Tools Logo Test, Driver Verification Log DVL Consumption of SARIF Output](https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/static-tools-and-codeql#driver-verification-log-dvl-consumption-of-sarif-output).
118
86
@@ -122,7 +90,7 @@ Windows drivers queries are in the `src/drivers` directory.
122
90
123
91
Non-driver Microsoft-specific queries provided by Microsoft are in the `src/microsoft` directory.
124
92
125
-
Query suites are located in the `windows-driver-suites` directory and contain the Must-Fix and Recommended-Fix suites used by the WHCP Program.
93
+
Query suites are located in the `windows-driver-suites` directory and contain the Must-Fix and Recommended suites used by the WHCP Program.
126
94
127
95
128
96
@@ -163,7 +131,22 @@ Any use of third-party trademarks or logos are subject to those third-party's po
163
131
164
132
## Appendix
165
133
134
+
### Windows Hardware Compatibility Program Release Version Matrix
135
+
For WHCP, these versions can be used in place of the latest versions specified above. These versions were the latest available at the time new WHCP requirements were released and can continue to be used for WHCP certifications. However, newer versions of CodeQL continue to be validated for use.
136
+
| Release | CodeQL CLI version | microsoft/windows-drivers qlpack version| microsoft/cpp-queries version | codeql/cpp-queries version | Associated Repo Branch|
| Windows Server 2022 | [2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_21H2 |
139
+
| Windows 11, version 22H2 | [2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_22H2 |
140
+
| Windows 11, version 23H2 | [2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_22H2 |
141
+
| Windows 11 | [2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| N/A |0.9.0 (If using codeql 2.15.4) | WHCP_21H2 |
142
+
| Windows 11, version 24H2 | [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4) | 1.1.0 | N/A |0.9.0 | WHCP_24H2 |
143
+
| Windows Server 2025 | [2.20.1](https://github.com/github/codeql-cli-binaries/releases/tag/v2.20.1) | 1.6.0 | 0.0.4 | N/A | <todo> |
144
+
| Windows 11, version <todo> | [2.20.1](https://github.com/github/codeql-cli-binaries/releases/tag/v2.20.1) | 1.6.0 | 0.0.4 | N/A | <todo> |
145
+
146
+
166
147
### Special instructions for for WHCP_21H2 and WHCP_22H2 branches:
148
+
Visual Studio 17.8 broke compatibility with the older versions of CodeQL used in the WHCP_21H2 and WHCP_22H2 branches. [CodeQL CLI version 2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4) has been validated for use with WHCP 21H2 and WHCP 22H2 when using Visual Studio 17.8 or greater.
149
+
167
150
168
151
1. If using Visual Studio 2022 17.8 or greater with WHCP_21H2 or WHCP_22H2 and CodeQL CLI version 2.15.4:
0 commit comments