Skip to content

Commit 997ba4f

Browse files
Merge pull request #186 from microsoft/development
RI development to main
2 parents 7214cd5 + 4ed18e0 commit 997ba4f

7 files changed

Lines changed: 40 additions & 12 deletions

File tree

.github/workflows/publish.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11

2-
name: Build and Publish Windows CodeQL queries
2+
name: Publish CodeQL Pack
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
6+
codeql-version:
77
description: 'CodeQL version to use'
88
required: true
99
type: string
10+
release-type:
11+
description: 'Publish as a pre-release'
12+
required: false
13+
type: choice
14+
options:
15+
- alpha
16+
- beta
17+
1018
jobs:
1119
publish:
1220
runs-on: windows-latest
@@ -26,7 +34,7 @@ jobs:
2634

2735
- name: CodeQL Download
2836
run:
29-
Invoke-WebRequest -Uri "https://github.com/github/codeql-cli-binaries/releases/download/v${{ github.event.inputs.version }}/codeql-win64.zip" -OutFile codeql-win64.zip;
37+
Invoke-WebRequest -Uri "https://github.com/github/codeql-cli-binaries/releases/download/v${{ github.event.inputs.codeql-version }}/codeql-win64.zip" -OutFile codeql-win64.zip;
3038
Expand-Archive -Path codeql-win64.zip -DestinationPath .\codeql-zip -Force;
3139
Move-Item -Path .\codeql-zip\codeql -Destination .\codeql-cli\
3240

@@ -40,5 +48,12 @@ jobs:
4048
shell: pwsh
4149
env:
4250
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
run:
44-
.\codeql-cli\codeql.cmd pack publish ./src;
51+
run: |
52+
if ("${{ github.event.inputs.release-type }}" -ne "") {
53+
$version =( Select-String .\src\qlpack.yml -Pattern "version").line;
54+
$new_ver = "$version-${{ github.event.inputs.release-type }}";
55+
(Get-Content .\src\qlpack.yml).Replace($version, $new_ver) | Set-Content .\src\qlpack.yml;
56+
.\codeql-cli\codeql.cmd pack publish --allow-prerelease ./src;
57+
} else {
58+
.\codeql-cli\codeql.cmd pack publish ./src
59+
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# Change Log
3+
All notable changes to this project will be documented in this file.
4+
5+
## [1.8.0] - 2025-07-17
6+
7+
### Added
8+
- CHANGELOG.md
9+
### Changed
10+
- ExtendedDeprecatedApis.ql moved from recommended.qls to mustfix.qls
11+
### Fixed
12+

config/codeql-config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: "CodeQL config"
22
disable-default-queries: true
33

44
packs:
5-
- microsoft/cpp-queries@0.0.2:codeql-suites/cpp-code-scanning.qls
6-
- microsoft/windows-drivers@1.5.0-beta+5:windows-driver-suites/recommended.qls
7-
- microsoft/windows-drivers@1.5.0-beta+5:drivers\general\queries\experimental\DriverIsolationZwViolation1\DriverIsolationZwViolation1.ql
8-
- microsoft/windows-drivers@1.5.0-beta+5:drivers\general\queries\experimental\DriverIsolationZwViolation2\DriverIsolationZwViolation2.ql
9-
- microsoft/windows-drivers@1.5.0-beta+5:drivers\general\queries\experimental\DriverIsolationRtlViolation\DriverIsolationRtlViolation.ql
5+
- microsoft/cpp-queries@0.0.4:codeql-suites/cpp-code-scanning.qls
6+
- microsoft/windows-drivers@1.x:windows-driver-suites/recommended.qls
7+
- microsoft/windows-drivers@1.x:drivers\general\queries\experimental\DriverIsolationZwViolation1\DriverIsolationZwViolation1.ql
8+
- microsoft/windows-drivers@1.x:drivers\general\queries\experimental\DriverIsolationZwViolation2\DriverIsolationZwViolation2.ql
9+
- microsoft/windows-drivers@1.x:drivers\general\queries\experimental\DriverIsolationRtlViolation\DriverIsolationRtlViolation.ql

src/drivers/general/queries/ExtendedDeprecatedApis/ExtendedDeprecatedApis.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,4 +493,5 @@ class ExtendedDeprecatedCall extends Element {
493493

494494
from ExtendedDeprecatedCall deprecatedCall
495495
where not deprecatedCall.getLocation().getFile().toString().matches("%Windows Kits%include%.h")
496+
and not deprecatedCall.getLocation().getFile().toString().matches("%.tmh") // Exclude autogenerated WPP files
496497
select deprecatedCall, deprecatedCall.getMessage()

src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the MIT license.
33

44
name: microsoft/windows-drivers
5-
version: 1.7.1
5+
version: 1.8.0
66
dependencies:
77
codeql/cpp-all: ^4.2.0
88
microsoft/cpp-queries: ^0.0.4

src/windows-driver-suites/mustfix.qls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- include:
88
query path:
99
- drivers/general/queries/WdkDeprecatedApis/wdk-deprecated-api.ql
10+
- drivers/general/queries/ExtendedDeprecatedApis/ExtendedDeprecatedApis.ql
1011
- microsoft/Security/CWE/CWE-704/WcharCharConversionLimited.ql
1112
- queries: .
1213
from: microsoft/cpp-queries

src/windows-driver-suites/recommended.qls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
- drivers/general/queries/DefaultPoolTag/DefaultPoolTag.ql
1313
- drivers/general/queries/DriverEntrySaveBuffer/DriverEntrySaveBuffer.ql
1414
- drivers/general/queries/ExaminedValue/ExaminedValue.ql
15-
- drivers/general/queries/ExtendedDeprecatedApis/ExtendedDeprecatedApis.ql
1615
- drivers/general/queries/IRPStackEntryCopy/IRPStackEntryCopy.ql
1716
- drivers/general/queries/ImportantFunctionCallOptimizedOut/ImportantFunctionCallOptimizedOut.ql
1817
- drivers/general/queries/ImproperNotOperatorOnZero/ImproperNotOperatorOnZero.ql

0 commit comments

Comments
 (0)