Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1532 commits
Select commit Hold shift + click to select a range
4378da4
Binary: Add IR for 'dup' instructions.
MathiasVP Dec 16, 2025
79817dc
Binary: Extract field references.
MathiasVP Dec 16, 2025
ecf00f9
Binary: Add a FieldAddress instruction to the IR.
MathiasVP Dec 16, 2025
03a907e
Binary: Translate 'CilStfld' to IR.
MathiasVP Dec 16, 2025
85d9007
Binary: Translate 'CilLdfld' to IR.
MathiasVP Dec 16, 2025
286fc27
Brodes/nested sizeof or operation in sizeof audit fixes (#310)
bdrodes Dec 16, 2025
4919660
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Dec 16, 2025
9d5a797
Porting over PR adding bad wchar query #226 (#229)
dilanbhalla Dec 16, 2025
95c7a7c
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Dec 16, 2025
6a1f66b
C#: Fix a merge conflict.
MathiasVP Dec 17, 2025
636d726
C#: Fix another merge conflict.
MathiasVP Dec 17, 2025
c9b45fd
Merge pull request #311 from microsoft/fix-merge-conflict-inTaintedPa…
dilanbhalla Dec 17, 2025
10b13f2
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Dec 17, 2025
9d04abb
C#: Fix an incorrect merge conflict resolution.
MathiasVP Dec 18, 2025
fa9f02a
C#: Drive-by fix. The 'GOOD' test was not actually
MathiasVP Dec 18, 2025
55a3dae
Minor fix to the query that should not alter prior semantics. Previou…
bdrodes Dec 18, 2025
676c6b2
Merge pull request #313 from microsoft/brodes/nested_sizeof_or_operat…
MathiasVP Dec 18, 2025
f9e1165
Merge branch 'main' into fix-merge-conflict-inTaintedPathQuery-2
MathiasVP Dec 18, 2025
47a0d22
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Dec 18, 2025
626127b
Merge pull request #312 from microsoft/fix-merge-conflict-inTaintedPa…
dilanbhalla Dec 18, 2025
15325a7
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Dec 18, 2025
aba87c5
Massaging cpp leap year AP1
ropwareJB Dec 18, 2025
e63e19b
Break out query into subcomponents, comments
ropwareJB Dec 23, 2025
7b5163c
init precise version
ropwareJB Dec 23, 2025
7649370
Test case qlref
ropwareJB Dec 23, 2025
c7a6543
Use Bens version + Autoformat
ropwareJB Dec 26, 2025
f6f63cb
Refactoring common class between dataflow
ropwareJB Dec 26, 2025
50e182e
Hashcons definition of exprEq_propertyPermissive
ropwareJB Dec 26, 2025
ca9f66c
Misc. updates. Removed the ignorable function mechanic, and switched …
bdrodes Dec 29, 2025
ec2e5f7
Code Commenting
ropwareJB Dec 30, 2025
fb72602
Autoformat
ropwareJB Dec 30, 2025
c94edcf
Add failing test case
ropwareJB Dec 30, 2025
6d7bd97
Check for leap day
ropwareJB Dec 30, 2025
662119a
Adding a test for setting a year field through a return arg. Misc. tw…
bdrodes Dec 30, 2025
1169f9e
Assignment through out arg is causing too many FPs.
bdrodes Dec 30, 2025
800abae
Fix mislabeled test case
ropwareJB Dec 31, 2025
d743fbf
Add initial Java bytecode extractor and QL support
gfs Jan 5, 2026
1c3a107
Handle null names in JVM extractor
gfs Jan 5, 2026
d5a8da2
Refactor JVM extractor indexing and opcode handling
gfs Jan 6, 2026
31dd0e8
Add JVM IR translation support and test model
gfs Jan 6, 2026
f66db26
Refactor JVM instruction hierarchy and translation
gfs Jan 6, 2026
83e1236
Extract and expose JVM method access flags
gfs Jan 6, 2026
13f79e6
Extract and expose CIL method access flags
gfs Jan 6, 2026
d80ab2d
Update dependencies in qlpack.yml files
gfs Jan 6, 2026
5e83ca4
Improve detection of transitive vulnerable calls
gfs Jan 6, 2026
7256e95
Add JVM stack state extraction and QL accessors
gfs Jan 9, 2026
60e0fcd
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Jan 9, 2026
c2f683b
Refactor stack element access to use getInputStackVariable
gfs Jan 9, 2026
02fd414
Optimize vulnerable call detection and summarization
gfs Jan 9, 2026
5dedaee
Cleanup state
gfs Jan 9, 2026
ec3b350
Misc. tweaks addressing FPs and cases observed during auditing.
bdrodes Jan 12, 2026
9b7f986
Fixed FP issue with ignorable constants, now no longer relying on the…
bdrodes Jan 12, 2026
9b04b42
A leap year check sink can be a ExprCheckLeapYear component.
bdrodes Jan 12, 2026
0926f3d
Use single TRAP file for JVM extraction
gfs Jan 12, 2026
bc98a0f
Revert JVM stack state precomputation
gfs Jan 13, 2026
b9ccfee
Revert VulnerableCalls pragma[nomagic] optimizations
gfs Jan 13, 2026
43109f5
Refactor call graph predicates for vulnerable method detection
gfs Jan 13, 2026
0fd33da
Revert "Refactor call graph predicates for vulnerable method detection"
gfs Jan 13, 2026
2f1a850
Check if there is a guard checking for a month that isnt a february v…
ropwareJB Jan 13, 2026
b013012
Misc. updates. Specifically including how constant values are used to…
bdrodes Jan 13, 2026
ce802bd
More ignorable functions, and adding 0 as an ignorable constant.
bdrodes Jan 13, 2026
ba28175
Binary: Small cleanup by moving some x86 stuff into another file like…
MathiasVP Jan 13, 2026
3282718
Add TIME_FIELDS struct and test case
ropwareJB Jan 15, 2026
938b42a
Removed unused predicates
ropwareJB Jan 15, 2026
4aaad23
"Precise" query overwrites previous version
ropwareJB Jan 15, 2026
4bdb2e2
unit tests for weak hash
chanel-y Jan 15, 2026
021cdeb
initial query, updated .expected file
chanel-y Jan 15, 2026
8756089
Removing hashcons usages from LeapYear.qll, inefficient and I'm not s…
bdrodes Jan 15, 2026
2e7dba2
Comment cleanup
bdrodes Jan 15, 2026
9446a6b
Updating query alert message.
bdrodes Jan 15, 2026
aebaa87
Merge pull request #309 from microsoft/auto/sync-main-pr
dilanbhalla Jan 16, 2026
bc76018
Misc. false positive and false negative updates. as a response to rev…
bdrodes Jan 16, 2026
63639ea
More FP tweaks.
bdrodes Jan 20, 2026
e55ee18
Updating test for UncheckedReturnValueForTImeFunctions. That query ne…
bdrodes Jan 20, 2026
c909338
Merge branch 'main' into ql-for-x86-and-cil
gfs Jan 20, 2026
f507239
New additions to the set of TimeConversionFunctions.
bdrodes Jan 20, 2026
2f64978
Binary/JVM: Add warning for implicit 'this' and slightly modify a pre…
MathiasVP Jan 21, 2026
2dec095
Binary/JVM: Autoformat.
MathiasVP Jan 21, 2026
2aa84f4
PS: Fix bug in 'getConstructedTypeExpr' and add a helper predicate to…
MathiasVP Jan 21, 2026
b3e1f57
PS: Add intermediate api graph nodes for 'New-Object' calls similar t…
MathiasVP Jan 21, 2026
0b06fcd
PS: Add instance edges for New-Object in API graphs.
MathiasVP Jan 21, 2026
8c883e9
PS: Add instance edges for static constructor-like functions.
MathiasVP Jan 21, 2026
634f7b0
PS: Allow non-read member access from 'memberEdge'.
MathiasVP Jan 21, 2026
6c7715b
PS: Accept test changes.
MathiasVP Jan 21, 2026
e485d98
Created a new leap year check guard condition. Found that the prior d…
bdrodes Jan 21, 2026
74f46a9
Merge pull request #316 from microsoft/ql-for-x86-and-cil
MathiasVP Jan 21, 2026
f299fef
Merge branch 'main' into api-graphs-improvements-for-chanel
chanel-y Jan 21, 2026
657686b
Merge pull request #317 from microsoft/api-graphs-improvements-for-ch…
chanel-y Jan 21, 2026
8e7ff2d
Removing most dependencies from UncheckedLeapYearAfterYearMOdificatio…
bdrodes Jan 21, 2026
0469eac
additional weak hash cases, initial queries for cipher mode and KDF alg
chanel-y Jan 21, 2026
2a0945c
Merge remote-tracking branch 'origin/main' into powershell-crypto
chanel-y Jan 21, 2026
6c103a9
Time conversion results that are checked in a ternary operator condit…
bdrodes Jan 21, 2026
1aec7fc
PS: Fix example.
MathiasVP Jan 22, 2026
6c56bbf
Merge pull request #318 from microsoft/fix-example-in-sql-injection
MathiasVP Jan 22, 2026
d36a4df
Misc. FP fixes.
bdrodes Jan 23, 2026
f8a2f5c
More FP tweaks.
bdrodes Jan 23, 2026
acdbb8d
Adding FP checks for assignment of a constant safe date regardless of…
bdrodes Jan 23, 2026
5818330
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Jan 26, 2026
c4a73dd
Merge pull request #320 from microsoft/auto/sync-main-pr
dilanbhalla Jan 26, 2026
983fbc1
Port github/codeql#21202 to our fork (#319)
MathiasVP Jan 27, 2026
0c0b2f2
added unit tests for cipher mode, obsolete kdf alg, weak symmetric alg
chanel-y Jan 27, 2026
6648a6f
added qhelps, initial queries for cipher mode, symmetric, obsolete KD…
chanel-y Jan 27, 2026
1dc5ebf
C++: Port github/codeql#21212 to our fork (#321)
MathiasVP Jan 28, 2026
4dcb6f1
Additional test cases and comments
bdrodes Jan 28, 2026
8f1d8d4
Merge branch 'main' into jb1/ap1-maturity
bdrodes Jan 28, 2026
65d9a9d
Now using asDefinition to detect assignment to a year field. Misc cle…
bdrodes Jan 28, 2026
2e613ac
Fixed expected results due to a line shift.
bdrodes Jan 28, 2026
a8d5357
Added an additional test case and fixed a false positive. Also noted …
bdrodes Jan 29, 2026
7604938
Added more heuristic ignorable functions.
bdrodes Jan 29, 2026
27edb07
Adding new div 4 check and false positive test cases
bdrodes Jan 29, 2026
93c7e5d
Comment fix.
bdrodes Jan 29, 2026
4ca54e9
moved crypto classes/methods to folder under lib
chanel-y Jan 30, 2026
af5c15e
updated qhelps
chanel-y Jan 30, 2026
0949e96
query format
chanel-y Jan 30, 2026
2081c6f
addiitonal minor fixes
chanel-y Jan 30, 2026
b0d9776
added query tests
chanel-y Jan 30, 2026
738a697
added query, qhelp
chanel-y Jan 30, 2026
86dfe52
Adding a fix and test case for a new false positive, also added a fal…
bdrodes Jan 30, 2026
7ff7006
Adding more false positive cases, and fixing prior test cases to be m…
bdrodes Jan 30, 2026
3ba543e
More heuristics for culling non-gregorian year calculations.
bdrodes Jan 30, 2026
e2d3d15
Minor comment/description clean up, and added a test case and support…
bdrodes Jan 30, 2026
df3fcfc
Changing the name of a predicate to be more precise.
bdrodes Jan 30, 2026
ae2d156
update qhelp phrasing
chanel-y Jan 30, 2026
bf5e0ee
Apply suggestion from @MathiasVP
chanel-y Jan 30, 2026
67b0bf1
updated shared crypto classes to be abstract, simplified logic for is…
chanel-y Jan 30, 2026
9c2525e
Apply suggestions from code review ty mathias <3
chanel-y Jan 30, 2026
936a5c2
fixed test regression
chanel-y Jan 30, 2026
2924f2b
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Jan 30, 2026
afb058c
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Jan 30, 2026
56e9c1f
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Jan 30, 2026
606dfa7
minor refactor for readability
ropwareJB Feb 2, 2026
c7553d5
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Feb 2, 2026
b1dff11
Add dry_run input to CodeQL pack publish workflow
dilanbhalla Feb 2, 2026
4c29fb8
Merge pull request #326 from microsoft/dilan/microsoft-pack-dryrun
dilanbhalla Feb 2, 2026
1f63bee
Added a FP test case and corrected the leap year logic to no longer f…
bdrodes Feb 3, 2026
c88b877
Merge branch 'jb1/ap1-maturity' of https://github.com/microsoft/codeq…
bdrodes Feb 3, 2026
93eb345
Misc comments and added test cases.
bdrodes Feb 3, 2026
fcab399
Add dry run option for CodeQL pack publish
dilanbhalla Feb 3, 2026
8aff770
Merge pull request #327 from microsoft/dilan/microsoft-pack-dryrun-bug
dilanbhalla Feb 3, 2026
557e86b
System to Variant time and Variant to System Time auto correct leap y…
bdrodes Feb 6, 2026
9205924
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Feb 6, 2026
aab59f6
Update cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll
bdrodes Feb 6, 2026
45bff11
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Feb 6, 2026
321c2fa
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Feb 6, 2026
31b9606
Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearMod…
bdrodes Feb 6, 2026
09f852e
PR suggestion fixes.
bdrodes Feb 6, 2026
77da7fd
Merge branch 'jb1/ap1-maturity' of https://github.com/microsoft/codeq…
bdrodes Feb 6, 2026
8d59b4c
Bug introduced in merge, missing "and"
bdrodes Feb 6, 2026
a209bd6
Correcting UnchedReturnValueForTimeFunctions to take into accoutn isA…
bdrodes Feb 6, 2026
e64bf9b
Merge branch 'main' into powershell-crypto
MathiasVP Feb 9, 2026
25df927
Merge pull request #322 from microsoft/powershell-crypto
MathiasVP Feb 10, 2026
c05e8a0
PS: Add script to generate PowerShell typemodels from a C# database.
MathiasVP Feb 17, 2026
255aa39
C#: Generate type models for dotnet/sqlclient.
MathiasVP Feb 17, 2026
800f6dd
PS: Add a test demonstraing missing arguments for object creations.
MathiasVP Feb 18, 2026
2eb8b1a
PS: Fix two cases where a class was overriding the relevantChild pred…
MathiasVP Feb 18, 2026
2b4ac31
PS: Accept test changes.
MathiasVP Feb 18, 2026
065ff29
manual merge
ropwareJB Feb 23, 2026
80deee8
PS: Fixup PowerShell after https://github.com/github/codeql/pull/21051.
MathiasVP Feb 23, 2026
fbbb13a
Merge pull request #330 from microsoft/chanel-fixes
chanel-y Feb 23, 2026
9cf0c79
Merge pull request #331 from microsoft/jb1/merge-upstream-latest
dilanbhalla Feb 23, 2026
d30c56f
C++: Provide barrier node API without the unit column when instantiat…
MathiasVP Feb 24, 2026
99b32b6
C++: Add change note.
MathiasVP Feb 24, 2026
5f91a9d
C++: Make a test slightly more verbose to catch this issue in the fut…
MathiasVP Feb 24, 2026
d1d2417
Merge pull request #332 from microsoft/unbreak-changes-2
ropwareJB Feb 24, 2026
a3421d0
Merge branch 'main' into jb1/ap1-maturity
ropwareJB Mar 11, 2026
f37ac50
Merge pull request #315 from microsoft/jb1/ap1-maturity
ropwareJB Mar 11, 2026
097e96c
Manual merge of codeql-cli/latest
ropwareJB Mar 11, 2026
b4f81e7
Merge pull request #333 from microsoft/jb1/update-submodule
dilanbhalla Mar 11, 2026
f0cf910
fix powershell extractor on Linux
LWSimpkins Mar 16, 2026
2d1a722
Merge branch 'main' into lwsimpkins/powershell-extractor-linux
LWSimpkins Mar 16, 2026
fca47c2
Revert upstream commits synced past codeql-cli/v2.24.3
Mar 18, 2026
51ea591
Merge pull request #334 from microsoft/lwsimpkins/powershell-extracto…
MathiasVP Mar 18, 2026
9eb5b93
Merge branch 'main' into fix/revert-sync-past-v2.24.3
dilanbhalla Mar 19, 2026
a02bf27
Merge pull request #335 from microsoft/fix/revert-sync-past-v2.24.3
dilanbhalla Mar 20, 2026
769aacc
Merge codeql-cli/latest into auto/sync-main-pr
chanel-y Mar 20, 2026
c830ac7
Restore codeql/dataflowstack dependency in Java and C# qlpacks
Mar 24, 2026
58c515b
Restore cpp dbscheme overlay types from v2.25.0 release
Mar 24, 2026
ed72ad5
fix expr.qll and dbscheme merge issue
Mar 24, 2026
ba3f298
Revert "Revert upstream commits synced past codeql-cli/v2.24.3"
Mar 24, 2026
4f8cfb3
Merge pull request #337 from microsoft/auto/sync-main-pr
dilanbhalla Mar 24, 2026
a3f6a98
Add Get-FileHash weak hash algorithm detection to powershell/weak-has…
Copilot Mar 25, 2026
32ea6a8
Merge pull request #338 from microsoft/copilot/update-powershell-weak…
chanel-y Mar 26, 2026
782b38a
C++: Switch to doublyBoundedFastTC when computing virtual dispatch ed…
MathiasVP Mar 26, 2026
da64e54
Merge pull request #341 from microsoft/ms-restrict-pair-cand
LWSimpkins Mar 26, 2026
5758c7b
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Mar 27, 2026
2534dcf
Merge pull request #342 from microsoft/auto/sync-main-pr
dilanbhalla Apr 1, 2026
fe2b23f
Shared: Also expose dataflow stage 1's forward flow predicate.
MathiasVP Apr 2, 2026
708283c
Shared: Respond to review comments.
MathiasVP Apr 7, 2026
cccecc4
Merge pull request #343 from microsoft/ms-expose-fwd-stage-1
MathiasVP Apr 7, 2026
5abc596
Add weak HMAC algorithm detection query for PowerShell
chanel-y Apr 9, 2026
cabf6d0
Add weak asymmetric key size detection query for PowerShell
chanel-y Apr 9, 2026
125468d
Add deprecated TLS/SSL version detection query for PowerShell
chanel-y Apr 9, 2026
07dfa9b
Add JWT none algorithm detection query for PowerShell
chanel-y Apr 9, 2026
dfd2553
Weak RSA key size query, docs, test
chanel-y Apr 9, 2026
2e342de
remove example from qhelp
chanel-y Apr 9, 2026
9bafbaf
Merge pull request #344 from microsoft/users/chanely/weak-asymmetric-key
MathiasVP Apr 10, 2026
1f0f8e5
changed to just detect the .net usage, updated tests, added qhelp
chanel-y Apr 13, 2026
424ba6a
refactor classes to go into existing cryptography modules, added qhelp
chanel-y Apr 13, 2026
decbe38
make abstract class, remove microsoft from id, add qhelp
chanel-y Apr 13, 2026
bd5be06
added additional unsafe deserializers to powershell query
chanel-y Apr 13, 2026
f8fa93d
remove the tls query from this branch
chanel-y Apr 14, 2026
6da1c01
PS: Add false positive with GUID.
MathiasVP Apr 15, 2026
6465ecd
PS: Add GUIDs as a simple sanitizer, and accept test changes.
MathiasVP Apr 15, 2026
49336e3
added initial unsafe typenamehandling queries
chanel-y Apr 15, 2026
ac52680
Merge pull request #350 from microsoft/guid-sanitizer-ps
MathiasVP Apr 16, 2026
d824fd9
Merge branch 'main' into users/chanely/deprecated-tls
chanel-y Apr 16, 2026
20f33c9
Merge branch 'main' into users/chanely/jwt-none-algorithm
chanel-y Apr 16, 2026
9a9e8ad
Merge pull request #347 from microsoft/users/chanely/deprecated-tls
chanel-y Apr 16, 2026
1c8fe05
mathias PR feedback, quwery id update
chanel-y Apr 16, 2026
d3c338e
Merge branch 'main' into users/chanely/jwt-none-algorithm
chanel-y Apr 16, 2026
54da53b
Merge pull request #345 from microsoft/users/chanely/jwt-none-algorithm
chanel-y Apr 16, 2026
65fd69e
added queries + unit tests
chanel-y Apr 17, 2026
f63c714
added InlineExpectationsTest query
chanel-y Apr 17, 2026
b3626db
updated all powershell tests to use inline expectatoins
chanel-y Apr 17, 2026
ce35618
fixed tests, comments were put on wrong line ty copilot
chanel-y Apr 17, 2026
a2d5377
reorganize without-binder query to use the existing typenamehandling …
chanel-y Apr 17, 2026
378e74a
making TypeNameHandlingQuery.qll file readable
chanel-y Apr 17, 2026
1788a53
Merge branch 'main' into typenamehandling-queries
ropwareJB Apr 20, 2026
702deb4
Merge pull request #352 from microsoft/typenamehandling-queries
ropwareJB Apr 20, 2026
341fba0
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
MathiasVP Apr 21, 2026
313a9c8
Merge branch 'main' into users/chanely/weak-hmac
MathiasVP Apr 22, 2026
2f075f0
Merge branch 'main' into domain-squatting-powershell
MathiasVP Apr 22, 2026
c76571c
Merge pull request #348 from microsoft/users/chanely/weak-hmac
MathiasVP Apr 22, 2026
f25e2f3
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 22, 2026
41736a4
Merge branch 'main' into additional-unsafe-deserializers
MathiasVP Apr 24, 2026
0ff3ae8
Merge pull request #349 from microsoft/additional-unsafe-deserializers
MathiasVP Apr 24, 2026
e5284ea
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 24, 2026
cf72f5c
Merge pull request #353 from microsoft/auto/sync-main-pr
dilanbhalla Apr 24, 2026
e90b4be
Merge branch 'main' into domain-squatting-powershell
chanel-y Apr 24, 2026
beed435
Merge pull request #323 from microsoft/domain-squatting-powershell
MathiasVP Apr 24, 2026
ccd89e2
re-added deprecated TLS query
chanel-y Apr 24, 2026
4239e8e
Merge pull request #354 from microsoft/deprecated-tls2
chanel-y Apr 24, 2026
967a210
PS: Fix two bad joins.
MathiasVP Apr 27, 2026
d77eb9c
Merge branch 'main' into fix-joins-in-powershell
MathiasVP Apr 27, 2026
b6567f9
Merge pull request #355 from microsoft/fix-joins-in-powershell
MathiasVP Apr 27, 2026
d39e54a
Merge branch 'main' into powershell-inline-expectationstests
MathiasVP Apr 28, 2026
e702680
Merge pull request #351 from microsoft/powershell-inline-expectations…
MathiasVP Apr 28, 2026
3f39c88
PS: Optimize 'ChildMapping' using forward/reverse pruning.
MathiasVP May 5, 2026
d52f413
Merge pull request #356 from microsoft/powershell-reverse-child-recur…
MathiasVP May 5, 2026
c99b4de
explicitly add iac to workspace
ropwareJB Oct 20, 2025
0bb42f7
Rename ConditionKind to BinaryConditionKind to resolve name conflict …
gfs May 15, 2026
555456a
Merge pull request #357 from microsoft/gfs/RenameBinaryPackConditionKind
gfs May 15, 2026
dea11e1
Merge branch 'main' into jb1/iac-qlpack
ropwareJB May 15, 2026
3f4d327
Merge pull request #359 from microsoft/jb1/iac-qlpack
ropwareJB May 15, 2026
a3cc253
Add parameter type signatures for IL and JVM methods (#358)
gfs May 15, 2026
6e238a7
Update ApprovedCipherMode query and tests
chanel-y May 20, 2026
a5e5379
predicate -> abstract class, updated inline expectations
chanel-y May 21, 2026
b18703e
update to use .getValue()
chanel-y May 26, 2026
8635eaf
Merge pull request #361 from microsoft/approved-cipher-mode-changes
chanel-y May 27, 2026
c1ca997
merge upstream 2.25.5
Jun 1, 2026
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,8 @@
# swift prebuilt resources
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text

# This upgrade script must use windows line-endings to be compatible with old
# databases.
/powershell/ql/lib/upgrades/ce269c61feda10a8ca0d16519085f7e55741a694/old.dbscheme eol=crlf
/powershell/downgrades/802d5b9f407fb0dac894df1c0b4584f2215e1512/semmlecode.powershell.dbscheme eol=crlf
166 changes: 166 additions & 0 deletions .github/workflows/microsoft-codeql-pack-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: Microsoft CodeQL Pack Publish

on:
workflow_dispatch:
inputs:
dry_run:
description: "When true, run publish with --dry-run (no changes pushed)"
type: boolean
required: false
default: true

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Fail if not on main branch
run: |
if [ "$GITHUB_REF" != "refs/heads/main" ]; then
echo "This workflow can only run on the 'main' branch."
exit 1
fi
codeqlversion:
needs: check-branch
runs-on: ubuntu-latest
outputs:
codeql_version: ${{ steps.set_codeql_version.outputs.codeql_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set CodeQL Version
id: set_codeql_version
run: |
git fetch
git fetch --tags
CURRENT_COMMIT=$(git rev-list -1 HEAD)
CURRENT_TAG=$(git describe --tags --abbrev=0 --match 'codeql-cli/v*' $CURRENT_COMMIT)
CODEQL_VERSION="${CURRENT_TAG#codeql-cli/}"
echo "CODEQL_VERSION=$CODEQL_VERSION" >> $GITHUB_OUTPUT
publishlibs:
environment: secure-publish
needs: codeqlversion
runs-on: ubuntu-latest
strategy:
matrix:
language: ['powershell']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install CodeQL
shell: bash
run: |
gh extension install github/gh-codeql
gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}"
gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}"
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish OS Microsoft CodeQL Lib Pack
shell: bash
run: |
# Download latest qlpack
gh codeql pack download "microsoft/$LANGUAGE-all"
PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-all"
VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l)
[[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; }

# Increment version
CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1)
MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1)
MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2)
PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3)
NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"

