Tom Hvitved
f02aeafef1
Ruby: Move regex/non-regex split into TAstNode to convey disjointness
2022-01-19 09:22:01 +01: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
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
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
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
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
Tom Hvitved
433e373e41
C#: Remove restriction in CFG implementation to work with stubs
2022-01-05 14:12:17 +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
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
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
bfb573c86a
Merge pull request #7508 from hvitved/python/change-note-typo2
...
Python: Fix another change note typo
2022-01-04 14:10:37 +01:00
Tom Hvitved
6b4eaf674f
Python: Fix another change note typo
2022-01-04 13:53:07 +01:00
Erik Krogh Kristensen
b9964799f3
Merge pull request #7458 from erik-krogh/modelling
...
QL: add "modelling/modeling" to `ql/non-us-spelling`
2022-01-04 13:33:54 +01:00
Anders Schack-Mulligen
6457f42497
Merge pull request #7500 from zbazztian/stringbuilder-reverse-taint
...
Propagate taint through AbstractStringBuilder.reverse()
2022-01-04 13:28:14 +01:00
Alex Ford
dadaf25262
Merge branch 'main' into ruby/rails-cookie-config
2022-01-04 12:04:44 +00:00
Geoffrey White
344e380fa3
Merge pull request #6949 from ihsinme/ihsinme-patch-073
...
CPP: Add query for CWE-266 Incorrect Privilege Assignment
2022-01-04 11:37:17 +00:00
Tom Hvitved
a2c1995b9b
Merge pull request #7506 from hvitved/python/change-note-typo
...
Python: Fix typo in change note
2022-01-04 11:47:48 +01:00
Anders Schack-Mulligen
f8380dabe0
Update java/ql/lib/semmle/code/java/frameworks/Strings.qll
2022-01-04 11:47:26 +01:00
Tom Hvitved
23fb3455c0
Python: Fix typo in change note
2022-01-04 11:06:23 +01:00
Tom Hvitved
1f8a291d6f
Merge pull request #7198 from hvitved/ruby/dataflow/arrays
...
Ruby: Flow through arrays/enumerables
2022-01-04 10:37:08 +01:00
yoff
5ba70ff3b6
Merge pull request #7369 from RasmusWL/filter-tag-cwe
...
JS/Py/Ruby: Add more CWEs to bad-tag-filter queries
2022-01-04 10:11:03 +01:00
Michael Nebel
c3007ff713
Merge pull request #7468 from michaelnebel/csharp-foreach-dataflow
...
C#: Re-factor the ForEachCapture query to use MaD flow summaries.
2022-01-04 09:46:39 +01:00
Tom Hvitved
de1697ab39
Merge pull request #7503 from dbartol/dbartol/move-change-notes
...
Move change notes to correct location
2022-01-04 09:35:21 +01:00
Dave Bartolomeo
5f5af4a29e
Move change notes to correct location
...
A few change notes slipped through the cracks of my previous change. These are now in the proper locations: `old-change-notes` for older notes, and `<lang>\ql\[src|lib]\change-notes` for current change notes.
2022-01-03 18:21:16 -05:00
Dave Bartolomeo
ded3c52a34
Merge pull request #7407 from github/post-release-prep/codeql-cli-2.7.4
...
Post-release preparation for codeql-cli-2.7.4
2022-01-03 17:09:58 -05:00
github-actions[bot]
1334d207fa
Post-release version bumps
2022-01-03 20:11:15 +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
Taus
ec533c8465
Merge pull request #7502 from tausbn/ql-support-trailing-comma-in-set-literals
...
QL: Support trailing comma in set literals
2022-01-03 17:06:46 +01:00