Tamás Vajk
17fbbdba34
Merge pull request #8233 from github/release-prep/2.8.2
...
Release preparation for version 2.8.2
2022-02-24 20:07:55 +01:00
Jeroen Ketema
0c788d7352
C++: Remove redundant empty line
2022-02-24 17:31:10 +01:00
Jeroen Ketema
b933a58215
C++: Replace Deprecated Queries by Deprecated Classes
...
This is more accurate for the only change in the list.
2022-02-24 16:48:23 +01:00
Tamas Vajk
0d16a7e38d
Fix formatting of C# change logs
2022-02-24 16:06:54 +01:00
github-actions[bot]
20fe22c8c8
Release preparation for version 2.8.2
2022-02-24 14:57:08 +00:00
Tamás Vajk
83aaeca751
Merge pull request #8228 from tamasvajk/fix/change-notes-0.0.9
...
Fix 0.0.9 change note to match concatenated change log
2022-02-24 14:04:31 +01:00
Chris Smowton
4973224de7
Merge pull request #8216 from github/smowton/fix/creating-codeql-databases-docs-typo
...
Fix typo
2022-02-24 12:24:32 +00:00
Tamas Vajk
a8c2d87897
Fix 0.0.9 change note to match concatenated change log
2022-02-24 12:51:10 +01:00
Erik Krogh Kristensen
e13b2df86f
Merge pull request #8185 from erik-krogh/amdImp
...
JS: recognize modules imported by AMD imports as library inputs
2022-02-23 20:21:45 +01:00
Chris Smowton
3167a67e65
Fix typo
2022-02-23 18:19:11 +00:00
Chris Smowton
01db73bfc7
Merge pull request #5935 from porcupineyhairs/javaSstiNew
...
Java : Add SSTI query
2022-02-23 17:30:02 +00:00
Mathias Vorreiter Pedersen
fd83f3a999
Merge pull request #8209 from jketema/ir-structured-bindings-tests
...
C++: Add IR structured binding tests
2022-02-23 16:09:40 +00:00
Chris Smowton
7b425a80bc
Note path query expectations
2022-02-23 16:02:54 +00:00
Rasmus Wriedt Larsen
aeba497832
Merge pull request #7735 from yoff/python/promote-log-injection
...
Python: promote log injection
2022-02-23 16:21:12 +01:00
Jeroen Ketema
99dd049c1b
Add IR test for tuple structured bindings
2022-02-23 16:15:19 +01:00
Jeroen Ketema
caf0f28547
Add IR test for data member structured bindings
2022-02-23 15:55:19 +01:00
Taus
3ce7d47b5b
Merge pull request #7452 from jorgectf/python_jwt
...
Python: Add Python_JWT to JWT security query
2022-02-23 15:23:20 +01:00
Jeroen Ketema
ec2567b64b
Add IR test for array structured bindings
2022-02-23 15:10:10 +01:00
Chris Smowton
a8fe10f353
Java template injection query: import pathgraph
2022-02-23 13:47:24 +00:00
CodeQL CI
7d55771092
Merge pull request #8150 from asgerf/js/prep-sharing-api-graph-mad
...
Approved by erik-krogh
2022-02-23 11:59:31 +00:00
CodeQL CI
62ee8fce3a
Merge pull request #8186 from asgerf/js/request-forgery-docs-followup
...
Approved by esbena, hubwriter
2022-02-23 11:46:37 +00:00
Stephan Brandauer
a664e02d04
Merge pull request #8014 from kaeluka/js/functionality-from-untrusted-source
...
JS: Functionality from untrusted sources query (CWE-830)
2022-02-23 12:45:31 +01:00
Chris Smowton
50d9945625
Autoformat
2022-02-23 11:41:23 +00:00
Chris Smowton
476997a599
Replace more non-breaking spaces
2022-02-23 11:02:17 +00:00
Stephan Brandauer
1ed71e15f3
apply docreview feedback
2022-02-23 11:21:22 +01:00
Tony Torralba
f011bbc92c
Merge pull request #8055 from luchua-bc/java/unsafe-url-forward-with-shared-lib
...
CWE-552: Switch to the shared PathSanitizer library
2022-02-23 11:00:23 +01:00
Stephan Brandauer
517d6969e1
Merge pull request #8171 from kaeluka/js/update-atm-query-docs-for-nosql-sql-injection
...
update ATM NosqlInjection and SqlInjection query docs
2022-02-23 10:54:37 +01:00
Asger Feldthaus
22ba43fff6
JS: Minor fixup in the client-side request forgery qhelp
2022-02-23 10:54:26 +01:00
Erik Krogh Kristensen
203212657e
recognize modules imported by AMD imports as library inputs
2022-02-23 10:39:45 +01:00
Stephan Brandauer
c17d8b145a
Merge pull request #8054 from asgerf/js/split-request-forgery
...
JS: split request forgery query into server-side and client-side variants
2022-02-23 10:27:16 +01:00
Mathias Vorreiter Pedersen
31a204a5d9
Merge pull request #8174 from jketema/hinding-cleanup
...
C++: Simplify `cpp/declaration-hides-variable`
2022-02-23 08:27:59 +00:00
Esben Sparre Andreasen
58e0d54744
Merge pull request #8168 from github/esbena/hapi-reflected-xss
...
JS: model hapi handler returns as reflected-xss sinks
2022-02-23 08:53:15 +01:00
jorgectf
4aa1c0a11e
Update .expected
2022-02-23 00:55:39 +01:00
Jeroen Ketema
423d325204
C++: Simplify cpp/declaration-hides-variable
...
The check for `(unnamed local variable)` is no longer needed, because these
variables are now identified as being compiler generated.
2022-02-22 23:04:48 +01:00
Erik Krogh Kristensen
73f2e89f3e
Merge pull request #8165 from erik-krogh/protoWrite
...
JS: support more property writes in js/prototype-pollution-utility
2022-02-22 21:30:22 +01:00
jorgectf
7c108c7892
Polish test
2022-02-22 20:57:20 +01:00
Jorge
0216798cb9
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-02-22 20:55:51 +01:00
Porcupiney Hairs
c81d85f321
Include suggestions from review
2022-02-22 23:07:34 +05:30
Erik Krogh Kristensen
b6b93065ff
Merge pull request #8157 from erik-krogh/lodash-clone
...
JS: add lodash.{clone, cloneDeep} as a clone step
2022-02-22 18:12:10 +01:00
Erik Krogh Kristensen
c487bb73a7
Merge pull request #8143 from erik-krogh/pred-ql-style
...
QL: add ql-for-ql query for detecting bad predicate qldoc
2022-02-22 17:49:12 +01:00
Jeroen Ketema
aecc17c49b
Merge pull request #7928 from jketema/structured-bindings-db-scheme
...
C++: Add table that identifies C++ structured bindings
2022-02-22 17:34:26 +01:00
Stephan Brandauer
6a9186cdef
update ATM NosqlInjection and SqlInjection query docs
2022-02-22 16:56:18 +01:00
Geoffrey White
31d214d5ee
Merge pull request #8170 from geoffw0/typos
...
C++: Fix Spelling Typos.
2022-02-22 15:09:50 +00:00
Mathias Vorreiter Pedersen
894992d403
Merge pull request #8169 from MathiasVP/fix-spelling-in-post-dominance-frontier
...
C++/C#: Fix spelling of 'postDominanceFrontier'
2022-02-22 14:54:39 +00:00
Geoffrey White
4908eaf5ec
C++: Typos.
2022-02-22 14:33:11 +00:00
Mathias Vorreiter Pedersen
b6740ed4a1
C++/C#: Fix spelling of 'postDominanceFrontier'.
2022-02-22 13:48:13 +00:00
Esben Sparre Andreasen
2c527f7b35
model hapi handler returns as reflected-xss sinks
2022-02-22 14:12:01 +01:00
Erik Krogh Kristensen
517e17d422
support more property writes in js/prototype-pollution-utility, and generalize ObjectDefinePropertyAsPropWrite
2022-02-22 13:23:34 +01:00
Pierre
5ee96121fc
Merge pull request #8162 from github/turbo-no-glibc-no
...
Docs: Add note about muslc incompatibility
2022-02-22 13:06:28 +01:00
Henry Mercer
4f7604f0dd
Merge pull request #8151 from github/henrymercer/separate-atm-model-pack
2022-02-22 11:47:35 +00:00
Pierre
1d81f90260
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-02-22 12:47:31 +01:00
Erik Krogh Kristensen
08c703f605
exclude private predicates
2022-02-22 12:34:16 +01:00
Stephan Brandauer
2278e7f6e6
CWE 830 polish error messages
2022-02-22 11:41:54 +01:00
Stephan Brandauer
82330391c3
CWE-830 add support for setting attributes via setAttribute method
2022-02-22 11:41:54 +01:00
Stephan Brandauer
d80cd1aeb5
CWE 830 test where both branches in a ternary are unsafe
2022-02-22 11:41:53 +01:00
Stephan Brandauer
2934aa1a3a
rewrite docs, improve error messages, etc
2022-02-22 11:41:53 +01:00
Stephan Brandauer
d2335b65d5
stylistic improvements after review
2022-02-22 11:41:53 +01:00
Stephan Brandauer
9aec4437e2
polish qhelp for CWE-830 and add test file
2022-02-22 11:41:53 +01:00
Stephan Brandauer
44d86569ac
remove illegal chars from comments
2022-02-22 11:41:53 +01:00
Stephan Brandauer
fd77e27ed9
replace taint tracking by type tracking and merge remaining queries for CWE-830
2022-02-22 11:41:53 +01:00
Stephan Brandauer
8cafa6d562
improve error message in CWE-830
2022-02-22 11:41:53 +01:00
Stephan Brandauer
780fa97869
always require integrity checking for certain CDNs
2022-02-22 11:41:53 +01:00
Stephan Brandauer
83764df4f5
rename tests for CW-830 to clarify responsibilities
2022-02-22 11:41:52 +01:00
Stephan Brandauer
8d397fea09
JS: query to find dynamic creations of DOM elements that use untrusted sources
2022-02-22 11:41:52 +01:00
Stephan Brandauer
b35c70994f
permit http urls to 127.0.0.1 and others
2022-02-22 11:41:52 +01:00
Stephan Brandauer
dd2b779a3c
add CWE 830 link to references
2022-02-22 11:41:52 +01:00
Stephan Brandauer
b170422c22
add changenotes for functionality from untrusted source query
2022-02-22 11:41:52 +01:00
Stephan Brandauer
6722c17bb0
JS: Functionality from untrusted sources query (CWE-830)
2022-02-22 11:41:52 +01:00
Erik Krogh Kristensen
8ff2992b56
have each case on a separate line
2022-02-22 11:40:26 +01:00
Erik Krogh Kristensen
addb27c80e
deduplicate "%"
...
Co-authored-by: Stephan Brandauer <kaeluka@github.com >
2022-02-22 11:34:59 +01:00
Pierre
8b7f899883
Update getting-started-with-the-codeql-cli.rst
2022-02-22 11:34:49 +01:00
Pierre
6f936942fa
Add note about non-glibc systems
2022-02-22 11:29:51 +01:00
Porcuiney Hairs
e536628a66
Java : Add SSTI query
2022-02-22 15:57:53 +05:30
Asger Feldthaus
1be47db2e6
JS: Factor out more JS-specific code
2022-02-22 09:51:56 +01:00
Asger Feldthaus
2d509eb345
JS: Make Impl.qll determine the location of AccessPathSyntax.qll
2022-02-22 09:51:52 +01:00
Asger Feldthaus
42a3d8c689
JS: Treat Member[x] as a language-specific token
...
In Ruby it is ambiguous whether Member[foo] means x.foo or x::foo
2022-02-22 09:51:52 +01:00
Asger Feldthaus
acf95d6178
JS: Move summary resolution into JS-specific code
2022-02-22 09:51:52 +01:00
Asger Feldthaus
ab1642dd3f
JS: Rename {Shared,Impl} -> ApiGraphModels{,Specific}
2022-02-22 09:51:48 +01:00
Erik Krogh Kristensen
e8df6a14ca
add lodash.{clone, cloneDeep} as a clone step
2022-02-21 22:27:29 +01:00
Henry Mercer
e42f759f6b
Merge pull request #8153 from github/henrymercer/atm-add-cwe-tags
...
JS: Add CWE tags for ML-powered queries
2022-02-21 17:24:02 +00:00
Henry Mercer
5a3daa9e3f
JS: Add CWE tags for ML-powered queries
...
- Cross-site scripting: CWE-79
- Path injection: CWE-22, CWE-23, CWE-36, CWE-73, CWE-99
- NoSQL injection: CWE-943
- SQL injection: CWE-89
2022-02-21 16:18:33 +00:00
Henry Mercer
02cce623a6
JS: Install pack dependencies in ML CI jobs
2022-02-21 16:10:15 +00:00
Henry Mercer
a89882c14e
JS: Update lockfiles for ML-powered queries packs
2022-02-21 16:03:05 +00:00
Asger Feldthaus
8194c041cc
JS: Merge sources to one class
2022-02-21 16:26:02 +01:00
Asger F
00ed72ed83
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-21 16:24:50 +01:00
Henry Mercer
25f6ac3ec4
JS: Remove ML model pack from default workspace
...
We only want to put the checked out version of the model pack to test a
custom model.
Given that the repo doesn't contain any models by default, most users
won't want the local checkout of the model pack to override the one
downloaded from the package registry.
2022-02-21 15:06:30 +00:00
Henry Mercer
6fb9895367
JS: Separate the ML-powered queries model into its own pack
...
This allows users to more easily get started with development. Running
`codeql pack install` from the `-queries` pack will now install the ML
model.
2022-02-21 15:05:57 +00:00
Tom Bolton
0108642464
Merge pull request #8148 from github/tombolton/modify-counting-query
...
Update counting query to match end-to-end results
2022-02-21 15:02:43 +00:00
tombolton
e02319be9f
add end to end predicate to result counting query
2022-02-21 14:35:58 +00:00
Erik Krogh Kristensen
1407b49a8f
fix some instances of ql/pred-doc-style for JS
2022-02-21 15:02:21 +01:00
Erik Krogh Kristensen
11bbd872f3
add ql-for-ql query for detecting bad predicate qldoc
2022-02-21 15:02:15 +01:00
Asger F
02c4966109
Merge pull request #7878 from asgerf/dot-separated-access-paths
...
Shared: Switch to dot-separated access paths in summary specs
2022-02-21 13:29:09 +01:00
Alex Ford
9196b64d6e
Merge pull request #8138 from github/ruby/file-write
...
Ruby: Implement `FileSystemWriteAccess` concept
2022-02-21 10:13:27 +00:00
Alex Ford
746290d903
Merge pull request #7713 from github/ruby/clear-text-logging
...
Ruby: Add `rb/clear-text-logging-sensitive-data` query
2022-02-21 10:12:33 +00:00
Jeroen Ketema
fc91c82777
Add change note
2022-02-21 10:48:46 +01:00
Jeroen Ketema
e05af1e1d1
Use underlyingElement in isStructuredBinding
...
Accodring to the documentation in `Element.qll`, `underlyingElement` is
supposed to be used here and not `unresolveElement`.
2022-02-21 10:46:29 +01:00
Esben Sparre Andreasen
1d437dd722
Merge pull request #8043 from github/esbena/sharpen-hardcoded-credentials
...
JS: Sharpen hardcoded credentials
2022-02-21 10:02:58 +01:00
Rasmus Wriedt Larsen
b59ab7f5f3
Merge branch 'main' into python/promote-log-injection
2022-02-21 09:59:31 +01:00
Erik Krogh Kristensen
5f9bd7a4a1
Merge pull request #7984 from erik-krogh/fix-ql-for-ql-js
...
JS: fix most ql-for-ql warnings
2022-02-21 09:15:06 +01:00
Asger Feldthaus
7848fcec80
Shared: sync AccessPathSyntax.qll
2022-02-21 08:21:53 +01:00
Asger Feldthaus
d7f07167ac
Shared: Remove getLastToken again
2022-02-21 08:21:53 +01:00
Asger Feldthaus
2c2a82a070
Shared: allow spaces between arguments in a token
2022-02-21 08:21:53 +01:00
Asger Feldthaus
55ac5cb012
Shared: auto format
2022-02-21 08:21:53 +01:00
Asger Feldthaus
4985fbb526
Shared: update getSummaryCsv and related test output
2022-02-21 08:21:53 +01:00
Asger Feldthaus
dcc523a2b7
Shared: auto format
2022-02-21 08:21:53 +01:00
Asger Feldthaus
7fcbdbeada
Shared: sync AccessPathSyntax.qll and FlowSummaryImpl.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
d911e0abf8
Shared: use getToken instead of getLastToken
2022-02-21 08:21:52 +01:00
Asger Feldthaus
c4304a980d
Shared: add explicit this
2022-02-21 08:21:52 +01:00
Asger Feldthaus
dc6a13242b
Shared: update comment in AccessPathSyntax.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
2907d53e17
Shared: sync AccessPathSyntax.qll and FlowSummaryImpl.qll
2022-02-21 08:21:52 +01:00
Asger Feldthaus
be63cf7049
Shared: fix qldoc and move getRawToken to top-level
2022-02-21 08:21:52 +01:00
Asger Feldthaus
c189df2341
Revert "JS: Add support for " of " syntax to help during transition"
...
This reverts commit 9bf522b3048c3b11f7e6d734ed797a613614a095.
2022-02-21 08:21:51 +01:00
Asger Feldthaus
57bf0b1432
Ruby: remove support for legacy syntax
2022-02-21 08:21:51 +01:00
Asger Feldthaus
e3605eed44
Ruby: update CSV rows to dot-separated syntax
2022-02-21 08:21:50 +01:00
Asger Feldthaus
7005d53a67
Ruby: manually rewrite DigSummary access path
2022-02-21 08:16:55 +01:00
Asger Feldthaus
6dbeb81f36
Ruby: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:55 +01:00
Asger Feldthaus
0af9e8aa58
C#: remove support for legacy syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
6bb15dcc27
C#: update CSV rows to dot-separated syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
dffa1d1558
C#: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:55 +01:00
Asger Feldthaus
affdbe9955
Java: remove support for legacy syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
a121b73181
Java: update CSV rows to dot-separated syntax
2022-02-21 08:16:55 +01:00
Asger Feldthaus
7f808710ec
Java: update model generator
2022-02-21 08:16:54 +01:00
Asger Feldthaus
753c557dbe
Java: use AccessPathSyntax.qll to parse input/output summary specs
2022-02-21 08:16:54 +01:00
Asger Feldthaus
53935db6c6
JS: Add support for " of " syntax to help during transition
2022-02-21 08:16:54 +01:00
Asger Feldthaus
30254686d8
JS: Move ".."-parsing trick into AccessPathSyntax.qll
2022-02-21 08:16:54 +01:00
Asger Feldthaus
7c2cff3227
JS: Factor out AccessPathSyntax.qll
2022-02-21 08:16:54 +01:00
Asger Feldthaus
e2cbf47b16
JS: Fix accidental recursion
2022-02-21 08:16:53 +01:00
Harry Maclean
e4f801bea8
Merge pull request #7886 from github/hmac/split-ruby-std-library
...
Ruby: split standard library models into multiple files
2022-02-21 13:39:43 +13:00
Harry Maclean
9a60c7e4ac
Ruby: Update filename in test fixture
2022-02-21 09:43:36 +13:00
Alex Ford
6b8537c4e0
Ruby: FileSystemWriteAccess changenote
2022-02-20 20:14:01 +00:00
Alex Ford
baabe66551
Ruby: update Files.ql tests for write accesses
2022-02-20 19:28:12 +00:00
Alex Ford
12ce3d4784
Ruby: Implement FileSystemWriteAccess for IO/File API
2022-02-20 19:27:11 +00:00
Alex Ford
4f0174e89a
Ruby: add FileSystemWriteAccess concept
2022-02-20 19:26:54 +00:00
Alex Ford
dd383f942f
Merge remote-tracking branch 'origin/main' into ruby/clear-text-logging
2022-02-17 15:32:31 +00:00
Alex Ford
33f4fffe16
Ruby: Simplify sub!/gsub! sanitizers for cleartext logging query
2022-02-17 13:10:44 +00:00
Jeroen Ketema
d4832b48c6
C++: Update DB scheme stats
2022-02-17 11:48:42 +01:00
Jeroen Ketema
e2bc4c88e4
C++: Expose is_structured_binding as a member of Variable
2022-02-17 11:44:08 +01:00
Jeroen Ketema
f875d722b0
C++: Add DB upgrade and downgrade scripts
2022-02-17 11:44:08 +01:00
Jeroen Ketema
f358f8f265
C++: Add DB relation identifying structured bindings
2022-02-17 11:44:08 +01:00
Asger Feldthaus
69995d5750
Shared: rephrase request forgery name and description
2022-02-17 09:07:08 +01:00
Asger Feldthaus
51442ddf47
JS: Add change note
2022-02-17 09:07:08 +01:00
Asger Feldthaus
3496ae131b
JS: Factor out <recommendation> part of qhelp
2022-02-17 09:07:08 +01:00
Harry Maclean
bfd2c14555
Ruby: Add shim StandardLibrary.qll
...
This file re-exports everything it used to define, marking each as
deprecated to warn users that they should import `Core` or `Stdlib`
instead.
2022-02-17 20:44:04 +13:00
Harry Maclean
459f949c24
Ruby: fix old import in ActiveSupport
...
codeql.ruby.frameworks.StandardLibrary is deprecated
2022-02-17 20:44:04 +13:00
Harry Maclean
9fff2cfcff
Ruby: Add missing documentation
2022-02-17 20:44:04 +13:00
Harry Maclean
546bfcb8ea
Ruby: split tests to match stdlib changes
2022-02-17 20:44:04 +13:00
Harry Maclean
eb4f333c25
Ruby: Move UnknownMethodCall to ast/Call.qll
2022-02-17 20:44:04 +13:00
Harry Maclean
a397c65d36
Ruby: Split standard library modeling
...
Split the classes modeling various standard library concepts into a
structured group of multiple files.
Things that are part of the core language live in framworks/core and
standard libraries (that aren't part of core) live in frameworks/stdlib.
This mirrors the structure followed by the Ruby docs
(https://docs.ruby-lang.org/en/3.1/ ).
Tests are split in a followup commit.
2022-02-17 20:44:04 +13:00
Ian Lynagh
a448db11b5
Merge pull request #8052 from igfoo/igfoo/descendent
...
Spelling: Use "descendant" rather than "descendent" for consistency
2022-02-16 18:03:52 +00:00
Asger Feldthaus
8ac0ec8dfc
JS: Write help for ClientSideRequestForgery
2022-02-16 18:33:31 +01:00
luchua-bc
f136ea0f6f
Switch to the shared PathSanitizer library
2022-02-16 16:06:28 +00:00
Nick Rolfe
26e7f3273b
Merge pull request #8044 from github/nickrolfe/db_upgrade_script
...
Language-agnostic document on db up-/downgrades
2022-02-16 15:02:04 +00:00
Nick Rolfe
6d02ea7870
doc: remove unneeded --search-path flag
2022-02-16 14:51:12 +00:00
Ian Lynagh
b16e4c0247
Spelling: Use "descendant" rather than "descendent" for consistency
...
$ git grep -i descendant | wc -l
170
2022-02-16 14:26:02 +00:00
Nick Rolfe
54b56c44e6
doc: avoid using Posix-specific search-path separator
2022-02-16 12:42:58 +00:00
Asger Feldthaus
91c64152d2
JS: Rephrase the qhelp for SSRF query
2022-02-16 13:35:01 +01:00
Asger Feldthaus
cf66d01e80
JS: Add consistency test
2022-02-16 13:35:01 +01:00
Asger Feldthaus
3103cfd925
JS: Rename to tests to clientSide.js and serverSide.js
2022-02-16 13:35:01 +01:00
Asger Feldthaus
3fbc3a4d70
JS: Add ClientSideRequestForgery to RequestForgery test
2022-02-16 13:35:01 +01:00
Asger Feldthaus
260638c68b
JS: Add ClientSideRequestForgery and split request-forgery results between the two
2022-02-16 13:35:01 +01:00
Esben Sparre Andreasen
f08a140505
update tests for password patterns
2022-02-16 13:22:19 +01:00
Nick Rolfe
17450a5b27
Python/Ruby: rm old prepare-db-upgrade.sh files
2022-02-16 12:21:52 +00:00
Nick Rolfe
549436fc86
doc: typo
2022-02-16 12:00:35 +00:00
Nick Rolfe
26b2012024
Move Ruby doc on db upgrades to common docs dir
...
And explain downgrades
2022-02-16 11:35:52 +00:00
Nick Rolfe
ee5068d843
Python/Ruby: forward to generic prepare-db-upgrade.sh
2022-02-16 11:03:28 +00:00
Tony Torralba
111aabb707
Merge pull request #7712 from luchua-bc/java/file-path-injection
...
Java: CWE-073 File path injection with the JFinal framework
2022-02-16 12:01:34 +01:00
Jeroen Ketema
3170670f67
Merge pull request #8041 from jketema/prepare-db-upgrade-script
...
Add version of `prepare-db-upgrade.sh` supporting multiple languages
2022-02-16 11:45:34 +01:00
Jeroen Ketema
671528b483
Find qldir by using the location of prepare-db-upgrade.sh
2022-02-16 11:35:15 +01:00
Jeroen Ketema
8ad0d8ea69
Factor out creating upgrade.properties into a function
2022-02-16 10:54:12 +01:00
Jeroen Ketema
b27dd6ca72
Simplify check_hash_valid
2022-02-16 10:53:39 +01:00
Jeroen Ketema
f558ac5b07
Make --lang a required script argument
2022-02-16 10:18:55 +01:00
Esben Sparre Andreasen
816d79692b
ignore deliberately hardcoded password strings
2022-02-16 09:47:01 +01:00
Esben Sparre Andreasen
78744a0182
add additional tests
2022-02-16 09:44:56 +01:00
Esben Sparre Andreasen
e67c09f9ab
change example passwords in test
2022-02-16 08:56:00 +01:00
Arthur Baars
ebb87c4b36
Merge pull request #7975 from github/post-release-prep/codeql-cli-2.8.1
...
Post-release preparation for codeql-cli-2.8.1
2022-02-15 20:17:35 +01:00
Jeroen Ketema
1209bbd9b4
Add version of prepare-db-upgrade.sh supporting multiple languages
2022-02-15 18:39:21 +01:00
luchua-bc
40bf093d34
Move shared code to the lib folder and update qldoc
2022-02-15 17:28:13 +00:00
Tony Torralba
5f0ab522f3
Merge pull request #7988 from Marcono1234/marcono1234/sealed-types-predicates
...
Java: Add predicates for sealed classes
2022-02-15 15:11:56 +01:00
yo-h
cfcb06cad9
Merge pull request #8035 from tamasvajk/feature/hardcoded-cred-medium-prec
...
C#: Downgrade hardcoded credentials queries to medium precision
2022-02-15 08:09:27 -05:00
Chris Smowton
2f82a46528
Elaborate change note
2022-02-15 12:56:57 +00:00
luchua-bc
fd533f2ba8
Remove the same callable constraint
2022-02-15 12:44:23 +00:00
Mathias Vorreiter Pedersen
c48e49650a
Merge pull request #8039 from jketema/downgrades
...
C++: Add initial DB scheme and qlpack file to downgrades directory
2022-02-15 11:30:33 +00:00
Jeroen Ketema
d59422be41
Add qlpack file to downgrades directory
2022-02-15 12:18:46 +01:00
Jeroen Ketema
0bcb5cb380
Add initial cpp DB scheme to downgrades directory
2022-02-15 11:59:46 +01:00
Mathias Vorreiter Pedersen
38e44924e7
Merge pull request #8036 from jketema/remove-legacy-relations-2
...
C++: Remove some unused legacy relations from the DB scheme - Take 2
2022-02-15 10:56:25 +00:00
Jeroen Ketema
3b2584a5d1
Add change note
2022-02-15 11:18:44 +01:00
Jeroen Ketema
9d7784e12d
C++: Add DB downgrade script
2022-02-15 11:18:44 +01:00
Jeroen Ketema
f791c63780
C++: Add DB upgrade script
2022-02-15 11:18:44 +01:00
Jeroen Ketema
68fd953d9b
C++: Mark classes depending on removed relations as deprecated
...
Also ensure they no longer depend on the removed relations.
2022-02-15 11:18:36 +01:00
Rasmus Wriedt Larsen
62d4bb50a5
Python: Autoformat
...
Trailing whitespace is a bit too easy with the ```suggestions through
the UI :|
2022-02-15 10:38:52 +01:00
Tony Torralba
bfa14fa066
Merge pull request #7823 from JLLeitschuh/improve/JLL/combined_http_headers
...
Java: Add HTTP Request Splitting to Netty Query
2022-02-15 10:24:36 +01:00
Rasmus Wriedt Larsen
5a90214ece
Merge pull request #7783 from yoff/python/promote-ldap-injection
...
Python: promote LDAP injection query
2022-02-15 10:24:18 +01:00
Jeroen Ketema
bf6ca7a7be
C++: Remove some unused legacy relations from the DB scheme
2022-02-15 10:16:35 +01:00
Tamas Vajk
0c667fa544
Move change note from lib to src folder
2022-02-15 09:58:12 +01:00
Tamas Vajk
c386ab5e51
Add change note
2022-02-15 09:55:18 +01:00
CodeQL CI
8f8621f82c
Merge pull request #8022 from asgerf/js/url-parse-qs
...
Approved by esbena
2022-02-15 09:34:21 +01:00
Tamas Vajk
e8bf94faf9
C#: Downgrade hardcoded credentials queries to medium precision
2022-02-15 09:34:20 +01:00
Marcono1234
a496b1d1a1
Java: Add predicates for sealed classes
2022-02-14 21:04:38 +01:00
Chris Smowton
0bf6c83ef2
Merge pull request #4388 from JLLeitschuh/feat/JLL/java/CWE-200_temp_directory_local_information_disclosure
...
Java: CWE-200: Temp directory local information disclosure vulnerability
2022-02-14 18:58:44 +00:00
Chris Smowton
fd4dc95d84
Merge pull request #6443 from artem-smotrakov/ignored-hostname-verifier
...
Java: An experimental query for ignored hostname verification
2022-02-14 18:56:27 +00:00
yoff
de5b3a272d
Merge pull request #7660 from RasmusWL/deprecate-old-modeling
...
Python: Deprecate old points-to based modeling
2022-02-14 19:48:03 +01:00
Chris Smowton
f2bc5849ce
format
2022-02-14 17:00:14 +00:00
Nick Rolfe
9c79a171ae
Merge pull request #8017 from github/nickrolfe/csharp_externalData
...
C#: add externalData back to dbscheme
2022-02-14 16:54:32 +00:00
Jonathan Leitschuh
2048aed0a9
Review feedback and improve temp dir vulnerable/safe code sugestion
2022-02-14 11:29:16 -05:00
Chris Smowton
a62eae5a1e
Remove redundant conditions from HostnameVerificationCall.isIgnored
2022-02-14 16:26:41 +00:00
Jonathan Leitschuh
76964d58f2
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-14 11:04:31 -05:00
Jonathan Leitschuh
bb580ddbab
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-14 11:02:05 -05:00
Jonathan Leitschuh
7dee22a130
Fix implicit 'this' usage
2022-02-14 11:00:41 -05:00
luchua-bc
2b5982fd9d
Remove specified value step from additional taint step
2022-02-14 15:42:54 +00:00
yoff
3a995ec1b1
Update python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:08:44 +01:00
yoff
62598c0fd1
Update python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:07:40 +01:00
yoff
86786d3368
Update docs/codeql/support/reusables/frameworks.rst
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-14 16:05:59 +01:00
Asger Feldthaus
8b55a24e7c
JS: Add url-parse.qs as an alias for the querystringify library
2022-02-14 15:29:50 +01:00
luchua-bc
35a924292b
Model value passing between a setter and a getter call as a value step
2022-02-14 14:08:55 +00:00
Asger Feldthaus
f7108506f2
JS: Raise precision tag of js/request-forgery
2022-02-14 14:20:41 +01:00
Nick Rolfe
2633f9d02e
C#: delete externalData.rel in downgrade script
2022-02-14 12:25:32 +00:00
Nick Rolfe
6e7f5f8c12
C#: add DB upgrade and downgrade scripts
2022-02-14 12:16:39 +00:00
Nick Rolfe
d43a62a09f
C#: add externalData back to dbscheme
...
That table is still used, and is populated by the CSV extractor.
2022-02-14 12:09:00 +00:00
Rasmus Lerchedahl Petersen
d1200d0cd5
python: fix change-note formatting
2022-02-14 12:22:29 +01:00
Rasmus Lerchedahl Petersen
84447e4710
python: more detailed alert message
2022-02-14 11:55:07 +01:00
Rasmus Lerchedahl Petersen
bd14adefa0
python: add apologetic comment
2022-02-14 11:37:46 +01:00
Mathias Vorreiter Pedersen
9b8d85903c
Merge pull request #8011 from MathiasVP/revert-remove-legacy-tables
...
Revert "Merge pull request #7982 from jketema/remove-legacy-relations"
2022-02-14 10:32:01 +00:00
Mathias Vorreiter Pedersen
bc24b03d31
Merge pull request #8012 from erik-krogh/db-in-upgrade
...
QL: allow raw db types in upgrade/downgrade scripts
2022-02-14 10:24:55 +00:00
Erik Krogh Kristensen
8c7bf69a87
allow raw db types in upgrade/downgrade scripts without adding a warning for it
2022-02-14 10:40:07 +01:00
Mathias Vorreiter Pedersen
ab7850c581
Revert "Merge pull request #7982 from jketema/remove-legacy-relations"
...
This reverts commit 2b6d57d85b , reversing
changes made to 9b4dbb9dd8 .
2022-02-14 09:11:56 +00:00
Mathias Vorreiter Pedersen
2b6d57d85b
Merge pull request #7982 from jketema/remove-legacy-relations
2022-02-14 07:59:19 +00:00
Artem Smotrakov
48604cd7b3
Better HostnameVerificationCall.isIgnored()
2022-02-12 15:52:16 +00:00
Artem Smotrakov
36e565d673
Use classes from semmle.code.java.security.Encryption
2022-02-12 15:31:35 +00:00
Artem Smotrakov
651e43dee6
Clarify what verifier is
2022-02-12 12:24:48 +00:00
luchua-bc
78630f25dd
Match attribute name to reduce FP
2022-02-11 23:53:31 +00:00
Chuan-kai Lin
9b4dbb9dd8
Merge pull request #7895 from github/cklin/upgrades-initial-dbscheme
...
Upgrade scripts testing: set initial dbschemes
2022-02-11 11:06:12 -08:00
Andrew Eisenberg
0f3d780935
Merge pull request #7946 from github/aeisenberg/check-change-not
...
Workflows: Augment workflow to ensure failure with invalid change notes
2022-02-11 09:25:14 -08:00
Jeroen Ketema
7f4913d61f
Add change notes
2022-02-11 18:15:33 +01:00
Jeroen Ketema
9d7aa176f3
C++: Mark classes depending on removed relations as deprecated
...
Also ensure they no longer depend on the removed relations.
2022-02-11 18:04:17 +01:00
Nick Rolfe
b3048eed21
Merge pull request #7979 from github/nickrolfe/charp
...
C#: fix misspellings of 'csharp'
2022-02-11 16:57:59 +00:00
Erik Krogh Kristensen
a1c5724be7
fix most ql-for-ql warnings in JS
2022-02-11 17:57:37 +01:00
Andrew Eisenberg
5092493160
Update .github/workflows/validate-change-notes.yml
2022-02-11 08:41:20 -08:00
Jeroen Ketema
5205db9e17
C++: Add DB downgrade script
2022-02-11 16:36:21 +01:00
Jeroen Ketema
3033f3f89c
C++: Add DB upgrade script
2022-02-11 16:35:51 +01:00
Jeroen Ketema
94d3d63704
C++: Remove some unused legacy relations from the DB scheme
2022-02-11 16:35:08 +01:00
Erik Krogh Kristensen
360cf0ff17
Merge pull request #7981 from erik-krogh/erik-krogh/key-on-qlpacks
...
QL: add qlpack.yml to the cache key for QL-for-QL query build
2022-02-11 16:19:38 +01:00
Erik Krogh Kristensen
6639bdaf1e
add qlpack.yml to the cache key for QL-for-QL query build
2022-02-11 16:04:39 +01:00
Nick Rolfe
dc2f653496
Merge remote-tracking branch 'origin/main' into nickrolfe/charp
2022-02-11 14:56:15 +00:00
Erik Krogh Kristensen
25f6880809
Merge pull request #7980 from erik-krogh/fix-ql-pack
...
QL: fix pack name for ql-for-ql
2022-02-11 15:53:02 +01:00
Erik Krogh Kristensen
1fa5265a2e
fix pack name for ql-for-ql
2022-02-11 15:44:14 +01:00
Nick Rolfe
164cce7417
C#: fix misspellings of 'csharp'
2022-02-11 14:08:47 +00:00
Erik Krogh Kristensen
25d64a7901
Merge pull request #7930 from erik-krogh/rbApiIpa
...
RB: convert the ruby ApiGraphs to use IPA labels
2022-02-11 14:35:39 +01:00
luchua-bc
e3d0e9f083
Update normalized path node
2022-02-11 12:38:05 +00:00
Arthur Baars
678645ba57
Merge pull request #7883 from github/aibaars/ruby-cross
...
Ruby: add configuration for 'cross'
2022-02-11 13:15:34 +01:00
Arthur Baars
525c685584
Ruby: add configuration for 'cross'
2022-02-11 12:50:33 +01:00
Taus
d7f30de5b0
Merge pull request #7874 from RasmusWL/set-store-step
...
Python: Fix setStoreStep to use `SetElementContent`
2022-02-11 12:50:02 +01:00
Arthur Baars
a85b2093d6
Merge pull request #7969 from github/doc-remove-filter-queries
...
Docs: remove mention of 'filter queries'
2022-02-11 12:48:34 +01:00
github-actions[bot]
21bf29353f
Post-release preparation for codeql-cli-2.8.1
2022-02-11 11:07:31 +00:00
Taus
327e0dad72
Merge pull request #7674 from erik-krogh/dbTypeInNonLib
...
QL: Use of db-type outside language core.
2022-02-11 12:00:14 +01:00
Arthur Baars
47eb96d223
Docs: remove mention of 'filter queries'
2022-02-11 11:45:34 +01:00
Erik Krogh Kristensen
5a39708cf7
move TLabel to the Impl module and cache it
2022-02-11 10:54:45 +01:00
Erik Krogh Kristensen
36e02ae9ac
Merge pull request #7912 from erik-krogh/moarApi
...
JS: convert more type-trackers to API-graphs
2022-02-11 10:32:45 +01:00
Erik Krogh Kristensen
daa96cc218
change some docstrings based on review, and make fields private
2022-02-11 10:25:54 +01:00
Tom Hvitved
0f60401919
Merge pull request #2513 from hvitved/csharp/null-maybe-capture
...
C#: Remove FPs from `cs/dereferenced-value-may-be-null`
2022-02-11 10:21:15 +01:00
Erik Krogh Kristensen
6ae4652ce9
make the Impl module private again
2022-02-11 10:17:24 +01:00
Arthur Baars
74ed89409c
Merge pull request #7948 from github/release-prep/2.8.1
...
Release preparation for version 2.8.1
2022-02-11 10:13:34 +01:00
Erik Krogh Kristensen
3791b159fb
Merge pull request #7892 from erik-krogh/nanSan
...
JS: Add a `isNaN` sanitizer, and use it in queries that already had a typeof check
2022-02-11 10:13:06 +01:00
Erik Krogh Kristensen
2ffd79d451
Merge pull request #7921 from erik-krogh/snapdragon
...
JS: add model for the snapdragon library
2022-02-11 10:10:55 +01:00
Arthur Baars
58a2597c3a
C++: move change note lines to correct query pack
2022-02-11 09:52:36 +01:00
Tom Hvitved
987b11c362
Merge pull request #7926 from hvitved/csharp/brotli
...
C#: Use Brotli instead of Gzip
2022-02-11 09:29:04 +01:00
Tamás Vajk
c5d917eb72
Improve formatting of 0.0.9 release notes
2022-02-11 09:19:43 +01:00
Esben Sparre Andreasen
a4447ce372
Update javascript/ql/lib/semmle/javascript/frameworks/Snapdragon.qll
2022-02-11 08:20:02 +01:00
luchua-bc
12c53baba4
Simplify the query
2022-02-11 01:05:06 +00:00
Harry Maclean
017183e7f3
Merge pull request #7919 from github/hmac/open-uri
...
Ruby: recognise additional form for OpenURI
2022-02-11 14:03:26 +13:00
Andrew Eisenberg
cba9e0b267
Fix paths in check-change-note
...
Library pack changes were being ignored.
2022-02-10 14:36:23 -08:00
github-actions[bot]
f25fc70b7c
Release preparation for version 2.8.1
2022-02-10 22:08:24 +00:00
Andrew Eisenberg
9441ea940c
Workflows: Augment workflow to ensure failure with invalid change notes
2022-02-10 13:52:54 -08:00
Erik Krogh Kristensen
f41bc64e30
add change-note
2022-02-10 22:41:35 +01:00
Arthur Baars
c9f898745c
Merge pull request #7943 from github/aibaars/cpp-move-note
...
C++: move change note
2022-02-10 22:32:31 +01:00
Arthur Baars
6cba49abe3
C++: move change note
2022-02-10 22:13:54 +01:00
Arthur Baars
1fb3cbfeee
Merge pull request #7940 from github/aibaars/js-move-note
...
Javascript: move change note
2022-02-10 21:20:06 +01:00
Arthur Baars
61ba896343
Javascript: move change note
2022-02-10 20:58:49 +01:00
Tom Hvitved
2b2196d638
Merge pull request #7927 from github/hvitved-patch-1
...
Add C# 10 and .NET 6 to `versions-compilers.rst`
2022-02-10 20:43:33 +01:00
Erik Krogh Kristensen
eb56a5aef3
support more patterns that recognize valid numbers
2022-02-10 19:50:35 +01:00
Artem Smotrakov
0ba229a64b
Apply suggestions from code review (typos/formatting)
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-10 18:37:12 +00:00
Alex Ford
d55ba2542a
Ruby: fix an alert
2022-02-10 18:35:22 +00:00
Erik Krogh Kristensen
02ed1ca392
add missing qldoc
2022-02-10 18:06:53 +01:00
yoff
a2532a86ea
Merge pull request #7894 from tausbn/python-normalise-prefixes
...
Python: Normalise string prefixes
2022-02-10 17:57:11 +01:00
Erik Krogh Kristensen
9739929795
convert the ruby ApiGraphs to use IPA labels
2022-02-10 17:54:19 +01:00
Alex Ford
bc53570a25
Ruby: fewer mappings from dataflow nodes to ast nodes
2022-02-10 15:58:31 +00:00
Alex Ford
7c1bd9a533
Ruby: add a test case for cleartext logging that uses NonCleartextPasswordFlow
2022-02-10 15:50:56 +00:00
Alex Ford
83a3808bbe
Ruby: avoid marking mutator methods as being safe (i.e. not returning sensitive data)
2022-02-10 15:50:56 +00:00
Alex Ford
b46e4ccd71
Ruby: drop SanitizerIn from ClearTextLoggingQuery
2022-02-10 15:50:56 +00:00
Alex Ford
7b4af39315
Ruby: track masked variables potentially containing sensitive data more accurately
2022-02-10 15:50:56 +00:00
Alex Ford
59ab384825
Ruby: rb/clear-text-logging-sensitive-data - match on CFG nodes rather than AST nodes
2022-02-10 15:50:56 +00:00
Jonathan Leitschuh
eee521e6ce
Fix test failure for TempDirLocalInformationDisclosure
2022-02-10 10:40:40 -05:00
Tom Hvitved
a3d631f2df
Add C# 10 and .NET 6 to versions-compilers.rst
2022-02-10 15:45:00 +01:00
Tom Hvitved
1c66444a61
C#: Use Brotli instead of Gzip
2022-02-10 14:30:24 +01:00
Felicity Chapman
efed21b99a
Merge pull request #7885 from Marcono1234/marcono1234/extractor-doc-improvements
...
Fix and improve Extractor options documentation formatting
2022-02-10 12:59:45 +00:00
CodeQL CI
9ebbd9efa1
Merge pull request #7591 from asgerf/js/mysql-sinks
...
Approved by esbena
2022-02-10 12:50:36 +00:00
Felicity Chapman
5ec1fc11f9
Apply suggestions from code review
2022-02-10 12:41:37 +00:00
CodeQL CI
a57ee019c2
Merge pull request #7819 from asgerf/asgerf/ruby-def-nodes
...
Approved by hvitved
2022-02-10 12:37:34 +00:00
Taus Brock-Nannestad
be323bafaf
Merge remote-tracking branch 'upstream/main' into python-normalise-prefixes
2022-02-10 12:55:49 +01:00
CodeQL CI
1a91a79b5b
Merge pull request #5841 from erik-krogh/libCode
...
Approved by esbena, ethanpalm
2022-02-10 11:36:45 +00:00
Mathias Vorreiter Pedersen
d05dbb285c
Merge pull request #7841 from jketema/structured-bindings-fix
...
C++: Update C++ variable hiding test
2022-02-10 11:29:38 +00:00
Erik Krogh Kristensen
d55920ad27
add model for the snapdragon library
2022-02-10 11:32:59 +01:00
Jeroen Ketema
46821fe136
Update C++ variable hiding test
...
Structured bindings are now handled better, so the false negative
related to structured bindings is now a true positive.
2022-02-10 10:58:32 +01:00
Erik Krogh Kristensen
12d31d750a
convert more type-trackers to API-graphs
2022-02-10 09:54:52 +01:00
Stephan Brandauer
a73cdf3527
Merge pull request #7911 from kaeluka/javascript/add-getFlowLabel-to-PathNode
...
JS: add a getFlowLabel method to the PathNode class
2022-02-10 09:10:08 +01:00
Jonathan Leitschuh
bafcce17d4
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-09 22:14:17 -05:00
Harry Maclean
d966ca8466
Ruby: recognise additional form for OpenURI
2022-02-10 15:42:15 +13:00
luchua-bc
ce03aeb4d9
Fixed an issue related to normalized path
2022-02-09 23:19:40 +00:00
Rasmus Wriedt Larsen
94f9656e8e
Python: Solve deprecation warnings for old experimental queries
2022-02-10 00:09:43 +01:00
Harry Maclean
f30222256f
Merge pull request #7061 from github/hmac/actiondispatch
...
Ruby: Rails route resolution
2022-02-10 09:46:36 +13:00
Ethan Palm
2f7f9d9032
Move explanation of example above sample code
2022-02-09 10:45:24 -08:00
Jonathan Leitschuh
ded8d64301
Remove CAPC and add CWE-93
2022-02-09 12:31:53 -05:00
Jonathan Leitschuh
03fdee3767
Cleanup Netty Response Splitting Query
2022-02-09 12:28:11 -05:00
Jonathan Leitschuh
8ffe878722
Apply suggestions from code review
...
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com >
2022-02-09 12:28:11 -05:00
Jonathan Leitschuh
c732cb7759
Add HTTP Request Splitting to Netty Query
2022-02-09 12:28:10 -05:00
Stephan Brandauer
3e88d46e0f
add a getFlowLabel method to the PathNode class
2022-02-09 17:28:25 +01:00
Jonathan Leitschuh
49a73673b6
Fix FP from mkdirs call on exact temp directory
2022-02-09 11:04:23 -05:00
Tamás Vajk
6483a92587
Merge pull request #7865 from github/post-release-prep/codeql-cli-2.8.0
...
Post-release preparation for codeql-cli-2.8.0
2022-02-09 16:42:38 +01:00
Jonathan Leitschuh
787e3dac31
Update java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-09 10:07:56 -05:00
Tom Hvitved
c695388c29
Merge pull request #7891 from hvitved/ruby/dataflow/hide-ssa-nodes
...
Ruby: Hide more SSA nodes from data-flow path explanations
2022-02-09 15:56:15 +01:00
Tom Hvitved
0bd8411cb6
Ruby: Hide more SSA nodes from data-flow path explanations
2022-02-09 15:31:10 +01:00
Mathias Vorreiter Pedersen
336c25d929
Merge pull request #7913 from RasmusWL/ql-qlpacks
...
QL: Streamline qlpacks
2022-02-09 13:37:19 +00:00
Rasmus Wriedt Larsen
1f50624cf4
QL: Streamline qlpacks
...
So they follow the same format as the other languages.
`git grep codeql-ql` in the ql/ subfolder does not yield any results
now.
2022-02-09 14:08:36 +01:00
Rasmus Wriedt Larsen
9d5e8d5bd8
Merge pull request #7842 from RasmusWL/consistency-queires
...
Misc: Streamline `consistency-queries/qlpack.yml`
2022-02-09 13:42:18 +01:00
Nick Rolfe
1eba8277ee
Merge pull request #7614 from github/nickrolfe/array_flow_summaries
...
Ruby: add more Array/Enumerable flow summaries
2022-02-09 09:57:59 +00:00
Harry Maclean
f276904fa9
Ruby: Add nomagic pragma to helper
2022-02-09 22:38:35 +13:00
Michael Nebel
ff369f2a36
Merge pull request #7846 from michaelnebel/csharp/deconstruction
...
C# 10: Tuple deconstruction.
2022-02-09 10:08:16 +01:00
Mathias Vorreiter Pedersen
bbbb5268ce
Merge pull request #7881 from geoffw0/clrtxtperf
...
CPP: Fix performance for cpp/cleartext-transmission
2022-02-09 09:03:44 +00:00
Erik Krogh Kristensen
5340530cb7
use the number guard in existing queries that contained typeof checks
2022-02-09 09:51:57 +01:00
Erik Krogh Kristensen
d6721ec574
implement a isNaN guard for unsafe-shell-command-construction
2022-02-09 09:51:57 +01:00
Tom Hvitved
9440a45015
Merge branch 'main' into post-release-prep/codeql-cli-2.8.0
2022-02-09 09:40:33 +01:00
yoff
f21ac04285
Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-09 09:22:31 +01:00
luchua-bc
4609227e76
Use data model for request/session attribute operations
2022-02-09 03:24:46 +00:00
jorgectf
3ccac4ed8a
Update .expected
2022-02-08 23:59:36 +01:00
Jonathan Leitschuh
7f46640176
Consider calls to setReadable(false, false) then setReadable(true, true) to be safe
2022-02-08 17:57:10 -05:00
jorgectf
c6d8b97871
Make verifyCall() a private predicate
2022-02-08 23:37:17 +01:00
jorgectf
7b51b91d13
Improve test
2022-02-08 23:33:43 +01:00
jorgectf
ed60d16367
Refactor the way to check the verifying call
2022-02-08 23:33:30 +01:00
Jorge
f1fab98ea2
Merge branch 'github:main' into python_jwt
2022-02-08 23:12:58 +01:00
Taus Brock-Nannestad
54ae744b2c
Python: Also update Python 2 file
2022-02-08 22:08:53 +01:00
Harry Maclean
3206384884
Merge pull request #7824 from github/hmac/constantize
2022-02-09 08:30:21 +13:00
Chuan-kai Lin
a7f1ee574c
Upgrade scripts testing: set initial dbschemes
...
This commit sets initial dbschemes for cpp, csharp, java, javascript, and
python so that automated testing for upgrade scripts would also cover legacy
upgrades.
2022-02-08 11:11:41 -08:00
Tom Hvitved
b2419d60bd
Merge pull request #7090 from hvitved/ruby/perf
...
Ruby: Cache more predicates
2022-02-08 20:02:33 +01:00
Chris Smowton
143d64c92c
Merge pull request #7879 from github/smowton/admin/getting-started-mention-codeql-go-deps
...
Docs: Note codeql-go needs an install step before use
2022-02-08 18:07:26 +00:00
Alex Ford
81ed5d0ff7
Ruby: comment and node description fixes
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-02-08 18:03:29 +00:00
Taus Brock-Nannestad
6ea8986daa
Python: Normalise string prefixes
2022-02-08 16:48:17 +01:00
Erik Krogh Kristensen
4bbb7ad320
Merge pull request #7876 from erik-krogh/zipRelative
...
JS: recognize more startswith sanitizers for path-injection queries
2022-02-08 15:22:39 +01:00
Nick Rolfe
ade7921079
Merge pull request #7890 from github/nickrolfe/unique_node
...
Ruby/QL: add `unique` annotation on `node` column
2022-02-08 13:15:17 +00:00
Tom Hvitved
984e01ecf0
C#: Remove FPs from cs/dereferenced-value-may-be-null
...
Apply a conservative approach by filtering out results for accesses to
captured nullable values, when there is an (implicit) call to the capturing
callable which is `null`-guarded. For example:
```
bool M(int? i, IEnumerable<int> @is)
{
if (i.HasValue)
return @is.Any(j => j == i.Value); // GOOD
return false;
}
```
2022-02-08 14:01:57 +01:00
Tom Hvitved
7948d965a0
C#: Add nullness tests for captured variables
2022-02-08 13:52:29 +01:00
Tom Hvitved
3b5267eca5
Ruby: Cache DataFlow::Node::{toString,getLocation}
2022-02-08 13:03:42 +01:00
Tom Hvitved
f337459a4a
Ruby: Cache capturedEntryWrite
2022-02-08 13:03:42 +01:00
Tom Hvitved
b041bc03d1
Ruby: Cache ConditionBlock::(immediately)Controls
2022-02-08 13:03:41 +01:00
Tom Hvitved
4037d1ff96
Ruby: Cache ErbDirective::getAChildStmt
2022-02-08 13:03:41 +01:00
Tom Hvitved
4c5f32ba4a
Ruby: Cache exprNodeReturnedFrom
2022-02-08 13:03:31 +01:00
Tom Hvitved
45412fa17f
Cache hasLocalSource
2022-02-08 13:03:27 +01:00
Chris Smowton
a6596ea7ce
Fix test requirements, formatting
2022-02-08 12:01:32 +00:00
Erik Krogh Kristensen
28ba78cb76
add explicit this
2022-02-08 12:20:21 +01:00
Michael Nebel
c04e344192
Merge pull request #7749 from michaelnebel/csharp/lambda-improvements
...
C# 10 - Lambda improvements.
2022-02-08 11:28:55 +01:00
Benjamin Muskalla
b62df5a9ad
Merge pull request #7872 from bmuskalla/fixCoverageCollection
...
Collect framework coverage on demand
2022-02-08 11:27:48 +01:00
Henry Mercer
eff0ca01b1
Merge pull request #7417 from github/henrymercer/java/update-telemetry-query-metadata
...
Java: Start running telemetry queries on Code Scanning
2022-02-08 10:26:30 +00:00
Chris Smowton
79654592d9
Apply suggestions from code review
2022-02-08 10:23:46 +00:00
Benjamin Muskalla
ff8a96b96d
Rename framework coverage query
...
Move it to the other summary queries, update all references.
2022-02-08 11:14:03 +01:00
Rasmus Wriedt Larsen
a8edd44a3c
Python: Update .expected
2022-02-08 11:12:34 +01:00
Benjamin Muskalla
85a8efab63
Update .github/workflows/csv-coverage-metrics.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:07:56 +01:00
Benjamin Muskalla
6e3d2a2046
Update misc/suite-helpers/security-and-quality-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:07:35 +01:00
Benjamin Muskalla
fb91821882
Update misc/suite-helpers/security-extended-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:51 +01:00
Benjamin Muskalla
94c517efd6
Update misc/suite-helpers/code-scanning-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:35 +01:00
Benjamin Muskalla
284c397883
Update misc/suite-helpers/lgtm-selectors.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:30 +01:00
Benjamin Muskalla
e7823a78ef
Update .github/workflows/csv-coverage-metrics.yml
...
Co-authored-by: Henry Mercer <henry.mercer@me.com >
2022-02-08 11:06:21 +01:00
Nick Rolfe
fa16ff9ffc
QL for QL: make node column unique
2022-02-08 09:59:11 +00:00
Nick Rolfe
8881031d0a
Ruby: add upgrade/downgrade scripts
2022-02-08 09:57:55 +00:00
Nick Rolfe
2037368f62
Ruby: make node column unique
2022-02-08 09:55:34 +00:00
Nick Rolfe
dbe2951aec
Merge pull request #7880 from github/nickrolfe/locations_column_ql
...
QL for QL: sync changes from Ruby
2022-02-08 09:53:06 +00:00
CodeQL CI
db8ffb5ba9
Merge pull request #7870 from erik-krogh/nodeReExport
...
Approved by esbena
2022-02-08 09:44:25 +00:00
Erik Krogh Kristensen
d73b2effa0
rename maybeGetJoinArg maybeGetPathSuffix
2022-02-08 10:42:06 +01:00
Asger Feldthaus
862c3b9752
Ruby: autoformat
2022-02-08 10:22:15 +01:00
Asger Feldthaus
2b36703bfb
Ruby: add def= tags to API graph test
2022-02-08 10:20:25 +01:00
Geoffrey White
6005f3d2d4
C++: Add pragma[noinline].
2022-02-08 09:13:51 +00:00
Asger Feldthaus
66b1c86402
Ruby: update qldoc for def predicate
2022-02-08 10:00:14 +01:00
Asger Feldthaus
9ac526be89
Ruby: change binding for getParameter/getKeywordParameter
2022-02-08 09:36:05 +01:00
Asger Feldthaus
073493bb2e
Ruby: fix qldoc for getMethod
2022-02-08 09:28:07 +01:00
luchua-bc
ff4826d203
Correct the data model and update qldoc
2022-02-08 04:02:27 +00:00
Erik Krogh Kristensen
cc3f9bf2a8
fix performance issue by inlining a simpler version of getASourceProp
2022-02-08 00:22:01 +01:00
Erik Krogh Kristensen
aa95dd4ec7
fix typo
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-02-08 00:19:40 +01:00
Harry Maclean
3031b39dc1
Ruby: prevent bad join in ActionController.qll
2022-02-08 12:10:23 +13:00
Marcono1234
d0547cdbfd
Fix and improve Extractor options documentation formatting
2022-02-07 21:05:14 +01:00
Jonathan Leitschuh
c4112e6d4c
Post refactor fixiup
2022-02-07 15:02:13 -05:00
Chris Smowton
de38638db6
Combine CWE-200 queries
2022-02-07 14:22:36 -05:00
Rasmus Wriedt Larsen
eb109828c0
Merge pull request #7252 from museljh/feature/cwe-338
...
Python: CWE-338 insecureRandomness
2022-02-07 19:30:06 +01:00
Nick Rolfe
073d325750
QL for QL: update dbscheme stats
2022-02-07 17:54:35 +00:00
Nick Rolfe
3ee109731a
QL for QL: sync changes from Ruby
...
In particular, update the dbscheme to put location columns in a single
table.
2022-02-07 17:44:40 +00:00
Nick Rolfe
9217d0e1b9
Merge pull request #7875 from github/nickrolfe/locations_column
...
Ruby: put AST node locations in a single table
2022-02-07 17:43:33 +00:00
Geoffrey White
6727069893
C++: Autoformat.
2022-02-07 17:33:11 +00:00
Geoffrey White
d1b6871314
C++: Restrict type.
2022-02-07 17:32:52 +00:00
Geoffrey White
005dfdffdb
C++: Speed up cpp/cleartext-transmission ('Encrypted' class).
2022-02-07 17:19:25 +00:00
Chris Smowton
27b9e1c01b
Docs: Note codeql-go needs an install step before use
2022-02-07 16:11:42 +00:00
Erik Krogh Kristensen
b59c7911a3
update locations of expected output
2022-02-07 15:23:26 +01:00
Erik Krogh Kristensen
ca5f91e587
recognize more startswith sanitizers for path-injection queries
2022-02-07 14:19:13 +01:00
Michael Nebel
f21e084628
C#: Fix issue in naming of class in test file.
2022-02-07 14:15:59 +01:00
Michael Nebel
f5fc15e74d
C#: Add some testcases to cover mixed assignment and declarations in tuples.
2022-02-07 14:11:31 +01:00
Michael Nebel
0cf4b3fbcc
C#: Added dataflow testcases for tuple mixed initialization and assignment.
2022-02-07 14:11:31 +01:00
Michael Nebel
bcf732a7cb
C#: Re-factor tuple tests to use the default value flow configuration.
2022-02-07 14:11:31 +01:00
Michael Nebel
f478bf5b9b
Merge pull request #7809 from michaelnebel/csharp/test-pattern-match-flow
...
C#: Add flow test cases for undetected value flow, when making variable bindings in pattern matching.
2022-02-07 14:05:50 +01:00
Nick Rolfe
881776a2ac
Ruby: delete commented-out code
2022-02-07 12:50:06 +00:00
Nick Rolfe
e049f08c24
Ruby: update dbscheme stats
2022-02-07 12:42:34 +00:00
Erik Krogh Kristensen
6f28cb9201
lower the precision of js/unsafe-code-construction
2022-02-07 13:35:29 +01:00
Erik Krogh Kristensen
06f9924194
add change note
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
896d2bad0e
update expected output now that JSON.stringify() is seen as a sanitizer
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d1d4ebb3b5
add values written to the global scope as exports
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
91b03f56ad
move .qll files from src to lib
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
eb133f59f6
update qhelp to focus on properly documenting potentially unsafe library functions
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
a9f7756788
reuse utility predicate
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
681179dcbb
add comment about parameters named "code"
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
53315e6ab6
ignore sources named "code"
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
59cc099008
add missing qldoc
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d77c28f6a7
add qhelp for unsafe-code-construction
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
d790f3ccbb
add test for unsafe-code-construction query
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
198a464346
add js/unsafe-code-construction query
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
955ad8c458
add JSON.stringify as a code-injection sanitizer
2022-02-07 13:34:18 +01:00
Erik Krogh Kristensen
68a5c1f5b5
add code-injection sink for calls to node
2022-02-07 13:34:18 +01:00
Rasmus Wriedt Larsen
62702d0ca9
Python: Fix setStoreStep to use SetElementContent
2022-02-07 13:18:36 +01:00
Nick Rolfe
b3b2bba618
Ruby: make some generated predicates final
2022-02-07 12:17:50 +00:00
Nick Rolfe
b43cc23277
Ruby: add db downgrade script
2022-02-07 12:10:36 +00:00
Nick Rolfe
e8855c3718
Ruby: add db upgrade script
2022-02-07 12:10:36 +00:00
Nick Rolfe
388d361ec3
Ruby: put AST node locations in a single table
2022-02-07 12:10:36 +00:00
Michael Nebel
99f89f1fe2
C#: Update db stats file.
2022-02-07 12:57:10 +01:00
Mathias Vorreiter Pedersen
55e69d421c
Merge pull request #7849 from Yonah125/main
...
C/C++: Useless Test : verification of "Fully converted" Type
2022-02-07 11:46:51 +00:00
Benjamin Muskalla
2f94356899
Run daily
2022-02-07 12:12:29 +01:00
Benjamin Muskalla
bd417769ce
Add workflow to upload metrics
2022-02-07 12:08:18 +01:00
Benjamin Muskalla
a1432c47dc
Exclude framework coverage query from suites
...
We don't want to run this query on any database but rather
in a specific setup. Exclude from suites by default.
2022-02-07 12:08:18 +01:00
Benjamin Muskalla
9af50f5216
Turn framework coverage into metric query
2022-02-07 12:08:18 +01:00
Jeroen Ketema
1f2865c7cc
Merge pull request #7798 from jketema/missing-open-arg
...
C++: Add query for missing mode argument in `open`/`openat` calls
2022-02-07 12:01:44 +01:00
BACK Yonah
61dc9ef12e
C/C++: AutoFormat fix
2022-02-07 11:41:17 +01:00
Rasmus Wriedt Larsen
32cd7d6fa7
Add groups to all consistency-queries/qlpack.yml
...
as discussed in PR review
2022-02-07 11:15:48 +01:00
Tom Hvitved
dc09e87cb2
Ruby: Use SimpleSummarizedCallable in a few more places
2022-02-07 11:05:32 +01:00
Erik Krogh Kristensen
0584a6acaf
recognize a nodejs re-exports in a loop
2022-02-07 10:12:38 +01:00
Michael Nebel
b2e18ebae1
C#: Lambda improvements change note.
2022-02-07 09:22:46 +01:00
Michael Nebel
782d6da754
C#: Support for lambda expression explicit return types and lambda attributes.
2022-02-07 09:19:47 +01:00
github-actions[bot]
b4ab86c020
Post-release preparation for codeql-cli-2.8.0
2022-02-06 23:34:07 +00:00
Arthur Baars
ac03fab986
Merge pull request #7753 from aibaars/ruby-3.1
...
Ruby 3.1 features
2022-02-06 21:06:16 +01:00
Artem Smotrakov
f53b2fcc62
Updated IgnoredHostnameVerification.ql to cover more uses of HostnameVerifier.verify()
2022-02-06 11:23:20 +00:00
Jonathan Leitschuh
1f47ea5164
Update to new change note format
2022-02-04 17:16:12 -05:00
Jonathan Leitschuh
0268dd9f0a
Add file creation sanitizer
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
9299c7996d
Add information disclosure test fix suggestions
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
0a621c2801
Fix the formatting in TempDirLocalInformationDisclosureFromMethodCall
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
79db76dcf8
Fix test failures TempDirLocalInformationDisclosureFromSystemProperty
2022-02-04 17:10:27 -05:00
Jonathan Leitschuh
d5c9af31b2
Fixup documentation/code from PR feedback
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
f7a4aac525
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
a4b5573f53
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
a8d25b63ac
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-04 17:10:26 -05:00
Chris Smowton
e795823d97
Autoformat TempDirUtils.qll
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
7e514e9ef9
Add QLdoc and fix Compiler Errors in Tests
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
cb30385684
Update java/ql/src/Security/CWE/CWE-200/TempDirUtils.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-04 17:10:26 -05:00
Jonathan Leitschuh
df716cbaa0
Revert changes to MethodAccessSystemGetProperty
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
66831989b7
Add QLdoc to TempDirUtils
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
7e55c92eb4
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
c19f52cd04
Add release notes for "Temporary Directory Local information disclosure"
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
f6067d28f9
Fix file names and formatting from PR feedback
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
41b5011b81
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
7929faedc0
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
f910fd4719
Remove path flow tracking in 'TempDirLocalInformationDisclosureFromMethodCall'
2022-02-04 17:10:25 -05:00
Jonathan Leitschuh
e4c017e888
Apply suggestions from code review
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
13fed0e9b6
Temp Dir Info Disclosure: Final pass and add documentation
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
bc12e994b0
Add java.nio.file.Files API checks
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
ecad7534ae
Add mkdirs check
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
cf0ed81575
Add TempDir taint tracking for Files.write
2022-02-04 17:10:24 -05:00
Jonathan Leitschuh
3a15678b1e
Java: CWE-200: Temp directory local information disclosure vulnerability
2022-02-04 17:10:23 -05:00
Erik Krogh Kristensen
ab2d3a7ca0
Merge pull request #7828 from Naman-ntc/main
...
JS: Adding model for `.get` function of `Map` in Unvalidated Dynamic Method Call
2022-02-04 20:19:02 +01:00
Erik Krogh Kristensen
f00d723c49
Merge pull request #7843 from erik-krogh/CVE-2021-23484
...
JS: add file sources from `jszip` to `js/zip-slip`
2022-02-04 20:17:43 +01:00
BACK Yonah
21fdc53d62
C/C++: Using UnspecifiedType instead of Type
2022-02-04 19:12:15 +01:00
Nick Rolfe
9744cf2457
Ruby: apply suggested simplification from review
2022-02-04 17:14:47 +00:00
Nick Rolfe
aaff3226c9
Ruby: prefer ...isInt(x) over x = ...getInt()
2022-02-04 17:10:22 +00:00
BACK Yonah
b2ca25abef
Merge branch 'main' of https://github.com/github/codeql
2022-02-04 18:09:19 +01:00
BACK Yonah
f4a1d1d5e6
C/C++: Useless Test Fully converted verification
2022-02-04 18:05:03 +01:00
Nick Rolfe
45962f1cad
Ruby: make this unique for each method
...
Even when summaries are shared in a single class.
2022-02-04 17:03:55 +00:00
BACK Yonah
34320cb57b
C/C++: Useless Test Fully converted verification
2022-02-04 18:03:29 +01:00
Ian Wright
6c3daf49f9
Merge pull request #7785 from github/z80coder/impose-length-restriction
...
Restrict AST nodes according to string length
2022-02-04 16:35:04 +00:00
Nick Rolfe
7a9ddc28bf
Ruby: address some more feedback on array flow summaries
2022-02-04 16:33:27 +00:00
Henry Mercer
bb1e89d261
Merge pull request #7848 from github/henrymercer/js-ml-powered-codeowners
...
JS: Add codeowners for ML-powered queries
2022-02-04 16:08:56 +00:00
Michael Nebel
6ee30843bb
C#: Add lambda attributes test cases.
2022-02-04 16:54:49 +01:00
Henry Mercer
22ef35e13a
JS: Add codeowners for ML-powered queries
...
Create a new reviewers team @github/codeql-ml-powered-queries-reviewers
for reviewing ML-powered queries and the associated CodeQL libraries.
2022-02-04 15:49:44 +00:00
Ian Wright
be5e8dae05
Update javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/FunctionBodyFeatures.qll
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-02-04 15:41:50 +00:00
Michael Nebel
7b3ba3cb96
C#: Modify database schema to allow lambda expression to be attributable and extract the lambda expression attributes.
2022-02-04 16:34:58 +01:00
Michael Nebel
f412d49ba4
C#: Add some examples lambdas with different kind of attributes and update existing testcases.
2022-02-04 16:34:58 +01:00
Michael Nebel
bb3f9cea3a
C#: Update test cases(s) expected output.
2022-02-04 16:34:58 +01:00
Michael Nebel
7520948ec4
C#: Add test case for finding lambdas with explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
83a5ef4961
C#: Examples of lambda expressions with explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
25019dbaa0
C#: Add support QL library support for lambda explicit return types.
2022-02-04 16:34:58 +01:00
Michael Nebel
eb8c226749
C#: Add support for explicit return types in the extractor.
2022-02-04 16:34:58 +01:00
Michael Nebel
ae62704d3a
C#: Add table for explicit return type in lambda expressions.
2022-02-04 16:34:57 +01:00
Michael Nebel
ccb727e3ca
C#: Test cases that shows that lambdas can be naturally (implicitly) typed and that the type is indistinguishable from the equivalent explicitly typed declaration.
2022-02-04 16:34:57 +01:00
Michael Nebel
a67033034a
C#: Example of naturally typed lambda.
2022-02-04 16:34:57 +01:00
Ian Wright
e57a0e0e2f
Update javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/FunctionBodyFeatures.qll
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-02-04 15:21:56 +00:00
Ian Wright
b38335a6c2
add QL comment; inline a predicate; restore a comment
2022-02-04 15:21:09 +00:00
Nick Rolfe
ed00f2b0d2
Ruby: address some feedback on array flow summaries
2022-02-04 13:40:39 +00:00
Erik Krogh Kristensen
edcb3ba902
add file sources from jszip to js/zip-slip
2022-02-04 14:39:49 +01:00
Tom Hvitved
693aa69abd
Update csharp/ql/consistency-queries/qlpack.yml
2022-02-04 14:38:25 +01:00
yoff
182c62f5c3
Merge pull request #7838 from tausbn/python-fix-charset-performance-problem
...
Python: Fix performance issue in `charSet`
2022-02-04 14:18:13 +01:00
Michael Nebel
567768134f
Merge pull request #7792 from michaelnebel/csharp/attributes
...
C#: Attribute kind and return value attributes.
2022-02-04 14:10:51 +01:00
Taus
67be20f368
Python: Remove implied inequalities
...
Also gets rid of `inner_end`, since we're already doing `end - 1 = ...`
in the other fix (and so this is more consistent).
2022-02-04 12:46:06 +00:00
Benjamin Muskalla
eee03ebe3b
Merge pull request #7767 from bmuskalla/regenerateModelScript
...
Java: Regenerate framework models automatically
2022-02-04 13:29:46 +01:00
Naman Jain
009c95774e
update expected files
2022-02-04 12:28:17 +00:00
Michael Nebel
6487b546dc
C#: Update TargetFramework testcases expected files as well, as these also uses the string representation of the attributes.
2022-02-04 13:05:08 +01:00
Nick Rolfe
161d766ba9
Ruby: address review comments on array_flow.rb
2022-02-04 11:59:59 +00:00
Michael Nebel
ade119f4a8
C#: Add flow test cases for undetected value flow, when making variable bindinds in pattern matching.
2022-02-04 12:57:58 +01:00
Jeroen Ketema
b967eaf25d
Add documentation for parseHex
2022-02-04 12:35:13 +01:00
Rasmus Wriedt Larsen
c817ba5718
Python: Add consistency-queries/qlpack.yml
...
But no queries yet
2022-02-04 12:08:54 +01:00
Rasmus Wriedt Larsen
0bcfc4b657
Ruby: Update consistency-queries/qlpack.yml
...
I'm not sure whether this means the consistency queries were run using
the 0.0.1 release of the `codeql/ruby-all` qlpack, but using `"*"` at
least ensures that it is always using the version from the CodeQL repo.
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
580d7d9df0
QL: Update consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
1db4bdc607
C#: Update consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
2220d3cc47
Misc: Allow */ql/consistency-queries/qlpack.yml
2022-02-04 12:06:50 +01:00
Rasmus Wriedt Larsen
2e788ea86e
Python: Accept deprecation warnings for old tests
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
438a01e911
Python: Deprecate old bottle points-to extension
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
c9e36aaf72
Python: Fix deprecated deprecated
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
9ec531f040
Python: Add deprecation change-note
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
84fdd8a739
Python: Add non-deprecated httpVerb to Concepts
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
5a032d6f84
Python: deprecate old taint-tracking related predicates
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
dba6b60c80
Python: Deprecate old library modeling
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
a40fdf7a7c
Python: Deprecate old web modeling
2022-02-04 12:02:08 +01:00
Michael Nebel
f365477996
C#: Address review comments and update test output.
2022-02-04 11:48:12 +01:00
Benjamin Muskalla
bc5753cb20
Fix path expression
2022-02-04 11:43:18 +01:00
Naman Jain
5e1ca3154f
Update javascript/ql/test/query-tests/Security/CWE-754/UnvalidatedDynamicMethodCallGood3.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-04 16:13:05 +05:30
Naman Jain
5121414a53
Update javascript/ql/test/query-tests/Security/CWE-754/UnvalidatedDynamicMethodCallGood4.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-02-04 16:12:58 +05:30
Rasmus Wriedt Larsen
e9b496ba73
Merge pull request #7831 from RasmusWL/printast-remove-regexp
...
Python: Remove `RegExpTerm` from PrintAST
2022-02-04 11:38:58 +01:00
Asger Feldthaus
0a0d9583b4
Ruby: rephase comment for MkDef
2022-02-04 11:37:54 +01:00
Mathias Vorreiter Pedersen
2e2913b921
Merge pull request #7839 from rdmarsh2/rdmarsh2/ir-initializer-inheritance-fix
...
C++: fix IR generation for constructor base inits when no constructor is present.
2022-02-04 10:32:57 +00:00
Asger Feldthaus
0189e8abb4
Ruby: autoformat
2022-02-04 11:32:31 +01:00
Benjamin Muskalla
fcaead4004
Enable debugging action
2022-02-04 11:29:36 +01:00
Benjamin Muskalla
b747391c74
Improve error handling and refactor base path
2022-02-04 11:26:19 +01:00
Asger Feldthaus
87c62db781
Ruby: disable test line not currently working
2022-02-04 11:20:42 +01:00
Asger Feldthaus
75b72361ce
Ruby: add toString and locations to the new node types
2022-02-04 11:20:42 +01:00
Asger Feldthaus
7373a503f6
Ruby: Populate ArgumentPosition based on keyword arguments
2022-02-04 11:20:42 +01:00
Asger Feldthaus
5e350a0270
Ruby: Derive edge labels from {Argument,Parameter}Position
2022-02-04 11:20:42 +01:00
Asger Feldthaus
040e56623c
Ruby: add getAValueReachingRhs
2022-02-04 11:20:42 +01:00
Asger Feldthaus
17dd5cd581
Ruby: remove a stray TODO
2022-02-04 11:20:42 +01:00
Asger Feldthaus
d2e381aa79
Ruby: more def-node tests
2022-02-04 11:20:41 +01:00
Asger Feldthaus
32e0f42969
Ruby: refactor Return(x) to Method(x).return
2022-02-04 11:20:39 +01:00
Asger Feldthaus
55b5f19b92
Ruby: Add def-nodes to API graphs
2022-02-04 11:06:35 +01:00
Asger Feldthaus
9c17a5ce99
Ruby: replace "instance" label with a call to new
2022-02-04 11:03:25 +01:00
Asger Feldthaus
5858732da1
Ruby: change useStep signature
2022-02-04 11:01:04 +01:00
Asger Feldthaus
e6fdd4d34a
Ruby: Make hasLocalSource private/cached
2022-02-04 11:01:03 +01:00
Asger Feldthaus
9a496e647f
Ruby: Drive-by fix type-tracking through params with default values
2022-02-04 11:01:03 +01:00
Esben Sparre Andreasen
d08c0f7852
Merge pull request #7817 from github/esbena-patch-7
...
Document and format event-stream-orig.js
2022-02-04 10:26:30 +01:00
Jeroen Ketema
9f4e261625
Set precision of cpp/open-call-with-mode-argument to high
2022-02-04 10:01:25 +01:00
Jeroen Ketema
ef2a70e00c
Limit open/openat target to global/std scope
2022-02-04 09:51:10 +01:00
Mathias Vorreiter Pedersen
bc17df55ee
Merge pull request #7830 from MathiasVP/fix-ir-reevaluation-in-return-stack-allocated-memory
...
C++: Fix re-evaluation in `cpp/return-stack-allocated-memory`
2022-02-04 08:32:40 +00:00
Esben Sparre Andreasen
72b5edc144
Document and format event-stream-orig.js
...
Some anti-virus products (rightfully) flag this event-stream-orig.js as a malicious file.
This change does two things:
- neutralises the file such that the code can not be run accidentally
- documents the purpose of the file
2022-02-04 09:27:47 +01:00
Harry Maclean
ab7fd89653
Merge pull request #7663 from github/hmac/api-graph-subclass
...
Ruby: Add basic subclassing support to API Graphs
2022-02-04 10:19:07 +13:00
Harry Maclean
e328c6222a
Merge pull request #7797 from github/hmac/pin-rust
...
Ruby: Pin Rust to 1.54
2022-02-04 10:18:46 +13:00
Taus
22aa4c9379
Python: Fix performance issue in charSet
...
Observed on `mozilla/bugbug` on the 2.8.0 CLI branch, we had the
following line in the timing report:
```
FullServerSideRequestForgery.ql-17:regex::RegexString::charSet_dispred#fff#antijoin_rhs ............... 1m13s
```
Inspecting the logs, we see the following join:
```
(644s) Tuple counts for regex::RegexString::charSet_dispred#fff#antijoin_rhs/5@f295d1bk after 1m13s:
1 ~0% {1} r1 = CONSTANT(unique string)["]"]
2389 ~4% {3} r2 = JOIN r1 WITH regex::RegexString::nonEscapedCharAt_dispred#fff_201#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Rhs.2 'arg1', (Rhs.2 'arg1' + 1)
668873 ~0% {6} r3 = JOIN r2 WITH regex::RegexString::char_set_start_dispred#fff ON FIRST 1 OUTPUT Lhs.0 'arg0', "]", Lhs.1 'arg1', Lhs.2 'arg2', Rhs.1 'arg3', Rhs.2 'arg4'
537501371 ~4% {7} r4 = JOIN r3 WITH regex::RegexString::nonEscapedCharAt_dispred#fff_021#join_rhs ON FIRST 2 OUTPUT Lhs.0 'arg0', Lhs.2 'arg1', Lhs.3 'arg2', Lhs.4 'arg3', Lhs.5 'arg4', "]", Rhs.2
269085087 ~0% {7} r5 = SELECT r4 ON In.6 > In.4 'arg4'
89583155 ~3% {7} r6 = SELECT r5 ON In.6 < In.1 'arg1'
89583155 ~26634% {5} r7 = SCAN r6 OUTPUT In.0 'arg0', In.1 'arg1', In.2 'arg2', In.3 'arg3', In.4 'arg4'
return r7
```
Now, this is problematic not just because of the large intermediary join
but also because of the large number of tuples being materialised at the
end. The culprit in this case turns out to be this bit of `charSet`:
```
not exists(int mid | this.nonEscapedCharAt(mid) = "]" | mid > inner_start and mid < inner_end)
```
Rewriting this to instead look for the minimum index at which a `]`
appears resulted in a much nicer join.
I also fixed up a similar issue surrounding the `\N` unicode escape.
Not that I think this will necessarily be relevant, but the `min`-based
solution is more robust either way.
2022-02-03 20:42:04 +00:00
Robert Marsh
8544cff1c4
Merge pull request #7836 from geoffw0/clrtxt9
...
C++: Fix more FPs in cpp/cleartext-transmission
2022-02-03 15:18:55 -05:00
Chuan-kai Lin
c8bc5cfa75
Merge pull request #7825 from github/cklin/python-downgrade-scripts
...
Python: adjust downgrade script location and format
2022-02-03 11:40:07 -08:00
Michael Nebel
32756cd442
C#: Update stats after the change in the attributes relation.
2022-02-03 20:00:33 +01:00
Robert Marsh
55cbff7614
C++: fix for constructor init without constructor
2022-02-03 13:44:02 -05:00
Harry Maclean
912842623d
Simplify cache key
2022-02-04 07:41:29 +13:00
Robert Marsh
836c47abb3
C++: test for constructor init without constructor
2022-02-03 13:34:05 -05:00
Geoffrey White
8031c3f699
Merge branch 'main' into clrtxt9
2022-02-03 17:01:59 +00:00
Geoffrey White
02b1774d7f
C++: Switch from GVN to localFlow.
2022-02-03 16:00:26 +00:00
Tom Hvitved
ef227a4721
Merge pull request #7784 from hvitved/csharp/dotnet6
...
C#: Use .NET 6
2022-02-03 16:42:26 +01:00
Geoffrey White
3cfd1b5052
C++: More test cases.
2022-02-03 15:11:59 +00:00
Rasmus Wriedt Larsen
8386b36217
Python: Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-02-03 15:00:04 +01:00
Geoffrey White
3b844f701e
C++:Change note.
2022-02-03 13:58:38 +00:00
Rasmus Wriedt Larsen
cf68148316
Python: Add change-note
2022-02-03 14:29:02 +01:00
Rasmus Wriedt Larsen
e2de0e61ca
Python: Remove RegExpTerm from PrintAST
...
Since this caused bad performance (as we had to evaluate points-to).
Fixes https://github.com/github/codeql/issues/6964
This approach was motivated by the comment on the issue from @tausbn:
> We discussed this internally in the CodeQL Python team, and have
> agreed that the best approach for now is to disable the printing of
> regex ASTs.
I tried to keep our RegExpTerm logic, but doing the fix below did not
work, and still evaluated RegExpTerm :| I guess we will just have to
revert this PR if we want it back
```diff
TRegExpTermNode(RegExpTerm term) {
+ none() and
exists(StrConst str | term.getRootTerm() = getParsedRegExp(str) and shouldPrint(str, _))
}
```
2022-02-03 14:22:14 +01:00
Arthur Baars
6525035f0a
Address comments
2022-02-03 13:47:03 +01:00
Erik Krogh Kristensen
e93c46ad31
Merge pull request #7811 from erik-krogh/pyApiIpa
...
Python: refactor API-graph labels to an IPA type
2022-02-03 12:31:39 +01:00
Mathias Vorreiter Pedersen
58993e2dc6
C++: Fix re-evaluation by importing GVN.
2022-02-03 11:16:14 +00:00
Jeroen Ketema
0b9b6d7b98
Address review comments
2022-02-03 12:09:18 +01:00
Erik Krogh Kristensen
5284bbb6b3
Merge pull request #7821 from erik-krogh/upload-sarif
...
QL: upload sarif as part of the QL-for-QL workflow
2022-02-03 12:05:51 +01:00
Jeroen Ketema
4d03082f16
Ensure that O_CREAT and O_TMPFILE are unique
2022-02-03 11:24:20 +01:00
Henry Mercer
224d7a7ce0
Merge pull request #7801 from github/henrymercer/js-atm-migrate-tests
...
JS: Migrate CodeQL tests for ML-powered queries
2022-02-03 10:17:19 +00:00
Ian Wright
dca03d7b5d
reinstate the AST node limit to minimize change to feature values
2022-02-03 09:45:35 +00:00
Ian Wright
d5ab119039
actually count the number of chars
2022-02-03 09:41:51 +00:00
Jeroen Ketema
e1ca5dd120
Simplify text in change note
2022-02-03 10:36:30 +01:00
Naman Jain
9809d30f00
file renaming and updated expected file
2022-02-03 09:35:17 +00:00
Naman Jain
adc8bf37fe
fixed mistake in examples
2022-02-03 09:29:42 +00:00
Jeroen Ketema
5a2ce225f4
Check that all bits are set when checking for a flag
...
The `O_...` macro definitions somtimes set multiple bits, while
the bits individually represent the values of different `O_...`
macros. This lead to false postives on codebases built against
Musl libc, which defines `O_TMPFILE` as `020200000` and
`O_DIRECTORY` as `0200000`.
2022-02-03 10:29:13 +01:00
Tony Torralba
3c9b332ce0
Merge pull request #7826 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-02-03 09:38:53 +01:00
Tom Hvitved
6bb71f051b
Merge pull request #7791 from hvitved/dataflow/inline-local-flow-star
...
Data flow: Inline `local(Expr|Instruction)?(Flow|Taint)`
2022-02-03 09:02:43 +01:00
Harry Maclean
c65ca8ff86
Model calls to constantize as code executions
...
`constantize` is an ActiveSupport extension to `String` that attempts to
look up a constant with a name matching the receiver.
2022-02-03 15:22:07 +13:00
github-actions[bot]
2a9f98cce0
Add changed framework coverage reports
2022-02-03 00:10:33 +00:00
Harry Maclean
704b58519f
Ruby: Include subclasses in more API calls
...
Change the behaviour of `API::getInstance()` and `API::getReturn()` to
include results on subclasses of the current API node.
2022-02-03 11:35:59 +13:00
Chuan-kai Lin
df91ee6616
Python: adjust downgrade script location and format
2022-02-02 14:23:21 -08:00
Harry Maclean
61cd05cfc5
Ruby: Ensure TRoute and TRouteBlock are private
2022-02-03 10:55:28 +13:00
Harry Maclean
80835a5a19
Ruby: Don't expose abstract class
...
Make ActionDispatch::Route into a private class
ActionDispatch::RouteImpl, defining a new class Route which exposes the
necessary public API from RouteImpl.
Also rename getHTTPMethod to getHttpMethod.
2022-02-03 10:41:30 +13:00
Harry Maclean
a8a7c156d0
via - update tests
2022-02-03 10:40:23 +13:00
Erik Krogh Kristensen
7ef051456a
upload sarif as part of the QL-for-QL workflow
2022-02-02 20:32:22 +01:00
Tom Hvitved
7b5699d058
C#: Update CIL attributes test
2022-02-02 19:25:30 +01:00
Tom Hvitved
2fe65128a0
C#: Update CIL type annotations test
2022-02-02 19:25:30 +01:00
Tom Hvitved
c4ad237a5c
C#: Update expected test output
2022-02-02 19:25:30 +01:00
Tom Hvitved
516bd9f77f
C#: Fix deprecation warnings
2022-02-02 19:25:30 +01:00
Tom Hvitved
09c5212ccc
C#: Account for explicit interface implementations in OperatorSymbol
2022-02-02 19:25:30 +01:00
Tom Hvitved
d7eeb1fec8
C#: Use .NET 6
2022-02-02 19:25:30 +01:00
Henry Mercer
2c17437092
JS: Run ML-powered queries tests on all PRs modifying relevant files
2022-02-02 18:11:25 +00:00
Henry Mercer
a586be956e
JS: Remove versions from packs we don't intend to publish
2022-02-02 18:10:57 +00:00
Geoffrey White
708da8cd62
C++: Increase the query precision to 'high'.
2022-02-02 18:03:25 +00:00
Arthur Baars
a22868ba27
Merge branch 'main' into ruby-3.1
2022-02-02 19:00:03 +01:00
Geoffrey White
4048ba0a1c
C++: Fix false positives around terminal output.
2022-02-02 17:59:28 +00:00
Geoffrey White
39a2ffd438
C++: Fix false positives around 'stdin'.
2022-02-02 17:39:14 +00:00
Arthur Baars
6acf49d4da
Merge pull request #7814 from aibaars/fix-ql-alerts
...
Ruby: fix all QL-QL alerts
2022-02-02 18:25:38 +01:00
Jeroen Ketema
aa4651312e
Fix naming conflicts in cpp/world-writable-file-creation
2022-02-02 17:36:14 +01:00
Jeroen Ketema
f32500306a
Address review comments
2022-02-02 17:24:55 +01:00
Geoffrey White
cc20969bdd
C++: Add test cases based on some remaining real world FPs.
2022-02-02 16:15:59 +00:00
Tony Torralba
4f13bf8941
Merge pull request #6492 from atorralba/atorralba/android-cleartext-storage-database
...
Java: Create new query Cleartext storage of sensitive information in Android databases
2022-02-02 16:23:05 +01:00
Tony Torralba
54e8ea56e8
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-02-02 15:44:26 +01:00
Jeroen Ketema
0773ab37a5
Use matches to check for 0x prefix
2022-02-02 15:26:46 +01:00
Jeroen Ketema
92d9e51d2a
Extract the value of O_CREAT and O_TMPFILE from the defining macro
...
There are operating systems that define `O_CREAT` with a different
value than Linux, which uses `0x40`. For example, OpenBSD uses `0x0200`.
Hence, we cannot use a hardcoded value.
Also handle `O_TMPFILE` while here.
2022-02-02 15:16:26 +01:00
Mathias Vorreiter Pedersen
1aa32b09be
Merge pull request #7802 from geoffw0/clrtxt8
...
C++: Recognize password struct fields.
2022-02-02 14:10:40 +00:00
Naman Jain
aea7054938
modified query and added tests
2022-02-02 19:39:08 +05:30
Henry Mercer
7018f6ad40
JS: Add missing @id for endpoint types query
2022-02-02 13:15:15 +00:00
Henry Mercer
e6745dc63a
JS: Add Action to run tests for ML-powered queries
2022-02-02 13:15:12 +00:00
Henry Mercer
422919b9d0
JS: Add generated files to .gitattributes
2022-02-02 13:15:04 +00:00
Henry Mercer
fbcb8d6857
JS: Migrate CodeQL tests for ML-powered queries
2022-02-02 13:15:04 +00:00
Arthur Baars
3b05cb621c
Address comment
2022-02-02 14:11:45 +01:00
Arthur Baars
33b97f3e0c
Update synchronized files
2022-02-02 13:30:45 +01:00
Arthur Baars
fdcef6225b
Ruby: fix QL warnings
2022-02-02 13:29:09 +01:00
CodeQL CI
7bb11b837c
Merge pull request #7788 from yoff/python/remove-library-annotation
...
Approved by tausbn
2022-02-02 03:51:00 -08:00
Tom Hvitved
712418e5f8
Merge pull request #7781 from hvitved/dataflow/summary-stack-bottom-less-nonlinear
...
Data flow: Reduce non-linear recursion in `SummaryComponentStack::bottom`
2022-02-02 10:35:53 +01:00
Benjamin Muskalla
d4c4e75bac
Merge pull request #7268 from bmuskalla/modelDiffAction
...
Java: Produce diffs for model generator changes
2022-02-02 10:30:45 +01:00
Jeroen Ketema
bd859d99bf
Address review comments
2022-02-02 10:09:47 +01:00
Jeroen Ketema
5b8f56dcc6
Add change notes
2022-02-02 10:07:38 +01:00
Michael Nebel
860ded2806
C#: Added change note for return value attributes.
2022-02-02 09:59:09 +01:00
Michael Nebel
62d987f31f
C#: Add upgrade and downgrade scripts.
2022-02-02 09:53:29 +01:00
Rasmus Lerchedahl Petersen
4ad99d9299
python: add missing QlDoc
2022-02-02 09:14:21 +01:00
Rasmus Lerchedahl Petersen
448e0785c2
python: logging.root is not a call
2022-02-02 09:04:16 +01:00
Harry Maclean
5adcdf1cf8
Ruby: Minor refactor
2022-02-02 17:32:11 +13:00
Harry Maclean
8f5380122a
Ruby: Cache ActionDispatch IPA types
2022-02-02 17:31:47 +13:00
Harry Maclean
749dc092ae
Ruby: Attempt to mitigate potential bad join
...
By joining simultaneously on controller class and name.
2022-02-02 17:03:46 +13:00
Harry Maclean
a38bc9fe89
Ruby Fix handling of via: in ActionDispatch
2022-02-02 17:03:27 +13:00
Harry Maclean
856c3d332c
Minor cleanup to ActionDispatch modelling
...
`x.isStringOrSymbol(result)` is slightly terser than
`result = x.getStringOrSymbol()`.
2022-02-02 16:26:20 +13:00
Harry Maclean
47823b5a9a
Handle via: :all in Rails routes
...
ActionDispatch modelling now understands that
match "/foo", to: "foo#bar", via: :all
is equivalent to
match "/foo",
to: "foo#bar",
via: [:get, :post, :put, :patch, :delete]
2022-02-02 16:26:20 +13:00
Harry Maclean
8bdc05ddaf
getValueText -> getConstantValue
2022-02-02 16:26:20 +13:00
Harry Maclean
417287153b
Ruby: QL style fixes
2022-02-02 16:26:20 +13:00
Harry Maclean
e975f92091
Ruby: remove unused predicate
2022-02-02 16:26:20 +13:00
Harry Maclean
3786fbfc7d
Ruby: Rewrite ActionDispatch::underscore
...
This version is much shorter and hopefully performs a bit better.
2022-02-02 16:26:20 +13:00
Harry Maclean
eff2136f52
Ruby: remove unused predicate
2022-02-02 16:26:20 +13:00
Harry Maclean
dead7a8059
Ruby: Make most of ActionDispatch private
...
Any classes/predicates not used externally or in tests are now private.
Also fix some typos.
2022-02-02 16:26:20 +13:00
Harry Maclean
fa28e55645
Add a test for ActionDispatch::underscore
...
This shows how the predicate behaves, as well as a case where it goes
wrong.
2022-02-02 16:26:20 +13:00
Harry Maclean
9c67869875
Remove ActionDispatch::capitalize
...
This predicate isn't used.
2022-02-02 16:26:20 +13:00
Harry Maclean
ad71fdbb24
Add missing documentation to ActionDispatch::Route
2022-02-02 16:26:20 +13:00
Harry Maclean
1766916fc5
Ruby: Document ActionDispatch modelling
2022-02-02 16:26:20 +13:00
Harry Maclean
314683d5fb
Ruby: Improve UrlRedirect query using Rails routes
...
Handlers for non-GET requests aren't vulnerable to URL redirect attacks,
because browsers won't initiate non-GET requests when you click a link.
We can use Rails routing information, if present, to filter out any
handlers for non-GET requests.
2022-02-02 16:26:20 +13:00
Harry Maclean
751d8a7f59
Ruby: Document getACapture
2022-02-02 16:26:20 +13:00
Harry Maclean
870c6d7412
Ruby: Rails route resolution
...
Add `Route` classes which model Rails routing information, typically
defined in a `routes.rb` file. We extract only the most basic
information: HTTP method, path, controller and action. This is enough to
determine whether a given controller method is a route handler, and what
HTTP method it handles, which is useful for, among other things, the URL
redirect query.
2022-02-02 16:26:19 +13:00
Henry Mercer
e622e517d9
Merge pull request #7800 from github/henrymercer/js-atm-add-model-building-pack
...
JS: Add model building pack for ML-powered queries
2022-02-01 20:51:19 +00:00
Harry Maclean
ce0354acb3
Include rust-toolchain.toml in Ruby cache keys
...
This ensures that if we change our Rust version, the caches will be
invalidated.
2022-02-02 08:08:11 +13:00
Harry Maclean
9c32ab7122
rust-toolchain -> rust-toolchain.toml
2022-02-02 08:05:46 +13:00
Harry Maclean
613ecbb418
Ruby: Pin Rust to 1.54
...
Add a rust-toolchain file to the Ruby directory, which instructs Rustup
to install a specific version of Rust (1.54). This will be used in CI,
so any use of language features or dependencies that don't support 1.54
will result in a CI failure.
This should ensure we have a documented minimum supported rust version
and an easy to way to update it in the future (update the rust-toolchain
file).
2022-02-02 08:05:46 +13:00
Geoffrey White
d864af3622
C++: Change note.
2022-02-01 19:00:40 +00:00
Harry Maclean
fb00a6c61b
Merge pull request #7666 from github/hmac/file-open-access
...
Ruby: Add File.open as a FileSystemAccess
2022-02-02 07:32:16 +13:00
liangjinhuang
1dd15fa235
style:auto format
2022-02-02 01:30:54 +08:00
liangjinhuang
976e484c57
style:move all source files under src/experimental & feat:modify source regular matching rules
2022-02-02 01:14:51 +08:00
Henry Mercer
14601316a5
JS: Autoformat
2022-02-01 17:08:21 +00:00
Erik Krogh Kristensen
e06f6529f1
refactor API-graph labels to an IPA type
2022-02-01 17:32:08 +01:00
liangjinhuang
1885b683f7
style:formatDocument
2022-02-02 00:21:26 +08:00
liangjinhuang
af2e8ff8c6
feat:modify source regular matching rules
2022-02-02 00:10:15 +08:00
Henry Mercer
368839edfc
JS: Fix QLDoc style in ExtractMisclassifiedEndpointFeatures.ql
2022-02-01 15:39:15 +00:00
Arthur Baars
ea901adb3c
Merge pull request #7799 from github/aibaars/fix-ruby-workflows
...
Ruby: use ruby specific cache key
2022-02-01 16:28:14 +01:00
Henry Mercer
db0b4fc463
JS: Add model building pack for ML-powered queries
...
Tests are currently still internal. They will be migrated to
`github/codeql` in a subsequent PR.
2022-02-01 15:03:26 +00:00
Arthur Baars
73d60550ce
QL-QL: fix cache keys
2022-02-01 15:57:59 +01:00
Erik Krogh Kristensen
0f85a52f09
Merge pull request #7773 from erik-krogh/CWE-367
...
JS: add a js/file-system-race query
2022-02-01 15:36:13 +01:00
Arthur Baars
6451a71a78
Ruby: use ruby specific cache key
2022-02-01 15:18:09 +01:00
Mathias Vorreiter Pedersen
3597d80340
Merge pull request #7787 from Yonah125/main
...
C/C++ : Useless test
2022-02-01 14:01:27 +00:00
Jeroen Ketema
ff1c971100
Add query for missing mode argument in open/openat calls
2022-02-01 14:52:22 +01:00
Rasmus Lerchedahl Petersen
1e2428cb6b
python: create LDAP module in Concepts
2022-02-01 14:39:58 +01:00
Nick Rolfe
5828a61fec
Merge pull request #7795 from github/nickrolfe/graph_test_edge_ordering
...
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-02-01 13:36:15 +00:00
Rasmus Lerchedahl Petersen
c2cd58edc4
python: rewrite to separate configurations
...
source nodes get duplicated, so perhaps flow states
are actually better for performance?
2022-02-01 14:36:11 +01:00
Erik Krogh Kristensen
a51f892a99
move dot in qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-02-01 14:34:30 +01:00
Michael Nebel
2c6e35f55e
C#: Add more attribute testcases.
2022-02-01 14:06:45 +01:00
Rasmus Lerchedahl Petersen
7df5c70c6f
python: update frameworks.rst
2022-02-01 13:54:34 +01:00
Rasmus Lerchedahl Petersen
bec8c0daea
python: update change note
2022-02-01 13:39:03 +01:00
Rasmus Lerchedahl Petersen
c587084758
python: use standard InstanceSource construction
2022-02-01 13:31:16 +01:00
Michael Nebel
31a70a17a4
C#: Add attribute tests for delegate types.
2022-02-01 13:29:26 +01:00
Michael Nebel
8ee27be908
C#: Small change in the attribute elements test. We now require that the attribute should be in source code and not the attributable.
2022-02-01 13:29:26 +01:00
Michael Nebel
7d1d2e792c
C#: Add specialized ql classes for each attribute kind and update AST printing.
2022-02-01 13:29:26 +01:00
Michael Nebel
5a6667efc5
C#: Update attribute test cases.
2022-02-01 13:29:26 +01:00
Michael Nebel
c94cdfa79a
C#: Update the extractor to include the kind of the extracted attributes. Furthermore, include method return attributes.
2022-02-01 13:29:26 +01:00
Michael Nebel
e86ac73628
C#: Add attribute kind to the dbscheme for the attribute relation.
2022-02-01 13:29:26 +01:00
Erik Krogh Kristensen
e6c90670e6
Merge pull request #7740 from erik-krogh/CWE-347
...
JS: promote the js/jwt-missing-verification query out of experimental
2022-02-01 13:10:35 +01:00
museljh
012434b152
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 19:00:06 +08:00
museljh
a6002186bd
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 18:59:12 +08:00
Jeroen Ketema
dbac927721
Take into account that the 4th argument of openat may be omitted
...
This matches what is done for `open`.
2022-02-01 11:41:07 +01:00
Rasmus Wriedt Larsen
f7a0b17ed6
Merge pull request #7687 from yoff/python/PathInjection-FlowState
...
python: Rewrite path injection query to use flow state
2022-02-01 11:33:37 +01:00
yoff
b120721942
Update python/ql/src/Security/CWE-090/LdapInjection.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 11:02:47 +01:00
Rasmus Lerchedahl Petersen
119a7e4f34
python: provide links for Flask
2022-02-01 10:55:45 +01:00
Rasmus Lerchedahl Petersen
ecea392a08
python: rewrite qhelp overview
...
(combining the Java version and the JS version)
2022-02-01 10:47:18 +01:00
Rasmus Lerchedahl Petersen
26befebfc2
python: drop precision and add severity score
...
Given both the original FP score and our concerns
regarding sanitizers, `@precision medium`, which
is aligned with other languages, feels appropriate.
2022-02-01 10:34:36 +01:00
Rasmus Lerchedahl Petersen
7511b33512
python: "command" -> "log"
2022-02-01 10:23:16 +01:00
yoff
45f0bfd8f0
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 10:06:37 +01:00
yoff
c03f89d712
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 10:04:26 +01:00
Mathias Vorreiter Pedersen
a59a9ba82b
C++: Autoformat.
2022-02-01 08:28:53 +00:00
yoff
8df04c58e9
Merge pull request #7793 from tausbn/python-fix-bad-TPythonTuple-join-order
...
Python: Fix bad join order in `TPythonTuple`
2022-01-31 22:39:58 +01:00
Harry Maclean
e5b7478028
Merge pull request #7780 from github/hmac/split-tests
...
Ruby: Split up CI jobs
2022-02-01 09:10:01 +13:00
Nick Rolfe
990e07b986
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-01-31 20:08:24 +00:00
BACK Yonah
46c1744204
C/C++: getFullyConverted replaced by getConversion*
2022-01-31 18:51:18 +01:00
Taus
4a29095e3b
Python: Fix bad join order in TPythonTuple
...
TL;DR: Something introduced the following bad join order:
```
(227s) Tuple counts for dom#TObject::TPythonTuple#ff/2@i2#8f58670w after 3m46s:
25000 ~0% {2} r1 = SCAN PointsToContext::PointsToContext::appliesToScope_dispred#ff#prev_delta OUTPUT In.1, In.0 'context'
24000 ~1% {2} r2 = JOIN r1 WITH @py_scope#f ON FIRST 1 OUTPUT Lhs.1 'context', Lhs.0
1076876712 ~6% {3} r3 = JOIN r2 WITH Flow::TupleNode#class#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'context', Lhs.1
870129666 ~0% {3} r4 = JOIN r3 WITH Flow::ControlFlowNode::isLoad_dispred#f ON FIRST 1 OUTPUT Lhs.1 'context', Lhs.2, Lhs.0 'origin'
870129000 ~0% {3} r5 = r4 AND NOT dom#TObject::TPythonTuple#ff#prev(Lhs.2 'origin', Lhs.0 'context')
870129000 ~1% {3} r6 = SCAN r5 OUTPUT In.2 'origin', In.1, In.0 'context'
9000 ~0% {2} r7 = JOIN r6 WITH Flow::ControlFlowNode::getScope_dispred#ff ON FIRST 2 OUTPUT Lhs.0 'origin', Lhs.2 'context'
return r7
```
(...the above being the tuple counts _at the point when I cancelled the
query_!)
Rewriting the code to force a join between `TupleNode#class` and
`getScope` results in the following join orders:
```
(0s) Tuple counts for TObject::scope_loads_tuplenode#ff/2@b3cf0bo5 after 13ms:
37369 ~3% {1} r1 = JOIN Flow::TupleNode#class#f WITH Flow::ControlFlowNode::isLoad_dispred#f ON FIRST 1 OUTPUT Lhs.0 'origin'
37369 ~3% {2} r2 = JOIN r1 WITH Flow::ControlFlowNode::getScope_dispred#ff ON FIRST 1 OUTPUT Rhs.1 's', Lhs.0 'origin'
return r2
```
and
```
(78s) Tuple counts for dom#TObject::TPythonTuple#ff/2@i53#121c440w after 6ms:
34736 ~3% {2} r1 = SCAN PointsToContext::PointsToContext::appliesToScope_dispred#ff#prev_delta OUTPUT In.1, In.0 'context'
7370 ~5% {2} r2 = JOIN r1 WITH TObject::scope_loads_tuplenode#ff ON FIRST 1 OUTPUT Lhs.1 'context', Rhs.1 'origin'
7370 ~5% {2} r3 = r2 AND NOT dom#TObject::TPythonTuple#ff#prev(Lhs.1 'origin', Lhs.0 'context')
7370 ~1% {2} r4 = SCAN r3 OUTPUT In.1 'origin', In.0 'context'
return r4
```
the latter being the largest iteration of `dom#TPythonTuple` throughout
the log.
No other major performance issues were observed.
2022-01-31 16:59:50 +00:00
BACK Yonah
56941dba6b
C/C++ : Fixed select issue in Useless Test
2022-01-31 16:56:12 +01:00
BACK Yonah
ca2ff6f9fb
C/C++: Fixing minor issues in Useless Test query
2022-01-31 16:04:56 +01:00
Tom Hvitved
5503abc73d
Merge pull request #7772 from hvitved/csharp/event-accessor-event-null
...
C#: Guard against `AssociatedSymbol` not being an `IEventSymbol`
2022-01-31 14:52:02 +01:00
Tom Hvitved
f2352d8272
Data flow: Inline local(Expr|Instruction)?(Flow|Taint)
...
Computing a full transitive closure is often bad; by inlining all calls we are
providing more context to the QL optimizer.
2022-01-31 14:33:41 +01:00
Ian Wright
83ecc065ab
restrict size of strings
2022-01-31 12:28:46 +00:00
Michael Nebel
56ac99039f
Merge pull request #7720 from michaelnebel/csharp/extended-prop-patterns
...
C#: Desugar property patterns that uses member access syntax.
2022-01-31 13:24:24 +01:00
Erik Krogh Kristensen
8dcec2e037
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-31 13:17:26 +01:00
Erik Krogh Kristensen
ec1a8cc826
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-31 12:32:12 +01:00
Tom Hvitved
2354281721
C#: Add DB down/upgrade scripts
2022-01-31 11:46:10 +01:00
Tom Hvitved
32e58add7b
C#: Extend compiler_generated to include event accessors
2022-01-31 11:45:23 +01:00
Rasmus Lerchedahl Petersen
9d416664a1
python: modern change note
...
I set the category to newQuery since that is what users will see.
When we have tags, it would be nice to tag it as a query promotion.
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
bf1145ece0
python: Add change note
...
should we have the `lgtm,codescanning` handshake or not?
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
8b5114d10e
python: Add standard customization setup
...
- modernize the sanitizer, but do not make it less specific
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
20d54543fd
python: move log injection out of experimental
...
- move from custom concept `LogOutput` to standard concept `Logging`
- remove `Log.qll` from experimental frameworks
- fold models into standard models (naively for now)
- stdlib:
- make Logger module public
- broaden definition of instance
- add `extra` keyword as possible source
- flak: add app.logger as logger instance
- django: `add django.utils.log.request_logger` as logger instance
(should we add the rest?)
- remove LogOutput from experimental concepts
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
211345c010
python: remove more annotations
2022-01-31 11:20:59 +01:00
Michael Nebel
7cbeffc8a7
C#: Refactor and use new language features.
2022-01-31 09:24:31 +01:00
Rasmus Lerchedahl Petersen
cac3862659
python: remove library annotation
...
to clean up QL warnings.
Should put these in a private module instead?
2022-01-31 08:50:37 +01:00
Rasmus Lerchedahl Petersen
0c3bce1415
python: deprecation
...
I am slightly concerned that the test now generates many more
intermediate results. I suppose that maes the analysis heavy.
Should the new library get a new name instead, so the old code
does not get evaluated?
2022-01-31 08:32:24 +01:00
BACK Yonah
d7313f3a82
C/C++ : Useless test
2022-01-30 14:33:32 +01:00
Mathias Vorreiter Pedersen
bb2feda8fb
Merge pull request #7703 from geoffw0/getslocal
2022-01-28 19:35:15 +00:00
Geoffrey White
8a1b49f816
C++: Recognize password struct fields.
2022-01-28 19:10:46 +00:00
Arthur Baars
abf3ce6223
Ruby: expressions in pin operator ^
2022-01-28 19:47:31 +01:00
Arthur Baars
00fb4d3776
Ruby: Values in Hash literals and keyword arguments can be omitted
2022-01-28 19:47:31 +01:00
Arthur Baars
3e2ca61c01
Ruby: support anonymous block parameters/arguments
2022-01-28 19:47:31 +01:00
Arthur Baars
b9258e78ca
Ruby: non-local variables in variable reference pattern
2022-01-28 19:47:31 +01:00
Arthur Baars
966b8be5f9
Ruby: add downgrade scripts
2022-01-28 19:47:31 +01:00
Arthur Baars
e5eb01ca45
Ruby: add upgrade scripts
2022-01-28 19:47:31 +01:00
Arthur Baars
c85012460a
Ruby: update dbscheme stats
2022-01-28 19:47:31 +01:00
Arthur Baars
c6a36a50c2
Ruby: regenerate dbscheme and library
2022-01-28 19:47:31 +01:00
Arthur Baars
bfbc9fe144
Ruby: update tree-sitter-ruby
2022-01-28 19:47:25 +01:00
Alex Ford
57e958c372
Ruby: missing QLDoc
2022-01-28 17:38:55 +00:00
Alex Ford
269722fa86
Ruby: rb/clear-text-logging-sensitive-data changenote
2022-01-28 17:27:05 +00:00
Alex Ford
7fec2d270b
Ruby: QL format
2022-01-28 17:24:56 +00:00
Alex Ford
186623f878
Ruby: Add CleartextLogging.qhelp
2022-01-28 17:24:56 +00:00
Alex Ford
7ed447842f
Ruby: cleartext logging test output
2022-01-28 17:24:56 +00:00
Alex Ford
4fc9128350
Ruby: cleartext logging - remove an unnecessary abstract class
2022-01-28 17:24:56 +00:00
Alex Ford
91ccd307e8
Ruby: Implement rb/clear-text-logging-sensitive-data
2022-01-28 17:24:56 +00:00
Mathias Vorreiter Pedersen
0f239e315c
Merge pull request #7782 from geoffw0/clrtxt7
...
C++: Fix FPs for cpp/cleartext-storage-file
2022-01-28 17:24:05 +00:00
Geoffrey White
0396a84c3c
C++: Remove empty predicate / extends.
2022-01-28 17:11:38 +00:00
Alex Ford
cfb2d7ffaf
Ruby: add shared SensitiveDataHeuristics.qll
2022-01-28 16:38:58 +00:00
Geoffrey White
af09dd8af1
C++: Fixes to gets models.
2022-01-28 16:04:23 +00:00
Geoffrey White
036e1495b8
Merge branch 'main' into getslocal
2022-01-28 15:58:13 +00:00
Ian Wright
aceeb7324c
restrict AST nodes according to string length
2022-01-28 15:06:10 +00:00
Rasmus Lerchedahl Petersen
68d18ead34
python: add change note
2022-01-28 14:00:07 +01:00
Geoffrey White
a695f02af4
C++: Add change note.
2022-01-28 12:38:27 +00:00
Tom Hvitved
82cceb0a29
C#: Mark event accessors without bodies as compiler generated
2022-01-28 13:11:34 +01:00
Tom Hvitved
682163962a
Data flow: Sync files
2022-01-28 13:01:24 +01:00
Tom Hvitved
4bf07825a1
Data flow: Reduce non-linear recursion in SummaryComponentStack::bottom
...
Before:
```
[2022-01-28 09:45:34] (449s) Tuple counts for FlowSummaryImpl::Public::SummaryComponentStack::bottom_dispred#ff/2@i23#25a5eew4 after 432ms:
0 ~0% {2} r1 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev_delta OUTPUT In.0 'this', (In.1 - 1)
0 ~0% {2} r2 = JOIN r1 WITH FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'this'
0 ~0% {2} r3 = JOIN r2 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev ON FIRST 1 OUTPUT Lhs.1 'this', Rhs.1 'result'
4171589 ~5% {2} r4 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev OUTPUT In.0 'this', (In.1 - 1)
4171589 ~0% {2} r5 = JOIN r4 WITH FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'this'
0 ~0% {2} r6 = JOIN r5 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev_delta ON FIRST 1 OUTPUT Lhs.1 'this', Rhs.1 'result'
62238 ~0% {3} r7 = SCAN FlowSummaryImpl::Public::SummaryComponentStack::drop#fff#prev_delta OUTPUT In.2, In.0 'this', In.1
62238 ~8% {3} r8 = JOIN r7 WITH FlowSummaryImpl::Public::SummaryComponentStack::head_dispred#ff#prev ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2, Rhs.1 'result'
62238 ~5% {5} r9 = JOIN r8 WITH FlowSummaryImpl::Public::SummaryComponentStack::length#ff#prev ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1, Lhs.2 'result', Rhs.1, (Rhs.1 - 1)
10373 ~6% {5} r10 = SELECT r9 ON In.4 = In.1
10373 ~0% {2} r11 = SCAN r10 OUTPUT In.0 'this', In.2 'result'
10373 ~0% {2} r12 = r6 UNION r11
10373 ~0% {2} r13 = r3 UNION r12
10373 ~0% {2} r14 = r13 AND NOT FlowSummaryImpl::Public::SummaryComponentStack::bottom_dispred#ff#prev(Lhs.0 'this', Lhs.1 'result')
return r14
```
After:
```
[2022-01-28 09:52:48] (6s) Tuple counts for FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff/2@i21#6243afwv after 5ms:
0 ~0% {2} r1 = JOIN FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev_delta WITH FlowSummaryImpl::Private::TConsSummaryComponentStack#fff#reorder_1_0_2#prev ON FIRST 1 OUTPUT Lhs.1 'result', Rhs.2 'this'
10373 ~3% {2} r2 = SCAN FlowSummaryImpl::Private::TConsSummaryComponentStack#fff#prev_delta OUTPUT In.1, In.2 'this'
10373 ~2% {2} r3 = JOIN r2 WITH FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1 'this'
10373 ~2% {2} r4 = r1 UNION r3
10373 ~2% {2} r5 = r4 AND NOT FlowSummaryImpl::Public::SummaryComponentStack::bottom#ff#prev(Lhs.1 'this', Lhs.0 'result')
10373 ~0% {2} r6 = SCAN r5 OUTPUT In.1 'this', In.0 'result'
return r6
```
2022-01-28 13:00:04 +01:00
Geoffrey White
b73dc98191
C++: Exclude write to stdout etc.
2022-01-28 11:57:31 +00:00
Tom Hvitved
864b61a804
Merge pull request #7766 from hvitved/csharp/extractor/type-param-constraints
...
C#: Make `TypeParameterConstraints` a `CachedEntity`
2022-01-28 12:39:31 +01:00
Tom Hvitved
28702dff82
Merge pull request #7779 from hvitved/csharp/initial-downgrade-scheme
...
C#: Add initial downgrade DB scheme for use in tests
2022-01-28 12:38:07 +01:00
Nick Rolfe
8248a942ce
Ruby: enable taint checking for array-flow test
2022-01-28 11:33:59 +00:00
Nick Rolfe
c0e1384f4a
Ruby: move Array/Enumerable flow summaries to their own file
2022-01-28 11:33:59 +00:00
Nick Rolfe
6c0eb8beee
Ruby: update array flow summaries to use getConstantValue()
2022-01-28 11:33:59 +00:00
Nick Rolfe
693ff6a904
Ruby: add flow summaries for remaining Array methods
2022-01-28 11:33:59 +00:00
Nick Rolfe
030cfa36da
Ruby: add flow summaries for all remaining Enumerable methods
2022-01-28 11:33:59 +00:00
Erik Krogh Kristensen
7b925604df
update expected output
2022-01-28 12:21:33 +01:00
Nick Rolfe
588e60e230
Merge pull request #7775 from github/nickrolfe/graph_test_ordering
...
Ruby/C#: more stable graph test ordering
2022-01-28 11:16:02 +00:00
Erik Krogh Kristensen
7aa59ca233
Merge pull request #7633 from erik-krogh/CWE-300
...
JS: add js/http-dependency query
2022-01-28 12:10:14 +01:00
Taus
47a57e0c0a
Merge pull request #7635 from github/python/support-match
...
Python/support match
2022-01-28 11:55:46 +01:00
yoff
74d57bbb1a
Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-28 11:38:29 +01:00
Arthur Baars
cada7ef1a4
Ruby: add downgrade scripts to prepare-db-upgrade.sh
2022-01-28 11:07:56 +01:00
Rasmus Lerchedahl Petersen
ab43f041c3
python: rename files
2022-01-28 11:00:17 +01:00
Erik Krogh Kristensen
b5198bdaca
apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-28 10:46:27 +01:00
Erik Krogh Kristensen
bf9bcc9600
add a js/file-system-race query
2022-01-28 09:41:12 +01:00
Erik Krogh Kristensen
179c26da9a
apply suggestions from review
2022-01-28 09:37:46 +01:00
Tony Torralba
f3e034b2be
Merge pull request #7764 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-28 09:35:54 +01:00
Harry Maclean
0428b8ee20
Split Ruby CI into multiple parallel jobs
...
Run format, compile and db upgrade checks in parallel, along with the
main tests, which run in two parallel halves.
2022-01-28 21:23:34 +13:00
Rasmus Lerchedahl Petersen
4c3c4deb34
python: Move over query and tests
2022-01-28 09:19:11 +01:00
Esben Sparre Andreasen
ee52774e90
Merge pull request #7760 from erik-krogh/CWE-184
...
JS: add CWE-184 to incomplete-scheme-check and bad-tag-filter
2022-01-28 09:18:41 +01:00
Tom Hvitved
ee5495ce65
C#: Add initial downgrade DB scheme for use in tests
2022-01-28 09:05:42 +01:00
Rasmus Lerchedahl Petersen
a026120c52
Python: Move configuration over and refine it
...
The original configuration did not match sinks with sanitizers.
Here it is resolved using flow state,
it could also be done by using two configurations.
2022-01-28 09:00:40 +01:00
Rasmus Lerchedahl Petersen
d539920661
Python: Update list of frameworks
2022-01-28 08:58:30 +01:00
Harry Maclean
b01f81aab3
Use modified getAPath predicate for test
2022-01-28 19:45:52 +13:00
Harry Maclean
a1b0f02e6e
Ruby: Introduce API::getAnImmediateSubclass()
...
class A; end
class B < A; end
class C < B; end
In the example above, `getMember("A").getAnImmediateSubclass()` will
select only uses of B, whereas `getMember("A").getASubclass()` will
select uses of A, B and C. This is usually the behaviour you want.
2022-01-28 16:44:03 +13:00
github-actions[bot]
c6130ea2d4
Add changed framework coverage reports
2022-01-28 00:11:49 +00:00
Dave Bartolomeo
cca74e925f
Merge pull request #7724 from github/aeisenberg/examples-groups
...
Add new groups for examples packs
2022-01-27 12:11:26 -05:00
Rasmus Lerchedahl Petersen
c60df7d69c
Merge branch 'main' of github.com:github/codeql into python/support-match
2022-01-27 16:45:17 +01:00
yoff
4632c14280
Merge pull request #7654 from RasmusWL/remove-old-pointsto-queries
...
Python: Cleanup: Remove old points-to versions of queries
2022-01-27 16:39:01 +01:00
Nick Rolfe
cd5010fe11
C#: sync changes from Ruby to improve ordering of graph test output
2022-01-27 15:34:01 +00:00
Tom Hvitved
b7fb9e8b95
Merge pull request #7768 from hvitved/csharp/extractor-diagnostics-query
...
C#: Add internal extractor diagnostics query
2022-01-27 16:33:32 +01:00
Chris Smowton
17656fc12b
Merge pull request #7771 from Dig2/main
...
Fix typo in CodeQL-query-help-for-JavaScript
2022-01-27 15:03:35 +00:00
Mathias Vorreiter Pedersen
b3f4357dc8
Merge pull request #7742 from geoffw0/clrtxt6
...
C++: Upgrade cpp/cleartext-storage-buffer
2022-01-27 14:40:40 +00:00
Rasmus Lerchedahl Petersen
b93c04bb79
python: Add reverse flow in some patterns
...
Particularly in value and literal patterns.
This is getting a little bit into the guards aspect of matching.
We could similarly add reverse flow in terms of
sub-patterns storing to a sequence pattern,
a flow step from alternatives to an-or-pattern, etc..
It does not seem too likely that sources are embedded in patterns
to begin with, but for secrets perhaps?
It is illustrated by the literal test. The value test still fails.
I believe we miss flow in general from the static attribute.
2022-01-27 15:20:23 +01:00
Tom Hvitved
cdfe239016
C#: Guard against AssociatedSymbol not being an IEventSymbol
...
Apply same logic as for property/indexer accessors to account for cases where
the associated event cannot be determined. I have not been able to reproduce
such cases locally, though we have seen reports of it happening.
2022-01-27 15:14:03 +01:00
Nick Rolfe
6f06263d49
Ruby: add more properties for ordering nodes in graph tests
2022-01-27 13:57:43 +00:00
Dig2
516bed391a
Fix CodeQL-query-help-for-JavaScript typo
2022-01-27 21:33:20 +08:00
Benjamin Muskalla
5c9c83d331
Revert "Enable on my repo"
...
This reverts commit b9c3e6a052 .
2022-01-27 14:24:41 +01:00
Geoffrey White
2e1b09fd75
C++: Modernize flow sources.
2022-01-27 13:19:09 +00:00
Geoffrey White
47528dd8c0
C++: Autoformat.
2022-01-27 12:56:16 +00:00
Tamás Vajk
50f546043a
Merge pull request #7769 from github/release-prep/2.8.0
...
Release preparation for version 2.8.0
2022-01-27 13:36:59 +01:00
Tom Hvitved
d9a1046e0e
Merge pull request #7683 from hvitved/ruby/qltest-4-threads
...
Ruby: Use multiple threads in QL test CI job
2022-01-27 13:11:39 +01:00
Benjamin Muskalla
39a853b5e4
Remove unused models
2022-01-27 12:27:37 +01:00
Benjamin Muskalla
1cfb088634
rely on defaults
2022-01-27 12:26:59 +01:00
Benjamin Muskalla
e5acc6b54b
use default sha for pr
2022-01-27 12:26:59 +01:00
Benjamin Muskalla
3646ae0995
Skip diff install if not needed
2022-01-27 12:26:58 +01:00
Geoffrey White
1bf9c19638
C++: Autoformat.
2022-01-27 11:26:18 +00:00
Geoffrey White
f090a3b440
C++: Add to and clarify some taint library QLDoc.
2022-01-27 11:26:00 +00:00
Benjamin Muskalla
10aa7a7982
Better name
2022-01-27 12:02:42 +01:00
Benjamin Muskalla
b9c3e6a052
Enable on my repo
2022-01-27 12:01:47 +01:00
Tom Hvitved
1e39259e26
Merge pull request #7750 from hvitved/ruby/desugar-hash-literals
...
Ruby: Desugar hash literals
2022-01-27 12:01:06 +01:00
Benjamin Muskalla
66b9974dd4
Simplify naming pattern
2022-01-27 12:00:29 +01:00
Geoffrey White
d9a2347178
C++: Switch back to IR taint.
2022-01-27 10:50:22 +00:00
Tamás Vajk
3d2cc8890a
Update CHANGELOG.md
2022-01-27 11:50:13 +01:00
Tamás Vajk
cc4bb9b02f
Update 0.0.8.md
2022-01-27 11:49:29 +01:00
Benjamin Muskalla
4aa0002e97
Rename workflow
2022-01-27 11:43:25 +01:00
github-actions[bot]
634134f283
Release preparation for version 2.8.0
2022-01-27 10:40:20 +00:00
Tom Hvitved
e2ae327a74
C#: Add internal extractor diagnostics query
2022-01-27 11:19:31 +01:00
Rasmus Lerchedahl Petersen
cb52ab669e
python: address review comments
...
The comment about `py_scopes` was simply removed
2022-01-27 11:17:00 +01:00
Benjamin Muskalla
c1b5565e4d
Automation to regenerate framework models
2022-01-27 11:15:10 +01:00
yoff
e28669e487
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-27 10:31:43 +01:00
Tom Hvitved
f4195219f4
C#: Make TypeParameterConstraints a CachedEntity
2022-01-27 10:19:16 +01:00
Tom Hvitved
280023c45a
Address review comments
2022-01-27 09:44:41 +01:00
Tom Hvitved
ece952ae2d
Merge pull request #7759 from hvitved/csharp/more-debug-context
...
C#: Add more debug context to various error messages
2022-01-27 09:40:21 +01:00
Andrew Eisenberg
a7f755cf12
Add new groups for examples packs
...
Also, remove version numbers. Will make it easier to avoid publishing
the examples packs.
2022-01-26 14:49:18 -08:00
Dave Bartolomeo
d069d91bf5
Merge pull request #6601 from dbartol/dbartol/side-effect-reorder/work
...
Fix order of IR call side effects
2022-01-26 17:02:02 -05:00
Tom Hvitved
32d1263810
Merge pull request #7755 from hvitved/csharp/qltest-stubs
...
C#: Restrict stub logic to QL test DBs
2022-01-26 20:08:33 +01:00
Rasmus Lerchedahl Petersen
163c888781
python: port concepts and implementations
2022-01-26 19:05:37 +01:00
Rasmus Lerchedahl Petersen
e6b5833bd6
python: fix typo in qhelp
2022-01-26 19:05:36 +01:00
Mathias Vorreiter Pedersen
647d4d028e
Merge pull request #7758 from jketema/unnamed-variable-fix
...
C++: Do not report "Declaration hides variable" for unnamed variables
2022-01-26 15:36:04 +00:00
Erik Krogh Kristensen
e75dc2116f
add CWE-184 to incomplete-scheme-check and bad-tag-filter
2022-01-26 16:13:13 +01:00
Jeroen Ketema
ee78cc731d
Add change note
2022-01-26 15:59:17 +01:00
Tom Hvitved
ef580aa8bc
C#: Add more debug context to various error messages
2022-01-26 15:50:26 +01:00
Tom Hvitved
baefd623c4
Merge pull request #7757 from hvitved/csharp/remove-stats
...
C#: Remove stats for removed relations
2022-01-26 15:22:59 +01:00
Jeroen Ketema
9194af9b15
Do not report "Declaration hides variable" for unnamed variables
2022-01-26 15:10:37 +01:00
Jeroen Ketema
10a94cfa45
Add test for structured binding declaration hiding variable
2022-01-26 15:08:50 +01:00
Jeroen Ketema
b380ba0d8f
Add semmle-extractor-options: -std=c++17 to test
2022-01-26 15:05:21 +01:00
Tom Hvitved
f38ee39cda
C#: Remove stats for removed relations
2022-01-26 14:20:41 +01:00
Tom Hvitved
6975ade0ff
C#: Restrict stub logic to QL test DBs
2022-01-26 13:59:24 +01:00
Tom Hvitved
dd27ed8392
Ruby: Desugar hash literals
...
```rb
{ a: 1, **splat, b: 2 }
```
becomes
```rb
::Hash.[](a: 1, **splat, b: 2)
```
2022-01-26 13:53:18 +01:00
Tom Hvitved
39436828de
Ruby: Add internal/Literal.qll for internal implementation details
2022-01-26 13:48:26 +01:00
Tom Hvitved
6565242b67
Merge pull request #7751 from hvitved/csharp/qltest-file-extraction-mode
...
C#: Update expected test output after passing in `--qltest` in `codeql test run`
2022-01-26 13:32:34 +01:00
Chris Smowton
df87297c59
Merge pull request #7733 from pwntester/java_util_regex_qll
...
Java: Add models for java.util.regex.Pattern and Matcher
2022-01-26 12:04:56 +00:00
Rasmus Lerchedahl Petersen
47af3a69a5
Merge branch 'main' of github.com:github/codeql into python/support-match
2022-01-26 11:39:46 +01:00
Alvaro Muñoz Sanchez
ba90fecc98
retab Test.java
2022-01-26 11:20:10 +01:00
Erik Krogh Kristensen
abd87615ff
update qhelp with suggestions
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-26 11:03:05 +01:00
Tom Hvitved
477f83cf9e
Merge pull request #7746 from hvitved/csharp/remove-legacy-relations
...
C#: Remove some unused legacy relations from the DB scheme
2022-01-26 10:40:55 +01:00
Tom Hvitved
99b9d4513b
C#: Update expected test output after passing in --qltest in codeql test run
2022-01-26 10:33:00 +01:00
Arthur Baars
948ebe4b4c
Merge pull request #7568 from aibaars/ruby-pattern-matching-taint
...
Ruby: taint steps for pattern matches
2022-01-26 10:27:47 +01:00
Stephan Brandauer
b7690e5e6b
Merge pull request #7734 from kaeluka/js-add-node-prefix-to-module-import
...
js: add support for the 'node:' prefix for importing internal modules
2022-01-26 10:15:08 +01:00
Tom Hvitved
28e03a8aae
Merge pull request #7738 from hvitved/ruby/action-controller-perf
...
Ruby: Fix bad join in `ActionControllerHelperMethod`
2022-01-26 09:48:21 +01:00
Tom Hvitved
2c27a07ead
Merge pull request #7726 from hvitved/ruby/any-array-element-content
...
Ruby: Introduce `TAnyArrayElementContent`
2022-01-26 09:48:01 +01:00
Erik Krogh Kristensen
de633940fe
promote the js/jwt-missing-verification query out of exeprimental
2022-01-26 09:35:54 +01:00
Tom Hvitved
51205d6ce5
C#: Add DB downgrade script
2022-01-26 08:44:37 +01:00
Tom Hvitved
83fb822115
C#: Add DB upgrade script
2022-01-26 08:43:24 +01:00
Tom Hvitved
4c16320e28
C#: Remove some unused legacy relations from the DB scheme
2022-01-26 08:35:08 +01:00
Arthur Baars
941f230c94
Merge pull request #7729 from github/hmac/bump-clap
...
Ruby extractor: bump clap
2022-01-26 08:12:47 +01:00
Dave Bartolomeo
4c42013836
Update test expectations
2022-01-25 15:22:13 -05:00
Henry Mercer
15aa09fb7a
Merge pull request #7744 from github/henrymercer/js-atm-tweak-query-help
...
JS: Move experimental notice to the bottom of the ML-powered query help
2022-01-25 17:44:27 +00:00
Edoardo Pirovano
662675ebf0
Merge pull request #7739 from github/edoardo/3.4-mergeback
...
Merge `rc/3.4` into `main`
2022-01-25 17:44:13 +00:00
Shati Patel
1c711e05be
Merge pull request #7661 from shati-patel/vscode-pack-commands
...
Docs: Mention packaging commands in CodeQL extension
2022-01-25 16:55:37 +00:00
Andrew Eisenberg
e722121be8
Merge pull request #7618 from github/aeisenberg/getting-started-docs
...
Docs: Simplify getting started docs
2022-01-25 08:30:06 -08:00
Edoardo Pirovano
1b539eb4dc
Merge branch rc/3.4 into main
2022-01-25 16:22:01 +00:00
Mathias Vorreiter Pedersen
5d0f7efe84
Merge pull request #7743 from jketema/doc-fixes
...
CodeQL documentation fixes
2022-01-25 16:11:08 +00:00
Henry Mercer
70f7535988
JS: Move experimental notice to the bottom of the ML-powered query help
...
The Code Scanning UI shows just the first paragraph of the query help
as a summary, until a user chooses to expand the help.
We decided it was more useful to display the standard query help in this
summary compared to the experimental query notice, since there is
already a notice about experimental queries on the alert show page.
2022-01-25 15:52:09 +00:00
Tom Hvitved
afd6f58fe8
Merge pull request #7741 from hvitved/csharp/compilation-args-exclude-extractor-args
...
C#: Exclude extractor arguments from `compilation_args` relation
2022-01-25 16:31:46 +01:00
Geoffrey White
63ff17b3c1
Merge pull request #7737 from geoffw0/clrtxt5
...
C++: Upgrade cpp/cleartext-storage-file
2022-01-25 15:09:13 +00:00
Jeroen Ketema
082c712843
Replace Block by BlockStmt in basic C/C++ query documentation
...
`Block` has be deprecated in favor of `BlockStmt`.
2022-01-25 15:21:34 +01:00
Jeroen Ketema
1cfd222770
Remove redundant can
2022-01-25 15:21:06 +01:00
Michael Nebel
f1d5d3af9d
C#: Add change note for extended property patterns.
2022-01-25 15:13:11 +01:00
Michael Nebel
44cc044a3d
C#: Add testcase for extended property patterns (to indicate that they are de-sugared correctly).
2022-01-25 15:13:11 +01:00
Michael Nebel
833e8e4f1d
C#: Add some examples with the extended property pattern syntax.
2022-01-25 15:13:11 +01:00
Michael Nebel
83e7fae578
C#: Desugar property patterns that uses member access syntax.
2022-01-25 15:13:11 +01:00
Tom Hvitved
d7a91fdbe6
C#: Exclude extractor arguments from compilation_args relation
2022-01-25 15:09:29 +01:00
Geoffrey White
e4a3e9ee23
C++: Change note.
2022-01-25 13:55:01 +00:00
Geoffrey White
340b40e8f3
C++: Modernize cpp/cleartext-storage-buffer.
2022-01-25 13:54:42 +00:00
Stephan Brandauer
4ee290acd3
update test for 'node:' prefix
2022-01-25 14:25:44 +01:00
Stephan Brandauer
20ea825e4a
test for 'node:' prefix for importing node modules
2022-01-25 13:43:16 +01:00
shati-patel
1462565810
Clarify "download packs" usage
2022-01-25 12:37:17 +00:00
Erik Krogh Kristensen
cc527bdecd
Merge pull request #7721 from erik-krogh/CWE-1275
...
JS: add a js/samesite-none-cookie cookie
2022-01-25 13:28:08 +01:00
Shati Patel
9e1e2ba442
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-25 12:27:00 +00:00
Tom Hvitved
49488fa0a0
Ruby: Fix bad join in ActionControllerHelperMethod
...
```
[2022-01-25 12:35:14] (234s) Tuple counts for ActionController::ActionControllerHelperMethod#class#ff/2@ef816fil after 1.5s:
7685 ~0% {3} r1 = JOIN ActionController::ActionControllerContextCall#ff#shared WITH Method::Method::getName_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'controllerClass', Lhs.0 'this'
13198 ~0% {3} r2 = JOIN r1 WITH Constant::ConstantValue::getStringOrSymbol_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'controllerClass', Lhs.2 'this', Rhs.1
15835365 ~4% {5} r3 = JOIN r2 WITH AST::AstNode::getEnclosingModule_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, "helper_method", Lhs.0 'controllerClass', Lhs.1 'this', Lhs.2
12943 ~1% {4} r4 = JOIN r3 WITH Call::MethodCall::getMethodName_dispred#ff ON FIRST 2 OUTPUT Lhs.4, Lhs.2 'controllerClass', Lhs.3 'this', Lhs.0
1146184 ~0% {4} r5 = JOIN r4 WITH Expr::Expr::getConstantValue_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1 'controllerClass', Lhs.2 'this'
212 ~0% {2} r6 = JOIN r5 WITH project#Call::Call::getArgument_dispred#fff ON FIRST 2 OUTPUT Lhs.3 'this', Lhs.2 'controllerClass'
return r6
```
Joining on enclosing module and name simultaneously yields a much better join.
2022-01-25 13:00:13 +01:00
Alvaro Muñoz Sanchez
9ee967d6db
update test file
2022-01-25 12:42:41 +01:00
Erik Krogh Kristensen
caaee5e4e5
make a utility predicate for extracting sameSite values
2022-01-25 12:32:04 +01:00
Erik Krogh Kristensen
9f9dee5d18
apply documentation suggestions
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-25 12:14:16 +01:00
Tom Hvitved
67962cb93d
Ruby: Fix bad join in access predicate
...
Joining on variable name alone is a bad thing:
```
[2022-01-25 11:13:20] (228s) Tuple counts for Variable::Cached::access#ff#shared/3@868b54tu after 3m37s:
112554 ~0% {3} r1 = JOIN Variable::VariableReal::getNameImpl_dispred#ff WITH Variable::VariableReal::getDeclaringScopeImpl_dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'arg2', Rhs.1 'arg1'
561015756 ~1% {3} r2 = JOIN r1 WITH Variable::variableName#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.2 'arg1', Lhs.1 'arg2'
return r2
```
This change ensures that we join on name and scope simultaneously.
2022-01-25 11:37:38 +01:00
Michael Nebel
26d9848fca
Merge pull request #7730 from michaelnebel/csharp/csharp10-release-notes
...
C#: Add change notes for the already implemented C# 10 features.
2022-01-25 11:31:02 +01:00
Geoffrey White
d70b813949
Merge pull request #7732 from MathiasVP/security-severity-for-return-stack-allocated-memory
...
C++: Add security-severity to `cpp/return-stack-allocated-memory`
2022-01-25 10:13:49 +00:00
Stephan Brandauer
9825136e58
add support for the 'node:' prefix for importing internal modules
2022-01-25 10:55:34 +01:00
Alvaro Muñoz Sanchez
c49c7903a8
add java.util.regex models and tests
2022-01-25 10:50:39 +01:00
Tom Hvitved
0299b4603f
Merge pull request #7677 from hvitved/ruby/constant-value
...
Ruby: Replace `getValueText` with `getConstantValue`
2022-01-25 10:31:02 +01:00
Harry Maclean
962d0213b5
Ruby extractor: stop using deprecated function
2022-01-25 22:04:24 +13:00
Tony Torralba
82ad79f55f
Merge pull request #7728 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-25 09:53:12 +01:00
Mathias Vorreiter Pedersen
72241886bf
C++: Add security-severity to 'cpp/return-stack-allocated-memory'.
2022-01-25 08:49:00 +00:00
Michael Nebel
f6a8d50593
C#: Add change notes for the already implemented C# 10 features.
2022-01-25 09:46:57 +01:00
Stephan Brandauer
35cc5ff0e2
Merge pull request #7715 from kaeluka/recognize-fs-extra-path-args
...
JS: add a predicate to recognize path arguments in calls to the fs-extra lib
2022-01-25 09:36:59 +01:00
Tom Hvitved
06776d19ee
Merge pull request #4949 from luchua-bc/cs/hash-without-salt
...
C#: Query to detect hash without salt
2022-01-25 09:04:23 +01:00
Tom Hvitved
fdd787b89c
Merge pull request #7658 from hvitved/csharp/dataflow/no-negative-positions
...
C#: Get rid of negative parameter/argument data-flow positions
2022-01-25 09:01:44 +01:00
dependabot[bot]
6543b1a3a9
Update clap requirement from 2.33 to 3.0
...
Updates the requirements on [clap](https://github.com/clap-rs/clap ) to permit the latest version.
Apply this update in both the generator and extractor.
2022-01-25 16:53:39 +13:00
Harry Maclean
c5904b7410
Add inline tests for API Graph subclassing
2022-01-25 16:41:49 +13:00
Harry Maclean
517f2d0823
Add optional results to InlineExpectationsTest
...
The idea behind optional results is that there may be instances where
each line of source code has many results and you don't want to annotate
all of them, but you still want to ensure that any annotations you do
have are correct.
This change makes that possible by exposing a new predicate
`hasOptionalResult`, which has the same signature as `hasResult`.
Results produced by `hasOptionalResult` will be matched against any
annotations, but the lack of a matching annotation will not cause a
failure.
We will use this in the inline tests for the API edge getASubclass,
because for each API path that uses getASubclass there is always a
shorter path that does not use it, and thus we can't use the normal
shortest-path matching approach that works for other API Graph tests.
2022-01-25 16:41:49 +13:00
Harry Maclean
d0a274c1e8
Use API graph subclassing in GraphQL modelling
...
This simplifies some of the code.
2022-01-25 16:41:24 +13:00
Harry Maclean
5e7a29a979
Ruby: Use API graph subclassing in Rails modelling
...
Now that API graphs have basic subclassing support, we can simplify some
of the ActiveRecord and ActionController code.
2022-01-25 16:40:14 +13:00
github-actions[bot]
1c2f4e79ff
Add changed framework coverage reports
2022-01-25 00:10:23 +00:00
Dave Bartolomeo
9183a4d7e7
Merge remote-tracking branch 'upstream/main' into dbartol/side-effect-reorder/work
2022-01-24 15:56:38 -05:00
CodeQL CI
8d1e22bc38
Merge pull request #7632 from erik-krogh/CWE-862
...
Approved by esbena, felicitymay
2022-01-24 12:47:16 -08:00
Erik Krogh Kristensen
d4bac887cf
add a js/samesite-none-cookie cookie
2022-01-24 21:39:41 +01:00
yo-h
364f07e3c5
Merge pull request #7725 from github/turbo-go-117-update
...
Update supported Go version
2022-01-24 15:23:00 -05:00
Robert Marsh
6d3381cb89
Merge pull request #7718 from MathiasVP/move-return-stack-allocated-memory-into-code-scanning
...
C++: Add `security` tag to `cpp/return-stack-allocated-memory`
2022-01-24 14:52:23 -05:00
Tom Hvitved
66a24c5c49
Ruby: Introduce TAnyArrayElementContent
2022-01-24 20:25:05 +01:00
Pierre
af0fc37f39
Update supported Go version
2022-01-24 20:20:04 +01:00
Andrew Eisenberg
f71217706a
Merge branch 'main' into aeisenberg/getting-started-docs
2022-01-24 11:16:13 -08:00
Rasmus Wriedt Larsen
301318020f
Merge pull request #7455 from haby0/py/add-shutil-module-path-injection-sinks
...
Python: Add shutil module sinks for path injection query
2022-01-24 20:06:36 +01:00
Tom Hvitved
e3afcb1b06
C#: Add missing severity and update expected test output
2022-01-24 20:00:25 +01:00
Tom Hvitved
65e1c0ebc1
Merge remote-tracking branch 'upstream/main' into cs/hash-without-salt
2022-01-24 19:57:07 +01:00
Geoffrey White
e42d3e540a
C++: Change note.
2022-01-24 18:32:17 +00:00
Geoffrey White
764f27f08e
C++: Upgrade to path-problem.
2022-01-24 18:32:05 +00:00
Geoffrey White
bbaac556e2
C++: Reveal the FP to be an issue with dataflow / model of strcpy.
2022-01-24 17:53:37 +00:00
Geoffrey White
11929378c7
C++: Upgrade cpp/cleartext-storage-file to full taint flow.
2022-01-24 17:48:45 +00:00
Andrew Eisenberg
497c87851c
Merge pull request #7571 from github/aeisenberg/remove-upgrades
...
Update docs on the output of `resolve qlpacks`
2022-01-24 09:02:02 -08:00
Erik Krogh Kristensen
75f389749a
Merge pull request #7719 from erik-krogh/cwe-219
...
JS: add CWE-219 to js/exposure-of-private-files
2022-01-24 17:06:09 +01:00
Tom Hvitved
cc712c20cb
Ruby: Use bitShiftLeft instead of pow in parseInteger
2022-01-24 16:06:35 +01:00
Erik Krogh Kristensen
bb786bc557
fix good/bad mixup in ClientExposedCookie qhelp
2022-01-24 15:34:30 +01:00
Tony Torralba
4f4f531dfc
Add missing QLDoc
2022-01-24 15:13:09 +01:00
Tom Hvitved
6efa595478
Merge pull request #7688 from hvitved/dataflow/required-component-stack
...
Data flow: Restructure `RequiredSummaryComponentStack`
2022-01-24 15:10:08 +01:00
Tom Hvitved
2a972dc045
Address review comments
2022-01-24 14:27:42 +01:00
Tony Torralba
b59fd4070f
Merge pull request #7136 from atorralba/atorralba/promote-insecure-trustmanager
...
Java: Promote Insecure TrustManager from experimental
2022-01-24 14:05:14 +01:00
Erik Krogh Kristensen
148b0c33a9
update the empty-password-in-config-file qhelp
2022-01-24 13:39:54 +01:00
Erik Krogh Kristensen
ab0d67a573
update query name and description
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-24 13:37:25 +01:00
Erik Krogh Kristensen
b2dc02b831
Merge pull request #7717 from erik-krogh/cwe-80
...
JS: add CWE-80 to queries that detect bad HTML sanitizers
2022-01-24 13:34:57 +01:00
Tom Hvitved
64f19637d4
Address review comments
2022-01-24 13:33:18 +01:00
Erik Krogh Kristensen
823cadecd5
add CWE-219 to js/exposure-of-private-files
2022-01-24 13:22:06 +01:00
Edoardo Pirovano
413c0a8f4f
Merge pull request #7673 from github/post-release-prep/codeql-cli-2.7.6
...
Post-release preparation for codeql-cli-2.7.6
2022-01-24 11:59:51 +00:00
Mathias Vorreiter Pedersen
7db66055e5
C++: Add change note.
2022-01-24 11:57:25 +00:00
Mathias Vorreiter Pedersen
08379df613
C++: Add 'security' tag to 'cpp/return-stack-allocated-memory'.
2022-01-24 11:43:38 +00:00
Geoffrey White
4c99d39acf
Merge pull request #7701 from MathiasVP/remove-intentional-get-stack-pointer
...
C++: Remove FPs from `cpp/return-stack-allocated-memory`
2022-01-24 11:39:10 +00:00
Geoffrey White
588447d596
C++: Fix up isParameterDeref.
2022-01-24 11:06:24 +00:00
Arthur Baars
78b4d7cbb5
Ruby: remove redundant cast
2022-01-24 11:27:31 +01:00
Arthur Baars
0cef887683
Ruby: address comments
2022-01-24 11:27:26 +01:00
Geoffrey White
683f909f7a
Merge pull request #7704 from geoffw0/clrtxt4
...
C++: Another improvement to cpp/cleartext-transmission
2022-01-24 10:11:11 +00:00
Erik Krogh Kristensen
ab1bc685bb
add CWE-80 to queries that detect bad HTML sanitizers
2022-01-24 11:01:17 +01:00
Stephan Brandauer
02db472209
consistent notation
2022-01-24 10:58:06 +01:00
Anders Schack-Mulligen
7af6dc7164
Merge pull request #7702 from atorralba/atorralba/fix-jndi-injection-sinks
...
Java: Remove some JNDI Injection sinks
2022-01-24 10:53:58 +01:00
Stephan Brandauer
8be58fe01e
Fix comment to avoid summarizing implementation
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-24 10:47:28 +01:00
Arthur Baars
5df1f7a0c3
Ruby: use CfgNodes classes to implement case value to pattern variable taint steps
2022-01-24 10:31:08 +01:00
Arthur Baars
7d7e9ba9e1
Ruby: add CasePattern classes to CfgNodes
2022-01-24 10:31:08 +01:00
Arthur Baars
e9a01f9e8f
Ruby: fix test case
2022-01-24 10:31:08 +01:00
Arthur Baars
634c8cd060
Ruby: Generalize CfgNodes::ChildMapping
2022-01-24 10:31:08 +01:00
Arthur Baars
fcec8a8388
Address comments
2022-01-24 10:31:08 +01:00
Arthur Baars
ab4935fe68
Ruby: fix some alerts
2022-01-24 10:31:08 +01:00
Arthur Baars
7630b277b8
Ruby: update AST and CFG test data
2022-01-24 10:31:08 +01:00
Arthur Baars
26a0167d6d
Ruby: add taint step test for hash patterns
2022-01-24 10:31:06 +01:00
Arthur Baars
49c452239e
Ruby: add taint steps from case value to variables in patterns
2022-01-24 10:10:22 +01:00
Arthur Baars
77a3e4bd61
Ruby: CFG: fix completion of AsPattern variable
2022-01-24 10:10:22 +01:00
Stephan Brandauer
b277731312
add a predicate to recognize path arguments in calls to the fs-extra lib
2022-01-24 09:40:22 +01:00
Tony Torralba
908b7c43f2
Fix stubs
2022-01-24 09:34:43 +01:00
Anders Schack-Mulligen
9bd2ac96ea
Merge pull request #7705 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-24 09:14:35 +01:00
Anders Schack-Mulligen
b4bf7a1561
Merge pull request #7698 from aschackmull/java/bitwise-assignop-guards
...
Java: Add support for bitwise compound assignments in Guards.
2022-01-24 09:11:53 +01:00
github-actions[bot]
020970ff4c
Add changed framework coverage reports
2022-01-24 00:09:45 +00:00
Harry Maclean
8419daad03
Ruby: Add subclassing support to API Graphs
...
Given the code
class A; end
class B < A; end
class C < A; end
You can find uses of B and C with the expression
API::getTopLevelMember("A").getASubclass()
2022-01-24 12:21:39 +13:00
luchua-bc
27043a09b3
File path injection with the JFinal framework
2022-01-23 18:07:48 +00:00
Andrew Eisenberg
aee9eb5203
Apply docs fixes
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-01-21 11:35:15 -08:00
Aditya Sharad
67e3f5edbc
Merge pull request #7685 from adityasharad/merge/3.3-3.4
...
Merge rc/3.3 into rc/3.4
2022-01-21 10:49:19 -08:00
Tom Hvitved
85e1cda81b
Ruby: Distinguish symbols from strings in ConstantValue
2022-01-21 19:16:12 +01:00
Harry Maclean
8e40899dfd
Merge pull request #7419 from github/hmac/const-get
2022-01-22 07:01:09 +13:00
Harry Maclean
2fa18801aa
Merge pull request #7665 from github/hmac/barrier-guard-array-const
2022-01-22 06:59:51 +13:00
Geoffrey White
4326e6f706
C++: Split 'gets' model and make it a local source.
2022-01-21 17:29:49 +00:00
Geoffrey White
79735f5ac5
C++: Add test case.
2022-01-21 17:29:48 +00:00
Tony Torralba
78d7e538a5
Remove some JNDI Injection sinks
...
Add tests and stubs
2022-01-21 17:47:15 +01:00
Henry Mercer
c41de33156
Merge pull request #7700 from github/henrymercer/js-atm-fix-xss-results-pattern
...
JS: Fix copy/paste error in XSS ML-powered queries results patterns
2022-01-21 16:18:33 +00:00
Geoffrey White
0b98397e9b
C++: Catch another encryption clue.
2022-01-21 16:16:16 +00:00
Geoffrey White
97447d0b3a
C++: Expand tests.
2022-01-21 16:16:15 +00:00
Tony Torralba
4df0f399cd
Move ContentProvider models to the appropriate file
2022-01-21 16:55:43 +01:00
Tony Torralba
c6dd7ddf7a
Fix stub
2022-01-21 16:55:43 +01:00
Tony Torralba
4f253590f1
Fix method name in LocalDatabaseOpenMethodAccess
2022-01-21 16:55:43 +01:00
Tony Torralba
652a1d2dc2
Fix wrongly resolved rebase conflicts
2022-01-21 16:55:43 +01:00
Tony Torralba
5cf664411b
Remove unneeded nonSuspicious values
2022-01-21 16:55:43 +01:00
Tony Torralba
baa1f71a53
Add QLDoc
2022-01-21 16:55:43 +01:00
Tony Torralba
4e4f619ae4
Update java/ql/lib/semmle/code/java/security/CleartextStorageAndroidDatabaseQuery.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-21 16:55:43 +01:00
Tony Torralba
c5ed5fcaac
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-21 16:55:42 +01:00
Tony Torralba
ee84dae164
Fix predicate name
2022-01-21 16:55:42 +01:00
Tony Torralba
16b61f78e6
Fix QLDocs and the qhelp example
2022-01-21 16:55:42 +01:00
Tony Torralba
f0604e2e84
Added query for Cleartext Storage in Android Database
2022-01-21 16:55:42 +01:00
Henry Mercer
84907f91f1
JS: Fix copy/paste error in XSS ML-powered queries results patterns
...
We didn’t catch this because our unit tests test only library code due
to the previous difficulty of running queries with an ML model (the ML
models in packs work should fix that), and because the end-to-end
evaluation runs separate queries that have different result patterns.
Going forward we should create unit tests for the queries themselves,
which will require using the ML model in tests. We should also be able
to catch this type of error using DCA.
2022-01-21 15:17:52 +00:00
Mathias Vorreiter Pedersen
48064c1c8f
C++: Fix false positive.
2022-01-21 15:16:02 +00:00
Mathias Vorreiter Pedersen
7c8c2090f7
C++: Add real-world false positive from the 'cpp/return-stack-allocated-memory' query.
2022-01-21 15:14:18 +00:00
Mathias Vorreiter Pedersen
117795c409
Merge pull request #7682 from MathiasVP/rewrite-return-stack-allocated-memory-to-use-ir
...
C++: Use the IR for `cpp/return-stack-allocated-memory`.
2022-01-21 14:57:30 +00:00
yoff
a77a6ec864
Merge pull request #7684 from erik-krogh/patches
...
small refactorizations across CodeQL
2022-01-21 15:04:14 +01:00
Tom Hvitved
9d89cace95
Merge pull request #7643 from michaelnebel/csharp/struct-improvements
...
C#: Struct (and to a minor extent anonymous types) improvements
2022-01-21 14:51:26 +01:00
Anders Schack-Mulligen
5f7ee337cd
Java: Use more set literal syntax.
2022-01-21 13:58:27 +01:00
Anders Schack-Mulligen
41d294229d
Java: Add support for bitwise compound assignments in Guards.
2022-01-21 13:56:07 +01:00
Rasmus Lerchedahl Petersen
9aa4c4a6a7
python: Add missing input
...
also update test expectation
2022-01-21 13:55:33 +01:00
Rasmus Lerchedahl Petersen
41908cbf9f
python: add missing qldoc
2022-01-21 13:55:08 +01:00
Tony Torralba
1eaa379bb7
Merge pull request #7681 from atorralba/atorralba/improve-android-implicit-intents-query
...
Java: Improvements to the Android query Use of implicit PendingIntents
2022-01-21 13:46:17 +01:00
Rasmus Lerchedahl Petersen
49d4b1480d
python: Do not remove ChainedConfigs12.qll
...
since it was clearly already used.
Add deprecation message instead.
2022-01-21 12:27:29 +01:00
Rasmus Lerchedahl Petersen
35c9307baa
python: rewrite NoSQLInjection to use flow state
...
This allows a bit more precision. Specifically, we could
require the sanitizer to only affect `ConvertedToDict`.
In practice, most sanitizers woudl probably fail on raw
input also, though.
2022-01-21 12:12:58 +01:00
Tony Torralba
c7e1df5689
Update java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-21 11:57:11 +01:00
Erik Krogh Kristensen
a235f8f023
remove redundant inline type casts
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
b75c316c27
fix non-us spelling
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
f500bccbe4
add explicit this to member call
2022-01-21 11:46:33 +01:00
Erik Krogh Kristensen
ddfc3bc00f
use set literals instead of big disjunctions
2022-01-21 11:46:33 +01:00
Tom Hvitved
55f427ca0e
Ruby: Use multiple threads in QL test CI job
2022-01-21 11:46:08 +01:00
Benjamin Muskalla
830c2dc90a
Merge pull request #7603 from bmuskalla/commonsIoModel
...
Java: Replace Commons IO model
2022-01-21 11:42:27 +01:00
yoff
5b9ae9cede
Merge pull request #7659 from RasmusWL/move-regex-injection-files
...
Python: Move regex injection configuration files
2022-01-21 11:42:06 +01:00
Tony Torralba
0846d1f7b6
Merge pull request #7691 from atorralba/atorralba/fix-recursion-entrypointfieldstep
...
Java: Fix recursion in `entrypointFieldStep`
2022-01-21 11:37:58 +01:00
Tony Torralba
3f6e035016
Docs improvements
2022-01-21 11:37:02 +01:00
yoff
4fd0ada9a8
Merge pull request #7652 from RasmusWL/cleartext-remove-fps
...
Python: Remove usernames as sensitive source for cleartext queries
2022-01-21 11:30:40 +01:00
Erik Krogh Kristensen
f9d5cbf017
update qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-01-21 11:26:58 +01:00
Tony Torralba
d22632ef78
Fix recursion in entrypointFieldStep
...
When using local taint tracking to define a RemoteFlowSource, a recursion was created because entrypointFieldStep adds new RemoteFlowSources and was a local taint step. This is fixed by converting entrypointFieldStep into a defaultAdditionalTaintStep instead of a localAdditionalTaintStep, i.e. it will only affect global taint tracking from now on.
2022-01-21 10:48:13 +01:00
Erik Krogh Kristensen
debebb2b8c
rewrite the qhelp for js/insecure-dependency
2022-01-21 10:41:08 +01:00
Tom Hvitved
f9b906d1e2
C#: Update uses of RequiredSummaryComponentStack
2022-01-21 09:42:16 +01:00
Tom Hvitved
cba733136c
Data flow: Sync
2022-01-21 09:42:16 +01:00
Tom Hvitved
f1a2b21e44
Data flow: Restructure RequiredSummaryComponentStack
2022-01-21 09:42:16 +01:00
Rasmus Lerchedahl Petersen
a5bc5373d0
python: Rewrite path injection to use flow state
...
This removes the FP cause by chaining
This PR also removes `ChainedConfigs12.qll`,
as we hope to solve future problems via flow states.
2022-01-21 09:26:48 +01:00
Tom Hvitved
aa9cfebc65
Ruby: Replace getValueText with getConstantValue
2022-01-21 09:19:19 +01:00
CodeQL CI
b02f1c87a1
Merge pull request #7679 from erik-krogh/ql-doc-style
...
Approved by esbena
2022-01-20 23:43:44 -08:00
CodeQL CI
2287b6e549
Merge pull request #7675 from erik-krogh/move-url-sink-to-customizations
...
Approved by esbena
2022-01-20 23:43:15 -08:00
Aditya Sharad
ccc6291844
Merge rc/3.3 into rc/3.4
...
Conflicts in *-support.rst resolved in favour of rc/3.3, which has a new paragraph.
Enterprise version numbers updated to LGTM Enterprise 1.30 and CodeQL 2.7.6.
2022-01-20 15:49:10 -08:00
Erik Krogh Kristensen
15c1ce722a
Merge pull request #7678 from erik-krogh/use-set
...
JS: use more set literals
2022-01-20 21:03:48 +01:00
shati-patel
8fc429caf4
Emphasize use case for installing pack deps
2022-01-20 19:03:30 +00:00
Mathias Vorreiter Pedersen
bd1720f797
C++: Add change note.
2022-01-20 18:27:09 +00:00
Mathias Vorreiter Pedersen
e689f6bad2
C++: Use the IR for 'cpp/return-stack-allocated-memory'.
2022-01-20 18:22:49 +00:00
Tom Hvitved
cbea5eaeaa
C#: Simplify argument/parameter positions for captured variables
2022-01-20 17:08:12 +01:00
Tony Torralba
6fe0b78978
Remove PendingIntentAsField step and add SliceProviderLifecycle step
2022-01-20 16:52:07 +01:00
Andrew Eisenberg
534f8999b6
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-20 07:09:34 -08:00
Erik Krogh Kristensen
2bffe56580
update expected output
2022-01-20 16:06:57 +01:00
Erik Krogh Kristensen
3155114e36
use more set literals
2022-01-20 16:06:34 +01:00
Anders Schack-Mulligen
fede7dd238
Merge pull request #7676 from aschackmull/java/instanceaccessnode
...
Java: Add data flow node encapsulating instance accesses.
2022-01-20 15:40:21 +01:00
Erik Krogh Kristensen
a77b2b0209
Merge pull request #7668 from erik-krogh/simplify-casts
...
simplify expressions that could be type-casts
2022-01-20 15:20:18 +01:00
Erik Krogh Kristensen
5780161b2c
fix most issues found by ql/class-doc-style in JS
2022-01-20 15:10:16 +01:00
Alex Ford
9613ff743b
Merge pull request #7611 from github/ruby/protect_from_forgery-without-exception
...
Ruby: flag up `protect_from_forgery` calls without an exception strategy
2022-01-20 13:45:30 +00:00
Tony Torralba
caab1c3332
Merge pull request #6963 from atorralba/atorralba/android-onactivityresult-source
...
Android: Add the Intent parameter of the `onActivityResult` method as a source
2022-01-20 14:27:30 +01:00
Tony Torralba
29e87b3abd
Merge pull request #6975 from atorralba/atorralba/android-intent-uri-permission-manipulation
...
Java: CWE-266 - Query to detect Intent URI Permission Manipulation in Android applications
2022-01-20 14:27:02 +01:00
Geoffrey White
b230681bc8
Merge pull request #7650 from geoffw0/clrtxt3
...
C++: Improve cpp/cleartext-transmission
2022-01-20 13:21:54 +00:00
Rasmus Wriedt Larsen
f53dce3a83
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-20 14:20:15 +01:00
Anders Schack-Mulligen
43da5aabbe
Java: Add dataflow node encapsulating instance accesses.
2022-01-20 14:12:33 +01:00
Erik Krogh Kristensen
7167e856fe
move electron sink to the customizations file
2022-01-20 14:07:23 +01:00
Erik Krogh Kristensen
548fb47603
JS: move ExternalArtifact.qll into lib/ folder to fix ql/db-type-outside-core
2022-01-20 14:00:57 +01:00
Erik Krogh Kristensen
9b69de8588
QL: add query detecting use of db-types outside the lib folder
2022-01-20 14:00:55 +01:00
github-actions[bot]
ab218421da
Post-release preparation for codeql-cli-2.7.6
2022-01-20 12:59:20 +00:00
Tony Torralba
62f847a82e
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-20 13:44:10 +01:00
Tony Torralba
3957ebe880
Fix bitwiseLocalTaintStep
2022-01-20 13:34:32 +01:00
Tony Torralba
265f8a3b19
Make bitwise taintsteps specific for this query
2022-01-20 13:23:56 +01:00
Tony Torralba
4e9849e19d
Refactor IntentFlagsOrDataCheckedGuard to avoid footgun
2022-01-20 13:23:55 +01:00
Tony Torralba
62c21918b2
Add QLDoc to guard and sanitizer
2022-01-20 13:23:54 +01:00
Tony Torralba
58a0bcd70f
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-20 13:23:53 +01:00
Tony Torralba
8767d2db23
Don't capitalize the term content provider
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-20 13:23:52 +01:00
Tony Torralba
596cfd399e
Improve description
2022-01-20 13:23:52 +01:00
Tony Torralba
ab560234e3
Update java/change-notes/2021-10-27-android-intent-uri-permission-manipulation-query.md
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-20 13:23:51 +01:00
Tony Torralba
3405db31b8
Add qhelp
2022-01-20 13:23:51 +01:00
Tony Torralba
6152c8a989
Add change note
2022-01-20 13:23:48 +01:00
Tony Torralba
e1d30ebc09
Added severity
...
Removed duplicated code
2022-01-20 13:23:15 +01:00
Tony Torralba
ec8ffeed07
Add Intent URI Permission Manipulation query
2022-01-20 13:23:14 +01:00
Michael Nebel
e804922a2c
C#: Add flow test case for with expressions on anonymous types.
2022-01-20 13:14:06 +01:00
Michael Nebel
97d9985e0b
C#: Add support for flow via object initializer for anonymous types.
2022-01-20 13:12:19 +01:00
Tony Torralba
c09b6691e1
Merge pull request #6171 from atorralba/atorralba/promote-unsafe-certificate-trust
...
Java: Promote Unsafe certificate trust query from experimental
2022-01-20 12:07:03 +01:00
Felicity Chapman
e178626226
Merge pull request #7653 from github/felicitymay-patch-1
...
Port changes from main to rc/3.3 to avoid regression
2022-01-20 10:45:13 +00:00
Anders Schack-Mulligen
f154530141
Merge pull request #7662 from JLLeitschuh/patch-2
...
Fix typo in FileWritable
2022-01-20 11:13:59 +01:00
Benjamin Muskalla
8217873bae
Align files with new naming pattern
2022-01-20 11:02:53 +01:00
Anders Schack-Mulligen
4aa2661dc1
Merge pull request #7634 from bmuskalla/refactorLangModel
...
Refactor Apache Commons Lang model
2022-01-20 11:01:25 +01:00
Benjamin Muskalla
4cac35adad
Regnerate model to capture char[] APIs
2022-01-20 10:59:28 +01:00
Benjamin Muskalla
857c2778a6
Added missing model for ReadableByteChannel
...
This reveals more models for commons io
2022-01-20 10:59:28 +01:00
Benjamin Muskalla
b20b3ab480
Regenrate model to replace manual models
2022-01-20 10:59:27 +01:00
Benjamin Muskalla
93f6fde63c
Keep not-yet-covered models
2022-01-20 10:59:27 +01:00
Benjamin Muskalla
d07997699f
Introduce generated model for Commons IO
2022-01-20 10:59:24 +01:00
Geoffrey White
8bdbaf4b57
C++: Autoformat.
2022-01-20 09:52:24 +00:00
CodeQL CI
cfa670c123
Merge pull request #7651 from erik-krogh/CWE-471
...
Approved by asgerf, esbena
2022-01-20 01:47:39 -08:00
Tom Hvitved
a1cdf256ad
Merge pull request #7667 from github/release-prep/2.7.6
...
Release preparation for version 2.7.6
2022-01-20 10:45:17 +01:00
Erik Krogh Kristensen
4e8e3a7420
simplify expressions that could be type-casts
2022-01-20 10:41:35 +01:00
Benjamin Muskalla
2748bbffa3
Merge pull request #7656 from bmuskalla/excludeMainLoggingGenerator
...
Java: Exclude irrelevant rows from models
2022-01-20 10:40:51 +01:00
Tony Torralba
967308fbfd
Change InsecureTrustManagerConfiguration to DataFlow
2022-01-20 10:24:47 +01:00
mc
c105d71952
Update InsecureTrustManager.qhelp
...
Fixed typos and carried out and editorial review
2022-01-20 10:24:46 +01:00
Tony Torralba
7a1a45f5f9
QLDoc
2022-01-20 10:24:46 +01:00
Tony Torralba
77c2b43560
Add change note and severity score
2022-01-20 10:24:43 +01:00
Michael Nebel
76a0853f5b
C#: Add struct declaration and update line numbers for the existing test cases.
2022-01-20 10:23:57 +01:00
Tony Torralba
d58bb4753e
Refactor tests
2022-01-20 10:23:19 +01:00
Tony Torralba
ab4dc30f54
Refactor into libraries
2022-01-20 10:23:18 +01:00
Tony Torralba
7cd05fb685
Move from experimental
2022-01-20 10:23:18 +01:00
Michael Nebel
7d7ab58108
C#: Add flow test for record struct fields.
2022-01-20 09:58:02 +01:00
Michael Nebel
210bad6c29
C#: Add test case for with expressions for record structs, structs and anonymous types.
2022-01-20 09:58:02 +01:00
Michael Nebel
fc7f642734
C#: With expression examples for record structs, structs and anonymous types.
2022-01-20 09:58:02 +01:00
Michael Nebel
858aec3839
C#: Add test for source of the struct parameterless constructor(s).
2022-01-20 09:58:02 +01:00
Michael Nebel
073d2f2c75
C#: Add some example struct types, including one with a default constructor declarations.
2022-01-20 09:58:01 +01:00
Michael Nebel
547f492be0
Merge pull request #7577 from michaelnebel/csharp/line-pragma
...
C#: Make support for Line span pragma
2022-01-20 09:51:57 +01:00
github-actions[bot]
4ce8ccc52b
Release preparation for version 2.7.6
2022-01-20 08:21:18 +00:00
Harry Maclean
5dcee6ba27
Ruby: Add File.open as a FileSystemAccess
2022-01-20 21:09:41 +13:00
Rasmus Lerchedahl Petersen
32cbeae05f
python: missing start tag for relation
2022-01-20 08:56:12 +01:00
Rasmus Lerchedahl Petersen
d10ad3bdd4
python: update stats for tables
2022-01-20 08:42:32 +01:00
Harry Maclean
6bae03a7cc
Ruby: Update string const barrier guard
...
This change recognises guards like `FOO.include?`, where `FOO` is an array
constant.
2022-01-20 17:34:12 +13:00
Harry Maclean
13a0ece25c
Ruby: Add test case: array constant barrier guard
...
This guard isn't yet recognised as a `StringConstArrayInclusionCall`.
2022-01-20 17:07:01 +13:00
Andrew Eisenberg
95355b5854
Docs: Add back removed section on getting started
...
Adds a second getting started, specifically for checking out the
codeql repo as a way to get the core queries.
This ensures that people wanting to work in the traditional way still
have the old docs available.
2022-01-19 13:36:57 -08:00
Jonathan Leitschuh
23548c50e1
Fix typo in FileWritable
2022-01-19 16:14:38 -05:00
Tom Hvitved
70f4efb834
Merge pull request #7646 from hvitved/csharp/roslyn-tuple-elements-workaround
...
C#: Workaround Roslyn bug in `INamedTypeSymbol.TupleElements`
2022-01-19 19:54:29 +01:00
Tom Hvitved
128682b59e
C#: Replace Argument[-1] with Argument[Qualifier] in all flow summaries
2022-01-19 18:54:24 +01:00
Rasmus Lerchedahl Petersen
7e9a9e3d9a
python: remove compiler warnings
2022-01-19 18:01:58 +01:00
shati-patel
dc71ecef83
Docs: Mention packaging commands in CodeQL extension
2022-01-19 16:36:01 +00:00
Rasmus Wriedt Larsen
b9ee2960e2
Python: Add change-note
2022-01-19 17:24:53 +01:00
Rasmus Wriedt Larsen
aa10ad6a8a
Python: Fix RegexInjection query, add old deprecated versions
2022-01-19 17:22:44 +01:00
Rasmus Wriedt Larsen
e82ea7ad17
Python: move regex injection configuration files
...
I did not notice that these went to the wrong location in
https://github.com/github/codeql/pull/6693 . They should be in the
dataflow folder with the rest of the data-flow configurations files, the
injection folder is for old points-to based modeling.
2022-01-19 17:21:46 +01:00
Tom Hvitved
0990a1b404
C#: Get rid of negative parameter/argument data-flow positions
2022-01-19 17:14:37 +01:00
Tony Torralba
695e77a219
Simplify isSslSocket predicate
2022-01-19 17:01:28 +01:00
Mathias Vorreiter Pedersen
40c8881575
Merge pull request #7472 from erik-krogh/redundant-aggregate
...
QL-for-QL: Add a could-be-cast query
2022-01-19 15:48:00 +00:00
Henry Mercer
58b1a6fd40
Merge pull request #7655 from github/henrymercer/bump-atm-query-pack-v0.0.6
...
JS: Bump ML-powered query packs to v0.0.6
2022-01-19 15:44:55 +00:00
Tony Torralba
e442e50e6b
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-19 16:43:48 +01:00
Tony Torralba
101ad777e3
Move things around after rebase
2022-01-19 16:43:48 +01:00
Tony Torralba
03020582af
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-01-19 16:43:47 +01:00
Tony Torralba
9ffc5ab183
Update java/ql/src/semmle/code/java/security/UnsafeCertTrustQuery.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2022-01-19 16:43:47 +01:00
Tony Torralba
c16181dd2f
QLDocs
2022-01-19 16:43:46 +01:00
Tony Torralba
000a544729
Decouple UnsafeCertTrust.qll to reuse the taint tracking configuration
2022-01-19 16:43:43 +01:00
Tony Torralba
1e2a956a30
Remove unused stub
2022-01-19 16:43:02 +01:00
Tony Torralba
d9e98ceacc
Consider setSslContextFactory and fix tests
2022-01-19 16:43:01 +01:00
Tony Torralba
4d207101e2
Fix QLDoc
2022-01-19 16:43:00 +01:00
Tony Torralba
999acb0021
Improve qhelp references
2022-01-19 16:43:00 +01:00
Tony Torralba
e9712f04a4
Add missing QLDoc
2022-01-19 16:42:59 +01:00
Tony Torralba
698fd64f7f
Adjust test after rebase
2022-01-19 16:42:59 +01:00
Tony Torralba
68fe3dd9f4
Fix conflicts in experimental query
2022-01-19 16:42:58 +01:00
Tony Torralba
c24520cb75
Adjust qhelp after rebase
2022-01-19 16:42:58 +01:00
Tony Torralba
5997b874de
Add change note
2022-01-19 16:42:53 +01:00
Tony Torralba
9e93aecf75
Add spurious test case
2022-01-19 16:42:06 +01:00
Tony Torralba
19d1a780ca
Generalize sanitizer using local flow
2022-01-19 16:42:05 +01:00
Tony Torralba
64518bf91a
Handle a specific pass-by-reference flow issue
2022-01-19 16:42:04 +01:00
Tony Torralba
4508945f85
Fix assumption regarding when an SSLSocket does the TLS handhsake
2022-01-19 16:42:03 +01:00
Tony Torralba
e842acf9e0
Improve qhelp
2022-01-19 16:42:03 +01:00
Tony Torralba
5d4cd70f8c
Adjusted sources and sanitizer of UnsafeCertTrust taint tracking config
2022-01-19 16:42:02 +01:00
Tony Torralba
e43fff2d30
Use InlineExpectationsTest
2022-01-19 16:42:02 +01:00
Tony Torralba
02d0fa9188
Minor changes in QLDocs and a sanitizer's type
2022-01-19 16:42:01 +01:00
Tony Torralba
4313baf622
Big refactor:
...
- Move classes and predicates to appropriate libraries
- Overhaul the endpoint identification algorithm logic to use taint tracking
- Adapt tests
2022-01-19 16:42:00 +01:00
Tony Torralba
e0f4c73aed
Move from experimental
2022-01-19 16:42:00 +01:00
Rasmus Lerchedahl Petersen
a0e79c1d7a
update stats for types
...
- should still update stats for tables
2022-01-19 16:38:19 +01:00
Tony Torralba
6096080156
Use all possible packages for Fragment classes
...
Also fix stub
2022-01-19 16:23:11 +01:00
Benjamin Muskalla
52406dc8df
Exclude logging sinks
...
Those sinks are too coarse grained to be exposed as sinks on any model.
2022-01-19 16:11:59 +01:00
Benjamin Muskalla
25d251c24f
Exclude main methods from models
2022-01-19 16:11:59 +01:00
Tony Torralba
3c9fac0c6e
Sync DataFlowImplForOnActivityResult.qll
2022-01-19 16:11:51 +01:00
Tony Torralba
6a4d2ee850
Apply code review suggestions
2022-01-19 16:08:31 +01:00
Tony Torralba
57ff13dd19
Sync DataFlowImplForOnActivityResult to latest changes
2022-01-19 16:08:31 +01:00
Tony Torralba
ea4ff80cc6
Add DataFlowImplForOnActivityResult to identical-files.json
2022-01-19 16:08:31 +01:00
Tony Torralba
37916a8368
Fix previous merge
2022-01-19 16:08:31 +01:00
Tony Torralba
d9d9ad7d63
Use dedicated instance of DataFlow
2022-01-19 16:08:31 +01:00
Tony Torralba
aef63f69b0
Formatting
2022-01-19 16:08:30 +01:00
Tony Torralba
4b3029564c
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-19 16:08:29 +01:00
Tony Torralba
c675028537
Add Fragment and Activity edge case
2022-01-19 16:08:28 +01:00
Tony Torralba
9ae1f1cf85
QLDoc
2022-01-19 16:08:27 +01:00
Tony Torralba
211cb9370f
Add the Intent parameter of onActivityResult as a source
2022-01-19 16:08:25 +01:00
Tony Torralba
520d8f5ec5
Add stubs
2022-01-19 16:06:23 +01:00
Tom Hvitved
7e3f3c6e2a
Merge pull request #7515 from hvitved/csharp/extraction-mode
...
C#: Introduce extractor mode to identify DBs created with `codeql test run`
2022-01-19 16:04:57 +01:00
Chris Smowton
162b3822dd
Merge pull request #7613 from github/smowton/admin/tag-random-used-once
...
Remove security-severity tag to java/random-used-once
2022-01-19 14:43:08 +00:00
Henry Mercer
c134e6c9ef
JS: Bump ML-powered query packs to v0.0.6
2022-01-19 14:40:42 +00:00
Rasmus Wriedt Larsen
93b3cd669a
Python: Cleanup: Remove old points-to versions of queries
...
Since we've internally agreed that we've reached the same or better set
of results.
2022-01-19 15:30:12 +01:00
Felicity Chapman
51e8b4c7ed
Port changes from main to rc/3.3 to avoid regression
2022-01-19 14:26:52 +00:00
Rasmus Wriedt Larsen
e82e648ca1
Python: Remove usernames as sensitive source for cleartext queries
...
Closes #6363 , #6927 , #6726 , #7497 , #7116
2022-01-19 15:25:21 +01:00
Rasmus Lerchedahl Petersen
db253e8939
python: upgrade and downgrade scripts
2022-01-19 15:22:57 +01:00
Chris Smowton
c63fcb2c69
Add change note
2022-01-19 14:13:45 +00:00
Rasmus Wriedt Larsen
f3daff4e5a
Python: Add FP tests for cleartext logging
2022-01-19 15:13:06 +01:00
Chris Smowton
f0645a34b9
Remove security-severity tag instead
...
This leaves the Java query in the same state as its C# cousin.
2022-01-19 14:06:40 +00:00
Erik Krogh Kristensen
cb9e14f544
add cwe-471 to js/prototype-pollution
2022-01-19 14:54:57 +01:00
Alex Ford
0aab670b17
Ruby: add missing example rails action
2022-01-19 13:47:00 +00:00
Tom Hvitved
cb098df4ea
Merge pull request #7334 from github/hmac/regexp-interpolations
...
Ruby: Resolve simple string interpolations
2022-01-19 14:43:58 +01:00
Alex Ford
45ed5a806c
Ruby: changenote for rb/csrf-protection-disabled enhancement
2022-01-19 13:41:00 +00:00
Alex Ford
b27d315ff4
Ruby: add an example of protect_from_forgery with: :exception
2022-01-19 13:30:27 +00:00
Mathias Vorreiter Pedersen
dfbde23821
Merge pull request #7627 from geoffw0/nullterm5
...
C++: Fix branch related FPs in cpp/improper-null-termination.
2022-01-19 13:30:05 +00:00
Rasmus Lerchedahl Petersen
ef9fb0873f
python: tools for writing upgrades and downgrade
...
adapted from [the ruby instructions](https://github.com/github/codeql/blob/main/ruby/doc/prepare-db-upgrade.md )
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
36e18d5d80
python: dataflow for match
...
- also update `validTest.py`, but commented out for now
otherwise CI will fail until we force it to run with Python 3.10
- added debug utility for dataflow (`dataflowTestPaths.ql`)
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
bb210f4172
pythos: SSA for match
...
- new SSA definition `PatternCaptureDefinition`
- new SSA definition `PatternAliasDefinition`
- implement `hasDefiningNode`
2022-01-19 14:29:58 +01:00
Rasmus Lerchedahl Petersen
de8ecb214f
python: Wrappers for database classes
...
- new syntactic category `Pattern` (in `Patterns.qll`)
- subpatterns available on statments
- new statements `MatchStmt` and `Case`
(`Match` would conflict with the shared ReDoS library)
- new expression `Guard`
- support for pattern lists
2022-01-19 14:29:58 +01:00
Erik Krogh Kristensen
e4203a4109
add CWE-471 to the prototype-pollution queries
2022-01-19 14:26:34 +01:00
Tom Hvitved
dacb33d1dd
C#: Adjust Roslyn workaround
2022-01-19 14:12:21 +01:00
Geoffrey White
0230494799
C++: Expand QLDoc comment.
2022-01-19 13:07:55 +00:00
Henry Mercer
061b9badfe
Merge pull request #7649 from github/henrymercer/bump-atm-query-pack-v0.0.5
...
JS: Bump ML-powered query packs to v0.0.5
2022-01-19 13:00:41 +00:00
Geoffrey White
acfd593eb4
C++: Change note.
2022-01-19 13:00:36 +00:00
Geoffrey White
330b4c3704
C++: Generalize hasSocketInput a little to include fgets and friends.
2022-01-19 13:00:35 +00:00
Geoffrey White
9c2d961ae5
C++: Fix another expression of stdin / stdout we see in practice.
2022-01-19 13:00:34 +00:00
Michael Nebel
d7cd1cf0b9
C#: Address review comments.
2022-01-19 13:50:02 +01:00
Tom Hvitved
4f90b45dd7
C#: Address review comments
2022-01-19 13:46:22 +01:00
Tom Hvitved
c8509cc382
C#: Introduce extractor mode to identify DBs created with codeql test run
2022-01-19 13:46:22 +01:00
Geoffrey White
d77ba020f9
C++: Support more routines as proof-of-encryption in cpp/cleartext-transmission.
2022-01-19 12:40:32 +00:00
Rasmus Lerchedahl Petersen
b17f844f35
python: New generated files
2022-01-19 13:36:32 +01:00
Geoffrey White
974a8b1a9a
C++: Add a test case.
2022-01-19 12:33:21 +00:00
Henry Mercer
d467725ccd
JS: Bump ML-powered query packs to v0.0.5
2022-01-19 12:08:33 +00:00
Michael Nebel
3df30545d3
Merge pull request #7628 from michaelnebel/csharp/issue-7609
...
C#: Fix false positive alert for shadowing on record types.
2022-01-19 12:24:57 +01:00
Tom Hvitved
71ddd00a6c
C#: Workaround Roslyn bug in INamedTypeSymbol.TupleElements
2022-01-19 11:33:03 +01:00
Michael Nebel
edafdc8fde
C#: Added change note.
2022-01-19 11:04:53 +01:00
Michael Nebel
194da454b1
C#: Add record deconstruct method as an exception from the bad practice rule.
2022-01-19 11:04:53 +01:00
Michael Nebel
2eea6ca5fd
C#: Example record type with autogenerated Deconstruct method.
2022-01-19 11:04:53 +01:00
Mathias Vorreiter Pedersen
bdfde88e99
Merge pull request #7630 from JarLob/patch-2
...
C++: Reduce FPs in IncorrectPrivilegeAssignment.ql
2022-01-19 09:49:43 +00:00
Erik Krogh Kristensen
ef2eacebce
add a js/empty-password-in-configuration-file query
2022-01-19 10:48:45 +01:00
Michael Nebel
55f787bcae
Merge pull request #7605 from michaelnebel/csharp/record-struct
...
C#: Support for record structs
2022-01-19 10:39:52 +01:00
Harry Maclean
994fcf54b5
Merge pull request #7126 from jeffgran/jg/graphql-ruby
...
Ruby: Add support for GraphQL
2022-01-19 22:19:30 +13:00
Erik Krogh Kristensen
b7a0b8765e
add js/http-dependency query
2022-01-19 10:05:39 +01:00
Harry Maclean
08d48b9375
Add top-level doc comment to GraphQL.qll
2022-01-19 21:42:46 +13:00
Tony Torralba
b2c7175ac5
Merge pull request #7641 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-19 09:34:01 +01:00
Tom Hvitved
f02aeafef1
Ruby: Move regex/non-regex split into TAstNode to convey disjointness
2022-01-19 09:22:01 +01:00
github-actions[bot]
f7240be136
Add changed framework coverage reports
2022-01-19 00:09:52 +00:00
Jaroslav Lobačevski
a1b0315d90
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.ql
2022-01-19 00:52:10 +01:00
Andrew Eisenberg
01b5881de6
Docs: Remove reference to checking out main branch
...
We are no longer including information about how to check out
github/codeql, so this paragraph doesn't fit any more.
2022-01-18 15:48:33 -08:00
Andrew Eisenberg
0cd6556964
Docs: Update analyzing databases docs
...
Add more information about running packs. Include the `--download` flag.
2022-01-18 15:03:08 -08:00
Andrew Eisenberg
7fcf567eda
Docs: Simplify getting started docs
...
It is no longer necessary to check out a version of `github/codeql` as
a sibling directory to the distribution. Instead, users can download
the required packs as needed. using the `pack download` command or
the `--download` option for `codeql database analyze`.
2022-01-18 15:03:08 -08:00
Harry Maclean
4f7f92490a
Distinguish regex components from strings
...
Create a set of classes for components of regex literals,
separate from those of string literals. This allows us to special-case
components of free-spacing regexes (ones with the /x flag) to not have a
`getValueText()`.
This in turn is useful because our regex parser can't handle free-spacing
regexes, so excluding them ensures that we don't generate erroneous
ReDoS alerts.
2022-01-19 11:23:40 +13:00
Jaroslav Lobačevski
3fa2516898
Update cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.ql
2022-01-18 21:47:55 +01:00
Jaroslav Lobačevski
d1c89562b8
Apply suggestions from code review
2022-01-18 21:45:13 +01:00
Chris Smowton
84097468cc
Merge pull request #7286 from luchua-bc/java/unsafe-url-forward-dispatch
...
Java: CWE-552 Query to detect unsafe request dispatcher usage
2022-01-18 18:19:20 +00:00
Henry Mercer
63672ca394
Merge pull request #7616 from github/henrymercer/js-atm-add-query-help
...
JS: Add query help for ML-powered queries
2022-01-18 18:11:53 +00:00
Chris Smowton
1e32514600
Avoid using this for a non-extending supertype, and remove needless casts
2022-01-18 17:20:40 +00:00
Benjamin Muskalla
9e91b805d6
Sort Lang3 models
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
e6800c877c
Merge Lang3 rows
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
736e68820c
Split out Lang3 models
2022-01-18 18:10:37 +01:00
Benjamin Muskalla
67b60dcf78
Sort Lang2 rows
2022-01-18 18:10:36 +01:00
Benjamin Muskalla
82bda6d573
Merge Lang2 summary models
2022-01-18 18:10:36 +01:00
Benjamin Muskalla
8eb6743586
Split out Lang2 rows
2022-01-18 18:10:33 +01:00
Chris Smowton
d744cf9053
Clean up guard logic:
...
* Always sanitize after the second guard, not the first
* Only check basic-block dominance in one place
* One BarrierGuard extension per final guard
2022-01-18 17:10:06 +00:00
Chris Smowton
748008ad51
Remove dangling reference to UnsafeRequestPath.java
2022-01-18 17:08:38 +00:00
luchua-bc
a3d65a8ed0
Update recommendation in qldoc and make examples more comprehendible
2022-01-18 17:01:26 +00:00
Geoffrey White
982fb8f73a
C++: Add change note.
2022-01-18 16:38:44 +00:00
Robert Marsh
024bd27485
Merge pull request #7578 from MathiasVP/store-dest-should-not-be-use
...
C++: Store destinations should not be uses for dataflow SSA
2022-01-18 11:36:15 -05:00
Jeff Gran
47697f59c1
Ruby: Add classes for detecting user input from graphql-ruby
2022-01-18 09:13:58 -07:00
CodeQL CI
1912c56f82
Merge pull request #7631 from RasmusWL/sqlalchemy-scoped-session
...
Approved by tausbn
2022-01-18 14:31:49 +00:00
Rasmus Wriedt Larsen
95e935e9c1
Python: Support SQLAlchemy scoped_session
2022-01-18 14:34:31 +01:00
Erik Krogh Kristensen
30d896bdbb
QL: make the alert-message more precise when the type-cast is also redundant
2022-01-18 14:25:43 +01:00
Jaroslav Lobačevski
92f5a5f893
Reduce FPs in IncorrectPrivilegeAssignment.ql
...
Implements suggestions from https://github.com/github/codeql/pull/6949#issuecomment-976482965
2022-01-18 13:43:17 +01:00
Erik Krogh Kristensen
14d2f5fe02
QL: add a new ql/could-be-cast query
2022-01-18 13:37:32 +01:00
Erik Krogh Kristensen
a1f4c85dea
QL: update expected output for the printAst test
2022-01-18 13:37:04 +01:00
Erik Krogh Kristensen
1ec868eeae
QL: various improvements to Ast.qll
2022-01-18 13:23:33 +01:00
Erik Krogh Kristensen
95ae113994
QL: downgrade redundant-inline-cast to a warning query
2022-01-18 13:22:01 +01:00
Erik Krogh Kristensen
ea7945bac1
QL: show recommendation queries by default, and remove the MissingQLDoc query
2022-01-18 13:21:07 +01:00
Henry Mercer
be0c26f83d
Merge pull request #7617 from github/henrymercer/js-atm-update-alert-messages
...
JS: Update alert messages for ML-powered queries
2022-01-18 11:37:02 +00:00
Mathias Vorreiter Pedersen
cb0cc8d859
Merge pull request #7625 from geoffw0/nullterm4
...
C++: Fix some code duplication.
2022-01-18 11:18:06 +00:00
Tony Torralba
b16b0270d2
Merge pull request #6779 from atorralba/atorralba/android-implicit-pending-intents
...
Java: CWE-927 - Query to detect the use of implicit PendingIntents
2022-01-18 12:14:47 +01:00
Geoffrey White
548a62d1ab
C++: Fix branch related FPs in cpp/improper-null-termination.
2022-01-18 11:13:08 +00:00
Felicity Chapman
c3ed74d63c
Merge pull request #7604 from github/lgtm-1.29-docs
...
Update version numbers in CodeQL support notes for LGTM 1.29
2022-01-18 11:09:38 +00:00
Chris Smowton
9819752bdd
Merge pull request #7526 from smowton/smowton/fix/restore-nodes-edges-consistency
...
Don't include arg -> param edges in PathGraph::edges where arg is not reachable
2022-01-18 11:05:47 +00:00
Benjamin Muskalla
7e215a5193
Merge pull request #7599 from bmuskalla/modelWriter
...
Java: Model Appenable and Writer
2022-01-18 11:55:27 +01:00
Henry Mercer
1893b9f7a9
Merge pull request #7376 from github/henrymercer/js-atm-absent-features-optimization
...
JS: Update featurization for absent features optimization
2022-01-18 10:15:53 +00:00
Tony Torralba
f103d45340
Merge branch 'main' into atorralba/android-implicit-pending-intents
2022-01-18 10:50:49 +01:00
Mathias Vorreiter Pedersen
e1598aba5e
C++: Fix spelling.
2022-01-18 09:44:36 +00:00
Tony Torralba
3ff7710a18
Improve ExplicitIntent's QLDoc
2022-01-18 10:43:52 +01:00
Tony Torralba
fe2755c4a0
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-18 10:41:19 +01:00
Benjamin Muskalla
365a8d9bbd
Fix flow for fluent appendable api
2022-01-18 10:41:00 +01:00
Benjamin Muskalla
8e6a15640f
Model basic channel APIs
2022-01-18 10:40:39 +01:00
Anders Schack-Mulligen
fff3b5c5b4
Dataflow: Add qldoc.
2022-01-18 10:39:55 +01:00
Anders Schack-Mulligen
9479301485
Ruby: Accept qltest expected changes.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
5cfa3c7927
C++: Accept qltest expected changes.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
7b98ca9b0a
C#: Adjust qltest expected output.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
aa9912a699
Java: Fix expected output
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
71e39353ca
Dataflow: Sync.
2022-01-18 10:36:52 +01:00
Anders Schack-Mulligen
b22c4e3c56
Dataflow: Bugfix: include subpaths ending at a sink.
2022-01-18 10:34:14 +01:00
Chris Smowton
f7d3892320
Update test expectations
2022-01-18 10:30:09 +01:00
Anders Schack-Mulligen
dfa79f6119
Dataflow: Sync.
2022-01-18 10:30:09 +01:00
Anders Schack-Mulligen
46736a137c
Dataflow: Don't include subpaths that can't reach a sink.
2022-01-18 10:30:09 +01:00
Chris Smowton
2c37885f6e
Sync dataflow
2022-01-18 10:30:09 +01:00
Chris Smowton
7c9b44b4cb
Don't include arg -> param edges in PathGraph::edges whose arg is not reachable
...
This avoids lots of missing-node warnings from `codeql bqrs interpret` as it discards the nodes that occur in the `edges` relation but not `nodes`. The problem arises because subpaths introduced two variants of `reach`, one of which is more restrictive than simply `reach(succ) and succ = pred.getASuccessor()`, so it no longer suffices to just check that the successor is reachable.
2022-01-18 10:30:09 +01:00
Michael Nebel
de3d62b3f4
C#: Update stats file for the new relations (they are unfortunately empty).
2022-01-18 09:33:40 +01:00
Michael Nebel
bf21026771
C#: Add downgrade scripts for the line span pragma.
2022-01-18 09:32:14 +01:00
Michael Nebel
8fd116fbd7
C#: Add upgrade scripts for the new tables requires for the line span pragma.
2022-01-18 09:32:14 +01:00
Michael Nebel
ac47c96f48
C#: Add Line span pragma test case.
2022-01-18 09:32:14 +01:00
Michael Nebel
8b048ca17e
C#: Add line span pragma example.
2022-01-18 09:32:14 +01:00
Michael Nebel
93255dfe13
C#: Add QL library support for the Line span directive.
2022-01-18 09:32:14 +01:00
Michael Nebel
7e264668d8
C#: Refator directive visitor to use expression body.
2022-01-18 09:32:14 +01:00
Michael Nebel
af380f846e
C#: Add support in the extractor for the LineSpanDirective.
2022-01-18 09:32:14 +01:00
Michael Nebel
195d40c04e
C#: Add new class needed for LineSpanDirective and modify existing implementation to use the new types.
2022-01-18 09:32:14 +01:00
Michael Nebel
a197befb5f
C#: Add shared base class for line and line span pragmas.
2022-01-18 09:32:14 +01:00
Michael Nebel
c9467d7e94
C#: Add new tables to the dbscheme line span pragma.
2022-01-18 09:32:14 +01:00
Anders Schack-Mulligen
c41ec1f8ec
Merge pull request #7619 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-18 09:17:40 +01:00
github-actions[bot]
b8959f7bdb
Add changed framework coverage reports
2022-01-18 00:10:52 +00:00
Alex Ford
c1a51d94a2
Ruby: add test for protect_from_forgery without exception strategy
2022-01-17 17:44:52 +00:00
Erik Krogh Kristensen
d63f4bfd94
Merge pull request #7615 from erik-krogh/super-charpred
...
QL: support this.method() calls in the charpred that references non-extending supertypes
2022-01-17 18:32:10 +01:00
Felicity Chapman
e0110bd25e
FIx typo in new note
2022-01-17 17:20:00 +00:00
Henry Mercer
ffa4135cbe
JS: Update alert messages for ML-powered queries
2022-01-17 17:19:49 +00:00
Erik Krogh Kristensen
a4cfb80b81
QL: update comment
2022-01-17 17:19:15 +00:00
Felicity Chapman
e7dde79d50
Add note and link to main CodeQL CLI docs
2022-01-17 17:14:58 +00:00
Erik Krogh Kristensen
85c273a413
QL: support this.method() calls in the charpred that references non-extending supertypes
2022-01-17 17:42:35 +01:00
Henry Mercer
e9128466d4
JS: Add query help for ML-powered queries
...
Query help is identical to the original query, except for a new
paragraph prepended to the overview explaining that the queries are
experimental.
We add Markdown query help since only Markdown query help is embedded in
SARIF via `--sarif-add-query-help`.
2022-01-17 16:34:50 +00:00
Henry Mercer
568d37e9b9
JS: Update definition of ATM query suite
...
It's simpler to just run all the queries in the pack instead of
specifying the IDs.
2022-01-17 16:34:50 +00:00
Geoffrey White
d475101286
C++: Fix some code duplication.
2022-01-17 16:26:22 +00:00
Owen Mansel-Chan
065043b311
Merge pull request #7588 from owen-mc/add-specific-needs-reference-predicates
...
Dataflow: Add language-specific NeedsReference predicates
2022-01-17 15:51:34 +00:00
Asger Feldthaus
79f799066a
JS: Update test output
2022-01-17 16:27:57 +01:00
Michael Nebel
b927aad6ed
C#: Address review comments related to record structs.
2022-01-17 16:16:18 +01:00
Michael Nebel
6c1bb4a3a9
C#: Add test case for record class and record structs.
2022-01-17 16:16:18 +01:00
Michael Nebel
746fd603d8
C#: Add flow summary test for record struct constructors.
2022-01-17 16:16:18 +01:00
Michael Nebel
9770f09839
C#: Deprecate Record and introduce RecordClass instead. Also make flow summary support for record struct constructors.
2022-01-17 16:16:18 +01:00
Michael Nebel
55cb2aa160
C#: Use modifier to decide, if a type is a record like type and implement support for record struct types.
2022-01-17 16:16:18 +01:00
Michael Nebel
dc76775d07
C#: Consider 'record' a type modifier in the extractor (it can be applied to both class and struct).
2022-01-17 16:16:18 +01:00
Michael Nebel
c17bd29640
C#: Rename C# code file and update test.
2022-01-17 16:16:18 +01:00
Tony Torralba
e967b8a9be
Merge pull request #6576 from atorralba/atorralba/android-cleartext-storage-filesystem
...
Java: Create new query Cleartext storage of sensitive information in Android filesystem
2022-01-17 14:02:38 +01:00
Tony Torralba
227929508f
Merge pull request #6923 from atorralba/atorralba/android-fragment-injection
...
Java: CWE-470 - Queries to detect Fragment Injection in Android applications
2022-01-17 14:02:15 +01:00
Tom Hvitved
3c837c322b
Merge pull request #7514 from github/post-release-prep/codeql-cli-2.7.5
...
Post-release preparation for codeql-cli-2.7.5
2022-01-17 12:40:33 +01:00
Tony Torralba
7beab7cb59
Apply code review suggestions
2022-01-17 12:02:27 +01:00
Mathias Vorreiter Pedersen
78642aaae2
Merge pull request #7593 from MathiasVP/fix-join-order-in-get-conversion-type
...
C++: Fix join order in 'getConversionType4'
2022-01-17 11:01:08 +00:00
Chris Smowton
16aa53a928
Add security tag to java/random-used-once
...
Raised in https://github.com/github/codeql/issues/7601 , this is one of the only .ql files that has a security-severity score but not the tag "security", including many other queries that live outside the `Security/` subdirectory.
Besides this the only other files with this security-severity-but-no-security-tag combination are:
```
java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql
java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql
```
Given their location I'm assuming these queries are disabled by default and likely shouldn't changed?
2022-01-17 10:35:34 +00:00
Tony Torralba
a23b8a4a43
Update java/ql/src/Security/CWE/CWE-470/FragmentInjection.inc.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-17 11:20:39 +01:00
Tony Torralba
ba3a4fb717
Rename filesystemStore predicate after d9e6e5aa04
2022-01-17 11:13:41 +01:00
Tony Torralba
500deac12d
Change query description
2022-01-17 11:11:05 +01:00
Tony Torralba
d9e6e5aa04
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-17 11:11:05 +01:00
Tony Torralba
22aad17d0e
Apply review suggestions
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-17 11:11:04 +01:00
Tony Torralba
9bbba3c96f
Adjust UnsupportedExternalAPIs test
2022-01-17 11:11:04 +01:00
Tony Torralba
1e4840e071
Fix predicate name
2022-01-17 11:11:03 +01:00
Tony Torralba
79ddbd6fe4
Fix QLDoc and the qhelp example
2022-01-17 11:11:03 +01:00
Tony Torralba
c1ac09a063
Added query for Cleartext Storage in Android Filesystem
2022-01-17 11:11:00 +01:00
Paolo Tranquilli
6a53b7b233
Merge pull request #7543 from github/rdmarsh2/cpp/hex-format-range-analysis
...
C++: Use range analysis for maximum lengths of `%x` formats
2022-01-17 08:32:34 +01:00
Alex Ford
d09f48ecb4
Ruby: flag up protect_from_forgery calls without an exception strategy
2022-01-16 20:56:13 +00:00
Artem Smotrakov
825fe1797a
Fixed another false-positive in CWE-297/IgnoredHostnameVerification.ql
2022-01-16 18:55:49 +00:00
Artem Smotrakov
6dad0e21d9
Ignore wrapped HostnameVerifier.vefify() calls
2022-01-16 18:29:30 +00:00
Artem Smotrakov
dcf251bb93
Fixed typos in IgnoredHostnameVerification.qhelp
2022-01-16 18:27:49 +00:00
Fosstars
2b33265d0f
Added a query for ignored hostname verification
...
- Added IgnoredHostnameVerification.ql
- Added a qhelp file with examples
- Added tests
2022-01-16 18:27:49 +00:00
Artem Smotrakov
f78002bc02
Fixed a false-positive in CWE-297/IgnoredHostnameVerification.ql
2022-01-16 18:25:18 +00:00
Fosstars
e11cb943a6
Added a query for ignored hostname verification
...
- Added IgnoredHostnameVerification.ql
- Added a qhelp file with examples
- Added tests
2022-01-16 18:25:18 +00:00
luchua-bc
4797fce48a
Update use cases and qldoc
2022-01-16 01:15:29 +00:00
luchua-bc
978ef1570a
Update method names
2022-01-16 01:11:25 +00:00
Tom Hvitved
2ecf0d3264
Merge pull request #7550 from michaelnebel/csharp/global-using
...
C#: Support for identifying whether a using directive is "global".
2022-01-14 20:03:18 +01:00
Robert Marsh
5df6bcf952
C++: change note for hex format range analysis
2022-01-14 13:18:58 -05:00
Dave Bartolomeo
bce2a810a3
Merge pull request #7400 from github/dbartol/change-note-instructions
...
Add instructions for creating change notes.
2022-01-14 13:10:44 -05:00
Robert Marsh
9de63b2812
Merge branch 'main' into rdmarsh2/cpp/hex-format-range-analysis
...
Accept test changes from query split
2022-01-14 12:53:52 -05:00
Andrew Eisenberg
fbb5d7196f
Merge branch 'main' into post-release-prep/codeql-cli-2.7.5
2022-01-14 08:23:43 -08:00
Tony Torralba
a2c98baf29
Reordering
2022-01-14 17:17:57 +01:00
Tony Torralba
eb1806c0a9
Split PathMatchGuard into three guards
2022-01-14 17:14:18 +01:00
Ian Lynagh
bba8e45e74
Merge pull request #7602 from igfoo/igfoo/typos
...
Fix a couple of typos: clases / clasess
2022-01-14 15:56:04 +00:00
Henry Mercer
ed28b7f174
Merge pull request #7575 from github/henrymercer/atm-remove-code-to-features
...
JS: Remove ATM `CodeToFeatures` library
2022-01-14 15:31:34 +00:00
Michael Nebel
e09009cd8e
Merge pull request #7118 from michaelnebel/csharp-primary-ql-class
...
C#: PrimaryQlClass
2022-01-14 16:14:28 +01:00
Felicity Chapman
fdf77ad2b9
Update version numbers for LGTM 1.29
2022-01-14 15:07:29 +00:00
Ian Lynagh
22dc24629f
Fix a couple of typos: clases / clasess
2022-01-14 14:28:29 +00:00
Tony Torralba
fb1287d577
Use dominance instead of getParent
...
Add clarification comments to PathMatchGuard
2022-01-14 15:28:02 +01:00
Mathias Vorreiter Pedersen
25253c7b8d
C++: Don't count write operations as uses for IR dataflow. Accept test changes.
2022-01-14 13:39:57 +00:00
Mathias Vorreiter Pedersen
e8afec413a
C++: Add testcase that demonstrates a FP caused by spurious flow through phi nodes in IR dataflow.
2022-01-14 13:34:27 +00:00
Tony Torralba
136fefbab5
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-14 13:38:17 +01:00
luchua-bc
877c52981f
Remove the deprecated library keyword
2022-01-14 12:13:41 +00:00
Tony Torralba
cde7a35c1f
QLDoc
2022-01-14 13:12:30 +01:00
Michael Nebel
8c6c8b0adb
C#: Remove un-needed ql doc comment.
2022-01-14 12:55:54 +01:00
Tony Torralba
6aac848015
Fix imports
2022-01-14 12:43:08 +01:00
Tony Torralba
9f616e7cbe
Refactor to use FlowState
...
Remove the auxiliary DataFlow configuration
2022-01-14 12:24:35 +01:00
Mathias Vorreiter Pedersen
b51c85597b
Merge pull request #7529 from erik-krogh/fixup-library-deps
...
QL: recognize dependecies of the form: libraryPathDependencies: library-name
2022-01-14 11:13:56 +00:00
Erik Krogh Kristensen
b02fecf125
Merge pull request #7600 from erik-krogh/ql-for-ql-team
...
QL: change reviewers of QL-for-QL to a newly created team
2022-01-14 11:45:40 +01:00
Erik Krogh Kristensen
47e56365c4
QL: change reviewers of QL-for-QL to a newly created team
2022-01-14 11:32:09 +01:00
Henry Mercer
d55e6d1ca7
Merge pull request #7594 from github/henrymercer/js-atm-rename-queries
...
JS: Update names, IDs, and tags for ML-powered queries
2022-01-14 10:28:24 +00:00
Benjamin Muskalla
a4429d01a3
Add tests for writer models
2022-01-14 11:12:35 +01:00
Benjamin Muskalla
37ca6a5e41
Model Appenable and Writer
...
This allows us to track taint carried through all kind of writers.
2022-01-14 11:12:35 +01:00
Mathias Vorreiter Pedersen
6d95d47467
Merge branch 'main' into fix-join-order-in-get-conversion-type
2022-01-14 09:53:17 +00:00
Michael Nebel
6009d71e9a
C#: Add getAPrimaryQlClass override to UnknownExpr.
2022-01-14 10:41:44 +01:00
Tony Torralba
df95317a58
Fix tests after stub change
2022-01-14 10:33:21 +01:00
Tony Torralba
6f06be9419
Update change note
2022-01-14 10:33:19 +01:00
Tony Torralba
bd4abf4fd0
Additional Notification models
2022-01-14 10:32:38 +01:00
Tony Torralba
a9757fbc83
Setting null Components is not a sanitizer
2022-01-14 10:32:37 +01:00
Tony Torralba
a59a4024a5
Update stubs
2022-01-14 10:32:36 +01:00
Tony Torralba
66794665f3
Remove unneeded implicit read step
2022-01-14 10:32:36 +01:00
Tony Torralba
a0a914466c
Rewording
2022-01-14 10:32:33 +01:00
Tony Torralba
9c12c5f8b8
Remove duplicated models
2022-01-14 10:32:01 +01:00
Tony Torralba
f963887c58
Change test to avoid collision with SensitiveCommunication.ql
2022-01-14 10:32:01 +01:00
Tony Torralba
48acff9262
Remove unneeded code
2022-01-14 10:32:00 +01:00
Tony Torralba
9e3594fcf1
Added more sinks
2022-01-14 10:32:00 +01:00
Tony Torralba
1e3e48132c
Rewording
2022-01-14 10:31:59 +01:00
Tony Torralba
47c851efaf
Consider more startService methods
2022-01-14 10:31:59 +01:00
Tony Torralba
12059a8a50
Update models to use synthetic fields
2022-01-14 10:31:58 +01:00
Tony Torralba
d49e52fb73
Add support for PendingIntents in Notifications
2022-01-14 10:31:58 +01:00
Tony Torralba
c73e4ebc48
Remove models after rebase
2022-01-14 10:31:58 +01:00
Tony Torralba
7f85dae63b
Add support for implicit field read flows
2022-01-14 10:31:57 +01:00
Tony Torralba
e58a8587db
Add support for Slices
2022-01-14 10:31:56 +01:00
Tony Torralba
d43242d09e
Added tests
2022-01-14 10:31:56 +01:00
Tony Torralba
d0077b8c12
Added query ImplicitPendingIntents
2022-01-14 10:31:53 +01:00
Mathias Vorreiter Pedersen
68385dfab5
Merge pull request #7386 from github/redsun82/cpp-overrunning-write-precision-split
...
C++: split `cpp/overrunning-write` into two
2022-01-14 09:11:39 +00:00
Tom Hvitved
6c20585fc7
C#: Eliminate bad magic optimization
...
```
[2022-01-14 08:57:14] (253s) Tuple counts for Stmt::getAChild#bbf/3@8dfbc66f after 1m53s:
4922010396 ~5% {3} r1 = JOIN ControlFlowElement::ControlFlowElement::getEnclosingCallable_dispred#ff_10#join_rhs WITH ControlFlowElement::ControlFlowElement::getEnclosingCallable_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'cfe', Rhs.1 'cfe', Lhs.0 'c'
1597068 ~2% {3} r2 = JOIN r1 WITH Element::Element::getAChild_dispred#ff ON FIRST 2 OUTPUT Lhs.0 'cfe', Lhs.2 'c', Lhs.1 'result'
return r2
```
2022-01-14 10:10:23 +01:00
Tom Hvitved
411d2b2876
C#: Update stats
2022-01-14 10:10:23 +01:00
Michael Nebel
f025db0371
C#: Add downgrade script for deleting using_global relation.
2022-01-14 10:10:23 +01:00
Michael Nebel
dcd6a6be40
C#: Add database upgrade script for adding the using_global relation.
2022-01-14 10:10:22 +01:00
Michael Nebel
a1eff1603a
C#: Add test for global using directive.
2022-01-14 10:10:22 +01:00
Michael Nebel
c118d9bf6f
C#: Add support for the global modifier for using directives.
2022-01-14 10:10:22 +01:00
Michael Nebel
e305a8a6c5
C#: Refactor Tuples to use expression body syntax.
2022-01-14 10:10:22 +01:00
Michael Nebel
6e72f6e2c4
C#: Refactor to re-use code to extract modifier tokens.
2022-01-14 10:10:13 +01:00
Edoardo Pirovano
f2818ebb5e
Merge pull request #7489 from edoardopirovano/fix-example
...
Fix example in JavaScript query
2022-01-14 08:58:28 +00:00
Tony Torralba
8f73772955
Merge pull request #7595 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-14 09:32:13 +01:00
Anders Schack-Mulligen
0b24af901d
Merge pull request #7349 from aschackmull/dataflow/state
...
Dataflow: Add support for flow state
2022-01-14 09:12:38 +01:00
github-actions[bot]
685336fa23
Add changed framework coverage reports
2022-01-14 00:10:33 +00:00
Henry Mercer
e9bb9f5294
JS: Update names, IDs, and tags for ML-powered queries
2022-01-13 17:45:40 +00:00
Henry Mercer
8e9d8c112d
JS: Improve comments in FunctionBodyFeatures.qll
2022-01-13 17:20:42 +00:00
Henry Mercer
2aea3257cb
JS: Improve documentation for getTokenizedAstNode
2022-01-13 17:20:41 +00:00
Andrew Eisenberg
4ffd8c62ac
Merge pull request #7579 from github/aeisenberg/changenote-upgrades-removal
...
Changenotes: Add changenotes for upgrades refactoring
2022-01-13 09:09:06 -08:00
Andrew Eisenberg
c6deccf863
Minor fixes to the getting started docs
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-01-13 09:02:10 -08:00
Henry Mercer
92d6fecc73
Optimize performance of body tokens
...
The refactoring to remove the `CodeToFeatures` AST reintroduced a
performance problem. This commit resolves it by pushing size
restrictions into intermediate predicates.
2022-01-13 16:29:04 +00:00
Michael Nebel
71baf32596
Update csharp/ql/consistency-queries/PrimaryQlClass.ql
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-01-13 16:36:31 +01:00
Owen Mansel-Chan
d41c55c69c
Add needed predicates for Ruby and C#
...
This was done manually.
2022-01-13 15:10:19 +00:00
Owen Mansel-Chan
2de6340ff5
Sync FlowSummaryImpl.qll
...
Done using sync-files.py
2022-01-13 15:09:25 +00:00
Owen Mansel-Chan
83a25698bb
Allow adding inputs and outputs needing reference
2022-01-13 15:09:17 +00:00
Tony Torralba
b6886b8e43
Move code to qll file
2022-01-13 15:28:57 +01:00
Tony Torralba
81feaaec02
Refactor PathMatchGuard
2022-01-13 15:24:41 +01:00
Anders Schack-Mulligen
c44cf29992
Merge pull request #7587 from owen-mc/add-default-taint-sanitizer-guard
...
Dataflow: Add default taint sanitizer guard
2022-01-13 14:44:55 +01:00
Tony Torralba
cd9a485c47
Refactor NullOrEmptyCheckGuard
2022-01-13 14:44:08 +01:00
Anders Schack-Mulligen
61490e74d8
Merge pull request #7561 from aschackmull/java/misc-perf
...
Java: A few perf fixes for getASupertype*().
2022-01-13 14:43:28 +01:00
Mathias Vorreiter Pedersen
6148af4621
C++: Fix join order in 'getConversionType4'.
2022-01-13 13:28:36 +00:00
Anders Schack-Mulligen
f7cf327e71
Dataflow: Sync
2022-01-13 13:28:43 +01:00
Anders Schack-Mulligen
a34c981209
Dataflow: Address comments.
2022-01-13 13:28:24 +01:00
Asger Feldthaus
708408a458
JS: Recognize "sql" option as a query string
2022-01-13 13:04:41 +01:00
Anders Schack-Mulligen
69973dadb3
Merge pull request #7548 from zbazztian/spring-taint-summaries
...
Java: Add Spring and Apache Common Langs taint flow steps
2022-01-13 13:00:41 +01:00
Paolo Tranquilli
e6763c858d
C++: add bindingset to private Printf predicate
...
That predicate turned out to create a lot of tuples, of which only a
minimal part was then used in the query.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
64d15d6226
C++: fix inc.qhelp files and change notes
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
7b4300e4cf
C++: Apply suggestions in documentation
...
Co-authored-by: Sarah Edwards <skedwards88@github.com >
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
9d49ad9f20
C++: use includes in OverrunWrite qhelp files
...
Also added the relevant CERT C _and_ C++ standard references where they
were missing, and did some minor stylistic tweaks to
`OverrunWriteFloat.qhelp`.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
c117a1e21f
C++: demote VeryLikelyOverrunWrite cast results
...
There were some false positives where something like
int x;
// ...
sprintf(buff, "%ld", (long)x);
was considered as if the parameter had a non-trivial range analysis only
because the range of `int` is smaller than the range for `long`, without
any non-trivial range analysis actually done on `x`.
These will now be reported by `OverrunWrite` instead.
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
630982cc31
C++: auto format Printf.qll
2022-01-13 11:59:48 +00:00
Paolo Tranquilli
9f811b2439
C++: remove unused variables and fix tests
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
013216d5e6
C++: exclude widening from VeryLikelyOverrunWrite
...
This also restrict what we consider "non-trivial" range analysis, as we
now require both ends to be non-trivially bounded for signed integers.
This avoids false positives stemming from a non trivial upper bound but
no meaningful lower bound, for example.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
aac029841a
C++: doc fixes to VeryLikelyOverrunWrite
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
c8741f6475
C++: update 2021-12-14-overruning-write-split.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
1e4861a944
C++: shorten VeryLikelyOverrunWrite @name
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
106400238a
C++: tweak overrunning write qhelp files
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
8ac34f3db5
C++: NoSpecifiedEstimateReason→Unspecified...
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
4a85b9b0cc
C++: add VeryLikelyOverrunWrite.ql to cwe-120
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
97f1a5bac0
C++: add VeryLikelyOverrunWrite.qhelp
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
10b62154a1
C++: add cpp/very-likely-overruning-write help
...
Also update the help of `cpp/overruning-write`, as the case shown there
will actually not be flagged by that query any more.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
b979f02e5d
C++: fix OverrunWrite for backward compatibility
...
Rather than testing for `TypeBoundsAnalysis`, we test that the reason is
not `ValueFlowAnalysis` (which is reported by the new
`cpp/very-likely-overruning-write` query), so that if a client has
overridden `BufferWrite::getMaxData` the `NoSpecifiedEstimateReason` is
taken into account.
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
db6214fdff
C++: add change note for new overrun write query
2022-01-13 11:59:47 +00:00
Paolo Tranquilli
a0059202db
C++: split cpp/overrunning-write into two
...
This splits the `cpp/overruning-write` into two separate queries based
off on the reason for the estimation. If the overrun is detected based
on non-trivial range analysis, the results are now marked by the new
`cpp/very-likely-overruning-write` high precision query. If it is based
on less precise, usually type based bounds, then it will still be marked
by `cpp/overruning-write` which remains at medium precision.
2022-01-13 11:59:47 +00:00
Michael Nebel
85fc127c0a
C#: Fix BDD limit issue (thank you @jbj).
2022-01-13 12:46:56 +01:00
Owen Mansel-Chan
7e42ccfbf1
Don't cache defaultTaintSanitizerGuard for java
2022-01-13 11:36:20 +00:00
Michael Nebel
7c11e2d7e9
C#: Add a consistency test for getAPrimaryQlClass
2022-01-13 12:20:42 +01:00
Michael Nebel
6b937a939b
C#: Add getAPrimaryQlClass overrides
2022-01-13 12:20:41 +01:00
Stephan Brandauer
40ad88ba53
Merge pull request #7474 from kaeluka/db-reads-as-taint-sources
...
JS: DB reads as taint sources
2022-01-13 12:06:48 +01:00
Michael Nebel
8583a4ffea
Merge pull request #7583 from michaelnebel/csharp/fix-broken-test
...
C#: Narrow string interpolation expressions to a specific single file in testcase.
2022-01-13 11:37:52 +01:00
Erik Krogh Kristensen
89bab6ae12
Merge pull request #7097 from erik-krogh/railsReDoS
...
JS/PY/RB: support a limited number of ranges for ReDoS analysis
2022-01-13 11:04:36 +01:00
Stephan Brandauer
93507a2d71
combine two implementations for database-accesses as remote flow sources
2022-01-13 10:53:58 +01:00
Michael Nebel
aacb03a74b
C#: Narrow string interpolation expressions to a specific single file in testcase.
2022-01-13 10:25:33 +01:00
Stephan Brandauer
63aaf24063
base implementation of Sequelize model on models-as-data
2022-01-13 09:41:25 +01:00
Anders Schack-Mulligen
da69886777
Merge pull request #7580 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-13 09:26:00 +01:00
Sebastian Bauersfeld
a6e4f29560
Java: Use the interface instead of the abstract class
2022-01-13 14:13:36 +07:00
Sebastian Bauersfeld
69f329ffec
Java: Add test cases for AbstractMessageSource.getMessage() methods
2022-01-13 14:13:27 +07:00
Sebastian Bauersfeld
39b6678b7d
Java: Add test case for StringEscapeUtils.escapeJson() taint step.
2022-01-13 11:18:37 +07:00
github-actions[bot]
625836a3be
Add changed framework coverage reports
2022-01-13 00:11:30 +00:00
Andrew Eisenberg
e435a3e9c3
Changenotes: Add changenotes for upgrades refactoring
2022-01-12 11:36:31 -08:00
Henry Mercer
1c3c9216f5
Merge pull request #7576 from github/henrymercer/js-bump-atm-versions
...
JS: Bump ATM pack versions to 0.0.4
2022-01-12 16:53:10 +00:00
Stephan Brandauer
09a28c428c
base implementation of Spanner model on models-as-data
2022-01-12 17:07:16 +01:00
Henry Mercer
9abc3411a4
JS: Bump ATM pack versions to 0.0.4
2022-01-12 15:19:13 +00:00
Robert Marsh
5031d6c4a3
Merge pull request #7566 from MathiasVP/smaller-join-in-reachesRefParameter
...
C++: Smaller join in `reachesRefParameter`
2022-01-12 10:04:35 -05:00
Owen Mansel-Chan
8e8278764b
Add predicate defaultTaintSanitizerGuard for each language
...
This was done manually, as these files are not synced by sync-files.py.
2022-01-12 14:44:56 +00:00
Owen Mansel-Chan
c112980b81
Sync TaintTrackingImpl.qll
...
Done automatically using sync-files.py
2022-01-12 14:44:55 +00:00
Owen Mansel-Chan
9ec3d7787c
Add option for default taint sanitizer guard
...
This allows languages to specify A sanitizer guard in all
global taint flow configurations but not in local taint.
2022-01-12 14:44:55 +00:00
github-actions[bot]
8a2d92badc
Post-release preparation for codeql-cli-2.7.5
2022-01-12 13:28:43 +00:00
Henry Mercer
7f61738a23
Use US English spelling
2022-01-12 13:07:09 +00:00
Henry Mercer
6e37a65e84
Remove CodeToFeatures AST library
2022-01-12 12:47:28 +00:00
Henry Mercer
957e34d8a7
Make function body features library independent of CodeToFeatures AST
2022-01-12 12:47:28 +00:00
Henry Mercer
9e50ce873d
Move function body features into their own file
2022-01-12 12:47:28 +00:00
Henry Mercer
865fb5d0ef
Migrate representative entity -> representative function
2022-01-12 12:47:27 +00:00
Henry Mercer
0e5b493d0e
Remove CodeToFeatures AST consistency checks
...
We no longer use the `CodeToFeatures` AST, therefore these checks are
defunct.
2022-01-12 12:47:27 +00:00
Henry Mercer
387829bbb4
Extract body tokens from the JS AST, not the CodeToFeatures AST
2022-01-12 12:47:25 +00:00
Henry Mercer
3ef69763a7
Merge pull request #7567 from github/henrymercer/atm-body-tokens-perf-opt
...
ATM: Optimize body tokens by pushing in size restriction
2022-01-12 12:45:27 +00:00
Tamás Vajk
9065a7f320
Merge pull request #7573 from tamasvajk/fix/java-field-decl-tostr
...
Java: Fix toString on field declarations with single field
2022-01-12 13:03:16 +01:00
Tony Torralba
8a80e02861
Merge pull request #7574 from pwntester/improve_strings_qll
...
Add models for AbstractStringBuilder.substring,subsequence,getChars
2022-01-12 12:01:28 +01:00
Tony Torralba
c2105e506b
Added test cases
2022-01-12 11:06:58 +01:00
Alvaro Muñoz Sanchez
715d372572
Add models for AbstractStringBuilder.substring,subsequence,getChars
2022-01-12 10:54:27 +01:00
Anders Schack-Mulligen
c6a9b2b6ff
Merge pull request #7572 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-12 09:39:14 +01:00
Tamas Vajk
b9e0310aa2
Java: Fix toString on field declarations with single field
2022-01-12 09:22:16 +01:00
Michael Nebel
f17c110f51
Merge pull request #7562 from michaelnebel/csharp/record-seal-tostring
...
C#: Record types are allowed to seal ToString (test only).
2022-01-12 08:08:32 +01:00
luchua-bc
263dbd33f6
Optimize the query
2022-01-12 02:33:17 +00:00
github-actions[bot]
c79e8ab440
Add changed framework coverage reports
2022-01-12 00:10:48 +00:00
Andrew Eisenberg
e4eb2c2a59
Update docs on the output of resolve qlpacks
...
The output has changed and there are no more upgrades
packs. There are also other changes included here.
2022-01-11 15:54:53 -08:00
Andrew Eisenberg
da4f1d86aa
Merge pull request #7355 from github/aeisenberg/remove-upgrades
...
Move upgrades into standard library packs
2022-01-11 14:09:10 -08:00
Andrew Eisenberg
07228672df
Merge branch 'main' into aeisenberg/remove-upgrades
2022-01-11 11:25:27 -08:00
Mathias Vorreiter Pedersen
c45127fdd6
Merge pull request #7541 from github/rdmarsh2/dataflow-ipa-params
...
C++: Use an IPA type rather than negative indexes for argument/parameter matching in data flow
2022-01-11 16:52:13 +00:00
Tony Torralba
7b0d9ea525
Merge pull request #7054 from atorralba/atorralba/promote-log-injection
...
Java: Promote Log Injection from experimental
2022-01-11 17:26:18 +01:00
Henry Mercer
3f70476c87
ATM: Optimize body tokens by pushing in size limit
...
Pushing the restriction to 256 tokens into the `bodyTokens` predicate
means we avoid this predicate blowing up due to very large functions.
This results in a runtime improvement from 1800s+ to 294s as measured
on a problematic repo on my machine (I didn't wait for the query to
finish running).
2022-01-11 16:16:54 +00:00
Tony Torralba
1030ff7063
Update java/ql/src/Security/CWE/CWE-117/LogInjection.ql
2022-01-11 16:25:32 +01:00
Tony Torralba
4aacba8594
Merge pull request #6468 from atorralba/atorralba/promote-cleartext-sharedprefs
...
Java: Promote Cleartext storage of sensitive information using SharedPreferences from experimental
2022-01-11 16:23:53 +01:00
Benjamin Muskalla
426f3117d6
Clarify model names and escape variables
2022-01-11 15:58:21 +01:00
Tony Torralba
394c4a9ee0
Remove unused code
2022-01-11 14:50:48 +01:00
Mathias Vorreiter Pedersen
b3a7090068
C++: Fix join in reachesRefParameter by joining with 'getEnd' instead
...
of 'getANode'.
Before:
Tuple counts for FlowVar::FlowVar::reachesRefParameter_dispred#ff/2@956ac39i after 229ms:
24806 ~1% {2} r1 = JOIN FlowVar::FlowVar_internal::parameterIsNonConstReference#f WITH Parameter::Parameter::getFunction_dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Rhs.1
56985 ~3% {3} r2 = JOIN r1 WITH num#FlowVar::FlowVar_internal::TBlockVar#fff_12#join_rhs ON FIRST 1 OUTPUT Rhs.1 'this', Lhs.0 'p', Lhs.1
2384489 ~4% {4} r3 = JOIN r2 WITH FlowVar::FlowVar_internal::getAReachedBlockVarSBB#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1 'p', Lhs.0 'this'
49457 ~0% {2} r4 = JOIN r3 WITH SubBasicBlocks::SubBasicBlock::getANode_dispred#fb ON FIRST 2 OUTPUT Lhs.3 'this', Lhs.2 'p'
return r4
After:
Tuple counts for FlowVar::FlowVar::reachesRefParameter_dispred#ff/2@46f8bfn7 after 32ms:
24806 ~1% {2} r1 = JOIN FlowVar::FlowVar_internal::parameterIsNonConstReference#f WITH Parameter::Parameter::getFunction_dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Rhs.1
56985 ~1% {3} r2 = JOIN r1 WITH num#FlowVar::FlowVar_internal::TBlockVar#fff_12#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'p', Rhs.1 'this'
56985 ~1% {3} r3 = JOIN r2 WITH SubBasicBlocks::SubBasicBlock::getEnd_dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'this', Rhs.1, Lhs.1 'p'
49457 ~0% {2} r4 = JOIN r3 WITH FlowVar::FlowVar_internal::getAReachedBlockVarSBB#ff ON FIRST 2 OUTPUT Lhs.0 'this', Lhs.2 'p'
return r4
2022-01-11 13:48:20 +00:00
Michael Nebel
77763d7ee5
Merge pull request #7559 from michaelnebel/csharp/const-interpolatedstring
...
C#: Constant string interpolation (test only).
2022-01-11 14:01:55 +01:00
Michael Nebel
56bc3db46a
C#: Add test case for sealed ToString modifier on a record type.
2022-01-11 13:58:43 +01:00
Michael Nebel
ae5d3a1ccb
C#: Add example of sealing ToString on a record type.
2022-01-11 13:57:29 +01:00
Anders Schack-Mulligen
fdb4851521
Java: A few perf fixes for getASupertype*().
2022-01-11 13:33:54 +01:00
Tony Torralba
50caf7d8dc
Move change note to new location and remove import
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-01-11 12:24:44 +01:00
Tony Torralba
b9e32208ee
Move change note to new location
2022-01-11 12:23:16 +01:00
Michael Nebel
1d8f8f79bb
C#: Add const interpolated string test case.
2022-01-11 12:02:07 +01:00
Michael Nebel
5b89f0e0b8
C#: Add example of const interpolated string.
2022-01-11 12:01:40 +01:00
Benjamin Muskalla
49d2fbfb5f
Fixed slug references and PR skips
2022-01-11 11:47:28 +01:00
Stephan Brandauer
132e0bf4b7
add database accesses as additional (heuristic) remote flow sources
2022-01-11 11:38:41 +01:00
Sebastian Bauersfeld
e2a9ced691
Java: Pass taint through Apache's StringEscapeUtils.escapeJson() method.
2022-01-11 15:49:44 +07:00
Sebastian Bauersfeld
f36ee95128
Java: Pass taint through Spring's AbstractMessageSource.getMessage() methods.
2022-01-11 15:48:29 +07:00
Anders Schack-Mulligen
2a36744deb
Merge pull request #7552 from smowton/smowton/fix/local-parameterized-classes
...
Note that parameterizations of local classes are themselves local
2022-01-11 09:36:15 +01:00
Alex Ford
b9ed8ed416
Merge pull request #7553 from github/revert-7498-dependabot/cargo/ruby/generator/clap-3.0
...
Ruby: Revert "Update clap requirement from 2.33 to 3.0 in /ruby/generator"
2022-01-10 19:36:40 +00:00
Alex Ford
17e5b9cffa
Revert "Update clap requirement from 2.33 to 3.0 in /ruby/generator"
2022-01-10 18:21:04 +00:00
Chris Smowton
e352a4b994
Note that parameterizations of local classes are themselves local
...
Previously `LocalClass` itself would match `.isLocal()` whereas `LocalClass<Param>` would not. Rather than require each individual user to check for `.getSourceDeclaration().isLocal()`, let's note that the specializations themselves are local.
2022-01-10 18:19:31 +00:00
Robert Marsh
fe355a0bc9
C++: update test comments
2022-01-10 12:38:08 -05:00
Tony Torralba
fbebf5e953
Move change note to new location
2022-01-10 17:27:02 +01:00
Tony Torralba
0e738622df
Merge branch 'main' into atorralba/promote-log-injection
2022-01-10 17:24:25 +01:00
Tony Torralba
cc92ce2754
Fix QLDoc
2022-01-10 17:13:13 +01:00
Tony Torralba
e1e5e78464
Apply suggestions from code review
...
- Update CleartextStorage library to latest refactor
- Move change note to new location
2022-01-10 17:10:55 +01:00
Tony Torralba
d17e973b6b
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-10 17:09:41 +01:00
Tony Torralba
ec8c234872
Fix predicate name
2022-01-10 17:09:41 +01:00
Tony Torralba
55dc783f28
Move from experimental and refactor
2022-01-10 17:09:37 +01:00
CodeQL CI
d912a98b02
Merge pull request #7171 from asgerf/js/mad
...
Approved by erik-krogh
2022-01-10 13:17:09 +00:00
Anders Schack-Mulligen
f590d2566e
DataFlow: Fix test.
2022-01-10 11:25:52 +01:00
Anders Schack-Mulligen
c8a6798c05
Ruby: Workaround for optimiser problem.
...
A size 1 DataFlowType causes misoptimisations.
2022-01-10 11:21:18 +01:00
Tom Hvitved
d2ebbe0819
Merge pull request #7469 from hvitved/csharp/promote-adhoc-consistency-checks
...
C#: Promote existing ad-hoc consistency checks to consistency queries
2022-01-10 11:10:25 +01:00
Michael Nebel
533fc7a912
Merge pull request #7532 from michaelnebel/csharp/file-scoped-namespace
...
C#: Make support for file scoped namespace declarations.
2022-01-10 09:02:18 +01:00
Mathias Vorreiter Pedersen
a5ccd6a23b
Merge pull request #7521 from rdmarsh2/rdmarsh2/cpp/use-guards-in-overflow
2022-01-09 14:09:04 +00:00
Robert Marsh
67fb48fcc1
C++: use range analysis for hex format lengths
...
The "new" result on line 189 is a tighter bound than was previously
established, not a newly introduced location.
2022-01-07 16:16:22 -05:00
Robert Marsh
fa9242befe
C++: Add tests for bounded hex format values
2022-01-07 16:08:53 -05:00
Robert Marsh
673399719e
C++: autoformat DataFlowPrivate
2022-01-07 15:23:24 -05:00
Felicity Chapman
3b0d55e2f9
Merge pull request #5893 from niroshan/patch-1
...
Update README.md
2022-01-07 19:33:41 +00:00
Robert Marsh
78b8d113bb
C++: PR comments on DataFlow Position
2022-01-07 14:21:56 -05:00
Robert Marsh
4322a39807
C++: fix typo in Overflow.qll abs handling
2022-01-07 14:09:47 -05:00
Erik Krogh Kristensen
cc5e9fea77
add test
2022-01-07 18:44:04 +01:00
Erik Krogh Kristensen
f7a63d5ea0
remove duplicated line
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
c8d29a9cf1
sync files
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
1a8b6d7414
recognize ranges without upper bounds
2022-01-07 18:38:01 +01:00
Erik Krogh Kristensen
acaf294bee
support a limited number of regexp ranges
2022-01-07 18:36:30 +01:00
Robert Marsh
a126154dfb
C++: use -1 for this in dataflow Position
2022-01-07 11:39:26 -05:00
Robert Marsh
1890a14026
C++: IPA for pointer arg instead of negative index
...
This takes advantage of the new ArgumentPosition and ParameterPosition
types in the shared DataFlow library interface to represent indirections
with an IPA type rather than the negative-index system in use previously
2022-01-07 11:39:26 -05:00
Robert Marsh
4f23cce63b
C++: Accept more test output
2022-01-07 11:27:45 -05:00
Michael Nebel
23b8444348
C#: Cleanup C# source code file and add a test case for namespace delcarations.
2022-01-07 16:04:43 +01:00
Michael Nebel
b8f6d17bc1
C#: Add test for file scoped namespace.
2022-01-07 16:04:43 +01:00
Michael Nebel
a6d847b532
C#: Make support for FileScoped namespace declaration in the extrator.
2022-01-07 16:04:43 +01:00
Erik Krogh Kristensen
bb94c42a35
explicit this
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-07 15:22:21 +01:00
Mathias Vorreiter Pedersen
4ee653378e
Merge pull request #7517 from MathiasVP/avoid-self-joins-in-toctou-query
...
C++: Remove bad self joins in `cpp/toctou-race-condition`.
2022-01-07 13:08:30 +00:00
Michael Nebel
94c1a489e0
Merge pull request #7507 from michaelnebel/csharp-libdataflow-cleanup
...
C#: Refactor and cleanup LibraryTypeDataFlow
2022-01-07 13:16:08 +01:00
Michael Nebel
17219eff61
Merge pull request #7530 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-07 13:15:49 +01:00
Michael Nebel
929f6ca578
C#: Address review comments.
2022-01-07 10:26:33 +01:00
Michael Nebel
d3368dcc23
C#: Remove the LibraryTypeDataFlow file as the remaining code is dead.
2022-01-07 10:26:32 +01:00
Michael Nebel
9b47249f6a
C#: Migrate the legacy clearContent flow summaries to the new framework.
2022-01-07 10:26:32 +01:00
Michael Nebel
fd317c2e7b
C#: Move RecordConstructorFlow.
2022-01-07 10:26:32 +01:00
Michael Nebel
fb950848c7
C#: Remove unused case, when converting SummaryComponent stacks.
2022-01-07 10:26:32 +01:00
Michael Nebel
5a0e6ed8e6
C#: Remove unsued predicates in CallableFlowSource and subclasses.
2022-01-07 10:26:32 +01:00
Michael Nebel
19914aba89
C#: Remove CallableFlowSink.
2022-01-07 10:26:32 +01:00
Michael Nebel
ed4d09bc8b
C#: Remove unneeded imports.
2022-01-07 10:26:32 +01:00
Michael Nebel
d042c4b3e4
C#: Remove unsused type,class and module AccessPath.
2022-01-07 10:26:32 +01:00
Michael Nebel
d5768bf4ed
C#: Remove more empty predicates.
2022-01-07 10:26:31 +01:00
Michael Nebel
a6b79926b2
C#: Remove unused predicate toCallableFlowSink.
2022-01-07 10:26:31 +01:00
Michael Nebel
ecc9593f00
C#: Remove the unused predicate callable flow.
2022-01-07 10:26:31 +01:00
Michael Nebel
c52787c741
C#: Move the declaration of synthetic fields to where they are needed.
2022-01-07 10:26:31 +01:00
Michael Nebel
608aba7cff
C#: Delete empty predicate requiresAccessPath.
2022-01-07 10:26:31 +01:00
Felicity Chapman
ad82523b91
Apply suggestions from code review
2022-01-07 08:49:37 +00:00
Felicity Chapman
95c9f89b04
Merge branch 'main' into patch-1
2022-01-07 08:49:13 +00:00
github-actions[bot]
efb1cd4f3b
Add changed framework coverage reports
2022-01-07 00:10:30 +00:00
Erik Krogh Kristensen
9afd360731
QL: recognize dependecies of the form: libraryPathDependencies: library-name
2022-01-06 23:35:28 +01:00
Robert Marsh
c6da1f2be0
C++: re-add comment
2022-01-06 12:43:22 -05:00
Robert Marsh
355fc0ae63
C++: Use Guards library in Overflow.qll
...
Replaces the ad-hoc guard handling with the Guards library. Fixes an
observed false positive pattern, and (hopefully) means some pragmas are
no longer necessary for performance.
2022-01-06 12:15:37 -05:00
Robert Marsh
617bdbc5ba
C++: test for guard-by-return in Overflow.qll
2022-01-06 12:15:37 -05:00
Robert Marsh
d5682f157a
Merge pull request #7525 from MathiasVP/remove-rank-in-ssa-internals
...
C++: Remove `rank` aggregate in `SsaInternals`
2022-01-06 12:09:57 -05:00
Andrew Eisenberg
6d62227576
Merge pull request #7431 from aeisenberg/aeisenberg/solorigate-publish
...
Solorigate: Extract to separate qlpack
2022-01-06 08:53:32 -08:00
Mathias Vorreiter Pedersen
173cefd7e4
C++: Respond to PR reviews.
2022-01-06 15:39:40 +00:00
haby0
759ec31508
Delete shutil_path_injection.py file
2022-01-06 21:38:35 +08:00
Michael Nebel
b3cb250ece
Merge pull request #7516 from michaelnebel/csharp/improve-csv-validation
...
C#: Introduce Csv validation on kind.
2022-01-06 14:31:26 +01:00
Michael Nebel
9cafab1b4c
Merge pull request #7465 from michaelnebel/csharp-stringvalues-csv
...
C#: Introduce flow summaries for StringValues.
2022-01-06 14:30:29 +01:00
Rasmus Wriedt Larsen
3e1dcc3d11
Merge pull request #7518 from tausbn/python-extend-unreachable-statement-test
...
Python: Extend unreachable statement test
2022-01-06 14:07:29 +01:00
Mathias Vorreiter Pedersen
671954025d
C++: Fix qldoc.
2022-01-06 11:02:15 +00:00
Asger F
c9fcdb8261
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-01-06 11:51:27 +01:00
Mathias Vorreiter Pedersen
2f42054f8f
C++: Rename 'hasRankInBlock' to 'hasIndexInBlock' since it's not really a rank computation anymore.
2022-01-06 10:31:05 +00:00
Mathias Vorreiter Pedersen
fdb9fb588c
C++: Remove the rank aggregate from 'SsaInternals.qll'.
2022-01-06 10:30:31 +00:00
haby0
05b0daa0b7
Add the test of shutil module in FileSystemAccess.py
2022-01-06 14:14:42 +08:00
Harry Maclean
43ddc54f2b
Ruby: Add Module#const_get as a code execution
...
Module#const_get takes a single string argument and interprets it as the
name of a constant. It then looks up the constant and returns its value.
Object.const_get("Math::PI")
# => 3.141592653589793
By itself, this method is not as dangerous as e.g. eval, but if the
value returned is a class that is then instantiated, this can allow an
attacker to instantiate arbitrary Ruby classes.
As a result, I think it's safe to say that any remote input flowing into
this call is a potential vulnerability. A real-world example of this is
https://github.com/advisories/GHSA-52p9-v744-mwjj .
2022-01-06 13:03:41 +13:00
Tom Hvitved
ac9cac78bc
Ruby: Fix typo
2022-01-06 12:27:03 +13:00
Tom Hvitved
c3fd272f9b
Ruby: Simplify getValueText logic for StringlikeLiterals
2022-01-06 12:27:03 +13:00
Tom Hvitved
799ec23b0d
Ruby: Generalize ExprChildMapping logic to AstNodes
2022-01-06 12:27:03 +13:00
Tom Hvitved
322f8356dd
Ruby: Include StringComponents in the CFG
2022-01-06 12:27:03 +13:00
Tom Hvitved
301d0bbdf8
Ruby: Restructure test to avoid dead code
2022-01-06 12:27:03 +13:00
Harry Maclean
23f1352953
Add ReDoS test that uses string interpolation
...
This exercises the support for resolving string interpolations, and is
based on a real vulnerability:
https://github.com/advisories/GHSA-jxhc-q857-3j6g )
2022-01-06 12:27:03 +13:00
Harry Maclean
32c93e70e2
Include simple interpolations in getValueText
...
When calculating `StringlikeLiteral.getValueText`, include results from
interpolations where we can determine their string value. For example:
b = "b" # local variable
D = "d" # constant
"a#{b}c" # getValueText() = "abc"
"a#{b}c{D}" # getValueText() = "abcd"
/#a#{b}c{D}/ # getValueText() = "abcd"
2022-01-06 12:27:03 +13:00
Harry Maclean
3df3fb092b
Make room for new test code
...
This change is split over several commits so it is easier to see.
This change adds some extra lines, which will be populated in the next
commit.
2022-01-06 12:26:51 +13:00
Harry Maclean
b4b91e84a3
Ruby: Fix ConstantAccessCfgNode.getValueText
...
The superclass definition uses SSA, which doesn't track constants.
2022-01-06 12:25:19 +13:00
Andrew Eisenberg
0a2f23f6f9
Update pack references in solorigate tests
2022-01-05 10:37:15 -08:00
Taus
ea538a1ee8
Merge pull request #7416 from github/not-that-kind-of-experimental
...
Remove experimental tag from non-ATM queries
2022-01-05 18:08:15 +01:00
Taus
5d4db3af15
Python: Extend unreachable statement test
...
Adds a test demostrating the false positive observed by andersfugmann.
Note that this does not change the `.expected` file, and so the tests
will fail. This is expected.
2022-01-05 16:45:38 +00:00
Michael Nebel
53000cf9f0
C#: Update the XSS expected file.
2022-01-05 16:44:03 +01:00
Michael Nebel
7e6d88d959
C#: Only use stubs for XSS test.
2022-01-05 16:44:03 +01:00
Michael Nebel
24543a2245
C#: Update the UrlRedirect expected file.
2022-01-05 16:44:03 +01:00
Michael Nebel
47ab2061d8
C#: Replace StringValues stub from stubs.cs with the stub in Microsoft.Extensions.Primitives.
2022-01-05 16:44:03 +01:00
Michael Nebel
b3f3c2de24
C#: Convert and cleanup flow summaries for Microsoft.Extensions.Primitives.StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
48651a6113
C#: Update flow summaries for StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
c36bf3cebc
C#: Reduce the amount of trash flow summaries produced for StringValues.
2022-01-05 16:41:30 +01:00
Michael Nebel
9a355c1050
C#: Add stubs for Microsoft.Extensions.Primitives.
2022-01-05 16:41:30 +01:00
Michael Nebel
586fddb0ce
Merge pull request #7509 from hvitved/csharp/stubs-from-source
...
C#: Treat QL test stubs as not from source
2022-01-05 16:40:19 +01:00
Mathias Vorreiter Pedersen
f5062c7d80
C++: Remove a bunch of bad self joins from 'cpp/toctou-race-condition'.
2022-01-05 15:28:53 +00:00
Alex Ford
f935df9865
Merge pull request #7313 from github/ruby/rails-cookie-config
...
Ruby: Add `rb/weak-cookie-configuration` query
2022-01-05 15:20:40 +00:00
Michael Nebel
83c05f72d9
C#: Update the expected output from MinimalStubsFromSource as the stubs are now considered library code and thus produced as a part of the minimal stub.
2022-01-05 15:35:42 +01:00
Alex Ford
da8c745bd8
Ruby: Restrict Rails Setting nodes to SetterMethodCalls
2022-01-05 14:11:07 +00:00
Asger Feldthaus
a7698b8727
JS: Fix double space
2022-01-05 14:35:02 +01:00
Asger Feldthaus
486beda2fa
JS: Factor out common regexp in AccessPathToken
2022-01-05 14:35:02 +01:00
Asger Feldthaus
d33200ea83
JS: Add test for WithArity
2022-01-05 14:35:02 +01:00
Asger Feldthaus
21928bee6c
JS: Rename padded -> inversePad
2022-01-05 14:35:01 +01:00
Asger Feldthaus
1989d51942
JS: Update documentation in Impl.qll
2022-01-05 14:35:01 +01:00
Asger Feldthaus
3ced5c9269
JS: Resolve first N tokens instead of constructing each prefix
2022-01-05 14:35:01 +01:00
Asger Feldthaus
772681d249
JS: Initial support for models as data
2022-01-05 14:34:52 +01:00
Anders Schack-Mulligen
ef714f7328
Dataflow: Sync
2022-01-05 14:25:35 +01:00
Anders Schack-Mulligen
6b6a9df0eb
Dataflow: Remove abstract class
2022-01-05 14:13:26 +01:00
Tom Hvitved
433e373e41
C#: Remove restriction in CFG implementation to work with stubs
2022-01-05 14:12:17 +01:00
Michael Nebel
6fb112f8ec
C#: Update tests to comply with Csv validation rules for kind.
2022-01-05 13:44:47 +01:00
Michael Nebel
45469a4fe6
C#: Fix error message.
2022-01-05 13:44:47 +01:00
Michael Nebel
c88355ea13
C#: Introduce Csv validation for kind.
2022-01-05 12:48:24 +01:00
Arthur Baars
e96fcf8568
Merge pull request #7498 from github/dependabot/cargo/ruby/generator/clap-3.0
...
Update clap requirement from 2.33 to 3.0 in /ruby/generator
2022-01-05 12:24:42 +01:00
Mathias Vorreiter Pedersen
a48d5dcf48
Merge pull request #7459 from MathiasVP/promote-arithmetic-uncontrolled
...
C++: Increase precision of `cpp/arithmetic-uncontrolled` to `high`
2022-01-05 11:24:09 +00:00
Henry Mercer
19933262c4
Java: Fix copy/paste error in existing queries
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-01-05 10:50:22 +00:00
Mathias Vorreiter Pedersen
23b8b776ab
C++: Add change-note.
2022-01-05 10:12:20 +00:00
Michael Nebel
9983c1cbfb
C#: Remove generated comment checks in stub files as these are not present in handwritten stubs.
2022-01-05 10:37:37 +01:00
Mathias Vorreiter Pedersen
37c72cae3e
Merge branch 'main' into promote-arithmetic-uncontrolled
2022-01-05 08:12:47 +00:00
Anders Schack-Mulligen
fdb3cd03ef
Merge pull request #7513 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-05 08:54:46 +01:00
github-actions[bot]
0aa1152899
Add changed framework coverage reports
2022-01-05 00:10:19 +00:00
Erik Krogh Kristensen
c7da8df03c
Merge pull request #7511 from erik-krogh/dedup-spaces
...
Python: remove duplicated spaces in qldoc
2022-01-04 21:39:15 +01:00
Erik Krogh Kristensen
fe1107ccac
remove duplicated spaces in qldoc
2022-01-04 21:03:06 +01:00
Dave Bartolomeo
83ceb822aa
Move upgrades into standard library packs
...
Move upgrade to new location
Remove incorrectly merged files
Fix upgrades section
2022-01-04 11:30:25 -08:00
Alex Ford
712972cb82
Ruby: formatting
2022-01-04 16:41:23 +00:00
Alex Ford
36ea360b25
Ruby: behaviour -> behavior
2022-01-04 15:43:38 +00:00
Mathias Vorreiter Pedersen
8f843209a8
Merge pull request #7493 from MrAnno/relax-ambiguously-signed-bit-field
...
C++: relax ambiguously-signed-bit-field by allowing GLib's gboolean
2022-01-04 16:18:46 +01:00
Mathias Vorreiter Pedersen
e31185fea4
C++: add change-note for cpp/ambiguously-signed-bit-field.
2022-01-04 14:31:19 +00:00
László Várady
6496bf8c1d
C++: relax ambiguously-signed-bit-field by allowing GLib's gboolean
...
The gboolean type of GLib (a widely used C library) is a typedef to int.
It is meant to represent a simple true/false value.
Resolves #7491
2022-01-04 14:22:48 +00:00
Tom Hvitved
964915ee2e
C#: Treat QL test stubs as not from source
2022-01-04 14:53:28 +01:00
Tom Hvitved
a1bbe58516
C#: More uses of PopulateArguments
2022-01-04 13:47:55 +01:00
Alex Ford
dadaf25262
Merge branch 'main' into ruby/rails-cookie-config
2022-01-04 12:04:44 +00:00
Edoardo Pirovano
081765cbe8
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2022-01-04 10:07:34 +00:00
dependabot[bot]
b74af00b2b
Update clap requirement from 2.33 to 3.0 in /ruby/generator
...
Updates the requirements on [clap](https://github.com/clap-rs/clap ) to permit the latest version.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_generate-v3.0.0-rc.0...clap_complete-v3.0.0 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-03 16:12:45 +00:00
Edoardo Pirovano
a616059761
Fix example in JavaScript query
2021-12-29 12:01:09 +00:00
Alex Ford
7d3932dc8d
Merge remote-tracking branch 'origin/main' into ruby/rails-cookie-config
2021-12-22 17:54:03 +00:00
Alex Ford
7f01be7067
Ruby: use new changenote format for rb/weak-cookie-configuration
2021-12-22 17:47:44 +00:00
Alex Ford
d977e8a473
Ruby: remove unnecessary custom transitive version of getReceiver
2021-12-22 17:47:44 +00:00
Alex Ford
9821c4a06c
Ruby: behaviour -> behavior
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2021-12-22 17:47:44 +00:00
Alex Ford
2cd02157c9
Ruby: fix import
2021-12-22 17:47:44 +00:00
Alex Ford
db967bde89
Ruby: add a change note for rb/weak-cookie-configuration
2021-12-22 17:47:44 +00:00
Alex Ford
71c5711eb3
Ruby: add some rb/weak-cookie-configuration tests
2021-12-22 17:47:44 +00:00
Alex Ford
8976469d9b
Ruby: Model some Rails cookie configuration settings
2021-12-22 17:47:44 +00:00
Alex Ford
5ce6e63590
Ruby: Tidy Rails.qll to make adding new settings modeling easier
2021-12-22 17:47:44 +00:00
Alex Ford
737f7332bc
Ruby: add rb/weak-cookie-configuration query
2021-12-22 17:47:44 +00:00
Alex Ford
8a3d1fe174
Ruby: add CookieSecurityConfigurationSetting concept
2021-12-22 17:47:43 +00:00
Tom Hvitved
8a62778e92
C#: Extract out/ref information in this(...) constructor calls
2021-12-22 13:05:58 +01:00
Tom Hvitved
a3b1fb603a
C#: Add missing tuple declarations to PatternExpr
...
`x` and `y` in `pair is var (x, y) ? x : null` are now correctly part of `PatternExpr`.
2021-12-22 13:05:58 +01:00
Tom Hvitved
915c0fdf9b
Shared SSA: Sync files
2021-12-22 13:05:58 +01:00
Tom Hvitved
05e37a7465
C#: Promote existing ad-hoc consistency checks to consistency queries
2021-12-22 13:05:58 +01:00
Mathias Vorreiter Pedersen
5a38f81e23
C++: Accept test changes.
2021-12-21 08:08:59 +01:00
Mathias Vorreiter Pedersen
bbb936154a
C++: Increase the precision of 'cpp/uncontrolled-arithmetic' to high.
2021-12-20 14:03:13 +01:00
Mathias Vorreiter Pedersen
95fa93b274
C++: Only recognize signed integers as sinks in 'cpp/uncontrolled-arithmetic' in the case of overflow.
2021-12-20 14:02:44 +01:00
haby0
fed1d88268
Add shutil module path injection sinks
2021-12-20 16:09:06 +08:00
jorgectf
1f1b7a54f8
Update .expected
2021-12-19 18:58:43 +01:00
jorgectf
b6bdcd0eb8
Delete redundant exists()
2021-12-19 18:57:22 +01:00
jorgectf
98c8503ebd
Fix test mismatch
2021-12-19 18:35:53 +01:00
jorgectf
f82ed8573e
Model python_jwt.process_jwt
2021-12-19 18:32:14 +01:00
Andrew Eisenberg
7a38618e24
Solorigate: Post-release version bump
2021-12-17 12:30:09 -08:00
Henry Mercer
144ec8c629
JS: Update featurization for absent features optimization
...
Absent features are now represented implicitly by the absence of a row
in the `tokenFeatures` relation, rather than explicitly by an empty
string. This leads to improved runtime performance. To enable this
implicit representation, we pass the set of supported token features to
the `scoreEndpoints` HOP. Requires CodeQL CLI v2.7.4.
2021-12-17 18:04:42 +00:00
Andrew Eisenberg
50ee4ab330
Solorigate: Extract to separate qlpack
...
Extracts solorigate to separate qlpacks in preparation for
publishing them to the registry.
2021-12-16 16:09:20 -08:00
Dave Bartolomeo
d5ef1cf28d
Update docs/change-notes.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-12-15 15:58:14 -05:00
Henry Mercer
5696146179
Java: Convert telemetry queries to summary metrics
...
Use the support for summary metrics with messages that'll be in the next
version of the CodeQL CLI.
2021-12-15 17:59:01 +00:00
luchua-bc
29ce0e9ef1
Add sanitizer for virtual method calls
2021-12-15 16:19:50 +00:00
Sam Partington
db7b3bc136
Remove experimental tag from non-ATM queries
2021-12-15 16:17:14 +00:00
Tony Torralba
6dfe0ce7c5
Adapt chage note to new format
2021-12-15 16:57:20 +01:00
Tony Torralba
f0e9b768f2
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-12-15 16:53:47 +01:00
Tony Torralba
65b6c16254
Fix stub after merge
2021-12-15 16:53:47 +01:00
Tony Torralba
6363ff3c08
QLDoc
2021-12-15 16:53:46 +01:00
Tony Torralba
7a1b854678
Add change note
2021-12-15 16:53:46 +01:00
Tony Torralba
85526d71da
Add Fragment injection in PreferenceActivity query
2021-12-15 16:53:46 +01:00
Tony Torralba
701d12fb5b
Add Fragment injection query
2021-12-15 16:53:45 +01:00
Tony Torralba
efb471687c
Add stubs
2021-12-15 16:53:42 +01:00
Dave Bartolomeo
8b0c79d16f
Add link to change-notes.md from CONTRIBUTING.md.
2021-12-14 14:30:45 -05:00
Dave Bartolomeo
744d139daf
Add more examples
2021-12-14 14:24:39 -05:00
Dave Bartolomeo
97193f72b3
Update Adding change notes.md
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-12-14 14:15:34 -05:00
Dave Bartolomeo
1a2899168f
Remove stray text
2021-12-14 14:15:00 -05:00
Dave Bartolomeo
e1c9bf2b30
Fix PR feedback
2021-12-14 14:13:07 -05:00
Dave Bartolomeo
a23fe04ccb
Add instructions for creating change notes.
2021-12-14 13:42:52 -05:00
liangjinhuang
77b5f422ba
change PasswordFnSink to RandomFnSink
2021-12-11 12:31:20 +08:00
Anders Schack-Mulligen
464b9c3991
Dataflow: Sync.
2021-12-10 11:20:01 +01:00
Anders Schack-Mulligen
32cb8f362b
Dataflow: Add test for FlowState.
2021-12-10 11:20:01 +01:00
Anders Schack-Mulligen
219bf51ec2
Dataflow: Add support for flow state.
2021-12-10 11:20:01 +01:00
Benjamin Muskalla
557cb0a09e
Add job name
2021-12-06 11:42:03 +01:00
Benjamin Muskalla
657c576186
Skip diffs if same branch
2021-12-06 11:30:14 +01:00
Benjamin Muskalla
38debc0b64
Remove push trigger
2021-12-06 11:21:15 +01:00
liangjinhuang
1102f60f3e
add tests
2021-12-04 00:52:15 +08:00
luchua-bc
8bcffc2886
Query to detect unsafe request dispatcher usage
2021-12-02 04:00:29 +00:00
Benjamin Muskalla
d181ee1701
Shorten workflow name
...
This will show up including the job name anyway
```
Models as Data / model-diff (apache/commons-codec)
```
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
5e69eb491f
Generate diff and archive results
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
734422f384
Generate the models for each variant
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
9672128699
Download database
2021-11-30 12:19:10 +01:00
Benjamin Muskalla
c0a3cd07a5
Add default projects
2021-11-30 12:19:09 +01:00
Benjamin Muskalla
881539c735
Add scaffolding for model diff job
2021-11-30 12:19:09 +01:00
liangjinhuang
d0ac11817e
add insecureRandomness
2021-11-28 20:47:06 +08:00
Tony Torralba
6613a98e02
Fix references to logging library
2021-11-04 09:15:57 +01:00
Tony Torralba
ea7e259cfc
Add change note
2021-11-04 08:51:13 +01:00
Tony Torralba
474bf576a7
Minor corrections in QLDoc, qhelp and example code
2021-11-04 08:46:23 +01:00
Tony Torralba
f1df542345
Add stubs & tests
...
Fix mistakes detected by the tests
2021-11-03 17:26:13 +01:00
Tony Torralba
7d88f80fb9
Add tests for summaries
2021-11-03 10:35:38 +01:00
Tony Torralba
ebd6529469
WIP: add tests
2021-11-02 10:37:41 +01:00
Tony Torralba
3ea1af3819
Refactor into separate libraries
2021-10-29 17:36:02 +02:00
Tony Torralba
7f15177498
Move from experimental
2021-10-29 10:19:05 +02:00
Dave Bartolomeo
6837233128
Treat CallSideEffect and InitializeDynamicAllocation the same as other side effects during IR generation
...
This commit moves the IR generation for the `CallSideEffect` and `InitializeDynamicAllocation` side effect instruction into their own subclasses of `TranslatedSideEffect`. Previously, they were embeddded in `TranslatedCall` and `TranslatedAllocationSideEffects`. There are no diffs in the generated IR. This just makes the implementation of all side effect generation be consistent.
2021-09-07 14:22:23 -04:00
Dave Bartolomeo
d1e6813812
Make side effects for constructor calls use same mechanism as other arguments
...
This commit is yet another step to fixing the order of IR side effect instructions. Instead of having a special `StructorCallSideEffects` class for the call itself, I've introduced a `TranslatedStructorCallQualifierSideEffect` class that shares a bunch of common code with `TranslatedArgumentExprSideEffect`, but handles the case where there's no `Expr` for the qualifier of the constructor call. Because this class uses the same ordering as regular argument side effects, these side effects now appear in the correct order, reads before writes.
The test expectations have changed to reflect the new, correct order.
2021-09-03 16:58:32 -04:00
Dave Bartolomeo
ba72a1cde7
Make TranslatedSideEffect abstract
...
This is step two of fixing the ordering of call side effects. This commit refactors the existing `TranslatedSideEffect` class into an abstract `TranslatedSideEffect` class, which contains functionality common to all kinds of side effect, and a concrete `TranslatedArgumentSideEffect` class, which is the implementation of argument side effects. A future commit will add additional concrete classes for conservative call side effects and allocation side effects.
This change has zero diffs to the generated IR.
2021-09-03 11:31:14 -04:00
Dave Bartolomeo
47e16b0480
Move logic for determining CallSideEffect opcode out of TranslatedCall.
...
This is the first step to fixing the order of side effects on call instructions. The goal is to move all side effects (argument side effects, allocation side effects, and conservative call side effects) to be treated as elements in a single sequence of side effects, which will then be handled in a single place similar to how we already handle argument side effects.
2021-09-03 09:58:31 -04:00
luchua-bc
6a2c7d54cd
Enhance the query to check more scenarios
2021-06-14 03:24:16 +00:00
Niroshan Rajadurai
d9826c571a
Update README.md
...
Updates to point to GHAS Capabilities, and tighter wording on License terms
2021-05-13 13:17:16 +01:00
luchua-bc
6bfe2f2ba6
Add more sinks
2021-02-11 17:53:42 +00:00
luchua-bc
f1788ed04e
Revamp the query to handle more cases
2021-02-11 04:33:42 +00:00
luchua-bc
8ed2bc59ad
Add the c# program to src and address the issue with algorithm type
2021-01-26 17:29:52 +00:00
luchua-bc
46fd5bd92e
Move test files to the test folder
2021-01-20 03:51:46 +00:00
luchua-bc
07f45a51f8
Query to detect hash without salt
2021-01-13 02:49:00 +00:00