# Extract dependencies from the existing qlpack.yml before deleting
DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null)
DATAEXTENSIONS=$(yq 'select(has("dataExtensions")) | .dataExtensions | {"dataExtensions": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null)
rm -f "$LANGUAGE/ql/lib/qlpack.yml" "$LANGUAGE/ql/lib/qlpack.lock"

# Create new qlpack.yml with modified content
cat <<EOF > "$LANGUAGE/ql/lib/qlpack.yml"
name: microsoft/$LANGUAGE-all
version: $NEXT_VERSION
extractor: $LANGUAGE
groups:
- $LANGUAGE
- microsoft-all
dbscheme: semmlecode.$LANGUAGE.dbscheme
extractor: $LANGUAGE
library: true
upgrades: upgrades
$DEPENDENCIES
$DATAEXTENSIONS
warnOnImplicitThis: true
EOF

# Publish pack
cat "$LANGUAGE/ql/lib/qlpack.yml"
DRY_RUN_FLAG=""
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
DRY_RUN_FLAG="--dry-run"
fi
gh codeql pack publish $DRY_RUN_FLAG "$LANGUAGE/ql/lib"
env:
LANGUAGE: ${{ matrix.language }}
GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }}
publish:
environment: secure-publish
needs: codeqlversion
runs-on: ubuntu-latest
strategy:
matrix:
language: ['csharp', 'cpp', 'java', 'javascript', 'python', 'ruby', 'go', 'rust', 'swift', 'powershell']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install CodeQL
shell: bash
run: |
gh extension install github/gh-codeql
gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}"
gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}"
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish OS Microsoft CodeQL Pack
shell: bash
run: |
# Download latest qlpack
gh codeql pack download "microsoft/$LANGUAGE-queries"
PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-queries"
VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l)
[[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; }

# Increment version
CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1)
MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1)
MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2)
PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3)
NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"

