Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1006 commits
Select commit Hold shift + click to select a range
6de4765
PS: Support implicit imports in API graphs.
MathiasVP Apr 8, 2025
ebb91dc
PS: Add a few more models after fixing MaD for Element content.
MathiasVP Apr 8, 2025
f8207fa
PS: Add a testcase to demonstrate flow through Join-String.
MathiasVP Apr 8, 2025
a93d65b
Update sync-main.yml
dilanbhalla Apr 9, 2025
e7edf1b
Update sync-main.yml
dilanbhalla Apr 9, 2025
88a7c3a
Update sync-main.yml
dilanbhalla Apr 9, 2025
0d97cd6
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 9, 2025
86b3eae
Merge branch 'main' into dilan/sync-main-bugs-6
dilanbhalla Apr 9, 2025
b8b4e44
Update sync-main.yml
dilanbhalla Apr 9, 2025
c5b024a
Update sync-main.yml
dilanbhalla Apr 9, 2025
0f034b3
Merge pull request #194 from microsoft/dilan/sync-main-bugs-6
dilanbhalla Apr 9, 2025
89ddb30
Merge pull request #197 from microsoft/auto/sync-main-pr
dilanbhalla Apr 9, 2025
b55ee68
Merge branch 'main' into autogenerate-lots-of-models
MathiasVP Apr 9, 2025
419de4f
Merge pull request #196 from microsoft/autogenerate-lots-of-models
chanel-y Apr 9, 2025
4628c18
Update sync-main.yml
dilanbhalla Apr 10, 2025
5abde74
Merge pull request #198 from microsoft/dilan/sync-main-bugs-7
dilanbhalla Apr 10, 2025
793fd5e
PS: Delete a redundant file.
MathiasVP Apr 10, 2025
6084789
PS: Fix the top level arguments after the AST cleanup.
MathiasVP Apr 10, 2025
bf9ed3b
PS: Accept test changes.
MathiasVP Apr 10, 2025
9adf028
PS: Fix environment variables.
MathiasVP Apr 10, 2025
4aa9f85
PS: Accept test changes.
MathiasVP Apr 10, 2025
1637df0
Merge pull request #199 from microsoft/fix-top-level-arguments
chanel-y Apr 10, 2025
43de3a1
PS: Use the existing MaD rows to model file reads as flow sources.
MathiasVP Apr 10, 2025
3d18175
PS: Make it possible to specify a named argument that must be present…
MathiasVP Apr 10, 2025
6455992
PS: Add two more flow sources.
MathiasVP Apr 10, 2025
b4d8673
Merge branch 'main' of https://github.com/microsoft/codeql into power…
chanel-y Apr 14, 2025
9935117
PS: Make method names lower case.
MathiasVP Apr 15, 2025
f389487
PS: Make type names lower case.
MathiasVP Apr 15, 2025
43d9c70
PS: Rename Field and Property to Member.
MathiasVP Apr 15, 2025
a146630
PS: Delete redundant files.
MathiasVP Apr 15, 2025
fa3fc4a
PS: Fix more problems in MaD rows for sources.
MathiasVP Apr 15, 2025
dcc1278
PS: Make remote flow sources flow sources.
MathiasVP Apr 15, 2025
826e6a9
PS: Add an inline expectations test library for flow sources.
MathiasVP Apr 15, 2025
396a283
PS: Add tests for flow sources.
MathiasVP Apr 15, 2025
c9b1356
Merge pull request #200 from microsoft/files-reads-as-flow-sources
chanel-y Apr 16, 2025
5f64350
added script block, expandstring sinks, moved sanitizers to separate …
chanel-y Apr 16, 2025
50a771e
Merge branch 'main' into powershell-injectionhunter-port
chanel-y Apr 16, 2025
2266cd2
moved folder, added tests/docs
chanel-y Apr 16, 2025
ed553d3
merged work into CommandInjection query
chanel-y Apr 16, 2025
b09d9f6
PS: Autoformat.
MathiasVP Apr 17, 2025
7d72683
PS: Add an example with a missing toString.
MathiasVP Apr 17, 2025
b70f7e2
PS: Fix missing toString and accept test changes.
MathiasVP Apr 17, 2025
12b918e
pr feedback: removed toString, updated .expected
chanel-y Apr 17, 2025
fe7d8ff
Merge pull request #201 from microsoft/powershell-injectionhunter-port
chanel-y Apr 17, 2025
e7e88d3
PS: Add upgrade script from some unknown dbscheme to the dbscheme tha…
MathiasVP Apr 18, 2025
4518f18
PS: Delete a cycle in the upgrade script.
MathiasVP Apr 18, 2025
21210c6
Merge pull request #203 from microsoft/add-missing-downgrade-and-upgr…
MathiasVP Apr 18, 2025
37a6b04
Merge branch 'main' into fix-to-string-on-unknown-static-read
chanel-y Apr 18, 2025
03bce1c
Merge pull request #202 from microsoft/fix-to-string-on-unknown-stati…
chanel-y Apr 18, 2025
7553e14
sync upstream tags to main
Apr 21, 2025
57f060b
Update DataFlowImpl.qll
LWSimpkins Apr 21, 2025
2007479
Merge pull request #205 from microsoft/LWSimpkins/rust-module-import-fix
dilanbhalla Apr 21, 2025
7e32709
Merge branch 'main' into dilan/sync-main-tags
dilanbhalla Apr 21, 2025
7462e40
Merge pull request #204 from microsoft/dilan/sync-main-tags
dilanbhalla Apr 21, 2025
7359f91
added initial psscriptanalyzer rules, docs, tests
chanel-y Apr 21, 2025
e91912e
cleanup
chanel-y Apr 21, 2025
43954b7
removed irrelevant tags
chanel-y Apr 22, 2025
b9fdc78
PS: Add argument tests.
MathiasVP Apr 22, 2025
72266cb
PS: Drive-by cleanup in Constant.qll
MathiasVP Apr 22, 2025
e9fd50b
PS: Handle switch arguments by synthesizing a boolean true literal an…
MathiasVP Apr 22, 2025
09ebc76
PS: Accept test changes.
MathiasVP Apr 22, 2025
ff154b1
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Apr 22, 2025
a98a7b8
Merge branch 'main' into switch-parameters
chanel-y Apr 22, 2025
6a5d087
Merge pull request #207 from microsoft/switch-parameters
MathiasVP Apr 22, 2025
bfb7b0b
Merge branch 'main' into psscriptanalyzer-port
MathiasVP Apr 22, 2025
9f44cb2
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 22, 2025
7432884
Merge branch 'main' into psscriptanalyzer-port
chanel-y Apr 22, 2025
2898910
Merge branch 'psscriptanalyzer-port' of https://github.com/microsoft/…
chanel-y Apr 22, 2025
faa47f9
ConvertToSecureStringAsPlainText
chanel-y Apr 22, 2025
6419794
Update powershell/ql/src/experimental/HardcodedComputerName.qhelp
chanel-y Apr 22, 2025
f82cfc7
Update powershell/ql/src/experimental/UsernameOrPasswordParameter.qhelp
chanel-y Apr 22, 2025
3a66e8e
Update powershell/ql/src/experimental/UsernameOrPasswordParameter.qhelp
chanel-y Apr 22, 2025
f375b81
remove reference to command injection owasp
chanel-y Apr 22, 2025
12db85a
Merge pull request #206 from microsoft/psscriptanalyzer-port
chanel-y Apr 22, 2025
b28b84f
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 22, 2025
d3c6c3b
Merge pull request #208 from microsoft/auto/sync-main-pr
dilanbhalla Apr 22, 2025
4b3c612
Merge branch 'main' into dilan/publish-opensource-packs
dilanbhalla Apr 22, 2025
916b264
Update sync-main-tags.yml
dilanbhalla Apr 22, 2025
358862e
Update sync-main.yml
dilanbhalla Apr 22, 2025
0544343
Merge pull request #209 from microsoft/dilan/workflow-bugs
dilanbhalla Apr 22, 2025
082141e
Update microsoft-codeql-pack-publish.yml
dilanbhalla Apr 22, 2025
a3c5e48
Update microsoft-codeql-pack-publish.yml
dilanbhalla Apr 22, 2025
b112947
Merge branch 'main' into dilan/publish-opensource-packs
dilanbhalla Apr 22, 2025
3126366
Merge pull request #170 from microsoft/dilan/publish-opensource-packs
chanel-y Apr 22, 2025
47fc9f2
Update go language references in mod and sum files to prevent vulnera…
Apr 22, 2025
9efbecc
Update microsoft-codeql-pack-publish.yml
dilanbhalla Apr 22, 2025
e669dc6
Merge pull request #210 from microsoft/dilan/pack-publish-typo
chanel-y Apr 22, 2025
ba58c01
Update microsoft-codeql-pack-publish.yml
dilanbhalla Apr 22, 2025
2f62351
Merge pull request #211 from microsoft/dilan/publish-pack-bug-2
dilanbhalla Apr 22, 2025
42776fb
Merge branch 'main' into denisl/goreferenceupdate
denislevin Apr 22, 2025
7360d80
PS: Rename getName to getLowerCaseName.
MathiasVP Apr 23, 2025
2e05601
PS: Add matchesName and getAName to make it easier to match case inse…
MathiasVP Apr 23, 2025
b65d41b
PS: Cleanup and autoformat.
MathiasVP Apr 23, 2025
f5e7af1
PS: Fix tests.
MathiasVP Apr 23, 2025
9e83dee
PS: Accept test changes.
MathiasVP Apr 23, 2025
5ec59c3
PS: Get rid of unnecessary module.
MathiasVP Apr 23, 2025
06fd1c6
PS: Delete deprecated unnecessary predicates.
MathiasVP Apr 23, 2025
0a1f89b
PS: Delete more stuff that's being deprecated and replace with non-de…
MathiasVP Apr 23, 2025
b1cd672
Merge branch 'main' into powershell-better-api-for-normalizednames
chanel-y Apr 23, 2025
a3b32af
Update qlpack.yml
dilanbhalla Apr 23, 2025
c3926d3
Update qlpack.yml
dilanbhalla Apr 23, 2025
084c75c
changing microsoft-sdl/powershell-all to microsoft/powershell-all
Apr 23, 2025
1930059
Merge pull request #214 from microsoft/dilan/powershell-lib-pack-org
chanel-y Apr 23, 2025
4d00aa3
Merge pull request #213 from microsoft/powershell-better-api-for-norm…
MathiasVP Apr 24, 2025
b672950
Merge branch 'main' into denisl/goreferenceupdate
ropwareJB Apr 24, 2025
aee5b23
Merge pull request #212 from microsoft/denisl/goreferenceupdate
denislevin Apr 28, 2025
c015c74
PS: Lower case more predicate results for consistency.
MathiasVP Apr 29, 2025
e4d5b1e
PS: Add a query for SQL injection.
MathiasVP Apr 29, 2025
c667894
PS: Add query test for the new SQL injection query.
MathiasVP Apr 29, 2025
64dd13d
Merge pull request #215 from microsoft/ps-add-sql-injection-query
chanel-y Apr 29, 2025
a7c0305
PS: Lift StringLiterals to the public AST from the raw AST.
MathiasVP Apr 30, 2025
dbfd070
PS: Add some tests for string literals.
MathiasVP Apr 30, 2025
f6aec28
Merge pull request #216 from microsoft/ps-string-literals
chanel-y Apr 30, 2025
2f03911
PS: Accept test changes.
MathiasVP Apr 30, 2025
f7d0818
Merge pull request #217 from microsoft/accept-parent-test-changes
MathiasVP Apr 30, 2025
d824bdf
system.web + system.net
5idg5 Apr 30, 2025
d6c6015
PS: Run tests on PRs
MathiasVP May 1, 2025
3b2057b
Update powershell-pr-check.yml
MathiasVP May 1, 2025
1724948
Update powershell-pr-check.yml
MathiasVP May 1, 2025
7c37c54
Update powershell-pr-check.yml
MathiasVP May 1, 2025
3bea9e5
Update powershell-pr-check.yml
MathiasVP May 1, 2025
f029d2a
Update powershell-pr-check.yml
MathiasVP May 1, 2025
3cca0a6
Update powershell-pr-check.yml
MathiasVP May 1, 2025
337cb8b
PS: Make it possible to run the build script from a command prompt th…
MathiasVP May 1, 2025
3dc74e9
PS: Harden the build script so that you can run it from any folder.
MathiasVP May 1, 2025
63884ff
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
May 1, 2025
f0e0d76
Merge pull request #220 from microsoft/auto/sync-main-pr
ropwareJB May 1, 2025
43ab8cb
Merge branch 'main' of https://github.com/microsoft/codeql into updat…
5idg5 May 1, 2025
d76de83
Merge pull request #218 from microsoft/update-csharp-stub-models
dilanbhalla May 1, 2025
e70d9ff
Merge branch 'main' into ps-run-tests-on-prs
dilanbhalla May 2, 2025
0d7e5fa
Merge pull request #219 from microsoft/ps-run-tests-on-prs
dilanbhalla May 2, 2025
0ec0f5c
Revert "Update the C# stub models"
dilanbhalla May 2, 2025
c31abb7
Merge pull request #222 from microsoft/revert-218-update-csharp-stub-…
dilanbhalla May 2, 2025
b87431a
Looks like I've missed a few CG changes - checking in
May 7, 2025
526f161
Merge branch 'main' into denisl/afewmissedCGChanges
denislevin May 7, 2025
c87545e
Merge pull request #223 from microsoft/denisl/afewmissedCGChanges
ropwareJB May 8, 2025
a1bfbb3
Two more modules and an update to some cached refs for GO (#224)
denislevin May 8, 2025
a489bfd
PS: Delete all the existing upgrade and downgrade scripts.
MathiasVP May 13, 2025
07d7232
PS: Add a single upgrade script that upgrades the old dbscheme to the…
MathiasVP May 13, 2025
2bf076d
PS: Also include the downgrade scripts when building the PowerShell e…
MathiasVP May 13, 2025
2ef6dd9
Merge pull request #225 from microsoft/cleanup-upgrade-downgrade-story-2
dilanbhalla May 14, 2025
ae515a4
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
May 15, 2025
d1c2fa0
Merge pull request #230 from microsoft/auto/sync-main-pr
dilanbhalla May 15, 2025
5be20a0
Rename build.ps1 to build-win64.ps1
dilanbhalla May 15, 2025
c632477
Create build-osx64.ps1
dilanbhalla May 15, 2025
0fab231
Update build-win64.ps1
dilanbhalla May 15, 2025
e250f9b
Create build-linux64.ps1
dilanbhalla May 15, 2025
0d38a98
Update powershell-pr-check.yml
dilanbhalla May 15, 2025
dd965dd
Merge pull request #232 from microsoft/dilan/powershell-osx-specific-…
dilanbhalla May 15, 2025
50622e5
Update build-linux64.ps1
dilanbhalla May 15, 2025
77e6056
Update build-osx64.ps1
dilanbhalla May 15, 2025
5127ace
Update build-win64.ps1
dilanbhalla May 15, 2025
60ca496
Merge pull request #233 from microsoft/dilan/powershell-dotnet-publis…
dilanbhalla May 15, 2025
c3b0c2d
PS: Update typegen script and documentation.
MathiasVP May 16, 2025
bac9c7d
Merge branch 'main' into interprocedural-controlflow
MathiasVP May 19, 2025
198a594
Merge pull request #149 from microsoft/interprocedural-controlflow
MathiasVP May 19, 2025
7cc0919
C++/Shared: Convert the global control-flow library to a shared param…
MathiasVP May 19, 2025
f00c370
C#: Instantiate the (now shared) global control-flow library.
MathiasVP May 19, 2025
2f0b064
Merge pull request #234 from microsoft/share-global-cfg-library
MathiasVP May 19, 2025
61021b6
PS: Regenerate models.
MathiasVP May 21, 2025
1a7908c
PS: Add generated models for .NET runtime.
MathiasVP May 20, 2025
b409cbd
PS: Add back the manual models.
MathiasVP May 20, 2025
8875962
PS: Fix pack name in data extension files.
MathiasVP May 21, 2025
a410e85
PS: Accept test changes.
MathiasVP May 21, 2025
a17f10d
Merge branch 'main' into update-typegen-2
chanel-y May 21, 2025
0e887d8
Merge pull request #235 from microsoft/update-typegen-2
MathiasVP May 21, 2025
b40a437
C#: Small optimization. Avoid a small CP between sinks and states.
MathiasVP May 27, 2025
03e671a
C#: Add a false negative.
MathiasVP May 27, 2025
a2d4c20
C#: Fix FN by blocking flow out of the function call instead of out o…
MathiasVP May 27, 2025
db7119c
C#: Add a false positive.
MathiasVP May 27, 2025
4dfa886
C#: Recognize more path-normalization steps.
MathiasVP May 27, 2025
2186fef
C#: Accept test changes.
MathiasVP May 27, 2025
10a8863
Merge pull request #237 from microsoft/fix-fps-in-tainted-path
MathiasVP May 30, 2025
8ef8210
Update sync-main.yml
dilanbhalla Jun 2, 2025
126ddf9
Merge pull request #238 from microsoft/dilan/sync-repo-auth
dilanbhalla Jun 2, 2025
8aa1099
Update sync-main.yml
dilanbhalla Jun 2, 2025
8ef818c
Merge pull request #239 from microsoft/dilan/sync-main-auth-2
chanel-y Jun 2, 2025
4645586
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Jun 2, 2025
0d11efc
added hasbranchedge
chanel-y Jun 3, 2025
0644878
Merge pull request #242 from microsoft/powershell-guardpredicate-fix
dilanbhalla Jun 3, 2025
58acb60
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Jun 3, 2025
25fb1aa
fix powershell qhelp files
LWSimpkins Jun 9, 2025
3d84e5a
Merge pull request #243 from microsoft/lwsimpkins/fix-qhelp
dilanbhalla Jun 9, 2025
077549d
fix failing qhelp files
LWSimpkins Jun 9, 2025
9521d06
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Jun 9, 2025
7668175
Merge branch 'main' into lwsimpkins/fix-qhelp
LWSimpkins Jun 9, 2025
64bc3ed
Merge pull request #244 from microsoft/lwsimpkins/fix-qhelp
dilanbhalla Jun 10, 2025
b8a78f7
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Jun 10, 2025
7bfefef
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Jun 11, 2025
b88ed68
PS: Remove unnecessary data extension pattern. All the models are mat…
MathiasVP Jun 12, 2025
ed8cc6a
Merge pull request #245 from microsoft/fix-extensional-warnings-power…
dilanbhalla Jun 12, 2025
dae0582
Merge branch 'main' into auto/sync-main-pr
dilanbhalla Jun 12, 2025
8e09d96
Merge pull request #240 from microsoft/auto/sync-main-pr
dilanbhalla Jun 12, 2025
f882af9
update to invokesink
chanel-y Jun 12, 2025
229914f
PS: Add 'Node.getCallee' predicate on DataFlow::CallNode.
MathiasVP Jun 16, 2025
56977c7
Merge pull request #247 from microsoft/add-get-callee-on-call-nodes
MathiasVP Jun 16, 2025
3ba3b11
PS: Prevent magic on 'getParent'.
MathiasVP Jun 19, 2025
9ed32b1
PS: Add some QLDoc.
MathiasVP Jun 19, 2025
f69cfdc
PS: Autoformat.
MathiasVP Jun 19, 2025
ae83d56
PS: Rename predicate.
MathiasVP Jun 19, 2025
ebc167c
PS: Fix join in 'count'.
MathiasVP Jun 19, 2025
b79f366
PS: Replace a 'forex' with explicit recursion.
MathiasVP Jun 19, 2025
8664842
PS: Remove two more 'forex's.
MathiasVP Jun 19, 2025
9be1f2d
PS: Replace another 'forex' with explicit recursion.
MathiasVP Jun 19, 2025
f513259
PS: Format, add a helper predicate and add an explicit 'this' to sile…
MathiasVP Jun 19, 2025
a38d57f
PS: Fix cartesian product.
MathiasVP Jun 19, 2025
c50b0c6
PS: Prevent join on boolean.
MathiasVP Jun 19, 2025
2d045ea
PS: Prevent join on integer.
MathiasVP Jun 19, 2025
31fbb6f
PS: Prevent bad magic by calling a HOP to compute the transitive clos…
MathiasVP Jun 19, 2025
86cc09b
PS: Start with a SCAN of 'getProcessBlock' as this ensures we start w…
MathiasVP Jun 19, 2025
b82bd2c
PS: Add false positive to 'ps/sql-injection'.
MathiasVP Jun 20, 2025
c18db91
PS: Model 'inputfile' as a sink for SQL injections.
MathiasVP Jun 20, 2025
0912cc3
PS: Accept test changes.
MathiasVP Jun 20, 2025
25d94fa
PS: Add false positive to 'ps/sql-injection'.
MathiasVP Jun 20, 2025
05a7cfd
PS: Don't implicitly read any element. Instead, only read positional …
MathiasVP Jun 20, 2025
72178f0
PS: Accept test changes.
MathiasVP Jun 20, 2025
1ff04d9
PS: Add new false negative.
MathiasVP Jun 20, 2025
1486200
PS: Allow for implicit reads at sinks in 'ps/sql-injection'.
MathiasVP Jun 20, 2025
9032d86
PS: Accept test changes.
MathiasVP Jun 20, 2025
cb89695
PS: Improve alert message.
MathiasVP Jun 20, 2025
6ab05cd
Merge pull request #249 from microsoft/fix-fps-on-sql-injection
LWSimpkins Jun 20, 2025
52f5ac5
Merge branch 'main' into fix-ps-performance
LWSimpkins Jun 21, 2025
849e0b4
Merge pull request #248 from microsoft/fix-ps-performance
LWSimpkins Jun 21, 2025
4122283
Manual merge
ropwareJB Jul 1, 2025
0585c2f
PS: Gets back the previously-lost false negative by making the variab…
MathiasVP Jul 4, 2025
7d07773
PS: Accept test changes.
MathiasVP Jul 4, 2025
eec092c
PS: Mark the BAD results in the test appropriately.
MathiasVP Jul 4, 2025
2a26c43
PS: Cleanup a few manually generated models.
MathiasVP Jul 4, 2025
8aa8dde
Merge branch 'main' into powershell-commandinjection-invokesinkfix
chanel-y Jul 4, 2025
bd90435
PS: Add test with missing remote flow source.
MathiasVP Jul 4, 2025
766cf82
PS: Add more models and accept test changes.
MathiasVP Jul 4, 2025
654bf2f
random newline to reset git latest pusher
chanel-y Jul 4, 2025
52ff5d3
Merge pull request #246 from microsoft/powershell-commandinjection-in…
MathiasVP Jul 4, 2025
2731983
PS: Add query for insecure uses of 'Set-ExecutionPolicy'.
MathiasVP Jul 4, 2025
f7c9899
PS: Add documentation.
MathiasVP Jul 4, 2025
4e524a1
PS: Add tests.
MathiasVP Jul 4, 2025
b6b4df5
PS: Implement 'localExprTaint' instead of leaving it as 'none()'.
MathiasVP Jul 4, 2025
d4571f5
Merge pull request #254 from microsoft/implement-localExprTaint
LWSimpkins Jul 7, 2025
1d64a79
Merge pull request #252 from microsoft/add-more-remote-flow-sources
MathiasVP Jul 7, 2025
28de6ed
PS: Also require '-Force' with a truthy value. Note the 'NOT DETECTED…
MathiasVP Jul 7, 2025
398d27b
PS: Fix missing AST child.
MathiasVP Jul 7, 2025
3101cc8
Merge pull request #253 from microsoft/add-set-execution-policy-bypas…
MathiasVP Jul 7, 2025
1816356
PS: Add test with missing remote flow.
MathiasVP Jul 9, 2025
d198877
PS: Add more flow sources and accept test changes.
MathiasVP Jul 9, 2025
8cd58aa
Merge pull request #255 from microsoft/add-iwr-as-flow-source
MathiasVP Jul 9, 2025
81f9e88
run add-overlay-annotations.py
ropwareJB Jul 10, 2025
87e0b08
Merge branch 'main' into jb1/upstream-zipslip
ropwareJB Jul 10, 2025
4dfa5d2
Merge pull request #251 from microsoft/jb1/upstream-zipslip
ropwareJB Jul 10, 2025
5fb45c8
Revert "Merge pull request #251 from microsoft/jb1/upstream-zipslip"
ropwareJB Jul 10, 2025
4c5945f
Manual merge
ropwareJB Jul 10, 2025
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 @@ -88,3 +88,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
4 changes: 0 additions & 4 deletions .github/copilot-instructions.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/check-change-note.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- "shared/**/*.qll"
- "!**/experimental/**"
- "!ql/**"
- "!rust/**"
- ".github/workflows/check-change-note.yml"

jobs:
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/check-overlay-annotations.yml

This file was deleted.

152 changes: 152 additions & 0 deletions .github/workflows/microsoft-codeql-pack-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Microsoft CodeQL Pack Publish

on:
workflow_dispatch:

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"
gh codeql pack publish "$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"
gh codeql pack publish "$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
2 changes: 1 addition & 1 deletion .github/workflows/ql-for-ql-dataset_measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Create database
run: |
"${CODEQL}" database create \
--search-path "${{ github.workspace }}" \
--search-path "${{ github.workspace }}"
--threads 4 \
--language ql --source-root "${{ github.workspace }}/repo" \
"${{ runner.temp }}/database"
Expand Down
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 }}

1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.


Loading