Compare commits

..

2941 Commits

Author SHA1 Message Date
Arthur Baars
769e3469a4 Merge pull request #15954 from github/release-prep/2.16.5
Release preparation for version 2.16.5
2024-03-18 11:56:14 +01:00
github-actions[bot]
0a6243d07b Release preparation for version 2.16.5 2024-03-18 10:14:07 +00:00
Angela P Wen
ca12348ecb Merge pull request #15880 from github/sitedocs/2.16.4-2
Add changelog for 2.16.4
2024-03-11 14:59:53 -07:00
Pierre
d1f8336be6 Add changelog for 2.16.4 2024-03-11 22:21:25 +01:00
Angela P Wen
31f1f50a64 Merge pull request #15834 from github/post-release-prep/codeql-cli-2.16.4
Post-release preparation for codeql-cli-2.16.4
2024-03-06 18:40:08 -08:00
github-actions[bot]
dc9092c9ec Post-release preparation for codeql-cli-2.16.4 2024-03-06 22:19:33 +00:00
Angela P Wen
2daf50500c Merge pull request #15833 from github/release-prep/2.16.4
Release preparation for version 2.16.4
2024-03-06 13:00:06 -08:00
github-actions[bot]
2f058ffb4d Release preparation for version 2.16.4 2024-03-06 20:56:51 +00:00
Angela P Wen
711c474049 Merge pull request #15832 from github/revert-15814-release-prep/2.16.4
Revert "Release preparation for version 2.16.4"
2024-03-06 12:53:52 -08:00
Angela P Wen
ce31f8641a Revert "Release preparation for version 2.16.4" 2024-03-06 12:07:33 -08:00
Angela P Wen
727a38a409 Merge pull request #15814 from github/release-prep/2.16.4
Release preparation for version 2.16.4
2024-03-05 10:16:21 -08:00
github-actions[bot]
661e68dab5 Release preparation for version 2.16.4 2024-03-05 18:13:58 +00:00
Angela P Wen
7e2a775a2a Merge pull request #15813 from github/revert-15801-release-prep/2.16.4
Revert "Release preparation for version 2.16.4"
2024-03-05 09:20:42 -08:00
Angela P Wen
967963a653 Revert "Release preparation for version 2.16.4" 2024-03-05 08:53:33 -08:00
Michael B. Gale
eaef544a26 Merge pull request #15810 from github/mbg/go/fix-initialised-module-names 2024-03-05 15:34:07 +00:00
Michael B. Gale
40ff75db07 Go: Update list of expected files for single-go-mod-and-go-files-not-under-it test 2024-03-05 14:56:51 +00:00
Michael B. Gale
a8d240dd72 Go: Add integration test for mixed layout project 2024-03-05 14:08:16 +00:00
Michael B. Gale
ac394dc80c Go: Better check for path prefixes 2024-03-05 13:46:33 +00:00
Michael B. Gale
b1e0bc03ab Go: Fix check for whether it is safe to initialise a go.mod file in a given directory 2024-03-05 12:48:21 +00:00
Michael B. Gale
367ecf75d5 Go: Use import path for auto-generated Go module names 2024-03-05 12:48:21 +00:00
Michael B. Gale
2aa093c95c Go: Move getImportPath to shared util package 2024-03-05 12:48:19 +00:00
Angela P Wen
92e91f596f Merge pull request #15801 from github/release-prep/2.16.4
Release preparation for version 2.16.4
2024-03-04 10:57:55 -08:00
github-actions[bot]
a67218a027 Release preparation for version 2.16.4 2024-03-04 17:42:08 +00:00
Angela P Wen
19539ab6d8 Merge pull request #15800 from github/angelapwen/fix-ruby-changenotes
Fix Markdown formatting on Ruby changenotes
2024-03-04 08:52:13 -08:00
Angela P Wen
2b2ea597ce Fix formatting on changenotes 2024-03-04 16:42:38 +00:00
Owen Mansel-Chan
331f308997 Merge pull request #13692 from Marcono1234/patch-1
Mention needed imports at top of "Analyzing data flow in Java"
2024-03-04 15:32:18 +00:00
Owen Mansel-Chan
e124b07611 Merge branch 'main' into patch-1 2024-03-04 14:44:23 +00:00
Owen Mansel-Chan
dcc2b2c50d Merge pull request #15057 from aydinnyunus/main
Web Cache Deception Vulnerability on Go Frameworks
2024-03-04 14:36:39 +00:00
yoff
00e77a3ddb Merge pull request #15720 from RasmusWL/nosql-precision
Python: Add precision to NoSQL query
2024-03-04 14:44:46 +01:00
yoff
569bb991d4 Merge pull request #15775 from RasmusWL/scope-consistency
Python: Add consistency check for `PhaseDependentFlow`
2024-03-04 14:43:13 +01:00
yoff
a9ce2e10ad Merge pull request #15781 from RasmusWL/dict-update
Python: Fix missing DictionaryElementContents
2024-03-04 14:37:34 +01:00
Ian Lynagh
ab288d0d4c Merge pull request #15712 from igfoo/igfoo/k2ref
Kotlin 2: Accept changes in library-tests/reflection
2024-03-04 13:19:56 +00:00
Michael B. Gale
e5de4f2d67 Merge pull request #15789 from github/mbg/go/autobuilder-review-comments 2024-03-04 13:19:29 +00:00
Ian Lynagh
73fe20f33b Merge pull request #15713 from igfoo/igfoo/past
Kotlin 2: Accept some PrintAst changes in library-tests/exprs
2024-03-04 13:12:49 +00:00
Max Schaefer
1f3a3492ae Merge pull request #15792 from github/max-schaefer-patch-1
Java: Fix sink type in hudson.model.yml
2024-03-04 13:08:47 +00:00
Ian Lynagh
9bad1e60db Merge pull request #15765 from igfoo/igfoo/deleg
Kotlin 2: Accept loc changes in library-tests/exprs/delegatedProperties
2024-03-04 13:02:34 +00:00
Michael B. Gale
9b5bf519a1 Update go/extractor/project/project.go
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2024-03-04 12:25:40 +00:00
Owen Mansel-Chan
279605b486 Merge pull request #15786 from owen-mc/java/sensitive-logging-query-exclude-null-in-variable-name
Java: sensitive logging query exclude null in variable name
2024-03-04 12:14:42 +00:00
Michael B. Gale
acf2f761a6 Go: Improve log message for InitGoModForLegacyProject 2024-03-04 12:14:24 +00:00
Michael B. Gale
1a13a0e4c9 Go: Log discovered Go modules in case workspace files can't be read/parsed 2024-03-04 12:14:24 +00:00
Michael B. Gale
52b273ae23 Go: Include workspace count in success message 2024-03-04 12:14:24 +00:00
Michael B. Gale
8055c5d9e3 Go: Avoid extra loop to track unsuccessfulProjects 2024-03-04 12:14:23 +00:00
Michael B. Gale
020eb4aed7 Go: Use slices.Concat for bazelPaths 2024-03-04 12:14:23 +00:00
Michael B. Gale
040a288bb3 Go: Update comment to replace Go.mod with go.mod 2024-03-04 12:14:23 +00:00
Michael B. Gale
37212737fb Go: Delete unused AnyGoFilesOutsideDirs 2024-03-04 12:14:22 +00:00
Michael B. Gale
ac484e5a04 Merge pull request #15793 from github/mbg/go/autobuilder-refactor-changelog
Go: Add changenote for autobuilder refactor
2024-03-04 12:10:24 +00:00
Michael B. Gale
a8ae2e2525 Go: Add changenote for autobuilder refactor 2024-03-04 12:02:51 +00:00
Max Schaefer
52a36ce41c Java: Fix sink type in hudson.model.yml 2024-03-04 11:53:37 +00:00
Michael B. Gale
4dd23d4767 Merge pull request #15791 from github/mbg/go/use-1.22-for-extractor
Go: Use Go 1.22 for the extractor
2024-03-04 11:53:37 +00:00
Michael B. Gale
726e0928ed Merge pull request #15790 from github/mbg/go/allow-1.22
Go: Allow 1.22 as a supported version
2024-03-04 11:49:33 +00:00
Chris Smowton
83cef78200 Merge pull request #15783 from github/smowton/fix/extractor-information-fractional-percentage
Java: extractor information: tolerate fractional percentages
2024-03-04 11:09:42 +00:00
Michael B. Gale
0e9a7c84d1 Go: Update go.work.sum 2024-03-04 10:59:23 +00:00
Michael B. Gale
ff82eb95f5 Go: Use 1.22 in go.mod 2024-03-04 10:58:51 +00:00
Michael B. Gale
6563414370 Go: Allow 1.22 as a supported version 2024-03-04 10:56:03 +00:00
Rasmus Wriedt Larsen
fbf6727809 Python: Add change-note 2024-03-04 11:46:38 +01:00
Rasmus Wriedt Larsen
16cb6c2044 Python: Fix validTest expectations
Co-authored-by: yoff <lerchedahl@gmail.com>
2024-03-04 11:41:47 +01:00
Rasmus Wriedt Larsen
85a45b0155 Python: Fix comment
Co-authored-by: yoff <lerchedahl@gmail.com>
2024-03-04 11:40:17 +01:00
Michael B. Gale
0c93641b54 Merge pull request #15361 from github/mbg/go/legacy-gopath-mode-deprecated
Go: Update autobuilder to deal with the upcoming deprecation of the legacy GOPATH mode
2024-03-04 10:23:37 +00:00
Harry Maclean
ce1d0d2375 Merge pull request #15780 from p-/p--method-injection
Ruby: sinks for code injection via calls to `method`
2024-03-04 10:02:40 +00:00
Owen Mansel-Chan
038afc4008 Merge pull request #15772 from owen-mc/java/model-generator-exclude-tostring
Java: do not generate models for `toString` and lambda flow methods
2024-03-04 07:57:48 +00:00
Owen Mansel-Chan
037c76d840 Update change note
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-03-04 07:49:18 +00:00
Michael Nebel
11142df4d0 Merge pull request #15764 from michaelnebel/csharp/csharptracerrunapp
C#: Don't inject compiler flags when dotnet is used to execute an application.
2024-03-04 08:13:11 +01:00
Owen Mansel-Chan
7a96b11a0a Add change note 2024-03-03 21:41:05 +00:00
Owen Mansel-Chan
19ac9e089a Add test 2024-03-03 21:03:41 +00:00
Owen Mansel-Chan
c7efde3b7a Remove variables with "null" in their name as sources 2024-03-03 20:55:04 +00:00
Michael B. Gale
9c2322dd82 Merge pull request #15362 from github/mbg/go/add-go-work 2024-03-03 11:59:18 +00:00
Owen Mansel-Chan
114c17ad57 Add more methods of java.util.Comparator 2024-03-02 20:55:30 +00:00
Chris Smowton
040395485e Update ExtractorInformation.expected 2024-03-02 10:20:45 +00:00
Owen Mansel-Chan
bf22c6dae0 Merge pull request #15766 from owen-mc/java/add-neutral-models
Java: add neutral models
2024-03-02 06:00:33 +00:00
Chris Smowton
0bb6a64e81 Java: extractor information: tolerate fractional percentages 2024-03-01 16:49:29 +00:00
Owen Mansel-Chan
0a8dfbafe4 Accept suggestion to put models under the right heading
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-03-01 16:05:28 +00:00
Ian Lynagh
fd82a06b93 Merge pull request #15777 from igfoo/igfoo/label-kot
CI: Kotlin: Label Kotlin test changes as "Kotlin"
2024-03-01 15:38:01 +00:00
Peter Stöckli
4adc373dfe Ruby: more test cases for code injection via method 2024-03-01 16:01:07 +01:00
Peter Stöckli
3418ec8a81 Ruby: Update method code injection sinks change note
Co-authored-by: Harry Maclean <hmac@github.com>
2024-03-01 15:54:58 +01:00
Michael B. Gale
bda8a804ec Go: Add go.work file 2024-03-01 14:50:00 +00:00
Rasmus Wriedt Larsen
d99a763ef7 Python: add change-note 2024-03-01 15:24:33 +01:00
Owen Mansel-Chan
5399d88d15 Accept test change: slight change in gen vs man modelgen stats 2024-03-01 14:22:00 +00:00
Rasmus Wriedt Larsen
eeda4355f1 Python: Fix missing DictionaryElementContent 2024-03-01 15:21:13 +01:00
Peter Stöckli
e43c368222 Ruby: change note for methode code injection sinks 2024-03-01 15:20:32 +01:00
Rasmus Wriedt Larsen
30b7fadbb8 Python: Add test 2024-03-01 15:19:56 +01:00
Owen Mansel-Chan
6e63df9e32 Accept test change: toString method no longer generated 2024-03-01 14:16:14 +00:00
Owen Mansel-Chan
0e1c45e84b Accept test change: some more APIs have manual models now 2024-03-01 14:08:42 +00:00
Owen Mansel-Chan
df64e0bc5f Add neutral summary models for java.security.MessageDigest#digest 2024-03-01 14:08:31 +00:00
Owen Mansel-Chan
f89fedcbaf Add some neutral models for java.util 2024-03-01 14:07:45 +00:00
Peter Stöckli
a693c6d9b4 Ruby: sinks for code injection via calls to method 2024-03-01 14:42:22 +01:00
Michael Nebel
a97510a2fc Merge pull request #15419 from github/egregius313/csharp/dataflow/threat-modeling/refactor-to-threatmodelflowsource
C#: Refactor C# queries to use `ThreatModelFlowSource` instead of `RemoteFlowSource`
2024-03-01 14:40:40 +01:00
Tom Hvitved
15d1105d8d Merge pull request #15779 from hvitved/csharp/build-mode-none
C#: Add `build_modes: none` to `codeql-extractor.yml`
2024-03-01 14:34:08 +01:00
Mathias Vorreiter Pedersen
9133a13fc7 Merge pull request #15628 from microsoft/cpp-non-constant-format-as-path-query
Cpp non constant format as path query
2024-03-01 13:05:44 +00:00
Tom Hvitved
6d9f3d4a3e C#: Add build_modes: none to codeql-extractor.yml 2024-03-01 13:54:57 +01:00
Owen Mansel-Chan
10f6329b3e Add manual neutral models for java.util.stream
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll

   * Note: the following top JDK APIs are not modeled with MaD:
   * `java.util.stream.Collectors#joining(CharSequence)`: cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well
   * `java.util.stream.Collectors#toMap(Function,Function)`: specialized collectors flow
   * `java.util.stream.Stream#collect(Collector)`: handled separately on a case-by-case basis as it is too complex for MaD
2024-03-01 12:32:04 +00:00
Owen Mansel-Chan
f907fd21ad Add manual neutral models for java.text.Format and java.text.MessageFormat
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll

   * Note: the following top JDK APIs are not modeled with MaD:
   * `java.text.Format#format(Object)`: similar issue as `Object.toString`; depends on the object being passed as the argument
   * `java.text.MessageFormat#format(String,Object[])`: similar issue as `Object.toString`; depends on the object being passed as the argument
2024-03-01 12:31:59 +00:00
Owen Mansel-Chan
0e95f41900 Add manual neutral models for java.lang
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll

   * Note: the following top JDK APIs are not modeled with MaD:
   * `java.lang.System#getProperty(String)`: needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
   * `java.lang.System#setProperty(String,String)`: needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
2024-03-01 12:31:49 +00:00
Michael Nebel
ac4ad0cbc0 C#: Add test where build should not be interpreted as a SDK sub command. 2024-03-01 13:24:04 +01:00
Michael Nebel
24572848f3 C#: Move helper function to other repo to allow sharing. 2024-03-01 13:24:04 +01:00
Michael Nebel
07fc84de8c C#: Don't inject compiler flags when dotnet is used to execute an application. 2024-03-01 13:24:04 +01:00
Tom Hvitved
cb128da5aa Merge pull request #15762 from hvitved/csharp/fetch-dotnet-dependency-fetching
C#: Fetch .NET in dependency manager instead of autobuilder
2024-03-01 13:19:20 +01:00
Owen Mansel-Chan
bb97df1d71 do not generate models for lambda flow methods 2024-03-01 12:11:40 +00:00
Tom Hvitved
20ff7def73 Address review comment 2024-03-01 12:54:47 +01:00
Ian Lynagh
86b4f27d12 CI: Kotlin: Label Kotlin test changes as "Kotlin" 2024-03-01 11:26:56 +00:00
Mathias Vorreiter Pedersen
a7547d516a Merge branch 'main' into cpp-non-constant-format-as-path-query 2024-03-01 11:08:58 +00:00
Florin Coada
1719fd8acb Merge pull request #15769 from github/coadaflorin/changelog-2.16.3-updates
Match changelog updates with public unified changelog
2024-03-01 10:57:02 +00:00
Joe Farebrother
0f1106b2f6 Merge pull request #15753 from joefarebrother/ruby-i18n-translation
Ruby: Model Rails translation methods
2024-03-01 10:35:12 +00:00
Owen Mansel-Chan
bbf3fa7506 do not generate models for toString 2024-03-01 09:59:27 +00:00
Joe Farebrother
abdae2c437 Apply reveiw suggestion - update change note
Co-authored-by: Harry Maclean <hmac@github.com>
2024-03-01 09:57:28 +00:00
Joe Farebrother
bf2174ffce Add change note 2024-03-01 09:57:28 +00:00
Joe Farebrother
0b7b7ea1b8 Add test cases and improve controller model 2024-03-01 09:57:24 +00:00
Joe Farebrother
ef0a1d2873 Implement models for translation methods 2024-03-01 09:52:53 +00:00
Tony Torralba
e0515269c5 Merge pull request #15774 from atorralba/atorralba/java/mapentry-copyof-provenance
Java: Fix provenance of Map.Entry.copyOf models
2024-03-01 10:26:22 +01:00
Mathias Vorreiter Pedersen
4e913592fa Merge branch 'main' into cpp-non-constant-format-as-path-query 2024-03-01 09:26:00 +00:00
Mathias Vorreiter Pedersen
2eb8d13439 C++: Accept test changes. 2024-03-01 09:25:25 +00:00
Florin Coada
a8816a6d1c Update java/ql/src/change-notes/released/0.8.9.md
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-03-01 09:18:22 +00:00
Florin Coada
d54e3d73ab Update java/ql/src/CHANGELOG.md
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-03-01 09:18:14 +00:00
Rasmus Wriedt Larsen
d182eae868 Python: Add consistency check for PhaseDependentFlow
This would have found the problem in
https://github.com/github/codeql/pull/15755.

As highlighted in the comment in the code, it's not a perfect solution
since we don't have an automatic way to ensure we don't introduce a new
PhaseDependentFlow use with a new step relation and forget to add it to
this consistency check... but I think this consistency check still adds
value!
2024-03-01 10:01:08 +01:00
Tony Torralba
664dac6b28 Merge pull request #15773 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-03-01 09:22:47 +01:00
Tony Torralba
dd1dbdf4ec Java: Fix provenance of Map.Entry.copyOf models 2024-03-01 09:00:13 +01:00
github-actions[bot]
148bc26b09 Add changed framework coverage reports 2024-03-01 00:17:57 +00:00
Owen Mansel-Chan
54031a8187 Merge pull request #15767 from owen-mc/java/add-summary-models
Java: add a few summary models
2024-02-29 21:21:23 +00:00
Tom Hvitved
a8468a6178 C#: Better handle multiple global.json files 2024-02-29 20:27:52 +01:00
Mathias Vorreiter Pedersen
1466f11a92 C++: Add change note. 2024-02-29 18:39:59 +00:00
Paolo Tranquilli
6d90877c52 Merge pull request #15536 from github/redsun82/bazel-cmake
Bazel/CMake: auto detect all `cc_binary`/`cc_test` targets
2024-02-29 18:13:40 +01:00
Ed Minnix
f488f23a48 Add LocalFlowSource back to UncontrolledFormatString 2024-02-29 12:06:59 -05:00
Edward Minnix III
89bdb7f437 Remove discussion of local flow in change note
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-02-29 12:03:19 -05:00
Ed Minnix
86ceeebd89 Change handling of LocalSource in queries
1. Change `LocalSource` to extend `DataFlow::Node`, thus removed from
   the definiton of `Source`
2. Add a private class `AddLocalSource` which extends `Source`. This
   allows us to currently preserve the inclusion of local sources, while
   making it easier to remove it in the future.
2024-02-29 12:03:17 -05:00
Ed Minnix
3563c7ef03 Modify deprecated RemoteSource classes to extend DataFlow::Node directly.
Since `ThreatModelFlowSource` contains `RemoteFlowSource` by default, we
can safely remove the `RemoteSource` from the default of the queries.
2024-02-29 12:03:16 -05:00
Ed Minnix
e64826db1b Add threat-model configuration for UncontrolledFormatString test 2024-02-29 12:03:14 -05:00
Ed Minnix
af749e221b Remove commented out code 2024-02-29 12:03:13 -05:00
Ed Minnix
f237d2aeda Refactor to use ThreatModelFlowSource 2024-02-29 12:03:12 -05:00
Ed Minnix
5198f52351 Add references to changed queries in change note 2024-02-29 12:03:11 -05:00
Ed Minnix
22e8da2928 Update change note date 2024-02-29 12:03:09 -05:00
Ed Minnix
eb81946adc Change note changes to mention local sources as well 2024-02-29 12:03:08 -05:00
Ed Minnix
b4dabee770 Remove unnecessary flowsources.Remote imports
Since `FlowSources` now re-exports `Remote`, these can be safely removed.
2024-02-29 12:03:07 -05:00
Ed Minnix
434fa20646 Refactor to using ThreatModelFlowSource 2024-02-29 12:03:05 -05:00
Ed Minnix
1086abca63 Refactor to using ThreatModelFlowSource 2024-02-29 12:03:04 -05:00
Ed Minnix
b76795fd28 Refactor to using ThreatModelFlowSource 2024-02-29 12:03:03 -05:00
Ed Minnix
fd3738b10e Refactor to using SourceNode::getSourceType 2024-02-29 12:03:01 -05:00
Ed Minnix
31d4d0ca57 Move getSourceType to SourceNode 2024-02-29 12:03:00 -05:00
Ed Minnix
75772664f2 Change note 2024-02-29 12:02:58 -05:00
Ed Minnix
f388a0f10c Deprecate direct uses of RemoteFlowSource and replace with ThreatModelFlowSource 2024-02-29 12:02:57 -05:00
Ed Minnix
bd0137a721 Deprecated direct use of RemoteFlowSource and use ThreatModelFlowSource instead 2024-02-29 12:02:55 -05:00
Chris Smowton
051d63a5a9 Merge pull request #15740 from smowton/smowton/feature/call-and-type-telemetry
Java: add extraction quality telemetry; improve stringification of some erroneous expressions
2024-02-29 16:51:51 +00:00
Tony Torralba
47bf556223 Merge pull request #15709 from atorralba/atorralba/java/enable-widget-taint-steps
Java: Re-enable Widget.qll flow steps
2024-02-29 17:33:05 +01:00
Owen Mansel-Chan
7b5f51b1e2 Change summary models to neutral models for javax.crypto.Cipher 2024-02-29 16:22:27 +00:00
Chris Smowton
ef9544cbef Adjust test expectations now signature type-accesses are named 2024-02-29 15:33:29 +00:00
Chris Smowton
903e4f59f0 Exclude error types from contradictory-type-check query 2024-02-29 14:59:46 +00:00
Chris Smowton
140c3189e3 Adjust test expectations 2024-02-29 14:59:46 +00:00
Chris Smowton
3bd0c3b2c2 Switch test to using a qlref to the real telemetry query 2024-02-29 14:59:46 +00:00
Chris Smowton
ef82ea7541 Add change note 2024-02-29 14:59:46 +00:00
Chris Smowton
551006c15e Make predicate private 2024-02-29 14:59:46 +00:00
Chris Smowton
ffa998eb4a Autoformat 2024-02-29 14:59:45 +00:00
Chris Smowton
b6507e795a Add test for a buildless project that doesn't compile cleanly 2024-02-29 14:59:45 +00:00
Chris Smowton
5d55265910 Add telemetry for untyped expressions and missing call targets 2024-02-29 14:59:45 +00:00
Chris Smowton
1fd459e8fc Improve stringification of some erroneous expressions 2024-02-29 14:59:45 +00:00
Alexander Eyers-Taylor
6c8105fd1c Merge pull request #15568 from github/alexet/kotlin-jdk-change
Kotlin: Compile tests using the same jdk as the java tests.
2024-02-29 14:48:03 +00:00
Paolo Tranquilli
0a137c7b02 Bazel/Cmake: share build options 2024-02-29 15:35:21 +01:00
Florin Coada
8d1965db59 match changelog to unified changelog 2024-02-29 14:33:14 +00:00
Florin Coada
cfdf163b40 Update changelog to match unified changelog 2024-02-29 14:32:57 +00:00
Paolo Tranquilli
81facd2fd6 Merge branch 'main' into redsun82/bazel-cmake 2024-02-29 14:28:00 +01:00
Mathias Vorreiter Pedersen
e620bfa9c6 Merge pull request #15761 from MathiasVP/fewer-variablenodes
C++: Restrict `VariableNode`s to only be global-like variables
2024-02-29 13:12:20 +00:00
Alex Eyers-Taylor
d892a04506 Kotlin: Compile tests using the same jdk as the java tests. 2024-02-29 12:23:56 +00:00
Owen Mansel-Chan
939d6f973f Add summary models for javax.crypto.Cipher 2024-02-29 12:20:47 +00:00
Owen Mansel-Chan
65bc62c10a Add summary model for Map$Entry#copyOf 2024-02-29 12:20:43 +00:00
Ian Lynagh
b0a13fb661 Kotlin 2: Accept loc changes in library-tests/exprs/delegatedProperties 2024-02-29 12:11:07 +00:00
Mathias Vorreiter Pedersen
4474b54662 C++: Add more QLDoc. 2024-02-29 12:09:50 +00:00
Mathias Vorreiter Pedersen
46b47db78e C++: Rename IPA branch. 2024-02-29 12:02:13 +00:00
yoff
7beafc933d Merge pull request #15755 from RasmusWL/it-fix
Python: Fix module level flow for iterable unpacking
2024-02-29 12:52:44 +01:00
Tom Hvitved
0e93f5ac1a Merge pull request #15733 from hvitved/ruby/desugar-hidden
Ruby: Rework hidden synthetic data-flow nodes
2024-02-29 11:24:01 +01:00
Tom Hvitved
62382fc5a2 C#: Fetch .NET in dependency manager instead of autobuilder 2024-02-29 11:23:36 +01:00
Florin Coada
840ca9118e Merge pull request #15750 from github/changedocs/2.16.3
Codeql 2.16.3 changelogs
2024-02-29 09:46:31 +00:00
Michael Nebel
a3b39c8210 Merge pull request #15752 from michaelnebel/csharp/updatesupportedlanguages
C#: Claim suppport for C# 12 / .NET 8.
2024-02-29 10:41:42 +01:00
Michael Nebel
14d046ef18 Merge pull request #15710 from michaelnebel/csharp/refreadonlyparameters
C# 12: Ref readonly parameters.
2024-02-29 09:59:12 +01:00
Tom Hvitved
c6426d8858 C#: Move BuildScript.cs and friends to Semmle.Util 2024-02-29 08:49:20 +01:00
Florin Coada
0d017a9343 Update docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-02-28 22:07:04 +00:00
Florin Coada
62f4d8e53e Update docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-02-28 22:06:46 +00:00
Florin Coada
b1deeaff05 Update docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-02-28 22:06:29 +00:00
Mathias Vorreiter Pedersen
a7f0966fcb C++: Restrict 'VariableNode's to only be global-like variables (which is the only place where use them for). 2024-02-28 19:12:38 +00:00
Felicity Chapman
ca1a27dc75 Merge pull request #15748 from github/13332-codeql-model-editor-csharp
Minor updates to CodeQL for VS Code docs for expansion of support for model editing
2024-02-28 15:56:32 +00:00
Rasmus Wriedt Larsen
8079788a5f Python: Add change-note 2024-02-28 16:44:25 +01:00
Rasmus Wriedt Larsen
cdf4dd16f0 Python: Fix module level flow for iterable unpacking
(and for * patterns in match)

Since `PhaseDependentFlow` uses the following predicate, that relies on
.getScope() to be present for there to be any importTimeFlow (flow at
toplevel scope), it's important that data-flow nodes implement `.getScope`.

```
private predicate isTopLevel(Node node) { node.getScope() instanceof Module }
```

By implementing getScope, we can now rely on default implementation of
`getEnclosingCallable` in DataFlow::Node:

```
  /** Gets the enclosing callable of this node. */
  DataFlowCallable getEnclosingCallable() { result = getCallableScope(this.getScope()) }
```
2024-02-28 16:39:08 +01:00
Felicity Chapman
377ef59c3a Merge branch 'main' into 13332-codeql-model-editor-csharp 2024-02-28 15:33:27 +00:00
Felicity Chapman
efff0149d0 Update formatting of 'tip' 2024-02-28 15:33:07 +00:00
Koen Vlaswinkel
ab11068d6d Merge pull request #15749 from github/koesie10/update-testing-vscode-docs
Update documentation for testing CodeQL queries in VS Code
2024-02-28 16:29:54 +01:00
Rasmus Wriedt Larsen
e4699e092d Python: Add test for iterable unpacking on module level
Currently doesn't work :O
2024-02-28 16:10:29 +01:00
Koen Vlaswinkel
6aeef17f99 Rename Test Explorer to Testing view 2024-02-28 16:00:15 +01:00
Tom Hvitved
297a17975d Merge pull request #15665 from hvitved/csharp/variable-capture
C#: Adopt shared variable capture library
2024-02-28 15:13:03 +01:00
Michael Nebel
9563705eb3 C#: Add change note. 2024-02-28 14:53:15 +01:00
Michael Nebel
bb282b94dd C#: Claim suppport for C# 12 / .NET 8. 2024-02-28 14:41:38 +01:00
Michael Nebel
f6b1d1f235 C#: Add upgrade and downgrade scripts. 2024-02-28 14:09:59 +01:00
Florin Coada
b76449714a codeql 2.16.3 changelogs 2024-02-28 13:07:48 +00:00
Koen Vlaswinkel
5226c77abf Update documentation for testing CodeQL queries in VS Code 2024-02-28 13:47:11 +01:00
Michael Nebel
00d311205b C#: Update expected test output. 2024-02-28 13:44:28 +01:00
Michael Nebel
794bc44a41 C#: Add test query predicate for ref readonly parameters. 2024-02-28 13:44:28 +01:00
Michael Nebel
692d7036a0 C#: Add extractor and QL library support for ref readonly parameters. 2024-02-28 13:44:28 +01:00
Michael Nebel
a86de9de2f C#: Update comment in DB Scheme. 2024-02-28 13:44:28 +01:00
Michael Nebel
18c7e73805 C#: Add test for parameter modifiers. 2024-02-28 13:44:28 +01:00
Michael Nebel
d8bff14365 C#: Adjust locations for the parameter default value tests. 2024-02-28 13:44:28 +01:00
Michael Nebel
4bbaf687ad Merge pull request #15723 from michaelnebel/csharp/experimentalattribute
C# 12: Experimental attribute.
2024-02-28 13:06:09 +01:00
Jeroen Ketema
ae97a23c27 Merge pull request #15213 from jketema/frontend-update
C++: Accept test changes after frontend upgrade
2024-02-28 13:00:02 +01:00
Felicity Chapman
c247dee11a Delete docs/codeql/reusables/beta-note-model-packs-java.rst
This was accidentally reintroduced during merge conflict resolution.
2024-02-28 11:49:50 +00:00
Felicity Chapman
053e172d94 Merge branch 'main' into 13332-codeql-model-editor-csharp 2024-02-28 11:43:02 +00:00
Felicity Chapman
897786dc99 Minor updates to model editor article 2024-02-28 11:28:59 +00:00
Michael Nebel
65ec80967e Merge pull request #15696 from michaelnebel/csharp/compilergeneratedstmt
C#: Compiler generated statements.
2024-02-28 12:06:39 +01:00
Jeroen Ketema
00ad7854dc C++: Accept test changes after frontend upgrade
* The `specifiers2` tests have a different result now due to the implementation
  of CWG 2387.
* The `special_members/generated_copy` has improved results as the frontend has
  improved support for deleted copy constructors.
2024-02-28 11:29:57 +01:00
Michael Nebel
3c15b21385 C#: Add change note. 2024-02-28 11:25:23 +01:00
Michael Nebel
7535a15fda C#: Add tests and update expected test output. 2024-02-28 11:22:12 +01:00
Michael Nebel
95dc2f71d3 C#: Add ExperimentalAttribute class. 2024-02-28 11:20:43 +01:00
Mathias Vorreiter Pedersen
7be76405f5 Merge pull request #15741 from MathiasVP/fix-ir-inconsistencies-from-returning-routine-types
C++: Fix IR inconsistencies from routine types
2024-02-28 09:13:53 +00:00
Erik Krogh Kristensen
0358e81117 Merge pull request #15746 from github/dependabot/cargo/ql/rayon-1.9.0
Bump rayon from 1.8.1 to 1.9.0 in /ql
2024-02-28 10:11:50 +01:00
dependabot[bot]
cc178ab58f Bump rayon from 1.8.1 to 1.9.0 in /ql
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.9.0.
- [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.1...rayon-core-v1.9.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 03:24:58 +00:00
Edward Minnix III
a743683d4f Merge pull request #15563 from egregius313/egregius313/csharp/docs/mad-docs
C#: Models as Data Documentation
2024-02-27 13:45:09 -05:00
Mathias Vorreiter Pedersen
b8c141f292 C++: Accept test changes. 2024-02-27 17:58:52 +00:00
Mathias Vorreiter Pedersen
ddd5113c02 C++: Ensure that we can construct an 'IRType' from a 'RoutineType'. 2024-02-27 17:58:52 +00:00
Mathias Vorreiter Pedersen
892f97cd7a C++: Add testcase with invalid IR from constructing a 'RoutineType'. 2024-02-27 17:58:52 +00:00
Mathias Vorreiter Pedersen
0335a4f4ce Merge pull request #15735 from MathiasVP/ir-for-vacuous-destructor-calls
C++: IR construction for `VacuousDestructorCall`s
2024-02-27 17:58:30 +00:00
Felicity Chapman
f9c2b4d23c MVP changes for C# library expansion support 2024-02-27 16:47:13 +00:00
Chris Smowton
7c7c10ea11 Merge pull request #15739 from github/smowton-patch-1
Add change note for https://github.com/github/codeql/pull/15646
2024-02-27 16:07:29 +00:00
Max Schaefer
f2935caa5c Merge pull request #15732 from github/max-schaefer/more-sink-types
Automodel: Add four more sink types.
2024-02-27 15:52:45 +00:00
Mathias Vorreiter Pedersen
bba152da13 Merge branch 'main' into ir-for-vacuous-destructor-calls 2024-02-27 15:42:46 +00:00
Chris Smowton
9f84653283 Merge pull request #15613 from smowton/smowton/fix/golang-map-range-read-dataflow
Golang: fix flow from a map value via a range statement
2024-02-27 15:42:43 +00:00
Chris Smowton
aedd3badf7 Add change note for https://github.com/github/codeql/pull/15646 2024-02-27 15:41:43 +00:00
Chris Smowton
5ea30e95a5 Merge pull request #15646 from smowton/smowton/fix/notice-self-sufficient-mvnw
Java: Add tests for Maven wrapper
2024-02-27 15:29:50 +00:00
Mathias Vorreiter Pedersen
f7b2de800b Merge pull request #15506 from rdmarsh2/rdmarsh2/cpp/ir-synthetic-destructors
C++: Add implicit destructors for named variables to the IR
2024-02-27 15:12:46 +00:00
Tom Hvitved
914a605a87 Ruby: Rework hidden synthetic data-flow nodes 2024-02-27 15:33:58 +01:00
Tom Hvitved
994d990f37 Ruby: Add another data flow test 2024-02-27 15:33:58 +01:00
Mathias Vorreiter Pedersen
dc3b78dd7c C++: Accept more test changes. 2024-02-27 14:30:19 +00:00
Chris Smowton
a6480a4ca1 Autoformat again / tabify 2024-02-27 13:55:26 +00:00
Mathias Vorreiter Pedersen
4a501e5b3c C++: Accept test changes. 2024-02-27 13:53:43 +00:00
Mathias Vorreiter Pedersen
9eaa4e19ad C++: Add IR construction for vacuous destructor calls. 2024-02-27 13:53:42 +00:00
Chris Smowton
74448c092a Autoformat / uglify 2024-02-27 13:49:12 +00:00
Chris Smowton
e62a0805db Add test for map literal 2024-02-27 13:44:52 +00:00
Mathias Vorreiter Pedersen
fbb0ffcadd C++: Add testcase with invalid IR from vacuous destructor call. 2024-02-27 12:53:46 +00:00
Joe Farebrother
3ab6f222d0 Merge pull request #15718 from joefarebrother/ruby-arel-sqlliteral
Ruby: Model Arel::Nodes::SqlLiteral.new
2024-02-27 12:43:47 +00:00
Anders Schack-Mulligen
df5e753ee0 Merge pull request #15570 from aschackmull/java/cache-interpretelement
Java: Cache interpretElement.
2024-02-27 13:39:56 +01:00
Geoffrey White
540c20e143 Merge pull request #15700 from geoffw0/extensions
Swift: Workaround for TypeDecl.getFullName issue.
2024-02-27 11:14:33 +00:00
Anders Schack-Mulligen
699dddcfbe Merge pull request #15725 from aschackmull/dataflow/summary-join-fix
Dataflow: Prevent bad join in FlowSummaryImpl::Private::Steps::summaryLocalStep.
2024-02-27 10:32:38 +01:00
Tom Hvitved
bbeee8f38d Merge pull request #15717 from hvitved/csharp/view-cfg
Shared `View CFG` implementation
2024-02-27 09:13:18 +01:00
Chris Smowton
f7cdcd4981 Force Maven wrapper tests to run sequentially 2024-02-26 22:28:55 +00:00
Chris Smowton
03f01a0121 Add tests for Maven wrapper 2024-02-26 22:28:55 +00:00
Robert Marsh
a513598a4d C++: Change note for IR named destructors. 2024-02-26 19:41:56 +00:00
Geoffrey White
408a550467 Merge pull request #15727 from geoffw0/qldoc4
C++: Mark internal files in the old dataflow library as deprecated
2024-02-26 17:45:05 +00:00
Geoffrey White
2e66392353 C++: Update deprecated note to respect identical files. 2024-02-26 16:38:27 +00:00
Joe Farebrother
cb733dcf85 Simplify model defenition 2024-02-26 14:59:03 +00:00
Cornelius Riemenschneider
4bb725cbf5 Merge pull request #15656 from github/criemen/ruby-bazel
Ruby: Start building the language pack using bazel.
2024-02-26 15:52:28 +01:00
Cornelius Riemenschneider
234623ec0d Merge pull request #15726 from github/criemen/js
JS: Remove empty build target.
2024-02-26 15:50:31 +01:00
Geoffrey White
5c4543f167 C++: Mark internal files in the old dataflow library as deprecated (the public imports already are). 2024-02-26 14:49:10 +00:00
Cornelius Riemenschneider
e9b5394cd5 JS: Remove empty build target.
The `resources` folder never existed, this was probably introduced
as a copy-paste mistake. Remove the rule.
2024-02-26 15:26:44 +01:00
Harry Maclean
6ff0054e52 Merge pull request #13431 from am0o0/amammad-ruby-YAMLunsafeLoad
Ruby: add seperate additional steps between `YAML.parse*` methods and `to_ruby`
2024-02-26 13:40:48 +00:00
Tom Hvitved
f92c106972 Merge pull request #15724 from hvitved/csharp-change-note
C#: Add change note
2024-02-26 14:35:38 +01:00
Harry Maclean
8212f5de1b Ruby: Update test 2024-02-26 13:10:27 +00:00
Harry Maclean
b86643fab2 Ruby: doc fixes 2024-02-26 12:57:21 +00:00
Michael Nebel
cba247788a C#: Add change note. 2024-02-26 13:51:07 +01:00
Michael Nebel
f9934ed5e7 C#: Add downgrade script. 2024-02-26 13:51:07 +01:00
Michael Nebel
4dd368f7a6 C#: Add upgrade script. 2024-02-26 13:51:07 +01:00
Michael Nebel
80513d846d C#: Update PrintAst test expected outputs. 2024-02-26 13:51:07 +01:00
Michael Nebel
ff32cf90fd C#: Add a test for compiler generated statements. 2024-02-26 13:51:06 +01:00
Michael Nebel
e6f4263eff C#: Do not print compiler generated statements. 2024-02-26 13:51:06 +01:00
Michael Nebel
bf4e3a7d1c C#: Merge expr_compiler_generated and compiler_generated and add compiler generated statements. 2024-02-26 13:51:06 +01:00
Tom Hvitved
dd0c721e8c C#: Add change note 2024-02-26 13:48:19 +01:00
Anders Schack-Mulligen
20bb631456 Dataflow: Prevent bad join. 2024-02-26 13:45:19 +01:00
Tom Hvitved
606a8fed0c Merge pull request #15406 from hvitved/csharp/no-stats-experiment
C#: Remove all DB stats
2024-02-26 13:40:37 +01:00
Harry Maclean
8a670fe9a2 Ruby: formatting 2024-02-26 12:26:04 +00:00
Michael Nebel
e5e0b4c537 C#: Add some examples of uses of the Experimental attribute and update the expected test output. 2024-02-26 13:15:55 +01:00
Michael Nebel
bc98712da5 C#: Add one more using statement to the attributes test file. 2024-02-26 13:14:03 +01:00
amammad
32f5667bb6 revert YAML.qll and yaml sinks to previous PR, make a separate experimental query only for yaml 2024-02-26 12:12:03 +00:00
amammad
c582ea626d update expected test file 2024-02-26 12:10:04 +00:00
amammad
1c1a6f13df fix QLDoc style 2024-02-26 12:05:35 +00:00
amammad
9c5c8c8362 fix test file 2024-02-26 12:05:35 +00:00
amammad
464e2e4291 fix qldoc and test files 2024-02-26 12:04:52 +00:00
amammad
18fa91bde4 add transform method that is an alias for to_ruby 2024-02-26 11:59:41 +00:00
amammad
a75a004942 add more additional steps, change parse* sinks to reciever of them 2024-02-26 11:59:41 +00:00
amammad
474a4f8abd thanks @asgerf for informing me that Successor wants to be deprecated and thank him that providing the solution 2024-02-26 11:59:41 +00:00
amammad
1410574f76 make seperate steps for YAML.parse* and use getAsuccessor*() to reach final to_ruby method call, All parts have Rewritten with API graphs exclusively 2024-02-26 11:59:35 +00:00
Cornelius Riemenschneider
1657b314c1 Re-pin ruby extractor deps. 2024-02-26 11:21:23 +00:00
Cornelius Riemenschneider
688b9955a0 Address review, start accomodating bzlmod. 2024-02-26 11:21:23 +00:00
Cornelius Riemenschneider
b82ffd40e7 Fix windows CI build.
As we're now checking out the `codeql` repo in a sub-path,
we need to enable long paths on Windows.
2024-02-26 11:21:23 +00:00
Cornelius Riemenschneider
fd85c44129 Ruby: Start building the language pack using bazel.
This PR introduces a bazel and `rules_rust`-based build system
for the ruby extractor and language pack.
This replacese the existing, `cargo` and `cross`-based build system.

For local development, nothing changes, and the existing `cargo`-based
build still keeps working as-is.

We no longer need to use `cross` to compile our Linux binaries,
as we now can link against our hermetic C++ toolchain, which ships
with an old enough glibc, so that we don't run into symbol version issues
when deploying the binaries to older systems.
Besides the one change in dependency (explained in detail in `Cargo.toml`
and in https://github.com/github/codeql/pull/15595), nothing ought to
change in how we build the extractor.
2024-02-26 11:21:22 +00:00
Joe Farebrother
386defc3c7 Update test output 2024-02-26 11:21:03 +00:00
Anders Schack-Mulligen
c22cbf5b01 Merge pull request #15721 from aschackmull/workflows/format-check-shared
Workflows: Run format check on shared.
2024-02-26 12:12:29 +01:00
Joe Farebrother
fb06e9f6b2 Merge pull request #15719 from joefarebrother/ruby-changenote-formatting
Ruby: Fix change note formatting
2024-02-26 11:12:01 +00:00
Jeroen Ketema
acf3a99dff Merge pull request #15716 from jketema/command-line-options
C++: Update test after extractor changes
2024-02-26 12:01:03 +01:00
Rasmus Wriedt Larsen
4ede553b21 Merge pull request #15365 from RasmusWL/lgtm_index_filter_handling
Tree sitter extractor: Proper handling of `LGTM_INDEX_FILTERS`
2024-02-26 11:59:45 +01:00
Tom Hvitved
5f5bcf686d Update csharp/ql/lib/semmle/code/csharp/AnnotatedType.qll
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-02-26 11:35:28 +01:00
Anders Schack-Mulligen
dab8e237e6 Workflows: Run format check on shared. 2024-02-26 11:33:00 +01:00
Tom Hvitved
5b1fb8789a C#: Implement View CFG query 2024-02-26 11:23:49 +01:00
Tom Hvitved
5b6e76c030 Move View CFG implementation from Ruby/Swift into shared library 2024-02-26 11:23:49 +01:00
Rasmus Wriedt Larsen
1cfac50749 Python: Add precision to NoSQL query
Due to this, it was not part of any query suite :O
2024-02-26 11:23:43 +01:00
Joe Farebrother
403a1ac483 Fix change note formatting 2024-02-26 10:21:26 +00:00
Joe Farebrother
2257df5c6f Model Arel::Nodes::SqlLiteral.new 2024-02-26 10:09:33 +00:00
Tom Hvitved
8fbe62ccae Swift: Implement getExtension and getStem 2024-02-26 10:33:57 +01:00
Jeroen Ketema
788100d475 C++: Update test after extractor changes 2024-02-26 10:04:42 +01:00
Tom Hvitved
03a125de38 Merge pull request #15562 from Marcono1234/patch-2
Ruby: Fix formatting in changelog
2024-02-26 10:03:29 +01:00
Tom Hvitved
4bd79c0eb3 Add change note 2024-02-26 09:58:23 +01:00
Rasmus Wriedt Larsen
07223031e8 Merge branch 'main' into lgtm_index_filter_handling 2024-02-26 09:56:02 +01:00
Tom Hvitved
acd52192d1 C#: Adopt shared variable capture library 2024-02-26 09:53:30 +01:00
Tom Hvitved
7197c64e2d C#: Add more variable capture tests 2024-02-26 09:53:29 +01:00
Tom Hvitved
2683e40038 Merge pull request #15708 from hvitved/share-ide-contextual
Share `getFileBySourceArchiveName` implementation
2024-02-23 19:56:33 +01:00
Chris Smowton
12213a0a08 Add test 2024-02-23 18:39:16 +00:00
Ian Lynagh
bfea40fca0 Kotlin 2: Accept some PrintAst changes in library-tests/exprs 2024-02-23 18:39:06 +00:00
Chris Smowton
d57160db5c Direct map stores via a post-update node 2024-02-23 16:37:26 +00:00
Robert Marsh
da5e3d64ac C++: autoformat 2024-02-23 16:20:42 +00:00
Robert Marsh
dd97584eff C++: fix for duplicated parent of ReturnVoid statements 2024-02-23 16:19:34 +00:00
Ian Lynagh
1abd81ec34 Kotlin 2: Accept loc changes in library-tests/reflection 2024-02-23 13:52:05 +00:00
Ian Lynagh
f43e929d1a Kotlin: More generated elements in Kotlin 2 in library-tests/reflection 2024-02-23 13:45:58 +00:00
Paolo Tranquilli
6b63492d6b Merge pull request #15699 from github/criemen/bazel7-2
Upgrade to bazel 7.0.2.
2024-02-23 14:15:00 +01:00
Tamás Vajk
72f73553ca Merge pull request #15692 from tamasvajk/buildless/no-dotnet-sdk
C#: Download latest dotnet SDK when missing
2024-02-23 13:24:46 +01:00
Tony Torralba
759b74791c Java: Re-enable Widget.qll flow steps
The library Widget.qll was accidentally removed from the global context when its sources were migrated to models-as-data in #13136. This re-adds it so that its flow steps are enabled again.
2024-02-23 13:07:35 +01:00
Ian Lynagh
047a8b400e Merge pull request #15703 from igfoo/igfoo/k2mf
Kotlin: Accept changes in library-tests/multiple_files
2024-02-23 11:49:05 +00:00
Ian Lynagh
ee967e62e1 Merge pull request #15704 from igfoo/igfoo/k2ministdlib
Kotlin: Remove the Kotlin 2 ministdlib test
2024-02-23 11:48:55 +00:00
Owen Mansel-Chan
3dc6918356 Merge pull request #15648 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-02-23 11:48:17 +00:00
Erik Krogh Kristensen
a0f91fbc15 Merge pull request #15706 from erik-krogh/pol-reg
ReDoS: Restrict some edges related to upper/lower-case when constructing possible attack strings for polynomial-redos.
2024-02-23 12:06:17 +01:00
Tom Hvitved
62b16c0fa3 Share getFileBySourceArchiveName implementation 2024-02-23 11:25:49 +01:00
Tamas Vajk
20f795c03a Code quality improvements 2024-02-23 11:20:15 +01:00
Michael Nebel
1a155b3a30 Merge pull request #15667 from michaelnebel/csharp/syntheticconstructorbody
C#: Add synthetic bodies and inititializers for default constuctors.
2024-02-23 11:14:00 +01:00
Tom Hvitved
94113521d1 Merge pull request #15689 from hvitved/ruby/no-field-branch-limit-summarized-callable
Ruby: No `fieldFlowBranchLimit` for `SummarizedCallable`s
2024-02-23 10:47:22 +01:00
Tom Hvitved
d8645cc960 Merge pull request #15694 from hvitved/csharp/assignable-definition-node
C#: Use separate `newtype` branch for `AssignableDefinitionNode`
2024-02-23 10:45:04 +01:00
github-actions[bot]
b2b5aa18b2 Add changed framework coverage reports 2024-02-23 00:16:49 +00:00
Tom Hvitved
303a2bb63a C#: Update expected test output 2024-02-22 21:04:55 +01:00
Tom Hvitved
ea7d9c97fd C#: Use separate newtype branch for AssignableDefinitionNode 2024-02-22 21:04:55 +01:00
Ian Lynagh
8d358a9f64 Kotlin: Remove the Kotlin 2 ministdlib test
Upstream doesn't plan to fix it before the K2 release:
    https://youtrack.jetbrains.com/issue/KT-62183/K2-no-stdlib-doesnt-behave-as-expected

I've made a ticket to remind us to return to this later.
2024-02-22 19:01:22 +00:00
Ian Lynagh
cf441d1a30 Kotlin: Accept changes in library-tests/multiple_files
I think that this is a regression, but one that we're not likely to fix
soon, so let's just accept the output for now. I've opened a ticket to
remind us to return to this.
2024-02-22 18:57:12 +00:00
Robert Marsh
6f7f68fee8 Merge branch 'main' into rdmarsh2/cpp/ir-synthetic-destructors 2024-02-22 18:10:13 +00:00
Geoffrey White
797fee9c9e Swift: Change note. 2024-02-22 17:54:53 +00:00
Mathias Vorreiter Pedersen
63a5b49846 Merge pull request #15633 from MathiasVP/model-experiments
C++: Assume modelled functions always override buffers by default
2024-02-22 18:48:24 +01:00
Geoffrey White
47a9a8b82a Swift: MAke TypeDecl.getFullName robust to when there's an ExtensionDecl extending more than one thing. 2024-02-22 17:39:57 +00:00
Geoffrey White
515e93522f Swift: Make ExtensionDecl.toString robust to when there's more than one extended thing. 2024-02-22 17:39:57 +00:00
Cornelius Riemenschneider
d2e6746e7f Upgrade to bazel 7.0.2. 2024-02-22 17:51:17 +01:00
Robert Marsh
942a4ed925 C++: move handlesDestructorsExplicitly up to TranslatedReturnStmt 2024-02-22 16:46:19 +00:00
Robert Marsh
ebe6ee5257 C++: accept test changes from extractor fixes 2024-02-22 16:44:19 +00:00
Mathias Vorreiter Pedersen
c7ee5b2912 Merge branch 'main' into model-experiments 2024-02-22 16:40:17 +00:00
Harry Maclean
fbc689227d Merge pull request #15604 from p-/p--rails-more-request-sources
Ruby: add additional sources on the request object of Rails
2024-02-22 16:35:59 +00:00
Tamas Vajk
50f9354ca8 Remove redundant using 2024-02-22 17:14:02 +01:00
Tamas Vajk
e176b32a83 Remove environment dictionary passing 2024-02-22 17:12:38 +01:00
Paolo Tranquilli
6c5e5966c3 Merge pull request #15583 from github/redsun82/bzlmod
Bazel: use bzlmod
2024-02-22 17:06:59 +01:00
Tamas Vajk
648c06ce27 Simplify dotnet SDK check in autobuilder 2024-02-22 16:44:46 +01:00
Mathias Vorreiter Pedersen
0bf29f0a62 Merge branch 'main' into model-experiments 2024-02-22 15:05:53 +00:00
Paolo Tranquilli
b7df26e6c9 Bazel: make codeql compatible with workspace setup 2024-02-22 15:50:02 +01:00
Paolo Tranquilli
b1e0287a7c Merge branch 'main' into redsun82/bzlmod 2024-02-22 15:35:41 +01:00
Ben Rodes
47f94e2ebe Merge branch 'main' into cpp-non-constant-format-as-path-query 2024-02-22 06:24:18 -08:00
Ian Lynagh
2b4b512611 Merge pull request #15693 from igfoo/igfoo/kot2b4
Kotlin: Update to 2.0.0-Beta4
2024-02-22 14:06:32 +00:00
Joe Farebrother
2ebb80b632 Merge pull request #15548 from joefarebrother/android-local-auth-keys
Java: Add query for insecurely generated keys for local authentication.
2024-02-22 14:04:17 +00:00
Joe Farebrother
67e8f17c4c Merge pull request #15619 from joefarebrother/ruby-activerecord-connection
Ruby: Add additional sql sinks for ActiveRecord connection methods
2024-02-22 14:02:31 +00:00
Joe Farebrother
1f409b0456 Merge pull request #15671 from joefarebrother/ruby-activerecord-extra-args
Ruby: Consider additional arguments to certain `ActiveRecord` methods as sql injection sinks.
2024-02-22 14:01:56 +00:00
Tamas Vajk
c0d82cb73e Minor improvement to not start dotnet process when it is known to fail 2024-02-22 14:58:00 +01:00
Tom Hvitved
c55354b544 Merge pull request #15688 from hvitved/ruby/multi-variable-capture
Ruby: Fix bug in `allowParameterReturnInSelf`
2024-02-22 14:51:09 +01:00
Mathias Vorreiter Pedersen
350d5bf0ce C++: Update QLDoc on 'modeledFlowBarrier'. 2024-02-22 13:30:39 +00:00
Tamas Vajk
8e64880e86 Fix and add unit tests 2024-02-22 14:27:28 +01:00
Mathias Vorreiter Pedersen
671904d58c C++: Fix QLoc on 'PartialFlowFunction'. 2024-02-22 13:27:10 +00:00
Mathias Vorreiter Pedersen
aca3970c33 C++: Fix QLoc on 'isPartialWrite'. 2024-02-22 13:25:13 +00:00
Paolo Tranquilli
fe6b27bcf8 Merge branch 'main' into redsun82/bzlmod 2024-02-22 13:45:09 +01:00
Michael Nebel
a24a57c586 C#: Update most other test cases to reflect the synthesized constructor calls and bodies. 2024-02-22 13:33:30 +01:00
Michael Nebel
a4ab163532 C#: Update test output for cfg tests. 2024-02-22 13:33:29 +01:00
Michael Nebel
d19c83228e C#: Do not bind comments to compiler generated statements. 2024-02-22 13:33:29 +01:00
Michael Nebel
cf9c3d5dd1 C#: Remove un-needed code as we extract synthetic default constructors. 2024-02-22 13:33:29 +01:00
Michael Nebel
14de39a854 C#: Also add synthetic bodies and inititializers for default constructors. 2024-02-22 13:33:29 +01:00
Ian Lynagh
245ce2208e Kotlin: Update to 2.0.0-Beta4 2024-02-22 12:33:00 +00:00
erik-krogh
bf22f4a870 update expected output 2024-02-22 13:21:11 +01:00
Michael Nebel
7ce7b58ce0 Merge pull request #15657 from michaelnebel/csharp/recordflow
C#: Use primary constructors for record types for dataflow.
2024-02-22 13:18:29 +01:00
erik-krogh
e74e5b3613 try to restrict the edges we follow (related to upper/lower-case) when contructing possible attack-strings for polynomial-redos 2024-02-22 13:15:17 +01:00
Felicity Chapman
95ce0cd640 Merge pull request #15691 from github/felicitymay-patch-1
Remove period from 'name' for Java query
2024-02-22 11:50:21 +00:00
Tamas Vajk
976c627d52 C#: Download latest dotnet SDK when missing 2024-02-22 12:07:15 +01:00
Paolo Tranquilli
3bea642d5c Bazel: fix typo 2024-02-22 11:58:02 +01:00
Paolo Tranquilli
fd485d06aa Merge branch 'main' into redsun82/bzlmod 2024-02-22 11:54:14 +01:00
Paolo Tranquilli
0471287cdd Bazel: remove unstable lock file 2024-02-22 11:53:47 +01:00
Felicity Chapman
4810657515 Remove period from 'name'
This is an error for the Docs content linter and does not match the style guide for query help.
2024-02-22 10:50:45 +00:00
Mathias Vorreiter Pedersen
d953a9a523 Merge pull request #15662 from jketema/destructors6
C++: Support destructors for range-based for-loops
2024-02-22 11:41:39 +01:00
Paolo Tranquilli
f1bdd6bdda Bazel: switch to erroring out by default on outdated lock file 2024-02-22 11:26:39 +01:00
Michael Nebel
f2c849c737 C#: Simplify. 2024-02-22 11:19:34 +01:00
Michael Nebel
2afcc611ce C#: Fix formatting. 2024-02-22 11:18:00 +01:00
Paolo Tranquilli
b66153be97 Merge branch 'main' into redsun82/bzlmod 2024-02-22 11:15:07 +01:00
Paolo Tranquilli
a14c2ae8ab Bazel: bump rules_python to 0.31.0 2024-02-22 11:14:53 +01:00
Joe Farebrother
ef124695a5 Apply suggestions from documentation review
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
2024-02-22 10:11:49 +00:00
Paolo Tranquilli
67222f8f7e Bazel: add module lock file 2024-02-22 11:09:15 +01:00
Paolo Tranquilli
cda4ca68f8 Bazel: tweak .bazelrc 2024-02-22 11:08:50 +01:00
Paolo Tranquilli
7410522660 Bazel: bump version to 6.5.0 2024-02-22 11:08:33 +01:00
Ian Lynagh
b405c5fc02 Merge pull request #15683 from igfoo/igfoo/expr
Kotlin: Accept some Kotlin 2 location changes
2024-02-22 10:00:01 +00:00
Joe Farebrother
92bdd637a3 Address reveiw comment - add create nd remove select_insert 2024-02-22 09:55:46 +00:00
Michael Nebel
21aa025db2 Update csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Tom Hvitved <hvitved@github.com>
2024-02-22 10:40:54 +01:00
Tom Hvitved
ebee35b385 Ruby: No fieldFlowBranchLimit for SummarizedCallables 2024-02-22 10:27:25 +01:00
Tom Hvitved
23869fc8e6 Ruby: Fix bug in allowParameterReturnInSelf 2024-02-22 09:43:52 +01:00
Tom Hvitved
007d08ea63 Ruby: Add another variable capture test 2024-02-22 09:39:01 +01:00
Tamás Vajk
9ecac04709 Merge pull request #15680 from tamasvajk/buildless/no-mono-fallback-impr
C#: Improve fallback nuget package restore in buildless
2024-02-22 08:40:16 +01:00
Paolo Tranquilli
c15d3ab08a Merge branch 'main' into redsun82/bzlmod 2024-02-22 06:05:37 +01:00
Robert Marsh
875ab74c28 Merge branch 'main' into rdmarsh2/cpp/ir-synthetic-destructors
Fixes conflicts in C++ IR tests and Stmt.qll
2024-02-21 21:34:49 +00:00
Robert Marsh
66743fb0db C++: refactor TranslatedReturnStmt 2024-02-21 20:50:30 +00:00
Robert Marsh
e0c7849f52 C++: fix incorrect use of getChildInternal 2024-02-21 20:35:58 +00:00
Ian Lynagh
218a3877d2 Merge pull request #15682 from igfoo/igfoo/propStackOverflow
Java: Properties: Add a test that used to give a stack overflow
2024-02-21 19:35:32 +00:00
Asger F
db10c229de Merge pull request #15663 from asgerf/js/endpoint-naming2
JS: Improvements to endpoint naming
2024-02-21 19:36:57 +01:00
Benjamin Rodes
8d35db0fe6 Making argv filter positional. 2024-02-21 12:25:35 -05:00
Ian Lynagh
e6f70385f4 Kotlin: Accept more loc changes in library-tests/exprs 2024-02-21 17:23:03 +00:00
Ian Lynagh
006b682333 Kotlin: Accept more loc changes in library-tests/exprs 2024-02-21 17:18:06 +00:00
Ian Lynagh
36b304d9a1 Kotlin: Accept some locations in library-tests/exprs 2024-02-21 17:13:50 +00:00
Ian Lynagh
212d5def16 Kotlin: Accept more loc changes in library-tests/exprs
These are more instances of the same changes as the previous 2 commits
2024-02-21 17:04:49 +00:00
Ian Lynagh
1b98dc16ba Kotlin: Accept some more loc changes in library-tests/exprs 2024-02-21 17:02:59 +00:00
Ian Lynagh
5ecdc29808 Kotlin: Accept some loc changes in library-tests/exprs
These aren't ideal, but I think they will be improve once we handle
pre/post inc/decrement properly.
2024-02-21 17:00:23 +00:00
Jeroen Ketema
f9d391d087 C++: Support destructors for range-based for-loops 2024-02-21 17:26:32 +01:00
Paolo Tranquilli
3ca9d70100 Bazel: drop experimental from bzlmod flag 2024-02-21 16:53:08 +01:00
Paolo Tranquilli
61bfe7e520 Bazel: rename internal module to semmle_code 2024-02-21 16:51:39 +01:00
Paolo Tranquilli
cb5e3c336d Merge branch 'main' into redsun82/bzlmod 2024-02-21 16:47:36 +01:00
Robert Marsh
339c89019a Merge pull request #15681 from jketema/destructors6b
C++: Add IR test where the for loop should call destructors at the end of its body
2024-02-21 10:20:46 -05:00
Tamás Vajk
e13d6cdd57 Merge pull request #15678 from tamasvajk/fix/integration-test-paths
C#: Modify reported assembly paths in integration tests
2024-02-21 15:26:36 +01:00
Paolo Tranquilli
3df3fbc65b Merge branch 'main' into redsun82/bzlmod 2024-02-21 15:01:19 +01:00
Ian Lynagh
9948052fb6 Java: Properties: Add a test that used to give a stack overflow 2024-02-21 13:51:53 +00:00
Jeroen Ketema
11dc467add C++: Add test where the for loop should call destructors at the end of its body 2024-02-21 14:42:23 +01:00
Jeroen Ketema
8bbfb82f8e Merge pull request #15670 from jketema/destructors7
C++: Add IR tests for destruction of static locals
2024-02-21 12:54:38 +01:00
Ian Lynagh
204be4a809 Merge pull request #15669 from igfoo/igfoo/operator-overloads
Kotlin 2: Accept changes in library-tests/operator-overloads
2024-02-21 11:36:16 +00:00
Ian Lynagh
3c35683e25 Merge pull request #15668 from igfoo/igfoo/interface-delegate
Kotlin 2: Accept location changes in library-tests/interface-delegate
2024-02-21 11:35:59 +00:00
Tamas Vajk
0c46b493c3 C#: Improve fallback nuget package restore in buildless
Fallback cases coming from `<PackageReference />` and `packages.config` are now differentiated. In the latter case we're restoring the package through projects that target `net481`.
2024-02-21 11:58:02 +01:00
Paolo Tranquilli
31959eaf1f Merge branch 'main' into redsun82/bzlmod 2024-02-21 11:20:55 +01:00
Michael Nebel
a0b44c0fc1 C#: Update other tests expected output. 2024-02-21 10:57:22 +01:00
Michael Nebel
0d32192f62 C#: Update expected test output. 2024-02-21 10:57:22 +01:00
Michael Nebel
b76a27bba2 C#: Make a store step from explicit parameter nodes on primary constructors to the property of the same name for record types. 2024-02-21 10:57:22 +01:00
Anders Schack-Mulligen
71f8ccf45f Merge pull request #15654 from aschackmull/java/static-init-vec-query-perf
Java: Switch helper flow from Global to SimpleGlobal in StaticInitializationVectorQuery.
2024-02-21 10:51:16 +01:00
Michael Nebel
132b8baa57 C#: Delete summarized callable implementation for record flow and update expected output. 2024-02-21 10:33:19 +01:00
Michael Nebel
009ea1bcfd C#: Add test examples for record flow and update expected test output. 2024-02-21 10:31:07 +01:00
Jeroen Ketema
57cb7f8218 C++: Update tests after extractor changes related to static variables 2024-02-21 10:22:59 +01:00
Jeroen Ketema
c1f18edfed C++: Add IR tests for destruction of static locals 2024-02-21 10:22:59 +01:00
Michael Nebel
f072e41d50 Merge pull request #15652 from michaelnebel/csharp/constructorflow
C#: Read-only property flow.
2024-02-21 10:12:46 +01:00
Tamas Vajk
e1e29f277c C#: Modify reported assembly paths in integration tests 2024-02-21 09:39:19 +01:00
Michael Nebel
060133d3e9 C#: Add change note. 2024-02-21 09:34:21 +01:00
Tamás Vajk
70a2d16b1a Merge pull request #15600 from tamasvajk/buildless/no-mono-dlls
C# Change desktop dotnet assembly lookup to fall back to nuget reference assemblies
2024-02-21 08:36:41 +01:00
Paolo Tranquilli
c5ed96b4f8 Merge branch 'main' into redsun82/bzlmod 2024-02-21 06:22:10 +01:00
Chris Smowton
f2e04c0cb2 Merge pull request #15672 from github/post-release-prep/codeql-cli-2.16.3
Post-release preparation for codeql-cli-2.16.3
2024-02-20 21:59:55 +00:00
Edward Minnix III
c5dbaa6bfd Docs team review suggestions
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-02-20 14:17:06 -05:00
Ed Minnix
8be9b8b818 Add note about collapsing multiple rows into one 2024-02-20 14:17:05 -05:00
Ed Minnix
e2511cdbe4 Add neutral model note to C# documentation 2024-02-20 14:17:04 -05:00
Ed Minnix
8058096d7d Add note about neutrals to Java documentation 2024-02-20 14:17:02 -05:00
Edward Minnix III
6665248c19 Review suggestions
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-02-20 14:17:01 -05:00
Ed Minnix
ae59ea3152 Oxford comma 2024-02-20 14:17:00 -05:00
Ed Minnix
3f10dd06f2 Correct indices in example 2024-02-20 14:16:59 -05:00
Ed Minnix
65db990c97 Remove threat model mentions 2024-02-20 14:16:57 -05:00
Ed Minnix
bb86ce5749 Remove references to model editor 2024-02-20 14:16:56 -05:00
Ed Minnix
698109ae10 Introduce C# MaD documentation 2024-02-20 14:16:55 -05:00
Ed Minnix
77ef63a051 Modify Java docs to use common models-as-data beta notice 2024-02-20 14:16:53 -05:00
Ed Minnix
54d7805e4a Modify Java threat model link to be Java-specific 2024-02-20 14:16:51 -05:00
yoff
d3ee5f65db Merge pull request #15550 from yoff/python/remove-pointsto-from-module-getAnExport
python: remove a use of points-to
2024-02-20 19:04:46 +01:00
github-actions[bot]
37f8fa3413 Post-release preparation for codeql-cli-2.16.3 2024-02-20 16:50:47 +00:00
Joe Farebrother
10da4d14d9 Add addtional arguments as sinks to certain methods 2024-02-20 16:35:29 +00:00
Pierre
2da00986c0 Merge pull request #15664 from alexrford/rb/rm-library-models-cust-docs
Ruby: remove `customizing-library-models-for-ruby.rst`
2024-02-20 17:03:18 +01:00
Ian Lynagh
fbf70c688f Kotlin 2: Accept changes in library-tests/operator-overloads
This also brings the Kotlin 2 output back in line with the Kotlin 1
output.
2024-02-20 15:41:22 +00:00
Ian Lynagh
67d0415942 Kotlin 2: Accept loc changes in library-tests/interface-delegate
We lose a location here, but this makes the Kotlin 2 results more
similar to the Kotlin 1 results.
2024-02-20 15:27:43 +00:00
Pierre
0d734983b4 Merge branch 'main' into rb/rm-library-models-cust-docs 2024-02-20 16:20:41 +01:00
Chris Smowton
8a00a45b32 Merge pull request #15666 from github/release-prep/2.16.3
Release preparation for version 2.16.3
2024-02-20 15:15:41 +00:00
Michael Nebel
d6f657cfd7 C#: Update expected test output. 2024-02-20 15:55:19 +01:00
Michael Nebel
e4d41194b4 C#: Include store steps into readonly properties. 2024-02-20 15:55:19 +01:00
Michael Nebel
3112bf4682 C#: Add some test property inititialization test cases and update expected output. 2024-02-20 15:55:19 +01:00
github-actions[bot]
6d061fbc35 Release preparation for version 2.16.3 2024-02-20 14:26:23 +00:00
Michael Nebel
ed3dba8334 Merge pull request #15625 from michaelnebel/csharp/primaryconstructorinitializer
C# 12: Primary constructor inititalizers.
2024-02-20 15:12:19 +01:00
Max Schaefer
75f66c2191 Add four more sink types. 2024-02-20 13:48:20 +00:00
Anders Schack-Mulligen
5a348a5048 Dataflow: SimpleGlobal / Typetracker perf fix. 2024-02-20 14:40:28 +01:00
Tamás Vajk
029db218fe Merge pull request #15650 from tamasvajk/buildless/fallback-nuget-install
C#: Add fallback logic to `nuget install`
2024-02-20 14:26:44 +01:00
Owen Mansel-Chan
e6f9ef5042 Merge pull request #15643 from owen-mc/java/sensitive-logging
Java: Sensitive Logging: Simplify definition of source and improve QLDoc
2024-02-20 13:24:23 +00:00
Alex Ford
5b46256fdb Ruby: remove customizing-library-models-for-ruby.rst 2024-02-20 13:12:23 +00:00
Asger F
29ffeb6da5 JS: Fix qldoc 2024-02-20 14:00:32 +01:00
Paolo Tranquilli
2cc762b85a Merge branch 'main' into redsun82/bzlmod 2024-02-20 13:55:57 +01:00
Michael B. Gale
ea676469bb Merge pull request #15202 from github/mbg/go/1.22
Go: Update workflows and expected test results for Go 1.22
2024-02-20 12:32:57 +00:00
Michael Nebel
f246272b5f C#: Code quality improvements. 2024-02-20 11:48:01 +01:00
Chris Smowton
2e479def89 Merge pull request #15445 from smowton/smowton/admin/java-buildless-classpath-ordering-tests
Java: test changes for making buildless' classpath ordering deterministic
2024-02-20 10:03:03 +00:00
Tamás Vajk
e257003641 Merge pull request #15660 from tamasvajk/feature/code-quality
C#: Use `nameof` in nullability attributes
2024-02-20 10:47:52 +01:00
Rasmus Lerchedahl Petersen
22e72d2fed python: Move the rewrite out to Scope.qll 2024-02-20 10:39:29 +01:00
Mathias Vorreiter Pedersen
66622748d9 Merge pull request #15658 from jketema/destructors6a
C++: Add more range-based for-loop IR tests
2024-02-20 10:26:23 +01:00
Rasmus Lerchedahl Petersen
de727bf1b5 Revert "python: remove a use of points-to"
This reverts commit 5cb71ce7e5.
2024-02-20 10:23:31 +01:00
Tamas Vajk
d3ba33d3a8 Code quality improvements 2024-02-20 10:22:08 +01:00
Tamas Vajk
b3f5beb076 C#: Use nameof in nullability attributes 2024-02-20 10:05:39 +01:00
Jeroen Ketema
7ec95fba6d C++: Add more range-based for-loop IR tests 2024-02-20 09:22:13 +01:00
Chris Smowton
83509ce1f7 Test changes 2024-02-19 19:06:37 +00:00
Paolo Tranquilli
ec3cc6376f Merge branch 'main' into redsun82/bzlmod 2024-02-19 16:42:08 +01:00
Jeroen Ketema
2becb3043e Merge pull request #15638 from jketema/destructors5
C++: Support C++20 range-based for initializers
2024-02-19 16:22:23 +01:00
Max Schaefer
f4c6cf335b Merge pull request #15651 from github/max-schaefer/release-automodel-query-pack
Automodel: Release query pack.
2024-02-19 14:55:49 +00:00
Tony Torralba
1704bfe2bf Merge pull request #15585 from atorralba/atorralba/go/promote-jwt-unsafe-verification
Go: Promote `go/missing-jwt-signature-check` from experimental
2024-02-19 15:35:44 +01:00
Paolo Tranquilli
0787cc5e51 Merge branch 'main' into redsun82/bzlmod 2024-02-19 15:07:42 +01:00
Paolo Tranquilli
164250186a Merge pull request #15593 from github/redsun82/swift-prebuilt-update
Swift: update swift prebuilt package
2024-02-19 15:05:13 +01:00
Paolo Tranquilli
434fd73823 Merge pull request #15653 from github/redsun82/swift-remove-test-sdk
Swift: remove test sdk
2024-02-19 15:04:13 +01:00
Paolo Tranquilli
f842eee784 Swift: use includes in picosha2 2024-02-19 14:06:18 +01:00
Paolo Tranquilli
d0e169ebda Merge branch 'main' into redsun82/bzlmod 2024-02-19 14:05:43 +01:00
Anders Schack-Mulligen
66010b5c96 Java: Switch helper flow from Global to SimpleGlobal in StaticInitializationVectorQuery. 2024-02-19 14:04:43 +01:00
Anders Schack-Mulligen
2fa8c2f992 Merge pull request #15634 from aschackmull/dataflow/simpleglobal-fixreads
Dataflow: Bugfix for field reads in SimpleGlobal.
2024-02-19 14:02:38 +01:00
Asger F
c324b2aed8 JS: Refactor 2024-02-19 13:59:49 +01:00
Asger F
eb7d0244c2 JS: Global names don't have to be defined in externs 2024-02-19 13:59:49 +01:00
Asger F
493b37774f JS: More precise isFunctionSource 2024-02-19 13:59:49 +01:00
Asger F
6d597bea0d JS: Refactor 2024-02-19 13:59:49 +01:00
Asger F
8a5b907912 JS: Handle wrapper functions more gracefully 2024-02-19 13:59:48 +01:00
Asger F
d96f29d6c2 JS: Disallow return steps in getASinkNode 2024-02-19 13:59:48 +01:00
Asger F
51bed86778 Update EndpointNaming.expected 2024-02-19 13:59:46 +01:00
Asger F
29258ad8c2 WIP new aliasing rule 2024-02-19 13:59:15 +01:00
Asger F
4ef1ac9250 JS: Accept bad test output 2024-02-19 13:59:12 +01:00
Asger F
15bc3c282f JS: Add test with wrapper function 2024-02-19 13:58:40 +01:00
Tamas Vajk
216d6c0827 Change separator character used in environment variable 2024-02-19 13:58:09 +01:00
Paolo Tranquilli
eb142184f3 Swift: accept test changes 2024-02-19 13:53:19 +01:00
Paolo Tranquilli
ccf7608850 Swift: update swift prebuilt package 2024-02-19 13:47:53 +01:00
Paolo Tranquilli
2b6f100d91 Swift: update qltest test 2024-02-19 13:39:27 +01:00
Paolo Tranquilli
2311e1c5ab Swift: remove test sdk
The test sdk that we were prebuilding to run ql tests is actually not
needed, as the `resource-dir` we package for cross-version compatibility
is enough for running qltests as well.
2024-02-19 13:28:48 +01:00
Tamas Vajk
69c1895065 C#: Add fallback logic to nuget install 2024-02-19 13:08:45 +01:00
Ian Lynagh
ce07d6ad9f Merge pull request #15645 from igfoo/igfoo/methods
Kotlin 2: Accept changes in library-tests/methods
2024-02-19 12:05:03 +00:00
Michael Nebel
feda6bc01b C#: Update expected test output. 2024-02-19 13:04:13 +01:00
Michael Nebel
d83687125c C#: Add postupdate nodes for all instance parameter accesses - otherwise we get missing post update nodes to to reverseRead in the data flow consistency queries. 2024-02-19 13:04:13 +01:00
Michael Nebel
28d5c11b6f C#: Synthesize an empty body for primary constructors. 2024-02-19 13:04:13 +01:00
Michael Nebel
dcde6597bc C#: Updated expected test output. 2024-02-19 13:04:13 +01:00
Michael Nebel
7a80205519 C#: Extract explicit and implicit primary constructor initializers. 2024-02-19 13:04:12 +01:00
Michael Nebel
c613851c2d C#: Invert logic in ExtractInitializer. 2024-02-19 13:04:12 +01:00
Michael Nebel
6b38a81e50 C#: Add some test cases for primary constructor inititalizers and a failing dataflow test. 2024-02-19 13:04:12 +01:00
Max Schaefer
139ef60f69 Automodel: Release query pack. 2024-02-19 11:47:31 +00:00
Paolo Tranquilli
b174aa65a3 Bazel: empty out WORKSPACE.bazel 2024-02-19 10:30:48 +01:00
Anders Schack-Mulligen
d1d213d285 Merge pull request #15632 from aschackmull/dataflow/flowfeature-bugfix
Dataflow: Fix flow-feature bug for parameterless static functions
2024-02-19 09:24:43 +01:00
Tony Torralba
8b8cebd599 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-02-19 08:59:03 +01:00
Paolo Tranquilli
f41b70af78 Merge branch 'main' into redsun82/bzlmod 2024-02-19 08:35:55 +01:00
Mathias Vorreiter Pedersen
b927968e88 Merge pull request #15516 from microsoft/51-2cppnon-constant-format-alter-not-const-source
C++: Change sources in `NonConstantFormat.ql`
2024-02-17 00:01:58 +01:00
Robert Marsh
2494b7d801 C++: fix for IR CFG problem with return in if 2024-02-16 21:08:21 +00:00
Robert Marsh
2c8ed6479a C++: test for return in if 2024-02-16 17:55:34 +00:00
Michael B. Gale
0ad04d45a9 Disable setup-go caching 2024-02-16 17:48:12 +00:00
Michael B. Gale
25f0692e2c Go: Update expected results for TypeParamType 2024-02-16 17:33:30 +00:00
Michael B. Gale
91ed7a8d79 Go: Use 1.22 in CI 2024-02-16 17:33:23 +00:00
Ian Lynagh
8235aed01a Kotlin 2: Accept changes in library-tests/methods
Mostly location changes, and mostly improvements.

There are a couple of cases where we lose regressions, but this actually
makes those IR elements more consistent with the elements surrounding
them.
2024-02-16 17:18:49 +00:00
Pierre
c05431e08f Merge pull request #15644 from github/sitedocs/2.16.2
Generate changelogs for 2.16.2
2024-02-16 18:15:33 +01:00
Pierre
98dac7573b Generate changelogs for 2.16.2 2024-02-16 18:02:19 +01:00
Owen Mansel-Chan
22692b9d55 Simplify definition of source and improve QLDoc
This is also slightly faster to evaluate (217s instead of 228s on apache/geode on my machine).
2024-02-16 16:47:41 +00:00
Ian Lynagh
3f696c02ab Merge pull request #15641 from igfoo/igfoo/controlflow-dom
Kotlin 2: Accept changes in library-tests/controlflow/dominance
2024-02-16 16:41:41 +00:00
Benjamin Rodes
639642fb67 Formatting. 2024-02-16 11:19:02 -05:00
Benjamin Rodes
0410ed734b Adding exclusion for main's argv (I believe this and other changes were accidentally removed in prior merge with other non-const branches) 2024-02-16 11:18:06 -05:00
Benjamin Rodes
9f3dd6300f Fixing query to use path graph. 2024-02-16 11:11:48 -05:00
Paolo Tranquilli
32d6c5ac3d Javascript: fix project layout for bazel tests
On Windows, the project layout needs to match `codeql~override`, while
on POSIX we must keep on matching `ql`. We work around this by using
`*ql*` in the project layout, which matches both.
2024-02-16 17:10:20 +01:00
Paolo Tranquilli
1626344560 Merge branch 'main' into redsun82/bzlmod 2024-02-16 17:10:02 +01:00
Ian Lynagh
92009f515b Merge pull request #15640 from igfoo/igfoo/controlflow
Kotlin 2: Accept changes in library-tests/controlflow/basic
2024-02-16 16:07:48 +00:00
Ian Lynagh
f0f1b043d5 Merge pull request #15639 from igfoo/igfoo/stmts
Kotlin 2: Accept changes in library-tests/stmts
2024-02-16 16:07:34 +00:00
Mathias Vorreiter Pedersen
7ea49b6a94 Merge pull request #15637 from MathiasVP/fix-joins-in-irguards
C++: Fix joins in `controlsBlock`
2024-02-16 16:56:21 +01:00
Benjamin Rodes
aa7c677e13 Merge branch '51-2cppnon-constant-format-alter-not-const-source' into cpp-non-constant-format-as-path-query
# Conflicts:
#	cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
2024-02-16 10:49:05 -05:00
Benjamin Rodes
c38376a264 Merge branch '51-2cppnon-constant-format-alter-not-const-source' of https://github.com/microsoft/codeql into 51-2cppnon-constant-format-alter-not-const-source 2024-02-16 10:42:04 -05:00
Mathias Vorreiter Pedersen
7c22146f46 C++: Accept query test changes. 2024-02-16 16:33:44 +01:00
Mathias Vorreiter Pedersen
096073d295 C++: Add change note. 2024-02-16 16:29:34 +01:00
Benjamin Rodes
93f2e856af Formatting update. 2024-02-16 10:28:14 -05:00
Ian Lynagh
9069218f1a Kotlin 2: Accept changes in library-tests/controlflow/dominance
Mostly location changes; also removal of a generated block:
https://youtrack.jetbrains.com/issue/KT-63781/K2-Generated-blocks-appear-in-the-IR
2024-02-16 15:18:56 +00:00
Benjamin Rodes
4a9b2d5027 Comment change. 2024-02-16 10:18:07 -05:00
Michael B. Gale
008585eeba Go: Include arguments in RunCmd error messages 2024-02-16 15:17:24 +00:00
Michael B. Gale
8886092cd0 Go: Try to ignore errors in go mod vendor calls 2024-02-16 15:15:58 +00:00
Benjamin Rodes
5b0a3dcdbe Accidental removal of an and. 2024-02-16 10:15:21 -05:00
Benjamin Rodes
95ebbb1bbd Ql alterations for cleanup as part of merge suggestions. 2024-02-16 10:13:50 -05:00
Ben Rodes
1fb7f089ca Update cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-02-16 10:06:34 -05:00
Ian Lynagh
a5a6020f18 Kotlin 2: Accept changes in library-tests/controlflow/basic
Mostly location changes, but also some removal of generated blocks:
https://youtrack.jetbrains.com/issue/KT-63781/K2-Generated-blocks-appear-in-the-IR
2024-02-16 14:37:10 +00:00
Jeroen Ketema
dd39fa0bde C++: Support C++20 range-based for initializers 2024-02-16 15:20:14 +01:00
Ian Lynagh
5039acba53 Kotlin 2: Accept changes in library-tests/stmts/PrintAst.expected 2024-02-16 14:17:04 +00:00
Ian Lynagh
e8b8b11434 Kotlin 2: Accept changes in library-tests/stmts/exprs.expected 2024-02-16 14:16:18 +00:00
Mathias Vorreiter Pedersen
be54a41593 C++: Accept query test changes. 2024-02-16 15:01:50 +01:00
Mathias Vorreiter Pedersen
06ff46091d C++: Fix joins in 'controlsBlock'. 2024-02-16 14:49:20 +01:00
Tamas Vajk
c68d36eb79 Remove restored framework packages when user specified framework folders 2024-02-16 14:42:39 +01:00
Ian Lynagh
d6b96c5c23 Kotlin 2: Accept loc changes in library-tests/stmts/stmts.expected 2024-02-16 13:40:44 +00:00
Anders Schack-Mulligen
53801e8efb Dataflow: Bugfix for field reads in SimpleGlobal. 2024-02-16 14:00:04 +01:00
Mathias Vorreiter Pedersen
b407c86d03 C++: Make Code Scanning happy. 2024-02-16 13:51:34 +01:00
Mathias Vorreiter Pedersen
57c1bf5835 C++: Add file-level QLDoc. 2024-02-16 13:47:02 +01:00
Mathias Vorreiter Pedersen
497592a4d4 C++: Add change note. 2024-02-16 13:36:25 +01:00
Tamas Vajk
ce0159c005 Add dotnet core dependencies to the integration test 2024-02-16 13:35:18 +01:00
Tamas Vajk
7e912f0de0 Rename integration test 2024-02-16 13:31:08 +01:00
Mathias Vorreiter Pedersen
9b2019db6b C++: Accept test changes. 2024-02-16 13:10:41 +01:00
Mathias Vorreiter Pedersen
499ab0892f C++: Currently, to catch flow in an example such as:
```cpp
char* source();
void sink(const char*);
int sprintf(char *, const char *, ...);

void call_sprintf(char* path, char* data) {
        sprintf(path, "%s", "abc"); // (1)
        sprintf(path, "%s", data); // (2)
}

void foo() {
        char path[10];
        call_sprintf(path, source()); // (3)
        sink(path);
}
```
we identify that the `*path [post update]` node at `// (2)` is a
`ReturnNodeExt` and since `*data` flows to that node flow will be carried
out to `*path [post update]` at // (3) and thus reach `sink(path)`.

The reason `*path [post update]` at `// 2` is recognized as a `ReturnNodeExt`
is because it satisfies the following condition (which is identified by the
shared dataflow library):
There is flow from the parameter node `*path` to the pre-update node of the
post-update node `*path [post update]` at `// (2)`.

However, when we start recognizing that the call to `sprintf(path, ...)` at
`// (1)` overrides the value of `*path` and no longer provide use-use flow out
of `*path` the `*path [post update]` node at `// (2)` is no longer recognized
as a `ReturnNodeExt` (because it doesn't satisfy the above criteria).

Thus, we need to identify the flow above without relying on the dataflow
library's summary mechanism. That is, instead of relying on the dataflow
library's mechanism to summarize the `*data -> *path` flow for `call_sprintf`
we need to:
- Ensure that the write to `*path` at `// (2)` is recognized as the "final"
write to the parameter, and
- Ensure that there's flow out of that parameter and back to
`*path [post update]` at `// (3)`.

Luckiky, we do all of this already to support flow out of writes to parameters
that don't have post-update nodes. For example, in something like:
```cpp
void set(int* x, int y) {
  *x = y;
}

void test() {
  int x;
  set(&x, source());
  sink(x);
}
```
So in order to make the original example work, all we need to do is to remove
the restrictions on this mechanism so that the same mechanism that makes the
above example work also makes the original example work!
2024-02-16 13:09:45 +01:00
Joe Farebrother
9ad05fe51c Address reveiws - Add BAD example to doc, add doc example to tests and fix typo. 2024-02-16 12:00:51 +00:00
Mathias Vorreiter Pedersen
7e9bf2a880 C++: Add a model for 'partial updating' and extend models appropriately. 2024-02-16 12:56:19 +01:00
Mathias Vorreiter Pedersen
24a63ae94d C++: Block flow by default. 2024-02-16 12:56:19 +01:00
Mathias Vorreiter Pedersen
625c47fa9c C++: Add a testcase. 2024-02-16 12:56:19 +01:00
Tamas Vajk
1e75c73825 Fix failing integration test 2024-02-16 12:50:13 +01:00
Tamas Vajk
f8b29ad70e Introduce environment variable to specify framework assembly locations 2024-02-16 11:54:19 +01:00
Anders Schack-Mulligen
03f7968dbf Dataflow: Fix flow-feature bug. 2024-02-16 11:38:30 +01:00
Angela P Wen
4291c75488 Merge pull request #15631 from github/angelapwen/extend-permissions
Add `security-events: write` permission in `ql-for-ql-build.yml`
2024-02-16 02:28:30 -08:00
Anders Schack-Mulligen
ba1a0bc320 Java: Add test highlighting problem. 2024-02-16 11:25:33 +01:00
Angela P Wen
c75111619e Add security-events: write permission 2024-02-16 02:17:17 -08:00
Tamas Vajk
d358f8e4f2 Move undocumented environment variable names to a common location 2024-02-16 11:15:53 +01:00
Tamas Vajk
b996f7b3ce Change environment variable for opt-out web view extraction 2024-02-16 11:15:53 +01:00
Tamas Vajk
8f0f6963bb Change desktop dotnet assembly lookup to fall back to nuget reference assemblies 2024-02-16 11:15:53 +01:00
Tamas Vajk
04f0fb0483 Add integration test with mono assemblies as references 2024-02-16 11:15:52 +01:00
Cornelius Riemenschneider
4e022e2098 Merge pull request #15627 from github/criemen/java-test
Move the JS java tests to be a proper `java_test` target.
2024-02-16 11:15:18 +01:00
Erik Krogh Kristensen
037e64a4b5 Merge pull request #15623 from erik-krogh/cs-url
C#: update the QHelp for `cs/web/unvalidated-url-redirection`
2024-02-16 11:12:22 +01:00
Óscar San José
d46157135a Merge pull request #15630 from tamasvajk/fix/change-coverage-updater-permissions
Extend permissions in `csv-coverage-update.yml`
2024-02-16 10:58:24 +01:00
Tamas Vajk
89384bb855 Extend permissions in csv-coverage-update.yml 2024-02-16 10:19:16 +01:00
Mathias Vorreiter Pedersen
c19ed4c17e Merge pull request #15626 from MathiasVP/fix-constness-checking
C++: Don't strip specifiers away in `TFinalParameterUse`
2024-02-16 10:09:43 +01:00
Max Schaefer
a95f4128d9 Merge pull request #15554 from github/max-schaefer/automodel-candidate-fixes
Automodel: Improve handling of varargs and overriding in extraction queries
2024-02-16 08:51:54 +00:00
Benjamin Rodes
d6b0746b30 The non-constant format query is now a path query. Minor changes to the output alert to be more precise on what is being alerted. Minor changes to the query itself to avoid redundancies with argv. 2024-02-15 12:14:52 -05:00
Ian Lynagh
c6f4a204e9 Merge pull request #15616 from igfoo/igfoo/kt2-exprs
Kotlin 2: Accept more location changes
2024-02-15 16:49:28 +00:00
Jeroen Ketema
da3ff4813f Merge pull request #15612 from jketema/destructors4a
C++: Support `constexpr if` in the IR
2024-02-15 17:29:56 +01:00
Max Schaefer
652b6bb8e1 Fix bugs revealed by omittable exists variables. 2024-02-15 16:29:20 +00:00
Max Schaefer
8d4a344d47 Merge pull request #15592 from github/max-schaefer/rephrase-negative-characteristics
Automodel: Make description of some negative characteristics more explicit.
2024-02-15 16:20:17 +00:00
Michael B. Gale
4d28c0d2a9 Go: Call go mod vendor to synchronise vendor directory when it exists 2024-02-15 16:19:07 +00:00
Cornelius Riemenschneider
798a1e250e Move the JS java tests to be a proper java_test target.
Previously, we had a `sh_test` wrapping the `java_test` to do some setup.
This was extremely brittle on Windows, and relied on getting a deploy
jar from `java_test`. This breaks when updating to Bazel 7, where the
ability to get a deploy jar from `java_test` was removed.
Therefore, we now do all the test setup in `AllTests.java` instead.
This is much cleaner, and shouldn't break as easily.
2024-02-15 17:02:28 +01:00
Joe Farebrother
e36b9f4d3c Add tests and change note 2024-02-15 15:26:20 +00:00
Benjamin Rodes
9e50fc6893 Updating tests to account for removing const char* heuristic. 2024-02-15 09:54:03 -05:00
Benjamin Rodes
caf2ee27fa Adding false negative tests for future work. 2024-02-15 09:43:26 -05:00
Mathias Vorreiter Pedersen
532e8dac45 C++: Don't strip specifiers in 'TFinalParameterUse'. 2024-02-15 14:08:12 +01:00
Owen Mansel-Chan
9cd13cbf37 Merge pull request #15624 from owen-mc/go/update-library-coverage-frameworks
Add new libraries we cover to frameworks.csv
2024-02-15 12:55:19 +00:00
Owen Mansel-Chan
6cb4773188 Add new libraries we cover to frameworks.csv 2024-02-15 12:19:49 +00:00
erik-krogh
a5eb2dd906 update the QHelp for cs/web/unvalidated-url-redirection with examples inspired by the JS QHelp 2024-02-15 12:41:01 +01:00
Erik Krogh Kristensen
7c0557269a Merge pull request #15596 from erik-krogh/url-san
C#: Add a few more sanitizers to `cs/web/unvalidated-url-redirection`
2024-02-15 12:09:06 +01:00
Angela P Wen
0643184a7e Merge pull request #15493 from jsoref/declare-permissions
Declare permissions in workflows
2024-02-15 02:52:24 -08:00
Tony Torralba
f4c9052ba9 Merge pull request #15622 from atorralba/atorralba/java/path-sanitizer-equals
Java: Expand ExactPathSanitizer to work on the argument of 'equals' too
2024-02-15 11:29:09 +01:00
Tamás Vajk
a5e3643faf Merge pull request #15621 from tamasvajk/buildless/cleanup
C#: Code quality improvements (fixed log message, removed unused interface)
2024-02-15 10:54:47 +01:00
Rasmus Wriedt Larsen
e4c30371f9 Merge pull request #13557 from am0o0/amammad-python-bombs
Python: Decompression Bombs
2024-02-15 10:43:12 +01:00
Tony Torralba
90a9d82b9d Java: Expand ExactPathSanitizer to work on the argument of 'equals' too 2024-02-15 10:00:24 +01:00
Harry Maclean
a9abba5859 Merge pull request #15520 from hmac/hmac-erb-raw-output-directive
Ruby: Recognise raw Erb output as XSS sink
2024-02-15 08:05:16 +00:00
Harry Maclean
babae65e41 Merge pull request #15488 from hmac/ruby-mad-docs
Ruby: add docs for customizing library models with data extensions
2024-02-15 07:58:22 +00:00
Tamas Vajk
2f1472fa48 Code quality improvements (fixed log message, removed unused interface) 2024-02-15 08:52:44 +01:00
Tamás Vajk
8aff913c3c Merge pull request #15614 from tamasvajk/buildless/razor-cleanup
C# Only remove temp files for MVC view generation if needed
2024-02-15 08:27:40 +01:00
Joe Farebrother
37eb81097f Add additional sinks for connection methods 2024-02-14 22:42:03 +00:00
Chris Smowton
7e41a895d8 Merge pull request #15618 from JLLeitschuh/patch-6
Fix typo in NettyRequestSplitting.java
2024-02-14 20:44:40 +00:00
Josh Soref
b58c856756 Declare permissions
Repositories can be configured with Default access (restricted)
https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

Best practice says that workflows should declare the minimal permissions they require.
Without declaring permissions, paranoid forks fail miserably.
2024-02-14 14:31:45 -05:00
Josh Soref
e468f4062f use github/codeql-action...@main 2024-02-14 14:31:31 -05:00
amammad
09d8a75844 Fix QLDoc issues 2024-02-14 23:31:22 +04:00
Michael B. Gale
6267506a77 Go: Postpone go.mod creation until necessary 2024-02-14 19:12:36 +00:00
Michael B. Gale
1055e773ef Go: Export InitGoModForLegacyProject 2024-02-14 19:12:35 +00:00
Michael B. Gale
4387c73d12 Go: Fix missing word in comment for discoverWorkspace 2024-02-14 19:12:35 +00:00
Michael B. Gale
6dbb5c5fdb Go: Refactor Autobuild to use pairs of scripts and tools from a reusable array 2024-02-14 19:12:35 +00:00
Michael B. Gale
e2c673417f Go: Only call EmitNewerGoVersionNeeded at most once 2024-02-14 19:12:35 +00:00
Michael B. Gale
6eac48caba Go: Refactor greatest version logic into dedicated function 2024-02-14 19:12:34 +00:00
Michael B. Gale
a9d8643f5a Go: check for extracted files in go-files-found-not-processed test 2024-02-14 19:12:34 +00:00
Michael B. Gale
a26d11bcea Go: Revert expected diagnostics for go-files-found-not-processed 2024-02-14 19:12:34 +00:00
Michael B. Gale
058bf32ad0 Go: Initialise Go modules for stray source files outside of existing modules 2024-02-14 19:12:34 +00:00
Michael B. Gale
d99ad01efa Go: Add module files which don't belong to a workspace, if there are workspaces 2024-02-14 19:12:34 +00:00
Michael B. Gale
251888a0bd Go: Tell extractor to extract subdirectories as well 2024-02-14 19:12:33 +00:00
Michael B. Gale
925e99cdb2 Go: Use GoFilesOutsideDirs to find stray source files 2024-02-14 19:12:33 +00:00
Michael B. Gale
f0df7cd5c5 Go: Add GoFilesOutsideDirs function 2024-02-14 19:12:33 +00:00
Michael B. Gale
d4ea45bdaf Go: Add comment to AnyGoFilesOutsideDirs and use slices.Contains 2024-02-14 19:12:33 +00:00
Michael B. Gale
843f7694fd Go: Only relocate project to temp dir if there is only one workspace 2024-02-14 19:12:32 +00:00
Michael B. Gale
3a982de16f Go: Workspaces only support mod=readonly 2024-02-14 19:12:32 +00:00
Michael B. Gale
9c3667dbf7 Go: Improve go.work file(s) found log message 2024-02-14 19:12:32 +00:00
Michael B. Gale
fd54350ba8 Go: Fix comment for getBuildRoots 2024-02-14 19:12:32 +00:00
Michael B. Gale
f084829154 Go: Only fail autobuilder if all projects cannot be extracted 2024-02-14 19:12:31 +00:00
Michael B. Gale
20836c7088 Go: Add test for multiple modules, where one cannot be extracted 2024-02-14 19:12:31 +00:00
Michael B. Gale
fbd7946cfd Go: Fall back to ./... if there are no modules
Fixes issues for `dep` and `glide`
2024-02-14 19:12:31 +00:00
Michael B. Gale
0b8a917584 Go: Fix crash if WorkspaceFile.Go is nil 2024-02-14 19:12:30 +00:00
Michael B. Gale
46c553e802 Go: Add test case for go.mod file without a Go version 2024-02-14 19:12:30 +00:00
Michael B. Gale
a961e276c1 Go: Initialise filesToRemove to an empty array 2024-02-14 19:12:30 +00:00
Michael B. Gale
51eb487022 Go: Handle filepath.Rel failure 2024-02-14 19:12:30 +00:00
Michael B. Gale
c96735e17a Go: Remove auto-generated go.mod files when done 2024-02-14 19:12:30 +00:00
Michael B. Gale
db1d24a900 Go: Update expected diagnostics for go-files-not-processed 2024-02-14 19:12:29 +00:00
Michael B. Gale
e79f5905e7 Go: Fix checks for dep and glide not working correctly 2024-02-14 19:12:29 +00:00
Michael B. Gale
ec902827f6 Go: Initialise go.mod for stray source files 2024-02-14 19:12:29 +00:00
Michael B. Gale
b9e96e4a27 Fixup: closing curly brace 2024-02-14 19:12:29 +00:00
Michael B. Gale
21fbb1b051 Go: Only initialise module if there are source files 2024-02-14 19:12:28 +00:00
Michael B. Gale
f48b1e57d7 Go: Check for relative paths warning even if go mod tidy is successful 2024-02-14 19:12:28 +00:00
Michael B. Gale
aa5e14f59f Go: Replace BuildInfo with GoWorkspace 2024-02-14 19:12:28 +00:00
Michael B. Gale
8b376e7a35 Go: Include ModMode in GoWorkspace 2024-02-14 19:12:28 +00:00
Michael B. Gale
025fbc874f Go: Move definition of GoVersionInfo 2024-02-14 19:12:28 +00:00
Michael B. Gale
bdae54714a Go: Change getDepMode to return GoWorkspaces 2024-02-14 19:12:27 +00:00
Michael B. Gale
64122ba867 Go: Include DependencyInstallerMode in GoWorkspace 2024-02-14 19:12:27 +00:00
Michael B. Gale
7392440475 Go: Move DependencyInstallerMode up 2024-02-14 19:12:27 +00:00
Michael B. Gale
b5ae8ace0d Go: Add a function for go mod init 2024-02-14 19:12:27 +00:00
Michael B. Gale
1bf747ef3a Go: Create go.mod file if necessary in project discovery 2024-02-14 19:12:27 +00:00
Michael B. Gale
254634075f Go: Add shared TidyModule function 2024-02-14 19:12:26 +00:00
Michael B. Gale
f013d9d373 Go: Use new workspace/module discovery 2024-02-14 19:12:26 +00:00
Michael B. Gale
fc75e44238 Go: Allow GetBuildInfo to return multiple BuildInfo objects 2024-02-14 19:12:26 +00:00
Michael B. Gale
4f5c43a3c6 Go: Add new functions for discovering workspaces and modules 2024-02-14 19:12:26 +00:00
Michael B. Gale
3f53186ad1 Go: Add helper functions for discovering go.work and go.mod files 2024-02-14 19:12:25 +00:00
Michael B. Gale
60879bd367 Go: Introduce new types for representing logical workspaces 2024-02-14 19:12:25 +00:00
Michael B. Gale
82bd1d7b0b Go: Add SupportsWorkspaces function 2024-02-14 19:12:25 +00:00
Michael B. Gale
237bf5653a Go: Move getEnvGoSemVer to toolchain.go 2024-02-14 19:12:25 +00:00
Michael B. Gale
bd36847ca2 Go: Emit relative path import diagnostic if prompted by go mod tidy
The corresponding integration test now successfully extracts the project
2024-02-14 19:12:25 +00:00
Michael B. Gale
c2571160c3 Go: Rename findGoModFiles to getBuildRoot 2024-02-14 19:12:24 +00:00
Michael B. Gale
0488d1d295 Go: Move getDirs into util and document/rename 2024-02-14 19:12:24 +00:00
Michael B. Gale
df212807a0 Go: Try to initialise go.mod file for legacy projects 2024-02-14 19:12:24 +00:00
Jonathan Leitschuh
50056d603e Fix typo in NettyRequestSplitting.java 2024-02-14 14:03:33 -05:00
Ian Lynagh
f6d6a04ba2 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 17:01:21 +00:00
Ian Lynagh
4fcc1c26d4 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 16:56:22 +00:00
Ian Lynagh
b95c69dc66 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 16:54:20 +00:00
Ian Lynagh
2fe4c8c519 Kotlin 2: Accept some loc changes in library-tests/exprs/exprs 2024-02-14 16:47:46 +00:00
Ian Lynagh
14979585c9 Kotlin 2: Accept loc changes for library-tests/exprs/funcExprs.kt 2024-02-14 16:40:54 +00:00
Tony Torralba
f5d9fe6b08 Merge pull request #15615 from atorralba/atorralba/go/hardcoded-credentials-test-fix
Go: Use less confusing name for hardcoded credentials tests
2024-02-14 17:33:43 +01:00
Tony Torralba
582f341d9e Add references to qhelp 2024-02-14 17:25:09 +01:00
Tony Torralba
f9638760ff Fix MaD rows 2024-02-14 17:25:08 +01:00
Tony Torralba
769ec16803 Apply suggestions from code review
Co-authored-by: Chris Smowton <smowton@github.com>
2024-02-14 17:25:08 +01:00
Tony Torralba
5a82d2188a Fix double quotes in MaD row 2024-02-14 17:25:08 +01:00
Tony Torralba
551875cb5a Add 'jwt' as valid sink kind 2024-02-14 17:25:08 +01:00
Tony Torralba
85b22a2b98 Fix QHelp 2024-02-14 17:25:08 +01:00
Tony Torralba
ad7d40f0af Add missing QLDoc 2024-02-14 17:25:08 +01:00
Tony Torralba
2a30898af6 Go: Promote go/missing-jwt-signature-check from experimental 2024-02-14 17:25:03 +01:00
Ian Lynagh
efe5184a74 Kotlin 2: Accept loc change for fn in library-tests/exprs/funcExprs.kt 2024-02-14 16:09:14 +00:00
Tony Torralba
1202b5b429 Go: Use less confusing name for hardcoded credentials tests
We don't want name-based heuristics to pick these variable names, but also using something like 'safeName' may mislead readers into believing the test cases are intended to be GOOD cases (i.e. safe)
2024-02-14 17:06:05 +01:00
Ian Lynagh
18a28e2623 Kotlin 2: Accept loc changes in library-tests/exprs for kFunctionInvoke.kt 2024-02-14 16:04:10 +00:00
Ian Lynagh
c11bfb3c83 Kotlin 2: Accept loc changes in library-tests/exprs for localFunctionCalls.kt 2024-02-14 16:03:23 +00:00
Tamas Vajk
12663b58f1 C# Only remove temp files for MVC view generation if needed 2024-02-14 17:00:37 +01:00
Tony Torralba
99ac640536 Merge pull request #15527 from atorralba/atorralba/go/promote-hardcoded-key
Go: Promote `go/hardcoded-key` from experimental
2024-02-14 16:54:03 +01:00
Rasmus Wriedt Larsen
eb401a205d Python: Fix test exclusion for stdlib Python 3.12 2024-02-14 16:53:19 +01:00
Ian Lynagh
1cc645b276 Kotlin 2: Accept location changes in library-tests/exprs for samConversion.kt 2024-02-14 15:49:44 +00:00
Ian Lynagh
9195be34a2 Kotlin 2: Accept location changes in library-tests/exprs/exprs for whenExpr.kt 2024-02-14 15:45:09 +00:00
Chris Smowton
7ed73bc4ed change note 2024-02-14 15:45:03 +00:00
Ian Lynagh
5d0b780c06 Kotlin 2: Accept some location improvements in library-tests/exprs/exprs.expected 2024-02-14 15:37:37 +00:00
Ian Lynagh
2cc2a90880 Kotlin 2: Accept some location changes in library-tests/exprs/exprs.expected 2024-02-14 15:37:35 +00:00
Jeroen Ketema
9ef2c83d71 Merge pull request #15611 from jketema/destructors4
C++: For unnamed local variable declaration entries consider the name of the variable
2024-02-14 16:18:33 +01:00
Chris Smowton
9016997b51 Golang: fix flow from a map value via a range statement 2024-02-14 14:56:24 +00:00
Rasmus Wriedt Larsen
59014787a1 Python: Fix DataflowQueryTest
You're only allowed to have `result=OK` if there is a sink on that line...
2024-02-14 15:44:40 +01:00
Rasmus Wriedt Larsen
cd596f5d05 Python: Reformat test-file
All those newlines are not good for inline expectations
2024-02-14 15:44:06 +01:00
Asger F
d94d4591da JS: Name instance methods using API nodes instead of special-casing 2024-02-14 15:08:19 +01:00
Asger F
c4a0f36a08 JS: Fix handling of unknown properties
These would shorten the expected distance to a node, but would never be usable as an edge, meaning we failed to pick a preferred predecessor.
2024-02-14 15:08:19 +01:00
Asger F
3ff950660b JS: Add test with unknown property name 2024-02-14 15:08:19 +01:00
Asger F
9838da5395 JS: Simplify isExported 2024-02-14 15:08:19 +01:00
Asger F
a3dc19fd31 JS: Check privacy earlier 2024-02-14 15:08:19 +01:00
Asger F
5c454944a9 JS: Add test for private fields 2024-02-14 15:08:19 +01:00
Asger F
2a91bb8c54 JS: Add test showing ambiguous predecessor 2024-02-14 15:08:19 +01:00
Jeroen Ketema
33413129a5 C++: For unnamed local variable declaration entries consider the name of the variable 2024-02-14 15:03:04 +01:00
Ian Lynagh
c87b7b5f88 Merge pull request #15606 from igfoo/igfoo/kt2
Kotlin: Fix build with latest 2.0.255 snapshots
2024-02-14 14:00:50 +00:00
Rasmus Wriedt Larsen
e5bd633028 Python: Change name/id to Decompression Bomb
The old title/id matches how we used to write queries, but I think just
using the normal conversational name is easier for everyone :)
2024-02-14 14:54:25 +01:00
Rasmus Wriedt Larsen
69c8ef9898 Python: Use dataflow instead of taint-tracking 2024-02-14 14:52:37 +01:00
Rasmus Wriedt Larsen
ba7dd38fc9 Python: Delete duplicated file 2024-02-14 14:48:37 +01:00
Rasmus Wriedt Larsen
9ae3ea81ff Python: Remove spurious results in stdlib 2024-02-14 14:47:28 +01:00
Rasmus Wriedt Larsen
d8fd457310 Python: Use helper predicate
Since the helper predicate had nice qldocs
2024-02-14 14:47:28 +01:00
Rasmus Wriedt Larsen
e7772f1062 Python: Use Unit class 2024-02-14 14:47:28 +01:00
Rasmus Wriedt Larsen
ad39b8c68b Python: Accept .expected changes 2024-02-14 14:46:33 +01:00
erik-krogh
7c2465e7b7 add change-note 2024-02-14 13:53:43 +01:00
erik-krogh
a2bd45d0cb apply suggestions from code review 2024-02-14 13:50:27 +01:00
Rasmus Wriedt Larsen
9399258e3b Merge branch 'main' into amammad-python-bombs 2024-02-14 13:37:59 +01:00
Jeroen Ketema
46bc311111 C++: Support constexpr if in the IR 2024-02-14 13:37:56 +01:00
Tony Torralba
5ce35e47b9 Adjust a test case so that the key isn't considered dummy
(len < 4)
2024-02-14 13:06:31 +01:00
Ian Lynagh
48ea94ba23 Kotlin: Handle PsiSourceManager moving 2024-02-14 11:55:54 +00:00
Ian Lynagh
1b40b595fa Kotlin: Handle forAllMethodsWithBody being removed
Per:
    commit 28797a31b4d9b7f5c99d162ab19fc6b46f8e529d
    Author: Alexander Udalov <alexander.udalov@jetbrains.com>
    Date:   Thu Feb 1 13:22:48 2024 +0100

    JVM: refactor JvmDefaultMode, remove/rename some entries

    [...]
    - remove forAllMethodsWithBody because its behavior is now equivalent to
      isEnabled
    [...]
2024-02-14 11:55:54 +00:00
Óscar San José
cd00a4dacd Merge pull request #15584 from jsoref/github-only
Limit xl runner jobs to github org
2024-02-14 12:49:07 +01:00
Asger F
75a95ffcd1 Merge pull request #15602 from asgerf/js/block-logical-and-flow
JS: Fix flow through &&
2024-02-14 12:29:40 +01:00
Tony Torralba
458bbb3581 Rename fwk module 2024-02-14 12:23:27 +01:00
Tony Torralba
16284fdd20 Discard sources that are obvious dummy values 2024-02-14 12:21:52 +01:00
Tony Torralba
a76de495e0 Simplify sanitizers
Use DataFlow::returnedWithError instead
2024-02-14 12:21:51 +01:00
Tony Torralba
6b74cb7e75 Remove unneeded $ANYVERSION 2024-02-14 12:21:51 +01:00
Tony Torralba
3fb422ca25 Split Jwt.qll into framework libraries, which makes more sense 2024-02-14 12:21:38 +01:00
Tony Torralba
8afaa231ee Update go/ql/lib/semmle/go/security/Jwt.qll 2024-02-14 12:15:20 +01:00
Tony Torralba
304998d50e Update go/ql/src/Security/CWE-798/HardcodedCredentials.ql 2024-02-14 12:15:20 +01:00
Tony Torralba
84d1d72497 Apply suggestions from code review
Co-authored-by: Chris Smowton <smowton@github.com>
2024-02-14 12:15:19 +01:00
Tony Torralba
750c8085cb Remove duplicated main from tests 2024-02-14 12:15:19 +01:00
Tony Torralba
ba1faea630 Go: Promote go/hardcoded-key from experimental 2024-02-14 12:15:14 +01:00
Jeroen Ketema
337db6b29b Merge pull request #15609 from jketema/destructors3
C++: Output the declaration entries used in range-based for-loops
2024-02-14 11:37:09 +01:00
Asger F
2172c4863f Merge pull request #15380 from asgerf/js/endpoint-naming
JS: Add library for naming endpoints
2024-02-14 10:48:13 +01:00
Asger F
18db769d6d JS: Update expected output 2024-02-14 10:45:51 +01:00
Asger F
bafe5e3d8e JS: Add test case (with old expected data) 2024-02-14 10:45:51 +01:00
Anders Schack-Mulligen
393251dde6 Merge pull request #15582 from hvitved/dataflow/cache-viable-callable-ext
Data flow: Cache `viableCallableExt`
2024-02-14 10:31:43 +01:00
Óscar San José
96ed6597dd Merge branch 'main' into github-only 2024-02-14 10:23:39 +01:00
Michael Nebel
bafea9190d Merge pull request #15474 from michaelnebel/csharp/primaryconstructors
C# 12: Primary constructors.
2024-02-14 10:09:23 +01:00
Anders Schack-Mulligen
fb2d36ddac Merge pull request #15451 from Marcono1234/marcono1234/java-assignment-doc
Java: Document which assignment type is covered by which class
2024-02-14 08:59:50 +01:00
Asger F
9a08c27ad4 JS: Change note 2024-02-13 22:43:41 +01:00
Jeroen Ketema
c79cc493e8 C++: Accept more test changes 2024-02-13 21:53:51 +01:00
Geoffrey White
0d6c141d72 Merge pull request #15607 from geoffw0/unsafeunpack
Swift: Trivial changes to swift/unsafe-unpacking
2024-02-13 20:49:57 +00:00
Jeroen Ketema
a3b3aa4f25 C++: Update tests after extractor changes 2024-02-13 21:31:21 +01:00
Jeroen Ketema
caf09e0735 C++: Update IR comment that no longer applies 2024-02-13 21:30:58 +01:00
Jeroen Ketema
b3aea0f893 C++: Do not print the qualifier of OverloadedPointerDereferenceExpr twice in PrintAST 2024-02-13 21:29:21 +01:00
Michael B. Gale
f7955db841 Merge pull request #15603 from github/mbg/go/fix-file-info-extraction 2024-02-13 20:02:13 +00:00
Jeroen Ketema
b776cbe668 Merge pull request #15597 from jketema/destructors2
C++: Update test results of `constexpr if` destructors
2024-02-13 19:59:19 +01:00
Geoffrey White
159080f133 Swift: Accept test changes. 2024-02-13 18:06:17 +00:00
Geoffrey White
65e3ae0c45 Swift: Move the two CWE-022 tests into a common directory. 2024-02-13 17:50:30 +00:00
Michael B. Gale
205847df64 Go: Add DummyFile class 2024-02-13 17:49:31 +00:00
Michael B. Gale
c6f4495ada Go: Exclude dummy files from File 2024-02-13 17:46:41 +00:00
Geoffrey White
dfba6b97ac Swift: Case consistency. 2024-02-13 17:45:55 +00:00
Geoffrey White
42e708b387 Swift: Tweak the change note. 2024-02-13 17:43:43 +00:00
Benjamin Rodes
5c508553f3 Efficiency improvement (force a better join order) 2024-02-13 09:42:08 -08:00
Asger F
f5c437694c Update UselessConditional.expected 2024-02-13 18:31:24 +01:00
Asger F
f27fda801e Update tests.expected 2024-02-13 18:30:23 +01:00
Geoffrey White
fd1314bea4 Merge pull request #14888 from maikypedia/maikypedia/swift-zip
Swift: Add Unsafe Unpacking Query (CWE-022)
2024-02-13 16:05:22 +00:00
Robert Marsh
7e23ccd383 Merge branch 'main' into rdmarsh2/cpp/ir-synthetic-destructors 2024-02-13 15:45:51 +00:00
Robert Marsh
128bc99f90 C++: delete some FIXMEs that turned out fine 2024-02-13 15:34:36 +00:00
Chris Smowton
7217dfa997 Merge pull request #15590 from github/dependabot/go_modules/go/extractor/extractor-dependencies-8b53c12dad
Bump the extractor-dependencies group in /go/extractor with 1 update
2024-02-13 15:21:53 +00:00
Peter Stöckli
2f7b946c9f Ruby: add sources on request object of Rails 2024-02-13 15:52:18 +01:00
Michael B. Gale
be521508c2 Go: Do not add dummy files to CompilationCompilingFilesTable 2024-02-13 14:21:07 +00:00
Michael B. Gale
5e08bf0dbf Go: Add missing call to extractFileInfo 2024-02-13 14:20:45 +00:00
Mathias Vorreiter Pedersen
7a7e0334c0 Merge pull request #15601 from MathiasVP/revert-new-barrier-interface
C++: Revert #15528
2024-02-13 14:10:29 +00:00
Ian Lynagh
ac001c37bd Merge pull request #15561 from igfoo/igfoo/kt2-tests
Kotlin 2: Accept more test changes
2024-02-13 14:02:45 +00:00
Asger F
7122a7502a JS: Fix flow through &&
This is a long-standing bug we've been unable to fix due to noise from type inference.
2024-02-13 14:43:03 +01:00
Mathias Vorreiter Pedersen
fb4bd53ec5 Revert "Merge pull request #15528 from MathiasVP/flow-barrier-interface"
This reverts commit c5dc88345d, reversing
changes made to 781486172e.
2024-02-13 13:42:58 +00:00
Mathias Vorreiter Pedersen
cb7fe16ced Revert "Merge pull request #15537 from MathiasVP/swap-also-clears-first-argument"
This reverts commit 23677b23c2, reversing
changes made to c5dc88345d.
2024-02-13 13:42:58 +00:00
Tom Hvitved
bc8761c51b Data flow: Cache viableCallableExt 2024-02-13 14:12:50 +01:00
Tom Hvitved
7c59c7b28c C#: Update QLdoc 2024-02-13 14:00:26 +01:00
Tom Hvitved
7bdc2c57f0 C#: Simplify primaryConstructorParameterStore 2024-02-13 13:59:14 +01:00
Tom Hvitved
3f43f45437 C#: Assume captured variables are live at exit in SSA construction 2024-02-13 13:59:08 +01:00
Tom Hvitved
ebd6853194 C#: Avoid overlapping output in data flow test 2024-02-13 13:59:03 +01:00
Jeroen Ketema
f3e55a46ee C++: Update test results of constexpr if destructors 2024-02-13 13:37:59 +01:00
Michael Nebel
91bbbe262d C#: Address more review comments. 2024-02-13 13:15:17 +01:00
erik-krogh
d31bfc06c2 add type requirement to the new Uri sanitizers 2024-02-13 13:13:43 +01:00
erik-krogh
4dae8d0bb4 add host comparisons as a sanitizer for url-redirect 2024-02-13 13:13:43 +01:00
erik-krogh
f4dd3e9aa1 treat relative URLs as safe for url-redirects 2024-02-13 13:13:18 +01:00
erik-krogh
3f8de82ea3 add a sanitizer for List.Contains() in url-redirect 2024-02-13 13:13:06 +01:00
erik-krogh
59792808d4 add new url-redirect test file 2024-02-13 13:13:06 +01:00
Michael Nebel
8efe34942f C#: Add indirect assignment example. 2024-02-13 12:02:25 +01:00
Mathias Vorreiter Pedersen
048b3727f5 Merge pull request #15587 from MathiasVP/fix-memset-model
C++: Fix `memset` model
2024-02-13 10:45:08 +00:00
Michael Nebel
eaf129d519 C#: Update expected test output. 2024-02-13 11:40:46 +01:00
Michael Nebel
69c0f0cb6a C#: Address review comments. 2024-02-13 11:39:21 +01:00
Jeroen Ketema
565f8e852c Merge pull request #15594 from jketema/destructors
C++: Add additional IR tests for destructors
2024-02-13 11:09:07 +01:00
Jeroen Ketema
fb072a5156 C++: Add additional IR tests for init statements 2024-02-13 10:44:24 +01:00
Jeroen Ketema
8aeb75675a C++: Add constructor and destructor for vector to IR test 2024-02-13 10:39:27 +01:00
Chris Smowton
4e1167697e Merge pull request #15589 from jsoref/avoid-always
Use `!cancelled` in qhelp-pr-preview workflow
2024-02-13 09:36:40 +00:00
Cornelius Riemenschneider
e08946ec8d Merge pull request #15586 from github/criemen/bazel-python-language-pack
Python: Update BUILD.bazel files.
2024-02-13 10:19:12 +01:00
Jeroen Ketema
b509645e02 C++: Bump language version in IR tests to C++20 2024-02-13 10:18:31 +01:00
Erik Krogh Kristensen
062f16e618 Merge pull request #15519 from erik-krogh/cs-path
C#: Improve the `cs/path-injection` QHelp
2024-02-13 10:02:11 +01:00
Harry Maclean
6cc5c09769 Ruby: Simplify ErbOutputDirective 2024-02-13 08:38:16 +00:00
Harry Maclean
11040d628b Ruby: Add changenote 2024-02-13 08:38:15 +00:00
Asger F
6598a669a1 JS: Use set literal 2024-02-13 09:30:35 +01:00
Asger F
543e183d99 JS: Describe 1-step aliasing rule 2024-02-13 09:29:15 +01:00
Asger F
baa3c35d6f JS: Refactor aliasing relation 2024-02-13 09:24:00 +01:00
Tamás Vajk
de13ff6afd Merge pull request #15577 from tamasvajk/feature/missing-nuget-sources
C# - Add default nuget feed if there's none
2024-02-13 09:18:32 +01:00
Max Schaefer
104a8d980c Automodel: Make description of some negative characteristics more explicit. 2024-02-13 08:18:13 +00:00
dependabot[bot]
a3008083ea Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).


Updates `golang.org/x/tools` from 0.17.0 to 0.18.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 03:58:21 +00:00
Robert Marsh
b9785ea7b2 C++: autoformat 2024-02-13 01:07:41 +00:00
Robert Marsh
f791b0ebbf C++: Model for smart pointer destructors 2024-02-13 01:00:46 +00:00
Robert Marsh
b6cf64cff3 C++: simplify TranslatedBlock::getLastChild 2024-02-13 00:46:53 +00:00
Robert Marsh
7d8872bb99 C++: Fix for multiple for-loop variables with destructors 2024-02-13 00:40:19 +00:00
Robert Marsh
6663420d39 C++: test for multiple for loop variables with destructors 2024-02-13 00:35:56 +00:00
Robert Marsh
b94c4a6e1b C++: fix for destructor of while-loop condition 2024-02-13 00:13:22 +00:00
Robert Marsh
bac7e46b0f C++: tests for destructors after a while-loop condition 2024-02-12 23:55:42 +00:00
Josh Soref
a128161746 Use !cancelled in qhelp-pr-preview workflow 2024-02-12 16:59:42 -05:00
Asger F
faefa056eb Merge pull request #15507 from asgerf/shared/outbarrier-bugfix
Shared: fix a bug in stateful outbarriers
2024-02-12 21:44:49 +01:00
Tom Hvitved
15cf695188 C#: Fix various bad joins 2024-02-12 19:49:53 +01:00
Tom Hvitved
90f3670f3d C#: Remove all DB stats 2024-02-12 19:49:29 +01:00
Mathias Vorreiter Pedersen
a799399639 C++: Accept test changes. 2024-02-12 16:51:25 +00:00
Mathias Vorreiter Pedersen
70c7c1a5e7 C++: Add flow from the fill character to the output pointer. 2024-02-12 16:51:16 +00:00
Mathias Vorreiter Pedersen
8635b5d316 C++: Add test with missing flow. 2024-02-12 16:44:38 +00:00
Cornelius Riemenschneider
27ebebc24b Python: Update BUILD.bazel files.
This allows us to (later) build the whole python language pack with
bazel.
2024-02-12 17:10:35 +01:00
Paolo Tranquilli
a944443d39 Merge branch 'main' into redsun82/bzlmod 2024-02-12 16:03:50 +01:00
Rasmus Wriedt Larsen
cbb9a64bbb Merge pull request #15457 from RasmusWL/psycopg
Python: Model the `psycopg` package
2024-02-12 15:59:16 +01:00
Paolo Tranquilli
c0eeb7a34e Bazel: reference (and locally stub) internal module 2024-02-12 15:58:43 +01:00
Benjamin Rodes
091416131b Removing 'const' specifier filtering after discussions with the team. We will test if this causes undesirable cases in DCA and then choose which approach is best. 2024-02-12 09:38:00 -05:00
Harry Maclean
3d9f9afa77 Merge pull request #15566 from hmac/hmac-actioncontroller-regex
Ruby: Fix ActionController path regex
2024-02-12 14:14:57 +00:00
Michael Nebel
68b920f330 C#: Update other tests expected output. 2024-02-12 15:09:36 +01:00
Harry Maclean
99497e5f3c Merge pull request #15521 from hmac/hmac-ar-connection
Ruby: Recognise more ActiveRecord connections
2024-02-12 14:06:50 +00:00
Tony Torralba
b6385f7938 Merge pull request #15533 from JLLeitschuh/patch-5
Reduce severity of `java/relative-path-command`
2024-02-12 15:04:05 +01:00
Joe Farebrother
3a4a841844 Add change note + update severity 2024-02-12 14:01:27 +00:00
Joe Farebrother
16a7d68780 Add documentation 2024-02-12 13:58:01 +00:00
Joe Farebrother
2eb93b7a3b Add unit tests 2024-02-12 13:49:45 +00:00
Joe Farebrother
d8985f9f5b Move tests for local auth to a folder 2024-02-12 13:49:45 +00:00
Joe Farebrother
c79a3eb6ae Add query for insecure key generation 2024-02-12 13:49:44 +00:00
Joe Farebrother
75a2b9415c Merge pull request #15481 from joefarebrother/android-local-auth
Java: Add query for insecure local authentication
2024-02-12 13:48:53 +00:00
Tony Torralba
db2eb202ee Merge pull request #15565 from atorralba/atorralba/java/open-redirect-sanitizer
Java: Add extension point and default sanitizer to Open Redirect query
2024-02-12 14:42:52 +01:00
Ian Lynagh
931b27f76c Merge pull request #15573 from igfoo/igfoo/k2-more
Kotlin 2: Accept loc changes in library-tests/parameter-defaults/defaults.expected
2024-02-12 13:29:19 +00:00
Ian Lynagh
a7eac1100b Merge pull request #15569 from igfoo/igfoo/kt2-accept
Kotlin 2: Accept more location changes
2024-02-12 13:29:10 +00:00
Harry Maclean
5af58d24e0 Ruby: Recognise raw Erb output as XSS sink 2024-02-12 13:28:44 +00:00
Paolo Tranquilli
53539226a8 Bazel: use internal codeql module 2024-02-12 14:27:55 +01:00
Michael Nebel
aed5080142 C#: Add primary constructor change note. 2024-02-12 13:27:40 +01:00
Michael Nebel
4083348b3e C#: Add a primary constructor QL library test. 2024-02-12 13:27:39 +01:00
Michael Nebel
ff29679317 C#: Update expected test output. 2024-02-12 13:27:39 +01:00
Michael Nebel
42f4656667 C#: Data flow for primary constructors. 2024-02-12 13:27:39 +01:00
Michael Nebel
f5d4c49b16 C#: Add some more constructor dataflow tests. 2024-02-12 13:13:06 +01:00
Michael Nebel
86212b24ba C#: Move constructor data flow tests to a separate folder. 2024-02-12 13:13:06 +01:00
Michael Nebel
afe3c5ea8d C#: Re-arrange the code in constructor data flow test and update expected output. 2024-02-12 13:13:06 +01:00
Tamas Vajk
888f47c6c8 Remove cil=false extractor option from integration tests 2024-02-12 12:02:43 +01:00
Tamas Vajk
70b6ae6876 Add comments to nuget.config file restore 2024-02-12 11:59:19 +01:00
Asger F
8d3a19aaad JS: Fix termination criteria
Previously it was theoretically possible to create a cycle of preferred predecessors, since badness had higher precedence than depth. We now require the preferred predecessor to have lower depth.

With this criteria we can remove the arbitray cap on badness.
2024-02-12 11:44:52 +01:00
Asger F
0fbe530d9e JS: Fix some broken comments 2024-02-12 11:39:40 +01:00
Asger F
6d01ba67f7 JS: Check isPrivateLike in isExported instead 2024-02-12 11:39:29 +01:00
Erik Krogh Kristensen
1520305ae1 Merge pull request #15523 from erik-krogh/exclude-tagged
JS: exclude tagged template literals from `js/superfluous-trailing-arguments`
2024-02-12 11:31:18 +01:00
Joe Farebrother
d3fea4044e Apply suggestions from documentation review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-02-12 10:27:56 +00:00
Josh Soref
6779c667f6 Limit xl runner jobs to github org 2024-02-12 05:00:49 -05:00
Paolo Tranquilli
19bb8fe22d Bazel: use bzlmod 2024-02-12 10:55:40 +01:00
Nick Rolfe
b2ee5808f0 Merge pull request #15496 from github/nickrolfe/loc-fresh-ids
Tree-sitter extractors: use fresh IDs for locations
2024-02-12 09:54:09 +00:00
Tamas Vajk
5be3993405 Preserve nuget.config file casing after cleanup 2024-02-12 10:40:33 +01:00
Tamas Vajk
26cea33cc6 C# - Add default nuget feed if there's none 2024-02-12 10:40:33 +01:00
Tamas Vajk
933a8e648d Add integration test for missing nuget package sources 2024-02-12 10:35:49 +01:00
Tony Torralba
cf7091ae5f Merge branch 'main' into atorralba/java/open-redirect-sanitizer 2024-02-12 10:31:52 +01:00
Harry Maclean
51a5c2bbba Ruby: Address doc review comments 2024-02-12 09:16:13 +00:00
Tony Torralba
e6623ebe4c Add change note 2024-02-12 10:10:42 +01:00
Tony Torralba
5f729d57fa Merge pull request #15578 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-02-12 09:24:05 +01:00
Tom Hvitved
b27b89bff7 Merge pull request #15567 from hvitved/csharp/cache-module
C#: Actually cache module `Cached`
2024-02-12 09:15:49 +01:00
Tom Hvitved
9634511ac5 Merge pull request #15489 from hvitved/csharp/lambda-field-flow
C#: Additional tracking of lambdas through fields and properties
2024-02-12 09:14:21 +01:00
Erik Krogh Kristensen
4d65e4e985 Merge pull request #15579 from github/dependabot/cargo/ql/chrono-0.4.34
Bump chrono from 0.4.33 to 0.4.34 in /ql
2024-02-12 08:47:22 +01:00
dependabot[bot]
3212f80bea Bump chrono from 0.4.33 to 0.4.34 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.33 to 0.4.34.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.33...v0.4.34)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 03:38:19 +00:00
github-actions[bot]
3cba1764e2 Add changed framework coverage reports 2024-02-12 00:16:45 +00:00
Tom Hvitved
e75f7dd7f9 Merge pull request #15540 from hvitved/variable-capture-overwrite 2024-02-10 10:25:29 +01:00
Marcono1234
d814decc17 Ruby: Fix formatting in changelog 2024-02-10 00:23:57 +01:00
Robert Marsh
d1160f86e1 C++: Autoformat for named destructors in IR 2024-02-09 22:35:12 +00:00
Robert Marsh
1b571f8992 C++: Accept test changes 2024-02-09 22:32:08 +00:00
Joe Farebrother
16aed18821 Address reviews - Elaborate on docs and update severity 2024-02-09 13:53:36 +00:00
Ian Lynagh
ab758d5f1e Kotlin 2: Accept loc changes in library-tests/parameter-defaults/defaults.expected 2024-02-09 13:53:05 +00:00
Tom Hvitved
37d774176b Ruby: Fix SSA inconsistency 2024-02-09 14:49:26 +01:00
Tom Hvitved
1ea7717714 Capture flow: Take overwrites in nested scopes into account 2024-02-09 14:49:23 +01:00
Tom Hvitved
0c43ad45b4 Ruby: Add another captured variable data flow test 2024-02-09 14:48:36 +01:00
Anders Schack-Mulligen
8fc4fae7d2 Java: Cache interpretElement. 2024-02-09 14:43:36 +01:00
Ian Lynagh
0547c877c2 Kotlin 2: Accept some location changes in library-tests/methods/exprs.expected 2024-02-09 13:34:56 +00:00
Ian Lynagh
be4413ffc8 Kotlin 2: Accept changes in library-tests/methods/parameters.expected
These mostly make things consistent with Kotlin 1.
2024-02-09 13:19:26 +00:00
Ian Lynagh
b836260b9a Kotlin 2: Accept some test changes
I'm not sure these are an improvement, but they bring Kotlin 2 back in
line with Kotlin 1.
2024-02-09 13:15:02 +00:00
Anders Schack-Mulligen
566351a49a Merge pull request #15549 from aschackmull/dataflow/empty-provenance
Dataflow: Add empty provenance column to PathGraph.
2024-02-09 12:58:09 +01:00
Ian Lynagh
1b91695934 Kotlin 2: Accept some location changes in library-tests/methods 2024-02-09 11:57:23 +00:00
Tom Hvitved
9785ce4936 C#: Actually cache module Cached 2024-02-09 12:29:56 +01:00
Max Schaefer
93990ec9df Merge pull request #15486 from github/java/update-mad-decls-after-triage-2024-01-31T11-16-45
Java: Update MaD Declarations after Triage
2024-02-09 11:18:17 +00:00
Mathias Vorreiter Pedersen
a42c845b32 Merge pull request #15559 from MathiasVP/fix-constness-type
C++: Don't strip specifiers in `Node.getType`
2024-02-09 11:00:13 +00:00
Anders Schack-Mulligen
4fcb90298d Dataflow: Add change note. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
088a0a54ba Python: Add empty provenance column to expected files. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
817aa7655f Python: Remove redundant IncludePostUpdateFlow and PhaseDependentFlow application. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
0eaf117f37 Kotlin: Add empty provenance column to expected files. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
7eb5e1833d C++: Add empty provenance column to expected files. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
35a3aa0a09 Ruby: Add empty provenance column to expected files. 2024-02-09 11:32:08 +01:00
Anders Schack-Mulligen
228a61ead3 Swift: Add empty provenance column to expected files. 2024-02-09 11:32:07 +01:00
Anders Schack-Mulligen
3b8af1e52a Go: Add empty provenance column to expected files. 2024-02-09 11:32:07 +01:00
Anders Schack-Mulligen
21a6520cd3 C#: Add empty provenance column to expected files. 2024-02-09 11:32:07 +01:00
Anders Schack-Mulligen
e9e445b2ba Java: Add empty provenance column to expected files. 2024-02-09 11:32:00 +01:00
Mathias Vorreiter Pedersen
dd3d70134c C++: Undo a change that wasn't actually necessary. 2024-02-09 10:28:24 +00:00
Anders Schack-Mulligen
b7d4a6926f Dataflow: Add empty provenance column to PathGraph. 2024-02-09 11:27:30 +01:00
Joe Farebrother
f4b6a85a48 Fix typo in qldoc 2024-02-09 10:09:24 +00:00
Tony Torralba
4c0d535cc2 Merge pull request #12886 from atorralba/atorralba/java/path-injection-mad-sinks
Java: Refactor path injection sinks
2024-02-09 10:48:49 +01:00
Harry Maclean
3a90d78c36 Ruby: Fix Rails view file regex
This picks up non-nested template files correctly.
2024-02-09 09:41:43 +00:00
Tamás Vajk
d46028f552 Merge pull request #15542 from tamasvajk/feature/relative-line-pragma
C#: Try resolve relative paths in line mappings
2024-02-09 10:36:53 +01:00
Harry Maclean
48890b446d Ruby: Add more actioncontroller tests 2024-02-09 09:31:35 +00:00
Max Schaefer
fb109672b3 Address more review feedback. 2024-02-09 09:21:30 +00:00
Tony Torralba
34f74869c8 Java: Add extension point and default sanitizer to Open Redirect query 2024-02-09 09:11:07 +01:00
Ian Lynagh
2852f09a1a Kotlin: Accept test changes in library-tests/java-kotlin-collection-type-generic-methods
I'm not sure exactly what's going on here in general, but I've made a
ticket to remind us to come back and look at this whole area.
2024-02-08 17:44:38 +00:00
Dave Bartolomeo
31cb308d4c Merge pull request #15560 from github/post-release-prep/codeql-cli-2.16.2
Post-release preparation for codeql-cli-2.16.2
2024-02-08 09:42:26 -08:00
Dave Bartolomeo
331355d23f Fix accidental blank line 2024-02-08 12:26:46 -05:00
Dave Bartolomeo
ea004c44f2 Update CHANGELOG.md
Fix accidental blank line
2024-02-08 12:26:21 -05:00
Dave Bartolomeo
9190b109e1 Merge branch 'main' into post-release-prep/codeql-cli-2.16.2 2024-02-08 09:21:18 -08:00
github-actions[bot]
7a2332c1ff Post-release preparation for codeql-cli-2.16.2 2024-02-08 17:17:43 +00:00
Mathias Vorreiter Pedersen
f7d1544ccf C++: Fix Code Scanning errors. 2024-02-08 17:01:07 +00:00
Mathias Vorreiter Pedersen
1dfddaf9ab C++: Also mark indirections of glvalue instructions as glvalue nodes. 2024-02-08 16:52:09 +00:00
Mathias Vorreiter Pedersen
4d01a93107 C++: Use 'getUnderlyingType' instead of 'getUnspecifiedType'. 2024-02-08 16:49:15 +00:00
Mathias Vorreiter Pedersen
78ce857ef2 C++: Add consistency test and accept consistency failures. 2024-02-08 16:16:24 +00:00
Dave Bartolomeo
753d78a695 Merge pull request #15557 from github/release-prep/2.16.2
Release preparation for version 2.16.2
2024-02-08 08:16:00 -08:00
Koen Vlaswinkel
e596862074 Merge pull request #15541 from github/koesie10/ruby-access-path-constructor-returnvalue
Ruby: Remove `ReturnValue` as access path for constructors
2024-02-08 16:25:34 +01:00
github-actions[bot]
36f01ff31a Release preparation for version 2.16.2 2024-02-08 15:25:24 +00:00
Dave Bartolomeo
a1395d5094 Merge pull request #15556 from github/dbartol/revert-release-prep
Revert "Merge pull request #15522 from github/release-prep/2.16.2"
2024-02-08 07:22:25 -08:00
Benjamin Rodes
d4bc2ceb37 Minor efficiency improvements and comments. 2024-02-08 10:11:50 -05:00
Ian Lynagh
f50dab3d93 Kotlin 2: Accept loc changes in library-tests/interface-delegate 2024-02-08 14:45:47 +00:00
Dave Bartolomeo
a58dd45d0b Revert "Merge pull request #15522 from github/release-prep/2.16.2"
This reverts commit c4c8cd6b34, reversing
changes made to 525f27173d.
2024-02-08 09:28:34 -05:00
Dave Bartolomeo
92bd550c55 Merge pull request #15531 from github/post-release-prep/codeql-cli-2.16.2
Post-release preparation for codeql-cli-2.16.2
2024-02-08 05:58:17 -08:00
Max Schaefer
48105db5b0 Fix isNeutral predicates. 2024-02-08 13:22:53 +00:00
Max Schaefer
4b9443eb15 Properly recognise existing models involving subtypes.
If an existing source/sink model specifies `subtypes=True` we should apply it to endpoints on overriding methods.
2024-02-08 13:22:53 +00:00
Max Schaefer
a9c0fed4f5 Add test showing spurious sink candidate from method overriding a method for which we have a model. 2024-02-08 13:22:53 +00:00
Max Schaefer
02547d3839 Improve representation of implicit varargs arrays to more reliably filter out known flow steps. 2024-02-08 13:22:52 +00:00
Maiky
ed030bc617 Merge branch 'main' into maikypedia/swift-zip 2024-02-08 14:17:37 +01:00
Ian Lynagh
e0a5efef0a Merge pull request #15544 from igfoo/igfoo/k2tests
Kotlin 2: Some test fixes
2024-02-08 12:57:58 +00:00
Koen Vlaswinkel
87eb1ab103 Ruby: Include ReturnValue and exclude self for constructors 2024-02-08 13:40:10 +01:00
Maiky
62bd3ac748 Merge branch 'main' into maikypedia/swift-zip 2024-02-08 12:29:46 +01:00
Rasmus Lerchedahl Petersen
5cb71ce7e5 python: remove a use of points-to
This is used by `Scope::isPublic` which in turn is called by the framework model for `setuptools`.

On my current quesry, this had a dramatic effect on the most expensive predicates:

Before
```
Most expensive predicates for completed query FindUses.ql:
        time  | evals |   max @ iter | predicate
        ------|-------|--------------|----------
         1m9s |  2933 | 123ms @ 422  | PointsTo::Expressions::equalityEvaluatesTo/4#ebe72212@cab7d3xr
        43.1s |       |              | FlowSummaryImpl::Private::Steps::summaryLocalStep/3#900fb25e#ffb@8aa78a38
        41.3s |  2936 |  2.1s @ 409  | PointsTo::InterProceduralPointsTo::scope_entry_value_transfer_from_earlier/4#acb2199d@cab7ddxr
        30.2s |  2946 |  67ms @ 847  | PointsTo::PointsToInternal::multi_assignment_points_to/4#28782e93@cab7d0yr
        29.7s |  2930 |  1.9s @ 30   | Extensions::ReModulePointToExtension.pointsTo_helper/1#a84effde@cab7dn4w
        24.9s |  2933 |  84ms @ 414  | PointsTo::Expressions::inequalityEvaluatesTo/4#f0ecfab4@cab7d2xr
        17.9s |  2582 | 306ms @ 31   | MRO::ClassListList.getItem/1#b6c27115#reorder_2_0_1@cab7dw6r
         9.4s |   661 | 991ms @ 1    | SsaCompute::AdjacentUses::varBlockReaches/3#1824ad86@2b6af692
         9.2s |  2738 |  26ms @ 664  | MRO::ClassList.containsSpecial/0#c967dabb#fb@cab7dg4w
         8.9s |  2946 |  12ms @ 917  | PointsTo::Types::getBase/2#0ab04984@cab7du1w
         7.4s |  2946 | 287ms @ 3    | PointsTo::PointsToInternal::points_to_candidate/4#0a587a42@cab7d80w
         7.1s |  2934 |  14ms @ 2    | Constants::ConstantObjectInternal.attribute/3#6d9e12fc@cab7d6zr
         6.8s |  2946 |   9ms @ 48   | PointsTo::InterProceduralPointsTo::callsite_points_to/4#72419c70@cab7dqxr
         6.6s |   234 | 341ms @ 17   | ApiGraphs::API::Impl::rhs/3#2255afc6@a41b31w3
         6.6s |  2946 |  86ms @ 5    | PointsTo::Types::six_add_metaclass/4#f926a4cb@cab7da0w
         6.2s |  2930 | 341ms @ 30   | Extensions::RangeIterationVariableFact.pointsTo/3#662720c9#cpe#124@cab7di2w
         5.9s |   287 |  61ms @ 4    | DataFlowDispatch::TrackAttrReadInput::start/2#67f26627@cc7b56yn
         5.8s |       |              | DataFlowImplCommon::LambdaFlow::viableParamNonLambda/3#3123cc52_201#join_rhs@415f35h0
         5.6s |       |              | FlowSummaryImpl::Private::Steps::viableParam/4#49c13ab8@2c1fcdq1
         5.3s |       |              | FlowSummaryImpl::Private::Steps::viableParam/4#49c13ab8@22590ca9
         5.2s |   233 | 276ms @ 21   | ApiGraphs::API::Impl::use/3#e6c88b66@a41b30w3
         5.1s |  2945 | 177ms @ 4    | PointsTo::PointsToInternal::pointsTo/4#d99f16c6@cab7dj0w
         4.7s |       |              | Flow::ControlFlowNode.toString/0#dispred#e1af144b@410c23a7
         4.6s |   277 |  2.2s @ 6    | DataFlowDispatch::getCallArg/5#21589076@cc7b5vxn
         4.5s |       |              | DataFlowImplCommon::Cached::viableParam/3#61239ead@cc05a1fv
         4.3s |       |              | DataFlowImplCommon::LambdaFlow::viableParamNonLambda/3#3123cc52@cb992b2h
         4.1s |       |              | _AstExtended::AstNode.getLocation/0#dispred#6b4dcb62_10#join_rhs_DataFlowPublic::Node.getLocation/0#__#shared@6ae639js
           4s |       |              | Files::Location.toString/0#dispred#7e7e0516@b72abbo2
         3.7s |       |              | locations_ast_234501#join_rhs@0859685o
         3.7s |    10 |  1.7s @ 1    | ObjectInternal::ObjectInternal.toString/0#dispred#0b2e9429@6e8a4yh7
         3.6s |  2942 |  63ms @ 94   | PointsTo::InterProceduralPointsTo::call_points_to_from_callee/4#394022a8@cab7d90w
         3.6s |   232 | 213ms @ 18   | ApiGraphs::API::Impl::trackDefNode/2#8e3c4e6d@a41b33w3
         3.6s |  2933 |   7ms @ 884  | PointsTo::Types::getInheritedMetaclass/2#097d39df#bff@cab7dr1w
         3.6s |  2946 |  1.3s @ 13   | PointsTo::PointsToInternal::ssa_node_refinement_points_to/4#8ea6486b@cab7dnxr
         3.5s |  1319 | 387ms @ 3    | SsaCompute::SsaDefinitions::reachesEndOfBlock/4#214bd902@fce54web
         3.5s |  1320 | 385ms @ 2    | SsaCompute::SsaDefinitions::reachesEndOfBlockRec/4#63bb2cd4@fce54xeb
         3.4s |  4861 | 478ms @ 2    | SsaCompute::SsaComputeImpl::ssaDefReachesRank/4#f19c6fee@cc8515rd
         3.3s |       |              | _AstExtended::AstNode.getLocation/0#dispred#6b4dcb62_10#join_rhs_DataFlowPublic::Node.getLocation/0#__#higher_order_body@47ba63n6
         3.3s |       |              | DataFlowPublic::Node.toString/0#dispred#af9c307a@4d16e7m6
         3.3s |  2946 |  28ms @ 3    | PointsTo::PointsToInternal::reachableEdge/3#d3f53c12@cab7do7w
         2.9s |   233 | 110ms @ 19   | ApiGraphs::API::Impl::trackUseNode/2#a0b4384d@a41b32w3
         2.8s |    31 |  2.2s @ 9    | _Class::Class.getAMethod/0#dispred#66416e47_DataFlowDispatch::findFunctionAccordingToMroKnownStartin__#antijoin_rhs@L6#cc7b5
         2.8s |  2737 |  21ms @ 444  | MRO::ClassListList.removedClassParts/4#de59b06f#reorder_2_3_4_0_1@cab7d06w
         2.8s |  1322 | 462ms @ 4    | SsaCompute::Liveness::liveAtExit/2#b6aa63f4@6fd4cx73
         2.8s |  2946 | 187ms @ 5    | PointsTo::Expressions::builtinCallPointsTo/5#3aa7f48b@cab7dwwr
         2.8s |  2939 |  41ms @ 7    | PointsTo::PointsToInternal::use_points_to/4#ff1d0edd@cab7df0w
         2.7s |  2946 |  20ms @ 92   | PointsTo::Conditionals::evaluates/5#736734b2#fbffff#reorder_5_0_2_1_3_4@cab7dp5w
         2.6s |  2946 | 152ms @ 5    | Constants::callToBool/2#0b9b1e8d@cab7dn7w
         2.5s |   287 |  24ms @ 4    | DataFlowDispatch::resolveClassInstanceCall/3#6e09c292@cc7b53xn
         2.4s |  2946 |  31ms @ 5    | PointsTo::AttributePointsTo::variableAttributePointsTo/5#60adcc49@cab7dpwr

[2024-02-08 10:44:37] Total evaluation times for this run:
        * Wall-clock duration of evaluation run: 1231.1 seconds
        * Total time spent evaluating predicates: 1167.1 seconds
```

After
```
Most expensive predicates for completed query FindUses.ql:
        time  | evals |   max @ iter | predicate
        ------|-------|--------------|----------
        41.6s |       |              | FlowSummaryImpl::Private::Steps::summaryLocalStep/3#900fb25e#ffb@85aaaac1
         9.2s |   661 | 905ms @ 1    | SsaCompute::AdjacentUses::varBlockReaches/3#1824ad86@2b6af692
         7.6s |   234 | 502ms @ 19   | ApiGraphs::API::Impl::rhs/3#2255afc6@ce6d11wc
         6.7s |       |              | DataFlowImplCommon::LambdaFlow::viableParamNonLambda/3#3123cc52_201#join_rhs@fd1dc5mi
           6s |   287 |  80ms @ 113  | DataFlowDispatch::TrackAttrReadInput::start/2#67f26627@925826yr
         5.7s |       |              | FlowSummaryImpl::Private::Steps::viableParam/4#49c13ab8@851052bl
         5.6s |   233 | 289ms @ 21   | ApiGraphs::API::Impl::use/3#e6c88b66@ce6d10wc
         5.4s |       |              | FlowSummaryImpl::Private::Steps::viableParam/4#49c13ab8@f2c42d17
         4.8s |   277 |  2.4s @ 6    | DataFlowDispatch::getCallArg/5#21589076@92582vxr
         4.7s |       |              | DataFlowImplCommon::Cached::viableParam/3#61239ead@ac08e0nf
         4.7s |       |              | DataFlowImplCommon::LambdaFlow::viableParamNonLambda/3#3123cc52@82ff50ql
         4.6s |       |              | Files::Location.toString/0#dispred#7e7e0516@b72abbo2
         4.3s |       |              | Flow::ControlFlowNode.toString/0#dispred#e1af144b@410c23a7
         4.2s |   232 | 249ms @ 19   | ApiGraphs::API::Impl::trackDefNode/2#8e3c4e6d@ce6d13wc
         3.8s |       |              | _AstExtended::AstNode.getLocation/0#dispred#6b4dcb62_10#join_rhs_DataFlowPublic::Node.getLocation/0#__#shared@0ac73425
         3.6s |  1319 | 354ms @ 1    | SsaCompute::SsaDefinitions::reachesEndOfBlock/4#214bd902@fce54web
         3.6s |  1320 | 381ms @ 2    | SsaCompute::SsaDefinitions::reachesEndOfBlockRec/4#63bb2cd4@fce54xeb
         3.4s |       |              | _AstExtended::AstNode.getLocation/0#dispred#6b4dcb62_10#join_rhs_DataFlowPublic::Node.getLocation/0#__#higher_order_body@9e946ea8
         3.4s |  4861 | 474ms @ 2    | SsaCompute::SsaComputeImpl::ssaDefReachesRank/4#f19c6fee@cc8515rd
         3.1s |    31 |  2.5s @ 9    | _Class::Class.getAMethod/0#dispred#66416e47_DataFlowDispatch::findFunctionAccordingToMroKnownStartin__#antijoin_rhs@L6#92582
           3s |    53 | 114ms @ 48   | DataFlowDispatch::TrackAttrReadInput::start/2#67f26627@9ab38jw0
           3s |   233 | 126ms @ 20   | ApiGraphs::API::Impl::trackUseNode/2#a0b4384d@ce6d12wc
           3s |       |              | locations_ast_234501#join_rhs@0859685o
           3s |       |              | DataFlowPublic::Node.toString/0#dispred#af9c307a@a2145cqf
         2.8s |   234 | 206ms @ 21   | _ApiGraphs::API::Impl::MkDef#51c2f877#prev_ApiGraphs::API::Impl::trackDefNode/1#7e78e336#prev_delta___#antijoin_rhs#1@L9#ce6d1
         2.8s |  1322 | 447ms @ 4    | SsaCompute::Liveness::liveAtExit/2#b6aa63f4@6fd4cx73
         2.7s |   230 | 176ms @ 28   | ApiGraphs::API::Impl::MkDef#51c2f877@ce6d1w9c
         2.5s |   287 |  50ms @ 112  | DataFlowDispatch::resolveClassInstanceCall/3#6e09c292@925823xr
         2.4s |   234 | 246ms @ 19   | _ApiGraphs::API::Impl::MkDef#51c2f877#prev_ApiGraphs::API::Impl::trackDefNode/1#7e78e336#prev_delta___#antijoin_rhs@L4#ce6d1
         2.3s |       |              | TaintTrackingPrivate::localAdditionalTaintStep/2#a2ec8c9d@e31201hd
         2.2s |    53 |  72ms @ 15   | DataFlowDispatch::TrackAttrReadInput::start/2#67f26627@96b28jwo
         2.2s |       |              | SensitiveDataSources::SensitiveDataModeling::sensitiveString/1#fdc3ad40@41f6ee2g
           2s |       |              | DataFlowImplCommon::Cached::viableParamArg/3#4c55eddb@8f7f25oq
           2s |       |              | Flow::ControlFlowNode.getExprChild/1#e757d179#bbf@db51e8ed
         1.9s |       |              | project#FlowSummaryImpl::Private::Steps::viableParam/4#49c13ab8#2@e36c2dr8
         1.9s |       |              | DataFlowPublic::Node.hasLocationInfo/5#dispred#b79d995f@6e929dfv
         1.7s |    15 | 433ms @ 1    | PoorMansFunctionResolution::poorMansFunctionTracker/2#75430e01@e5202dnv
         1.7s |       |              | #ImportResolution::ImportResolution::allowedEssaImportStep/2#f4117c61Plus#swapped@60d9daea
         1.7s |    29 | 633ms @ 6    | _Class::Class.getAMethod/0#dispred#66416e47_Function::Function.getName/0#dispred#033700ef_10#join_rh__#antijoin_rhs@L4#92582
         1.5s |   233 |  79ms @ 24   | ApiGraphs::API::Impl::trackUseNode/1#1af3a9ea@ce6d16wc
         1.5s |       |              | ApiGraphs::API::Impl::edge/3#8453bf65@1bd8a6ja
         1.5s |       |              | ApiGraphs::API::Node.getAValueReachableFromSource/0#dispred#9a406fb1@5dbb806u
         1.3s |  1323 | 178ms @ 13   | SsaCompute::Liveness::liveAtEntry/2#bab3ea7c@6fd4cw73
         1.3s |       |              | SsaCompute::SsaComputeImpl::defUseRank/4#782a2f48@0f27919s
         1.3s |       |              | DataFlowDispatch::LibraryCallable.getACall/0#dispred#66a01171#fb@96b65frd
         1.3s |       |              | ApiGraphs::API::Node.getAValueReachableFromSource/0#dispred#9a406fb1_10#join_rhs@c1dd43nv
         1.3s |       |              | FlowSummaryImpl::Private::SummaryNode.toString/0#dispred#d499e234@63bd684g
         1.2s |       |              | DataFlowDispatch::LibraryCallable.getACall/0#dispred#66a01171#fb@eaebb27g
         1.2s |       |              | _DataFlowPublic::Node#da3b6093_DataFlowPublic::Node.asExpr/0#dispred#2845197a_py_exprs#antijoin_rhs@fcd8c3kj
         1.2s |       |              | #ImportResolution::ImportResolution::allowedEssaImportStep/2#f4117c61Plus#swapped@c3f634us

[2024-02-08 11:43:50] Total evaluation times for this run:
        * Wall-clock duration of evaluation run: 636.9 seconds
        * Total time spent evaluating predicates: 562.4 seconds
```
2024-02-08 12:20:56 +01:00
Anders Schack-Mulligen
bcfce56ef6 Merge pull request #15547 from aschackmull/csharp/contentdataflow
C#: Simplify, getASuccessor is pruned now.
2024-02-08 11:15:14 +01:00
Anders Schack-Mulligen
dfc9c4d079 C#: Simplify, getASuccessor is pruned now. 2024-02-08 10:36:55 +01:00
Michael Nebel
a54caeaf61 Merge pull request #15545 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-02-08 08:55:41 +01:00
Tamás Vajk
290c3454c8 Merge pull request #15535 from tamasvajk/buildless/winforms-usings
C# Add missing Windows Forms implicit usings
2024-02-08 08:20:05 +01:00
github-actions[bot]
070402d3ae Add changed framework coverage reports 2024-02-08 00:15:53 +00:00
Tamas Vajk
1c7e6e769b C#: Try resolve relative paths in line mappings 2024-02-07 23:48:58 +01:00
Benjamin Rodes
915aa94b13 Merge branch '51-2cppnon-constant-format-alter-not-const-source' of https://github.com/microsoft/codeql into 51-2cppnon-constant-format-alter-not-const-source 2024-02-07 14:15:40 -05:00
Benjamin Rodes
f12a1ecdf2 Simplifying the query. 2024-02-07 14:15:16 -05:00
Ben Rodes
2c962d51a9 Merge branch 'main' into 51-2cppnon-constant-format-alter-not-const-source 2024-02-07 10:57:31 -08:00
Benjamin Rodes
50134e644f Merge branch '50-model-gettext-family-of-string-operations' into 51-2cppnon-constant-format-alter-not-const-source
# Conflicts:
#	cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
2024-02-07 13:56:39 -05:00
Benjamin Rodes
9fc2405681 Updating non-const source logic and associated tests and expected files. 2024-02-07 13:54:56 -05:00
Robert Marsh
174966164d Merge branch 'main' into rdmarsh2/cpp/ir-synthetic-destructors 2024-02-07 18:25:12 +00:00
Ian Lynagh
ef8e6c8805 Kotlin 2: Accept loc changes in library-tests/exprs/funcExprs.expected 2024-02-07 16:40:40 +00:00
Ian Lynagh
8a93133b81 Kotlin 2: Accept loc changes in library-tests/exprs/unaryOp.expected 2024-02-07 16:21:49 +00:00
Ian Lynagh
c314cc8b68 Kotlin 2: Accept some location changes in library-tests/exprs/binop.expected 2024-02-07 15:56:10 +00:00
Henry Mercer
23921afd8d Merge pull request #15532 from github/henrymercer/add-build-modes
Add supported build modes to extractor metadata
2024-02-07 15:54:44 +00:00
Mathias Vorreiter Pedersen
ebefcb8d35 Merge pull request #15513 from microsoft/50-model-gettext-family-of-string-operations
Added model for gettext variants.
2024-02-07 15:48:16 +00:00
Ian Lynagh
c731251e61 Kotlin 2: Remove an unused diagnostic matcher in library-tests/dataflow/func 2024-02-07 15:32:04 +00:00
Paolo Tranquilli
b105d0cf9a Bazel/CMake: be more lenient with aquery
It turns out `bazel aquery` is not so well behaved on Windows, so we
need to accept that it reports errors and exits with an error.
2024-02-07 16:25:54 +01:00
Mathias Vorreiter Pedersen
0ee3c9987f Merge pull request #15539 from MathiasVP/fix-ir-gen-for-conditional-decl-expr-without-var-access
C++: Fix IR generation when `ConditionDeclExpr` does not have an immediate `VariableAccess`
2024-02-07 15:19:16 +00:00
Ian Lynagh
3d1f9a79fb Kotlin 2: Accept location changes in test-kotlin2/library-tests/data-classes 2024-02-07 15:17:40 +00:00
Benjamin Rodes
5866fc1fd0 Updating expected file. 2024-02-07 10:12:25 -05:00
Ian Lynagh
1c6108028b Kotlin 2: Accept some location changes for arrays 2024-02-07 15:12:17 +00:00
maikypedia
ed052ccc26 Change note 2024-02-07 15:58:10 +01:00
Mathias Vorreiter Pedersen
df181f2dc4 C++: Accept more test changes. 2024-02-07 14:50:18 +00:00
Mathias Vorreiter Pedersen
23677b23c2 Merge pull request #15537 from MathiasVP/swap-also-clears-first-argument
C++: Also clear the `0`'th argument of `swap`
2024-02-07 14:35:31 +00:00
Mathias Vorreiter Pedersen
950b5f2235 C++: Block flow out of 'gettext' in 'cpp/non-constant-format'. (#52) 2024-02-07 09:10:12 -05:00
Tamas Vajk
4eeca02da6 Change file content string comparisons to be case invariant 2024-02-07 14:58:19 +01:00
maikypedia
1a499cf388 Update expected 2024-02-07 14:38:21 +01:00
Koen Vlaswinkel
8646bffaea Ruby: Remove ReturnValue as access path for constructors 2024-02-07 14:35:19 +01:00
Maiky
7c0f80ff7d Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-02-07 14:32:42 +01:00
Maiky
7fb72ea81f Redundant import 2024-02-07 14:30:16 +01:00
Maiky
c6fb303d63 Suggested changes
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-02-07 14:27:40 +01:00
Maiky
9ce75dac0e Update UnsafeUnpackQuery.qll 2024-02-07 14:26:56 +01:00
Max Schaefer
082754a3d8 Remove problematic Kotlin model. 2024-02-07 13:21:59 +00:00
Mathias Vorreiter Pedersen
fe5eca4134 C++: Accept test changes. 2024-02-07 11:45:40 +00:00
Mathias Vorreiter Pedersen
edc7903c69 C++: Add a predicate for getting the 0'th child of a 'ConditionDeclExpr' without casting it to a 'VariableAccess' and use it in IR generation. 2024-02-07 11:45:13 +00:00
Mathias Vorreiter Pedersen
d0b0440427 C++: Add a testcase with failing IR generation. 2024-02-07 11:38:02 +00:00
Mathias Vorreiter Pedersen
4b046ad670 C++: Also clear the 0'th argument of 'swap'. 2024-02-07 10:31:18 +00:00
Paolo Tranquilli
9cfef6e42f Bazel/CMake: auto detect all cc_binary/cc_test targets 2024-02-07 11:11:30 +01:00
Mathias Vorreiter Pedersen
c5dc88345d Merge pull request #15528 from MathiasVP/flow-barrier-interface
C++: Add an interface for models to block flow
2024-02-07 09:58:08 +00:00
Tamas Vajk
b8dbb8c866 C# Add missing Windows Forms implicit usings 2024-02-07 10:41:21 +01:00
Michael B. Gale
781486172e Merge pull request #15534 from github/dependabot/go_modules/go/extractor/extractor-dependencies-cd731e5d14 2024-02-07 08:35:11 +00:00
Michael Nebel
167a8f0e4a Merge pull request #15459 from michaelnebel/csharp/spansummaries
C#: Add summaries for Span<T> and ReadOnlySpan<T>.
2024-02-07 08:54:19 +01:00
Tamás Vajk
54c9135936 Merge pull request #15518 from tamasvajk/feature/telemetry-dependency-manager
C#: Extract dependency restore telemetry data
2024-02-07 08:14:01 +01:00
dependabot[bot]
565426940c Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/mod](https://github.com/golang/mod).


Updates `golang.org/x/mod` from 0.14.0 to 0.15.0
- [Commits](https://github.com/golang/mod/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 03:32:07 +00:00
Robert Marsh
5653c3f972 C++: Update IR test expectations for named destructors 2024-02-06 21:04:52 +00:00
Jonathan Leitschuh
1484a169d7 Reduce severity of java/relative-path-command
Significantly reduces the severity of `java/relative-path-command` from 9.8 to 5.4

https://www.first.org/cvss/calculator/4.0#CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
2024-02-06 15:43:19 -05:00
Mathias Vorreiter Pedersen
3b43f848c9 Merge pull request #15529 from MathiasVP/delete-get-interval-updated-by-chi 2024-02-06 19:55:24 +00:00
Henry Mercer
e71f0fc1ba Add supported build modes to extractor metadata 2024-02-06 19:51:13 +00:00
github-actions[bot]
b5139078d0 Post-release preparation for codeql-cli-2.16.2 2024-02-06 19:22:35 +00:00
Benjamin Rodes
80bf38d8cc Initial working draft of non-const source refactor. 2024-02-06 14:20:01 -05:00
Benjamin Rodes
5e5fea8ef3 Merge branch '50-model-gettext-family-of-string-operations' into 51-2cppnon-constant-format-alter-not-const-source 2024-02-06 12:47:08 -05:00
Mathias Vorreiter Pedersen
b68824a337 C#: Sync identical files. 2024-02-06 17:41:11 +00:00
Mathias Vorreiter Pedersen
7948911415 C++: Delete dead code. 2024-02-06 17:38:22 +00:00
Erik Krogh Kristensen
43f1189615 Merge pull request #15526 from github/erik-krogh/fix-jndi-typo
Java: fix typo in JndiInjection.qhelp
2024-02-06 17:39:25 +01:00
Mathias Vorreiter Pedersen
f7fe84adb4 C++: Add change note. 2024-02-06 16:23:59 +00:00
Mathias Vorreiter Pedersen
21b9b3b87f C++: Accept test changes. 2024-02-06 16:15:22 +00:00
Mathias Vorreiter Pedersen
359b6e14c6 C++: Block flow out of 'swap'. 2024-02-06 16:15:21 +00:00
Mathias Vorreiter Pedersen
e539aca337 C++: Add an interface for blocking flow out of functions that reach a certain argument. 2024-02-06 16:15:21 +00:00
Robert Marsh
40e06b7877 C++: suppress destructor calls on delete in IR generation
This avoids an issue with duplicated qualifiers that was causing broken control flow
2024-02-06 14:55:00 +00:00
Dave Bartolomeo
c4c8cd6b34 Merge pull request #15522 from github/release-prep/2.16.2
Release preparation for version 2.16.2
2024-02-06 06:21:14 -08:00
Erik Krogh Kristensen
879d882fa4 Java: fix typo in JndiInjection.qhelp 2024-02-06 15:17:30 +01:00
Benjamin Rodes
fc509c2cbe Added additional gettext variant test. 2024-02-06 09:17:10 -05:00
Ben Rodes
0023291903 Update cpp/ql/src/change-notes/2024-02-05-gettext-dataflows.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-02-06 09:12:25 -05:00
Michael Nebel
2e4786c2ab C#: Update flow summaries expected output test. 2024-02-06 14:06:07 +01:00
Michael Nebel
31b0da7639 C#: Update models for Except and DefaultIfEmpty. 2024-02-06 14:00:59 +01:00
Max Schaefer
705a377060 Address review comments. 2024-02-06 12:54:29 +00:00
Tamás Vajk
681c37d5fc Code quality improvement
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-02-06 13:49:08 +01:00
Mathias Vorreiter Pedersen
33cefabe27 Update cpp/ql/src/CHANGELOG.md 2024-02-06 11:05:22 +00:00
Mathias Vorreiter Pedersen
6c1e3b1ba6 Update cpp/ql/src/change-notes/released/0.9.4.md 2024-02-06 11:02:15 +00:00
Michael Nebel
b41758fb39 C#: Update summaries for Enumerable.DefaultIfEmpty to target elements in the return value. 2024-02-06 11:24:02 +01:00
Koen Vlaswinkel
8361efca4d Merge pull request #15503 from github/koesie10/ruby-access-paths
Ruby: Add query for access paths in model editor
2024-02-06 10:12:26 +01:00
Erik Krogh Kristensen
cec124c0be Merge pull request #15480 from ockers/ockers/certification_not_certificate
False positive in SensitiveDataHeuristics - exclude certification from maybeCertificate() regex
2024-02-06 09:40:25 +01:00
erik-krogh
94b7bda3dc exclude tagged template literals from js/superfluous-trailing-arguments 2024-02-06 09:36:30 +01:00
erik-krogh
4e176236e7 add a definition of user 2024-02-06 09:21:35 +01:00
erik-krogh
44fe34a37d use the correct string type in the tainted-path examples 2024-02-06 09:20:27 +01:00
Tamas Vajk
e4a4e3af39 Update DB stats 2024-02-06 08:18:27 +01:00
Jim Ockers
01e8109b71 Merge branch 'main' into ockers/certification_not_certificate 2024-02-05 13:42:00 -08:00
Robert Marsh
8013c2a074 C++: QLDoc and naming updates for implicit destructors in IR 2024-02-05 19:14:56 +00:00
Robert Marsh
bbabf1dfcc C++: add test for constructors in C++17 decl-in-if 2024-02-05 18:41:18 +00:00
Benjamin Rodes
256554df06 Added change log 2024-02-05 13:04:16 -05:00
Benjamin Rodes
5b2d15265f gettext variant dataflow tests 2024-02-05 13:01:51 -05:00
github-actions[bot]
c1b35fbf47 Release preparation for version 2.16.2 2024-02-05 17:58:57 +00:00
Harry Maclean
f792b58421 Ruby: Recognise more ActiveRecord connections 2024-02-05 16:45:59 +00:00
Joe Farebrother
525f27173d Merge pull request #15396 from joefarebrother/android-sensitive-ui-text
Java: Add query for sensitive data exposed in text fields
2024-02-05 15:47:03 +00:00
Koen Vlaswinkel
6a098120e3 Rename details to node 2024-02-05 16:33:29 +01:00
Koen Vlaswinkel
49dbad96f9 Switch from details string to DataFlow::Node 2024-02-05 16:33:01 +01:00
Ben Rodes
e47df5c7bc Update NonConstantFormat.ql
Removed dead comment
2024-02-05 09:39:05 -05:00
Ben Rodes
88a06ffc66 Update GetText.qll
Fixing issue based on review.
2024-02-05 09:18:30 -05:00
Tamas Vajk
809da54229 Revert unneeded changes and simplify code 2024-02-05 14:21:13 +01:00
erik-krogh
a6b094cf53 delete the rendered markdown again 2024-02-05 13:54:13 +01:00
Tamas Vajk
24a7a7644d Remove superfluous conjunct to improve code quality 2024-02-05 13:50:20 +01:00
Tamas Vajk
397d814c8b Add change note 2024-02-05 13:48:28 +01:00
Tamas Vajk
5d08dc748d Add DB upgrade downgrade script 2024-02-05 13:45:31 +01:00
Tamas Vajk
c2c7826936 C#: Extract dependency restore telemetry data 2024-02-05 13:09:04 +01:00
erik-krogh
a240618ae4 generate the new rendered markdown 2024-02-05 13:09:02 +01:00
erik-krogh
8160291be1 copy (and adjust) the path-injection QHelp from Java to C# 2024-02-05 13:08:44 +01:00
Harry Maclean
03ab3c1a5d Ruby: Fix title underline 2024-02-05 11:15:53 +00:00
Harry Maclean
6748f6e5c7 Ruby: Add docs for MaD 2024-02-05 11:07:23 +00:00
erik-krogh
9dfac3a4cc move qhelp samples to an examples folder 2024-02-05 11:20:24 +01:00
erik-krogh
b8dc633864 add cs/path-injection as markdown to make nicer diffs 2024-02-05 11:16:16 +01:00
Tony Torralba
6fbbb82f68 Merge pull request #15517 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-02-05 08:45:57 +01:00
github-actions[bot]
ee5df7bf58 Add changed framework coverage reports 2024-02-05 00:16:44 +00:00
Jim Ockers
e477909200 Merge branch 'main' into ockers/certification_not_certificate 2024-02-02 15:39:29 -08:00
Benjamin Rodes
e8587d060d Removing comments and formatting. 2024-02-02 16:23:14 -05:00
Benjamin Rodes
9577c35d85 Incremental update to NonConstantFormat.ql 2024-02-02 16:06:59 -05:00
James Ockers
9f7f9fcc6e Updating change-notes to reflect what will be the visible change to end users 2024-02-02 11:38:17 -08:00
Robert Marsh
2d010f69c6 C++: Test for destructors in declaration as if condition 2024-02-02 17:39:27 +00:00
Robert Marsh
984c7ab85a C++: test for declarations in if statement 2024-02-02 17:39:26 +00:00
Robert Marsh
4513fd1b52 C++: test for destructors in range-based for 2024-02-02 17:39:26 +00:00
Robert Marsh
820f4a5571 C++: custom destructor handling for for loops 2024-02-02 17:39:23 +00:00
Robert Marsh
85d1d079c8 C++: Add implicit named destructosrs to the IR CFG 2024-02-02 17:36:02 +00:00
Joe Farebrother
596f48ca95 Add change note 2024-02-02 17:35:07 +00:00
Joe Farebrother
5022adba56 Fixes to qhelp example 2024-02-02 17:26:00 +00:00
Joe Farebrother
3878192810 Apply suggestions from documentation review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-02-02 17:21:23 +00:00
Joe Farebrother
71852868ac Add case for androidx.biometric api 2024-02-02 17:19:20 +00:00
Robert Marsh
3a404cec67 C++: Add getLastInstruction to IR generation 2024-02-02 17:10:47 +00:00
Benjamin Rodes
022276badc Added model for gettext variants. 2024-02-02 12:05:52 -05:00
Robert Marsh
47720e0998 C++: generate instructions for destructor calls in IR 2024-02-02 17:05:40 +00:00
Ian Lynagh
643817e74e Merge pull request #15477 from igfoo/igfoo/kot_path_trans
Kotlin: Add path transformer support
2024-02-02 15:34:14 +00:00
Mathias Vorreiter Pedersen
8d53bce842 Merge pull request #15476 from geoffw0/preprocblock
C++: Add PreprocBlock.qll library
2024-02-02 15:06:17 +00:00
Nick Rolfe
514a92d5bd Tree-sitter extractors: use fresh IDs for locations
Since locations for any given source file are never referenced in any
TRAP files besides the one for that particular source file, it's not
necessary to use global IDs. Using fresh IDs will reduce the size of the
ID pool (both on disk and in memory) and the speed of multi-threaded
TRAP import.

The one exception is the empty location, which still uses a global ID.
2024-02-02 15:06:10 +00:00
Joe Farebrother
2a00375bb7 Add documentation 2024-02-02 14:34:43 +00:00
Max Schaefer
21c0422dc7 Merge pull request #15499 from github/max-schaefer/automodel-functional-interface-expr
Automodel: Do not consider `@FunctionalInterface`-typed expressions as candidates.
2024-02-02 14:28:41 +00:00
Michael Nebel
4acce3276a C#: Update FlowSummaries expected output test. 2024-02-02 14:47:45 +01:00
Michael Nebel
f6e3027321 C#: Add summaries for Span<T> and ReadOnlySpan<T> extension methods. 2024-02-02 14:47:45 +01:00
Michael Nebel
91d844316a C#: Add some tests with expected output. 2024-02-02 14:47:45 +01:00
Michael Nebel
7f5d2e1f44 C#: Update flowsummaries expected output. 2024-02-02 14:47:44 +01:00
Michael Nebel
6ff22622ca C#: Add summaries for Span<T> and ReadOnlySpan<T>. 2024-02-02 14:47:44 +01:00
Jeroen Ketema
6b13a8c568 Merge pull request #15504 from MathiasVP/block-summary-flow-out-of-strdup-and-friends
C++: Block summary flow through `strdup` and friends
2024-02-02 14:47:05 +01:00
Anders Schack-Mulligen
f631c01fe2 Merge pull request #15511 from aschackmull/java/adjust-mad-abstractstringbuilder
Java: Remove two redundant models implied by CharSequence models.
2024-02-02 14:45:06 +01:00
Michael Nebel
bf94a75698 Merge pull request #15502 from michaelnebel/csharp/refstructdataflow
C#: Inter-procedural dataflow for `ref` structs when used as arguments.
2024-02-02 14:44:51 +01:00
Koen Vlaswinkel
f83d2a7d55 Ruby: Avoid using toString where possible 2024-02-02 14:18:21 +01:00
Koen Vlaswinkel
ac1ebf27a7 Ruby: Rename suggestion predicates 2024-02-02 14:18:16 +01:00
Tom Hvitved
6df313b9d1 Merge pull request #15509 from hvitved/csharp/node-reuse-dependency-fetching
C#: Disable msbuild node reuse in dependency fetcher
2024-02-02 13:54:53 +01:00
Geoffrey White
72948cbc46 C++: Remove all cached tags. 2024-02-02 12:23:06 +00:00
Anders Schack-Mulligen
49b00f3842 Java: Remove two redundant models implied by CharSequence models. 2024-02-02 13:17:26 +01:00
Mathias Vorreiter Pedersen
439d3d2438 C++: Add tests with higher level of indirection. 2024-02-02 12:09:46 +00:00
Mathias Vorreiter Pedersen
0729c602c5 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-02-02 10:39:40 +00:00
Geoffrey White
56538472cf C++: Update the change note. 2024-02-02 09:55:44 +00:00
Geoffrey White
7c37be2e88 C++: Address implicit this. 2024-02-02 09:49:13 +00:00
Mathias Vorreiter Pedersen
b0393287cd Merge pull request #15421 from jketema/unique-function-fix
C++: Ensure that only one Function exists for every function - take 2
2024-02-02 09:42:32 +00:00
Tom Hvitved
fa3130cc95 C#: Disable msbuild node reuse in dependency fetcher 2024-02-02 10:15:33 +01:00
Tamás Vajk
5ab4ed1b3b Merge pull request #15505 from tamasvajk/feature/improve-logs
C#: Improve messages in buildless extraction logs
2024-02-02 09:22:17 +01:00
Mathias Vorreiter Pedersen
6f5ed9ad3b C++: Accept test changes. 2024-02-01 20:15:15 +00:00
Mathias Vorreiter Pedersen
5ad3e97798 C++: Fix TODO by blocking summary flow through functions that don't preserve identity. 2024-02-01 20:15:15 +00:00
Asger F
8a2485a22f JS: Address some comments 2024-02-01 20:54:27 +01:00
Ian Lynagh
68f267798e Kotlin: Add support for path transformers 2024-02-01 18:07:47 +00:00
Joe Farebrother
88c2ccbecf Generate stubs 2024-02-01 16:59:50 +00:00
Joe Farebrother
5d1edd45c5 Add unit tests 2024-02-01 16:56:20 +00:00
Tamas Vajk
7b554636ae C#: Improve messages in buildless extraction logs 2024-02-01 16:45:59 +01:00
Koen Vlaswinkel
8853acb4dd Ruby: Add query for access paths in model editor 2024-02-01 16:20:00 +01:00
Jeroen Ketema
6db68c067f C++: Update stats file 2024-02-01 16:12:53 +01:00
Jeroen Ketema
05e78f14a4 C++: Add upgrade and downgrade scripts 2024-02-01 16:12:53 +01:00
Jeroen Ketema
a79754b696 C++: Resolve functions using complete mangled names 2024-02-01 16:12:53 +01:00
Jeroen Ketema
972d86c0a0 C++: Add column to mangled_name table with completeness information 2024-02-01 16:12:53 +01:00
Mathias Vorreiter Pedersen
1ac75def2b C++: Add another testcase with spurious summary flow. 2024-02-01 15:11:52 +00:00
Joe Farebrother
9098428c2a Add security severity 2024-02-01 14:28:14 +00:00
Michael Nebel
551a7f9577 C#: Update expected test output. 2024-02-01 15:04:06 +01:00
Michael Nebel
9191acc412 C#: Prevent flow out of non ref fields in ref structs used as arguments. 2024-02-01 15:04:06 +01:00
Michael Nebel
4a89cbe8ea C#: Add postupdate nodes for arguments of struct type. 2024-02-01 15:04:06 +01:00
Michael Nebel
4dfeff38f9 C#: Add dataflow field test for ref structs with ref and ordinary fields. 2024-02-01 15:04:06 +01:00
Michael B. Gale
73d0b7ef49 Merge pull request #15492 from github/mbg/go/include-versions-in-newer-diagnostic
Go: Include versions in newer Go version needed diagnostic
2024-02-01 12:22:27 +00:00
Tom Hvitved
8972133d4b Merge pull request #15498 from hvitved/ruby/ctx-sensitivity-test
Ruby: Add another dataflow test
2024-02-01 12:46:53 +01:00
Henti Smith
16e62e6649 Merge pull request #15475 from github/henti/update_dotnet
Updated dotnet version to 8.0.101
2024-02-01 11:25:21 +00:00
Max Schaefer
e47b021050 Do not consider expressions as candidates whose type is annotated with @FunctionalInterface. 2024-02-01 11:04:14 +00:00
Tom Hvitved
bfe4a4bf0b C#: Additional tracking of lambdas through fields and properties 2024-02-01 11:51:00 +01:00
Tom Hvitved
817d04c087 C#: Add more delegate flow tests 2024-02-01 11:51:00 +01:00
Tom Hvitved
5080077038 Merge pull request #15484 from hvitved/csharp/qualified-delegate-extraction-fix
C#: Fix extraction of qualified delegate calls
2024-02-01 11:50:09 +01:00
Tom Hvitved
d1ed317832 C#: Add tests for qualified delegate pointer calls 2024-02-01 10:59:05 +01:00
Tom Hvitved
792f302bd4 Ruby: Add another dataflow test 2024-02-01 10:52:06 +01:00
Koen Vlaswinkel
ce4d8d6b51 Merge pull request #15490 from github/koesie10/ruby-model-constructor-on-new
Ruby: Model constructors in endpoint query on new instead of initialize
2024-02-01 09:31:49 +01:00
Tamás Vajk
1478709382 Merge pull request #15491 from tamasvajk/feature/node-reuse-autobuild
C#: Disable msbuild node reuse in autobuild
2024-02-01 09:26:32 +01:00
Asger F
aa5cccdddd JS: Make sinkHasPrimaryName public 2024-01-31 20:39:25 +01:00
Michael B. Gale
90eba711a3 Go: Include versions in newer Go version log message 2024-01-31 17:45:58 +00:00
Harry Maclean
06334eee2e Merge pull request #14554 from maikypedia/maikypedia/insecure-randomness
Ruby: Add Insecure Randomness Query
2024-01-31 17:16:32 +00:00
Tamas Vajk
a486481453 Fix integration test result after merge 2024-01-31 16:20:06 +01:00
Tamas Vajk
4608550e48 C#: Disable msbuild node reuse in autobuild 2024-01-31 16:14:40 +01:00
Tamas Vajk
3d25ebc13c Revert "C#: Add /nodeReuse:false to autobuild build command"
This reverts commit bcee901fbd.
2024-01-31 16:12:21 +01:00
Henti Smith
96f366f819 Updated version from PR#15472 2024-01-31 14:07:22 +00:00
Michael B. Gale
84baea5df2 Go: Include versions in newer Go version needed diagnostic 2024-01-31 13:29:53 +00:00
Koen Vlaswinkel
d5f0a5ce72 Use predicate for isConstructor 2024-01-31 14:19:14 +01:00
Tamas Vajk
bcee901fbd C#: Add /nodeReuse:false to autobuild build command 2024-01-31 14:12:49 +01:00
Koen Vlaswinkel
c1aaf5a574 Ruby: Model constructors in endpoint query on new 2024-01-31 13:54:48 +01:00
Tom Hvitved
e7676a00d2 Merge pull request #15370 from hvitved/ruby/erb-flow
Ruby: Model flow through `ViewComponent` render methods
2024-01-31 13:24:10 +01:00
Tom Hvitved
c74bc68287 C#: Fix extraction of qualified delegate calls 2024-01-31 13:21:16 +01:00
Max Schaefer
ab6cea14c8 Fix missing quotes. 2024-01-31 11:49:25 +00:00
Joe Farebrother
9130603334 Address reviews - use SimpleTypeSanitizer and alter qldoc style 2024-01-31 11:31:25 +00:00
Max Schaefer
6c6f402fa5 Merge branch 'main' into java/update-mad-decls-after-triage-2024-01-31T11-16-45 2024-01-31 11:29:33 +00:00
Max Schaefer
ad8038bade Update MaD Declarations after Triage 2024-01-31 11:28:10 +00:00
Harry Maclean
abf015b142 Merge pull request #15485 from github/koesie10/ruby-model-only-relevant-types
Ruby: Only model relevant files for type models
2024-01-31 11:23:40 +00:00
Henti Smith
51f4179b77 Merge branch 'main' into henti/update_dotnet 2024-01-31 11:06:23 +00:00
Koen Vlaswinkel
817fd8c097 Ruby: Move TestFile to modeling Util module
The TestFile class in the ModelEditor module is more accurate than the
existing RelevantFile class in the Util module, so this moves the
TestFile class to Util and redefines RelevantFile in terms of the
TestFile.
2024-01-31 11:53:30 +01:00
Koen Vlaswinkel
b51379b533 Ruby: Only model relevant files for type models 2024-01-31 11:30:16 +01:00
Tamás Vajk
73f96fb66e Merge pull request #15472 from tamasvajk/feature/compiler-args
C#: Extract expanded compiler arguments
2024-01-31 11:26:07 +01:00
Tom Hvitved
c21bf5d82c C#: Add tests for qualified delegate calls 2024-01-31 11:22:35 +01:00
Mathias Vorreiter Pedersen
4b5a203b46 Merge pull request #15463 from microsoft/42-false-positive-cpp-uninitializedlocal
False positive fix for cpp/uninitialized-local
2024-01-31 09:31:31 +00:00
Harry Maclean
a298a395e6 Merge pull request #15473 from github/koesie10/ruby-model-only-public-methods
Ruby: Only generate models for public methods
2024-01-31 09:27:27 +00:00
Mathias Vorreiter Pedersen
f3eac550c3 Merge pull request #15461 from MathiasVP/propagate-edge-kinds
C++: Support function calls throwing exceptions in the IR
2024-01-31 09:25:46 +00:00
Michael Nebel
e575e97eb9 C#: Update cil attribute expected output. 2024-01-31 10:08:55 +01:00
Tamás Vajk
1d56a8a924 Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
2024-01-31 09:46:57 +01:00
Michael Nebel
9a6751a6dd C#: Update the RuntimeFrameworkVersion to 8.0.1. 2024-01-31 09:27:37 +01:00
Tamas Vajk
dabe63ce8b Add change note 2024-01-31 08:44:43 +01:00
Tamas Vajk
1d525dd06c Add new DB stats file 2024-01-31 08:32:17 +01:00
Tamas Vajk
8008152199 List compiler /analyzer arguments in cs/telemetry/extraction-information 2024-01-31 08:32:16 +01:00
Tamas Vajk
fb4315f1fc Add DB upgrade/downgrade folders 2024-01-31 08:32:16 +01:00
Tamas Vajk
fddbb1a722 C#: Extract expanded compiler arguments 2024-01-31 08:32:16 +01:00
Tamas Vajk
0196d808c7 Update expected test results in integration tests 2024-01-31 08:30:43 +01:00
James Ockers
0f1e21aa09 Adding per-language change-notes 2024-01-30 17:28:34 -08:00
James Ockers
0ae1268f58 Add change-note 2024-01-30 13:31:35 -08:00
James Ockers
eb5e0123d6 exclude certification from maybeCertificate() regexes 2024-01-30 13:16:18 -08:00
Harry Maclean
4cfdf8b7a3 Ruby: Add test case for view without ERB template 2024-01-30 20:30:59 +01:00
Tom Hvitved
803513acc6 Add change note 2024-01-30 20:30:58 +01:00
Tom Hvitved
d2d017dd64 Ruby: Model flow through ViewComponent render methods 2024-01-30 20:30:58 +01:00
Tom Hvitved
817a2b71a8 Add more tests 2024-01-30 20:30:58 +01:00
Harry Maclean
557b49cfc5 Ruby: Add basic modeling for ViewComponent 2024-01-30 20:30:58 +01:00
Harry Maclean
5b3a2b35b7 Update expected file 2024-01-30 20:30:58 +01:00
Harry Maclean
75a37486c9 Add WIP query for erb flow 2024-01-30 20:30:58 +01:00
Harry Maclean
bf3b86b402 Add test for erb flow 2024-01-30 20:30:58 +01:00
Tom Hvitved
2d95ac9d5f Merge pull request #15468 from hvitved/ruby/ctx-sensitivity-rework 2024-01-30 20:27:43 +01:00
Arthur Baars
4591560692 Merge pull request #14544 from p-/p--oj-ox-unsafe-deser
Ruby: additional unsafe deserialization sinks for ox and one for oj
2024-01-30 19:28:32 +01:00
Geoffrey White
1b433c7af3 C++: Add QLDoc comments. 2024-01-30 17:54:28 +00:00
Ian Lynagh
2eb9b61412 Kotlin: Add a test for path transformers 2024-01-30 17:40:43 +00:00
Geoffrey White
c29d0b78ce C++: Add top of file doc comment. 2024-01-30 17:29:18 +00:00
Geoffrey White
8b2888c2de C++: Change note. 2024-01-30 17:24:05 +00:00
Joe Farebrother
8bd79908a6 Implement local auth query 2024-01-30 16:49:55 +00:00
Geoffrey White
4ae8a9a6c4 C++: Add PreprocBlock tests. 2024-01-30 16:47:35 +00:00
Peter Stöckli
fb075a9e88 Rename 2023-10-19-unsafe-deserialization-sinks.md to 2024-01-30-unsafe-deserialization-sinks.md 2024-01-30 17:31:33 +01:00
Henti Smith
612256b760 Updated dotnet to 8.0.101
This is a corresponding PR to https://github.com/github/semmle-code/pull/48786
2024-01-30 16:23:07 +00:00
Asger F
19ba9fed99 Handle externs 2024-01-30 17:13:02 +01:00
Asger F
1737ba1a6b JS: Add library for naming endpoints 2024-01-30 16:36:51 +01:00
Sid Shankar
f557110d9b Merge pull request #15465 from sidshank/sidshank/rename-file-name-for-extracted-files-diagnostic
JS/TS/Python/Ruby: Renames diagnostic query files and tests
2024-01-30 10:19:00 -05:00
Koen Vlaswinkel
0442631c68 Ruby: Only generate models for public methods 2024-01-30 16:07:34 +01:00
Rasmus Wriedt Larsen
c265c15f3f Merge pull request #15398 from RasmusWL/html-escape
Python: Add `html.escape` as HTML sanitizer
2024-01-30 16:06:01 +01:00
Koen Vlaswinkel
8aa3542d13 Merge pull request #15470 from github/koesie10/add-summary-neutral-ruby-supported
Ruby: Correctly report supported status of summary and neutral models
2024-01-30 15:46:45 +01:00
Peter Stöckli
1947dee46a Merge branch 'main' into p--oj-ox-unsafe-deser 2024-01-30 15:33:39 +01:00
Benjamin Rodes
1a044fbbde Merge branch '42-false-positive-cpp-uninitializedlocal' of https://github.com/microsoft/codeql into 42-false-positive-cpp-uninitializedlocal 2024-01-30 09:22:51 -05:00
Benjamin Rodes
f58f77de82 PR change suggestions. 2024-01-30 09:22:22 -05:00
Peter Stöckli
9596aebee3 Format: getValue now on one line 2024-01-30 15:22:16 +01:00
Ben Rodes
8c04bbfb57 Update cpp/ql/src/change-notes/2024-01-29-uninitialized-local-false-positive.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-01-30 09:19:49 -05:00
Peter Stöckli
3c8bc96ab5 replace occurence of AssignExprCfgNode for Oj as well 2024-01-30 15:17:37 +01:00
Peter Stöckli
e87effc18c Apply suggestions from code review
Co-authored-by: Arthur Baars <aibaars@github.com>
2024-01-30 15:14:35 +01:00
Harry Maclean
e5ba8fe625 Merge pull request #15467 from hmac/hmac-and-barrier
Ruby: Block flow from LHS of && expressions
2024-01-30 14:02:39 +00:00
Koen Vlaswinkel
b32071999b Ruby: Correctly report supported status of summary and neutral models 2024-01-30 15:00:13 +01:00
Tony Torralba
e2bf9ea2eb Consider File.exists() et al a path-injection sink 2024-01-30 14:51:36 +01:00
Geoffrey White
af17ae236f C++: Autoformat. 2024-01-30 13:47:11 +00:00
Geoffrey White
310c78d1e7 C++: Add PreprocBlock.qll library. 2024-01-30 13:47:07 +00:00
Asger F
6cfdd7aec4 JS: Add InlineExpectationsTest 2024-01-30 13:20:57 +01:00
Asger F
8930ce74af JS: Do not view packages as nested in a private package 2024-01-30 13:20:57 +01:00
Asger F
2d8d11fa78 JS: Restrict type-only exports in API graphs 2024-01-30 13:20:57 +01:00
Asger F
0e0fb0e52d JS: Remove API graph edge causing ambiguity 2024-01-30 13:20:56 +01:00
Asger F
e441dd472b JS: Expose hasBothNamedAndDefaultExports() 2024-01-30 13:20:55 +01:00
Mathias Vorreiter Pedersen
e2ae4a699c C++: Add change note. 2024-01-30 11:44:46 +00:00
Mathias Vorreiter Pedersen
33e37536df C++: Accept test changes. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
1dfd32ee5c C++: Model function calls throwing exceptions. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
eb94203f04 C++: Add an 'EdgeKind' column to 'getExceptionSuccessorInstruction'. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
8bb17a7127 C++: Add an 'EdgeKind' column to 'getInitializationSuccessor'. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
4fb20e14f5 C++: Add an 'EdgeKind' column to 'getChildTrueSuccessor' and 'getChildFalseSuccessor'. 2024-01-30 11:32:47 +00:00
Mathias Vorreiter Pedersen
10ae793de5 C++: Add an 'EdgeKind' column to 'getFirstInstruction'. 2024-01-30 11:31:41 +00:00
Mathias Vorreiter Pedersen
d2e8b88b24 C++: Add an 'EdgeKind' column to 'getChildSuccessor'. 2024-01-30 11:26:46 +00:00
Rasmus Wriedt Larsen
c70b32f7eb Python: Require quote escaping for html.escape 2024-01-30 12:17:01 +01:00
Harry Maclean
f230e618a3 Ruby: Update tests 2024-01-30 09:43:56 +00:00
Michael Nebel
41cca4711b Merge pull request #15426 from michaelnebel/csharp/collectionexpressions
C# 12: Support for collection expressions.
2024-01-30 10:39:39 +01:00
Mathias Vorreiter Pedersen
78d5d9a7ab Merge pull request #15448 from microsoft/false_positive_cpp_incorrect_string_type_conversion
cpp/incorrect-string-type-conversion false positive fixes
2024-01-30 09:37:01 +00:00
Mathias Vorreiter Pedersen
56e44f9b3c Merge pull request #15458 from MathiasVP/dataflow-node-deduplication
C++: Fix more `asExpr` duplication
2024-01-30 09:34:57 +00:00
Mathias Vorreiter Pedersen
436a9ce604 Merge pull request #15460 from MathiasVP/fix-scanf-fp-2
C++: Fix another FP in `cpp/incorrectly-checked-scanf`
2024-01-30 09:32:32 +00:00
Tom Hvitved
503d2f7b95 Ruby: Rework mayBenefitFromCallContext 2024-01-30 09:57:29 +01:00
Harry Maclean
75b13da4e4 Ruby: Block flow from LHS of && expressions
The only values that can flow from the LHS of an && expression are
`false` and `nil`, neither of which seem relevant for any of our
queries.
2024-01-30 08:53:32 +00:00
Joe Farebrother
460ffc89b2 Add additional test cases 2024-01-29 22:43:28 +00:00
Sid Shankar
b1d7a635f5 Renames diagnostic query files and tests
This commit renames the files relating to the diagnostic query that produces information on the number of files extracted. The files have been renamed from "SuccessfullExtractedFiles.*" to "ExtractedFiles.*". All related tests and test files have been renamed too.

The `@tags` and `@id` attributes of the queries have been left untouched, consistent with the `@tags` and `@id` for similar queries in other languages.
2024-01-29 20:19:20 +00:00
Benjamin Rodes
13cf555cee False positive fix for cpp/uninitialized-local 2024-01-29 13:21:05 -05:00
Joe Farebrother
3abd67064d Add change note 2024-01-29 16:33:07 +00:00
Mathias Vorreiter Pedersen
5024df9c4e C++: Add change note. 2024-01-29 16:30:55 +00:00
Joe Farebrother
94075ef148 Fix FPs - consider flow through fields when determining whether a view is masked, and find more instances of findViewById. 2024-01-29 16:25:38 +00:00
Joe Farebrother
8d201626e1 Add documentation 2024-01-29 16:25:38 +00:00
Joe Farebrother
aa78050933 Implement checks for elements hidden by their xml attributes 2024-01-29 16:25:38 +00:00
Joe Farebrother
6081f18089 Add unit tests + make some fixes 2024-01-29 16:25:37 +00:00
Joe Farebrother
8582093e65 Implement checks for parent views being hidden 2024-01-29 16:25:37 +00:00
Joe Farebrother
1b13597d72 Implement checks for calls that may safely mask information 2024-01-29 16:25:37 +00:00
Joe Farebrother
5dd0addfc2 Add sensitive text flow query 2024-01-29 16:25:36 +00:00
Mathias Vorreiter Pedersen
ea79a84c2e C++: Accept test changes. 2024-01-29 16:24:44 +00:00
Mathias Vorreiter Pedersen
ebd1595fbe C++: Fix FP by concluding that a less-than-zero check also implies a not-equal-to-EOF check. 2024-01-29 16:24:36 +00:00
Mathias Vorreiter Pedersen
7e29141196 C++: Add FP test. 2024-01-29 16:23:37 +00:00
Ben Rodes
308a3b533f Update cpp/ql/src/change-notes/2024-01-29-false_positive_incorrect_string_type_conversion.md
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-29 09:35:59 -05:00
Mathias Vorreiter Pedersen
aeae208dc3 Merge pull request #15456 from MathiasVP/fix-scanf-fp
C++: Fix FP in `cpp/incorrectly-checked-scanf`
2024-01-29 14:30:20 +00:00
Benjamin Rodes
6f17c432d9 Change log 2024-01-29 09:19:39 -05:00
Mathias Vorreiter Pedersen
320092092d C++: Accept test changes. 2024-01-29 14:11:07 +00:00
Mathias Vorreiter Pedersen
a4727b5597 C++: Fix 'asExpr' duplication. 2024-01-29 14:11:01 +00:00
Mathias Vorreiter Pedersen
044d94c580 C++: Add change note 2024-01-29 13:47:17 +00:00
Michael Nebel
cda09478c5 C# Update expected test output and remove false positive. 2024-01-29 14:37:25 +01:00
Michael Nebel
63c06b72b1 C#: Chop dataflow of spread into smaller steps and make sure to only propagate element flow for the spread operator. 2024-01-29 14:34:57 +01:00
Michael Nebel
b6f94ea44a C#: Add example test of field flow via the spread operator, which leads to a false positive. 2024-01-29 14:30:52 +01:00
Rasmus Wriedt Larsen
5867fb3d29 Python: Add change-note 2024-01-29 14:30:20 +01:00
Rasmus Wriedt Larsen
3f0dc2b022 Python: Model the psycopg package 2024-01-29 14:30:20 +01:00
Michael Nebel
cd5f678e1c C#: Add IntegerCollection class to the CollectionFlow tests and update line numbers in expected test output. 2024-01-29 14:28:05 +01:00
yoff
391ca5d8a6 Merge pull request #15390 from Marcono1234/marcono1234/python-ascii-regex-flag 2024-01-29 14:27:50 +01:00
Tamás Vajk
39b32a9068 Merge pull request #15454 from tamasvajk/standalone/cshtml-default
C#: Change asp.net core view generation to be opt out
2024-01-29 13:22:44 +01:00
Tamas Vajk
4dffb3bfdd Change integration test to specify .net 6.0 as target framework 2024-01-29 12:40:51 +01:00
Mathias Vorreiter Pedersen
a5794509ec C++: Accept test changes. 2024-01-29 11:33:14 +00:00
Mathias Vorreiter Pedersen
41f44f598a C++: Explicitly check that a check for EOF isn't present. 2024-01-29 11:33:14 +00:00
Tamas Vajk
f16aa034a2 Code quality improvement 2024-01-29 12:29:01 +01:00
Ian Lynagh
79d9109850 Merge pull request #15428 from igfoo/igfoo/catch_illegal_arg
Kotlin: Catch/ignore a IllegalArgumentException exception
2024-01-29 11:27:38 +00:00
Ian Lynagh
76e417c23e Merge pull request #14940 from igfoo/igfoo/comments
Kotlin 2: Comment improvements
2024-01-29 11:27:19 +00:00
Mathias Vorreiter Pedersen
3a66fd7175 C++: Add FP test. 2024-01-29 10:59:38 +00:00
Tamas Vajk
7a8d83e859 C#: Add integration test with asp.net core view generation on dotnet 6
Source generators are needed for asp.net core view generation. Dotnet 6 is the first version where we support view generation. This commit adds an integration test for this.
2024-01-29 11:52:55 +01:00
Tamas Vajk
92fec66370 C#: Add integration test for disabled asp.net core view generation 2024-01-29 11:52:55 +01:00
Tamas Vajk
d7de5fcfcb C#: Change asp.net core view generation to be opt out 2024-01-29 10:52:26 +01:00
Tony Torralba
49d6d3fa0c Merge pull request #15449 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-29 10:27:32 +01:00
github-actions[bot]
6d06c9cb7d Add changed framework coverage reports 2024-01-29 00:16:27 +00:00
Marcono1234
d8fe0f5bb8 Java: Document which assignment type is covered by which class 2024-01-28 19:03:36 +01:00
Maiky
c2c4d9e4d1 ` change to <code>
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2024-01-27 14:08:55 +01:00
Mathias Vorreiter Pedersen
a391f7802d C++: Add a test. 2024-01-27 13:08:52 +00:00
maikypedia
d7314a1689 File format 2024-01-27 14:07:36 +01:00
Marcono1234
1ad08efe08 Python: Support a (ASCII) inline regex flag 2024-01-26 22:18:49 +01:00
Ben Rodes
f79846467e Update cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-26 15:25:08 -05:00
Benjamin Rodes
b7648bcf27 Adding test cases. 2024-01-26 15:19:07 -05:00
Benjamin Rodes
562221f48e False positive fix. 2024-01-26 13:27:14 -05:00
Geoffrey White
d19ad49313 Merge pull request #15381 from geoffw0/cppfiles
C++: Report any extracted file as successfully extracted
2024-01-26 18:18:27 +00:00
Edward Minnix III
4602f8933d Merge pull request #15292 from egregius313/egregius313/java/dataflow/common-sanitizers/uuid-and-date
Java: Add `java.util.UUID` and `java.util.Date` to the `SimpleTypeSanitizer` class
2024-01-26 13:16:18 -05:00
Geoffrey White
b125d2c9ab Merge branch 'main' into cppfiles 2024-01-26 16:47:48 +00:00
Joe Farebrother
031bd8bd0c Merge pull request #15281 from joefarebrother/android-sensitive-ui-notif
Java: Add query for exposure of sensitive information to android notifiactions
2024-01-26 16:42:55 +00:00
Max Schaefer
73130ec665 Merge pull request #15436 from github/max-schaefer-patch-1
Java: Add models for overloads of DatagramPacket constructor
2024-01-26 16:13:11 +00:00
Henry Mercer
452359f20e Merge pull request #15446 from github/codeql-cli-2.16.1
Merge `codeql-cli-2.16.1` back to `main`
2024-01-26 15:52:56 +00:00
Henry Mercer
720d87391d Merge pull request #15447 from github/henrymercer/2.16.0-mergeback
Merge `codeql-cli-2.16.0` back into `codeql-cli-2.16.1`
2024-01-26 15:42:05 +00:00
Tony Torralba
6e550d28af Update more test expectations 2024-01-26 15:13:07 +01:00
Henry Mercer
6bef1404fd Merge remote-tracking branch 'origin/codeql-cli-2.16.1' into henrymercer/2.16.0-mergeback 2024-01-26 13:53:13 +00:00
Florin Coada
b24dad6ac3 Merge pull request #15438 from github/changedocs/2.16.1
Generate changelog for 2.16.1
2024-01-26 13:46:14 +00:00
Michael Nebel
da4a9b620a C#: Add change note. 2024-01-26 14:24:27 +01:00
Michael Nebel
13b8d57bff C#: Add collection flow test cases for collection expressions. 2024-01-26 14:18:16 +01:00
Michael Nebel
168f5b5554 C#: Add dataflow support for collection expressions. 2024-01-26 14:18:16 +01:00
Michael Nebel
8eb89cf0bb C#: Add test and expected output. 2024-01-26 14:18:16 +01:00
Tony Torralba
b8cb514dc4 Rename the other change note 2024-01-26 12:46:51 +01:00
Tony Torralba
19a6b7858b Remove reference to PathCreation
ZipSlip no longer needs to make this exclusion, since PathCreation arguments are no longer path-injection sinks
2024-01-26 12:45:00 +01:00
Tony Torralba
2a146405ac Adjust tests 2024-01-26 12:38:32 +01:00
Tamás Vajk
7a50d7a95f Merge pull request #15437 from tamasvajk/feature/log-verbosity
C#: Introduce log verbosity extractor option
2024-01-26 12:33:06 +01:00
Tony Torralba
1d2a51c522 Rename change note 2024-01-26 12:20:47 +01:00
Tony Torralba
19cb7adb6d Migrate path injection sinks to MaD
Deprecate and stop using PathCreation

Path creation sinks are now summaries
2024-01-26 12:19:54 +01:00
Michael Nebel
74cb1ea584 C#: Add QL library expression support for collection expressions. 2024-01-26 11:50:20 +01:00
Asger F
ee8e9a4e66 Shared: update test output 2024-01-26 11:14:23 +01:00
Asger F
f15ead6130 Shared: check stateful outBarrier as part of pathStep SCC 2024-01-26 11:14:23 +01:00
Asger F
d1310c74fc Shared: remove old stateful outBarrier check 2024-01-26 11:14:23 +01:00
Asger F
ddbacc3d4a Shared: add test case for stateful outBarrier bug 2024-01-26 11:14:11 +01:00
Tony Torralba
52d7bd93a5 Merge pull request #15420 from github/java/update-mad-decls-after-triage-2024-01-24T10-05-04
Java: Update MaD Declarations after Triage
2024-01-26 08:42:49 +01:00
Erik Krogh Kristensen
8e11c75745 Merge pull request #15441 from github/dependabot/cargo/ql/chrono-0.4.33
Bump chrono from 0.4.32 to 0.4.33 in /ql
2024-01-26 08:10:37 +01:00
dependabot[bot]
5fac945b33 Bump chrono from 0.4.32 to 0.4.33 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.32 to 0.4.33.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.32...v0.4.33)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 03:25:31 +00:00
Michael Nebel
1252d3ee89 C#: Rename CollectionExpr to EnumerableCollectionExpr. 2024-01-25 19:53:51 +01:00
Michael Nebel
5ab64f4a65 C#: Introduce extractor support for collection expressions. 2024-01-25 19:53:51 +01:00
Michael Nebel
0477bba34e C#: Add database upgrade- and downgrade scripts. 2024-01-25 19:53:51 +01:00
Michael Nebel
e2614a1e4c C#: Add some dummy db stats for the new expression kinds. 2024-01-25 19:45:56 +01:00
Michael Nebel
1ef8daf7cd C#: Add some more collection and spread element expression kinds to the dbscheme. 2024-01-25 19:45:56 +01:00
Mathias Vorreiter Pedersen
863e6c8009 Merge pull request #15427 from MathiasVP/asexpr-and-asindirectexpr-tests
C++: Add `asExpr` and `asIndirectExpr` library tests (and fix more duplication)
2024-01-25 16:58:18 +00:00
Tony Torralba
d299971086 Fix code review mistake 2024-01-25 17:42:11 +01:00
Tamas Vajk
c4849f9a17 Add change note 2024-01-25 17:33:06 +01:00
Mathias Vorreiter Pedersen
2db76c7fad Merge pull request #15434 from MathiasVP/fix-dataflow-join-order
DataFlow: Fix join order
2024-01-25 16:32:14 +00:00
Tamas Vajk
b8c8f52efc C#: Introduce extractor option for logging verbosity 2024-01-25 17:20:47 +01:00
Tony Torralba
661c5cf6aa Merge pull request #15409 from erik-krogh/path-java
Java: Improve the QHelp for `java/path-injection`.
2024-01-25 17:14:59 +01:00
Ian Lynagh
c0a9c11101 Kotlin: Catch/ignore a IllegalArgumentException exception
This works around
    https://youtrack.jetbrains.com/issue/KT-63847/K2-IllegalStateException-IrFieldPublicSymbolImpl-for-java.time-Clock.OffsetClock.offset0-is-already-bound
2024-01-25 16:04:08 +00:00
Florin Coada
d884941b8a restored settings file 2024-01-25 15:57:48 +00:00
Florin Coada
c3238743b1 Changedocs for 2.16.1 2024-01-25 15:55:32 +00:00
Tamas Vajk
bb4327294d Rename verbosity property to legacy 2024-01-25 16:03:23 +01:00
Tamas Vajk
0e5e57dc56 Adjust 'silent' flag parsing 2024-01-25 16:00:44 +01:00
Max Schaefer
13f0df3588 Add two more models. 2024-01-25 15:00:22 +00:00
Paolo Tranquilli
b2489f7109 Merge pull request #15433 from github/redsun82/clang-format
Swift: update formatting to `clang-format` 17.0.6
2024-01-25 15:58:28 +01:00
Max Schaefer
5235291919 Add models for overloads of DatagramPacket constructor 2024-01-25 14:49:05 +00:00
Tamas Vajk
9b4cdd0d4f Separate logging classes into separate files 2024-01-25 15:38:16 +01:00
Tamas Vajk
2c72d7ea1e C#: Improve code quality 2024-01-25 15:18:55 +01:00
Henry Mercer
10343dd822 Merge pull request #15416 from github/post-release-prep/codeql-cli-2.16.1
Post-release preparation for codeql-cli-2.16.1
2024-01-25 14:15:25 +00:00
Tony Torralba
282632c33b Add new snippets as tests 2024-01-25 15:11:11 +01:00
Erik Krogh Kristensen
fb11e4e14f Merge pull request #15435 from erik-krogh/remove-at-to-z
remove an FP in overly-large-range for [@-Z]
2024-01-25 14:43:12 +01:00
erik-krogh
396da117bb remove an FP in overly-large-range for [@-Z] 2024-01-25 14:15:06 +01:00
Tamás Vajk
2333b8db5b Merge pull request #15432 from tamasvajk/fix/extraction-information
C#: Filter results of division by 0 from `cs/telemetry/extraction-information`
2024-01-25 14:07:19 +01:00
Stephan Brandauer
1f9a968774 Java: PR discussion 2024-01-25 13:59:47 +01:00
Paolo Tranquilli
33b6ce7365 Swift: update formatting to clang-format 17.0.6
Also, added a format check in `swift.yml`.
2024-01-25 13:58:14 +01:00
Mathias Vorreiter Pedersen
db929ccf9b DataFlow: Fix join order. 2024-01-25 12:51:35 +00:00
erik-krogh
73e3fada44 add missing </p> 2024-01-25 12:14:10 +01:00
Tamas Vajk
055ead20e3 C#: Filter results of division by 0 from cs/telemetry/extraction-information 2024-01-25 12:08:15 +01:00
erik-krogh
05a59d2a94 apply suggestions from doc review 2024-01-25 11:20:46 +01:00
Tamás Vajk
01b89508a8 Merge pull request #15424 from tamasvajk/standalone/logging
C#: Improve log messages in buildless mode + some cleanup/refactoring
2024-01-25 11:08:50 +01:00
GitHub Security Lab
00d1f8e84a Merge branch 'main' into maikypedia/swift-zip 2024-01-25 11:05:46 +01:00
yoff
930f1b50b9 Merge pull request #15397 from github/tausbn/python-fix-deepcopy-mutable-default-fp
Python: Fix `deepcopy` mutable default FP
2024-01-25 10:32:58 +01:00
Stephan Brandauer
5d6ee9c0cb Update java/ql/lib/ext/com.fasterxml.jackson.databind.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-25 10:00:56 +01:00
Robert Marsh
67a86391a2 Merge pull request #15318 from rdmarsh2/rdmarsh2/cpp/first-class-destructors
C++: First-class destructors in AST
2024-01-24 16:19:10 -05:00
Robert Marsh
0bc023139b C++: autoformat for first-class destructors 2024-01-24 18:52:54 +00:00
Robert Marsh
56c9566867 C++: more documentation for implict destructor calls 2024-01-24 18:52:54 +00:00
Robert Marsh
3970a9fe39 C++: switch to getImplicitDestructorCall 2024-01-24 18:52:54 +00:00
Robert Marsh
3a0290b1e8 C++: add destructors in PrintAST 2024-01-24 18:52:54 +00:00
Robert Marsh
1acc111b63 C++: add getSyntheticDestructor to Expr and Stmt 2024-01-24 18:52:54 +00:00
Chris Smowton
32a2ea1690 Merge pull request #15413 from smowton/smowton/admin/buildless-sibling-project-tests
Add tests for Java buildless w/sibling projects
2024-01-24 18:51:10 +00:00
Chris Smowton
ed9abdd9bd Mock Java 8 toolchain so sibling test works on arm runners 2024-01-24 16:51:38 +00:00
Chris Smowton
287fb8003d Make all toolchains available to test 2024-01-24 16:51:38 +00:00
Chris Smowton
16d30d7335 Remove xml and properties tests 2024-01-24 16:51:38 +00:00
Chris Smowton
042a3b64bb Use Java 11 to run old Gradle 2024-01-24 16:51:38 +00:00
Chris Smowton
b5429f1a50 Add test for buildless with sibling projects 2024-01-24 16:51:38 +00:00
Chris Smowton
e3ef8aa6f6 Adjust test expectations 2024-01-24 16:51:37 +00:00
Chris Smowton
96bf47fbd9 Remove accidentally-committed actual files 2024-01-24 16:51:37 +00:00
Tony Torralba
cbcc090a19 Merge pull request #15423 from atorralba/atorralba/go/awslambda-global-context
Go: Add AwsLambda to the global context
2024-01-24 17:40:00 +01:00
Mathias Vorreiter Pedersen
7916616ee1 C++: Fix duplication for indirect exprs similar to how we fixed it in #15410. 2024-01-24 16:20:06 +00:00
Mathias Vorreiter Pedersen
4e18cca0f4 C++: Add a way to test the behavior of 'asExpr' and 'toString' on dataflow nodes. 2024-01-24 16:12:47 +00:00
Tamas Vajk
199b0578be C#: Log number of restored dotnet framework variants 2024-01-24 15:23:38 +01:00
Stephan Brandauer
4e63cbc993 Merge branch 'main' into java/update-mad-decls-after-triage-2024-01-24T10-05-04 2024-01-24 14:55:20 +01:00
Tamas Vajk
30095e3179 Refactor dotnet restore calls 2024-01-24 13:56:40 +01:00
Ian Lynagh
67242278ee Merge pull request #15384 from igfoo/igfoo/kt2
Kotlin: Support Kotlin 2.0.0-Beta3
2024-01-24 12:47:35 +00:00
Taus
96b1b8e402 Python: Remove empty lines from test file 2024-01-24 12:31:23 +00:00
Tamas Vajk
d742cd3e44 C#: Remove progress monitor from dependency fetcher, use logger directly 2024-01-24 12:29:02 +01:00
Tamas Vajk
13a8168c8e C#: Improve log messages in standalone extractor 2024-01-24 12:28:00 +01:00
Tony Torralba
3b7d6a4806 Go: Add AwsLambda to the global context 2024-01-24 11:33:26 +01:00
Stephan Brandauer
d5bcbcddab Update MaD Declarations after Triage 2024-01-24 11:05:07 +01:00
Michael B. Gale
514430e8b9 Merge pull request #15411 from github/mbg/go/refactor-go-autobuilder 2024-01-24 09:15:04 +00:00
Henry Mercer
3af42d57a0 Merge pull request #15402 from github/henrymercer/csharp-build-mode
C#: Enable standalone extraction via `--build-mode`
2024-01-24 09:01:03 +00:00
Tony Torralba
0bb0e52adb Merge pull request #15418 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-24 09:23:55 +01:00
Michael Nebel
2be1ee8b34 Merge pull request #15394 from michaelnebel/csharp/urlredirect-sanitizer
C#: Add more santizers to the `cs/web/unvalidated-url-redirection` query.
2024-01-24 08:42:05 +01:00
Ed Minnix
ef884fa721 Change note 2024-01-23 22:35:05 -05:00
github-actions[bot]
465e8d3530 Add changed framework coverage reports 2024-01-24 00:17:20 +00:00
github-actions[bot]
d0b74c00fe Post-release preparation for codeql-cli-2.16.1 2024-01-23 23:02:29 +00:00
Henry Mercer
0928c93989 Use TryGetValue 2024-01-23 20:43:19 +00:00
Henry Mercer
e73c1b7281 Be forgiving with casing of build mode environment variable 2024-01-23 20:35:43 +00:00
Henry Mercer
a75c8273f9 C#: Allow checking environment variables that may be undefined
The build mode environment variable for instance is only set when a build mode is specified.
2024-01-23 20:33:16 +00:00
Henry Mercer
766e0e61ed Merge pull request #15414 from github/release-prep/2.16.1
Release preparation for version 2.16.1
2024-01-23 19:57:39 +00:00
github-actions[bot]
7ef611e6dc Release preparation for version 2.16.1 2024-01-23 19:45:16 +00:00
Ed Minnix
dca24ded18 Add UUID and Date to the list of types in the SimpleTypeSanitizer class 2024-01-23 13:36:03 -05:00
Edward Minnix III
3c8b09307d Merge pull request #15291 from egregius313/egregius313/java/dataflow/default-sanitizers
Java: Introduce a common sanitizer type for types which cannot realistically carry taint.
2024-01-23 13:28:03 -05:00
Mathias Vorreiter Pedersen
145b5a30bd Merge pull request #15343 from microsoft/38-cpp-generalize-use-after-free-libraries
Generalization of FlowAfterFree
2024-01-23 16:49:29 +00:00
Ben Rodes
55fe8d376c Update cpp/ql/lib/semmle/code/cpp/security/flowafterfree/UseAfterFree.qll 2024-01-23 10:49:47 -05:00
Benjamin Rodes
dfb3aec002 Removing unnecessary private modules and adding comments. 2024-01-23 10:47:38 -05:00
Mathias Vorreiter Pedersen
42fd3fc836 C++: Make more things 'private' and add QLDoc to public things. (#40) 2024-01-23 10:27:01 -05:00
Mathias Vorreiter Pedersen
b1b236d82d Merge pull request #15410 from MathiasVP/less-dataflow-duplication
C++: Remove more `asExpr` duplication
2024-01-23 14:50:01 +00:00
Michael Nebel
10be0deeb5 C#: Add a couple more testcases. 2024-01-23 15:09:10 +01:00
Edward Minnix III
0e866a5447 Merge pull request #15359 from egregius313/egregius313/csharp/dataflow/threat-modeling/add-threatmodelflowsource
C#: Threat Modeling - Introduce `ThreatModelFlowSource`
2024-01-23 09:02:10 -05:00
Michael B. Gale
cf1aab0157 Go: Move identify environment code to separate file 2024-01-23 13:59:34 +00:00
Michael B. Gale
ee36e7424a Go: Move project analysis code to separate file 2024-01-23 13:59:33 +00:00
Michael B. Gale
0dc3c847bc Go: Move go invocations to separate file 2024-01-23 13:59:33 +00:00
erik-krogh
158ff0da0a add a trailing slash to the folder check in the QHelp for java/path-injection 2024-01-23 14:46:02 +01:00
Tamás Vajk
df8d453058 Merge pull request #15395 from tamasvajk/feature/standalone-nuget-restore-retry
C#: Try fallback `dotnet restore` without nuget.config
2024-01-23 14:45:00 +01:00
Erik Krogh Kristensen
f1d6f56621 Merge pull request #15393 from erik-krogh/deps-jan-2024
All: delete outdated deprecations
2024-01-23 13:52:38 +01:00
Mathias Vorreiter Pedersen
8b172c133d C++: Accept test changes. 2024-01-23 12:06:42 +00:00
Mathias Vorreiter Pedersen
5bc602a208 C++: Ensure that we don't create a result for 'asExpr' on an instruction node if a result also exists for an operand node (and vice versa). 2024-01-23 12:06:35 +00:00
erik-krogh
00dadeb3bf delete the markdown file again 2024-01-23 12:57:15 +01:00
erik-krogh
57e0b3cceb iterate on the java/path-injection qhelp 2024-01-23 12:56:43 +01:00
erik-krogh
4958c19c67 move the examples for the qhelps into an example/ folder 2024-01-23 12:56:23 +01:00
erik-krogh
6b66f5cbc5 check in the TaintedPath qhelp as markdown to get pretty diffs 2024-01-23 12:56:22 +01:00
Chris Smowton
43453fea52 Merge pull request #15408 from smowton/smowton/admin/log-setup-go-message
Log advice when a newer Go version is required under Actions
2024-01-23 11:32:38 +00:00
Mathias Vorreiter Pedersen
d29d060706 Merge pull request #15401 from alexet/make-intended-join-order
CPP: Fix join ordering hints to make them do what they intend.
2024-01-23 11:30:20 +00:00
Chris Smowton
7e96eaa273 Log advice when a newer Go version is required under Actions 2024-01-23 10:49:52 +00:00
Tony Torralba
77e724b3ba Merge pull request #15188 from github/java/update-mad-decls-after-triage-2023-12-21T14-39-02
Java: Update MaD Declarations after Triage
2024-01-23 11:34:57 +01:00
Tony Torralba
fcd9a5ed71 Update java/ql/lib/change-notes/2023-12-21-new-models.md 2024-01-23 11:18:12 +01:00
Joe Farebrother
dedba1fc54 Address review comments - add barrierIn and fix a model for a PendingIntent sink 2024-01-23 09:51:42 +00:00
Joe Farebrother
0acb647e7d Fix tests and add notification sink kind to model verification 2024-01-23 09:51:41 +00:00
Joe Farebrother
b23bbf93d4 Reorder sink models 2024-01-23 09:51:41 +00:00
Joe Farebrother
69faafa194 Add change note 2024-01-23 09:51:40 +00:00
Joe Farebrother
1190352b67 Add qhelp 2024-01-23 09:51:40 +00:00
Joe Farebrother
d806fcae3d Remove sink models involving PendingIntent; as they do not carry sensitive data (including from the original intent they were created with) 2024-01-23 09:51:39 +00:00
Joe Farebrother
2ca164ce35 Generate androidx stubs and correct some models 2024-01-23 09:51:39 +00:00
Joe Farebrother
bafd65b1d2 Add tests to cover each modeled sink + some corrections to the models 2024-01-23 09:51:38 +00:00
Joe Farebrother
a1a2acd3ce Add additional test cases 2024-01-23 09:51:38 +00:00
Joe Farebrother
f9bb004618 Add sink models to notification builder setters 2024-01-23 09:51:38 +00:00
Joe Farebrother
cd19a91704 Add unit test 2024-01-23 09:51:37 +00:00
Joe Farebrother
3aa27148de Split existing tests under CWE-200 into separate folders 2024-01-23 09:51:37 +00:00
Joe Farebrother
143ce0b94a Add sensitive notification query 2024-01-23 09:51:37 +00:00
Stephan Brandauer
95b439bf31 Merge branch 'main' into java/update-mad-decls-after-triage-2023-12-21T14-39-02 2024-01-23 09:40:50 +01:00
Stephan Brandauer
cd765e7c19 work on review comments
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-23 09:35:36 +01:00
Stephan Brandauer
8b34407ab7 Java: java.awt.Desktop::browse is a url-redirection sink
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-23 09:28:13 +01:00
Michael Nebel
95a200453b Merge pull request #15404 from michaelnebel/csharp/inlinearraydummystats
C#: Add dummy stats for inline_array_type.
2024-01-23 09:17:18 +01:00
Michael Nebel
123e86e0e0 C#: Add dummy stats for inline_array_type. 2024-01-23 08:29:01 +01:00
Erik Krogh Kristensen
97071b0dc7 Merge pull request #15403 from github/dependabot/cargo/ql/chrono-0.4.32
Bump chrono from 0.4.31 to 0.4.32 in /ql
2024-01-23 08:20:28 +01:00
Ed Minnix
fcbee1994b Update change note 2024-01-22 23:57:31 -05:00
Ed Minnix
fb80c5ea84 Rename SimpleScalarSanitizer to SimpleTypeSanitizer 2024-01-22 23:55:29 -05:00
Ed Minnix
696788e5b2 Rename semmle.code.java.security.dataflow.CommonSanitizers to semmle.code.java.security.Sanitizers 2024-01-22 23:52:19 -05:00
Ed Minnix
bb44277090 Make import of dataflow private 2024-01-22 23:40:24 -05:00
Ed Minnix
ec3d683186 Change change note category to feature 2024-01-22 23:39:23 -05:00
Ed Minnix
38828672a9 Update change note 2024-01-22 23:38:33 -05:00
Ed Minnix
32fe8e02fb Change note 2024-01-22 23:38:31 -05:00
Ed Minnix
3311b3be8e Convert experimental queries' isBarrier to use instanceof SimpleScalarSanitizer 2024-01-22 23:38:29 -05:00
Ed Minnix
67dfca2e58 Convert libraries to use instanceof SimpleScalarSanitizer 2024-01-22 23:38:26 -05:00
Ed Minnix
7f7c49d6ce Add the SimpleScalarSanitizer class
The `SimpleScalarSanitizer` class represents common scalar types which
cannot realistically carry taint (e.g. primitives/numbers, and
eventually UUIDs and Dates)
2024-01-22 23:38:24 -05:00
dependabot[bot]
e9a1fa9592 Bump chrono from 0.4.31 to 0.4.32 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.31 to 0.4.32.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.32)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 03:12:14 +00:00
Taus
24b37ffd36 Merge pull request #15187 from github/max-schaefer/py-url-redirection
Python: Add support for more URL redirect sanitisers.
2024-01-22 23:19:36 +01:00
Henry Mercer
6724dea54d C#: Enable standalone extraction via --build-mode 2024-01-22 19:12:07 +00:00
Alex Eyers-Taylor
891d398c3f CPP: Fix join ordering hints 2024-01-22 19:00:18 +00:00
erik-krogh
865df920f9 add change-notes 2024-01-22 19:30:57 +01:00
Ed Minnix
a6c977c169 Use appropriate pack for test models 2024-01-22 12:24:21 -05:00
Max Schaefer
5c43a0b1e4 Merge pull request #15356 from github/max-schaefer/automodel-void-source-candidates
Automodel: Switch tests to inline expectations
2024-01-22 17:05:10 +00:00
Rasmus Wriedt Larsen
00dc55d825 Python: Add change-note 2024-01-22 17:32:33 +01:00
Rasmus Wriedt Larsen
cbed6e861d Python: Add html.escape as HTML sanitizer 2024-01-22 17:32:28 +01:00
Benjamin Rodes
da10e6ca5b Moving FlowAfterFree and UseAfterFree.qll as a general purpose lib. 2024-01-22 11:18:03 -05:00
Ed Minnix
ff6d4c6ae6 Deprecation message 2024-01-22 11:09:53 -05:00
Ed Minnix
0ff12c07c7 Convert existing mapped-property classes to directly extend DatabaseInputSource 2024-01-22 11:09:51 -05:00
Ed Minnix
975327648c Remove commented-out code 2024-01-22 11:09:50 -05:00
Ed Minnix
51564200a1 Documentation for FlowSources library 2024-01-22 11:09:48 -05:00
Ed Minnix
83e66136ce Change note 2024-01-22 11:09:46 -05:00
Ed Minnix
c530fbd9f8 C# Threat Modeling Tests 2024-01-22 11:09:45 -05:00
Ed Minnix
3c9c07ec40 Rename SourceNode.qll to FlowSources.qll 2024-01-22 11:09:43 -05:00
Ed Minnix
392eac5f9a Refactor source node classes to use SourceNode superclass
Refactor the existing flowsource classes to use the `SourceNode` class
to specify which threat model they support.
2024-01-22 11:09:41 -05:00
Ed Minnix
d29df68c97 Introduce the SourceNode and ThreatModelFlowSource classes
1. Introduces the `SourceNode` class which allows dataflow nodes
   representing sources to indicate the threat model they are associated
   with.
2. Introduces the `ThreatModelFlowSource` class which represents a
   source node which respects the threat model configuration
2024-01-22 11:09:39 -05:00
Ed Minnix
ad093fde4f Add dependency on codeql/threat-models shared library 2024-01-22 11:09:38 -05:00
Taus
d6d59377d3 Python: Fix flow through deepcopy
Or, more generally, any copy step, as these presumably do not preserve
object identity.

(Arguably, `copy` could still be susceptible to interior mutability, but
I think that's outside the scope of this query anyway.)
2024-01-22 15:40:30 +00:00
Benjamin Rodes
2181fcf284 Updating .expected to account for new free/deallocation sources. 2024-01-22 10:36:24 -05:00
Taus
14c958ac4d Python: Remove mutable default sources from inside stdlib 2024-01-22 15:23:52 +00:00
Taus
411c107660 Python: Add tests for deepcopy FPs
There are two issues with `deepcopy` here. Firstly, the `deepcopy` function itself
has a mutable default value in its parameter `_nil` (set to the empty list by default).

Now, this value is never actually returned from `deepcopy`, as it is only used as a
sentinel, but our analysis is not clever enough to see this. Thus, it thinks that this
mutable default is returned, and hence the result of any call to `deepcopy` is a
potential source.

To remedy this, I opted to simply exclude all sources that originate from within the
standard library. It is very unlikely for any of the sources in the standard library
to be legit.

Secondly, `deepcopy` -- by virtue of being a function that we model as preserving
values -- admits data-flow through its calls, but this is not correct for the mutable
default query, as it is here the _identity_ of the default value in question that is
important. Thus, we get spurious flow through `deepcopy` for this specific query.
2024-01-22 15:21:57 +00:00
Tamas Vajk
de4e3963e7 C#: Try fallback nuget restore without nuget.config 2024-01-22 15:42:06 +01:00
Tamas Vajk
7c290ee2ba C#: Add integration test with nuget.config 2024-01-22 15:36:38 +01:00
Geoffrey White
0a8869c636 Merge pull request #15385 from geoffw0/swiftfiles
Swift: Report any extracted file as successfully extracted
2024-01-22 14:24:05 +00:00
Taus
4742481070 Python: Consolidate "mutable default" tests
Moves the existing tests into the `ModificationOfParameterWithDefault` subdirectory
which already contained a bunch more tests. In the process, I also removed some
duplicated test cases.
2024-01-22 13:50:33 +00:00
Max Schaefer
a4639c7ff9 Update qhelp to mention solution using urlparse. 2024-01-22 13:36:12 +00:00
Max Schaefer
17e3a45ad7 Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2024-01-22 13:36:12 +00:00
Max Schaefer
98178458d0 Python: Add support for more URL redirect sanitisers.
Since some sanitisers don't handle backslashes correctly, I updated the data-flow configuration to incorporate a flow state tracking whether or not backslashes have been eliminated or converted to forward slashes.
2024-01-22 13:24:18 +00:00
Max Schaefer
99c99145a2 Rename {source,sink}Model to {source,sink}ModelCandidate. 2024-01-22 13:10:51 +00:00
Michael Nebel
1bb6f4962d C#: Match any {digit} in the format string. 2024-01-22 14:03:37 +01:00
Geoffrey White
58c4bf5915 Merge branch 'main' into cppfiles 2024-01-22 12:24:33 +00:00
Max Schaefer
a3816d75b3 Remove redundant imports. 2024-01-22 10:54:01 +00:00
Max Schaefer
78e5a1a546 Autoformat. 2024-01-22 10:45:33 +00:00
Michael Nebel
b006b28e8a C#: Add change note. 2024-01-22 11:28:27 +01:00
Michael Nebel
5016113a0f C#: Add a string.Format sanitizer to url redirect and update expected test output. 2024-01-22 11:21:35 +01:00
Michael Nebel
884f3f1505 C#: Add string interpolation expression sanitizer to url redirect and update expected test output. 2024-01-22 11:21:19 +01:00
Michael Nebel
e33d5b5fb6 C#: Add some test examples for UrlRedirect using string interpolation and string.Format. 2024-01-22 09:42:23 +01:00
erik-krogh
f60c01e3a8 Py: delete import that no longer exists 2024-01-22 09:22:50 +01:00
erik-krogh
0511786a22 delete typo files from list of synchronized files 2024-01-22 09:15:27 +01:00
erik-krogh
8be7eadace delete outdated deprecations 2024-01-22 09:11:35 +01:00
Erik Krogh Kristensen
6533269387 Merge pull request #15392 from github/dependabot/cargo/ql/regex-1.10.3
Bump regex from 1.10.2 to 1.10.3 in /ql
2024-01-22 08:29:35 +01:00
dependabot[bot]
eb1a0fece8 Bump regex from 1.10.2 to 1.10.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 03:54:51 +00:00
Geoffrey White
a39bb8c037 Swift: Rename the query file. 2024-01-19 17:58:58 +00:00
Geoffrey White
c515ea3f8a Swift: Change note. 2024-01-19 17:58:58 +00:00
Geoffrey White
ed602642b6 Swift: Basic test for getRelativePath. 2024-01-19 17:58:58 +00:00
Geoffrey White
8cf691a477 Swift: Add File.getRelativePath and update swift/diagnostics/successfully-extracted-files. 2024-01-19 17:58:58 +00:00
Ian Lynagh
60a59cb89e Kotlin: Update 2.0.0 version support 2024-01-19 17:52:38 +00:00
Geoffrey White
5127542677 C++: Rename the query file. 2024-01-19 16:31:34 +00:00
Geoffrey White
01ee61e5ea C++: Change note. 2024-01-19 15:56:54 +00:00
Geoffrey White
4691bf2cb5 C++: Be more optimistic about successfully scanned files. 2024-01-19 15:55:54 +00:00
Geoffrey White
2eba3db1cb C++: Add a test for SuccessfullyExtractedFiles.ql and friends. 2024-01-19 15:50:28 +00:00
Ian Lynagh
d40814d48a Kotlin: Add 2.0.0 beta 3 and remove beta 1 2024-01-19 13:36:55 +00:00
Chris Smowton
7e1dd38623 Merge pull request #15378 from github/smowton/admin/document-aws-lambda
Note AWS Lambda support
2024-01-19 12:11:28 +00:00
Chris Smowton
79928b9f76 Be consistent
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-19 10:44:36 +00:00
Chris Smowton
e999e38b43 Note AWS Lambda support
JS/TS support is old; noting for symmetry with advertised support in Python. Golang support is new as of https://github.com/github/codeql/pull/15373
2024-01-19 10:33:40 +00:00
Tony Torralba
7e7175f49d Merge pull request #15373 from atorralba/atorralba/go/aws-lambda-sources
Go: Add flow sources for AWS Lambda function handlers
2024-01-19 11:21:20 +01:00
Joe Farebrother
4de19b3ec9 Merge pull request #15039 from joefarebrother/csharp-razor-flow-page-models
C#: Add flow steps from a PageModel to cshtml page.
2024-01-19 10:07:25 +00:00
Tony Torralba
8d6aa281b9 Update go/ql/lib/semmle/go/frameworks/AwsLambda.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 10:48:34 +01:00
Pierre
51a65f9794 Merge pull request #15376 from github/sitedocs/2.15.5-2
Regenerate 2.16.0 changelog with fixed changenote
2024-01-19 10:43:21 +01:00
Tony Torralba
9a0fb39382 Model StartWithContext
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 09:25:35 +01:00
Tony Torralba
d3a9a5ec3f Update go/ql/lib/semmle/go/frameworks/AwsLambda.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 09:22:46 +01:00
Michael Nebel
24855ddc64 Merge pull request #15328 from michaelnebel/csharp/inlinearrays
C# 12: Inline array support.
2024-01-19 09:11:26 +01:00
Michael Nebel
cb53ca4e1f Merge pull request #15367 from michaelnebel/csharp/nullablesimpletypesanitizer
C#: Consider nullable simple types as sanitizers.
2024-01-19 09:09:36 +01:00
Aditya Sharad
a3c0425eb3 Merge pull request #15349 from github/remove-codeql-cli-docs
Remove outdated CodeQL CLI docs
2024-01-18 09:45:05 -08:00
Pierre
4922b7fd11 Regenerate 2.16.0 changelog with fixed changenote 2024-01-18 18:08:50 +01:00
Tony Torralba
716c6cd519 Merge pull request #15375 from atorralba/atorralba/docs/amend-change-note
Fix change note category for clarity
2024-01-18 17:49:00 +01:00
Benjamin Rodes
833ef9d6d6 Further reorg of libraries and predicates to allow for more reusable and consistent libraries. 2024-01-18 11:17:24 -05:00
Tony Torralba
736df6fb05 Fix change note category for clarity 2024-01-18 17:09:34 +01:00
Benjamin Rodes
967526b285 Separating out use after free logic into a library and a ql so the query can be expanded easily. 2024-01-18 10:59:17 -05:00
Benjamin Rodes
8bd682b3f2 Deallocation.qll formatting. 2024-01-18 10:49:23 -05:00
Benjamin Rodes
7e70b30772 Adding missing windows library free functions to deallocation set 2024-01-18 09:59:28 -05:00
Alex Ford
9536fb5cae Merge pull request #15372 from github/rb/docs-ruby-3-3
Ruby: update supported version to 3.3
2024-01-18 14:47:15 +00:00
Tony Torralba
1d7dbec719 Go: Add flow sources for AWS Lambda function handlers 2024-01-18 15:17:21 +01:00
Michael B. Gale
d8eef2716b Merge pull request #15360 from github/mbg/csharp/redefine-successfully-extracted-files 2024-01-18 14:09:20 +00:00
Michael Nebel
43350b0664 C#: Add change note. 2024-01-18 13:55:18 +01:00
Rasmus Wriedt Larsen
f20d4e22fe Handle only exclude 2024-01-18 13:54:45 +01:00
Michael Nebel
9e9b5292f2 C#: Add change note. 2024-01-18 13:50:52 +01:00
Michael B. Gale
d0003ce7be C#: Rename query to ExtractedFiles 2024-01-18 12:47:11 +00:00
Michael Nebel
337ab611c9 C#: Update expected test output. 2024-01-18 12:53:48 +01:00
Michael Nebel
9460c91c8c C#: Also consider nullable simple types (and datetime) as simple type sanitizers. 2024-01-18 12:53:29 +01:00
Michael Nebel
559842071a C#: Add example of log forging alert for simple nullable types and updated expected test output. 2024-01-18 12:50:40 +01:00
Michael Nebel
f8f95e6a19 C#: Add models as data test for inline arrays. 2024-01-18 12:23:26 +01:00
Michael Nebel
1d88ca2388 C#: Add more InlineArray test cases. 2024-01-18 12:23:26 +01:00
Rasmus Wriedt Larsen
54c7c5e8be Tree sitter extractor: Proper handling of LGTM_INDEX_FILTERS
If someone had used `LGTM_INDEX_FILTERS=exclude:**/*\ninclude:*.rb`
before, we would have mistakenly excluded all files :|
(LGTM_INDEX_FILTERS is a prioritized list where later matches take
priority over earlier ones)

This change is needed to support adding `exclude:**/*` as the first
filter if `paths` include a glob, which currently causes bad behavior in
the Python extractor. However, we can first introduce that change once
this PR has been merged.

I realize this change can cause more folders and files to be traversed
(since they are not just skipped with --exclude). We plan to make a
better long term fix which should bring back the previous performance.
2024-01-18 11:44:31 +01:00
Michael Nebel
70e7c92774 C#: Also check the namespace of the InlineArrayAttribute. 2024-01-18 11:09:01 +01:00
Michael Nebel
674838e698 C#: Add flow test for inline arrays. 2024-01-18 11:09:01 +01:00
Michael Nebel
f14b3265ab C#: Move static methods in CollectionFlow as these impact result line numbers. 2024-01-18 11:09:00 +01:00
Michael Nebel
47505b3bfa C#: Add array access test for an inline array. 2024-01-18 11:09:00 +01:00
Michael Nebel
0453bb86e0 C#: Update test output of existing expressions tests. 2024-01-18 11:09:00 +01:00
Michael Nebel
ae52779cf6 C#: Add inline array test to expressions. 2024-01-18 11:09:00 +01:00
Michael Nebel
de831d188f C#: Add inline type array test. 2024-01-18 11:09:00 +01:00
Michael Nebel
8a97c8c28e C#: Add QL support for InlineArrayType. 2024-01-18 11:09:00 +01:00
Erik Krogh Kristensen
cda2ef4db5 Merge pull request #15364 from github/dependabot/cargo/ql/rayon-1.8.1
Bump rayon from 1.8.0 to 1.8.1 in /ql
2024-01-18 09:24:30 +01:00
dependabot[bot]
7b574bb07a Bump rayon from 1.8.0 to 1.8.1 in /ql
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.0 to 1.8.1.
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 03:16:14 +00:00
Michael B. Gale
a30791833d C#: Report any extracted file as successfully extracted 2024-01-17 20:57:39 +00:00
Michael B. Gale
4a71ddd8b6 Merge pull request #15355 from github/mbg/go/increase-test-robustness
Go: Improve robustness of integration tests
2024-01-17 16:45:30 +00:00
Ben Rodes
67e43ecc44 Merge branch 'main' into 38-cpp-generalize-use-after-free-libraries 2024-01-17 08:05:41 -08:00
Michael B. Gale
783f006d62 Go: Update go clean -modcache comment 2024-01-17 16:04:13 +00:00
Sid Shankar
2d71294f61 Merge pull request #15256 from sidshank/change/adjust-extracted-files-diagnostics
Js/Py/Rb: Report any extracted file as successfully extracted
2024-01-17 11:04:06 -05:00
Mathias Vorreiter Pedersen
39dafd6f6a C++: Suggestions to #15343 (#39)
* C++: Change the interface of 'FlowAfterFree' so that the module it takes
a single module as a parameter.

* C++: Add another predicate to the module signature.

* C++: Convert the use-after-free and double-free libraries to use new interface.

* C++: Accept test changes.
2024-01-17 11:02:46 -05:00
Max Schaefer
7bc03040ec Make tags for positive and negative examples more precise. 2024-01-17 15:57:27 +00:00
Max Schaefer
3ae484868a Merge pull request #15326 from github/max-schaefer/automodel-negative-sink-models
Automodel: Apply negative characteristics only to endpoints of the right kind.
2024-01-17 15:54:28 +00:00
Calum Grant
4660a25d44 Merge pull request #15354 from github/calumgrant/shared-diagnostics
C++/Swift: Create shared library and share Diagnostics
2024-01-17 15:40:12 +00:00
Max Schaefer
ae23920a6d Fix spurious source models for primitive types in framework mode. 2024-01-17 15:36:31 +00:00
Max Schaefer
9975f974ee Autoformat. 2024-01-17 14:53:09 +00:00
Max Schaefer
6d2bf68a86 Use inline expectations for all framework-mode tests. 2024-01-17 14:52:42 +00:00
Max Schaefer
6c47a5d5f9 Refactor framework-mode queries to make them more easily testable. 2024-01-17 14:51:58 +00:00
Erik Krogh Kristensen
17466385e0 Merge pull request #15351 from erik-krogh/zero-to-question
JS/PY/JAVA/RB: mark the range [0-?] as good in the overly-large-range query
2024-01-17 15:51:42 +01:00
Michael B. Gale
c00520011c Go: Install integration test dependencies to local GOPATH 2024-01-17 14:51:06 +00:00
Michael B. Gale
afc673324f Go: Move integration test sources to subdirectories 2024-01-17 14:50:57 +00:00
Max Schaefer
adea805546 Refactor application-mode tests so we can reuse most of it for framework mode. 2024-01-17 14:49:19 +00:00
Max Schaefer
312dd16956 Consolidate application mode tests. 2024-01-17 14:48:27 +00:00
Max Schaefer
692d5e55a2 Use inline expectations for positive examples. 2024-01-17 14:48:22 +00:00
Max Schaefer
83c567385f Use inline expectations for negative-example tests as well. 2024-01-17 14:47:39 +00:00
Max Schaefer
1ebd0747a8 Fix treatment of void method calls. 2024-01-17 14:40:47 +00:00
Max Schaefer
18e44b6f5c Turn AutomodelApplicationModeExtractCandidates into an inline-expectations test. 2024-01-17 14:40:46 +00:00
Max Schaefer
587d69e88c Refactor application-mode candidate-extraction query so we can test its results before sampling. 2024-01-17 14:40:46 +00:00
Max Schaefer
800a78d258 Treat unexploitable types more centrally.
The apparently missing test result is due to sampling.
2024-01-17 14:40:37 +00:00
Calum Grant
d57fc3d7db C++: Remove unneeded includes 2024-01-17 14:34:28 +00:00
Sid Shankar
2c683c910f Merge branch 'change/adjust-extracted-files-diagnostics' of https://github.com/sidshank/codeql into change/adjust-extracted-files-diagnostics 2024-01-17 14:32:36 +00:00
Sid Shankar
0824ab77e9 Adds change notes 2024-01-17 14:31:40 +00:00
Max Schaefer
8614d7bddb Address review feedback. 2024-01-17 14:29:52 +00:00
Calum Grant
51c5afff8b Create shared/cpp library and move Diagnostics there 2024-01-17 14:23:18 +00:00
AlexDenisov
8610c950e1 Merge pull request #15329 from github/alexdenisov/duplicate-destructor-calls
C++: update tests to pick up destructor changes
2024-01-17 15:05:30 +01:00
Michael Nebel
fcb9e473c0 C#: Add upgrade and downgrade scripts. 2024-01-17 14:08:18 +01:00
Michael Nebel
83c16ae993 C#: Extract structs representing inline arrays as inline arrays. 2024-01-17 14:01:05 +01:00
Michael Nebel
5e692a882e C#: Update dbscheme with a typekind for inline arrays. 2024-01-17 14:01:05 +01:00
erik-krogh
1a8a70dc1b mark the range [0-?] as good in the overly-large-range query 2024-01-17 13:11:57 +01:00
Mathias Vorreiter Pedersen
b7a7963d05 Merge pull request #15348 from MathiasVP/remove-bad-magic-swift 2024-01-17 12:00:22 +00:00
Alex Denisov
f1049a4431 C++: update tests to pick up destructor changes 2024-01-17 12:05:30 +01:00
Michael B. Gale
5cf9bc2a76 Merge pull request #15341 from github/mbg/go/simplify-tests 2024-01-17 10:56:34 +00:00
Felicity Chapman
e96585f777 Remove outdated CodeQL CLI docs 2024-01-17 09:29:53 +00:00
Sid Shankar
59098be8c4 Merge branch 'main' into change/adjust-extracted-files-diagnostics 2024-01-16 21:51:41 -05:00
Mathias Vorreiter Pedersen
6391346ade Swift: Add 'nomagic'. 2024-01-16 23:08:20 +00:00
Mathias Vorreiter Pedersen
1fba345fb3 Merge pull request #15219 from rdmarsh2/rdmarsh2/swift/parameterized-cfg-library
Swift: switch to shared, parameterized CFG library
2024-01-16 21:54:05 +00:00
Benjamin Rodes
9a0e2e57ba Updating .expected 2024-01-16 13:18:25 -05:00
Benjamin Rodes
a0ef7955b1 Updating FlowAfterFree to not enforce dominance of source/sink. DoubleFree and UseAfterFree queries now enforce dominance. 2024-01-16 13:15:36 -05:00
Pierre
d6030764aa Merge pull request #15279 from github/sitedocs/2.15.5-2
Generate Changelogs for 2.15.5 & 2.16.0
2024-01-16 18:29:22 +01:00
Shati Patel
e50a0ee7f9 Merge pull request #15333 from github/shati-patel/settings-telemetry
Add note about telemetry for CodeQL extension settings
2024-01-16 17:05:45 +00:00
Pierre
4866c9c811 Add 2.16.0 changelog and move query list link to index 2024-01-16 17:07:14 +01:00
Michael B. Gale
08c4dc1ea5 Go: Exclude all FlowSummaryNodes from test results 2024-01-16 15:51:40 +00:00
Alexander Eyers-Taylor
934474681d Merge pull request #15254 from github/post-release-prep/codeql-cli-2.16.0
Post-release preparation for codeql-cli-2.16.0
2024-01-16 14:50:40 +00:00
Calum Grant
e18ee790f2 Merge pull request #15322 from github/calumgrant/swift-diagnostics
Swift extractor: Generalise SwiftDiagnostics
2024-01-16 14:30:17 +00:00
Michael Nebel
8d64d71583 C#: Move the gen kind enum script. 2024-01-16 14:18:41 +01:00
Alex Ford
abbc80ac8a Ruby: update supported version to 3.3 2024-01-16 12:55:58 +00:00
AlexDenisov
696a72a127 Merge pull request #15259 from github/alexdenisov/swift-5.9.2
Swift: upgrade to 5.9.2
2024-01-16 12:49:13 +01:00
Calum Grant
7cadb0a574 Swift extractor: Simplify declarations back 2024-01-16 11:31:15 +00:00
Calum Grant
f400a5f49f Swift extractor: Fix Linux build 2024-01-16 11:05:05 +00:00
Calum Grant
2cc574dc70 Swift extractor: Use a global variable for the extractor name 2024-01-16 10:56:18 +00:00
Rasmus Wriedt Larsen
6f45de1095 Merge pull request #15325 from RasmusWL/c#-filter-order
C#: Respect order of `LGTM_INDEX_FILTERS` in buildless extraction
2024-01-16 09:28:44 +01:00
Tony Torralba
2246c969a3 Merge pull request #15244 from Marcono1234/marcono1234/regex-flags
Java: Improve Regex flag parsing
2024-01-16 08:25:49 +01:00
Shati Patel
c445b2b547 Add note about telemetry for CodeQL extension settings 2024-01-15 16:32:27 +00:00
Mathias Vorreiter Pedersen
c38ae93640 Swift: Fix import. 2024-01-15 15:42:51 +00:00
Mathias Vorreiter Pedersen
e735ced751 Swift: Autoformat. 2024-01-15 15:24:27 +00:00
Michael B. Gale
6c9f79cc32 Merge pull request #15327 from github/mbg/go/handle-pre-release-versions
Go: Better handle pre-release versions
2024-01-15 15:24:23 +00:00
github-actions[bot]
57df8b92df Post-release preparation for codeql-cli-2.16.0 2024-01-15 15:00:50 +00:00
Rasmus Wriedt Larsen
13c236227f C#: Apply suggestions from code review
Co-authored-by: Michael B. Gale <mbg@github.com>
2024-01-15 15:51:36 +01:00
Rasmus Wriedt Larsen
086e4f7f12 C#: Adjust test for LGTM_INDEX_FILTERS 2024-01-15 15:50:25 +01:00
Michael B. Gale
8c13429163 Go: Ensure getEnvGoSemVer returns a canonical SemVer 2024-01-15 14:20:48 +00:00
Michael B. Gale
a64c001637 Go: Remove unnecessary call to Canonical 2024-01-15 14:19:55 +00:00
Owen Mansel-Chan
63a914a324 Merge pull request #15324 from owen-mc/go/add-fasthttp-to-frameworks-for-coverage
Go: add fasthttp to frameworks for coverage
2024-01-15 14:15:19 +00:00
Michael B. Gale
42dcb5f94d Go: Better handle pre-release versions 2024-01-15 14:00:56 +00:00
Max Schaefer
90a4552c4f Fix omittable exists. 2024-01-15 13:45:03 +00:00
Max Schaefer
fee44074f7 Autoformat. 2024-01-15 13:44:45 +00:00
Max Schaefer
3befce98b3 When checking whether an endpoint has already been modelled, make sure to take the extensibleType into account. 2024-01-15 12:09:39 +00:00
Asger F
96f8a02a72 JS: Treat private-field methods as private 2024-01-15 13:00:39 +01:00
Max Schaefer
68cf9aca12 Remove a few getExtensibleType checks which are now unnecessary. 2024-01-15 11:50:59 +00:00
Rasmus Wriedt Larsen
59d239b230 C#: Respect order of LGTM_INDEX_FILTERS in buildless extraction
That is, using `exclude:**/*\ninclude:**/*` should include everything.
2024-01-15 11:45:58 +01:00
Owen Mansel-Chan
d85628e6a6 Update Go coverage reports 2024-01-15 10:17:48 +00:00
Owen Mansel-Chan
216464f382 Add fasthttp framework to the coverage reports 2024-01-15 10:14:06 +00:00
Calum Grant
39edfa3c14 Swift extractor: Rename a SwiftDiagnostic to Diagnostic 2024-01-15 09:34:28 +00:00
Calum Grant
f82c29ee37 Swift extractor: Generalize SwiftDiagnostics 2024-01-15 09:12:26 +00:00
Owen Mansel-Chan
057ee85cd0 Merge pull request #14123 from am0o0/amammad-go-fastHttp
Go: fasthttp
2024-01-14 20:12:31 +00:00
Ian Lynagh
ff2b40a53d Merge pull request #15315 from igfoo/igfoo/typo
C++: Fix typo
2024-01-12 18:28:32 +00:00
Ian Lynagh
e357d18d35 C++: Fix typo 2024-01-12 17:57:34 +00:00
Max Schaefer
919330fb53 Some more performance refactoring. 2024-01-12 17:38:58 +00:00
Max Schaefer
bb63fcde43 Refactor to avoid bad join order. 2024-01-12 15:24:24 +00:00
Alexander Eyers-Taylor
2704f4ed36 Merge pull request #15266 from github/felicitymay-publish-docs
Update supported-versions-compilers.rst on release candidate branch
2024-01-12 14:58:32 +00:00
Alexander Eyers-Taylor
7cd6c2601e Merge branch 'codeql-cli-2.16.0' into felicitymay-publish-docs 2024-01-12 14:58:12 +00:00
Michael Nebel
275822f80d Merge pull request #15296 from michaelnebel/csharp/getruntimeargument
C#: Improve getRuntimeArgumentForParameter to consider named arguments.
2024-01-12 15:57:17 +01:00
Michael Nebel
9becd0876f Merge pull request #15179 from michaelnebel/modelgenrespectmanual
C#/Java: Increase precision of model generation.
2024-01-12 15:12:21 +01:00
Alexander Eyers-Taylor
b2f1fbe875 Merge pull request #15305 from github/alexdenisov/revert-swift-change
Revert "Swift: separate installation of dependencies and autobuilding"
2024-01-12 13:55:54 +00:00
Max Schaefer
45ca301593 Rename a predicate. 2024-01-12 13:18:05 +00:00
Michael Nebel
dcce93ac4c C#: Address more review comments. 2024-01-12 14:07:27 +01:00
Michael Nebel
37a21ec548 Java: Address review comments. 2024-01-12 13:36:23 +01:00
Michael Nebel
74cdcab6d8 Java: Update expected test output. 2024-01-12 13:36:23 +01:00
Michael Nebel
6af0bca777 Java: Avoid generating contradicting summary and neutral summary models. 2024-01-12 13:36:23 +01:00
Michael Nebel
03d4025b99 Java: Add a testcase where both a neutral summary and summary is being generated. 2024-01-12 13:36:23 +01:00
Michael Nebel
c7045fbb99 C#: Add some test cases for excluding methods for model generation. 2024-01-12 13:35:23 +01:00
Michael Nebel
8702293878 C#: Update expected test output for type based model generator. 2024-01-12 13:35:23 +01:00
Michael Nebel
81de9d35af C#/Java: Don't generate models if there exist a manual summary or neutral summary. 2024-01-12 13:35:22 +01:00
Max Schaefer
ea26e21454 Extend negative characteristics for exceptions to source models. 2024-01-12 12:20:22 +00:00
Max Schaefer
06ba5ea9f8 Eliminate GetCallable modules and use getCallable instead. 2024-01-12 12:03:49 +00:00
Max Schaefer
76b84301e3 Share some code. 2024-01-12 12:03:49 +00:00
Max Schaefer
9f443d4f83 Make Unexploitable*Characteristic more precise. 2024-01-12 12:03:41 +00:00
Alex Denisov
28dd2e979b Revert "Swift: separate installation of dependencies and autobuilding"
This reverts commit dd13ea3d0a.
2024-01-12 12:34:13 +01:00
Mathias Vorreiter Pedersen
6bd31deb00 Merge pull request #15282 from MathiasVP/fix-duplicate-final-global-value
C++: Fix duplicate "final global value" nodes
2024-01-12 11:05:19 +00:00
Max Schaefer
a8336328fd Merge pull request #15176 from github/max-schaefer/py-url-redirection-qhelp
Python: Mention more sanitisation options in py/url-redirection qhelp.
2024-01-12 10:50:33 +00:00
Michael Nebel
c68f9b05cd C#: Address review comments. 2024-01-12 11:24:37 +01:00
Mathias Vorreiter Pedersen
8f36584bd9 C++: Fix Code Scanning errors. 2024-01-12 10:20:20 +00:00
Jeroen Ketema
b209ea6735 Merge pull request #15304 from MathiasVP/revert-12125
C++: Revert "Merge pull request #12125 from jketema/unique-function"
2024-01-12 11:20:00 +01:00
Mathias Vorreiter Pedersen
34980bfe20 C++: Add more QLDoc. 2024-01-12 10:12:34 +00:00
Tony Torralba
448439e76b Merge pull request #15294 from atorralba/atorralba/go/insecure-randomness-index-flowstep
Go: Recognize unsafe candidate selection in `go/insecure-randomness`
2024-01-12 11:08:56 +01:00
Owen Mansel-Chan
6945289afc Merge pull request #15246 from owen-mc/java/manual-neutral-overrides-generated
C#/Java: Manual neutral summaries should block generated summaries
2024-01-12 10:05:18 +00:00
Owen Mansel-Chan
ed4843f397 Merge pull request #15302 from github/dependabot/go_modules/go/extractor/extractor-dependencies-159a68acba
Bump the extractor-dependencies group in /go/extractor with 1 update
2024-01-12 10:03:58 +00:00
Michael Nebel
9f14c7c408 Merge pull request #15297 from michaelnebel/csharp/typealias
C# 12: Type alias [Test only]
2024-01-12 11:03:25 +01:00
Mathias Vorreiter Pedersen
fe2c806c2d C++: Undo some of the reverting. 2024-01-12 09:35:50 +00:00
Mathias Vorreiter Pedersen
84d08b0417 Revert "Merge pull request #12125 from jketema/unique-function"
This reverts commit 9c039c4a08, reversing
changes made to ecd2003c14.
2024-01-12 09:29:17 +00:00
Felicity Chapman
e408078eaa Merge pull request #15235 from github/docs-11486-security-severity
Replace blog link with link to GitHub user docs
2024-01-12 09:21:08 +00:00
Tony Torralba
87c6a3e38c Merge pull request #15301 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-12 09:31:27 +01:00
Tony Torralba
31c11add85 Updated change note 2024-01-12 08:55:24 +01:00
dependabot[bot]
dd08c31dc5 Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).


Updates `golang.org/x/tools` from 0.16.1 to 0.17.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.1...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 03:24:29 +00:00
github-actions[bot]
add9c4e489 Add changed framework coverage reports 2024-01-12 00:16:38 +00:00
Jeroen Ketema
1c9f5b8b74 Merge pull request #15300 from github/sashabu/uuidof
C++: Add a test with `__uuidof` in a template.
2024-01-12 00:05:49 +01:00
Felicity Chapman
f06cca8eff Merge branch 'main' into docs-11486-security-severity 2024-01-11 22:28:30 +00:00
Alexandre Boulgakov
3493252321 C++: Add a test with __uuidof in a template. 2024-01-11 22:11:50 +01:00
Andrew Eisenberg
42f6dbe0b1 Merge pull request #15288 from github/aeisenberg/problem.severity
Update query-metadata-style-guide.md clarify problem.severity
2024-01-11 12:53:13 -08:00
Asger F
59c9ac735a Merge pull request #15295 from asgerf/js/type-model-export
JS: Include sink nodes as base-case when resolving types
2024-01-11 20:47:32 +01:00
Tony Torralba
12c5b46a0a Reduce FPs
* Restrict allowed types in the flow step

* Discard more non-crypto-related TLS APIs
2024-01-11 16:20:46 +01:00
Michael Nebel
0fa2067c3f C#: Update expected test output. 2024-01-11 16:19:24 +01:00
Michael Nebel
b03eecb5ab C#: Add support for named arguments in getRuntimeArgumentForParameter. 2024-01-11 16:19:24 +01:00
Michael Nebel
85f0ad623b C#: Add testexample of using named arguments when calling a delegate. 2024-01-11 16:19:24 +01:00
Michael Nebel
8b464fbc4a Merge pull request #15249 from michaelnebel/csharp/lambdadefaultparams
C# 12: Support for lambda `param` parameter and parameter defaults.
2024-01-11 16:18:03 +01:00
Owen Mansel-Chan
5e9ddd8c63 Apply suggestions from code review on change notes
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-01-11 15:15:21 +00:00
Michael Nebel
ef73fc3a6f C#: Add a test for type alias. 2024-01-11 16:13:35 +01:00
Owen Mansel-Chan
3c369f88bb Add change notes 2024-01-11 14:00:17 +00:00
Erik Krogh Kristensen
d782bd9b1f Merge pull request #13624 from jorgectf/seclab/dotjs
JS: Add `dot.js` support
2024-01-11 14:57:19 +01:00
Owen Mansel-Chan
def957e814 Accept review suggestion fixing a comment
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-01-11 13:56:27 +00:00
Tom Hvitved
a1036c81ee Merge pull request #15273 from hvitved/ruby/captured-yield
Ruby: Handle captured `yield` calls
2024-01-11 14:34:34 +01:00
Owen Mansel-Chan
2f01688319 Merge pull request #15280 from owen-mc/java/add-manual-models-for-df-generation
Java: improve models for some important JDK methods
2024-01-11 12:47:37 +00:00
Asger F
82cee61999 JS: Include sink nodes as base-case when resolving types 2024-01-11 13:41:21 +01:00
Max Schaefer
6e9c90a6bb Properly distinguish negative source and sink characteristics.
In particular, `IsSanitizerCharacteristic` is a negative _source_ characteristic (not a negative sink characteristic), while `NeutralModelCharacteristic` is both.

This eliminates the erroneous test results.
2024-01-11 12:36:48 +00:00
Max Schaefer
ff4555ac5b Get rid of negative sink types.
Instead of positively implying the negative sink type, negative sink characteristics now negatively imply all sink types (but not source types). This is simpler and sice we will never have a huge number of sink types it doesn't impact performance either.

Changes to test results:

- The call to `createDirectories` at `Test.java:87` is now correctly classified as a source candidate, having previously been erroneously excluded by a negative _sink_ characteristic.
- The call to `compareTo` at `Test.java:48` is now erroneously classified as a source candidate; it should be suppressed by `IsSanitizerCharacteristic`, which is a negative sink characteristic, but should really be a negative source characteristic.
- In framework mode, several endpoints are now erroneously classified as source candidates even though they have neutral models, because `NeutralModelCharacteristic` is currently only a negative sink characteristic and not a negative source characteristic.
2024-01-11 12:19:53 +00:00
Max Schaefer
bcf4f4febd Drop a conjunct which is now spurious. 2024-01-11 11:56:59 +00:00
Max Schaefer
03ca244df2 Associate endpoints with their potential endpoint types and check these when determining candidates.
This prevents us from associating a sink candidate with a source type and vice versa.

However, this does not fix the problem of negative characteristics for sink types excluding source candidates.
2024-01-11 11:44:14 +00:00
Max Schaefer
a6d996b478 Add an example of a missed source candidate.
`Files.list` has a taint step from its first argument to its result, so that first argument should not be considered a sink candidate (and it is not). However, due to a bug in `IsMaDTaintStepCharacteristic` it is also not considered a source candidate, which is wrong: as the example shows, if that argument is a call we do very much want to consider it as a source candidate.
2024-01-11 11:27:34 +00:00
Max Schaefer
8e429bd399 Rename isSinkCandidate (and a related predicate) to isCandidate.
This reflects the fact that these predicates also deal with source candidates.
2024-01-11 11:20:51 +00:00
Tony Torralba
05b487e3a6 Go: Recognize unsafe candidate selection in go/insecure-randomness 2024-01-11 11:58:12 +01:00
Max Schaefer
dba2e06a1d Merge pull request #15283 from github/max-schaefer/release-automodel-query-pack
Release automodel extraction queries v0.0.12.
2024-01-11 10:28:55 +00:00
Tony Torralba
8ccacafb59 Merge pull request #15289 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-11 10:15:34 +01:00
Michael Nebel
1770beea25 C#: Update QL doc for getRuntimeArgumentForParameter. 2024-01-11 09:07:15 +01:00
Michael Nebel
4c1e84b992 C#: Address review comments. 2024-01-11 09:07:15 +01:00
Michael Nebel
4dedc454ae C#: Add change-note. 2024-01-11 09:07:15 +01:00
Michael Nebel
e18534e748 C#: Force population of compiler generated delegates used for lambdas. 2024-01-11 09:07:15 +01:00
Michael Nebel
9a64e2a9b0 C#: Add test for lambda default parameters. 2024-01-11 09:07:15 +01:00
Michael Nebel
71c996a0be C#: Update lambdaArgument expected output. 2024-01-11 09:07:14 +01:00
Michael Nebel
b2faf3618c C#: Add support for params parameters in getRuntimeArgumentForParameter. 2024-01-11 09:07:14 +01:00
Michael Nebel
f0852c89bc C#: Add test for lambda arguments. 2024-01-11 09:07:14 +01:00
Paolo Tranquilli
482b5f3b29 Merge pull request #15265 from github/redsun82/def-to-non-header-include-exceptions
C++: add `.def` to exceptions to AV rule 32
2024-01-11 08:34:43 +01:00
github-actions[bot]
7db46b6ab6 Add changed framework coverage reports 2024-01-11 00:16:44 +00:00
Andrew Eisenberg
2f190d6552 Update docs/query-metadata-style-guide.md
Co-authored-by: Angela P Wen <angelapwen@github.com>
2024-01-10 14:27:00 -08:00
Owen Mansel-Chan
3767348dec Update test expectations 2024-01-10 22:25:08 +00:00
Owen Mansel-Chan
7824e60acd Manual neutral summaries should block generated summaries 2024-01-10 22:25:06 +00:00
Owen Mansel-Chan
52563b01b7 Factor logic out into interpretNeutral 2024-01-10 22:25:04 +00:00
Owen Mansel-Chan
370a32da8b Test summary models and neutral models, manual and generated 2024-01-10 22:25:02 +00:00
Andrew Eisenberg
303272d0d4 Update query-metadata-style-guide.md clarify problem.severity 2024-01-10 13:47:35 -08:00
Erik Krogh Kristensen
51fe477ed1 Merge pull request #15271 from erik-krogh/fastTS
JS: faster TypeScript extraction
2024-01-10 21:02:34 +01:00
Owen Mansel-Chan
9e2e01ff89 Update Top JDK APIs test expectation 2024-01-10 17:07:33 +00:00
Ian Lynagh
5d3166cfef Kotlin: Tweak code formatting 2024-01-10 16:39:49 +00:00
Ian Lynagh
80163c5aac Kotlin 2: Just accept the remaining comment differences for now 2024-01-10 16:39:47 +00:00
Ian Lynagh
ce4253c17f Kotlin 2: Remove an expected diagnostic match
It is only generated when using the PSI comment extractor.
2024-01-10 16:39:04 +00:00
Ian Lynagh
20254fd71e Kotlin: Accept a location change 2024-01-10 16:39:04 +00:00
Ian Lynagh
b3f8167973 Kotlin: Don't warn if we can't find a label for a fake owner
The fake owner probably just wasn't extracted
2024-01-10 16:39:02 +00:00
Owen Mansel-Chan
33030417b4 Add change note 2024-01-10 15:48:28 +00:00
Tony Torralba
52d3e3da31 Merge pull request #15268 from atorralba/atorralba/go/cleartext-logging-src-and-sink-improvs
Go: Adds sources and sinks to `go/clear-text-logging`
2024-01-10 15:52:40 +01:00
Tom Hvitved
ad75562b55 CPP: Update expected test output 2024-01-10 15:27:22 +01:00
Ian Wright
3534bfca9c Merge pull request #15251 from github/z80coder/dry-run
Support dry-run of publishing script
2024-01-10 14:16:10 +00:00
Philip Ginsbach
a732199317 Merge pull request #15261 from github/ginsbach/WeakAliasesInLanguageReference
document weak aliases in the language reference
2024-01-10 13:55:10 +00:00
Ian Lynagh
f111fba4b7 Merge pull request #15269 from igfoo/igfoo/ktfmt
Kotlin: Reformat code
2024-01-10 13:35:35 +00:00
Tom Hvitved
295198744b Ruby: Handle captured yield calls 2024-01-10 14:25:15 +01:00
Tom Hvitved
55be4c39ef Ruby: Add data flow call sensitivity test 2024-01-10 14:25:12 +01:00
Paolo Tranquilli
1034c3d2f9 Merge pull request #15277 from github/redsun82/swift-fix-upgrade
Swift: fix upgrade and downgrade scripts
2024-01-10 14:19:25 +01:00
Tony Torralba
5e8c63c3aa Use arg position instead of arg as class field to reduce number of instances 2024-01-10 14:12:29 +01:00
Owen Mansel-Chan
28aa9b2b3c C#: Emulate that some methods don't have a body (so generated summaries will be applied) 2024-01-10 12:54:33 +00:00
erik-krogh
06c1fff770 address review comments 2024-01-10 13:53:54 +01:00
Tony Torralba
78c0cdfa2c Apply suggestions from code review
co-authored-by: Owen Mansel-Chan <owen-mc@github.com>
2024-01-10 13:33:41 +01:00
Tony Torralba
3534f692dc Fix test expectations
Barrier-in addition removes an overlapping path
2024-01-10 13:33:41 +01:00
Tony Torralba
80526e509e Go: Adds sources and sinks to go/clear-text-logging 2024-01-10 13:33:41 +01:00
Tony Torralba
ca0a1dc7ae Merge pull request #15267 from atorralba/atorralba/go/fmt-appenderorsprinter-mad
Go: Migrate AppenderOrSprinter model to models-as-data
2024-01-10 13:31:19 +01:00
Paolo Tranquilli
e64ce228bb Merge pull request #15276 from github/redsun82/cmake-drop-internal-transition
Bazel/CMake: drop confusing `_INTERNAL_TRANSITION` suffix
2024-01-10 13:18:33 +01:00
Pierre
78f0aa971b Fix historic changelogs (security coverage section) 2024-01-10 13:02:09 +01:00
Pierre
365cde36ae Create 2.15.5 changelog 2024-01-10 13:01:49 +01:00
Mathias Vorreiter Pedersen
7a0cbb4e5a C++: Accept test changes. 2024-01-10 11:55:53 +00:00
Mathias Vorreiter Pedersen
0c3ea6c5df C++: Fix conflation issue. 2024-01-10 11:55:39 +00:00
Mathias Vorreiter Pedersen
259bf27334 C++: Add pointer/pointee conflation test. 2024-01-10 11:51:40 +00:00
Ian Wright
75545db97c restore files, whether overriding or not 2024-01-10 11:40:31 +00:00
Tony Torralba
46df5857ec Update test expectations 2024-01-10 12:31:02 +01:00
Max Schaefer
8d56ee4a56 Release automodel extraction queries v0.0.12. 2024-01-10 11:29:36 +00:00
Paolo Tranquilli
796c862623 Swift: fix downgrade script 2024-01-10 12:23:48 +01:00
Paolo Tranquilli
1d483cff1d Swift: fix upgrade script 2024-01-10 12:09:11 +01:00
Ian Wright
f793ce1e49 remove temp testing comments 2024-01-10 11:07:06 +00:00
Ian Wright
ed8422a2da remove need for CODEQL_DIST path 2024-01-10 11:07:06 +00:00
Ian Wright
0d2ec2d632 install codeql extension 2024-01-10 11:07:06 +00:00
Ian Wright
62bdaf069b use gh tool to access codeql 2024-01-10 11:07:05 +00:00
Ian Wright
30e5be68c9 temp comment for testing 2024-01-10 11:07:05 +00:00
Ian Wright
9895114e05 temp comment for testing 2024-01-10 11:07:05 +00:00
Ian Wright
0f76fbad36 better processing of args 2024-01-10 11:07:05 +00:00
Ian Wright
749f8b9807 fix help message 2024-01-10 11:07:05 +00:00
Ian Wright
00f4991648 support dry-run
fix

fix

temp

temp

better support for dry-run

fix

fix

fix

fix

reinstate exits
2024-01-10 11:07:05 +00:00
Paolo Tranquilli
b93d108400 Bazel/CMake: drop confusing _INTERNAL_TRANSITION suffix 2024-01-10 12:00:40 +01:00
Tony Torralba
dc911c3f28 Apply suggestions from code review
co-authored-by: Owen Mansel-Chan <owen-mc@github.com>
2024-01-10 11:53:53 +01:00
Philip Ginsbach
d38d4aadf2 try to be clearer about weak and strong aliases in the language reference 2024-01-10 10:53:20 +00:00
Tom Hvitved
c9cf2a899c Merge pull request #15260 from hvitved/dataflow/may-benefit-from-cctx-simplify
Data flow: Remove column from `mayBenefitFromCallContext`
2024-01-10 11:43:15 +01:00
Philip Ginsbach
29e4623d02 fix typos and other small improvements from review 2024-01-10 10:42:04 +00:00
Max Schaefer
ac8e92eec5 Merge pull request #15264 from github/max-schaefer/automodel-exclude-generated-calls
Automodel: Do not generate features for compiler-generated program elements.
2024-01-10 10:22:00 +00:00
Erik Krogh Kristensen
77b0c7f025 Merge pull request #15221 from erik-krogh/react-step
JS: promote `PropsTaintStep` to a `PreCallGraphStep`
2024-01-10 10:17:32 +01:00
Erik Krogh Kristensen
3000b4b9b3 rename PropsTaintStep to PropsFlowStep
Co-authored-by: Asger F <asgerf@github.com>
2024-01-10 09:45:29 +01:00
Tony Torralba
d6082f8446 Merge pull request #14926 from ebickle/fix/update-gson-model
Java: Improve Gson parse, get, and stream models
2024-01-10 09:11:01 +01:00
Michael Nebel
94bf5a41e6 Merge pull request #15225 from michaelnebel/java/modeldiffworkflow
Java: Bring the Model Diff workflow back into a working state.
2024-01-10 08:50:31 +01:00
Philip Ginsbach
1284fc529f documentation: update definition of applicativeness in the specification 2024-01-09 17:09:05 +00:00
Philip Ginsbach
b393bc9a88 documentation: update definition of definite environment in the specification 2024-01-09 17:08:59 +00:00
Philip Ginsbach
805e9d8910 documentation: weak and strong aliases in the specification 2024-01-09 17:00:45 +00:00
Max Schaefer
9b7cfd88cd Clarify relationship of isFromSource and Element::fromSource. 2024-01-09 16:21:36 +00:00
Tony Torralba
a0f6b5ea10 Update test expectations 2024-01-09 17:00:20 +01:00
Tony Torralba
da4049e25c Go: Migrate AppenderOrSprinter model to models-as-data 2024-01-09 16:35:47 +01:00
Ian Lynagh
bf611feab3 Kotlin: Reformat code
Using:
    java -jar ktfmt-0.46-jar-with-dependencies.jar --kotlinlang-style java/kotlin-extractor/**/*.kt
2024-01-09 15:33:41 +00:00
Felicity Chapman
be0df9298f Update supported-versions-compilers.rst on 2.16.0 branch 2024-01-09 15:06:51 +00:00
Paolo Tranquilli
27160b8861 C++: add change note 2024-01-09 15:31:43 +01:00
erik-krogh
d0fcb7d1ed faster TypeScript extraction by not having to compute the "type-string" for a type every time 2024-01-09 15:30:55 +01:00
Paolo Tranquilli
0bfeadbf1f C++: add .def to exception to test 2024-01-09 15:30:27 +01:00
Paolo Tranquilli
270df940ff C++: add .def to exceptions to AV rule 32
This is used as textual includes in several projects for macro
metaprogramming, for example in `llvm-project` and in `swift` (and since
some time in our internal codebase as well).
2024-01-09 15:18:13 +01:00
Max Schaefer
3e8775daaa Automodel: Do not generate features for compiler-generated program elements.
These have dummy locations, which breaks certain invariants that break downstream processing.
2024-01-09 13:39:46 +00:00
Ian Lynagh
0bc1463ab0 Merge pull request #14941 from igfoo/igfoo/dff
Kotlin 2: Accept some location changes
2024-01-09 12:20:37 +00:00
Ian Lynagh
95f336c05b Merge pull request #14393 from igfoo/igfoo/no1.4
Kotlin: Remove 1.4 compatibility
2024-01-09 12:20:15 +00:00
Mathias Vorreiter Pedersen
1c81c9b6e3 Merge pull request #15262 from MathiasVP/fix-qldoc-on-cmpWithLinearBound
C++: Fix QLDoc on `cmpWithLinearBound`
2024-01-09 11:16:42 +00:00
Philip Ginsbach
225aff47ed documentation: update section on applicativity 2024-01-09 10:39:18 +00:00
Philip Ginsbach
493158a3f5 documentation: add section no strong and weak aliases 2024-01-09 10:39:18 +00:00
Tom Hvitved
f90201eb56 Data flow: Remove column from mayBenefitFromCallContext 2024-01-09 11:34:43 +01:00
Mathias Vorreiter Pedersen
f5e1e49761 C++: Fix QLDoc on 'cmpWithLinearBound' as a response to #15248. 2024-01-09 10:07:22 +00:00
Alex Denisov
0e73531aa9 Swift: upgrade to 5.9.2 2024-01-09 09:23:32 +01:00
Tony Torralba
3224b5c1b9 Merge pull request #15257 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-09 08:57:28 +01:00
github-actions[bot]
384cf90e8f Add changed framework coverage reports 2024-01-09 00:17:10 +00:00
maikypedia
6c8fbe877d Changes 2024-01-09 00:46:41 +01:00
Eric Bickle
f6fa7120d9 Merge branch 'main' into fix/update-gson-model 2024-01-08 15:46:14 -08:00
Sid Shankar
b26fef816a Rb: Report any extracted file as successfully extracted 2024-01-08 22:21:30 +00:00
Sid Shankar
fb660b8f05 Py: Report any extracted file as successfully extracted 2024-01-08 22:20:51 +00:00
Sid Shankar
e30a0d1e83 JS: Report any extracted file as successfully extracted 2024-01-08 22:19:33 +00:00
Robert Marsh
ec6d8da6b6 Swift: merge ControlFlowGraphParameter into ControlFlowGraphImplSpecific 2024-01-08 21:31:15 +00:00
Eric Bickle
929ce65af1 Remove zero width space characters. 2024-01-08 13:15:38 -08:00
Jeroen Ketema
9330afbe8a Merge pull request #15252 from jketema/builtin-rm
C++: Remove test that is no longer relevant
2024-01-08 20:38:46 +01:00
Edward Minnix III
e9467fe2d6 Merge pull request #14724 from egregius313/egregius313/java/environment-variable-injection
Java: Environment variable injection query
2024-01-08 13:06:31 -05:00
Mathias Vorreiter Pedersen
18bd0d0ad0 Merge pull request #14954 from microsoft/32-cpp-string-concatenation-library
32 cpp string concatenation library
2024-01-08 18:42:31 +01:00
Geoffrey White
2f6f376d2d Merge pull request #15230 from geoffw0/swiftui
Swift: Add dataflow tests for property wrappers and SwiftUI
2024-01-08 17:41:43 +00:00
Alexander Eyers-Taylor
98a2af8fed Merge pull request #15250 from github/release-prep/2.16.0
Release preparation for version 2.16.0
2024-01-08 16:58:40 +00:00
Cornelius Riemenschneider
c84e85d35d Merge pull request #15232 from github/criemen/bump-bazel-rules
Bazel: Bump dependant rules versions.
2024-01-08 17:49:21 +01:00
Ian Lynagh
d7cdad04dd Merge pull request #14895 from igfoo/igfoo/kt-snap
Kotlin: Add a 2.0.255 snapshot
2024-01-08 16:13:03 +00:00
Ed Minnix
55da62e9cf Remove stray comma
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-01-08 11:09:11 -05:00
Alex Ford
ef8ca55d92 Merge pull request #15203 from pwntester/patch-3
Ruby: Update Kernel.qll to include `Object.send` aliases
2024-01-08 15:32:57 +00:00
Chuan-kai Lin
a743fca3a5 Merge pull request #15243 from github/cklin/upgrade-delete-fixes-ruby
Ruby: Fix upgrade delete directives
2024-01-08 07:27:59 -08:00
Chuan-kai Lin
c4e5506a2c Merge pull request #15242 from github/cklin/upgrade-delete-fixes-csharp
C#: Fix upgrade delete directives
2024-01-08 07:27:40 -08:00
Chuan-kai Lin
d7e22b2ddd Merge pull request #15241 from github/cklin/upgrade-delete-fixes-cpp
C++: Fix upgrade delete directives
2024-01-08 07:27:27 -08:00
Chris Smowton
b7158ab1d7 Merge pull request #15231 from github/smowton/admin/note-java-21-support
Note Java 21 support
2024-01-08 15:19:48 +00:00
Ed Minnix
b8466b45be Update change note date 2024-01-08 09:39:11 -05:00
Edward Minnix III
2440075402 Remove off-topic reference
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:39:10 -05:00
Edward Minnix III
3816271b3e Remove redundant CWE link
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:39:10 -05:00
Ed Minnix
2eff6b351c Add comment 2024-01-08 09:39:09 -05:00
Ed Minnix
16bb19e176 Add OWASP and CERT references 2024-01-08 09:39:08 -05:00
Ed Minnix
9f974415c0 Add references to CWE-454 (External Initialization of Trusted Variables) 2024-01-08 09:39:07 -05:00
Ed Minnix
97b29bb965 Add Java Tutorial reference 2024-01-08 09:39:06 -05:00
Edward Minnix III
938d52b86f Docs review suggestions
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-01-08 09:39:05 -05:00
Ed Minnix
a528db8958 Use MapMutation instead of MethodCall 2024-01-08 09:39:05 -05:00
Ed Minnix
e14be0e971 Add BAD markers to samples 2024-01-08 09:39:04 -05:00
Ed Minnix
709649e9df Model replace and putIfAbsent 2024-01-08 09:39:03 -05:00
Ed Minnix
1544330f3f Minor fixes for code review 2024-01-08 09:38:53 -05:00
Ed Minnix
4b9b27c395 change note 2024-01-08 09:38:52 -05:00
Edward Minnix III
18e8a27fca Reworded name and description 2024-01-08 09:38:51 -05:00
Edward Minnix III
1f37e70d83 Fix typos
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:38:51 -05:00
Ed Minnix
51006aa088 Formatting fix 2024-01-08 09:38:50 -05:00
Ed Minnix
6eff72f99a Include other map mutations 2024-01-08 09:38:49 -05:00
Ed Minnix
4fc6f710a4 Fix alert message 2024-01-08 09:38:48 -05:00
Ed Minnix
1550f5df2a Environment variable injection query documentation 2024-01-08 09:38:47 -05:00
Ed Minnix
f1f0f50c92 TaintedEnvironmentVariableQuery docs 2024-01-08 09:38:47 -05:00
Ed Minnix
818c5de8d5 security-severity metadata 2024-01-08 09:38:46 -05:00
Ed Minnix
d4e2b84348 Cleanup helper dataflow configuration 2024-01-08 09:38:45 -05:00
Ed Minnix
f05f16116b Testing for Environment variable injection 2024-01-08 09:38:45 -05:00
Ed Minnix
8ed3f3c865 Move to library 2024-01-08 09:38:44 -05:00
Ed Minnix
65d05bf3de Add environment-injection to Model Validation 2024-01-08 09:38:43 -05:00
Ed Minnix
814885f7f6 Hudson environment variables models 2024-01-08 09:38:43 -05:00
Ed Minnix
028bd49211 org.apache.commons.exec models 2024-01-08 09:38:42 -05:00
Ed Minnix
b482b36b5f Initial ProcessBuilder support 2024-01-08 09:38:41 -05:00
Ed Minnix
ad32b81492 environment-injection sink 2024-01-08 09:38:41 -05:00
Ed Minnix
93025cc8cf Argument injection initial commit 2024-01-08 09:38:40 -05:00
Tony Torralba
7e6f2d1fc5 Merge pull request #14681 from atorralba/atorralba/java/weak-randomness-cve-coverage
Java: Add more sinks to the Insecure Randomness query
2024-01-08 15:33:03 +01:00
Robert Marsh
51acd1169c Swift: accept test output 2024-01-08 14:29:51 +00:00
Jeroen Ketema
e772531bb3 C++: Remove test that is no longer relevant 2024-01-08 15:24:41 +01:00
Geoffrey White
6636c76af8 Merge pull request #15122 from geoffw0/pwhash
Swift: Query for Use of an inappropriate cryptographic hashing algorithm on passwords
2024-01-08 14:11:02 +00:00
Ian Lynagh
02734be287 Kotlin: Fix building with 2.0.255 snapshots
A couple of extension functions were moved
2024-01-08 13:25:25 +00:00
Ian Lynagh
9bc0167566 Kotlin: Add a 2.0.255 snapshot
The current master isn't compatible with the 2.0.0-Beta1
2024-01-08 13:25:25 +00:00
github-actions[bot]
a6c8cc9551 Release preparation for version 2.16.0 2024-01-08 13:11:26 +00:00
Cornelius Riemenschneider
b0599edb7e Bazel: Bump dependant rules versions.
This doesn't bump rules_python, as there's some incompatible changes in that
which will need further addressing.
2024-01-08 11:21:02 +01:00
Arthur Baars
f4df5c9556 Merge pull request #15224 from aibaars/ruby-update-grammar
Ruby: update tree-sitter-ruby
2024-01-08 11:01:42 +01:00
Tamás Vajk
6b8ed7ee71 Merge pull request #15175 from tamasvajk/feature/arg-param-mapping
C#: Improve arg-param mapping logic to better handle arguments passed to `params` parameters
2024-01-08 10:42:38 +01:00
Tom Hvitved
25e2271b2f Merge pull request #15157 from hvitved/dataflow/fwd-flow-in-non-linear-rec
Data flow: Avoid unnecessary non-linear recursion in `fwdFlowIn`
2024-01-08 10:31:51 +01:00
Tamas Vajk
e67035f891 Fix comment in test file 2024-01-08 10:00:39 +01:00
Tamas Vajk
e70cb1f259 Code quality improvement: simplify DataFlowPrivate::isParamsArg 2024-01-08 10:00:39 +01:00
Tamas Vajk
91637d49d4 Fix null dereference false positive 2024-01-08 10:00:39 +01:00
Tamas Vajk
a354ca3264 Add null dereference test case with false positive 2024-01-08 10:00:39 +01:00
Tamas Vajk
35ee3246bb Add change note 2024-01-08 10:00:39 +01:00
Tamas Vajk
7daeeef3a1 C#: Improve arg-param mapping logic to consider named arguments passed to params parameters 2024-01-08 10:00:39 +01:00
Tamas Vajk
9bb807431d C#: Improve arg-param mapping logic to consider arguments passed to params parameters 2024-01-08 10:00:39 +01:00
Tamas Vajk
93b0eb9ba3 C#: Add more test cases to argument-parameter mapping test 2024-01-08 10:00:39 +01:00
Alvaro Muñoz
dbefc132de Apply suggestions from code review
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2024-01-07 10:31:50 +01:00
Marcono1234
3edfdc5ceb Java: Improve Regex flag parsing
Fixes:
- Flag `d` not being recognized
- Syntax for disabling flags (`-`) not being recognized
- Non-capturing group with flags erroneously containing `:` as literal
2024-01-06 04:15:09 +01:00
Chuan-kai Lin
66d2b9b7d2 Ruby: Fix upgrade delete directives 2024-01-05 14:21:52 -08:00
Chuan-kai Lin
6e25fb129b C#: Fix upgrade delete directives 2024-01-05 14:21:08 -08:00
Chuan-kai Lin
6f5bce046c C++: Fix upgrade delete directives 2024-01-05 14:20:30 -08:00
Robert Marsh
80452cc9f7 Swift: redirect consistency queries to new module 2024-01-05 21:28:21 +00:00
Robert Marsh
2d457e17d6 Swift: autoformat for CFG library 2024-01-05 21:28:07 +00:00
Robert Marsh
86f59a1c13 Swift: add AnnotatedExitNode to cfg to match prior interface 2024-01-05 21:25:08 +00:00
Robert Marsh
ea4855bc06 Swift: add change note for parameterized CFG library 2024-01-05 21:24:44 +00:00
Robert Marsh
2f0d052558 Swift: header comment for ControlFlowGraphParameter 2024-01-05 21:19:46 +00:00
Henry Mercer
93d9332ab4 Merge pull request #15236 from github/codeql-cli-2.15.5
Merge `codeql-cli-2.15.5` back to `main`
2024-01-05 18:49:40 +00:00
Harry Maclean
d1fc40ce4f Merge pull request #15234 from pwntester/patch-4
Ruby: Add `[]` to the methods returning an `ActionController::Parameters"
2024-01-05 15:41:48 +00:00
Chuan-kai Lin
35c7d3ab15 Merge pull request #15237 from github/cklin-patch-1
Python: Fix typo in upgrade script
2024-01-05 07:40:18 -08:00
Chuan-kai Lin
2924be554c Python: Fix typo in upgrade script 2024-01-05 07:15:21 -08:00
Henry Mercer
59edae0b17 Merge pull request #15229 from github/codeql-cli-2.15.4
Merge `codeql-cli-2.15.4` into `codeql-cli-2.15.5`
2024-01-05 15:12:22 +00:00
Felicity Chapman
8fdeb5691b Fix bad table formatting 2024-01-05 14:50:16 +00:00
Alvaro Muñoz
9146407f23 Add [] to the list of methods returning an `ActionController::Parameters" 2024-01-05 15:14:11 +01:00
Felicity Chapman
222c498ded Replace blog link with link to GitHub user docs 2024-01-05 14:13:38 +00:00
Arthur Baars
20022b6f3a Add test case 2024-01-05 14:39:30 +01:00
Arthur Baars
aad42b1b0d Add change note 2024-01-05 14:36:52 +01:00
Arthur Baars
6ed7223167 Ruby: update tree-sitter-ruby 2024-01-05 14:33:14 +01:00
Geoffrey White
0aec2b1bf4 Swift: Improve consistency of phrasing arouaround 'computationally hard'. 2024-01-05 13:21:01 +00:00
Ben Rodes
250ed48bf3 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-05 08:19:11 -05:00
Geoffrey White
a0ea7148cb Swift: Add GOOD and BAD comments in the sensitive data hashing examples as well. 2024-01-05 13:17:21 +00:00
Geoffrey White
80afa65751 Swift: Add GOOD and BAD comments. 2024-01-05 13:16:41 +00:00
Geoffrey White
657e4d4132 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-01-05 13:04:47 +00:00
Chris Smowton
48d48c16ab Note Java 21 support
Supported as of CodeQL release 2.15.4
2024-01-05 11:26:23 +00:00
Geoffrey White
2ab5e6f64c Swift: Add link / reference to CryptoSwift. 2024-01-05 11:02:55 +00:00
Michael Nebel
04a724f373 Java: Update the model diff workflow. 2024-01-05 11:28:47 +01:00
Rasmus Wriedt Larsen
95c24275f2 Merge pull request #15044 from RasmusWL/automated-subclass-models
Python: Automated subclass models
2024-01-05 10:43:48 +01:00
Michael Nebel
8fe73f72cc Java: Trigger Models as Data diff workflow on changes to the shared scripts. 2024-01-05 09:22:49 +01:00
Michael Nebel
8810f166ee Merge pull request #15228 from michaelnebel/modelgenoutputdir
Java/C#: Make it possible to specify subfolder location of generated model files.
2024-01-05 09:18:41 +01:00
Michael Nebel
a3e2d40392 Merge pull request #15222 from michaelnebel/csharp/updatestats
C#: Update DB stats.
2024-01-05 09:15:47 +01:00
Ben Rodes
2b325e99ce Merge branch 'main' into 32-cpp-string-concatenation-library 2024-01-04 15:28:28 -05:00
Benjamin Rodes
ed788e0a7a Updating test output. 2024-01-04 15:27:29 -05:00
Benjamin Rodes
e9bb3b4b28 Limiting << operator to ostream, and putting this check at the same location as the check for basic_string for + operator. 2024-01-04 15:25:47 -05:00
Chris Smowton
8144d90d4d Merge pull request #15227 from smowton/smowton/admin/add-test-buildless-maven-multimodule
Add test for Java buildless vs Maven multimodule projects
2024-01-04 16:36:44 +00:00
Geoffrey White
4016033f88 Swift: Add dataflow test cases for property wrappers. 2024-01-04 15:39:20 +00:00
Ian Wright
3668ba6b03 Merge pull request #15226 from github/z80coder/release-automodel-0.0.4
0.0.11 release of `automodel` extraction queries
2024-01-04 15:03:35 +00:00
Joe Farebrother
e8c0fceb81 Use post-update nodes for this access in void handler 2024-01-04 14:25:39 +00:00
Joe Farebrother
7d11e4486e Adress reveiw comments - update tests to path-problem and support all this qualifiers 2024-01-04 14:25:39 +00:00
Joe Farebrother
cdeac9b7f8 Add change note + fix qldoc 2024-01-04 14:25:39 +00:00
Joe Farebrother
b9754df390 Add case for void-returning handler methods 2024-01-04 14:25:39 +00:00
Joe Farebrother
00892e127f Add unit test + fix flow step 2024-01-04 14:25:38 +00:00
Joe Farebrother
c3cd40fc69 Add flow steps from page models 2024-01-04 14:25:38 +00:00
Owen Mansel-Chan
6f9242b1cb Merge pull request #15162 from owen-mc/go/stratify-cfg-succ
Go: Stratify `CFG::succ` to avoid recursion
2024-01-04 14:11:25 +00:00
Ben Rodes
8d84540a54 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-01-04 09:09:20 -05:00
Ian Wright
dab28edfa9 0.0.11 release of automodel extraction queries 2024-01-04 13:10:46 +00:00
Michael Nebel
e44b2d26ce Java/C#: Make it possible to specify subfolder location of generated model files. 2024-01-04 14:05:13 +01:00
Michael Nebel
682aef9548 Merge pull request #15212 from michaelnebel/csharp/stringreplace
C#: Fix Log forging false positive.
2024-01-04 13:38:29 +01:00
Geoffrey White
fb77e3733b Swift: Add a test of SwiftUI secure fields as a sensitive data source. 2024-01-04 12:34:33 +00:00
Chris Smowton
c90171c73f Add test for Java buildless vs Maven multimodule projects 2024-01-04 12:30:13 +00:00
Michael Nebel
4961e659b4 C#: Update DB stats. 2024-01-04 13:07:49 +01:00
Ian Wright
7c6d30b1a2 Merge pull request #15165 from github/z80coder/automodel-release
ensure `publish.sh` uses the latest `automodel` release
2024-01-04 11:58:59 +00:00
Owen Mansel-Chan
ce3097e9ce Fix manual models for String.valueOf(Object)
Add a neutral model for it, but also a summary model for `String.valueOf(CharSequence)`
2024-01-04 11:31:20 +00:00
Owen Mansel-Chan
0076f06ce7 Improve manual models of java.lang.Exception 2024-01-04 11:31:18 +00:00
Owen Mansel-Chan
e415c54c5e Reorder manual models of java.lang.Throwable 2024-01-04 11:31:16 +00:00
Owen Mansel-Chan
f52ea5c2fd Improve manual models of java.lang.Throwable 2024-01-04 11:31:14 +00:00
Ian Wright
468454645e better 2024-01-04 11:15:05 +00:00
Ian Wright
4530510450 check if provided argument is valid 2024-01-04 11:02:58 +00:00
Ian Wright
545b5e7e83 better comment 2024-01-04 11:02:58 +00:00
Ian Wright
fb44b9c7dd better comment 2024-01-04 11:02:57 +00:00
Ian Wright
e4a798e9cc better comment 2024-01-04 11:02:57 +00:00
Ian Wright
af940f5e41 don't specify defaults 2024-01-04 11:02:57 +00:00
Ian Wright
45b1790fa2 add publication warning 2024-01-04 11:02:57 +00:00
Ian Wright
337512174f wip
wip

wip

more checks

fix bug if release folder already exists

fix bug if release folder already exists

ensure branch has correct release; dry-run

simplify branches

step by step

fix paths

pushd/popd

pushd/popd

use bash

simplify

simplify

simplify

simplify

add dry run
2024-01-04 11:02:57 +00:00
Ian Wright
6572be668c get release version 2024-01-04 11:02:57 +00:00
erik-krogh
58dc14d5bb update expected output 2024-01-04 11:38:58 +01:00
erik-krogh
a9f2b3fad6 promote PropsTaintStep to a PreCallGraphStep 2024-01-04 10:45:22 +01:00
Geoffrey White
31af8b9024 Swift: Test SwiftUI flow sources. 2024-01-04 09:28:10 +00:00
Michael Nebel
5778720194 Merge pull request #15220 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-04 09:39:58 +01:00
Owen Mansel-Chan
e2e91ebe1c Fix capitalization in predicate name
This was introduced by a copy-paste error
2024-01-04 07:08:37 +00:00
Owen Mansel-Chan
dfd25f705d Add pragma[nomagic] to top-level succ0 and remove cached 2024-01-04 07:06:55 +00:00
github-actions[bot]
63a1e8fcf7 Add changed framework coverage reports 2024-01-04 00:16:48 +00:00
Robert Marsh
41ac0fca85 Swift: use toString and Location from shared CFG library 2024-01-03 21:11:15 +00:00
Owen Mansel-Chan
90f07d2116 Add pragma[nomagic] to member 'succ0' 2024-01-03 16:54:58 +00:00
Owen Mansel-Chan
697aa609f4 Merge pull request #15211 from owen-mc/go/redefine-successfully-extracted-files
Go: report any extracted file as successfully extracted
2024-01-03 16:07:09 +00:00
Owen Mansel-Chan
14cffc3170 Merge pull request #15128 from owen-mc/go/fix-fp-incorrect-integer-conversion-signedness
Go: fix FP in incorrect integer conversion query relating to strict comparisons with MaxInt and MaxUint
2024-01-03 14:57:34 +00:00
Owen Mansel-Chan
bb44141390 Add QLDoc for succ0 2024-01-03 14:55:56 +00:00
Owen Mansel-Chan
032574f3d1 Make succ0 private 2024-01-03 14:55:42 +00:00
Owen Mansel-Chan
6ecf6ea3ac Rename succSimple to succ0 2024-01-03 14:51:57 +00:00
Jeroen Ketema
466536a914 Merge pull request #15214 from jketema/improve-test
C++: Improve special members test by printing more function details
2024-01-03 15:18:23 +01:00
Chris Smowton
723d3ee34c Merge pull request #15190 from fossilet/fix-class
Add missing `override`.
2024-01-03 13:47:24 +00:00
Ian Lynagh
7b48e2e4ae Merge pull request #15049 from igfoo/igfoo/UnderscoreIdentifier
Kotlin 2: Accept changes in query-tests/UnderscoreIdentifier
2024-01-03 13:43:24 +00:00
Owen Mansel-Chan
0279e4903f Mention query in change note 2024-01-03 13:02:49 +00:00
Harry Maclean
c96be39474 Merge pull request #15048 from hmac/hmac-model-editor-ruby-modules
Ruby: Model editor improvements
2024-01-03 12:53:43 +00:00
Jeroen Ketema
ae135ac633 C++: Improve special members test by printing more function details
Without this it is very hard to see what specifically is defaulted/deleted.
2024-01-03 13:35:25 +01:00
Michael Nebel
b083c35b40 Merge pull request #15174 from michaelnebel/csharp/dotnet8runtimemodels
C#: .NET 8 Runtime models.
2024-01-03 11:30:59 +01:00
Michael Nebel
0c78cccf62 C#: Add change note. 2024-01-03 11:12:35 +01:00
Michael Nebel
9763c00f99 C#: Update expected test output. 2024-01-03 11:09:35 +01:00
Michael Nebel
31e12f7a06 C#: Recognize all overloads of String.Replace as a replace method. 2024-01-03 11:08:05 +01:00
Jeroen Ketema
a205a03f3c Merge pull request #15210 from jketema/function-types
C++: Support more function types
2024-01-03 11:02:58 +01:00
Michael Nebel
0c4e1fca1b C#: Add testcase with false positive for CWE-117 (overload of String.Relace not correctly recognized as a sanitizer). 2024-01-03 10:56:56 +01:00
Owen Mansel-Chan
13b00bae17 Update test expectation 2024-01-02 22:38:30 +00:00
Eric Bickle
4fa5b2ae41 Add change nodes for GSON coverage 2024-01-02 14:17:23 -08:00
Eric Bickle
0cd89bf815 Merge branch 'main' into fix/update-gson-model 2024-01-02 14:05:33 -08:00
Owen Mansel-Chan
9f8b5bccc2 Go: report any extracted file as successfully extracted 2024-01-02 21:39:28 +00:00
Jeroen Ketema
262985a760 C++: Add change note 2024-01-02 16:32:24 +01:00
Harry Maclean
22830c7311 Ruby: Address review comments 2024-01-02 14:39:53 +00:00
Jeroen Ketema
9c1de5b2b6 C++: Support more function types 2024-01-02 15:13:20 +01:00
Harry Maclean
4c6855ed93 Ruby: Address review comments 2024-01-02 13:51:12 +00:00
Jeroen Ketema
671343619f Merge pull request #15197 from jketema/attr-expr-arg
C++: Support attribute arguments that are expressions
2024-01-02 13:34:44 +01:00
Jeroen Ketema
f59a00c5ea Update cpp/ql/lib/semmle/code/cpp/Specifier.qll
Co-authored-by: Calum Grant <42069085+calumgrant@users.noreply.github.com>
2024-01-02 12:52:18 +01:00
Alvaro Muñoz
2964aef083 Update Kernel.qll to include send aliases
Add `public_send` and `__send__` as Code Injection sinks as proposed by @vcsjones
2023-12-28 19:08:03 +01:00
Owen Mansel-Chan
19c5d1fd1d Merge pull request #15181 from felickz/go-xxe-libxml2
GO - Add sink for libxml2 in go/xml/xpath-injection via XPath.qll
2023-12-24 22:04:46 +00:00
Jeroen Ketema
ad2fb7c6d5 C++: Support attribute arguments that are expressions 2023-12-23 10:04:50 +01:00
Aditya Sharad
bbe3269b8c Merge pull request #15189 from github/adityasharad/merge/3.12-main
Merge `rc/3.12` into `main`
2023-12-22 11:26:37 -08:00
Robert Marsh
a9c917010f Swift: fix missing keypath CFGs 2023-12-22 17:55:00 +00:00
Chad Bentz
730f6ed5b0 Merge branch 'main' into go-xxe-libxml2 2023-12-22 11:57:43 -05:00
Chad Bentz
86c258df7e mention sinks in changelog 2023-12-22 16:56:54 +00:00
Chad Bentz
cf25cc9531 Add docs 2023-12-22 16:53:21 +00:00
Edward Minnix III
d6d76fa4f1 Merge pull request #15183 from egregius313/egregius313/java/fix-weak-hashing-adddition
Java: Fix minor error in `java/potentially-weak-cryptographic-algorithm`
2023-12-22 11:38:55 -05:00
Edward Minnix III
be50696746 Merge pull request #100 from atorralba/atorralba/java/weak-hashing-suggestion
Java: Generalize MaybeBrokenCryptoAlgorithmQuery.qll
2023-12-22 09:03:59 -05:00
Jeroen Ketema
9c039c4a08 Merge pull request #12125 from jketema/unique-function
C++: Ensure that only one `Function` exists for every function
2023-12-22 13:56:35 +01:00
Jeroen Ketema
1cb02475a8 Update cpp/ql/lib/change-notes/2023-12-22-unique-function.md 2023-12-22 13:33:20 +01:00
Jeroen Ketema
d4f9e89b5b C++: Add change note 2023-12-22 13:20:38 +01:00
Mathias Vorreiter Pedersen
ecd2003c14 Merge pull request #15191 from MathiasVP/show-indirections-in-ssainternals-2
C++: Show base variable in SSA variable `toString`s
2023-12-22 12:58:12 +01:00
Arthur Baars
c5b6f48569 Merge pull request #15127 from smowton/smowton/feature/buildless-tests
Add buildless tests
2023-12-22 11:39:16 +01:00
Mathias Vorreiter Pedersen
ffdd28eaa9 C++: Show base variable in SSA variable 'toString's. 2023-12-22 10:29:31 +01:00
Tony Torralba
67f8bcce44 Merge pull request #14752 from masterofnow/LoadClassNoSignatureCheck
Java: Insecure Loading of Class in Android App without Package Signature Checking
2023-12-22 10:24:34 +01:00
Tony Torralba
8ad787f3b8 Java: Generelize MaybeBrokenCryptoAlgorithmQuery.qll 2023-12-22 10:15:40 +01:00
fossilet
611f1cede7 Add missing override. 2023-12-22 15:52:02 +08:00
Ed Minnix
8051cfcef5 Fix tests and fix getStringValue method 2023-12-21 22:48:08 -05:00
Ed Minnix
6455e1893d Add more test cases 2023-12-21 22:48:08 -05:00
Ed Minnix
7f9dff2dc7 Fix minor error in Weak Hashing 2023-12-21 22:48:07 -05:00
Aditya Sharad
b1803d0ac2 Merge rc/3.12 into main 2023-12-21 16:40:51 -08:00
masterofnow
0fd09759df Added sample java file for qhelp to render correctly. 2023-12-22 08:31:23 +08:00
masterofnow
cb5733d647 Apply suggestions from code review
Update to documentation.

Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-22 08:25:05 +08:00
AlexDenisov
e43fafc249 Merge pull request #15116 from github/alexdenisov/improve-swift-autobuilder-further
Swift: separate installation of dependencies and autobuilding
2023-12-21 17:35:34 +01:00
Jeroen Ketema
f7da6f56f3 C++: Ensure that only one Function exists for every function 2023-12-21 16:33:22 +01:00
Stephan Brandauer
a9d21cef01 Update MaD Declarations after Triage 2023-12-21 15:39:03 +01:00
Mathias Vorreiter Pedersen
7a10d88f36 Merge pull request #15185 from MathiasVP/show-indirections-in-ssainternals 2023-12-21 13:52:14 +01:00
masterofnow
7162540faf Added options, .qhelp and .expected file for unit test. 2023-12-21 19:57:37 +08:00
Mathias Vorreiter Pedersen
1007c4fc83 C++: Show indirections when printing SSA variables. 2023-12-21 10:38:58 +01:00
Tony Torralba
55f15d2deb Merge pull request #15182 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-21 09:39:36 +01:00
masterofnow
8dc522fb5f Merge remote-tracking branch 'origin/LoadClassNoSignatureCheck' into LoadClassNoSignatureCheck 2023-12-21 12:15:06 +08:00
masterofnow
25c818f425 Added unit test files. 2023-12-21 12:13:00 +08:00
Chad Bentz
7c93a2c825 Add const XMLParseNoEnt to stub 2023-12-21 00:49:14 +00:00
Chad Bentz
667861f575 depstubber with latest change
- still failing with ./tst.go:195:25: undefined: parser.XMLParseNoEnt
2023-12-21 00:42:37 +00:00
Chad Bentz
6f3867d804 stub the type Parser + the function New
(it will automatically make stubs for all the methods on that type)

Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-20 19:25:48 -05:00
Chad Bentz
4c46be1ed0 Use 3 arg overload on Method for hasQualifiedName for Package/Name/Type 2023-12-21 00:23:01 +00:00
github-actions[bot]
d77e8df800 Add changed framework coverage reports 2023-12-21 00:16:28 +00:00
Andrew Eisenberg
0cc4ba6552 Merge pull request #15164 from github/aeisenberg/system-reqs 2023-12-20 12:13:51 -08:00
Andrew Eisenberg
c6d1b6cb58 Update docs/codeql/codeql-overview/system-requirements.rst 2023-12-20 11:51:23 -08:00
yoff
b83c743810 Merge pull request #14944 from yoff/python/captured-variables-basic
Python: Basic implementation of variable capture
2023-12-20 16:53:48 +01:00
Max Schaefer
706dee927d Merge pull request #15160 from github/max-schaefer/csharp-xss
C#: Mention more XSS sanitisation options in query help.
2023-12-20 15:39:25 +00:00
Rasmus Lerchedahl Petersen
da4aef80e9 Revert "Python: make it a real consistency check"
This reverts commit 45411f4a93.
2023-12-20 16:15:17 +01:00
Max Schaefer
fea69263f3 Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-12-20 15:06:03 +00:00
Rasmus Lerchedahl Petersen
0f89f69555 Python: fix VariableWrite and remove unneded step 2023-12-20 15:45:18 +01:00
Tony Torralba
1b9f59efa7 Merge pull request #14646 from github/java/update-mad-decls-after-triage-2023-10-31T15-52-01
Java: Update MaD Declarations after Triage
2023-12-20 15:37:19 +01:00
Tony Torralba
39708524e7 Minor fixes
- Query ID
- MethodAccess -> MethodCall
- Redundant import
- Formatting
2023-12-20 15:31:09 +01:00
Rasmus Lerchedahl Petersen
d039ceb689 Python: add test for fields 2023-12-20 15:23:45 +01:00
Rasmus Lerchedahl Petersen
706e9dc896 Python: fix compilation 2023-12-20 15:23:33 +01:00
Tony Torralba
e744d974e8 Merge pull request #14580 from github/java/update-mad-decls-after-triage-2023-10-24T15-42-01
Java: Update MaD Declarations after Triage
2023-12-20 15:01:24 +01:00
Tony Torralba
2df8bcb9dc Update java/ql/lib/change-notes/2023-10-31-new-models.md
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-12-20 14:59:07 +01:00
Rasmus Lerchedahl Petersen
45411f4a93 Python: make it a real consistency check 2023-12-20 14:53:37 +01:00
Rasmus Lerchedahl Petersen
215b146f06 Python: remove unused member predicate 2023-12-20 14:45:00 +01:00
Rasmus Lerchedahl Petersen
491ca3f1e6 Python: hide synthetic variable node 2023-12-20 14:42:45 +01:00
Rasmus Lerchedahl Petersen
afb3d1da6f Python: move capture node to DataFlowPrivate 2023-12-20 14:41:17 +01:00
Rasmus Lerchedahl Petersen
3cea46fe7b Python: fix typos 2023-12-20 14:35:10 +01:00
erik-krogh
fe3e768414 update expected output of tests 2023-12-20 14:10:36 +01:00
Rasmus Lerchedahl Petersen
f8417b0dd8 Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-basic 2023-12-20 13:16:42 +01:00
yoff
19813c8ba6 Merge pull request #15166 from yoff/python/add-scope-entry-definition-nodes
Python: Add scope entry definition nodes
2023-12-20 13:14:11 +01:00
Rasmus Lerchedahl Petersen
7749b8e60e Python: add change-note 2023-12-20 12:53:37 +01:00
Mathias Vorreiter Pedersen
be3f9d3078 Merge pull request #15173 from jketema/unneeded 2023-12-20 12:43:42 +01:00
Max Schaefer
66fe32ab82 Python: Mention more sanitisation options in py/url-redirection qhelp. 2023-12-20 11:31:07 +00:00
Rasmus Lerchedahl Petersen
07c88dc0be Python: remove unnecessary post-processing
also, it is slightly incorrect...
2023-12-20 12:09:15 +01:00
Rasmus Lerchedahl Petersen
169d7a3c98 Python: Add scope entry definition nodes
otherwise we confuse captured variables
in the single scope entry cfg node. Now
we have one for each defined variable.
2023-12-20 12:09:00 +01:00
Rasmus Lerchedahl Petersen
3b7e29bed6 Python: add test for crosstalk 2023-12-20 12:08:05 +01:00
Tamás Vajk
d3c685a41a Merge pull request #15156 from tamasvajk/standalone/temp-folder-structure
C#: Fix working directory structures in standalone
2023-12-20 11:57:42 +01:00
masterofnow
e85c4b5bf6 Update query from code review feedback to express it as a dataflow problem. 2023-12-20 18:28:16 +08:00
Tamas Vajk
b1413a1d98 Add readonly to tempFolderPath field 2023-12-20 11:16:52 +01:00
Mathias Vorreiter Pedersen
44124158c4 Merge pull request #15078 from alexet/unique-pointer-temporary
CPP: Add query for detecting invalid uses of temporary unique pointers.
2023-12-20 11:16:01 +01:00
Michael Nebel
089cad0ea8 C#: Update expected test output for FlowSummaries tests. 2023-12-20 11:10:30 +01:00
Tamas Vajk
90fc54ca05 Apply review feedback: use Lazy<> instead of locking 2023-12-20 11:04:39 +01:00
Michael Nebel
9236a10d98 C#: Update .NET Runtime models (.NET 8). 2023-12-20 10:56:38 +01:00
Koen Vlaswinkel
32d1f057df Merge pull request #15159 from github/koesie10/csharp-model-editor-tests
C#: Classify test support files in model editor queries
2023-12-20 10:54:24 +01:00
Mathias Vorreiter Pedersen
57e0804cef Update cpp/ql/src/Security/CWE/CWE-416/UseOfUniquePointerAfterLifetimeEnds.ql
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-12-20 10:52:42 +01:00
Tamas Vajk
dc36cdbede Only delete dotnet-install.sh if not in scratch directory 2023-12-20 10:51:23 +01:00
Max Schaefer
7c4275ad44 Address review comments. 2023-12-20 09:36:07 +00:00
Michael Nebel
86881b4e1e C#: Add empty definitions for all extensible model related predicates. 2023-12-20 10:22:43 +01:00
Michael Nebel
5796297fc3 C#/Java: Update the model generator script usage examples and description. 2023-12-20 10:17:08 +01:00
Jeroen Ketema
12abf07d1d C++: Remove unneeded extractor option 2023-12-20 09:58:32 +01:00
Michael Nebel
6831775a8d Merge pull request #15154 from michaelnebel/csharp/morestubs
C#: Replace more hand written stubs with generated ones.
2023-12-20 09:54:19 +01:00
Koen Vlaswinkel
d09fadf22e C#: Introduce TestRelatedFile class 2023-12-20 09:53:51 +01:00
Owen Mansel-Chan
9697d76c2d Stratify CFG::succ to avoid recursion
The first level doesn't deal with defer statements properly.
The second level usees the first level to deal with them properly.
2023-12-19 21:33:13 +00:00
Óscar San José
b55c299533 Merge pull request #15112 from fossilet/upstream_main
Fix sphinx.add_lexer.
2023-12-19 21:28:24 +01:00
Tom Hvitved
5be4fe1887 Data flow: Avoid unnecessary non-linear recursion in fwdFlowIn 2023-12-19 21:03:03 +01:00
Aditya Sharad
fba5ad5342 Merge pull request #15153 from github/post-release-prep/codeql-cli-2.15.5
Post-release preparation for codeql-cli-2.15.5
2023-12-19 09:11:26 -08:00
Edward Minnix III
06544e989e Merge pull request #15126 from egregius313/egregius313/java/minor/add-replace-to-mapmutator
Java: Add the `Map#replace` and `Map#replaceAll` methods to `MapMutator` in `Maps.qll`
2023-12-19 12:10:34 -05:00
Andrew Eisenberg
35578deccb Update system requirements for ruby 2023-12-19 09:02:55 -08:00
Rasmus Wriedt Larsen
72687e0368 Merge branch 'main' into automated-subclass-models 2023-12-19 17:08:25 +01:00
Rasmus Wriedt Larsen
56d86f9980 Revert "NEVER MERGE: Ensure we don't use site-packages stuff"
This reverts commit 0ed363bd79f9d3f9e9a905c1192adfe88f1faffb.
2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
9863309631 Python: auto subclass capture
(locally done with split + 5 x modeling runs + join, but squashed into one commit)
2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
ca7b69ec1f NEVER MERGE: Ensure we don't use site-packages stuff 2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
de2a563a8e Python: Delete old auto subclass capture files
In the final git history this only deletes one file, but when working
locally I deleted ALL files.
2023-12-19 17:07:21 +01:00
Rasmus Wriedt Larsen
bf271d7f0f Python: refactor how subclasses are specified
A little more explicit, so less prone to be overlooked when adding a new spec
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
32251a041b Python: Fill getFullyQualifiedName for rest of subclassing specs 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
a78f13cb2e Python: Ignore known subclass models 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
24a3a23c9c Python: Regenerate rest_framework models 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
3e878f5a0b Python: Model django response subclass relationship 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
abe6f1639a Python: Add example of models subclassing problem
In reality, we only want to model this as a `rest_framework.response.Response`, since our .qll modeling is more precise for rest-framework responses than if we also modeled it as a basic django http response. (specifically, that default mime-type handling is way different).
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
5c89c38c92 Python: Add the rest_framework models for demonstration purposes
Although it might be hidden by github UI by default, it could be
interesting for a reviewer to notice the effect changes in the modeling
query has to the results in this file.
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
ee3319b7b0 Python: Make split/join executable (chmod +x) 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
cfd3f8938e Python: Highlight split/join subclass files usage 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
933938d926 Python: Make rest_framework tests runnable again 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
3e6423a13c Python: Add ability to split and join autogenerated yml files
Verified by joining all files, splitting again, and observing no diff in
git.

(these operations only take a few seconds on my local machine, so
shouldn't be too much of an issue)
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
f30a3b0aba Python: Script: Improve performance by using C++ impl
these changes took performance for loading and writing all files locally
29.60s to 3.17s

(that is, using `gather_from_existing`)
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
13c2378b58 Python: Update a few QLdocs 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
2f5d51c752 Python: treat auto subclass capture models as auto-generated
Co-authored-by: Taus <tausbn@github.com>
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
937af906fd Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
0fe29b6a86 Python: Recover subclass finder .expected after cherry picking commits from https://github.com/github/codeql/pull/15030 2023-12-19 17:07:01 +01:00
Rasmus Lerchedahl Petersen
75f9eeb4e9 Python: adjust test expectations
mostly removing of nodes from the graph.
One result lost:
```
check("submodule.submodule_attr", submodule.submodule_attr, "submodule_attr", globals()) #$ MISSING:prints=submodule_attr
```
2023-12-19 17:07:01 +01:00
Rasmus Lerchedahl Petersen
c563c7fbe4 Python: remove control flow nodes
for module entry definitions from the dataflow graph.
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
e050f2e998 Python: Adjust subclass finder to no ESSA nodes
But the new test results looks very strange indeed!
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
60b784a919 Python: Don't filter subclass tests away 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
a9a0216c43 Python: Add change-note 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
fa3e16adea Python: Refactor taint-sinks meta queries 2023-12-19 17:07:01 +01:00
Koen Vlaswinkel
0f71df9c41 C#: Extend TestFile instead of separate class 2023-12-19 16:37:49 +01:00
Ed Minnix
a93d6dd956 Change note 2023-12-19 10:28:23 -05:00
Ed Minnix
ce130c6ed5 Add replace to MapMutator 2023-12-19 10:23:06 -05:00
Jeroen Ketema
4009b42891 Merge pull request #15146 from jketema/almost-empty-pch
C++: Update test after extractor changes
2023-12-19 16:20:35 +01:00
Max Schaefer
dc8be7bbf0 Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-12-19 15:09:42 +00:00
Benjamin Rodes
f26330e6bd Removing redundant/bad string type check. 2023-12-19 09:41:29 -05:00
Benjamin Rodes
6fb01925d0 Updating test ql file and applying formatting. 2023-12-19 09:39:46 -05:00
Tamas Vajk
278d9b1dfb Fix integration tests 2023-12-19 15:33:46 +01:00
Benjamin Rodes
48866e5358 Updates to address PR comments. 2023-12-19 09:33:07 -05:00
Michael Nebel
681ac7e5f0 C#: Update tests (and expected output) to use the generated EntityFramework stubs. 2023-12-19 15:22:45 +01:00
Michael Nebel
80f3c6cc2b C#: Manual changes to the project dependecies to avoid conflicts when multiple projects are loaded from source. 2023-12-19 15:21:56 +01:00
Michael Nebel
272f3265ea C#: Delete the handwritten EntityFramework stubs. 2023-12-19 15:20:53 +01:00
Tamas Vajk
016d200355 Fix unit tests 2023-12-19 15:14:47 +01:00
Tony Torralba
c8a369d9ef Update java/ql/lib/ext/jakarta.persistence.model.yml 2023-12-19 14:58:07 +01:00
Ben Rodes
387eddadad Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-12-19 08:48:51 -05:00
Ben Rodes
29a0da6cd9 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-19 08:48:20 -05:00
Ben Rodes
49728571cf Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-12-19 08:47:58 -05:00
Ben Rodes
66f725dd05 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-19 08:47:48 -05:00
Mathias Vorreiter Pedersen
cfaa2d881a Merge pull request #15152 from MathiasVP/fix-unnecessary-evaluation-of-debug-strings
C++: Fix unnecessary evaluation of debug strings
2023-12-19 13:59:20 +01:00
Koen Vlaswinkel
d22acfb449 C#: Classify test support files in model editor queries 2023-12-19 13:49:53 +01:00
Tamas Vajk
ad394a0d84 C#: Download dotnet-install.sh to the scratch dir 2023-12-19 13:11:22 +01:00
Tamas Vajk
dd64b436c0 C#: Fix working directory structures in standalone 2023-12-19 12:54:00 +01:00
Max Schaefer
71dbd1a059 C#: Mention more XSS sanitisation options in query help. 2023-12-19 11:33:26 +00:00
Mathias Vorreiter Pedersen
95cd31fce3 C++: Silence warnings. 2023-12-19 12:29:16 +01:00
Mathias Vorreiter Pedersen
4844c43f06 C++: Cleanup now that we're back to an abstract class. 2023-12-19 12:11:38 +01:00
Mathias Vorreiter Pedersen
937e0ee8d2 C++: Go back to abstract classes. 2023-12-19 12:10:57 +01:00
Michael Nebel
37b510cac0 C#: Add stubs for entity framework. 2023-12-19 11:52:59 +01:00
Mathias Vorreiter Pedersen
b6974d674c Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DebugPrinting.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-19 11:47:46 +01:00
Michael Nebel
e12165707f C#: Delete the hand written stub System.Data.cs. 2023-12-19 11:37:33 +01:00
Michael Nebel
19a4cf3a7b C#: Update test cases that depends on System.Data.cs to use generated stubs. 2023-12-19 11:37:32 +01:00
Michael Nebel
7cb758a61b C#: Add stubs for System.Data.OleDb. 2023-12-19 11:37:32 +01:00
github-actions[bot]
8f72b0e4f7 Post-release preparation for codeql-cli-2.15.5 2023-12-19 10:32:57 +00:00
Mathias Vorreiter Pedersen
8230a90db6 C++: No need for another 'stars' predicate in 'PrintIRUtilities'. 2023-12-19 11:22:27 +01:00
Rasmus Wriedt Larsen
2305d55967 Merge pull request #15101 from yoff/python/update-InlineTaintTestPaths-to-new-api
Python: update to new API update is in a comment, so compilation never failed in CI.
2023-12-19 11:10:55 +01:00
Mathias Vorreiter Pedersen
9b25834771 C++: Use parameterized modules instead of abstract classes and predicates to handle debug printing. 2023-12-19 11:08:41 +01:00
Jorge
f8cfd698fa Merge branch 'main' into seclab/dotjs 2023-12-19 10:44:52 +01:00
Mathias Vorreiter Pedersen
501645920f C++: Move private stuff from 'DataFlowUtil' to public stuff 'DataFlowPrivate'. Also make 'PostUpdateNodeImpl' public in 'DataFlowUtil'. Sadly, this means that it's visible at the query level (as DataFlow::PostUpdateNodeImpl), but I've added a big INTERNAL QLDoc on it to make sure people don't use it. 2023-12-19 10:41:35 +01:00
yoff
1417c2cdd5 Update python/ql/lib/change-notes/2023-12-18-support-variable-capture.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-19 10:08:59 +01:00
yoff
a60c52b8b7 Merge branch 'main' into python/captured-variables-basic 2023-12-18 23:44:46 +01:00
Rasmus Lerchedahl Petersen
8b7b58279a Python: add change-note
I chose `category: majorAnalysis`, the description is
"An API has changed in a way that may affect the results produced
by a query that consumes the API."
The API in question here is `flowPath` which is used by all our
data flow queries.
2023-12-18 23:42:39 +01:00
Jeroen Ketema
180e752a23 C++: Update test after extractor changes
Also remove incorrect FP comment. clang does not support `#pragma hdrstop` in
its non-cl-emulation mode.
2023-12-18 23:30:13 +01:00
Aditya Sharad
d540fc0794 Merge pull request #15141 from github/release-prep/2.15.5
Release preparation for version 2.15.5
2023-12-18 14:30:01 -08:00
Rasmus Lerchedahl Petersen
78c484faab Python: remove support for capturing callbacks
This will be added in a follow-up PR instead.
2023-12-18 23:24:57 +01:00
Rasmus Lerchedahl Petersen
6e4011d2ae Python: rename sythetic nodes
Avoid the term "closure" as it is somewhat academic.
2023-12-18 23:16:51 +01:00
Rasmus Lerchedahl Petersen
c0b3d98c6d Python: Add a bit more detail to comment. 2023-12-18 22:44:26 +01:00
Rasmus Lerchedahl Petersen
456209b269 Python: Move predicate closer to its use 2023-12-18 22:29:09 +01:00
Rasmus Lerchedahl Petersen
86bb884f67 Python: better comment 2023-12-18 22:26:46 +01:00
github-actions[bot]
19af35b29a Release preparation for version 2.15.5 2023-12-18 21:22:44 +00:00
Rasmus Lerchedahl Petersen
7324177786 Python: address QL alerts 2023-12-18 22:20:28 +01:00
Rasmus Lerchedahl Petersen
25c83dc70d Python: adjust comment 2023-12-18 22:15:37 +01:00
Rasmus Lerchedahl Petersen
bf1ad23678 Python: add comments
- on debug predicates
- on JS implementation
2023-12-18 22:00:13 +01:00
Rasmus Lerchedahl Petersen
c88d686ce4 Python: move SynthCapturePostUpdateNode
next to `SynthCaptureNode`
2023-12-18 21:37:52 +01:00
yoff
f50817e92a Merge pull request #15104 from RasmusWL/fewer-meta-queries
Python: Remove `@tags meta` from internal debug queries
2023-12-18 21:27:33 +01:00
yoff
e0c027f13c Merge pull request #14848 from hvitved/python/shared-type-tracking
Python: Adopt shared type tracking library
2023-12-18 21:14:42 +01:00
Mathias Vorreiter Pedersen
41c49ae05b Merge pull request #15136 from MathiasVP/fix-joins-in-use-after-free 2023-12-18 17:18:06 +01:00
Edward Minnix III
56921a6e21 Merge pull request #14040 from egregius313/egregius313/weak-hashing-properties
Java: Add support for algorithm names specified in `.properties` files to `java/potentially-weak-cryptographic-algorithm`
2023-12-18 09:38:58 -05:00
Tamás Vajk
d5f47a3d75 Merge pull request #15124 from tamasvajk/feature/telemetry/extraction-information
C#: Add telemetry query to report extractor information
2023-12-18 15:30:35 +01:00
Tamás Vajk
c5cf0641bf Merge pull request #15131 from tamasvajk/standalone/file-name
C#: Exclude not existing or problematic files from standalone extraction
2023-12-18 15:30:01 +01:00
Arthur Baars
4de335e8a2 Merge pull request #15134 from github/alexdenisov/skip-codesign-tracing
Swift: do not trace codesign binary
2023-12-18 15:26:37 +01:00
Rasmus Lerchedahl Petersen
d6544cc550 Python: remove consistency exclusion 2023-12-18 15:24:49 +01:00
Mathias Vorreiter Pedersen
d308bb40a0 Merge pull request #15132 from MathiasVP/fix-joins-in-isModifiableAtImpl
C++: Fix joins in `isModifiableAtImpl`
2023-12-18 15:01:36 +01:00
Paolo Tranquilli
3cb14c63ee Merge pull request #15135 from github/redsun82/fix-cmake-bazel-version
Bazel/CMake: use bazelisk to use correct bazel version
2023-12-18 15:01:10 +01:00
Mathias Vorreiter Pedersen
aafde4d18d C++: Fix joins in 'cpp/use-after-free'. 2023-12-18 14:49:09 +01:00
Tamas Vajk
f9c6d5e808 Ensure files are only enumerated once 2023-12-18 14:39:02 +01:00
Alex Denisov
6cbf8abf59 Swift: do not trace codesign binary 2023-12-18 14:24:07 +01:00
Tamas Vajk
b14d26ab62 C#: Exclude not existing or problematic files from extraction 2023-12-18 14:10:56 +01:00
Tom Hvitved
a776132a10 Python: Deprecate more predicates 2023-12-18 13:05:17 +01:00
Jorge
b81fbd7669 Add change note 2023-12-18 12:55:30 +01:00
Paolo Tranquilli
452b8d22a3 Bazel/CMake: use bazelisk to use correct bazel version
(cherry picked from commit 819fc52854)
2023-12-18 12:49:54 +01:00
Tamas Vajk
1a8857dab8 Create problematic additional file in integration test 2023-12-18 12:32:24 +01:00
maikypedia
a3ae8bd2c0 Add change note 2023-12-18 12:28:35 +01:00
maikypedia
8b2accca83 Add fixes and suggestions 2023-12-18 12:20:32 +01:00
Mathias Vorreiter Pedersen
50b754b6c1 Merge pull request #15129 from MathiasVP/fix-joins-in-wrong-type-format-argument
C++: Fix joins in `cpp/wrong-type-format-argument`
2023-12-18 12:17:17 +01:00
Mathias Vorreiter Pedersen
f5c52ac496 C++: Fix joins in 'isModifiableAtImpl'. 2023-12-18 12:02:33 +01:00
Michael Nebel
d8fdba009a Merge pull request #15119 from michaelnebel/csharp/stubgenimprovements
C#: Escape method names in stub generation.
2023-12-18 11:35:29 +01:00
Michael Nebel
b10137c24c C#: Pick the first version number encountered. 2023-12-18 11:02:49 +01:00
Tamas Vajk
de1134ac48 C#: Add linux-only integration test 2023-12-18 10:55:11 +01:00
Mathias Vorreiter Pedersen
8ed9fbb295 Merge pull request #15123 from MathiasVP/fix-fps-in-double-free
C++: Fix FPs in `cpp/double-free` and `cpp/use-after-free`
2023-12-18 10:44:18 +01:00
Mathias Vorreiter Pedersen
e88c6888bc Merge pull request #15121 from MathiasVP/fix-joins-in-av-rule-145
C++: Fix joins in `AV Rule 145`
2023-12-18 10:42:46 +01:00
Tamas Vajk
3f843d820c Add telemetry query for known/unknown expression kinds 2023-12-18 10:02:32 +01:00
Mathias Vorreiter Pedersen
3897befbe2 C++: Fix joins in 'cpp/wrong-type-format-argument'. 2023-12-18 09:49:34 +01:00
Tony Torralba
9446249e94 Merge pull request #15012 from atorralba/atorralba/java/fix-missing-pinning-fp
Java: Fix FPs in Missing certificate pinning
2023-12-18 09:37:18 +01:00
Tony Torralba
0524289a73 Update java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql 2023-12-18 08:50:10 +01:00
Tom Hvitved
020a049d30 Merge pull request #15103 from hvitved/ruby/simple-pattern-flow
Ruby: Model simple pattern matching as value steps instead of taint steps
2023-12-18 08:49:11 +01:00
Mathias Vorreiter Pedersen
2eda5927d9 Merge pull request #15125 from geoffw0/launchoptions
Swift: Add more test cases for application(...launchOptions...).
2023-12-18 08:42:50 +01:00
Owen Mansel-Chan
5a2c48f37f Add change note 2023-12-17 06:28:35 +00:00
Owen Mansel-Chan
e45e92eaa7 Fix MaxIntOrMaxUint.isBoundFor
It was wrong for strictnessOffset = 1 before.
2023-12-17 06:16:33 +00:00
Owen Mansel-Chan
36c4f5d1b2 Add failing test
The cause of the test failure is confusion about
whether the architecture is 32 bit or 64 bit.
2023-12-17 04:43:14 +00:00
masterofnow
4a77f45aa6 Minor adjustment to resolve error for codeql version 2.15.4 2023-12-16 12:41:39 +08:00
masterofnow
99b273d308 Apply suggestions from code review
Added suggestion from atorralba.

Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-16 12:00:45 +08:00
Rasmus Lerchedahl Petersen
64655a0ea8 Python: Use enw class name 2023-12-16 01:36:46 +01:00
Rasmus Lerchedahl Petersen
b505778bc8 Python: remove non-local steps 2023-12-16 01:03:27 +01:00
Rasmus Lerchedahl Petersen
661ba1ca7b Python: move restriction into branch predicate
Otherwise we get loads of nodes with missing locations
from the brnach nodes that are not matched.
2023-12-16 00:33:11 +01:00
Chad Bentz
b02bac5190 Test run 2023-12-15 22:55:10 +00:00
Rasmus Lerchedahl Petersen
5de1725648 Python: update class name 2023-12-15 23:50:29 +01:00
Rasmus Lerchedahl Petersen
4a1fcde649 Python: abandon synthetic node
for `CapturingClosureArgumentNode`.

Unless we define it for every single `CallNode`, we need a more
sophisticated mutual recursion with the call graph construction.
There is built-in support for that, but we are currently not using it.
2023-12-15 23:42:29 +01:00
Chris Smowton
84c86f256a Add buildless tests 2023-12-15 22:37:55 +00:00
Rasmus Lerchedahl Petersen
e36b079e0f Python: fix compilation error
introduced by bad merge
2023-12-15 21:27:22 +01:00
Rasmus Lerchedahl Petersen
416ba6a709 Python: use updated API 2023-12-15 21:26:05 +01:00
Eric Bickle
95ce7c9ba4 Merge branch 'main' into fix/update-gson-model 2023-12-15 10:15:53 -08:00
Geoffrey White
1908575386 Swift: Add more test cases for launchOptions as a source. 2023-12-15 18:11:28 +00:00
Mathias Vorreiter Pedersen
ef916f0ba0 C++: Mitigate ODR violations. 2023-12-15 17:16:04 +00:00
Ed Minnix
09a0730491 QLdoc fix 2023-12-15 11:13:09 -05:00
Ed Minnix
02581a3850 Move class for getProperty method call to Properties.qll 2023-12-15 11:09:08 -05:00
Ed Minnix
73cb01fc89 Remove integration test (ported to query test)
The `.properties` file extractor has been enabled by default, so the
test about sources from `getProperty` calls can be ported to a query test.
2023-12-15 11:09:08 -05:00
Ed Minnix
fc53727b9d Bump change note date 2023-12-15 11:09:08 -05:00
Ed Minnix
8826eaf1a3 Move test case to query tests 2023-12-15 11:09:08 -05:00
Ed Minnix
afefccf8f7 Update change note 2023-12-15 11:09:08 -05:00
Ed Minnix
0d12981d6a Bump change note 2023-12-15 11:09:08 -05:00
Ed Minnix
078a33eecc Updated change note 2023-12-15 11:09:07 -05:00
Ed Minnix
1c3993e632 QLDocs 2023-12-15 11:09:07 -05:00
Ed Minnix
8e55ced288 Update test to use MaybeBrokenCryptoAlgorithm 2023-12-15 11:09:07 -05:00
Ed Minnix
83c6ece405 Move weak hashing into MaybeBrokenCryptoAlgorithm 2023-12-15 11:09:07 -05:00
Ed Minnix
fbc2a33597 Replace MethodAccess with MethodCall 2023-12-15 11:09:07 -05:00
Ed Minnix
c20ea1f629 Bump change note date 2023-12-15 11:09:07 -05:00
Ed Minnix
cb0ea350b5 Improve docs 2023-12-15 11:09:07 -05:00
Ed Minnix
0efca8200d Weak Hashing query wording 2023-12-15 11:09:07 -05:00
Ed Minnix
86b57a11ac Bump change note date 2023-12-15 11:09:07 -05:00
Ed Minnix
25fa8d5ae7 Move some logic to class 2023-12-15 11:09:07 -05:00
Ed Minnix
4ff6c1e2ea Test case
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-15 11:09:07 -05:00
Ed Minnix
93cf5b8eb9 Weak Hashing Property initial query 2023-12-15 11:09:07 -05:00
Tamas Vajk
e62d542e8f C#: Add telemetry query to report extractor information 2023-12-15 16:25:38 +01:00
Geoffrey White
f6a4970012 Swift: Autoformat. 2023-12-15 14:58:11 +00:00
Mathias Vorreiter Pedersen
82b9f1b31c C++: Accept test changes. 2023-12-15 14:57:31 +00:00
Mathias Vorreiter Pedersen
0543ed115e C++: Add barrier for array lookups in 'cpp/double-free' and 'cpp/use-after-free'. 2023-12-15 14:57:17 +00:00
Michael Nebel
38ae848b94 C#: Update generated stubs. 2023-12-15 15:50:08 +01:00
Geoffrey White
0b04e4abe5 Swift: Address QL-for-QL alerts. 2023-12-15 14:48:30 +00:00
Michael Nebel
e69f0e3461 C#: Don't generate stubs for the record Clone method. 2023-12-15 15:41:59 +01:00
Mathias Vorreiter Pedersen
dc9c538fcc Merge pull request #15120 from MathiasVP/fix-joins-in-av-rule-79
C++: Fix joins in `cpp/resource-not-released-in-destructor`
2023-12-15 14:06:53 +00:00
Rasmus Lerchedahl Petersen
1ee11ae7af Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-basic 2023-12-15 14:31:57 +01:00
Geoffrey White
034daa9b35 Swift: Address false positives. 2023-12-15 13:29:49 +00:00
Mathias Vorreiter Pedersen
1cbe01923d C++: Fix joins in 'AV Rule 145'. 2023-12-15 13:08:13 +00:00
Rasmus Lerchedahl Petersen
8601105988 Python: Address TODO comment 2023-12-15 14:03:38 +01:00
Rasmus Lerchedahl Petersen
e1bf2821d9 Python: split variable capture instantiation out
into its own file.
2023-12-15 13:59:52 +01:00
Rasmus Lerchedahl Petersen
f668453d01 Python: move things around 2023-12-15 13:48:50 +01:00
Rasmus Lerchedahl Petersen
739b839628 Python: use updated names 2023-12-15 13:48:28 +01:00
Jeroen Ketema
3977689808 Merge pull request #15117 from jketema/buffer
C++: Only consider the maximum buffer size for badly bounded write
2023-12-15 13:46:09 +01:00
yoff
b07316f4ae Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 13:41:04 +01:00
Rasmus Lerchedahl Petersen
a311582285 Python: Bring back (now simplified) exclusion 2023-12-15 13:28:16 +01:00
Alex Eyers-Taylor
8e92fcc08f CPP: Format Temporaries 2023-12-15 12:00:44 +00:00
yoff
4b89a412c6 Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 12:59:01 +01:00
Rasmus Lerchedahl Petersen
d3b237bf7e Python: rename synthetic lambda nodes 2023-12-15 12:55:26 +01:00
Geoffrey White
326242a1fb Swift: Change note. 2023-12-15 11:39:09 +00:00
Mathias Vorreiter Pedersen
2c5f65a241 C++: Drive-by cleanup: This case is redundant since a 'DestructorCall' is also a 'FunctionCall'. 2023-12-15 11:38:52 +00:00
Mathias Vorreiter Pedersen
ce326a0f79 C++: Fix joins. 2023-12-15 11:37:28 +00:00
Geoffrey White
b7a533f879 Swift: Update .qhelp for Swift. 2023-12-15 11:32:14 +00:00
Alexander Eyers-Taylor
c68d3c5983 Update cpp/ql/src/Security/CWE/CWE-416/Temporaries.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-15 11:23:11 +00:00
Alex Denisov
dd13ea3d0a Swift: separate installation of dependencies and autobuilding
`pod install` could generate Xcode projects files needed for
autobuilding, so it's better to install dependencies first, and then do
re-scan to pick up the new files.
2023-12-15 12:20:36 +01:00
Geoffrey White
0ff84b467f Swift: Create examples for the .qhelp in Swift, and test them. 2023-12-15 11:14:05 +00:00
Michael Nebel
f6af593b0b C#: Add a unit test for escaping method names. 2023-12-15 12:04:46 +01:00
Alex Eyers-Taylor
49e1467581 CPP: Fix handling of ternary operators in tempory queries and add tests. 2023-12-15 11:03:23 +00:00
Anders Schack-Mulligen
1ea1130271 Merge pull request #15062 from aschackmull/dataflow/deprecate-flowstatestring
Dataflow: Deprecate FlowStateString.
2023-12-15 11:59:04 +01:00
Michael Nebel
671692177e C#: Escape method names. 2023-12-15 11:34:06 +01:00
Jeroen Ketema
0b1b1be356 C++: Add change note 2023-12-15 11:13:52 +01:00
Erik Krogh Kristensen
16e53d3972 Merge pull request #15115 from erik-krogh/no-types-integration-test
JS: add integration test for the new extractor option to disable type extraction
2023-12-15 11:13:14 +01:00
Rasmus Lerchedahl Petersen
5b6ea15028 Python: remove unneeded consistency exclusion 2023-12-15 11:09:37 +01:00
Michael Nebel
d59b5a9647 Merge pull request #15100 from michaelnebel/csharp/stubsrefresh
C#: .NET8 Stubs update.
2023-12-15 10:46:43 +01:00
Jeroen Ketema
2065ecff66 C++: Only consider the maximum buffer size for badly bounded write 2023-12-15 10:46:13 +01:00
Rasmus Lerchedahl Petersen
bfdcae4538 Python : P -> PY 2023-12-15 10:43:02 +01:00
erik-krogh
a694928dd3 use the extractor option directly instead 2023-12-15 10:39:36 +01:00
erik-krogh
9c520778c7 Merge remote-tracking branch 'upstream/main' into no-types-integration-test 2023-12-15 10:38:05 +01:00
Rasmus Lerchedahl Petersen
262d43abcf Python: Make compile and add comment 2023-12-15 10:28:51 +01:00
Rasmus Lerchedahl Petersen
2051ba3395 Python: hide synthesized capture nodes 2023-12-15 10:26:56 +01:00
Rasmus Lerchedahl Petersen
f96c52ed3b Python: make compile again
also improve comment
2023-12-15 10:25:49 +01:00
Jeroen Ketema
b29c886d9b Merge pull request #15107 from MathiasVP/better-tostring
C++: Produce a better `toString` for dataflow nodes with indirections
2023-12-15 10:19:53 +01:00
Michael Nebel
305e015948 C#: Update flowsummaries expected tests. 2023-12-15 10:02:02 +01:00
Michael Nebel
3ead21fb13 C#: Update options files. 2023-12-15 10:02:02 +01:00
Michael Nebel
588fe2792c C#: Update/Add some hand-written stubs for CWE-079 and CWE-611. 2023-12-15 10:02:02 +01:00
Michael Nebel
597a47b2d5 C#: Modify System.Web.cs manual stub to avoid overlap with generated stub. 2023-12-15 10:02:02 +01:00
Michael Nebel
0e6399e1cc C#: Make manual adjustments to the generated stubs. 2023-12-15 10:02:02 +01:00
Michael Nebel
8967a0996b C#: Update all generated stubs. 2023-12-15 10:02:02 +01:00
yoff
c395d2d957 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 09:58:27 +01:00
erik-krogh
ad4f464850 add warnOnImplicitThis 2023-12-15 09:55:30 +01:00
erik-krogh
9cc708b122 add integration test for the new extractor option to disable type extraction 2023-12-15 09:53:13 +01:00
Erik Krogh Kristensen
9543c23aba Merge pull request #15111 from erik-krogh/mergeback-ts-extractor
JS: TypeScript extractor fixes into rc/3.12
2023-12-15 09:21:20 +01:00
Michael Nebel
5bc2183fc3 Merge pull request #15108 from michaelnebel/csharp/stubgenscripts
C#: Stub generator scripts.
2023-12-15 09:16:36 +01:00
yoff
72430438f3 Merge pull request #15109 from RasmusWL/consistency-cleanup
Python: Delete old copy of DataFlowImplConsistency.qll
2023-12-15 08:58:32 +01:00
Anders Schack-Mulligen
337e5e458c Update java/ql/lib/semmle/code/java/security/InsufficientKeySize.qll
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-15 08:48:50 +01:00
Yunus AYDIN
8a7c3c19fe Merge branch 'main' into main 2023-12-15 09:05:50 +03:00
fossilet
795668ddaf Fix sphinx.add_lexer. 2023-12-15 09:58:46 +08:00
Rasmus Lerchedahl Petersen
abd544d96c Python: consistency failure gone 2023-12-15 00:38:58 +01:00
Rasmus Lerchedahl Petersen
b6123de518 Python: simplify assignments to captured variables 2023-12-15 00:34:52 +01:00
Yunus AYDIN
ec5a8b49c8 add httprouter example code and stub.go 2023-12-15 00:54:39 +03:00
Erik Krogh Kristensen
a700aa4cde Merge pull request #15110 from rvermeulen/rvermeulen/xml-attr-data-flow-node
JavaScript: Add support for XML attributes in the data flow graph
2023-12-14 21:45:57 +01:00
Geoffrey White
363ec0a917 Swift: Update swift/summary/query-sinks. 2023-12-14 20:22:36 +00:00
erik-krogh
c752f26f91 use direct string comparison instead, that doesn't crash on invalid values 2023-12-14 20:43:16 +01:00
erik-krogh
5bbf79bf26 fix the parsing of boolean environment variables in the TypeScript extractor 2023-12-14 20:43:16 +01:00
erik-krogh
1a0d29ba8a rename extractor environment variable to CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES 2023-12-14 20:43:16 +01:00
erik-krogh
62205f6a7f add environment variable to skip extraction of types in TypeScript 2023-12-14 20:43:16 +01:00
erik-krogh
b5fe0e5709 make sure reset() is called when manually invoking the TS extractor, so environment-variables are read 2023-12-14 20:43:16 +01:00
erik-krogh
96d1573978 move TypeVarDepth further up, so its declared before it's used 2023-12-14 20:43:15 +01:00
erik-krogh
10cf53b8d3 fix a this reference
`this` didn't refer to anything specific, and it was in fact `undefined` in the context it was invoked. There was already a  `let typeTable = this;` further up (where `this` refers to the class instance), so I used `typeTable`.
2023-12-14 20:43:15 +01:00
erik-krogh
43b228dbb4 exclude all the lib.d.ts files when running the TS extractor directly
e.g. the `lib.es5.d.ts` file was not excluded
2023-12-14 20:43:15 +01:00
Erik Krogh Kristensen
e838562591 Merge pull request #15105 from erik-krogh/fix-boolean-parse
JS: fix the parsing of boolean environment variables in the TypeScript extractor
2023-12-14 20:41:14 +01:00
Remco Vermeulen
133a243298 Add support for XML attributes in the data flow graph 2023-12-14 11:33:53 -08:00
Tom Hvitved
25a676ac6a Ruby: Model simple pattern matching as value steps instead of taint steps 2023-12-14 20:18:24 +01:00
Geoffrey White
9ec08c1c4b Swift: Add a couple of sinks missing from sensitive data hashing as well. 2023-12-14 18:04:35 +00:00
Geoffrey White
3a900f1f8b Swift: Fix some inconsistencies in the test cases. 2023-12-14 18:04:34 +00:00
Geoffrey White
7ba18e64a0 Swift: Add sinks for algorithms that are OK for sensitive data hashing but not for password hashing. 2023-12-14 18:04:34 +00:00
Geoffrey White
c2d49c0fff Swift: Address a weakness in the sensitive data regexs. 2023-12-14 18:04:34 +00:00
Geoffrey White
87eb96ed3b Swift: Add more cases to test. 2023-12-14 18:04:34 +00:00
Geoffrey White
22ed20dd7c Swift: Upgrade SecKeyCopyExternalRepresentation source to be considered a password / key rather than a miscellaneous credential. 2023-12-14 18:04:34 +00:00
Rasmus Wriedt Larsen
2a98a7e615 Python: Delete old copy of DataFlowImplConsistency.qll
We forgot to delete that file in https://github.com/github/codeql/pull/8457
2023-12-14 18:18:25 +01:00
Mathias Vorreiter Pedersen
7af6496a71 C++: Add change note. 2023-12-14 17:13:23 +00:00
Robert Marsh
3738e19db6 Swift: fix compilation failures outside CFG code 2023-12-14 16:39:51 +00:00
Geoffrey White
10b4c98e80 Swift: Move password sources to be reported by the new query. 2023-12-14 16:09:47 +00:00
Geoffrey White
5faa25fc6c Swift: Make passwords their own sensitive data type. 2023-12-14 16:09:47 +00:00
Geoffrey White
b5a45c64ff Swift: Define barriers, additional flow steps and sinks. 2023-12-14 16:09:47 +00:00
Geoffrey White
e5bf929cdb Swift: Split off WeakPasswordHashingExtensions.qll as we normally do. 2023-12-14 16:09:46 +00:00
Geoffrey White
db1508d108 Swift: Trivial changes - query ID / metadata, imports. 2023-12-14 16:09:46 +00:00
Geoffrey White
9774c3cb4f Swift: Copy WeakPasswordHashing query from csharp. 2023-12-14 16:09:45 +00:00
Geoffrey White
be7d0acfea Swift: Minor fixes for the existing weak sensitive data hashing query (naming consistency, remove unused import). 2023-12-14 16:09:45 +00:00
amammad
4d9aad92a1 remove a duplicate test 2023-12-14 17:08:18 +01:00
Mathias Vorreiter Pedersen
04ca36f9b0 Merge pull request #15106 from geoffw0/revrevtest
Swift: Revert:Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query"
2023-12-14 15:56:46 +00:00
Mathias Vorreiter Pedersen
61e30b9ff8 C++: Accept more test changes. 2023-12-14 15:25:29 +00:00
Michael Nebel
82784b4364 C#: Add a script for generating stubs for all packages needed for testing. 2023-12-14 16:11:17 +01:00
Geoffrey White
7e6ff7c826 Swift: Disable the part of the test that triggers an extraction issue. 2023-12-14 15:04:48 +00:00
Mathias Vorreiter Pedersen
368f438754 C++: Add more QLDoc. 2023-12-14 14:49:48 +00:00
Geoffrey White
3193ceb3f9 Merge pull request #15052 from geoffw0/pointermodels
Swift: Expand models for UnsafePointer and friends
2023-12-14 14:46:48 +00:00
Mathias Vorreiter Pedersen
0c100eb122 C++: Accept test changes. 2023-12-14 14:44:58 +00:00
Mathias Vorreiter Pedersen
8a52565395 C++: Improve 'toString' on the most common dataflow nodes. 2023-12-14 14:44:42 +00:00
amammad
d84333dad8 added *ReadBody* Methods as UntrustedFlowSource 2023-12-14 15:31:09 +01:00
Anders Schack-Mulligen
7623432c76 Java: Remove/deprecate FlowStateString-based extension points. 2023-12-14 15:15:58 +01:00
Owen Mansel-Chan
9cb0bb2fc9 Merge pull request #15034 from github/dependabot/github_actions/actions/setup-go-5
Bump actions/setup-go from 4 to 5
2023-12-14 14:14:03 +00:00
Anders Schack-Mulligen
8ef4821f63 Python: Remove references to FlowStateString. 2023-12-14 15:05:33 +01:00
Anders Schack-Mulligen
a1068ce2f9 Dataflow: deprecate references 2023-12-14 15:05:33 +01:00
Anders Schack-Mulligen
07ad770437 Dataflow: Deprecate FlowStateString. 2023-12-14 15:05:33 +01:00
Geoffrey White
987cdff862 Revert "Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query""
This reverts commit a478980e48.
2023-12-14 13:56:35 +00:00
erik-krogh
0db788bb10 use direct string comparison instead, that doesn't crash on invalid values 2023-12-14 14:50:17 +01:00
erik-krogh
5e91b2f5bc fix the parsing of boolean environment variables in the TypeScript extractor 2023-12-14 14:40:10 +01:00
Rasmus Wriedt Larsen
36b635fb70 Python: Remove @tags meta from internal debug queries
These queries were great when evaluating coverage of the new call-graph compared with the old.

However, they are not useful to run as part of our DCA experiments.
2023-12-14 14:39:32 +01:00
Geoffrey White
36d0148aa1 Swift: Comment out lines that don't extract correctly right now. 2023-12-14 13:27:05 +00:00
Erik Krogh Kristensen
063f69c10e Merge pull request #15072 from erik-krogh/ts-various
JS: Various TypeScript extraction fixes.
2023-12-14 14:17:42 +01:00
Koen Vlaswinkel
7c141b9239 Merge pull request #15089 from github/koesie10/csharp-model-editor-generics
C#: Fix names of generic types/methods in model editor queries
2023-12-14 14:17:14 +01:00
Michael Nebel
3d012cd35f C#: Move the generator class to a helper file. 2023-12-14 14:11:59 +01:00
Michael Nebel
8343ce0754 C#: Re-factor the make_stubs_nuget script to more easily allow multiple nuget references. 2023-12-14 14:11:59 +01:00
Yunus AYDIN
ac3cb7f6c4 update camelcase 2023-12-14 15:29:28 +03:00
Yunus AYDIN
a17c704f46 update expected file 2023-12-14 15:27:27 +03:00
Tom Hvitved
6fc9e6193a Add change note 2023-12-14 13:25:21 +01:00
Tom Hvitved
84aa9f17a0 Python/Ruby: Use SummaryTypeTracker from typetracking pack 2023-12-14 13:25:18 +01:00
Tom Hvitved
1e24de7e83 Copy SummaryTypeTracker.qll to typetracking pack 2023-12-14 13:22:48 +01:00
Tom Hvitved
3b1146bf98 Python: Adopt shared type tracking library 2023-12-14 13:22:44 +01:00
erik-krogh
72e99b5b9d rename extractor environment variable to CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES 2023-12-14 12:52:49 +01:00
Tom Hvitved
4776e9ccd2 Type tracking: Allow for a non-standard flowsTo predicate 2023-12-14 12:36:09 +01:00
Tom Hvitved
c8b4a215bc Merge pull request #14573 from hvitved/flow-summary-impl-param
Move `FlowSummaryImpl.qll` to `dataflow` pack
2023-12-14 12:24:15 +01:00
Rasmus Lerchedahl Petersen
0b6d47b8bc Python: update to new API
update is in a comment, so compilation
never failed in CI.
2023-12-14 11:56:05 +01:00
Rasmus Lerchedahl Petersen
2a5736e73d Python: add consistency exception
this must have been lost in my
clean-up rebase.
2023-12-14 11:50:09 +01:00
Tom Hvitved
8f0e0b6559 Merge pull request #15090 from hvitved/inline-flow-test-get-arg-string
InlineFlowTest: Allow for custom `getArgString`
2023-12-14 10:53:55 +01:00
Tamás Vajk
3487f9d143 Merge pull request #15070 from tamasvajk/standalone/exclusions
C#: Remove unneeded options and add support for `paths/paths-ignore` in standalone
2023-12-14 10:41:53 +01:00
Rasmus Lerchedahl Petersen
479d81fb75 Python: fix nonlocal captured variables
This depends on the extractor fix
2023-12-14 10:37:27 +01:00
Rasmus Lerchedahl Petersen
38e03216f6 Python: allow CaptureArgumentNodes as multiple arguemnts
These are the labmda self references. This is similar to
how `BlockParameterArgumentNode` is excluded for Ruby.

It is important that we restrict `call` in this logic.
Otherwise, we get a cartesian product and the consistency
check runs for a very long time...
2023-12-14 10:32:29 +01:00
Tom Hvitved
7da10e0013 Merge pull request #15095 from hvitved/dataflow/boolean-class
Data flow: Use `Boolean` class
2023-12-14 10:29:52 +01:00
Rasmus Lerchedahl Petersen
f32d5e422d Python: typo 2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
efcdb3e67e Python: filter local flow from a node to itself 2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
5471c92e9f Python: exclusion for summary nodes
as in Ruby
2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
061fd014a6 Python: further restrict LibraryLambdaMethod
On the small test project, this reduces the number
of instances from 285 to 22.
2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
453ab9ca7b Python: restrict LibraryLambdaMethod 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
17a0029585 Python: support callbacks to library calls
TODO:
The member predicate `LibraryLambdaMethod::getACall` is
currently too permissive.
Ideally, we would have `libraryCallHasLambdaArg`
as in Ruby. But even a more precise
`libraryCall` predicate might be fine.
2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
7565873e83 Python: test callbacks to library calls 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
797deebcdd Python: exclude CaptureNodes 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
b513871b9b Python: add consistency exclusions 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
c054ba6a97 python: instantiate module for variable capture
This provides variable capture in standard situations:
- nested functions
- lambdas
There are some deficiencies:
- we do not yet handle objects capturing variables.
- we do not handle variables captured via the `nonlocal` keyword.
  This should be solved at the AST level, though, and then it
  should "just work".

There are still inconsistencies in the case where
a `SynthesizedCaptureNode` has a comprehensions
as its enclosing callable. In this case,
`TFunction(cn.getEnclosingCallable())` is not
defined and so getEnclosingCallable does not exist
for the `CaptureNode`.
2023-12-14 10:25:39 +01:00
Rasmus Lerchedahl Petersen
6db55cd12f Python: add missing annotation 2023-12-14 10:20:49 +01:00
Tamas Vajk
ee70de8879 Fix code review findings 2023-12-14 10:15:22 +01:00
Tom Hvitved
8fc6fb1ec0 Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-12-14 10:10:53 +01:00
Koen Vlaswinkel
96feb2c787 C#: Rename getMethodName to getEndpointName 2023-12-14 10:04:46 +01:00
Tom Hvitved
098afb935b Address more review comments 2023-12-14 09:48:45 +01:00
Tamas Vajk
728229e6e1 Fix code review findings 2023-12-14 09:44:20 +01:00
yoff
b78ceb61a3 Merge pull request #15099 from fossilet/fix-qll-typo
Fix typo in qll.
2023-12-14 09:43:26 +01:00
Chris Smowton
d884726490 Merge pull request #15098 from fossilet/fix-signature-doc
Fix typo.
2023-12-14 08:35:56 +00:00
fossilet
1cc2f073c4 Fix typo in qll. 2023-12-14 16:05:14 +08:00
Tom Hvitved
5a426d1800 Data flow: Use Boolean class 2023-12-14 09:04:16 +01:00
Michael Nebel
1653433f39 Merge pull request #15096 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-14 08:51:34 +01:00
fossilet
9157dde4e2 Fix typo. 2023-12-14 15:35:13 +08:00
github-actions[bot]
c1325d798f Add changed framework coverage reports 2023-12-14 00:16:18 +00:00
Edward Minnix III
14a76278b8 Merge pull request #14802 from egregius313/egregius313/java/update-ql-integration-test
Java: Add `.properties` file references in integration tests
2023-12-13 18:40:03 -05:00
Ed Minnix
717e69ac0e Add properties file references 2023-12-13 16:54:55 -05:00
Yunus AYDIN
d899267acb add httprouter example code 2023-12-14 00:23:09 +03:00
Yunus AYDIN
5f6de79c09 Fix select query, Add httprouter library and update test files 2023-12-14 00:19:11 +03:00
Robert Marsh
0e5255ea88 Swift: switch to shared, parameterized CFG library 2023-12-13 20:13:11 +00:00
Paolo Tranquilli
307da3417d Merge pull request #15091 from github/redsun82/fix-cmake-bazel-version
Bazel/CMake: use bazelisk to use correct bazel version
2023-12-13 19:06:37 +01:00
Yunus AYDIN
a09505afc2 Update rules 2023-12-13 20:01:53 +03:00
Jeroen Ketema
4d922ddb0c Merge pull request #15092 from jketema/mb12
Merge back `rc/3.12` into main
2023-12-13 17:45:58 +01:00
Geoffrey White
e8f8aa266f Merge remote-tracking branch 'upstream/main' into pointermodels 2023-12-13 16:43:15 +00:00
Paolo Tranquilli
9e300a9906 Merge branch 'main' into redsun82/fix-cmake-bazel-version 2023-12-13 17:36:07 +01:00
Yunus AYDIN
5148054612 Update go/ql/src/experimental/CWE-525/WebCacheDeceptionLib.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-13 19:36:07 +03:00
Yunus AYDIN
221e281f73 Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-13 19:35:59 +03:00
Yunus AYDIN
0ea27c6e9b Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-13 19:35:53 +03:00
Yunus AYDIN
da275b374f Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-13 19:35:36 +03:00
Jeroen Ketema
25a1b0532e Merge pull request #15094 from github/revert-13870-commoncrypto1
Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query"
2023-12-13 17:21:44 +01:00
Mathias Vorreiter Pedersen
a478980e48 Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query" 2023-12-13 15:40:09 +00:00
Mathias Vorreiter Pedersen
5ddfb1f7c3 Merge pull request #15088 from MathiasVP/debug-mode-for-dataflow-printing
C++: Easier debugging of dataflow node `toString` output
2023-12-13 15:15:41 +00:00
Jeroen Ketema
99e65df6ce Merge remote-tracking branch 'upstream/rc/3.12' into mb12 2023-12-13 15:43:39 +01:00
Paolo Tranquilli
819fc52854 Bazel/CMake: use bazelisk to use correct bazel version 2023-12-13 15:32:06 +01:00
Mathias Vorreiter Pedersen
401ab3b035 C++: Fix 'isDebugMode'. It was computing 'isNotDebugMode' (oops). 2023-12-13 14:31:45 +00:00
Mathias Vorreiter Pedersen
fcc3113bfc C++: Privately import 'Node0ToString'. 2023-12-13 14:31:02 +00:00
Michael Nebel
b765ba387f Merge pull request #13110 from GeekMasher/csharp-aws
[CSharp] AWS Lambda Modelling
2023-12-13 15:14:58 +01:00
Geoffrey White
023d72b6fb Merge remote-tracking branch 'upstream/main' into pointermodels 2023-12-13 14:07:17 +00:00
Tamas Vajk
c870b0d4e9 Add more logging to the file filtering 2023-12-13 14:14:07 +01:00
Tamas Vajk
694be29311 Remove uneeded option from the help 2023-12-13 14:13:41 +01:00
Tom Hvitved
28a2d05cf8 InlineFlowTest: Allow for custom getArgString 2023-12-13 13:58:44 +01:00
Koen Vlaswinkel
e177f8783a C#: Share qualified name module for model editor queries 2023-12-13 13:48:44 +01:00
Koen Vlaswinkel
ea504cddd1 C#: Use correct names for generic types/methods in model editor queries 2023-12-13 13:48:23 +01:00
Michael Nebel
ffc36e4ccd Merge pull request #15085 from michaelnebel/csharp/telemetrycalls
C#: Telemetry should only count calls in source.
2023-12-13 13:46:16 +01:00
Koen Vlaswinkel
79f5a6acab C#: Add test model for generic method 2023-12-13 13:46:06 +01:00
Michael Nebel
3b9737fa88 C#: Update Amazon stubs to use .NET 8 as target framework. 2023-12-13 13:11:31 +01:00
Michael Nebel
c6a6a9f631 C#: Update Aws test files. 2023-12-13 13:07:29 +01:00
Michael Nebel
fa4f91988f C#: Add autogenerated stubs for Aws.Lambda.Core and Aws.Lambda.APIGatewayEvents. 2023-12-13 13:07:29 +01:00
Mathew Payne
f336ff0063 Add change notes 2023-12-13 13:07:28 +01:00
Mathew Payne
2e0ac264e7 feat: Add AWS Lambda logging 2023-12-13 13:07:28 +01:00
Mathew Payne
6c138ae485 feat: Add models and expected 2023-12-13 13:07:28 +01:00
Mathew Payne
2f5cb1ab29 feat: Add initial tests for AWS Lambda support 2023-12-13 13:07:28 +01:00
Mathew Payne
78a3749601 feat: Add Amazon Lambda testing stubs 2023-12-13 13:07:28 +01:00
Mathias Vorreiter Pedersen
45080ec9f0 C++: Create an abstract class to control debug 'toString' output for dataflow nodes. 2023-12-13 12:05:04 +00:00
Tamas Vajk
f2435f89f1 Simplify test setup 2023-12-13 13:03:23 +01:00
Tamas Vajk
993dd767ac C#: Add paths/paths-ignore support in standalone 2023-12-13 12:15:56 +01:00
Tamas Vajk
21229b93bf C#: Remove unneeded options from standalone extractor 2023-12-13 12:15:56 +01:00
Michael Nebel
8218f80154 C#: Base all telemetry tests on stubs. 2023-12-13 11:57:44 +01:00
Michael Nebel
57d5d71d03 C#: Only count calls in source code. 2023-12-13 11:57:32 +01:00
Michael Nebel
16e86134f3 Merge pull request #15087 from michaelnebel/csharp/stubgenrefreadonly
C#: Stub generator support for `ref readonly` parameters.
2023-12-13 11:46:45 +01:00
Owen Mansel-Chan
56507c2709 Merge pull request #15084 from github/dependabot/go_modules/go/extractor/extractor-dependencies-88d2ef26ea
Bump the extractor-dependencies group in /go/extractor with 1 update
2023-12-13 10:21:32 +00:00
Michael Nebel
b023338ed7 Merge pull request #15086 from michaelnebel/csharp/testusemorestubs
C#: Base more tests purely on stubs.
2023-12-13 11:19:38 +01:00
Tony Torralba
66b54f03b7 Rename test 2023-12-13 11:15:27 +01:00
Tony Torralba
d955dce72a Improve source of randomness detection
Also sanitize flow out of sinks to avoid overlapping paths
2023-12-13 11:15:27 +01:00
Tony Torralba
fc45621ab1 Add pac4j JWT cryptographic key sinks 2023-12-13 11:15:27 +01:00
Tony Torralba
7bc907840c Fix tests 2023-12-13 11:15:27 +01:00
Tony Torralba
3a5d711711 Add cookie sinks 2023-12-13 11:15:27 +01:00
Tony Torralba
435d1f97a3 Add sink for OpenSAML's RequestType.setID 2023-12-13 11:15:27 +01:00
Michael Nebel
b7f4bfe719 C#: Add a unit test for stub generation of ref readonly parameters. 2023-12-13 11:09:57 +01:00
Michael Nebel
766baa9a50 C#: Add support for ref readonly parameters in the stub generator. 2023-12-13 11:09:57 +01:00
Tony Torralba
4cb53a76d6 Merge pull request #15082 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-13 10:35:49 +01:00
Michael Nebel
35a615cac3 C#: Base the remoteflowsource test on stubs and update line numbers in expected output. 2023-12-13 10:07:57 +01:00
Michael Nebel
94d81b501b C#: Base the CWE-614 tests purely on stubs. 2023-12-13 10:07:57 +01:00
Michael Nebel
4fc8762444 C#: Base the asp/basic tests on stubs only. 2023-12-13 10:07:57 +01:00
Michael Nebel
0b39f1155e C#: Base the remaning CWE-1004 tests purely on stubs. 2023-12-13 10:07:57 +01:00
Michael Nebel
cdf6b28e13 C#: Base the modelgenerator/dataflow tests on stubs. 2023-12-13 10:07:56 +01:00
masterofnow
e1b8fabf7f Use global instead of local taint tracking. 2023-12-13 13:50:34 +08:00
masterofnow
8538c12267 Merge branch 'github:main' into LoadClassNoSignatureCheck 2023-12-13 13:47:40 +08:00
dependabot[bot]
dae1a5c70e Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).

- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 04:02:50 +00:00
github-actions[bot]
9b20665d75 Add changed framework coverage reports 2023-12-13 00:16:25 +00:00
Yunus AYDIN
a47ffc6833 Remove unnecessary rules 2023-12-13 01:52:06 +03:00
Yunus AYDIN
bb2083d10a Remove database directory and add WebCacheDeceptionLib.qll 2023-12-13 01:50:56 +03:00
Alexander Eyers-Taylor
236a6a1bce CPP: Apply suggestions from code review
Fix spelling in query id

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-12 17:22:46 +00:00
Tony Torralba
bd8f35bef7 Java: Fix FPs in Missing certificate pinning
Local URIs should never require pinning
2023-12-12 18:02:12 +01:00
Alex Eyers-Taylor
136a77b86e CPP: Add change note for cpp/use-of-uniwue-pointer-after-lifetime-ends 2023-12-12 16:47:55 +00:00
Alex Eyers-Taylor
e9bc5a54ea CPP: Add query for detecting invalid uses of temporary unique pointers. 2023-12-12 16:22:20 +00:00
Tony Torralba
27be5ba14b Merge pull request #15073 from atorralba/atorralba/java/remove-invalid-ognl-sinks
Java: Remove invalid OGNL sinks
2023-12-12 16:52:31 +01:00
Owen Mansel-Chan
5675df842e Merge pull request #15054 from owen-mc/go/find-more-callees-for-captured-variables
Go: Also follow jump steps when looking for a callee source
2023-12-12 15:49:15 +00:00
Geoffrey White
609f92c7ac Merge pull request #13870 from geoffw0/commoncrypto1
Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query
2023-12-12 15:26:02 +00:00
Mathew Payne
7a48152ea9 Add Go Stubs for LibXML2 2023-12-12 15:10:08 +00:00
Chad Bentz
2d33f86d41 Initial Push
- Sample test  (test not compiling)
- Stubs not generating
2023-12-12 15:00:00 +00:00
Edward Minnix III
4d6521fd7a Merge pull request #13608 from egregius313/egregius313/weak-randomness
Java: Add Weak Randomness Query (CWE-330/338)
2023-12-12 09:40:11 -05:00
Tony Torralba
fad53a25c0 Update java/ql/lib/ext/struts2.model.yml
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-12-12 14:58:47 +01:00
Mathias Vorreiter Pedersen
3dea467dcc Merge pull request #15047 from MathiasVP/add-puns-for-addresses-of-arguments
C++: Add `PostUpdateNode`s for addresses of outgoing arguments
2023-12-12 13:55:13 +00:00
Mathias Vorreiter Pedersen
412ea67ba0 Merge pull request #15075 from MathiasVP/print-data-flow-relevant-IR
C++: Add a `PropertyProvider` for only showing dataflow-relevant IR
2023-12-12 13:51:11 +00:00
Tom Hvitved
3c2336e40b Merge pull request #15074 from hvitved/dataflow/get-node-type-cached
Data flow: Use cached `nodeDataFlowType` instead of `getNodeType`
2023-12-12 14:49:41 +01:00
Mathias Vorreiter Pedersen
97f2be9b82 C++: Fix QLDoc. 2023-12-12 13:45:18 +00:00
yoff
a39eb5efc9 Merge pull request #15051 from yoff/python/slightly-improve-tarslip
Python: slightly improve tarslip logic
2023-12-12 14:43:43 +01:00
Mathias Vorreiter Pedersen
1ad0e6524e Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintDataFlowRelevantIR.qll 2023-12-12 13:15:36 +00:00
Mathias Vorreiter Pedersen
11386494b7 C++: Factor out the property provider which hides instructions and operands out of the 'LocalFlowPropertyProvider' class and into a separate class. 2023-12-12 13:04:31 +00:00
Tom Hvitved
a46964dfe8 Address review comments 2023-12-12 13:55:52 +01:00
Tom Hvitved
b3929e2375 Data flow: Use cached nodeDataFlowType instead of getNodeType 2023-12-12 13:46:39 +01:00
Tony Torralba
103110f9c2 Java: Remove invalid OGNL sinks
Fixes #15053
2023-12-12 13:39:51 +01:00
Alexander Eyers-Taylor
e87b3911dc Merge pull request #14910 from alexet/incorrect-scanf
CPP: Add query for detecteing incorrect error checking for scanf
2023-12-12 11:57:17 +00:00
Geoffrey White
f2e3391a33 Swift: Accept test regression. 2023-12-12 11:37:05 +00:00
erik-krogh
896432b646 add environment variable to skip extraction of types in TypeScript 2023-12-12 12:25:00 +01:00
Mathias Vorreiter Pedersen
4d430d5df0 Merge pull request #15037 from aschackmull/range/prunebounds
Rangeanalysis: Prune range calculation.
2023-12-12 11:18:26 +00:00
Mathias Vorreiter Pedersen
cec785c8cc C++: Respond to review comments. 2023-12-12 11:16:41 +00:00
Mathias Vorreiter Pedersen
f284fde93c C++: Update QLDoc. 2023-12-12 11:09:36 +00:00
Mathias Vorreiter Pedersen
a6104ad878 C++: Fix test annotations. 2023-12-12 11:06:18 +00:00
Rasmus Wriedt Larsen
42a6309f25 Merge pull request #15071 from github/RasmusWL/generate-code-scanning-query-list
Add @RasmusWL as CODEOWNER of a misc file
2023-12-12 10:53:11 +01:00
erik-krogh
cf31ef4960 make sure reset() is called when manually invoking the TS extractor, so environment-variables are read 2023-12-12 10:51:09 +01:00
Jeroen Ketema
611a177c3c Merge pull request #15066 from jketema/ql-test
C++: Update test for CLI changes
2023-12-12 10:36:57 +01:00
erik-krogh
c246a9c12c move TypeVarDepth further up, so its declared before it's used 2023-12-12 10:34:42 +01:00
erik-krogh
13a01e1545 fix a this reference
`this` didn't refer to anything specific, and it was in fact `undefined` in the context it was invoked. There was already a  `let typeTable = this;` further up (where `this` refers to the class instance), so I used `typeTable`.
2023-12-12 10:32:31 +01:00
Rasmus Wriedt Larsen
aa6a455ece Update CODEOWNERS 2023-12-12 10:31:36 +01:00
erik-krogh
ca95a6e9cf exclude all the lib.d.ts files when running the TS extractor directly
e.g. the `lib.es5.d.ts` file was not excluded
2023-12-12 10:29:09 +01:00
Tom Hvitved
9b043a10cc Merge pull request #15063 from hvitved/csharp/use-scratch-dir
C#: Use `CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR` instead of `Path.GetTempPath`
2023-12-12 08:16:04 +01:00
Yunus AYDIN
bc81201c2e Update expected file 2023-12-12 00:07:51 +03:00
Owen Mansel-Chan
0fb58caa8c Update go/ql/lib/change-notes/2023-12-08-find-more-callees-for-captured-functions.md
Co-authored-by: Chris Smowton <smowton@github.com>
2023-12-11 20:42:48 +00:00
Edward Minnix III
06eef93f89 Docs review suggestions 2023-12-11 11:18:40 -05:00
Edward Minnix III
ce20c4ae03 Docs review suggestions
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-12-11 11:18:40 -05:00
Ed Minnix
7362158229 Fix test case 2023-12-11 11:18:40 -05:00
Ed Minnix
1271cd3348 Remove unnecessary crypto sinks 2023-12-11 11:18:40 -05:00
Ed Minnix
3ca039bc8f Rename to InsecureRandomness 2023-12-11 11:18:40 -05:00
Ed Minnix
6e70e6c85a Use pre-exisiting type for SecureRandom 2023-12-11 11:18:39 -05:00
Edward Minnix III
4678302edb Update query metadata
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-11 11:18:39 -05:00
Ed Minnix
bbf99375c7 Alter cookie sinks to instead focus on creation of a cookie 2023-12-11 11:18:39 -05:00
Ed Minnix
4bdf2b5e18 Bump change note date 2023-12-11 11:18:39 -05:00
Ed Minnix
b9d2a26e6e Move ESAPI models into the Weak Randomness query
These models don't need to apply to all queries. So instead they are
better suited to be within the weak randomness query itself.
2023-12-11 11:18:39 -05:00
Ed Minnix
7f3995f524 Remove extra encryption-iv models 2023-12-11 11:18:39 -05:00
Ed Minnix
7241e0920c Replace convertBytesToString with models 2023-12-11 11:18:39 -05:00
Ed Minnix
e9ca4a25d4 Update to new MethodCall name 2023-12-11 11:18:39 -05:00
Ed Minnix
a1e9564cc5 Add more sources 2023-12-11 11:18:39 -05:00
Ed Minnix
b8b2de2f3c Remove use of crypto-parameter sink kind 2023-12-11 11:18:39 -05:00
Ed Minnix
646254c9b2 Add credentials sinks from SensitiveApi 2023-12-11 11:18:39 -05:00
Ed Minnix
057a74d914 Remove unnused class 2023-12-11 11:18:39 -05:00
Ed Minnix
fb875f5095 More variety of test cases 2023-12-11 11:18:39 -05:00
Ed Minnix
ba3c38c226 Restrict addCookie to specific interface 2023-12-11 11:18:38 -05:00
Ed Minnix
dc3e4cd928 Refactored method accesses to the RandomDataSource library 2023-12-11 11:18:38 -05:00
Ed Minnix
ce7690b53f Make imports private 2023-12-11 11:18:38 -05:00
Edward Minnix III
bc0655573f Simplifications
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-11 11:18:38 -05:00
Ed Minnix
14fdfa4428 Add new sink kind and change note 2023-12-11 11:18:38 -05:00
Ed Minnix
0313f39229 Cryptographic sinks 2023-12-11 11:18:38 -05:00
Ed Minnix
b713efb711 Add ThreadLocalRandom.current as another source 2023-12-11 11:18:38 -05:00
Ed Minnix
bf0123d6ae Add org.apache.commons.lang.RandomStringUtils as a source 2023-12-11 11:18:38 -05:00
Ed Minnix
1daa83bf46 Add test cases 2023-12-11 11:18:38 -05:00
Ed Minnix
e69ff7b601 Move to library and add docs 2023-12-11 11:18:38 -05:00
Ed Minnix
9f986ca527 Add Weak Randomness Query 2023-12-11 11:18:38 -05:00
Edward Minnix III
8d724acb20 Merge pull request #15026 from egregius313/egregius313/java/dataflow/deprecate-old-dataflow-module-uses
Java: Deprecate or remove imports of dataflow library copies
2023-12-11 11:14:09 -05:00
Jeroen Ketema
8d2c72fc73 C++: Update test for CLI changes 2023-12-11 16:36:51 +01:00
Alexander Eyers-Taylor
c883ce8a5e Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-12-11 13:50:35 +00:00
Anders Schack-Mulligen
3bf6c0fe02 Rangeanalysis: Focus pre-bound calculation. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
c14d917a76 Rangeanalysis: Prune range calculation. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
58d463dd33 Rangeanalysis: Minor refactor for bound steps. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
73671b6da3 Rangeanalysis: Refactor base bounds. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
6b178fb64a Rangeanalysis: Preparatory refactor for bounds sharing. 2023-12-11 14:07:10 +01:00
Michael Nebel
7006d00702 Merge pull request #14892 from michaelnebel/csharp/dotnet8
C#: Use .NET 8
2023-12-11 13:53:35 +01:00
Michael Nebel
4b323cd7e0 Merge pull request #15050 from michaelnebel/csharp/defaultparamobject
C#: Default parameters for object using attributes.
2023-12-11 13:11:53 +01:00
Tom Hvitved
866f124a95 C#: Use CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR instead of Path.GetTempPath 2023-12-11 13:10:46 +01:00
Mathias Vorreiter Pedersen
97fc20cee9 Merge pull request #15064 from MathiasVP/swift-accept-test-changes-to-cleartext-transmission
Swift: Accept test changes
2023-12-11 11:13:38 +00:00
Óscar San José
693de5e6ff Merge pull request #15042 from github/dependabot/github_actions/actions/stale-9
Bump actions/stale from 8 to 9
2023-12-11 11:44:48 +01:00
Mathias Vorreiter Pedersen
2e4fe49d61 Swift: Accept test changes. 2023-12-11 10:41:07 +00:00
Rasmus Wriedt Larsen
419130be21 Merge pull request #15030 from yoff/python/remove-module-entry-definitions
Python: Remove control flow nodes for module entry definitions from the dataflow graph.
2023-12-11 11:40:17 +01:00
Mathias Vorreiter Pedersen
d8f53e5524 Merge pull request #14925 from geoffw0/flows
Swift: Imprecise Taint Flows
2023-12-11 10:06:01 +00:00
Michael Nebel
c8542e972e C#: Fix compiler warnings. 2023-12-11 10:57:44 +01:00
Michael Nebel
d3d594adaf C#: Update C# integration tests expected output. 2023-12-11 10:57:44 +01:00
Michael Nebel
3497b153d2 C#: Update integration tests to .NET 8. 2023-12-11 10:57:44 +01:00
Michael Nebel
1792942ce9 C#: Update tests that depends on .NET framework assemblies. 2023-12-11 10:57:44 +01:00
Michael Nebel
07a5ac31ae C#: Fixup tests. 2023-12-11 10:57:44 +01:00
Michael Nebel
e42afa3d3d C#: Adjustments to test cases. 2023-12-11 10:57:43 +01:00
Michael Nebel
09239ba804 C#: Update NuGet packages. 2023-12-11 10:57:43 +01:00
Michael Nebel
89f0abe3a0 C#: Update the target framework in the create extractor pack script. 2023-12-11 10:57:43 +01:00
Michael Nebel
9ab9f2b0e6 C#: Update all project files to use .NET 8 as target framework. 2023-12-11 10:57:43 +01:00
Michael Nebel
01c65e83a0 C#: Update the stub generator to .NET 8. 2023-12-11 10:57:43 +01:00
Michael Nebel
3e2afda202 C#: Update the create extractor pack action to .NET 8. 2023-12-11 10:57:43 +01:00
Michael Nebel
0df9dcb0fd C#: Update workflow files to also install .NET 8. 2023-12-11 10:57:43 +01:00
Geoffrey White
17cd22f9d0 Merge pull request #14972 from geoffw0/cryptoprimitives
C++: Experimental query for implementation of a cryptographic primitive
2023-12-11 09:47:46 +00:00
Harry Maclean
f877f7dc64 Ruby: Stick to dataflow layer in endpoints query 2023-12-11 09:46:09 +00:00
Mathias Vorreiter Pedersen
c6c487dd90 C++: Fix Code Scanning errors. 2023-12-11 09:35:44 +00:00
Mathias Vorreiter Pedersen
7faf286820 C++: Add more QLDoc to the 'is modifiable' predicates. 2023-12-11 09:29:59 +00:00
Tom Hvitved
cdf59e1e1d Ruby: Cache more predicates 2023-12-11 10:15:17 +01:00
Tom Hvitved
29a1cd110c Merge pull request #15041 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-11 09:04:43 +01:00
github-actions[bot]
da48d81489 Add changed framework coverage reports 2023-12-11 00:16:52 +00:00
amammad
bfa0fb6d74 remove a duplicate test 2023-12-10 22:08:12 +01:00
amammad
cc5416406f added more sinks related to io.Writer of BodyWriter 2023-12-10 22:06:27 +01:00
Yunus AYDIN
cf8f2a38c3 Update expected file 2023-12-11 00:03:50 +03:00
Yunus AYDIN
a6b092d8c1 Update rules ids 2023-12-10 22:26:05 +03:00
Yunus AYDIN
4d97c42ee5 Remove debugging select on go-chi.ql 2023-12-10 22:18:48 +03:00
Yunus AYDIN
501f617eaa Update qhelp and and go-chi 2023-12-10 22:07:17 +03:00
Yunus AYDIN
34fb1c4a9f Add go-chi middleware stub to vendor 2023-12-10 22:06:23 +03:00
amammad
b6aaff2e64 use SimpleGlobal with source and sink to find BodyWriter successors globally 2023-12-10 15:45:42 +01:00
Tom Hvitved
f9dbf676a6 Java: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:45 +01:00
Tom Hvitved
2d3f96f201 Swift: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
35c654aa76 Go: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
faaa558ed9 Python: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
a2093c9aa2 C#: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:43 +01:00
Tom Hvitved
28373e0fdf JS: Adapt to changes in shared code 2023-12-10 11:25:43 +01:00
Tom Hvitved
0e81577269 Ruby: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:43 +01:00
Tom Hvitved
adc4455f09 Parameterize FlowSummaryImpl.qll 2023-12-10 11:11:05 +01:00
Tom Hvitved
41fa39eb7c Parameterize AccessPathSyntax.qll 2023-12-10 11:11:05 +01:00
Tom Hvitved
fd7e3454d6 Copy FlowSummaryImpl.qll to dataflow pack 2023-12-10 11:11:05 +01:00
Tom Hvitved
4fbd806d70 Copy AccessPathSyntax.qll to dataflow pack 2023-12-10 11:11:05 +01:00
Yunus AYDIN
0813199c7f Update vendor directory and go files 2023-12-10 01:24:29 +03:00
Yunus AYDIN
a925c23d14 Add go.mod and modules.txt 2023-12-09 23:36:50 +03:00
Yunus AYDIN
6bd3c8c07b Format Document 2023-12-09 23:36:13 +03:00
Yunus AYDIN
6378c5e22f Update Fiber Rule for checking files 2023-12-09 23:35:42 +03:00
Yunus AYDIN
63123f3984 Add GoChi Rule 2023-12-09 23:34:48 +03:00
Yunus AYDIN
ba4f8612eb Add GoChi Test Cases 2023-12-09 23:33:18 +03:00
Yunus AYDIN
ad1284853b remove unnecessary file 2023-12-09 19:49:21 +03:00
Yunus AYDIN
eb25d0df66 Add test cases 2023-12-09 19:44:58 +03:00
Yunus AYDIN
85636ccab7 Add Web Cache Deception QHelp and Example Code Snippet for Vulnerable Go Fiber usage 2023-12-09 19:12:20 +03:00
Tom Hvitved
7819dcf0a7 Merge pull request #15043 from hvitved/ql/redundant-import
QL4QL: Improvements to `RedundantImport` query
2023-12-09 12:15:09 +01:00
Owen Mansel-Chan
2e2a82c237 Add change note 2023-12-08 23:33:58 +00:00
Owen Mansel-Chan
ab68c4e341 Update test 2023-12-08 23:29:44 +00:00
Owen Mansel-Chan
40b3598fd0 Also follow jump steps when looking for a callee source
This is needed because capturing a variable is a jump step
and we want to find a callee source for captured functions.
2023-12-08 18:44:14 +00:00
Geoffrey White
0133c659d5 Swift: Change note. 2023-12-08 16:53:38 +00:00
Geoffrey White
c2123f2c9b Swift: More detailed models for pointers. 2023-12-08 16:51:53 +00:00
Rasmus Lerchedahl Petersen
d9c0c8c26d Python: Update comment. 2023-12-08 17:32:23 +01:00
Rasmus Lerchedahl Petersen
2539e2ec1a Python: slightly improve tarslip logic 2023-12-08 17:18:25 +01:00
erik-krogh
e8f9e366d5 remove redundant imports for JS 2023-12-08 16:56:54 +01:00
Ed Minnix
1526da5929 Deprecation change note 2023-12-08 10:50:04 -05:00
Ed Minnix
aebbc7d4ab Add private imports to prevent compile warnings 2023-12-08 10:42:11 -05:00
Ed Minnix
1b8f3f3450 Deprecate or remove imports of dataflow library copies 2023-12-08 10:42:10 -05:00
Michael Nebel
fd12c3a3ba C#: Update expected test output. 2023-12-08 16:10:38 +01:00
Harry Maclean
944fbeb34c Ruby: Update comment
We don't actually generate type models for `extend` relationships yet,
because they are more complex than `include`.
2023-12-08 14:54:21 +00:00
Harry Maclean
ece196cb25 Ruby: Update model editor tests 2023-12-08 14:52:51 +00:00
Anders Schack-Mulligen
0618568cdc Merge pull request #15045 from aschackmull/java/fix-cp
Java: Fix accidental cartesian product.
2023-12-08 15:43:01 +01:00
Anders Schack-Mulligen
1ea2f89e27 Merge pull request #15046 from aschackmull/dataflow/deprecation-changenote
Dataflow: Add change note about deprecation.
2023-12-08 15:42:34 +01:00
Mathias Vorreiter Pedersen
90b06c2046 C++: Switch the source of use-after-free and double-free to be post-update nodes. 2023-12-08 14:41:29 +00:00
Michael Nebel
9aeba5063f C#: Use cast expressions for object defaults. 2023-12-08 15:37:12 +01:00
Harry Maclean
ec24b25c8b Ruby: fix location in model editor query 2023-12-08 14:16:50 +00:00
Harry Maclean
e6df264865 Ruby: Report module declarations to model editor
This allows us to render type relations between modules/classes, not
just methods.
2023-12-08 14:16:49 +00:00
Harry Maclean
c1c258f567 Ruby: Include ancestors in type model generation 2023-12-08 14:16:49 +00:00
Mathias Vorreiter Pedersen
5bb2144c80 C++: Add field-flow through addresses of fields 2023-12-08 14:13:01 +00:00
Michael Nebel
6c30f6a748 C#: Add some test cases and update (incorrect) expected output. 2023-12-08 15:09:35 +01:00
Jeroen Ketema
db6b1e5f5e Merge pull request #14912 from jketema/dep-userinput
C++: Deprecate `isUserInput`, `userInputArgument`, and `userInputReturned`
2023-12-08 15:04:23 +01:00
Ian Lynagh
eab32ea24b Kotlin 2: Accept changes in query-tests/UnderscoreIdentifier 2023-12-08 13:49:25 +00:00
Alex Eyers-Taylor
da5c2d9bad CPP: Use guard libraries to find equalities with zero. 2023-12-08 13:30:30 +00:00
Alexander Eyers-Taylor
df32e9556c Update cpp/ql/src/change-notes/2023-12-04-incorrectly-checked-scanf.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-08 13:29:13 +00:00
Anders Schack-Mulligen
64eb4ff753 Merge pull request #14983 from aschackmull/dataflow/deprecate-old-api
Data Flow: Deprecate old data flow api.
2023-12-08 14:27:25 +01:00
Anders Schack-Mulligen
75d8da9007 Dataflow: Add change note about deprecation. 2023-12-08 14:25:20 +01:00
Jeroen Ketema
c6b0a2363a C++: Add change note 2023-12-08 13:31:32 +01:00
Anders Schack-Mulligen
7ee3068fe7 Java: Fix accidental cartesian product. 2023-12-08 13:27:05 +01:00
Jeroen Ketema
5165999e9e C++: Deprecate isUserInput, userInputArgument, and userInputReturned 2023-12-08 13:21:31 +01:00
Mathias Vorreiter Pedersen
30c67ba6e7 Merge pull request #15040 from MathiasVP/fewer-dataflow-branches
C++: Fix dataflow inconsistencies
2023-12-08 12:14:49 +00:00
Harry Maclean
1dc0a063b0 Merge pull request #14679 from hmac/hmac-model-editor-ruby
Ruby: Experimental model editor support
2023-12-08 11:03:38 +00:00
Mathias Vorreiter Pedersen
90a62b27f5 Merge branch 'main' into fewer-dataflow-branches 2023-12-08 10:35:33 +00:00
Rasmus Wriedt Larsen
dc90411809 Python: Don't include docs/ folder 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
004bb50ef2 Python: Disallow invalid path component 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6ce8cd38d8 Python: Disallow examples 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6db3b37ed7 Python: Use separate directory for subclass capture models 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
c4abffe77e Python: Ignore any captured info with tests in it 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
de41f199fc Python: Allow single file processing 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
2c0bed174f Python: Remove suspicious packages 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
0b5c73ae1e Python: Allow any .bqrs file 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
b24e565128 SubclassFinder: don't include site-packages 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
aa5eee1eac Python: Revert manual pickle modeling
This reverts commit 62910f0cab525ca4d4901c4c27f6e6b22c3375fc.
This reverts commit 75a8197879ec47094d9b18f3dab7bcc1c1cdba28.

We don't find `kombu.serialization.pickle_load` since we respect
`__all__`. I think that was an attempt to not flood the captured
modeling with useless re-exports, but I think we've ended up doing that
anyway... we should consider to remove that restriction!

see 21d7df29c7/kombu/serialization.py (L29)
2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
f74581ad09 Revert "Python: Model owslib.etree.etree directly"
This reverts commit 1213e786519a11142746fd3a725c874181f3a42b.

By fixing a few bugs in the SubclassFinder + manually running Find.ql on the geonode DB from DCA, I found that the installed version of owslib had both: https://github.com/geopython/OWSLib/blob/0.27.2/owslib/etree.py
2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6ef9a2b11e Python: Fix problem if import is used
I fixed it in both predicates... I think we might still be able to remove
`newDirectAlias` -- but with it being better, it will allow us to better test if `newImportAlias` actually cover everything we need!
2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
fcdc8102e2 Python: Add test highlight problem is import is used :O 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
f1fd9b4c7a Python: Fix underlying problem of not using Alias 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
a956e1f613 Python: Use django View instead of MethodView
Due to the 'only model most specific spec' logic highlighted in previous
commit, I'm changing away from MethodView/View, and use Django view instead.

In practice this shouldn't matter at all, but for writing tests it would
have been a nice fix to only have the "same name but more specific"
logic apply when it's the same _definition_ location. We used to have
this information available, but right now we don't... so instead of
spending a lot of time rewriting the core library, I simply used a
different class :D :O :(
2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
03aa2e27df Python: Explain the funky logic in Find.ql 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
1f8f6dd0ec Python: Ensure no deps visible in FindSubclass tests 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
af2d783b38 Python: More examples of things to handle in find-subclass 2023-12-08 11:27:52 +01:00
Taus
fa6aec7ae2 Python: Model owslib.etree.etree directly
Somehow, this alias did not get picked up by the tooling.
2023-12-08 11:27:52 +01:00
Taus
6d40e7e0fc Python: Add extensible modelling for lxml.etree 2023-12-08 11:27:52 +01:00
Taus
5b9d56774b Python: Refactor references to ElementTree
This would probably be better as a module, but I wanted to verify
first that this would yield the right results.
2023-12-08 11:27:52 +01:00
Taus
d29879a844 Python: Model kombu.serialization
More `pickle` wrappers.
2023-12-08 11:27:52 +01:00
Taus
a6dc6f3e42 Python: Add model for flask.restful
Not subclass-related -- just an alias.
2023-12-08 11:27:52 +01:00
Taus
6261a94986 Python: Add cloudpickle model
This one didn't seem to fit into the subclass approach, so I just modeled
it manually.
2023-12-08 11:27:52 +01:00
Taus
5920a8fad6 Python: Add meta-query for "interesting" taint sinks 2023-12-08 11:27:52 +01:00
Taus
43fe9ca31d Python: Model rest_framework.exceptions.APIException
Only models the subclasses of `APIException` that share the same interface as
`APIException` itself with regard to the `getBody` predicate.
2023-12-08 11:27:52 +01:00
Taus
1f66659ff2 Python: Add Django FileField model 2023-12-08 11:27:52 +01:00
Taus
aa3f1cf3e1 Python: extend aiohttp model 2023-12-08 11:27:52 +01:00
Taus
b5bffb2220 Python: Add aioch model 2023-12-08 11:27:52 +01:00
Taus
875fa0b8f0 Python: Add Peewee model 2023-12-08 11:27:52 +01:00
Taus
5e3bdb8701 Python: Add Pydantic model 2023-12-08 11:27:51 +01:00
Taus
9d93afe128 Python: Add logging.Logger model 2023-12-08 11:27:51 +01:00
Taus
dea61e14d1 Python: Add Urllib3 model 2023-12-08 11:27:51 +01:00
Taus
1269a98d2b Python: Add Tornado models 2023-12-08 11:27:51 +01:00
Taus
6093bb9fd4 Python: add some stdlib models 2023-12-08 11:27:51 +01:00
Taus
4879a931eb Python: Add starlette.requests.URL model 2023-12-08 11:27:51 +01:00
Taus
a3f7885787 Python: Add SqlAlchemy model 2023-12-08 11:27:51 +01:00
Taus
422733f32a Python: Add rest_framework model 2023-12-08 11:27:51 +01:00
Taus
5afead5896 Python: Add Pycurl model 2023-12-08 11:27:51 +01:00
Taus
f1a72311ed Python: add MultiDict model 2023-12-08 11:27:51 +01:00
Taus
62db8cc633 Python: Add MarkupSafe model 2023-12-08 11:27:51 +01:00
Taus
cdb0ac524d Python: Add invoke model 2023-12-08 11:27:51 +01:00
Taus
699b6b8bef Python: Add httpx model 2023-12-08 11:27:51 +01:00
Taus
6128c89518 Python: Add Flask app and blueprint models 2023-12-08 11:27:51 +01:00
Taus
a81f8ea54d Python: Add Django RawSQL and HttpRequest models 2023-12-08 11:27:51 +01:00
Taus
ff9482f81b Python: Add fabric connection model 2023-12-08 11:27:51 +01:00
Taus
947aa099e0 Python: Add aiohttp.ClientSession model 2023-12-08 11:27:51 +01:00
Taus
f5bed2d955 Python: Add clickhouse_driver model 2023-12-08 11:27:51 +01:00
Taus
83e6e51e95 Python: Add starlette.websocket model 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
f19b672656 Python: Also capture alias with new name 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
e7d55736b0 Python: Add test of find-subclass code 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
7d86a8d7f1 Python: Improve speed of process-mrva-results.py
Same trick as 'generate-code-scanning-query-list.py'
2023-12-08 11:27:50 +01:00
Taus
750f14f859 Python: Add http.client.HTTPResponse model 2023-12-08 11:27:50 +01:00
Taus
1d4b4ee740 Python: Add Requests response model
This required making some of the relevant bits public, but they are marked as internal anyway.
2023-12-08 11:27:50 +01:00
Taus
cb1efa915e Python: Add Flask response model 2023-12-08 11:27:50 +01:00
Taus
7b1c6b0dd6 Python: Add Django response models 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
d622d873d9 Python: Enable auto-model for Django Model 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
bff7ae20e1 Python: Enable auto-model for cgi.FieldStorage 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
1e69762242 Python: More import fixes
:thinkies: turns out that .getASubclass*() had to be applied everywhere...
2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
af6c5ccead Python: Enable auto-model BaseHttpRequestHandler 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
ba19f95d3e Python: Improve SelfRefMixin
This is important to model mixins correctly, for example when they help
handle incoming requests, and therefore need to know that `self.kwargs`
contains data controlled by a user.
2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
dfdb66f723 Python: Allow any results.bqrs file 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
77a4d81a08 Python: Improve import * handling 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
ec384649e8 Python: Automodel for WSGIServer 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
eb97a7989f Python: Automodel for tornado 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
d6fec9e4a7 Python: Make Django use auto-modeling
Ooops
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
734dcb156a Python: Sort MaD rows
(makes future diffing much easier)
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
1c43d11c54 FIXME already fixed 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
5e98ff48ff Python: Add script to process results from MRVA (bqrs files)
Also makes `empty.model.yml` empty once again
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
451a210916 Python: Remove query predicate annotation 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
b1f5dea70c Python: Add query metadata 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
b66dd23a68 Python: Streamline what modules to allow for now 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
ba0a5b1c23 Python: Adjust test-code predicate 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
bb3ced02e3 Python: Improve docs/names around already modeled classes 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
f06bbd2263 WIP rest of modeling done so far 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
2f17d2f3ac WIP: Flask View class modeling for restplus
Based on some DBs I had that contained dependencies
2023-12-08 11:27:49 +01:00
Geoffrey White
6a48e6ed5e Merge pull request #15038 from geoffw0/mmmmodels
Swift: Model Manual Memory Management closure functions and withMemoryRebound variants
2023-12-08 10:25:58 +00:00
Mathias Vorreiter Pedersen
7b83947383 Merge branch 'main' into fewer-dataflow-branches 2023-12-08 09:30:01 +00:00
Mathias Vorreiter Pedersen
1c73d43b4f C++: Accept more test changes. 2023-12-08 09:29:48 +00:00
Tom Hvitved
0361b2e6e8 QL4QL: Improvements to RedundantImport query 2023-12-08 10:19:04 +01:00
Harry Maclean
199c6b224d Ruby: fix warnings 2023-12-08 09:16:17 +00:00
Jeroen Ketema
9a555ba16e Merge pull request #14909 from jketema/rm-dtt
C++: Remove `DefaultTaintTracking` library
2023-12-08 10:08:55 +01:00
dependabot[bot]
e822fe975d Bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 03:10:16 +00:00
Mathias Vorreiter Pedersen
e648058d30 C++: Accept test changes. 2023-12-07 23:11:28 +00:00
Mathias Vorreiter Pedersen
d6871c7cf9 C++: Merge 'PostUpdateFieldNode' and 'IndirectArgumentOutNode' into a single IPA branch. 2023-12-07 23:11:28 +00:00
amammad
a3fbc3c20c fix ResponseBody Class issues 2023-12-07 19:36:27 +01:00
Geoffrey White
ba6d3484f5 Swift: Add more tests of pointer methods. 2023-12-07 18:09:34 +00:00
Chuan-kai Lin
96b793a877 Merge pull request #15032 from github/post-release-prep/codeql-cli-2.15.4
Post-release preparation for codeql-cli-2.15.4
2023-12-07 09:23:32 -08:00
Geoffrey White
801878bff2 Swift: I believe flow through withUnsafeMutableBytes should always be taint flow, as it changes the type of elements to bytes. 2023-12-07 16:42:35 +00:00
Geoffrey White
ea68af8b7f Swift: Change note. 2023-12-07 16:42:34 +00:00
Geoffrey White
8818b3d22d Swift: Model withMemoryRebound, assumingMemoryRebound, bindMemory. 2023-12-07 16:03:01 +00:00
Geoffrey White
db3dfdc9a0 Swift: Model Manual Memory Management closure functions. 2023-12-07 15:55:00 +00:00
Michael Nebel
2e6e2eabf2 Merge pull request #15036 from michaelnebel/csharp/intptrdefaultssimple
C#: Parameter defaults for `nint` and `nuint` in compiled code.
2023-12-07 16:20:41 +01:00
Geoffrey White
1de9919193 Swift: Test Manual Memory Management closure functions. 2023-12-07 15:10:41 +00:00
Harry Maclean
1b29ed2a81 Ruby: Address review comments 2023-12-07 14:31:27 +00:00
Harry Maclean
79a83ec74b Ruby: elaborate placeholder query 2023-12-07 14:26:15 +00:00
Tamás Vajk
51adcf5e10 Merge pull request #15010 from tamasvajk/fix/stringbuilder-interpolation
C#: Support interpolated strings in `StringBuilder.Append`
2023-12-07 15:25:44 +01:00
Anders Schack-Mulligen
9fafa973d8 C++: Remove irrelevant test. 2023-12-07 14:13:42 +01:00
Tamas Vajk
75fa67726e Fix models to support fluent chaining 2023-12-07 14:10:16 +01:00
amammad
5795c72a99 added inline tests 2023-12-07 14:04:33 +01:00
amammad
6ebdae3bab Merge branch 'main' into amammad-python-bombs 2023-12-07 13:50:20 +01:00
amammad
2d0067d618 fix some qldocs, change Sink extenstion model, deduct some not necessarily checks :) 2023-12-07 13:45:28 +01:00
Michael Nebel
d9c6d4e6cb C#: Update Parameters expected output. 2023-12-07 13:14:24 +01:00
Michael Nebel
aac3ec81f2 C#: Add generated cast expression for nuint and nint parameter defaults. 2023-12-07 13:14:24 +01:00
Geoffrey White
32fdf4fc9f Merge pull request #15007 from geoffw0/sensitivekeytests
Swift: Add some tests and model SecKeyCopyExternalRepresentation
2023-12-07 10:50:13 +00:00
Tamas Vajk
e0c9be371f Add change note 2023-12-07 10:57:18 +01:00
Tamas Vajk
89df59a083 C#: Add missing models and fix interpolated string flow into StringBuilder 2023-12-07 10:56:59 +01:00
Geoffrey White
028326abad Swift: Correct US spellings. 2023-12-07 09:54:01 +00:00
Tamas Vajk
2c624c23ed Add test cases for missing flow with interpolated strings and StringBuilder 2023-12-07 10:32:01 +01:00
Tamas Vajk
9f24b026fb C#: Move StringBuilder dataflow tests to separate file 2023-12-07 10:31:50 +01:00
Tamás Vajk
3431fcf9af Merge pull request #15025 from tamasvajk/feature/change-stringbuilder-modeling
C#: Change `StringBuilder` flow models to not use `Element` access path
2023-12-07 10:29:54 +01:00
Tamas Vajk
c1db689f2f Fix expected test results 2023-12-07 09:59:33 +01:00
Tamas Vajk
669a0c6827 Fix StringBuilder.ToString summaries 2023-12-07 09:21:27 +01:00
amammad
dbf01a9284 fix an issue in ResponseBody, change isHTMLEscape to isHtmlEscape 2023-12-07 08:52:55 +01:00
Tamás Vajk
a8bd6b8cb1 Merge pull request #15024 from tamasvajk/fix/interpolated-strings-stubs
C#: Add interpolated string handler attributes to generated stubs
2023-12-07 08:18:08 +01:00
dependabot[bot]
3d7ab2e0b0 Bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 03:43:13 +00:00
github-actions[bot]
92af5f5386 Post-release preparation for codeql-cli-2.15.4 2023-12-06 22:59:22 +00:00
Rasmus Lerchedahl Petersen
263c0aade7 Python: adjust test expectations
mostly removing of nodes from the graph.
One result lost:
```
check("submodule.submodule_attr", submodule.submodule_attr, "submodule_attr", globals()) #$ MISSING:prints=submodule_attr
```
2023-12-06 23:00:51 +01:00
Mathias Vorreiter Pedersen
04c2ce97fd Merge pull request #15027 from jketema/more-exit
C++: Also support the `__noreturn__` attribute in `exits`
2023-12-06 21:48:26 +00:00
Rasmus Lerchedahl Petersen
8c5ca3f564 Python: remove control flow nodes
for module entry definitions from the dataflow graph.
2023-12-06 21:47:03 +01:00
Robert Marsh
1087087acb Merge pull request #14570 from rdmarsh2/rdmarsh2/swift/extract-pattern-types
Swift: extract types for patterns
2023-12-06 14:11:53 -05:00
Geoffrey White
366a9f1b7e Swift: Convert unsafepointer.swift test to use labelled sources. 2023-12-06 18:57:30 +00:00
Jeroen Ketema
af1da1e9ae C++: Also support the __noreturn__ attribute in exits
Observed this attribute while working on coding standards test regression
when replacing Guards by IRGuards.
2023-12-06 18:08:39 +01:00
Mathias Vorreiter Pedersen
1bc6f88f58 Merge pull request #14992 from jketema/ir-guards-replacement
C++: replace Guards with IRGuards
2023-12-06 15:55:22 +00:00
amammad
20a3211d06 move sanitizers from sharedxss::sanitizer to EscapeFunction::Range, added proper inline tests 2023-12-06 16:19:34 +01:00
Tamas Vajk
eeabb81973 Adjust expected test files 2023-12-06 16:00:43 +01:00
amammad
3e0ed0090f added BodyWriter Sink, added proper content-type header in tests to comply new changed xss strategy 2023-12-06 16:00:36 +01:00
Tamas Vajk
a705f6dc0d C#: Change StringBuilder flow models to not use Element access path 2023-12-06 15:54:34 +01:00
amammad
d3099ff482 fix tests, move from SharedXss::Sink to Http::* classes 2023-12-06 15:52:50 +01:00
Ian Lynagh
c1cc441da7 Merge pull request #15023 from igfoo/igfoo/df-wrapper
Kotlin: Fix dataflow with Array.set wrappers
2023-12-06 14:48:54 +00:00
Tamas Vajk
50b7ab8448 C#: Add interpolated string handler attributes to generated stubs 2023-12-06 15:40:48 +01:00
Tamás Vajk
faa63dda8b Merge pull request #14994 from tamasvajk/standalone/framework-assembly-reshuffle
C#: Only consider latest version of dotnet framework flavors
2023-12-06 14:54:11 +01:00
Ian Lynagh
fc11a87882 Kotlin: Fix dataflow with Array.set wrappers 2023-12-06 12:19:46 +00:00
Ian Lynagh
7fc7b96ed7 Kotlin: Add a test for dataflow with an Array.set wrapper 2023-12-06 12:19:25 +00:00
Ian Lynagh
49c188e612 Merge pull request #15009 from igfoo/igfoo/qual
Docs: DataFlow: Add a missing qualifier
2023-12-06 12:10:56 +00:00
Jeroen Ketema
edf178696d C++: accept test changes for IR Guards replacement 2023-12-06 12:47:20 +01:00
Robert Marsh
88073a5fb2 C++: change note for IRGuards replacing Guards 2023-12-06 12:47:20 +01:00
Robert Marsh
172445f5e7 C++: replace Guards with IRGuards 2023-12-06 12:47:20 +01:00
Jeroen Ketema
db1dc6fa2c Merge pull request #15021 from jketema/ir-guards-unreached-fix
C++: Fix handling of unreached instructions in IRGuards
2023-12-06 12:46:09 +01:00
Paolo Tranquilli
db0fc3775a Merge pull request #15004 from github/alexdenisov/fix-swift-autobuilder-bug
Swift: fix autobuilder bug when Xcode failure breaks the whole autobuild process
2023-12-06 11:29:26 +01:00
Mathias Vorreiter Pedersen
9fa20f5f39 Merge pull request #14799 from MathiasVP/solve-modify-copy-problem
DataFlow: Add language-specific predicate for ignoring steps in flow-through calculation
2023-12-06 09:55:34 +00:00
Jeroen Ketema
4390e4cad3 C++: Fix handling of unreached instructions in IRGuards 2023-12-06 10:23:27 +01:00
Jeroen Ketema
d6e30cd828 C++: Add test showing unreachable instructions give spurious blocks in IRGuards 2023-12-06 10:23:27 +01:00
Tamas Vajk
efa7408491 C#: Use latest asp.net core/windows desktop framework DLLs from nuget folder 2023-12-06 10:17:02 +01:00
Geoffrey White
ff8b796731 Merge pull request #14692 from geoffw0/webview3
Swift: Simplify AdoptsWkNavigationDelegate in WebView.qll.
2023-12-06 09:11:33 +00:00
Jeroen Ketema
49a4306514 Merge pull request #15015 from jketema/exit
C++: Add `_Exit` to the list of exiting (non-returning) functions
2023-12-06 10:07:55 +01:00
Geoffrey White
4cec14657e Merge pull request #14853 from geoffw0/logsinks
Swift: More sinks for swift/cleartext-logging
2023-12-06 09:00:26 +00:00
Owen Mansel-Chan
aad847497b Merge pull request #14962 from owen-mc/go/improve-tests-incorrect-integer-conversion
Go: Improve tests for Incorrect Integer Conversion
2023-12-06 07:40:00 +00:00
Nora Dimitrijević
6d24eb4814 Merge pull request #14897 from d10c/d10c/relax-cpp-dbscheme
C++: Relax the dbscheme for `link_targets/2`
2023-12-05 23:27:03 +01:00
Nora Dimitrijević
66c0a4af5a Upgrade/downgrade script 2023-12-05 22:03:40 +01:00
Nora Dimitrijević
0307354d6e Relax the C++ dbscheme for link_targets/2 2023-12-05 22:03:40 +01:00
Chuan-kai Lin
5b62c0cb53 Merge pull request #15016 from github/revert-15003-dependabot/github_actions/actions/labeler-5
Revert "Bump actions/labeler from 4 to 5"
2023-12-05 12:43:16 -08:00
Chuan-kai Lin
ba57a0363c Revert "Bump actions/labeler from 4 to 5" 2023-12-05 12:09:56 -08:00
Jeroen Ketema
696cbeae5c C++: Add _Exit to the list of exiting (non-returning) functions 2023-12-05 20:33:43 +01:00
Tom Hvitved
dde83b6415 Merge pull request #14709 from hvitved/ruby/shared-type-tracking
Ruby: Adopt shared type tracking library
2023-12-05 20:12:06 +01:00
Ian Lynagh
2c625e34b5 Merge pull request #15008 from igfoo/igfoo/kot-arr-taint
Kotlin: Track taint through Array.get/set
2023-12-05 18:30:21 +00:00
Geoffrey White
521d98ed8d C++: Make the encryption words a tiny bit more flexible. 2023-12-05 18:03:17 +00:00
Geoffrey White
e95098f61f C++: Add 'experimental' tag. 2023-12-05 18:03:11 +00:00
Geoffrey White
cde975dc24 C++: Add even more test cases. 2023-12-05 18:02:51 +00:00
Geoffrey White
2f0be40f37 C++: Exclude results in some common libraries. 2023-12-05 18:00:00 +00:00
Geoffrey White
965d131b5a C++: Add more test cases. 2023-12-05 17:59:26 +00:00
Geoffrey White
fb02e996d4 C++: Address QL-for-QL comments. 2023-12-05 17:58:35 +00:00
Geoffrey White
c83cfe4936 C++: Make output clearer in cases where the function name is a macro expansion (I've seen this more than once). 2023-12-05 17:58:22 +00:00
Geoffrey White
3c6f318cb2 C++: Add query tests. 2023-12-05 17:54:50 +00:00
Taus
a09078a5ca Merge pull request #14777 from yoff/python/remove-ssa-nodes-from-dataflow-graph
Python: remove EssaNodes
2023-12-05 18:10:27 +01:00
Henti Smith
33a0de07b6 Merge pull request #15002 from github/dependabot/github_actions/actions/setup-dotnet-4
Bump actions/setup-dotnet from 3 to 4
2023-12-05 15:35:00 +00:00
Henti Smith
0232cd032c Merge pull request #15003 from github/dependabot/github_actions/actions/labeler-5
Bump actions/labeler from 4 to 5
2023-12-05 15:34:47 +00:00
Tamas Vajk
1b37c66bf8 C#: Only consider latest version of dotnet framework flavors 2023-12-05 16:33:42 +01:00
Michael Nebel
9390b48228 C#: Add (U)IntPtr parameter default test cases. 2023-12-05 16:29:16 +01:00
Ian Lynagh
27f99acb2e Docs: DataFlow: Add a missing qualifier 2023-12-05 14:51:15 +00:00
Geoffrey White
e60dc9a9ed Swift: Use the PostUpdateNode. 2023-12-05 14:48:46 +00:00
Ian Lynagh
8ea155ef24 Kotlin: Add changenote 2023-12-05 14:48:02 +00:00
Ian Lynagh
babf1d6648 Kotlin: Track Kotlin's Array.set when tracking taint 2023-12-05 14:42:45 +00:00
Ian Lynagh
124487c57c Kotlin: Add more taint tests 2023-12-05 14:42:45 +00:00
Ian Lynagh
821b4c727e Kotlin: Add Array.get(_) support to taint tracking 2023-12-05 14:41:32 +00:00
Ian Lynagh
9953794101 Kotlin: Add an extra test case for Kotlin array taint 2023-12-05 14:41:32 +00:00
Jeroen Ketema
30e5e74a78 Merge pull request #15005 from jketema/ir-guards-ternary-fix
C++: Fix IRGuards ternary behaviour
2023-12-05 15:04:56 +01:00
Henti Smith
f66133e29e Merge branch 'main' into dependabot/github_actions/actions/labeler-5 2023-12-05 14:03:25 +00:00
Henti Smith
1d9cd0a73b Merge branch 'main' into dependabot/github_actions/actions/setup-dotnet-4 2023-12-05 14:03:23 +00:00
Tom Hvitved
c6e805faef Ruby: Add more deprecation comments 2023-12-05 14:57:15 +01:00
Geoffrey White
11d582db51 Swift: Change note. 2023-12-05 13:35:44 +00:00
Geoffrey White
5095031110 Swift: Model SecKeyCopyExternalRepresentation as an explicit sensitive data source. 2023-12-05 13:35:44 +00:00
Geoffrey White
1d903c56ad Swift: Add a test with SecKeyCopyExternalRepresentation. 2023-12-05 13:35:44 +00:00
Michael Nebel
e6a5c50ebc Merge pull request #14953 from rpmrmartin/issue/14952
C#: Fix a URL redirection from remote source false positive
2023-12-05 13:02:56 +01:00
Mathias Vorreiter Pedersen
8ce4bbec33 Merge pull request #14867 from MathiasVP/reduce-duplication-from-operators
C++: Reduce duplication from crement operations
2023-12-05 11:57:48 +00:00
Ian Lynagh
70ff59eee1 Merge pull request #14997 from igfoo/igfoo/locs
Kotlin: Accept some location changes in test-kotlin2/library-tests/vararg
2023-12-05 11:18:27 +00:00
Jeroen Ketema
4d702e2eee C++: Fix IRGuards ternary behaviour 2023-12-05 12:17:46 +01:00
Jeroen Ketema
d84961571b C++: Add IRGuards test that shows that ternary behaviour is not quite correct 2023-12-05 12:16:01 +01:00
Mathias Vorreiter Pedersen
2908acfb52 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-05 11:00:17 +00:00
Mathias Vorreiter Pedersen
db0d203eb4 Merge branch 'main' into solve-modify-copy-problem 2023-12-05 09:43:17 +00:00
Mathias Vorreiter Pedersen
a8020f4f78 C++: Add barrier to prevent duplication. 2023-12-05 09:14:23 +00:00
Tom Hvitved
71d09b75fb Merge pull request #14990 from hvitved/csharp/more-nullness-tests
C#: Add a few more `is (not) null` tests
2023-12-05 10:14:13 +01:00
Michael Nebel
8dcdda6d21 C#: Address review comments. 2023-12-05 10:08:06 +01:00
Alex Denisov
8f3d31818c Swift: fix autobuilder bug when Xcode failure breaks the whole autobuild process 2023-12-05 09:58:33 +01:00
Tony Torralba
07b76ee444 Merge pull request #15000 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-05 08:54:20 +01:00
Tamás Vajk
b06113a21e Merge pull request #14991 from tamasvajk/standalone/prefer-assembly-version-over-netcore-version
C#: Prefer assembly version over netcore version in conflict resolution
2023-12-05 08:49:08 +01:00
dependabot[bot]
eb08a508c9 Bump actions/labeler from 4 to 5
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 03:33:07 +00:00
dependabot[bot]
4d68beffe0 Bump actions/setup-dotnet from 3 to 4
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 03:33:03 +00:00
github-actions[bot]
48c15035b9 Add changed framework coverage reports 2023-12-05 00:16:34 +00:00
Robert Marsh
e9507b98ef Swift: remove spurious stats file 2023-12-04 21:30:12 +00:00
Geoffrey White
a5dd4a4e2a Swift: More tests of keys as sensitive data. 2023-12-04 19:05:15 +00:00
Alex Eyers-Taylor
7706ac9f10 CPP: Fix changenote location 2023-12-04 18:50:25 +00:00
Alexander Eyers-Taylor
2e92689810 CPP: Apply suggestions from code review of incorrect scanf check
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-04 18:32:03 +00:00
Mathias Vorreiter Pedersen
6dd941ee20 Merge pull request #14996 from jketema/toctou-test
C++: Fix `chmod` prototype in toctou test and additional test
2023-12-04 17:42:52 +00:00
Owen Mansel-Chan
570538b4ec Merge pull request #14938 from owen-mc/go/improve-test-unhandled-close-writable-handle
Go: improve test unhandled close writable handle
2023-12-04 16:56:09 +00:00
Jeroen Ketema
7f1bd499ce C++: Add test annotation 2023-12-04 17:53:08 +01:00
Mathias Vorreiter Pedersen
d9d36ff213 C++: Fix Code Scanning errors. 2023-12-04 16:53:03 +00:00
Rasmus Lerchedahl Petersen
9e1c818db6 Python: address review comments 2023-12-04 17:49:26 +01:00
Ian Lynagh
1aa1698f44 Kotlin: Accept some location changes in test-kotlin2/library-tests/vararg 2023-12-04 16:44:38 +00:00
yoff
f5c176bd12 Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-12-04 17:41:00 +01:00
Mathias Vorreiter Pedersen
03b77dbf2a C++: Make 'node.asExpr()' behave as 'node.asDefinition()' in void contexts. 2023-12-04 16:38:13 +00:00
Jami
651653998c Merge pull request #14913 from jcogs33/jcogs33/unsafe-url-forward_path-inj-related_cve-2019-3799
Java: add Spring models
2023-12-04 10:18:50 -05:00
Jeroen Ketema
3e2397a3d1 C++: Fix chmod prototype in toctou test and additional test 2023-12-04 16:15:44 +01:00
Tamas Vajk
267125a65e Adjust comment on OrderAssemblyInfosByPreference method 2023-12-04 15:21:30 +01:00
Rasmus Wriedt Larsen
c952f6a648 Python: Update rest of tests to new dataflow lib
I had missed these originally, since I had just fixed the ones that were
highlighted in the actions logs, thinking they had covered everything :(
2023-12-04 14:49:40 +01:00
Tamas Vajk
db22478a47 Fix expected test files 2023-12-04 14:39:20 +01:00
Rasmus Lerchedahl Petersen
e091ae84ab Merge branch 'main' of https://github.com/github/codeql into python/remove-ssa-nodes-from-dataflow-graph 2023-12-04 14:05:40 +01:00
Alex Eyers-Taylor
f3f53570a4 CPP: Fix metadata and add a change-note. 2023-12-04 12:19:31 +00:00
Michael Nebel
2fc7e51a5b C#: Only include source code (and not stubs) in the remote flow source test. 2023-12-04 13:10:10 +01:00
Tom Hvitved
46531e653d C#: Deprecate OnAppendCookieTrackingConfig 2023-12-04 12:36:57 +01:00
Rasmus Wriedt Larsen
4dd3ea3798 Python: Update tests to new dataflow lib
Avoids some deprecation warnings :)
2023-12-04 12:36:57 +01:00
Anders Schack-Mulligen
67f0529cda Dataflow: Sync. 2023-12-04 12:36:57 +01:00
Anders Schack-Mulligen
fd920b8585 Java: Deprecate old data flow api. 2023-12-04 12:36:57 +01:00
Mathias Vorreiter Pedersen
359b15bb60 C++: Fix FP by special-casing compound assignments in 'asExprInternal'. 2023-12-04 11:29:51 +00:00
Tom Hvitved
84cba21a6c C#: Add a few more is (not) null tests 2023-12-04 12:22:47 +01:00
Mathias Vorreiter Pedersen
ce28c9b485 C++: Add more CWE-119 testcases with compound assignments instead of increments. 2023-12-04 11:22:16 +00:00
Michael Nebel
b9833fc97e C#: Updated expected test output. 2023-12-04 12:02:51 +01:00
Michael Nebel
d160890aca C#: Re-factor to avoid multiple explicit casts. 2023-12-04 12:02:34 +01:00
Michael Nebel
6807fd1569 C#: Add some stubs, a testcase and update the expected output without based on main. 2023-12-04 11:53:09 +01:00
Mathias Vorreiter Pedersen
60204574b6 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:35:07 +00:00
Mathias Vorreiter Pedersen
1198d23b96 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:35:00 +00:00
Mathias Vorreiter Pedersen
5a12a0ad62 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:34:46 +00:00
Mathias Vorreiter Pedersen
09117d3869 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:34:32 +00:00
Tamas Vajk
6f82e63461 C#: Prefer assembly version over netcore version in conflict resolution 2023-12-04 11:08:33 +01:00
Jorge
8abd1d9855 Merge branch 'main' into seclab/dotjs 2023-11-30 19:42:18 +01:00
Jorge
91bc043f30 Add .html.dot to Autobuild.java 2023-11-30 19:38:24 +01:00
Geoffrey White
b0514de094 C++: Add cpp/crypto-primitive query to experimental. 2023-11-30 15:03:03 +00:00
Robert Marsh
ba250140a8 Swift: fix an incorrect merge conflict resolution 2023-11-30 14:55:14 +00:00
Mathias Vorreiter Pedersen
3a61dd095c C++: Add change note. 2023-11-30 14:39:57 +00:00
Mathias Vorreiter Pedersen
c1561e8675 Merge branch 'main' into reduce-duplication-from-operators 2023-11-30 14:30:50 +00:00
Mathias Vorreiter Pedersen
43932b61a8 C++: Add more comments. 2023-11-30 14:20:00 +00:00
Owen Mansel-Chan
d52b23db8e Improve tests for Incorrect Integer Conversion
We changed the test query when the query was changed so that the
comments in the test file would stay the same.
I've reverted the test query and updated the comments in the test file.
This avoids problems in the branch switching to use-use flow.
2023-11-30 11:58:10 +00:00
Owen Mansel-Chan
e958a75223 Add comments indicating whether results are expected at new calls 2023-11-30 11:48:10 +00:00
masterofnow
57d897d40f Merge branch 'main' into LoadClassNoSignatureCheck 2023-11-30 10:05:00 +08:00
Jami Cogswell
7e869b9cd1 Java: add change note 2023-11-29 16:48:57 -05:00
Robert Marsh
0dc4a68ffb Swift: fix typo in change note
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-11-29 21:04:09 +00:00
Robert Marsh
81d2780adb Swift: changenote for pattern types 2023-11-29 21:04:09 +00:00
Robert Marsh
30caf2130e Swift: autoformat a test 2023-11-29 21:04:09 +00:00
Robert Marsh
16e6e8845c Swift: tests for pattern types 2023-11-29 21:04:08 +00:00
Robert Marsh
ade4809d9b Swift: upgrade/downgrade for pattern types 2023-11-29 21:04:05 +00:00
Benjamin Rodes
94a0420040 Updated getResultExpr to getResultNode. Added strlcat. Added tests. 2023-11-29 16:03:41 -05:00
Robert Marsh
3492b4820a Swift: extract types for patterns 2023-11-29 20:54:50 +00:00
Robert Martin
66b456d3c6 C#: Fix a URL redirection from remote source false positive
When guarding the redirect with `HttpRequestBase.IsUrlLocalToHost()`
2023-11-29 13:46:47 -07:00
Jami Cogswell
d5fd2db1bd Java update UrlPathHelper tests 2023-11-29 15:23:11 -05:00
Jami Cogswell
ba3548b317 Java: switch to createRelative sink and add UrlPathHelper sources 2023-11-29 14:46:28 -05:00
Jami Cogswell
efa5ab18c1 Java: add taint steps for getResource sink 2023-11-29 14:46:27 -05:00
Benjamin Rodes
4919c4a424 Added StringConcatenation.qll 2023-11-29 13:00:57 -05:00
Ian Lynagh
429c550151 Kotlin 2: Accept some location changes 2023-11-28 15:57:48 +00:00
Mathias Vorreiter Pedersen
911f1543e0 DataFlow: Adjust QLDoc. 2023-11-28 15:26:48 +00:00
Mathias Vorreiter Pedersen
339bf1363a DataFlow: s/flowThroughStepAllowed/validParameterAliasStep. 2023-11-28 14:32:23 +00:00
Mathias Vorreiter Pedersen
e47ad274ea C++: Add Schack's tests. 2023-11-28 14:32:21 +00:00
Mathias Vorreiter Pedersen
fb6329fbc1 C++: Fix test annotation 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
1771d77c23 C++: Accept test changes. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
9049932f42 C++: Implement the new predicate. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
064f68fdca DataFlow: Add a predicate for modifying which dataflow steps participate in flow-through summaries. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
1753a7e146 C++: Add tests. 2023-11-28 14:27:15 +00:00
Owen Mansel-Chan
de87dd5dee Test no result if deferred function returns error 2023-11-28 14:23:37 +00:00
Owen Mansel-Chan
57dafd3732 Improve test for UnhandledCloseWritableHandle
Now the different paths won't have the same two sources.
2023-11-28 14:21:43 +00:00
Alex Eyers-Taylor
3e9aeac004 CPP: Fix sscanf false positives in older linux repos 2023-11-28 12:07:05 +00:00
Geoffrey White
68a9154106 Swift: Merge the two PrintfFormat implementations. 2023-11-28 12:03:05 +00:00
Geoffrey White
5f4213004b Merge branch 'main' into logsinks 2023-11-28 11:51:56 +00:00
Eric Bickle
aab7ff919e Java: Improve Gson parse, get, and stream models 2023-11-27 12:26:28 -08:00
Geoffrey White
09998a9f35 Swift: Formatting. 2023-11-27 19:53:32 +00:00
Geoffrey White
f1f5745ed1 Swift: Change note. 2023-11-27 19:43:15 +00:00
Geoffrey White
f19c6f337d Swift: Add imprecise append/insert models. 2023-11-27 19:43:15 +00:00
Geoffrey White
6e5c285346 Swift: Add imprecise init(data:) model. 2023-11-27 19:23:40 +00:00
Geoffrey White
99aa754b50 Swift: Add tests for UIImage. 2023-11-27 19:19:12 +00:00
Geoffrey White
da648b1014 Swift: Convert ui.swift test to use source labels. 2023-11-27 19:06:52 +00:00
Geoffrey White
4b87dd54fb Swift: Add tests for custom append/insert. 2023-11-27 19:02:45 +00:00
Alex Eyers-Taylor
9eb5b23f54 CPP: Fix query formatting 2023-11-27 15:55:44 +00:00
Harry Maclean
bd575db254 Ruby: Add test for FrameworkModeEndpoints query 2023-11-27 14:18:18 +00:00
Harry Maclean
f40f2db3ab Ruby: Fix name of url-redirection sink model 2023-11-27 11:25:37 +00:00
Harry Maclean
6a38223127 Ruby: QL4QL fix 2023-11-27 10:17:31 +00:00
Harry Maclean
e9277a56a9 Ruby: Add sinks from external models 2023-11-27 09:18:00 +00:00
Harry Maclean
ad608341ab Ruby: Handle alternative gemspec names
Gemspecs are sometimes named via the first argument to
`Gem::Specification.new`:

```rb
Gem::Specification.new 'sinatra' do |s|
  # ...
end
```
2023-11-27 09:18:00 +00:00
Harry Maclean
9b998a39b4 Ruby: Add tags to GenerateModel query
This allows the model editor to find this query in a more robust way
than by file path.
2023-11-27 09:18:00 +00:00
Harry Maclean
b9d15bacba Ruby: Don't classify our test files as test files
For model editing purposes.
2023-11-27 09:17:59 +00:00
Harry Maclean
064b10a5cb Ruby: Handle missing gemspec in model query 2023-11-27 09:17:59 +00:00
Harry Maclean
9dcc424f8c Ruby: Include keyword parameters endpoint query 2023-11-27 09:17:59 +00:00
Harry Maclean
5dcc3d43ca Ruby: Recognise modeled source/sink methods 2023-11-27 09:17:59 +00:00
Harry Maclean
766e68aa36 Ruby: Handle multiple gemspecs in endpoints query 2023-11-27 09:17:59 +00:00
Harry Maclean
c54743c3fd Ruby: Include class methods in model editor query 2023-11-27 09:17:59 +00:00
Harry Maclean
78125a701d Ruby: Model Editor support
Add experimental support for the CodeQL Model Editor.
2023-11-27 09:17:59 +00:00
amammad
ffe2e398c9 fix tests, add support for Response.BodyWriter() Thanks to @owen-mc 2023-11-25 15:36:37 +01:00
amammad
accc09fd8c Lists of strings should be in alphabetical order. In a QLDoc, there should be a full stop at the end of each sentence. shorter model summary. change target from getACall() to getACall().getResult(.). better tests 2023-11-25 13:36:06 +01:00
Geoffrey White
4c2a6231e9 Swift: Add tests for array append/insert. 2023-11-24 18:33:25 +00:00
Jeroen Ketema
c02a732632 C++: Remove DefaultTaintTracking library 2023-11-24 18:35:19 +01:00
Alex Eyers-Taylor
1c012548d4 CPP: Add tests for incorrect check scanf 2023-11-24 16:58:11 +00:00
Alex Eyers-Taylor
12e24a2b44 CPP: Exclude incorrect scanf checks from missing scanf checks 2023-11-24 16:57:59 +00:00
Alex Eyers-Taylor
f48e8b6062 CPP: Add query for detecteing incorrect error checking for scanf 2023-11-24 14:53:10 +00:00
Maiky
6739750d2a Add Unsafe Unpacking Query (CWE-022) 2023-11-23 12:48:33 +01:00
yoff
4785048076 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-11-22 09:29:07 +01:00
Owen Mansel-Chan
b147bacd48 Merge branch 'main' into amammad-go-fastHttp 2023-11-21 21:36:11 +00:00
Mathias Vorreiter Pedersen
a80dbc5200 C++: Accept test changes. 2023-11-21 17:50:11 +00:00
Mathias Vorreiter Pedersen
976adc3c7c C++: Fixup queries to keep the old results. 2023-11-21 17:50:08 +00:00
Mathias Vorreiter Pedersen
ef2caa3944 C++: Add a new API for mapping a dataflow node to a definition. This means we can reduce duplication from 'asExpr'. 2023-11-21 17:49:02 +00:00
amammad
2ad59a5403 fix SSRF sinks 2023-11-21 18:46:35 +01:00
Geoffrey White
c89be6a1de Swift: Refine the heuristic (mostly narrower). 2023-11-21 13:49:53 +00:00
Geoffrey White
5bbc61e83c Swift: Add a few more test cases. 2023-11-21 11:32:40 +00:00
Tom Hvitved
12359ba733 Add change note 2023-11-21 11:46:15 +01:00
Geoffrey White
57a1becd22 Swift: Add missing QLDoc. 2023-11-21 08:55:52 +00:00
Rasmus Lerchedahl Petersen
c8b87f71c5 Python: add change note 2023-11-20 21:44:16 +01:00
Rasmus Lerchedahl Petersen
421d4f3497 Python: filter more sinks in stdlib
Rename variable to reflect larger scope

We had test results inside `os.py`, I suppose we have found a little extra flow.
2023-11-20 21:35:52 +01:00
Rasmus Lerchedahl Petersen
11c71fdd18 Python: remove EssaNodes
This commit removes SSA nodes from the data flow graph. Specifically, for a definition and use such as
```python
  x = expr
  y = x + 2
```
we used to have flow from `expr` to an SSA variable representing x and from that SSA variable to the use of `x` in the definition of `y`. Now we instead have flow from `expr` to the control flow node for `x` at line 1 and from there to the control flow node for `x` at line 2.

Specific changes:
- `EssaNode` from the data flow layer no longer exists.
- Several glue steps between `EssaNode`s and `CfgNode`s have been deleted.
- Entry nodes are now admitted as `CfgNodes` in the data flow layer (they were filtered out before).
- Entry nodes now have a new `toString` taking into account that the module name may be ambigous.
- Some tests have been rewritten to accomodate the changes, but only `python/ql/test/experimental/dataflow/basic/maximalFlowsConfig.qll` should have semantic changes.
- Comments have been updated
- Test output has been updated, but apart from `python/ql/test/experimental/dataflow/basic/maximalFlows.expected` only `python/ql/test/experimental/dataflow/typetracking-summaries/summaries.py` should have a semantic change. This is a bonus fix, probably meaning that something was never connected up correctly.
2023-11-20 21:35:32 +01:00
Geoffrey White
b4b78a1bce Swift: Minor corrections. 2023-11-20 19:29:35 +00:00
Geoffrey White
50120f65a3 Swift: Change note. 2023-11-20 18:43:48 +00:00
Geoffrey White
3cecf69818 Swift: Fix spurious results for 'login' functions. 2023-11-20 18:38:47 +00:00
Geoffrey White
aa93165d24 Swift: Add heuristic sinks. 2023-11-20 18:38:47 +00:00
Geoffrey White
d91c5c0486 Swift: Model NSException sinks. 2023-11-20 18:38:46 +00:00
Geoffrey White
7e02c05164 Swift: Address the sprintf case. 2023-11-20 18:38:46 +00:00
Geoffrey White
835967a33e Swift: Fix for autoclosure sinks. 2023-11-20 18:15:16 +00:00
Geoffrey White
795f16ba56 Swift: Model 'printf' variants as cleartext logging sinks. 2023-11-20 18:15:06 +00:00
Geoffrey White
06c2c423b3 Swift: Clean up the test logic slightly. 2023-11-20 18:12:15 +00:00
Geoffrey White
b348dc2a32 Swift: Extend cleartext logging tests (test cases). 2023-11-20 18:11:52 +00:00
Geoffrey White
2a69b03092 Swift: Extend cleartext logging tests (stubs). 2023-11-20 18:11:41 +00:00
Tom Hvitved
6ce8e0510f Ruby: Adopt shared type tracking library 2023-11-20 16:03:24 +01:00
masterofnow
2952d8f65a Updated query to cover broader detection. 2023-11-18 18:52:47 +08:00
masterofnow
7d774f1a51 Merge branch 'main' into LoadClassNoSignatureCheck 2023-11-14 09:22:30 +08:00
masterofnow
532f6a5b0c Removed @kind path-problem in comment. Added text message in select. 2023-11-13 08:27:07 +08:00
masterofnow
20592352d0 Updated text in LoadClassNoSignatureCheck.qhelp 2023-11-12 20:48:49 +08:00
masterofnow
fd66f47d82 Added LoadClassNoSignatureCheck.ql 2023-11-12 20:27:49 +08:00
amammad
c361caf0b0 fix tests for FileSystemAccess, add comments for adding some functions in future, remove old comments 2023-11-08 14:15:26 +01:00
amammad
f58462bee9 fix tests 2023-11-07 06:32:15 +01:00
Jorge
b08d57a85f Add {{! to TEMPLATE_EXPR_OPENING_TAG 2023-11-06 20:40:00 +00:00
Geoffrey White
b926090f0d Swift: Simplify AdoptsWkNavigationDelegate in WebView.qll. 2023-11-06 12:29:32 +00:00
amammad
0d670f81fb fix type assertion errors and create more source()s for better tests 2023-11-06 10:39:30 +01:00
amammad
ea40081204 Merge branch 'amammad-go-fastHttp' of https://github.com/amammad/codeql into amammad-go-fastHttp 2023-11-06 10:38:18 +01:00
amammad
2624f365c3 update inline flow tests of AddittionalTaintSteps 2023-11-05 17:49:32 +03:30
amammad
88e75a6ec8 add flow summary instead of additional flow steps 2023-11-05 17:49:32 +03:30
amammad
23f7f9a24a fix some grammer mistakes, an unnecessary import, put blank like after go generate 2023-11-05 17:49:32 +03:30
amammad
2f86c2588b fix autoformatting 2023-11-05 17:49:32 +03:30
amammad
56bcbf3a41 add additional taint steps to SSRF query 2023-11-05 17:49:32 +03:30
amammad
e38cb0f36e fix a issue in fasthttp library, add SSRF inline queires 2023-11-05 17:49:32 +03:30
amammad
7bc07d959b add additional taint steps inline tests 2023-11-05 17:49:32 +03:30
amammad
3bc24c3534 add inline tests for open redirect,xss, fix some issues in fasthttp.qll 2023-11-05 17:49:32 +03:30
amammad
29219922ac add inline tests for UntrustedFlowSource, and fix some not necessarily flow sources 2023-11-05 17:49:32 +03:30
amammad
defe964f3a update tests 2023-11-05 17:49:32 +03:30
amammad
5232d28617 fix a mistake: replaces tests after gofmt 2023-11-05 17:49:32 +03:30
amammad
c6acb1012c perfomed gofmt on fasthttp.go 2023-11-05 17:49:32 +03:30
amammad
1ff1c5cfe0 fix two bugs, make package path more neat 2023-11-05 17:49:32 +03:30
amammad
345fdf12e5 added the go generate commands for depstubber 2023-11-05 17:49:32 +03:30
amammad
2048d8945b fix qldoc and tests 2023-11-05 17:49:32 +03:30
amammad
8aba71f678 upgrade tests 2023-11-05 17:49:32 +03:30
amammad
1c657a62c1 fix stub 2023-11-05 17:49:32 +03:30
amammad
de391ffa4d fix qlDOC one missed mistake 2023-11-05 17:49:32 +03:30
amammad
b7ef215504 fix change notes 2023-11-05 17:49:32 +03:30
amammad
693539a604 fix qhelps 2023-11-05 17:49:32 +03:30
amammad
2ac906395f fix tests 2023-11-05 17:49:32 +03:30
amammad
1fc7758dfb add change note 2023-11-05 17:49:32 +03:30
amammad
80e5fb81bc fix library-tests 2023-11-05 17:49:32 +03:30
amammad
2ee2ac383d fix some mistakes:( 2023-11-05 17:49:32 +03:30
amammad
377d1f55be add proper test cases 2023-11-05 17:49:32 +03:30
amammad
543684904f fix go.mod 2023-11-05 17:49:32 +03:30
amammad
c25bb3cde0 remove tmp test 2023-11-05 17:49:32 +03:30
amammad
3226184547 add tests 2023-11-05 17:49:32 +03:30
amammad
cddd27c5f8 V1 2023-11-05 17:49:32 +03:30
amammad
d1926f9061 update inline flow tests of AddittionalTaintSteps 2023-11-05 15:17:06 +01:00
amammad
9f8871746b add flow summary instead of additional flow steps 2023-11-02 20:12:50 +01:00
amammad
fc3b90915b fix some grammer mistakes, an unnecessary import, put blank like after go generate 2023-11-02 17:29:11 +01:00
Tony Torralba
107a05af71 Update MaD Declarations after Triage 2023-10-31 16:52:02 +01:00
Tony Torralba
9f7a8aa18c Update MaD Declarations after Triage 2023-10-24 17:42:03 +02:00
Maiky
d8aa0e2d7e Remove unnecessary import 2023-10-21 17:29:08 +02:00
Maiky
35d390ad06 Add Insecure Randomness Query (CWE-338) 2023-10-21 17:23:41 +02:00
Peter Stöckli
09cf76a880 Ruby: additional unsafe deserialization sinks for ox, oj 2023-10-19 14:04:48 +02:00
amammad
9d4a16750c fix autoformatting 2023-10-17 01:02:16 +02:00
amammad
b3be2a4929 add additional taint steps to SSRF query 2023-10-17 01:00:25 +02:00
amammad
cc1b8b2e02 fix a issue in fasthttp library, add SSRF inline queires 2023-10-12 09:55:14 +02:00
amammad
b5c4b5e482 add additional taint steps inline tests 2023-10-12 09:45:25 +02:00
amammad
acee50c9df add inline tests for open redirect,xss, fix some issues in fasthttp.qll 2023-10-12 09:10:16 +02:00
amammad
720565f442 add inline tests for UntrustedFlowSource, and fix some not necessarily flow sources 2023-10-12 08:32:33 +02:00
amammad
3926fd7333 update tests 2023-10-11 19:27:57 +02:00
amammad
4283bb7d48 clean up unused vars,fix tests 2023-10-09 23:15:58 +02:00
amammad
9d86e7946c move library file to experimental lib directory 2023-10-09 23:10:30 +02:00
amammad
1318afdb27 modularize 2023-10-09 23:07:52 +02:00
amammad
3175db226e upgrade fastAPI remote sources 2023-10-09 20:51:19 +02:00
Marcono1234
b8f6877aba Merge branch 'main' into patch-1 2023-10-07 03:46:12 +02:00
Ian Lynagh
d34b85cf03 Kotlin: Remove 1.4 compatibility
We now only build with >= 1.5
2023-10-06 15:17:32 +01:00
amammad
8ef969fcb9 fix a mistake: replaces tests after gofmt 2023-09-30 22:16:59 +10:00
amammad
e3c89011a9 perfomed gofmt on fasthttp.go 2023-09-29 00:57:17 +10:00
amammad
f2505eada8 fix two bugs, make package path more neat 2023-09-27 23:35:56 +10:00
amammad
32f41de3be Merge branch 'main' into amammad-go-fastHttp 2023-09-27 23:33:51 +10:00
amammad
bb30689a6e added the go generate commands for depstubber 2023-09-27 06:41:09 +10:00
amammad
ad999a0174 fix qldoc and tests 2023-09-27 04:21:49 +10:00
amammad
c3213e4de3 upgrade tests 2023-09-26 00:02:45 +10:00
amammad
c1398f2b60 fix stub 2023-09-25 21:48:10 +10:00
amammad
875817222c fix qlDOC one missed mistake 2023-09-25 21:20:33 +10:00
amammad
69c2d9ed5c fix change notes 2023-09-19 22:24:52 +10:00
amammad
3585459548 fix qhelps 2023-09-19 06:17:31 +10:00
amammad
a6996c5d21 fix tests 2023-09-19 03:48:31 +10:00
amammad
c195a9f05d Merge branch 'main' into amammad-go-fastHttp 2023-09-19 03:07:27 +10:00
amammad
6f5aa58d82 add change note 2023-09-18 23:38:32 +10:00
amammad
09aee3081e fix library-tests 2023-09-18 23:29:45 +10:00
amammad
0d3b944207 fix some mistakes:( 2023-09-14 23:39:28 +10:00
amammad
6ee5865789 add sources to detect CVE completely 2023-09-07 18:27:40 +10:00
amammad
bcfc28aae0 add sources to detect CVE completely 2023-09-07 02:02:32 +10:00
amammad
b5a257ca7c add proper test cases 2023-09-03 04:09:56 +10:00
amammad
8f11543e9d fix go.mod 2023-09-02 22:47:35 +10:00
amammad
9b8f43bf63 remove tmp test 2023-09-02 22:41:39 +10:00
amammad
6af82526dc add tests 2023-09-02 22:40:18 +10:00
amammad
a8a9edcacd V1 2023-09-02 22:27:08 +10:00
Asger F
213cabccc0 JS: Test with file more extensions 2023-08-04 14:24:51 +02:00
Asger F
ea2ddf8905 JS: Do not parse the initial ! or = as part of the template expression 2023-08-04 14:24:38 +02:00
Kevin Stubbings
a36a555b7a Quick change 2023-08-04 00:59:28 -07:00
Kevin Stubbings
9f4389cbb5 Search for html.dot extension instead of dot 2023-08-04 00:55:51 -07:00
Geoffrey White
06c19fd8cf Swift: Add CommonCrypto test cases for the broken crypto query. 2023-08-02 18:36:05 +01:00
Marcono1234
09fa2a7d50 Move imports to usage sections 2023-07-15 16:59:46 +02:00
Marcono1234
94e9848d61 Mention needed imports at top of "Analyzing data flow in Java"
Currently the guide just starts using the classes from these libraries
without having mentioned that you have to import the libraries first.
2023-07-08 18:56:37 +02:00
jorgectf
f1f3d8e18a Add dot.jssupport
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-06-29 19:17:37 +02:00
amammad
7aa002fa2a fix an accident :) 2023-06-29 22:20:46 +10:00
amammad
8fccd65d34 fix a mistake :( 2023-06-26 16:51:14 +10:00
amammad
b506b7d298 better documents, remove separate PyZipFile 2023-06-26 16:50:33 +10:00
amammad
a38405e490 fix formatting error/warnings 2023-06-26 16:43:18 +10:00
amammad
748e96d852 V1 Bombs 2023-06-22 19:28:27 +10:00
4292 changed files with 491045 additions and 174942 deletions

View File

@@ -1,4 +1,12 @@
common --enable_platform_specific_config
common --enable_bzlmod
# because we use --override_module with `%workspace%`, the lock file is not stable
common --lockfile_mode=off
# when building from this repository in isolation, the internal repository will not be found at ..
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
# that we can build things that do not rely on that
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
build --repo_env=CC=clang --repo_env=CXX=clang++

View File

@@ -1 +1 @@
6.3.1
7.0.2

1
.clang-format Normal file
View File

@@ -0,0 +1 @@
DisableFormat: true

7
.gitattributes vendored
View File

@@ -71,3 +71,10 @@ go/extractor/opencsv/CSVReader.java -text
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
# Auto-generated modeling for Python
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true
# auto-generated bazel lock file
ruby/extractor/cargo-bazel-lock.json linguist-generated=true
ruby/extractor/cargo-bazel-lock.json -merge

2
.github/labeler.yml vendored
View File

@@ -20,7 +20,7 @@ JS:
Kotlin:
- java/kotlin-extractor/**/*
- java/ql/test/kotlin/**/*
- java/ql/test-kotlin*/**/*
Python:
- python/**/*

View File

@@ -1,5 +1,8 @@
name: Check change note
permissions:
pull-requests: read
on:
pull_request_target:
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]

View File

@@ -9,6 +9,9 @@ on:
- main
- "rc/*"
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest

View File

@@ -10,6 +10,9 @@ on:
- main
- "rc/*"
permissions:
contents: read
jobs:
qldoc:
runs-on: ubuntu-latest

View File

@@ -11,6 +11,9 @@ on:
- "rc/*"
workflow_dispatch:
permissions:
contents: read
jobs:
check:
name: Check query IDs

View File

@@ -5,6 +5,9 @@ on:
schedule:
- cron: "30 1 * * *"
permissions:
issues: write
jobs:
stale:
if: github.repository == 'github/codeql'
@@ -12,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

View File

@@ -28,9 +28,9 @@ jobs:
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.102
dotnet-version: 8.0.101
- name: Checkout repository
uses: actions/checkout@v4

View File

@@ -8,8 +8,12 @@ on:
- "codeql-cli-*"
pull_request:
permissions:
contents: read
jobs:
compile-queries:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
steps:
@@ -24,7 +28,7 @@ jobs:
with:
key: all-queries
- name: check formatting
run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
- name: compile queries - check-only
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}

View File

@@ -25,6 +25,9 @@ defaults:
run:
working-directory: csharp
permissions:
contents: read
jobs:
qlupgrade:
runs-on: ubuntu-latest
@@ -46,6 +49,7 @@ jobs:
xargs codeql execute upgrades testdb
diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme
qltest:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
strategy:
fail-fast: false
@@ -72,15 +76,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.102
dotnet-version: 8.0.101
- name: Extractor unit tests
run: |
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
shell: bash
stubgentest:
runs-on: ubuntu-latest

View File

@@ -14,6 +14,10 @@ on:
- ".github/workflows/csv-coverage-metrics.yml"
- ".github/actions/fetch-codeql/action.yml"
permissions:
contents: read
security-events: write
jobs:
publish-java:
runs-on: ubuntu-latest

View File

@@ -19,6 +19,10 @@ on:
- main
- "rc/*"
permissions:
contents: read
pull-requests: read
jobs:
generate:
name: Generate framework coverage artifacts

View File

@@ -6,6 +6,10 @@ on:
types:
- completed
permissions:
contents: read
pull-requests: write
jobs:
check:
name: Check framework coverage differences and comment

View File

@@ -3,6 +3,9 @@ name: Build framework coverage timeseries reports
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

View File

@@ -5,6 +5,10 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
pull-requests: write
jobs:
update:
name: Update framework coverage report

View File

@@ -7,6 +7,9 @@ on:
description: "github/codeql repo SHA used for looking up the CSV models"
required: false
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

View File

@@ -7,13 +7,14 @@ name: Fast-forward tracking branch for selected CodeQL version
on:
workflow_dispatch:
permissions:
contents: write
jobs:
fast-forward:
name: Fast-forward tracking branch for selected CodeQL version
runs-on: ubuntu-latest
if: github.repository == 'github/codeql'
permissions:
contents: write
env:
BRANCH_NAME: 'lgtm.com'
steps:

View File

@@ -8,16 +8,21 @@ on:
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
GO_VERSION: '~1.22.0'
permissions:
contents: read
jobs:
test-mac:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
id: go
- name: Check out code
@@ -46,13 +51,15 @@ jobs:
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
test-win:
if: github.repository_owner == 'github'
name: Test Windows
runs-on: windows-latest-xl
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
id: go
- name: Check out code

View File

@@ -15,17 +15,24 @@ on:
- .github/workflows/go-tests.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
GO_VERSION: '~1.22.0'
permissions:
contents: read
jobs:
test-linux:
if: github.repository_owner == 'github'
name: Test Linux (Ubuntu)
runs-on: ubuntu-latest-xl
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
id: go
- name: Check out code

View File

@@ -2,11 +2,12 @@ name: "Pull Request Labeler"
on:
- pull_request_target
permissions:
contents: read
pull-requests: write
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4

View File

@@ -12,6 +12,7 @@ on:
- main
paths:
- "java/ql/src/utils/modelgenerator/**/*.*"
- "misc/scripts/models-as-data/*.*"
- ".github/workflows/mad_modelDiff.yml"
permissions:
@@ -61,8 +62,9 @@ jobs:
DATABASE=$2
cd codeql-$QL_VARIANT
SHORTNAME=`basename $DATABASE`
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml
mv java/ql/lib/ext/generated/${SHORTNAME}.temp.model.yml $MODELS/${SHORTNAME}Generated_${QL_VARIANT}.model.yml
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
mkdir -p $MODELS/$SHORTNAME
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
cd ..
}
@@ -85,16 +87,16 @@ jobs:
set -x
MODELS=`pwd`/tmp-models
ls -1 tmp-models/
for m in $MODELS/*_main.model.yml ; do
for m in $MODELS/*/main/*.model.yml ; do
t="${m/main/"pr"}"
basename=`basename $m`
name="diff_${basename/_main.model.yml/""}"
name="diff_${basename/.model.yml/""}"
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
done
- uses: actions/upload-artifact@v3
with:
name: models
path: tmp-models/*.model.yml
path: tmp-models/**/**/*.model.yml
retention-days: 20
- uses: actions/upload-artifact@v3
with:

View File

@@ -11,6 +11,9 @@ on:
- ".github/workflows/mad_regenerate-models.yml"
- ".github/actions/fetch-codeql/action.yml"
permissions:
contents: read
jobs:
regenerate-models:
runs-on: ubuntu-latest

View File

@@ -77,7 +77,7 @@ jobs:
done < "${RUNNER_TEMP}/paths.txt" >> comment_body.txt
exit "${EXIT_CODE}"
- if: always()
- if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: comment

View File

@@ -9,8 +9,13 @@ on:
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
security-events: write
jobs:
analyze:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
steps:
### Build the queries ###
@@ -19,7 +24,7 @@ jobs:
fetch-depth: 0
- name: Find codeql
id: find-codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@main
with:
languages: javascript # does not matter
- uses: ./.github/actions/os-version
@@ -65,7 +70,7 @@ jobs:
exclude:*/ql/lib/upgrades/
exclude:java/ql/integration-tests
- name: Upload sarif to code-scanning
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: ql-for-ql.sarif
category: ql-for-ql

View File

@@ -11,6 +11,10 @@ on:
- ql/ql/src/ql.dbscheme
workflow_dispatch:
permissions:
contents: read
security-events: read
jobs:
measure:
env:
@@ -25,7 +29,7 @@ jobs:
- name: Find codeql
id: find-codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@main
with:
languages: javascript # does not matter
- uses: ./.github/actions/os-version

View File

@@ -17,6 +17,9 @@ on:
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
qltest:
runs-on: ubuntu-latest
@@ -24,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- name: Find codeql
id: find-codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@main
with:
languages: javascript # does not matter
- uses: ./.github/actions/os-version
@@ -69,7 +72,7 @@ jobs:
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: Find codeql
id: find-codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@main
with:
languages: javascript # does not matter
- uses: ./.github/actions/os-version

View File

@@ -13,6 +13,9 @@ on:
- '.github/actions/fetch-codeql/action.yml'
- 'misc/scripts/generate-code-scanning-query-list.py'
permissions:
contents: read
jobs:
build:

View File

@@ -32,6 +32,9 @@ defaults:
run:
working-directory: ruby
permissions:
contents: read
jobs:
build:
strategy:
@@ -48,9 +51,11 @@ jobs:
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: Install cargo-cross
if: runner.os == 'Linux'
run: cargo install cross --version 0.2.5
- name: Prepare Windows
if: runner.os == 'Windows'
shell: powershell
run: |
git config --global core.longpaths true
- uses: ./.github/actions/os-version
id: os_version
- name: Cache entire extractor
@@ -79,16 +84,8 @@ jobs:
- name: Run tests
if: steps.cache-extractor.outputs.cache-hit != 'true'
run: cd extractor && cargo test --verbose
# On linux, build the extractor via cross in a centos7 container.
# This ensures we don't depend on glibc > 2.17.
- name: Release build (linux)
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: |
cd extractor
cross build --release
mv target/x86_64-unknown-linux-gnu/release/codeql-extractor-ruby target/release/
- name: Release build (windows and macos)
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
- name: Release build
if: steps.cache-extractor.outputs.cache-hit != 'true'
run: cd extractor && cargo build --release
- name: Generate dbscheme
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
@@ -111,6 +108,7 @@ jobs:
ruby/extractor/target/release/codeql-extractor-ruby.exe
retention-days: 1
compile-queries:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v4
@@ -119,7 +117,7 @@ jobs:
- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
with:
key: ruby-build
- name: Build Query Pack
run: |
@@ -231,54 +229,3 @@ jobs:
shell: bash
run: |
codeql database analyze --search-path "${{ runner.temp }}/ruby-bundle" --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls
# This is a copy of the 'test' job that runs in a centos7 container.
# This tests that the extractor works correctly on systems with an old glibc.
test-centos7:
defaults:
run:
working-directory: ${{ github.workspace }}
strategy:
fail-fast: false
runs-on: ubuntu-latest
container:
image: centos:centos7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs: [package]
steps:
- name: Install gh cli
run: |
yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
# fetch-codeql requires unzip and jq
# jq is available in epel-release (https://docs.fedoraproject.org/en-US/epel/)
yum install -y gh unzip epel-release
yum install -y jq
- uses: actions/checkout@v3
- name: Fetch CodeQL
uses: ./.github/actions/fetch-codeql
# Due to a bug in Actions, we can't use runner.temp in the run blocks here.
# https://github.com/actions/runner/issues/2185
- name: Download Ruby bundle
uses: actions/download-artifact@v3
with:
name: codeql-ruby-bundle
path: ${{ runner.temp }}
- name: Unzip Ruby bundle
shell: bash
run: unzip -q -d "$RUNNER_TEMP"/ruby-bundle "$RUNNER_TEMP"/codeql-ruby-bundle.zip
- name: Run QL test
shell: bash
run: |
codeql test run --search-path "$RUNNER_TEMP"/ruby-bundle --additional-packs "$RUNNER_TEMP"/ruby-bundle ruby/ql/test/library-tests/ast/constants/
- name: Create database
shell: bash
run: |
codeql database create --search-path "$RUNNER_TEMP"/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
- name: Analyze database
shell: bash
run: |
codeql database analyze --search-path "$RUNNER_TEMP"/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls

View File

@@ -17,6 +17,9 @@ on:
- .github/workflows/ruby-dataset-measure.yml
workflow_dispatch:
permissions:
contents: read
jobs:
measure:
env:

View File

@@ -29,6 +29,9 @@ defaults:
run:
working-directory: ruby
permissions:
contents: read
jobs:
qlupgrade:
runs-on: ubuntu-latest
@@ -50,6 +53,7 @@ jobs:
xargs codeql execute upgrades testdb
diff -q testdb/ruby.dbscheme downgrades/initial/ruby.dbscheme
qltest:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
strategy:
fail-fast: false

View File

@@ -33,46 +33,62 @@ on:
- rc/*
- codeql-cli-*
permissions:
contents: read
jobs:
# not using a matrix as you cannot depend on a specific job in a matrix, and we want to start linux checks
# without waiting for the macOS build
build-and-test-macos:
if: github.repository_owner == 'github'
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/build-and-test
build-and-test-linux:
if: github.repository_owner == 'github'
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/build-and-test
qltests-linux:
if: github.repository_owner == 'github'
needs: build-and-test-linux
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/run-ql-tests
qltests-macos:
if : ${{ github.event_name == 'pull_request' }}
if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }}
needs: build-and-test-macos
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/run-ql-tests
integration-tests-linux:
if: github.repository_owner == 'github'
needs: build-and-test-linux
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/run-integration-tests
integration-tests-macos:
if : ${{ github.event_name == 'pull_request' }}
if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }}
needs: build-and-test-macos
runs-on: macos-12-xl
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: ./swift/actions/run-integration-tests
clang-format:
if : ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that python code is properly formatted
with:
extra_args: clang-format --all-files
codegen:
if : ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
@@ -82,12 +98,12 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version-file: 'swift/.python-version'
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that python code is properly formatted
with:
extra_args: autopep8 --all-files
- uses: ./.github/actions/fetch-codeql
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that QL generated code was checked in
with:
extra_args: swift-codegen --all-files

View File

@@ -10,6 +10,9 @@ on:
- main
- 'rc/*'
permissions:
contents: read
jobs:
sync:
runs-on: ubuntu-latest

View File

@@ -23,6 +23,9 @@ defaults:
run:
working-directory: shared/tree-sitter-extractor
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest

View File

@@ -15,6 +15,9 @@ on:
- ".github/workflows/validate-change-notes.yml"
- ".github/actions/fetch-codeql/action.yml"
permissions:
contents: read
jobs:
check-change-note:
runs-on: ubuntu-latest

3
.gitignore vendored
View File

@@ -39,6 +39,9 @@
# local bazel options
/local.bazelrc
# generated cmake directory
/.bazel-cmake
# CLion project files
/.clwb

View File

@@ -10,10 +10,9 @@ repos:
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.1
rev: v17.0.6
hooks:
- id: clang-format
files: ^swift/.*\.(h|c|cpp)$
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.6.0

View File

@@ -25,6 +25,7 @@
# Bazel (excluding BUILD.bazel files)
WORKSPACE.bazel @github/codeql-ci-reviewers
MODULE.bazel @github/codeql-ci-reviewers
.bazelversion @github/codeql-ci-reviewers
.bazelrc @github/codeql-ci-reviewers
**/*.bzl @github/codeql-ci-reviewers
@@ -44,3 +45,4 @@ WORKSPACE.bazel @github/codeql-ci-reviewers
# Misc
/misc/scripts/accept-expected-changes-from-ci.py @RasmusWL
/misc/scripts/generate-code-scanning-query-list.py @RasmusWL

53
MODULE.bazel Normal file
View File

@@ -0,0 +1,53 @@
module(
name = "codeql",
version = "0.0",
)
# this points to our internal repository when `codeql` is checked out as a submodule thereof
# when building things from `codeql` independently this is stubbed out in `.bazelrc`
bazel_dep(name = "semmle_code", version = "0.0")
local_path_override(
module_name = "semmle_code",
path = "..",
)
# see https://registry.bazel.build/ for a list of available packages
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "rules_nodejs", version = "6.0.3")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
bazel_dep(name = "fmt", version = "10.0.0")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "codegen_deps",
python_version = "3.11",
requirements_lock = "//misc/codegen:requirements_lock.txt",
)
use_repo(pip, "codegen_deps")
swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps")
use_repo(
swift_deps,
"binlog",
"picosha2",
"swift_prebuilt_darwin_x86_64",
"swift_prebuilt_linux",
"swift_toolchain_linux",
"swift_toolchain_macos",
)
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(
name = "nodejs",
node_version = "18.15.0",
)
use_repo(node, "nodejs", "nodejs_toolchains")
register_toolchains(
"@nodejs_toolchains//:all",
)

View File

@@ -1,12 +1,2 @@
# Please notice that any bazel targets and definitions in this repository are currently experimental
# and for internal use only.
workspace(name = "codeql")
load("//misc/bazel:workspace.bzl", "codeql_workspace")
codeql_workspace()
load("//misc/bazel:workspace_deps.bzl", "codeql_workspace_deps")
codeql_workspace_deps()
# please use MODULE.bazel to add dependencies
# this empty file is required by internal repositories, don't remove it

View File

@@ -53,14 +53,6 @@
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
],
"DataFlow Java/C#/Go/Ruby/Python/Swift Flow Summaries": [
"java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll",
"go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll"
],
"SsaReadPosition Java/C#": [
"java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll"
@@ -439,13 +431,6 @@
"java/ql/src/experimental/Security/CWE/CWE-400/LocalThreadResourceAbuse.qhelp",
"java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.qhelp"
],
"IDE Contextual Queries": [
"cpp/ql/lib/IDEContextual.qll",
"csharp/ql/lib/IDEContextual.qll",
"java/ql/lib/IDEContextual.qll",
"javascript/ql/lib/IDEContextual.qll",
"python/ql/lib/analysis/IDEContextual.qll"
],
"CryptoAlgorithms Python/JS/Ruby": [
"javascript/ql/lib/semmle/javascript/security/CryptoAlgorithms.qll",
"python/ql/lib/semmle/python/concepts/CryptoAlgorithms.qll",
@@ -462,23 +447,6 @@
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll"
],
"TypeTracker": [
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
],
"SummaryTypeTracker": [
"python/ql/lib/semmle/python/dataflow/new/internal/SummaryTypeTracker.qll",
"ruby/ql/lib/codeql/ruby/typetracking/internal/SummaryTypeTracker.qll"
],
"AccessPathSyntax": [
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/AccessPathSyntax.qll",
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/AccessPathSyntax.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/AccessPathSyntax.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/AccessPathSyntax.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/AccessPathSyntax.qll"
],
"IncompleteUrlSubstringSanitization": [
"javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.qll",
"ruby/ql/src/queries/security/cwe-020/IncompleteUrlSubstringSanitization.qll"
@@ -498,10 +466,6 @@
"ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModelsExtensions.qll",
"python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsExtensions.qll"
],
"Typo database": [
"javascript/ql/src/Expressions/TypoDatabase.qll",
"ql/ql/src/codeql_ql/style/TypoDatabase.qll"
],
"Swift declarations test file": [
"swift/ql/test/extractor-tests/declarations/declarations.swift",
"swift/ql/test/library-tests/ast/declarations.swift"
@@ -534,4 +498,4 @@
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
]
}
}

View File

@@ -326,7 +326,7 @@ namespace Semmle.Autobuild.Cpp.Tests
public void TestCppAutobuilderSuccess()
{
Actions.RunProcess[@"cmd.exe /C nuget restore C:\Project\test.sln -DisableParallelProcessing"] = 1;
Actions.RunProcess[@"cmd.exe /C C:\Project\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
Actions.RunProcess[@"cmd.exe /C scratch\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio^ 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"""] = 0;
Actions.RunProcessOut[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = "";
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = 1;
@@ -337,10 +337,11 @@ namespace Semmle.Autobuild.Cpp.Tests
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"] = true;
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"] = true;
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"] = true;
Actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CPP_SCRATCH_DIR"] = "scratch";
Actions.EnumerateFiles[@"C:\Project"] = "foo.cs\ntest.slx";
Actions.EnumerateDirectories[@"C:\Project"] = "";
Actions.CreateDirectories.Add(@"C:\Project\.nuget");
Actions.DownloadFiles.Add(("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", @"C:\Project\.nuget\nuget.exe"));
Actions.CreateDirectories.Add(@"scratch\.nuget");
Actions.DownloadFiles.Add(("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", @"scratch\.nuget\nuget.exe"));
var autobuilder = CreateAutoBuilder(true);
var solution = new TestSolution(@"C:\Project\test.sln");

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
@@ -11,12 +11,12 @@
<ItemGroup>
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,7 @@
using System;
using Semmle.Autobuild.Shared;
using Semmle.Util;
namespace Semmle.Autobuild.Cpp
{

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Semmle.Autobuild.Cpp</AssemblyName>
<RootNamespace>Semmle.Autobuild.Cpp</RootNamespace>
<ApplicationIcon />
@@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
<PackageReference Include="Microsoft.Build" Version="17.8.3" />
</ItemGroup>
<ItemGroup>

View File

@@ -0,0 +1,19 @@
class Element extends @element {
string toString() { none() }
}
class Expr extends @expr {
string toString() { none() }
}
class Stmt extends @stmt {
string toString() { none() }
}
predicate isStmtWithInitializer(Stmt stmt) { exists(int kind | stmts(stmt, kind, _) | kind = 29) }
from Expr child, int index, int index_new, Element parent
where
exprparents(child, index, parent) and
if isStmtWithInitializer(parent) then index_new = index - 1 else index_new = index
select child, index_new, parent

View File

@@ -0,0 +1,9 @@
class Stmt extends @stmt {
string toString() { none() }
}
from Stmt f, Stmt i
where
for_initialization(f, i) and
f instanceof @stmt_for
select f, i

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
class Element extends @element {
string toString() { none() }
}
class Stmt extends @stmt {
string toString() { none() }
}
predicate isStmtWithInitializer(Stmt stmt) { exists(int kind | stmts(stmt, kind, _) | kind = 29) }
from Stmt child, int index, int index_new, Element parent
where
stmtparents(child, index, parent) and
(
not isStmtWithInitializer(parent)
or
index > 0
) and
if isStmtWithInitializer(parent) then index_new = index - 1 else index_new = index
select child, index_new, parent

View File

@@ -0,0 +1,5 @@
description: Support C++20 range-based for initializers
compatibility: partial
exprparents.rel: run exprparents.qlo
stmtparents.rel: run stmtparents.qlo
for_initialization.rel: run for_initialization.qlo

View File

@@ -0,0 +1,11 @@
class Declaration extends @declaration {
string toString() { none() }
}
class MangledName extends @mangledname {
string toString() { none() }
}
from Declaration d, MangledName n
where mangled_name(d, n, _)
select d, n

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Add completness information to mangled name table
compatibility: full
mangled_name.rel: run mangled_name.qlo

View File

@@ -0,0 +1,9 @@
class Function extends @function {
string toString() { none() }
}
from Function fun, string name, int kind, int kind_new
where
functions(fun, name, kind) and
if kind = 7 or kind = 8 then kind_new = 0 else kind_new = kind
select fun, name, kind_new

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Support more function types
compatibility: full
functions.rel: run functions.qlo

View File

@@ -1,5 +1,6 @@
description: Support C++17 if and switch initializers
compatibility: partial
constexpr_if_initialization.rel: delete
if_initialization.rel: delete
switch_initialization.rel: delete
exprparents.rel: run exprparents.qlo

View File

@@ -0,0 +1,17 @@
class AttributeArg extends @attribute_arg {
string toString() { none() }
}
class Attribute extends @attribute {
string toString() { none() }
}
class Location extends @location_default {
string toString() { none() }
}
from AttributeArg arg, int kind, int kind_new, Attribute attr, int index, Location location
where
attribute_args(arg, kind, attr, index, location) and
if arg instanceof @attribute_arg_expr then kind_new = 0 else kind_new = kind
select arg, kind_new, attr, index, location

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
description: Support expression attribute arguments
compatibility: partial
attribute_arg_expr.rel: delete
attribute_args.rel: run attribute_args.qlo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Revert removal of uniqueness constraint on link_targets/2
compatibility: backwards

View File

@@ -1,3 +1,58 @@
## 0.12.8
No user-facing changes.
## 0.12.7
### Minor Analysis Improvements
* Added destructors for named objects to the intermediate representation.
## 0.12.6
### New Features
* A `getInitialization` predicate was added to the `RangeBasedForStmt` class that yields the C++20-style initializer of the range-based `for` statement when it exists.
## 0.12.5
### New Features
* Added the `PreprocBlock.qll` library to this repository. This library offers a view of `#if`, `#elif`, `#else` and similar directives as a tree with navigable parent-child relationships.
* Added a new `ThrowingFunction` abstract class that can be used to model an external function that may throw an exception.
## 0.12.4
### Minor Analysis Improvements
* Deleted many deprecated predicates and classes with uppercase `XML`, `SSA`, `SAL`, `SQL`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `StrcatFunction` class, use `semmle.code.cpp.models.implementations.Strcat.qll` instead.
## 0.12.3
### Deprecated APIs
* The `isUserInput`, `userInputArgument`, and `userInputReturned` predicates from `SecurityOptions` have been deprecated. Use `FlowSource` instead.
### New Features
* `UserDefineLiteral` and `DeductionGuide` classes have been added, representing C++11 user defined literals and C++17 deduction guides.
### Minor Analysis Improvements
* Changed the output of `Node.toString` to better reflect how many indirections a given dataflow node has.
* Added a new predicate `Node.asDefinition` on `DataFlow::Node`s for selecting the dataflow node corresponding to a particular definition.
* The deprecated `DefaultTaintTracking` library has been removed.
* The `Guards` library has been replaced with the API-compatible `IRGuards` implementation, which has better precision in some cases.
### Bug Fixes
* Under certain circumstances a function declaration that is not also a definition could be associated with a `Function` that did not have the definition as a `FunctionDeclarationEntry`. This is now fixed when only one definition exists, and a unique `Function` will exist that has both the declaration and the definition as a `FunctionDeclarationEntry`.
## 0.12.2
No user-facing changes.
## 0.12.1
### New Features

View File

@@ -52,17 +52,18 @@ class Options extends string {
/**
* Holds if a call to this function will never return.
*
* By default, this holds for `exit`, `_exit`, `abort`, `__assert_fail`,
* `longjmp`, `__builtin_unreachable` and any function with a
* `noreturn` attribute or specifier.
* By default, this holds for `exit`, `_exit`, `_Exit`, `abort`,
* `__assert_fail`, `longjmp`, `__builtin_unreachable` and any
* function with a `noreturn` or `__noreturn__` attribute or
* `noreturn` specifier.
*/
predicate exits(Function f) {
f.getAnAttribute().hasName("noreturn")
f.getAnAttribute().hasName(["noreturn", "__noreturn__"])
or
f.getASpecifier().hasName("noreturn")
or
f.hasGlobalOrStdName([
"exit", "_exit", "abort", "__assert_fail", "longjmp", "__builtin_unreachable"
"exit", "_exit", "_Exit", "abort", "__assert_fail", "longjmp", "__builtin_unreachable"
])
or
CustomOptions::exits(f) // old Options.qll

View File

@@ -3,6 +3,7 @@
*/
import semmle.files.FileSystem
private import codeql.util.FileSystem
/**
* Returns the `File` matching the given source file name as encoded by the VS
@@ -10,13 +11,5 @@ import semmle.files.FileSystem
*/
cached
File getFileBySourceArchiveName(string name) {
// The name provided for a file in the source archive by the VS Code extension
// has some differences from the absolute path in the database:
// 1. colons are replaced by underscores
// 2. there's a leading slash, even for Windows paths: "C:/foo/bar" ->
// "/C_/foo/bar"
// 3. double slashes in UNC prefixes are replaced with a single slash
// We can handle 2 and 3 together by unconditionally adding a leading slash
// before replacing double slashes.
name = ("/" + result.getAbsolutePath().replaceAll(":", "_")).replaceAll("//", "/")
result = IdeContextual<File>::getFileBySourceArchiveName(name)
}

View File

@@ -0,0 +1,3 @@
## 0.12.2
No user-facing changes.

View File

@@ -0,0 +1,20 @@
## 0.12.3
### Deprecated APIs
* The `isUserInput`, `userInputArgument`, and `userInputReturned` predicates from `SecurityOptions` have been deprecated. Use `FlowSource` instead.
### New Features
* `UserDefineLiteral` and `DeductionGuide` classes have been added, representing C++11 user defined literals and C++17 deduction guides.
### Minor Analysis Improvements
* Changed the output of `Node.toString` to better reflect how many indirections a given dataflow node has.
* Added a new predicate `Node.asDefinition` on `DataFlow::Node`s for selecting the dataflow node corresponding to a particular definition.
* The deprecated `DefaultTaintTracking` library has been removed.
* The `Guards` library has been replaced with the API-compatible `IRGuards` implementation, which has better precision in some cases.
### Bug Fixes
* Under certain circumstances a function declaration that is not also a definition could be associated with a `Function` that did not have the definition as a `FunctionDeclarationEntry`. This is now fixed when only one definition exists, and a unique `Function` will exist that has both the declaration and the definition as a `FunctionDeclarationEntry`.

View File

@@ -0,0 +1,6 @@
## 0.12.4
### Minor Analysis Improvements
* Deleted many deprecated predicates and classes with uppercase `XML`, `SSA`, `SAL`, `SQL`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `StrcatFunction` class, use `semmle.code.cpp.models.implementations.Strcat.qll` instead.

View File

@@ -0,0 +1,6 @@
## 0.12.5
### New Features
* Added the `PreprocBlock.qll` library to this repository. This library offers a view of `#if`, `#elif`, `#else` and similar directives as a tree with navigable parent-child relationships.
* Added a new `ThrowingFunction` abstract class that can be used to model an external function that may throw an exception.

View File

@@ -0,0 +1,5 @@
## 0.12.6
### New Features
* A `getInitialization` predicate was added to the `RangeBasedForStmt` class that yields the C++20-style initializer of the range-based `for` statement when it exists.

View File

@@ -0,0 +1,5 @@
## 0.12.7
### Minor Analysis Improvements
* Added destructors for named objects to the intermediate representation.

View File

@@ -0,0 +1,3 @@
## 0.12.8
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.12.1
lastReleaseVersion: 0.12.8

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-all
version: 0.12.1
version: 0.12.8
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp

View File

@@ -380,9 +380,6 @@ class Class extends UserType {
*/
predicate isPod() { is_pod_class(underlyingElement(this)) }
/** DEPRECATED: Alias for isPod */
deprecated predicate isPOD() { this.isPod() }
/**
* Holds if this class, struct or union is a standard-layout class
* [N4140 9(7)]. Also holds for structs in C programs.

View File

@@ -7,6 +7,7 @@ import semmle.code.cpp.Location
private import semmle.code.cpp.Enclosing
private import semmle.code.cpp.internal.ResolveClass
private import semmle.code.cpp.internal.ResolveGlobalVariable
private import semmle.code.cpp.internal.ResolveFunction
/**
* Get the `Element` that represents this `@element`.
@@ -30,11 +31,14 @@ pragma[inline]
@element unresolveElement(Element e) {
not result instanceof @usertype and
not result instanceof @variable and
not result instanceof @function and
result = e
or
e = resolveClass(result)
or
e = resolveGlobalVariable(result)
or
e = resolveFunction(result)
}
/**

View File

@@ -60,4 +60,6 @@ Element exprEnclosingElement(Expr e) {
)
else result = de.getDeclaration()
)
or
result.(Stmt).getAnImplicitDestructorCall() = e
}

View File

@@ -9,6 +9,7 @@ import semmle.code.cpp.exprs.Call
import semmle.code.cpp.metrics.MetricFunction
import semmle.code.cpp.Linkage
private import semmle.code.cpp.internal.ResolveClass
private import semmle.code.cpp.internal.ResolveFunction
/**
* A C/C++ function [N4140 8.3.5]. Both member functions and non-member
@@ -25,6 +26,8 @@ private import semmle.code.cpp.internal.ResolveClass
* in more detail in `Declaration.qll`.
*/
class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
Function() { isFunction(underlyingElement(this)) }
override string getName() { functions(underlyingElement(this), result, _) }
/**
@@ -328,6 +331,7 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
MetricFunction getMetrics() { result = this }
/** Holds if this function calls the function `f`. */
pragma[nomagic]
predicate calls(Function f) { this.calls(f, _) }
/**
@@ -338,10 +342,6 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
exists(FunctionCall call |
call.getEnclosingFunction() = this and call.getTarget() = f and call = l
)
or
exists(DestructorCall call |
call.getEnclosingFunction() = this and call.getTarget() = f and call = l
)
}
/** Holds if this function accesses a function or variable or enumerator `a`. */
@@ -885,3 +885,17 @@ class BuiltInFunction extends Function {
}
private predicate suppressUnusedThis(Function f) { any() }
/**
* A C++ user-defined literal [N4140 13.5.8].
*/
class UserDefinedLiteral extends Function {
UserDefinedLiteral() { functions(underlyingElement(this), _, 7) }
}
/**
* A C++ deduction guide [N4659 17.9].
*/
class DeductionGuide extends Function {
DeductionGuide() { functions(underlyingElement(this), _, 8) }
}

View File

@@ -104,9 +104,6 @@ predicate isPodClass03(Class c) {
)
}
/** DEPRECATED: Alias for isPodClass03 */
deprecated predicate isPODClass03 = isPodClass03/1;
/**
* Holds if `t` is a POD type, according to the rules specified in
* C++03 3.9(10):
@@ -126,6 +123,3 @@ predicate isPodType03(Type t) {
isPodType03(ut.(SpecifiedType).getUnspecifiedType())
)
}
/** DEPRECATED: Alias for isPodType03 */
deprecated predicate isPODType03 = isPodType03/1;

View File

@@ -306,7 +306,14 @@ class ExprNode extends AstNode {
ExprNode() { expr = ast }
override AstNode getChildInternal(int childIndex) { result.getAst() = expr.getChild(childIndex) }
override AstNode getChildInternal(int childIndex) {
result.getAst() = expr.getChild(childIndex)
or
exists(int destructorIndex |
result.getAst() = expr.getImplicitDestructorCall(destructorIndex) and
childIndex = destructorIndex + max(int index | exists(expr.getChild(index)) or index = 0) + 1
)
}
override string getProperty(string key) {
result = super.getProperty(key)
@@ -439,6 +446,11 @@ class StmtNode extends AstNode {
result.getAst() = child.(Stmt)
)
)
or
exists(int destructorIndex |
result.getAst() = stmt.getImplicitDestructorCall(destructorIndex) and
childIndex = destructorIndex + max(int index | exists(stmt.getChild(index)) or index = 0) + 1
)
}
override string getChildAccessorPredicateInternal(int childIndex) {
@@ -662,6 +674,10 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
or
not namedStmtChildPredicates(s, child, _) and
exists(int n | s.getChild(n) = child and result = "getChild(" + n + ")")
or
exists(int n |
s.getImplicitDestructorCall(n) = child and result = "getImplicitDestructorCall(" + n + ")"
)
)
or
exists(Expr expr | expr = parent |
@@ -669,6 +685,11 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
or
not namedExprChildPredicates(expr, child, _) and
exists(int n | expr.getChild(n) = child and result = "getChild(" + n + ")")
or
exists(int n |
expr.getImplicitDestructorCall(n) = child and
result = "getImplicitDestructorCall(" + n + ")"
)
)
)
}
@@ -714,7 +735,9 @@ private predicate namedStmtChildPredicates(Locatable s, Element e, string pred)
or
s.(ForStmt).getStmt() = e and pred = "getStmt()"
or
s.(RangeBasedForStmt).getChild(0) = e and pred = "getChild(0)"
s.(RangeBasedForStmt).getInitialization() = e and pred = "getInitialization()"
or
s.(RangeBasedForStmt).getChild(1) = e and pred = "getChild(1)"
or
s.(RangeBasedForStmt).getBeginEndDeclaration() = e and pred = "getBeginEndDeclaration()"
or
@@ -722,7 +745,7 @@ private predicate namedStmtChildPredicates(Locatable s, Element e, string pred)
or
s.(RangeBasedForStmt).getUpdate() = e and pred = "getUpdate()"
or
s.(RangeBasedForStmt).getChild(4) = e and pred = "getChild(4)"
s.(RangeBasedForStmt).getChild(5) = e and pred = "getChild(5)"
or
s.(RangeBasedForStmt).getStmt() = e and pred = "getStmt()"
or
@@ -814,7 +837,11 @@ private predicate namedExprChildPredicates(Expr expr, Element ele, string pred)
or
expr.(OverloadedArrayExpr).getArrayOffset() = ele and pred = "getArrayOffset()"
or
expr.(OverloadedPointerDereferenceExpr).getExpr() = ele and pred = "getExpr()"
// OverloadedPointerDereferenceExpr::getExpr/0 also considers qualifiers, which are already handled above for all Call classes.
not expr.(OverloadedPointerDereferenceExpr).getQualifier() =
expr.(OverloadedPointerDereferenceExpr).getExpr() and
expr.(OverloadedPointerDereferenceExpr).getExpr() = ele and
pred = "getExpr()"
or
expr.(CommaExpr).getLeftOperand() = ele and pred = "getLeftOperand()"
or

View File

@@ -281,6 +281,11 @@ class AttributeArgument extends Element, @attribute_arg {
attribute_arg_constant(underlyingElement(this), unresolveElement(result))
}
/**
* Gets the value of this argument, if its value is an expression.
*/
Expr getValueExpr() { attribute_arg_expr(underlyingElement(this), unresolveElement(result)) }
/**
* Gets the attribute to which this is an argument.
*/
@@ -308,7 +313,10 @@ class AttributeArgument extends Element, @attribute_arg {
else
if underlyingElement(this) instanceof @attribute_arg_constant_expr
then tail = this.getValueConstant().toString()
else tail = this.getValueText()
else
if underlyingElement(this) instanceof @attribute_arg_expr
then tail = this.getValueExpr().toString()
else tail = this.getValueText()
) and
result = prefix + tail
)

View File

@@ -234,7 +234,16 @@ class VariableDeclarationEntry extends DeclarationEntry, @var_decl {
* int f(int y) { return y; }
* ```
*/
override string getName() { var_decls(underlyingElement(this), _, _, result, _) and result != "" }
override string getName() {
exists(string name |
var_decls(underlyingElement(this), _, _, name, _) and
(
name != "" and result = name
or
name = "" and result = this.getVariable().(LocalVariable).getName()
)
)
}
/**
* Gets the type of the variable which is being declared or defined.

View File

@@ -32,9 +32,6 @@ class XmlLocatable extends @xmllocatable, TXmlLocatable {
string toString() { none() } // overridden in subclasses
}
/** DEPRECATED: Alias for XmlLocatable */
deprecated class XMLLocatable = XmlLocatable;
/**
* An `XmlParent` is either an `XmlElement` or an `XmlFile`,
* both of which can contain other elements.
@@ -95,9 +92,6 @@ class XmlParent extends @xmlparent {
string toString() { result = this.getName() }
}
/** DEPRECATED: Alias for XmlParent */
deprecated class XMLParent = XmlParent;
/** An XML file. */
class XmlFile extends XmlParent, File {
XmlFile() { xmlEncoding(this, _) }
@@ -119,14 +113,8 @@ class XmlFile extends XmlParent, File {
/** Gets a DTD associated with this XML file. */
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDtd getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
deprecated class XMLFile = XmlFile;
/**
* An XML document type definition (DTD).
*
@@ -163,9 +151,6 @@ class XmlDtd extends XmlLocatable, @xmldtd {
}
}
/** DEPRECATED: Alias for XmlDtd */
deprecated class XMLDTD = XmlDtd;
/**
* An XML element in an XML file.
*
@@ -221,9 +206,6 @@ class XmlElement extends @xmlelement, XmlParent, XmlLocatable {
override string toString() { result = this.getName() }
}
/** DEPRECATED: Alias for XmlElement */
deprecated class XMLElement = XmlElement;
/**
* An attribute that occurs inside an XML element.
*
@@ -254,9 +236,6 @@ class XmlAttribute extends @xmlattribute, XmlLocatable {
override string toString() { result = this.getName() + "=" + this.getValue() }
}
/** DEPRECATED: Alias for XmlAttribute */
deprecated class XMLAttribute = XmlAttribute;
/**
* A namespace used in an XML file.
*
@@ -273,9 +252,6 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
/** Gets the URI of this namespace. */
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }
@@ -286,9 +262,6 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
}
}
/** DEPRECATED: Alias for XmlNamespace */
deprecated class XMLNamespace = XmlNamespace;
/**
* A comment in an XML file.
*
@@ -309,9 +282,6 @@ class XmlComment extends @xmlcomment, XmlLocatable {
override string toString() { result = this.getText() }
}
/** DEPRECATED: Alias for XmlComment */
deprecated class XMLComment = XmlComment;
/**
* A sequence of characters that occurs between opening and
* closing tags of an XML element, excluding other elements.
@@ -335,6 +305,3 @@ class XmlCharacters extends @xmlcharacters, XmlLocatable {
/** Gets a printable representation of this XML character sequence. */
override string toString() { result = this.getCharacters() }
}
/** DEPRECATED: Alias for XmlCharacters */
deprecated class XMLCharacters = XmlCharacters;

View File

@@ -5,9 +5,6 @@ class NullMacro extends Macro {
NullMacro() { this.getHead() = "NULL" }
}
/** DEPRECATED: Alias for NullMacro */
deprecated class NULLMacro = NullMacro;
/** A use of the NULL macro. */
class NULL extends Literal {
NULL() { exists(NullMacro nm | this = nm.getAnInvocation().getAnExpandedElement()) }

View File

@@ -1,22 +0,0 @@
import cpp
/**
* DEPRECATED: use `semmle.code.cpp.models.implementations.Strcat.qll` instead.
*
* A function that concatenates the string from its second argument
* to the string from its first argument, for example `strcat`.
*/
deprecated class StrcatFunction extends Function {
StrcatFunction() {
this.getName() =
[
"strcat", // strcat(dst, src)
"strncat", // strncat(dst, src, max_amount)
"wcscat", // wcscat(dst, src)
"_mbscat", // _mbscat(dst, src)
"wcsncat", // wcsncat(dst, src, max_amount)
"_mbsncat", // _mbsncat(dst, src, max_amount)
"_mbsncat_l" // _mbsncat_l(dst, src, max_amount, locale)
]
}
}

View File

@@ -0,0 +1,101 @@
/**
* A library for detecting general string concatenations.
*/
import cpp
import semmle.code.cpp.models.implementations.Strcat
import semmle.code.cpp.models.interfaces.FormattingFunction
private import semmle.code.cpp.dataflow.new.DataFlow
/**
* A call that performs a string concatenation. A string can be either a C
* string (i.e., a value of type `char*`), or a C++ string (i.e., a value of
* type `std::string`).
*/
class StringConcatenation extends Call {
StringConcatenation() {
// sprintf-like functions, i.e., concat through formatting
this instanceof FormattingFunctionCall
or
this.getTarget() instanceof StrcatFunction
or
this.getTarget() instanceof StrlcatFunction
or
// operator+ and ostream (<<) concat
exists(Call call, Operator op |
call.getTarget() = op and
op.hasQualifiedName(["std", "bsl"], ["operator+", "operator<<"]) and
op.getType()
.stripType()
.(UserType)
.hasQualifiedName(["std", "bsl"], ["basic_string", "basic_ostream"]) and
this = call
)
}
/**
* Gets an operand of this concatenation (one of the string operands being
* concatenated).
* Will not return out param for sprintf-like functions, but will consider the format string
* to be part of the operands.
*/
Expr getAnOperand() {
// The result is an argument of 'this' (a call)
result = this.getAnArgument() and
// addresses odd behavior with overloaded operators
// i.e., "call to operator+" appearing as an operand
// occurs in cases like `string s = s1 + s2 + s3`, which is represented as
// `string s = (s1.operator+(s2)).operator+(s3);`
// By limiting to non-calls we get the leaf operands (the variables or raw strings)
// also, by not enumerating allowed types (variables and strings) we avoid issues
// with missed corner cases or extensions/changes to CodeQL in the future which might
// invalidate that approach.
not result instanceof Call and
// Limit the result type to string
(
result.getUnderlyingType().stripType().getName() = "char"
or
result
.getType()
.getUnspecifiedType()
.(UserType)
.hasQualifiedName(["std", "bsl"], "basic_string")
) and
// when 'this' is a `FormattingFunctionCall` the result must be the format string argument
// or one of the formatting arguments
(
this instanceof FormattingFunctionCall
implies
(
result = this.(FormattingFunctionCall).getFormat()
or
exists(int n |
result = this.getArgument(n) and
n >= this.(FormattingFunctionCall).getTarget().getFirstFormatArgumentIndex()
)
)
)
}
/**
* Gets the data flow node representing the concatenation result.
*/
DataFlow::Node getResultNode() {
if this.getTarget() instanceof StrcatFunction
then
result.asDefiningArgument() =
this.getArgument(this.getTarget().(StrcatFunction).getParamDest())
or
// Hardcoding it is also the return
result.asExpr() = this.(Call)
else
if this.getTarget() instanceof StrlcatFunction
then (
result.asDefiningArgument() =
this.getArgument(this.getTarget().(StrlcatFunction).getParamDest())
) else
if this instanceof FormattingFunctionCall
then result.asDefiningArgument() = this.(FormattingFunctionCall).getOutputArgument(_)
else result.asExpr() = this.(Call)
}
}

View File

@@ -7,371 +7,7 @@ import cpp
import semmle.code.cpp.controlflow.BasicBlocks
import semmle.code.cpp.controlflow.SSA
import semmle.code.cpp.controlflow.Dominance
/**
* A Boolean condition that guards one or more basic blocks. This includes
* operands of logical operators but not switch statements.
*/
class GuardCondition extends Expr {
GuardCondition() { is_condition(this) }
/**
* Holds if this condition controls `block`, meaning that `block` is only
* entered if the value of this condition is `testIsTrue`.
*
* Illustration:
*
* ```
* [ (testIsTrue) ]
* [ this ----------------succ ---- controlled ]
* [ | | ]
* [ (testIsFalse) | ------ ... ]
* [ other ]
* ```
*
* The predicate holds if all paths to `controlled` go via the `testIsTrue`
* edge of the control-flow graph. In other words, the `testIsTrue` edge
* must dominate `controlled`. This means that `controlled` must be
* dominated by both `this` and `succ` (the target of the `testIsTrue`
* edge). It also means that any other edge into `succ` must be a back-edge
* from a node which is dominated by `succ`.
*
* The short-circuit boolean operations have slightly surprising behavior
* here: because the operation itself only dominates one branch (due to
* being short-circuited) then it will only control blocks dominated by the
* true (for `&&`) or false (for `||`) branch.
*/
cached
predicate controls(BasicBlock controlled, boolean testIsTrue) {
// This condition must determine the flow of control; that is, this
// node must be a top-level condition.
this.controlsBlock(controlled, testIsTrue)
or
exists(BinaryLogicalOperation binop, GuardCondition lhs, GuardCondition rhs |
this = binop and
lhs = binop.getLeftOperand() and
rhs = binop.getRightOperand() and
lhs.controls(controlled, testIsTrue) and
rhs.controls(controlled, testIsTrue)
)
or
exists(GuardCondition ne, GuardCondition operand |
this = operand and
operand = ne.(NotExpr).getOperand() and
ne.controls(controlled, testIsTrue.booleanNot())
)
}
/** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */
cached
predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) {
compares_lt(this, left, right, k, isLessThan, testIsTrue)
}
/**
* Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`.
* If `isLessThan = false` then this implies `left >= right + k`.
*/
cached
predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) {
exists(boolean testIsTrue |
compares_lt(this, left, right, k, isLessThan, testIsTrue) and this.controls(block, testIsTrue)
)
}
/** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */
cached
predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) {
compares_eq(this, left, right, k, areEqual, testIsTrue)
}
/**
* Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`.
* If `areEqual = false` then this implies `left != right + k`.
*/
cached
predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) {
exists(boolean testIsTrue |
compares_eq(this, left, right, k, areEqual, testIsTrue) and this.controls(block, testIsTrue)
)
}
/**
* Holds if this condition controls `block`, meaning that `block` is only
* entered if the value of this condition is `testIsTrue`. This helper
* predicate does not necessarily hold for binary logical operations like
* `&&` and `||`. See the detailed explanation on predicate `controls`.
*/
private predicate controlsBlock(BasicBlock controlled, boolean testIsTrue) {
exists(BasicBlock thisblock | thisblock.contains(this) |
exists(BasicBlock succ |
testIsTrue = true and succ = this.getATrueSuccessor()
or
testIsTrue = false and succ = this.getAFalseSuccessor()
|
bbDominates(succ, controlled) and
forall(BasicBlock pred | pred.getASuccessor() = succ |
pred = thisblock or bbDominates(succ, pred) or not reachable(pred)
)
)
)
}
}
private predicate is_condition(Expr guard) {
guard.isCondition()
or
is_condition(guard.(BinaryLogicalOperation).getAnOperand())
or
exists(NotExpr cond | is_condition(cond) and cond.getOperand() = guard)
}
/*
* Simplification of equality expressions:
* Simplify conditions in the source to the canonical form l op r + k.
*/
/**
* Holds if `left == right + k` is `areEqual` given that test is `testIsTrue`.
*
* Beware making mistaken logical implications here relating `areEqual` and `testIsTrue`.
*/
private predicate compares_eq(
Expr test, Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue
) {
/* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */
exists(boolean eq | simple_comparison_eq(test, left, right, k, eq) |
areEqual = true and testIsTrue = eq
or
areEqual = false and testIsTrue = eq.booleanNot()
)
or
logical_comparison_eq(test, left, right, k, areEqual, testIsTrue)
or
/* a == b + k => b == a - k */
exists(int mk | k = -mk | compares_eq(test, right, left, mk, areEqual, testIsTrue))
or
complex_eq(test, left, right, k, areEqual, testIsTrue)
or
/* (x is true => (left == right + k)) => (!x is false => (left == right + k)) */
exists(boolean isFalse | testIsTrue = isFalse.booleanNot() |
compares_eq(test.(NotExpr).getOperand(), left, right, k, areEqual, isFalse)
)
}
/**
* If `test => part` and `part => left == right + k` then `test => left == right + k`.
* Similarly for the case where `test` is false.
*/
private predicate logical_comparison_eq(
BinaryLogicalOperation test, Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue
) {
exists(boolean partIsTrue, Expr part | test.impliesValue(part, partIsTrue, testIsTrue) |
compares_eq(part, left, right, k, areEqual, partIsTrue)
)
}
/** Rearrange various simple comparisons into `left == right + k` form. */
private predicate simple_comparison_eq(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean areEqual
) {
left = cmp.getLeftOperand() and
cmp.getOperator() = "==" and
right = cmp.getRightOperand() and
k = 0 and
areEqual = true
or
left = cmp.getLeftOperand() and
cmp.getOperator() = "!=" and
right = cmp.getRightOperand() and
k = 0 and
areEqual = false
}
private predicate complex_eq(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue
) {
sub_eq(cmp, left, right, k, areEqual, testIsTrue)
or
add_eq(cmp, left, right, k, areEqual, testIsTrue)
}
// left - x == right + c => left == right + (c+x)
// left == (right - x) + c => left == right + (c-x)
private predicate sub_eq(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue
) {
exists(SubExpr lhs, int c, int x |
compares_eq(cmp, lhs, right, c, areEqual, testIsTrue) and
left = lhs.getLeftOperand() and
x = int_value(lhs.getRightOperand()) and
k = c + x
)
or
exists(SubExpr rhs, int c, int x |
compares_eq(cmp, left, rhs, c, areEqual, testIsTrue) and
right = rhs.getLeftOperand() and
x = int_value(rhs.getRightOperand()) and
k = c - x
)
}
// left + x == right + c => left == right + (c-x)
// left == (right + x) + c => left == right + (c+x)
private predicate add_eq(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue
) {
exists(AddExpr lhs, int c, int x |
compares_eq(cmp, lhs, right, c, areEqual, testIsTrue) and
(
left = lhs.getLeftOperand() and x = int_value(lhs.getRightOperand())
or
left = lhs.getRightOperand() and x = int_value(lhs.getLeftOperand())
) and
k = c - x
)
or
exists(AddExpr rhs, int c, int x |
compares_eq(cmp, left, rhs, c, areEqual, testIsTrue) and
(
right = rhs.getLeftOperand() and x = int_value(rhs.getRightOperand())
or
right = rhs.getRightOperand() and x = int_value(rhs.getLeftOperand())
) and
k = c + x
)
}
/*
* Simplification of inequality expressions:
* Simplify conditions in the source to the canonical form l < r + k.
*/
/** Holds if `left < right + k` evaluates to `isLt` given that test is `testIsTrue`. */
private predicate compares_lt(
Expr test, Expr left, Expr right, int k, boolean isLt, boolean testIsTrue
) {
/* In the simple case, the test is the comparison, so isLt = testIsTrue */
simple_comparison_lt(test, left, right, k) and isLt = true and testIsTrue = true
or
simple_comparison_lt(test, left, right, k) and isLt = false and testIsTrue = false
or
logical_comparison_lt(test, left, right, k, isLt, testIsTrue)
or
complex_lt(test, left, right, k, isLt, testIsTrue)
or
/* (not (left < right + k)) => (left >= right + k) */
exists(boolean isGe | isLt = isGe.booleanNot() |
compares_ge(test, left, right, k, isGe, testIsTrue)
)
or
/* (x is true => (left < right + k)) => (!x is false => (left < right + k)) */
exists(boolean isFalse | testIsTrue = isFalse.booleanNot() |
compares_lt(test.(NotExpr).getOperand(), left, right, k, isLt, isFalse)
)
}
/** `(a < b + k) => (b > a - k) => (b >= a + (1-k))` */
private predicate compares_ge(
Expr test, Expr left, Expr right, int k, boolean isGe, boolean testIsTrue
) {
exists(int onemk | k = 1 - onemk | compares_lt(test, right, left, onemk, isGe, testIsTrue))
}
/**
* If `test => part` and `part => left < right + k` then `test => left < right + k`.
* Similarly for the case where `test` evaluates false.
*/
private predicate logical_comparison_lt(
BinaryLogicalOperation test, Expr left, Expr right, int k, boolean isLt, boolean testIsTrue
) {
exists(boolean partIsTrue, Expr part | test.impliesValue(part, partIsTrue, testIsTrue) |
compares_lt(part, left, right, k, isLt, partIsTrue)
)
}
/** Rearrange various simple comparisons into `left < right + k` form. */
private predicate simple_comparison_lt(ComparisonOperation cmp, Expr left, Expr right, int k) {
left = cmp.getLeftOperand() and
cmp.getOperator() = "<" and
right = cmp.getRightOperand() and
k = 0
or
left = cmp.getLeftOperand() and
cmp.getOperator() = "<=" and
right = cmp.getRightOperand() and
k = 1
or
right = cmp.getLeftOperand() and
cmp.getOperator() = ">" and
left = cmp.getRightOperand() and
k = 0
or
right = cmp.getLeftOperand() and
cmp.getOperator() = ">=" and
left = cmp.getRightOperand() and
k = 1
}
private predicate complex_lt(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean isLt, boolean testIsTrue
) {
sub_lt(cmp, left, right, k, isLt, testIsTrue)
or
add_lt(cmp, left, right, k, isLt, testIsTrue)
}
// left - x < right + c => left < right + (c+x)
// left < (right - x) + c => left < right + (c-x)
private predicate sub_lt(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean isLt, boolean testIsTrue
) {
exists(SubExpr lhs, int c, int x |
compares_lt(cmp, lhs, right, c, isLt, testIsTrue) and
left = lhs.getLeftOperand() and
x = int_value(lhs.getRightOperand()) and
k = c + x
)
or
exists(SubExpr rhs, int c, int x |
compares_lt(cmp, left, rhs, c, isLt, testIsTrue) and
right = rhs.getLeftOperand() and
x = int_value(rhs.getRightOperand()) and
k = c - x
)
}
// left + x < right + c => left < right + (c-x)
// left < (right + x) + c => left < right + (c+x)
private predicate add_lt(
ComparisonOperation cmp, Expr left, Expr right, int k, boolean isLt, boolean testIsTrue
) {
exists(AddExpr lhs, int c, int x |
compares_lt(cmp, lhs, right, c, isLt, testIsTrue) and
(
left = lhs.getLeftOperand() and x = int_value(lhs.getRightOperand())
or
left = lhs.getRightOperand() and x = int_value(lhs.getLeftOperand())
) and
k = c - x
)
or
exists(AddExpr rhs, int c, int x |
compares_lt(cmp, left, rhs, c, isLt, testIsTrue) and
(
right = rhs.getLeftOperand() and x = int_value(rhs.getRightOperand())
or
right = rhs.getRightOperand() and x = int_value(rhs.getLeftOperand())
) and
k = c + x
)
}
/** The `int` value of integer constant expression. */
private int int_value(Expr e) {
e.getUnderlyingType() instanceof IntegralType and
result = e.getValue().toInt()
}
import IRGuards
/** An `SsaDefinition` with an additional predicate `isLt`. */
class GuardedSsa extends SsaDefinition {

View File

@@ -5,6 +5,8 @@
import cpp
import semmle.code.cpp.ir.IR
private import semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr
private import semmle.code.cpp.ir.implementation.raw.internal.InstructionTag
/**
* Holds if `block` consists of an `UnreachedInstruction`.
@@ -203,12 +205,42 @@ private class GuardConditionFromIR extends GuardCondition {
private predicate controlsBlock(BasicBlock controlled, boolean testIsTrue) {
exists(IRBlock irb |
ir.controls(irb, testIsTrue) and
irb.getAnInstruction().getAst().(ControlFlowNode).getBasicBlock() = controlled and
nonExcludedIRAndBasicBlock(irb, controlled) and
not isUnreachedBlock(irb)
)
}
}
private predicate excludeAsControlledInstruction(Instruction instr) {
// Exclude the temporaries generated by a ternary expression.
exists(TranslatedConditionalExpr tce |
instr = tce.getInstruction(ConditionValueFalseStoreTag())
or
instr = tce.getInstruction(ConditionValueTrueStoreTag())
or
instr = tce.getInstruction(ConditionValueTrueTempAddressTag())
or
instr = tce.getInstruction(ConditionValueFalseTempAddressTag())
)
or
// Exclude unreached instructions, as their AST is the whole function and not a block.
instr instanceof UnreachedInstruction
}
/**
* Holds if `irb` is the `IRBlock` corresponding to the AST basic block
* `controlled`, and `irb` does not contain any instruction(s) that should make
* the `irb` be ignored.
*/
pragma[nomagic]
private predicate nonExcludedIRAndBasicBlock(IRBlock irb, BasicBlock controlled) {
exists(Instruction instr |
instr = irb.getAnInstruction() and
instr.getAst().(ControlFlowNode).getBasicBlock() = controlled and
not excludeAsControlledInstruction(instr)
)
}
/**
* A Boolean condition in the IR that guards one or more basic blocks. This includes
* operands of logical operators but not switch statements. Note that `&&` and `||`

View File

@@ -1,6 +1,6 @@
// NOTE: There are two copies of this file, and they must be kept identical:
// - semmle/code/cpp/controlflow/SubBasicBlocks.qll
// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll
// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll [now DEPRECATED]
//
// The second one is a private copy of the `SubBasicBlocks` library for
// internal use by the data flow library. Having an extra copy prevents

View File

@@ -637,8 +637,10 @@ private predicate straightLineSparse(Node scope, int i, Node ni, Spec spec) {
any(RangeBasedForStmt for |
i = -1 and ni = for and spec.isAt()
or
i = 0 and ni = for.getInitialization() and spec.isAround()
or
exists(DeclStmt s | s.getADeclaration() = for.getRangeVariable() |
i = 0 and ni = s and spec.isAround()
i = 1 and ni = s and spec.isAround()
)
or
exists(DeclStmt s |
@@ -649,22 +651,22 @@ private predicate straightLineSparse(Node scope, int i, Node ni, Spec spec) {
// DeclStmt in that case.
exists(s.getADeclaration())
|
i = 1 and ni = s and spec.isAround()
i = 2 and ni = s and spec.isAround()
)
or
i = 2 and ni = for.getCondition() and spec.isBefore()
i = 3 and ni = for.getCondition() and spec.isBefore()
or
i = 3 and /* BARRIER */ ni = for and spec.isBarrier()
i = 4 and /* BARRIER */ ni = for and spec.isBarrier()
or
exists(DeclStmt declStmt | declStmt.getADeclaration() = for.getVariable() |
i = 4 and ni = declStmt and spec.isAfter()
i = 5 and ni = declStmt and spec.isAfter()
)
or
i = 5 and ni = for.getStmt() and spec.isAround()
i = 6 and ni = for.getStmt() and spec.isAround()
or
i = 6 and ni = for.getUpdate() and spec.isAround()
i = 7 and ni = for.getUpdate() and spec.isAround()
or
i = 7 and ni = for.getCondition() and spec.isBefore()
i = 8 and ni = for.getCondition() and spec.isBefore()
)
or
scope =

View File

@@ -110,8 +110,8 @@ private predicate loopConditionAlwaysUponEntry(ControlFlowNode loop, Expr condit
* should be in this relation.
*/
pragma[noinline]
private predicate isFunction(Element el) {
el instanceof Function
private predicate isFunction(@element el) {
el instanceof @function
or
el.(Expr).getParent() = el
}
@@ -122,7 +122,7 @@ private predicate isFunction(Element el) {
*/
pragma[noopt]
private predicate callHasNoTarget(@funbindexpr fc) {
exists(Function f |
exists(@function f |
funbind(fc, f) and
not isFunction(f)
)

View File

@@ -1,4 +1,6 @@
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead.
*
* Provides a local analysis for identifying where a variable address
* is effectively taken. Array-like offsets are allowed to pass through but
* not field-like offsets.

View File

@@ -1,3 +1,7 @@
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead.
*/
private import cpp
private import DataFlowPrivate
private import DataFlowUtil
@@ -54,18 +58,6 @@ private predicate functionSignature(Function f, string qualifiedName, int nparam
not f.isStatic()
}
/**
* Holds if the set of viable implementations that can be called by `call`
* might be improved by knowing the call context.
*/
predicate mayBenefitFromCallContext(DataFlowCall call, Function f) { none() }
/**
* Gets a viable dispatch target of `call` in the context `ctx`. This is
* restricted to those `call`s for which a context might make a difference.
*/
Function viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) { none() }
/** A parameter position represented by an integer. */
class ParameterPosition extends int {
ParameterPosition() { any(ParameterNode p).isParameterOf(_, this) }

Some files were not shown because too many files have changed in this diff Show More