# Extract dependencies from the existing qlpack.yml before deleting
DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/src/qlpack.yml" 2>/dev/null)
rm -f "$LANGUAGE/ql/src/qlpack.yml" "$LANGUAGE/ql/src/qlpack.lock"

# Create new qlpack.yml with modified content
cat <<EOF > "$LANGUAGE/ql/src/qlpack.yml"
name: microsoft/$LANGUAGE-queries
version: $NEXT_VERSION
extractor: $LANGUAGE
groups:
- $LANGUAGE
- queries
$DEPENDENCIES
EOF

# Publish pack
cat "$LANGUAGE/ql/src/qlpack.yml"
DRY_RUN_FLAG=""
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
DRY_RUN_FLAG="--dry-run"
fi
gh codeql pack publish $DRY_RUN_FLAG "$LANGUAGE/ql/src"
env:
LANGUAGE: ${{ matrix.language }}
GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }}

32 changes: 32 additions & 0 deletions .github/workflows/powershell-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PowerShell PR Check

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
powershell-pr-check:
name: powershell-pr-check
runs-on: windows-latest
if: github.repository == 'microsoft/codeql'
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
with:
channel: release
- name: Install PowerShell
run: |
$path = Split-Path (Get-Command codeql).Source
./powershell/build-win64.ps1 $path
- name: Run QL tests
run: |
codeql test run --threads=0 powershell/ql/test
28 changes: 28 additions & 0 deletions .github/workflows/sync-main-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Sync Main Tags

