Static Tools Logo Test
This test performs static analysis that is designed to improve reliability and security of drivers using Static Driver Verifier (SDV), the Code Analysis tool, and starting with Windows Driver Kit Preview Version 20190: CodeQL.
|Expected run time (in minutes)||5|
|Timeout (in minutes)||0|
|Requires special configuration||false|
New in Windows Driver Kit Preview Version 20190
CodeQL is a powerful static analysis technology for securing software. The combination of an extensive suite of high-value security queries and a robust platform make it an invaluable tool for securing third party driver code.
In an effort to raise the security bar of the Windows ecosystem, Microsoft is investing in adding a requirement to a future Windows Hardware Compatability Program which states that all driver submissions must use the CodeQL engine on driver source code and fix any queries that are deemed “Must-Fix”.
This requirement will be enforced by the Static Tools Logo Test.
Please see CodeQL and the Static Tools Logo Test for details regarding how to download and run CodeQL on your driver source code. Following that page along with the "CodeQL and DVL Generation" section below will ensure that the Static Tools Logo Test properly consumes the results of running CodeQL on driver source code as part of the Static Tools Logo Test.
CodeQL and Driver Verifiction Log (DVL) Generation
Microsoft will be enforcing the requirement of running CodeQL queries with the Static Tools Logo Test. The Static Tools Logo Test uses a Driver Verification Log (DVL) to gather results from different static analyses run on driver source code. This DVL is then parsed as part of the Static Tools Logo Test via an HLK test.
CodeQL results will follow the same model of using a DVL to show that the driver being certified ran the appropriate CodeQL queries in order to pass the HLK test for certification.
Place the .sarif file in the same directory as the .vcxproj file for which a DVL is being generated for. The exact name does not matter as long as the file ends with ".sarif". This capability is available in Windows Driver Kit Preview Version 20190 and above.
Tests in this feature area might have additional documentation, including prerequisites, setup, and troubleshooting information, that can be found in the following topic(s):
Running the test
Before you run the test,, you must create a Driver Verification Log (DVL) by performing the following steps.
Run the Static Driver Verifier and the Code Analysis tool on the driver source code.
Run a utility that generates the DVL file.
Copy the DVL file from the computer that was used to create the DVL file to the test computer that is used when you run the Static Tools Logo Test. Copy the file to the %systemdrive%\DVL directory on the test computer. Be sure to delete the contents of the directory on the test computer before you copy the new driver verification log.
For more information about creating a Driver Verification Log file to include with your submission, see Creating a Driver Verification Log.
The Static Tools Logo Test requires only the DVL file to show that Code Analysis and SDV have been run. The test does not require all rules to pass. Additionally, this job must be run on Server with Desktop. If the HLK test fails from using Server Core (with error message: "RoMetadata.dll could not be found"), the workaround is to run on Server with Desktop and then merge the package with the package containing the results from Server Core. Information on how to merge packets can be found here: /windows-hardware/test/hlk/user/merge-packages.
For generic troubleshooting of HLK test failures, see Troubleshooting Windows HLK Test Failures.
TE.exe /inproc /enablewttlogging /appendwttlogging Devfund_DvlTest.dll /p:WDKClass=[WDKClass] /p:DeviceClass=[DeviceClass] /p:QueryDriverNames=[QueryDriverNames]
Runs the test.
For command line help for this test binary, type /?.
|Parameter name||Parameter description|
|DeviceClass||Device Class parameter|
|QueryDriverNames||Expected driver names.|