Skip to content

Fix GitHub History + Upgrade to 2.22.2 #20195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1,379 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1379 commits
Select commit Hold shift + click to select a range
7ce3b11
Rust: add testcase for impl trait on i32
aibaars Jul 8, 2025
38fdeec
Rust: fix missing canonical paths
aibaars Jul 8, 2025
bb3cd1b
Download GitHub database: fix `gh` invocation on Windows
dscho Jul 10, 2025
e751c79
QL4QL: Add overlay[discard_entity] annotation
kaspersv Jul 10, 2025
6f2a6a1
QL4QL: Discard predicates are always alive
kaspersv Jul 10, 2025
b9046bd
QL4QL: Add discard predicate to dead code test
kaspersv Jul 10, 2025
03ff43a
Address copilot comment
kaspersv Jul 10, 2025
ed8765e
Rust: add test cases for basic unwrapping and pattern matching
aibaars Jul 9, 2025
7dda117
Bump golang.org/x/mod
dependabot[bot] Jul 10, 2025
3d793e4
Rust: Fix bad join
hvitved Jul 10, 2025
c00438a
Java: Add query to detect non-case labels in switch statements
tamasvajk Jul 8, 2025
11d46aa
Improve query documentation
tamasvajk Jul 10, 2025
e1e146e
Rust: Translate more legacy models -> new models (mostly guesswork fo…
geoffw0 Jun 19, 2025
8bdf6ae
Rust: Accept test .expected changes.
geoffw0 Jul 3, 2025
15db7a5
Rust: Update the libc models.
geoffw0 Jul 7, 2025
13a0b71
Rust: Fix typo in model.
geoffw0 Jul 8, 2025
354489a
Rust: Fix a summaryModelDeprecated that was causing problems.
geoffw0 Jul 8, 2025
db40d7a
Rust: Fix futures_io models.
geoffw0 Jul 10, 2025
8a02dfb
Rust: Add a test case for 'from_trusted_iterator' as sensitive data FP.
geoffw0 Jul 9, 2025
d86e5d3
Rust: Expand the test cases around IDs as sensitive data.
geoffw0 Jul 9, 2025
3320f49
Rust: Accept consistency check changes.
geoffw0 Jul 9, 2025
1a450e1
Rust: Translate more legacy models -> new models (from data + manual …
geoffw0 Jun 19, 2025
ffaaa5d
Rust: Accept test changes.
geoffw0 Jul 1, 2025
0a8652f
Update rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml
geoffw0 Jul 7, 2025
bb9b29d
Rust: Update rustcrypto models.
geoffw0 Jul 7, 2025
8500bee
Update rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model…
geoffw0 Jul 8, 2025
d218b4c
Update rust/ql/test/library-tests/frameworks/postgres/main.rs
geoffw0 Jul 8, 2025
2791327
Rust: Add the original test back as well.
geoffw0 Jul 8, 2025
34c7087
Rust: Update after merge with main.
geoffw0 Jul 9, 2025
b8327fd
Rust: We don't really need the split into two test cases any more.
geoffw0 Jul 9, 2025
d5b5a2a
C++: Add 'pthread_create' test with missing flow.
MathiasVP Jul 10, 2025
a2a8b29
C++: Add a model for 'pthread_create' and accept test changes.
MathiasVP Jul 10, 2025
180f0f5
C++: Add 'std::thread' test with missing flow.
MathiasVP Jul 10, 2025
9f18960
C++: Add models for 'std::thread' and accept test changes.
MathiasVP Jul 10, 2025
dec4709
C++: Add change note.
MathiasVP Jul 10, 2025
e7d95f9
Update cpp/ql/test/library-tests/dataflow/external-models/test.cpp
MathiasVP Jul 10, 2025
b0fda59
C++: Accept test changes after review.
MathiasVP Jul 10, 2025
4ecb080
Ruby: add overlay[local] annotations to AST/CFG/SSA layers
nickrolfe Jun 18, 2025
fca13d2
Ruby: make resolveConstant overlay[global]
nickrolfe Jul 1, 2025
7d619eb
Ruby: add changenote for overlay[local] annotations
nickrolfe Jul 9, 2025
296a2d9
C++: Add dataflow predicate for checking if a node is the final value…
jketema Jul 10, 2025
b607a5d
C++: Add change note
jketema Jul 10, 2025
c2c6b96
C++: Fix formatting and typo
jketema Jul 10, 2025
f025ba0
Rust: Add more type inference tests
hvitved Jul 8, 2025
b2f28c3
Rust: Disambiguate calls to associated functions
hvitved Jul 8, 2025
f35ba03
Rust: Update expected test output
hvitved Jul 9, 2025
6502bcd
Add change note
hvitved Jul 10, 2025
a3caa74
Rust: Fix type inference for library parameters
hvitved Jul 2, 2025
9c54ed0
Rust: Update expected test output
hvitved Jul 2, 2025
dd3af67
Shared: Factor out some helper predicates in alert filtering
asgerf Jul 1, 2025
8cee6e6
Shared: Add approximate version of getASelected{Source,Sink}Location
asgerf Jul 1, 2025
4863c3d
Ruby: enable for PolyReDos but document why it still doesnt work
asgerf Jul 1, 2025
76afb64
Python: enable diff-informedness for poly redos using approximate rel…
asgerf Jul 1, 2025
76e467e
Java: use approximate related sink locations in polynomial redos
asgerf Jul 1, 2025
1eb09eb
Shared: Make approximate location filtering the default behaviour
asgerf Jul 2, 2025
4968690
Shared: improve join order in filterByLocation
jbj Jul 9, 2025
bd8d355
Shared: improve documentation in AlertFiltering
jbj Jul 9, 2025
006d836
Shared: Overhaul the AlertFiltering QLDoc
jbj Jul 9, 2025
09a7a84
Rust: Add more type inference tests
hvitved Jul 10, 2025
68b3e3d
Rust: Type inference for pattern matching
hvitved Jul 10, 2025
4cf104d
Add change note
hvitved Jul 11, 2025
a8dee38
Rust: Add more type inference tests
hvitved Jul 11, 2025
9d79892
Rust: Handle `(Enum::)Variant::<TypeArg>` type mentions
hvitved Jul 11, 2025
bb282c4
C++: Convert `cpp/incorrect-string-type-conversion` test to inline ex…
jketema Jul 10, 2025
9d498bc
C++: Add `cpp/incorrect-string-type-conversion` test with unreachable…
jketema Jul 10, 2025
68b05fd
C++: Do not alert on unreachable code in `cpp/incorrect-string-type-c…
jketema Jul 10, 2025
8528e5b
C++: Add change note
jketema Jul 10, 2025
737948d
C++: Add some tests with missing flow through function objects.
MathiasVP Jul 11, 2025
20f9fb3
C++: Add a missing predicate on 'UninitializedInstruction' that we wi…
MathiasVP Jul 10, 2025
d6f6b64
C++: Sync identical files.
MathiasVP Jul 10, 2025
f2cd357
C++: Add lambda dispatch for functors.
MathiasVP Jul 10, 2025
98e7326
C++: Fix lambda creation for objects with no constructor.
MathiasVP Jul 10, 2025
c4eac1c
C++: Work around an extractor bug.
MathiasVP Jul 10, 2025
e6152a8
C++: Accept taint test changes.
MathiasVP Jul 10, 2025
44dd0f7
C++: Add change note.
MathiasVP Jul 11, 2025
5e5bcea
Rust: Remove `Resolvable.resolvesAsItem`
hvitved Jul 11, 2025
9e3621b
Python: Support type annotations in call graph
tausbn Jun 4, 2025
70ec4e2
Python: Add change note
tausbn Jun 4, 2025
2a0d46d
Python: Add tests
tausbn Jul 11, 2025
7b07aab
Rust: type inference: more pattern matching tests
aibaars Jul 11, 2025
7358e9b
Rust: type inference: add test for closure argument
aibaars Jul 11, 2025
46fd32c
Refactor QL to make type check more concise
owen-mc Jul 11, 2025
3518584
Add test for ObjectInput.readObject
owen-mc Jul 11, 2025
fa793d0
Add sink for ObjectInput.readObject to make test pass
owen-mc Jul 11, 2025
7a4a27d
Change note
owen-mc Jul 11, 2025
a85c93d
Fix linter warnings in Request Forgery tests
owen-mc Jul 4, 2025
bf70070
Convert RequestForgery test to inline expectations
owen-mc Jul 4, 2025
98b931a
Test more client request URL sinks
owen-mc Jul 8, 2025
9b8f9b1
Improve formatting of some QL
owen-mc Jul 8, 2025
cc28ee5
Add net/http.Head and net/http.Client.Head as client requests
owen-mc Jul 8, 2025
559ca12
Add change note
owen-mc Jul 8, 2025
2fc93b5
C++: Fix C++20 concept related class extensions
jketema Jul 11, 2025
3cccc78
Exclude artifacts downloaded to runner temp.
AdnaneKhan Apr 25, 2025
24cb42c
Fix escaping.
AdnaneKhan Apr 25, 2025
e5b0dbe
Correctly specify regex.
AdnaneKhan Jul 8, 2025
d5d019e
Add change notes and test workflow file.
AdnaneKhan Jul 8, 2025
84183e1
Add tests and path normalization fix to handle $ expansion
JarLob Jul 8, 2025
4c7a747
Remove unneeded test file.
AdnaneKhan Jul 10, 2025
c68ce0e
Handle multiple whitespaces in runner temp regex.
AdnaneKhan Jul 10, 2025
be041ff
Add extra test suggested by @Napalys
AdnaneKhan Jul 10, 2025
79bc1da
Add test results.
AdnaneKhan Jul 11, 2025
47b5d36
Fix change note filename.
AdnaneKhan Jul 11, 2025
2318e1f
Bump golang.org/x/tools
dependabot[bot] Jul 14, 2025
3d5bffe
Kotlin: Update regex patterns to use raw string notation
igfoo Jul 13, 2025
877dea8
Rust: Translate more legacy models -> new models (from data).
geoffw0 Jun 19, 2025
9c7d333
Rust: Current sources test regressions.
geoffw0 Jul 9, 2025
c3add27
Rust: Simplify the test a little.
geoffw0 Jul 9, 2025
1f6aaa0
Rust: Fix typo in models (also fixed in another open PR).
geoffw0 Jul 9, 2025
50d6adc
Rust: Accept .expected changes (mostly renumberings).
geoffw0 Jul 10, 2025
799ab24
Rust: The rusqlite row.get() calls are missing a canonical path.
geoffw0 Jul 10, 2025
14d567e
Rust: Workaround for type inference issue in the test.
geoffw0 Jul 11, 2025
92ef805
Rust: Add something similar as a type inference test case.
geoffw0 Jul 11, 2025
0348dbb
Rust: Fix garbled merge.
geoffw0 Jul 11, 2025
73dc530
Rust: Accept consistency check change (from CI).
geoffw0 Jul 14, 2025
68f3c9d
Ruby: enable overlay compilation
nickrolfe Jun 11, 2025
aa9cfde
Rust: Rename type inference test inline expectation tag
paldepind Jul 14, 2025
71f9536
Kotlin: tweak plugin test
redsun82 Jul 14, 2025
99ac653
Kotlin: disable bazel cache in plugin test
redsun82 Jul 14, 2025
dc2b74f
JavaScript: Ignore `outDir`s that would exclude everything
tausbn Jul 11, 2025
ef01111
JavaScript: Add change note
tausbn Jul 11, 2025
217d133
JavaScript: Add test where `outDir` resolves to an unwanted path
tausbn Jul 11, 2025
28f08b8
C++: Add FP in dataflow through global variables.
MathiasVP Jul 14, 2025
cd79750
C++: Fix FP by not generating a global def entry node for variable 'v…
MathiasVP Jul 14, 2025
430d590
C++: Accept path changes.
MathiasVP Jul 14, 2025
4f8d1be
Java: use overlayChangedFiles in discard prediactes
nickrolfe Jul 4, 2025
384aaa7
Java: Restrict results to source literals.
aschackmull Jul 15, 2025
59f6f51
Overlay: Add discarding of all Java base properties
kaspersv Jul 4, 2025
b87ca71
Overlay: Add discarding of base XML locatables for Java
kaspersv Jul 4, 2025
b540fd0
Address review comment about ignored QL variable
kaspersv Jul 15, 2025
4fee500
C++: Add test showing that the IR translation for `typeid` is broken
jketema Jul 15, 2025
e1ae553
Golang: Mark filepath.IsLocal as a tainted-path sanitizer guard
smowton Jul 15, 2025
285b266
Change note
smowton Jul 15, 2025
6d871e3
Fix function qname
smowton Jul 15, 2025
4eb382b
C++: Don't use asExpr to mark the sink in 'cpp/uncontrolled-process-o…
MathiasVP Jul 14, 2025
e1f37d5
Rust: Make rust/summary/query-sinks less noisy and thus more useful. …
geoffw0 Jul 14, 2025
44368ec
feat: add getASupertype() predicate in ValueOrRefType.
Hug0Vincent Jul 10, 2025
d33c285
Create 2025-06-10-getasupertype.md
Hug0Vincent Jul 10, 2025
6b1568e
Update predicate name
Hug0Vincent Jul 15, 2025
a3a25c0
Update 2025-06-10-getasupertype.md
Hug0Vincent Jul 15, 2025
0e196cb
Make web.config match case insensitive
jfrank-nih Jul 15, 2025
63f6b81
change note
smowton Jul 16, 2025
f9d6a0e
C++: Fix typeid IR translation
jketema Jul 15, 2025
1bf4743
C++: Fix typo in comment
jketema Jul 15, 2025
a3cf19e
C++: Introduce `TypeidInstruction` base class
jketema Jul 15, 2025
9f1b4d2
C++: Address review comments
jketema Jul 15, 2025
efe4f69
C++: Don't summarize calls through function pointers in FunctionWithW…
MathiasVP Jul 15, 2025
e9d53da
C++: Add change notes.
MathiasVP Jul 16, 2025
0534b75
C++: No need for 'resolveCall' anymore.
MathiasVP Jul 16, 2025
5e1d2f3
C++: Add test that shows that IR generation for `<=>` is broken
jketema Jul 16, 2025
8bd5807
C++: Update more exoected test results
jketema Jul 16, 2025
4efe6ff
C++: Support the spaceship operator in the IR
jketema Jul 16, 2025
9562800
C++: Fix instruction class name
jketema Jul 16, 2025
0e4a1e2
C#: Add Deserialize testcase.
michaelnebel Jul 1, 2025
d727b6c
C#: Fix erroneous model the MemoryStream constructor (and align with …
michaelnebel Jul 1, 2025
93981ca
C#: Update test expected output.
michaelnebel Jul 1, 2025
2d1e7f3
C#: Promote the generated System.Xml.XmlDictionaryReader.CreateBinary…
michaelnebel Jul 1, 2025
95e0a62
C#: Add models for the remaining overloads of System.Xml.XmlDictionar…
michaelnebel Jul 1, 2025
d763e20
C#: Improve the models for System.Text.Encoding.[GetBytes|GetChars].
michaelnebel Jul 1, 2025
c85c5cb
C#: Add some models for SerializationInto and SerializationInfoEnumer…
michaelnebel Jul 3, 2025
990e347
C#: Update flow summaries expected output.
michaelnebel Jul 1, 2025
b75a102
C#: Add change-note.
michaelnebel Jul 1, 2025
9a797ca
C#: Convert Deserialization tests to use inline expectations.
michaelnebel Jul 3, 2025
e42af87
C#: Address review comments.
michaelnebel Jul 16, 2025
e38da4a
Fix compilation of DataFlowImplConsistency.qll
owen-mc Jul 15, 2025
dac7760
Shared: Add shared concepts library
jketema Jul 6, 2025
11ad066
Use shared `SensitiveDataHeuristics`
jketema Jul 6, 2025
2c59e28
Remove duplicate copies of `SensitiveDataHeuristics`
jketema Jul 6, 2025
e720866
Properly share `CryptoAlgorithms` and `CryptoAlgorithmNames`
jketema Jul 7, 2025
84e582c
Remove duplicate copies of `CryptoAlgorithms` and `CryptoAlgorithmNames`
jketema Jul 7, 2025
799425e
Properly share `ConceptsShared.qll`
jketema Jul 14, 2025
620d381
Add overlay annotations
jketema Jul 7, 2025
46bfe32
Shared: Add missing QLDoc and change note
jketema Jul 16, 2025
e005ae1
JS: Fix import
jketema Jul 16, 2025
da3b5b8
Java lib qlpack: Enable overlay compilation
kaspersv Jun 23, 2025
8a75e99
Use MaD models for unsafe deserialization sinks when possible
owen-mc Jul 16, 2025
955fe55
Update which sink kinds are shared between languages
owen-mc Jul 11, 2025
8a008cb
Add change notes
owen-mc Jul 16, 2025
71d81fa
Update test expectations
owen-mc Jul 16, 2025
26c9fcc
Delete unused private class
owen-mc Jul 17, 2025
f7ed5af
No need to deprecate classes when module is deprecated
owen-mc Jul 17, 2025
52b1720
Ql4Ql: Re-factor the ql/mising-security-metadata query.
michaelnebel Jun 30, 2025
dfd8060
Ql4Ql: Add some quality tag testcases.
michaelnebel Jun 30, 2025
b8e6677
Ql4Ql: Add a check for quality tag consistency.
michaelnebel Jun 30, 2025
042363d
Ql4Ql: Add MissingQualityMetadata test.
michaelnebel Jun 30, 2025
b04a9b0
Ql4Ql: Share the definition of TestFile between multiple tests.
michaelnebel Jul 1, 2025
4087f5a
Ql4Ql: Address review comments.
michaelnebel Jul 2, 2025
a5ba74d
Ql4Ql: Add some more quality tag testcases.
michaelnebel Jul 3, 2025
4d49ab6
Ql4Ql: Address review comments and update expected test output.
michaelnebel Jul 3, 2025
b9b42ec
Java/Javascript: Fix violations.
michaelnebel Jul 3, 2025
e9edf02
Quality tags: Clarify the quality sub-category tagging policy.
michaelnebel Jul 3, 2025
30aac01
Java: Add AnnotatedExitNodes to the CFG.
aschackmull Jun 19, 2025
81d0adb
Java: Accept test changes.
aschackmull Jul 15, 2025
7eaa146
Java: Adjust Paths.qll
aschackmull Jul 16, 2025
301d6b2
Kotlin: Accept more test changes.
aschackmull Jul 17, 2025
9bc09c9
Add changed framework coverage reports
github-actions[bot] Jul 18, 2025
168cea9
Java: Prune PathGraph for CsrfUnprotectedRequestType.ql
aschackmull Jul 17, 2025
b55cad1
Java: Allow 2-column join on delta to improve join-order.
aschackmull Jul 18, 2025
0097135
Java: getSourceDeclaration() and getASourceSupertype*() commute and t…
aschackmull Jul 18, 2025
f33e33b
Java: Improve join-order by properly annotating haveIntersection.
aschackmull Jul 18, 2025
d365b0f
Java: Fix accidental CP in CFG for asserts.
aschackmull Jul 18, 2025
8855643
[TEST] Java: CWE-020/ExternalAPI: new test based on qhelp
d10c Jul 15, 2025
8de7214
[TEST] Java: LogInjection: convert test to qlref
d10c Jul 15, 2025
7ce725b
[TEST] Java: UnsafeCertTrust: convert test to qlref
d10c Jul 15, 2025
811f3f6
[TEST] Java: TrustBoundaryViolations: convert test to qlref
d10c Jul 15, 2025
109193b
[TEST] Java: SensitiveLogInfo: convert to qlref
d10c Jul 15, 2025
7c73b8c
[TEST] Java: ConditionalBypass: convert to qlref
d10c Jul 15, 2025
750483d
[TEST] Java: SensitiveCommunication: convert to qlref
d10c Jul 15, 2025
d0c2787
[DIFF-INFORMED] Java: (Android)SensitiveCommunication
d10c Jul 16, 2025
99d5d3a
[DIFF-INFORMED] Java: ArithmeticTainted
d10c Jul 16, 2025
97f2336
[DIFF-INFORMED] Java: ArithmeticUncontrolled
d10c Jul 16, 2025
57393fe
[DIFF-INFORMED] Java: ConditionalBypass
d10c Jul 16, 2025
1a54848
[DIFF-INFORMED] Java: UntrustedDataToExternalAPI
d10c Jul 16, 2025
4e68227
[DIFF-INFORMED] Java: ExternallyControlledFormatString
d10c Jul 16, 2025
f657123
[DIFF-INFORMED] Java: ImproperValidationOfArray…
d10c Jul 16, 2025
c0670a6
[DIFF-INFORMED] Java: InsecureCookie
d10c Jul 16, 2025
7484f3b
[DIFF-INFORMED] Java: InsecureLdapAuth
d10c Jul 16, 2025
c43755e
[DIFF-INFORMED] Java: LogInjection
d10c Jul 16, 2025
462bd3f
[DIFF-INFORMED] Java: MaybeBrokenCryptoAlgorithm
d10c Jul 16, 2025
84872bc
[DIFF-INFORMED] Java: SensitiveLogging
d10c Jul 16, 2025
411c480
[DIFF-INFORMED] Java: SqlConcatenated
d10c Jul 16, 2025
e96f265
[DIFF-INFORMED] Java: TaintedEnvironmentVariable
d10c Jul 16, 2025
98df23a
[DIFF-INFORMED] Java: TempDirLocalInformationDisclosure
d10c Jul 16, 2025
25f913d
[DIFF-INFORMED] Java: TrustBoundaryViolation
d10c Jul 16, 2025
2c76b02
[DIFF-INFORMED] Java: UnsafeCertTrust
d10c Jul 16, 2025
4db421e
[DIFF-INFORMED] Java: AndroidWebViewSettingsAllowsContentAccess
d10c Jul 16, 2025
be4d969
Java: Improve join by preventing ssa use-pair join.
aschackmull Jul 18, 2025
0a76416
Java: Improve join-order by controlling magic and breaking up TCs.
aschackmull Jul 18, 2025
0258108
Update qhelp: SnakeYaml is safe from version 2.0
owen-mc Jul 10, 2025
fb1e707
Update SnakeYaml reference to note that it is outdated
owen-mc Jul 15, 2025
2e2603a
Rust: Factor out `getTypeMentionForTypeParameter`
paldepind Jul 18, 2025
5b60cc1
Rust: Only include paths as type mentions when they're used as such
paldepind Jul 19, 2025
5467117
Rust: Split `PathTypeMention` into an alias and a non-alias subclass
paldepind Jul 19, 2025
e6253f4
Rust: Add `resolveRootType` predicate instead of using `resolveType` …
paldepind Jul 19, 2025
e375e38
Rust: Accept test changes
paldepind Jul 21, 2025
5cf7be6
Revert "Merge pull request #19994 from github/post-release-prep/codeq…
nickrolfe Jul 21, 2025
143ee96
Release preparation for version 2.22.2
invalid-email-address Jul 21, 2025
03819f0
Tweak changenotes
nickrolfe Jul 22, 2025
8633ab1
Revert "Release preparation for version 2.22.2"
nickrolfe Jul 22, 2025
2e41746
Release preparation for version 2.22.2
invalid-email-address Jul 22, 2025
d1d5c50
Tweak changenotes
nickrolfe Jul 22, 2025
bbac88a
Revert "Release preparation for version 2.22.2"
nickrolfe Jul 23, 2025
1caf852
Release preparation for version 2.22.2
invalid-email-address Jul 23, 2025
dc5c05c
Tweak changenotes
nickrolfe Jul 22, 2025
f24680a
Merge pull request #258 from microsoft/fix-call-operator-bug
chanel-y Jul 16, 2025
cd7a7ac
Merge pull request #261 from microsoft/global-flow-through-env-variab…
chanel-y Jul 17, 2025
2eb20e8
Merge pull request #260 from microsoft/powershell-unsafe-deserialization
chanel-y Jul 22, 2025
2691a82
Merge pull request #262 from microsoft/powershell-smb-settings
MathiasVP Jul 23, 2025
3e208fb
Merge pull request #263 from microsoft/remove-env-reads-from-sql-inje…
MathiasVP Jul 24, 2025
ec5723e
Merge pull request #265 from microsoft/dilan/iac-setup
MathiasVP Jul 25, 2025
64961e6
Merge pull request #264 from microsoft/simple-type-sanitizers
MathiasVP Jul 25, 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
35 changes: 0 additions & 35 deletions .github/workflows/go-tests-other-os.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/go-tests-rtjo.yml

This file was deleted.

13 changes: 1 addition & 12 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
name: "Go: Run Tests"
on:
push:
paths:
- "go/**"
- "!go/documentation/**"
- "shared/**"
- .github/workflows/go-tests.yml
- .github/actions/**
- codeql-workspace.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "go/**"
- "!go/documentation/**"
- "!go/documentation/**"
- "shared/**"
- .github/workflows/go-tests.yml
- .github/actions/**
Expand Down
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', 'iac']
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
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 "[email protected]"
- 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 }}

Loading