on:
pull_request:
types:
- closed
branches:
- main

jobs:
sync-main-tags:
name: Sync Main Tags
runs-on: ubuntu-latest
if: github.repository == 'microsoft/codeql' && github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'auto/sync-main-pr'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push Tags
run: |
git remote add upstream https://github.com/github/codeql.git
git fetch upstream --tags --force
git push --force origin --tags
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
91 changes: 91 additions & 0 deletions .github/workflows/sync-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Sync Main

on:
push:
branches:
- main
paths:
- .github/workflows/sync-main.yml
schedule:
- cron: '55 * * * *'

jobs:
sync-main:
name: Sync-main
runs-on: ubuntu-latest
if: github.repository == 'microsoft/codeql'
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_TOKEN }}
- name: Git config
shell: bash
run: |
git config user.name "dilanbhalla"
git config user.email "dilanbhalla@microsoft.com"
- name: Git checkout auto/sync-main-pr
shell: bash
run: |
git fetch origin
if git ls-remote --exit-code --heads origin auto/sync-main-pr > /dev/null; then
echo "Branch exists remotely. Checking it out."
git checkout -B auto/sync-main-pr origin/auto/sync-main-pr
else
echo "Branch does not exist remotely. Creating from main."
git checkout -B auto/sync-main-pr origin/main
git push -u origin auto/sync-main-pr
fi
- name: Sync origin/main
shell: bash
run: |
echo "::group::Sync with main branch"
git pull origin auto/sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi
git pull origin main --no-rebase
git push --force origin auto/sync-main-pr
echo "::endgroup::"
- name: Sync upstream/codeql-cli/latest
shell: bash
run: |
echo "::group::Set up remote"
git remote add upstream https://github.com/github/codeql.git
git fetch upstream --tags --force
echo "::endgroup::"
echo "::group::Merge codeql-cli/latest"
set -x
git merge codeql-cli/latest
set +x
echo "::endgroup::"
- name: Push sync branch
run: |
git push origin auto/sync-main-pr
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
- name: Create PR if it doesn't exist
shell: bash
run: |
pr_number=$(gh pr list --repo microsoft/codeql --head auto/sync-main-pr --base main --json number --jq '.[0].number')
if [ -n "$pr_number" ]; then
echo "PR from auto/sync-main-pr to main already exists (PR #$pr_number). Exiting gracefully."
else
if git fetch origin main auto/sync-main-pr && [ -n "$(git rev-list origin/main..origin/auto/sync-main-pr)" ]; then
echo "PR does not exist. Creating one..."
gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr \
--label 'autogenerated' \
--title 'Sync Main (autogenerated)' \
--body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`." \
--reviewer 'MathiasVP' \
--reviewer 'ropwareJB'
else
echo "No changes to sync from auto/sync-main-pr to main. Exiting gracefully."
fi
fi
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "iac"]
path = iac
url = https://github.com/advanced-security/codeql-extractor-iac
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ You can install the [CodeQL for Visual Studio Code](https://marketplace.visualst
### Tasks

The `.vscode/tasks.json` file defines custom tasks specific to working in this repository. To invoke one of these tasks, select the `Terminal | Run Task...` menu option, and then select the desired task from the dropdown. You can also invoke the `Tasks: Run Task` command from the command palette.


41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
9 changes: 9 additions & 0 deletions binary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/bin/*
**/obj/*
**/*.dll
**/myDB/*
**/oatDB/*
**/test-db-jvm/*
**/test-db-jvm-create/*
**/test-db-jvm*
**/tools/*
Loading
Loading