Shati Patel
c7a79a51fe
Merge pull request #5479 from github/shati-patel/docs-bump-version
...
Docs: Prepare supported languages/frameworks for 1.27 release
2021-03-22 13:50:53 +00:00
Mathias Vorreiter Pedersen
257fc7459d
Update categories for new the C++ libraries.
2021-03-22 13:28:48 +01:00
Shati Patel
0f83722767
Revert JS changes and add another Java entry
2021-03-22 12:01:08 +00:00
Shati Patel
c5ef57c408
Update docs/codeql/support/reusables/frameworks.rst
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-03-22 11:40:13 +00:00
Shati Patel
343f4e442f
Add "TODO"s
2021-03-22 10:46:29 +00:00
Shati Patel
9e84b756f7
Update supported frameworks
2021-03-22 10:40:17 +00:00
Shati Patel
b422a972bf
Update conf.py
2021-03-22 10:00:18 +00:00
Shati Patel
c53ce00944
Merge pull request #5342 from shati-patel/docs-delete-unused-script
...
Docs: Remove unused script and workflow
2021-03-05 18:02:50 +00:00
Shati Patel
85205a21de
Docs: Remove query help script
2021-03-05 16:02:53 +00:00
Jonas Jensen
767d3141ad
Merge pull request #5336 from MathiasVP/fix-join-order-in-memset-may-be-deleted
...
C++: Fix performance in cpp/memset-may-be-deleted.
2021-03-05 13:08:10 +01:00
Mathias Vorreiter Pedersen
2d7f15cc8a
C++: Fix join-order in cpp/memset-may-be-deleted.
2021-03-05 11:38:15 +01:00
Anders Schack-Mulligen
220383b9fb
Merge pull request #5313 from joefarebrother/guava-change-note
...
Java: Add change note for Guava
2021-03-03 13:03:54 +01:00
Anders Schack-Mulligen
663c72ab1d
Update java/change-notes/2021-03-23-guava-collections-and-preconditions.md
2021-03-03 12:53:16 +01:00
Joe Farebrother
a77cf12596
Add change note for Guava
2021-03-03 10:56:12 +00:00
Calum Grant
cee96775b8
Merge pull request #5305 from asgerf/js/tuple-type-rest-index-stats
...
JS: Regenerate stats for tuple_type_rest_index
2021-03-01 17:43:55 +00:00
Asger Feldthaus
26924a3378
JS: Regenerate stats for tuple_type_rest_index
2021-03-01 16:30:09 +00:00
Tamás Vajk
2ac94255b7
Merge pull request #5299 from tamasvajk/feature/limit-codescanning-csharp2
...
C#: Fix codeql analysis workflow
2021-03-01 16:20:03 +01:00
Tamas Vajk
1ecbbf6af3
C#: Fix codeql analysis workflow
2021-03-01 09:18:05 +01:00
Anders Schack-Mulligen
37baf77b93
Merge pull request #5273 from intrigus-lgtm/java/unify-main-method-check
...
Java: Remove duplicate code.
2021-03-01 09:05:28 +01:00
Tamás Vajk
3b56e3520c
Merge pull request #5277 from tamasvajk/feature/fix-name-resolution
...
Fix method name resolution issue with nullable suppression
2021-03-01 08:47:21 +01:00
Jonas Jensen
208a374c58
Merge pull request #5256 from MathiasVP/promote-insecure-memset-query
...
C++: Promote insecure removal of memset query
2021-03-01 08:30:16 +01:00
Mathias Vorreiter Pedersen
d4f7fab7df
Update cpp/change-notes/2021-02-24-memset-may-be-deleted.md
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2021-02-26 19:17:13 +01:00
Mathias Vorreiter Pedersen
0f7256752a
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2021-02-26 19:16:28 +01:00
CodeQL CI
b7c0d18c4a
Merge pull request #5278 from erik-krogh/formData
...
Approved by asgerf
2021-02-26 08:13:41 -08:00
CodeQL CI
0e70b58a41
Merge pull request #5205 from erik-krogh/ts42
...
Approved by asgerf
2021-02-26 05:06:40 -08:00
Tom Hvitved
ac67c67ad7
Merge pull request #4998 from hvitved/csharp/shared-base-pre-ssa
...
C#: Use shared SSA implementation for `{Pre,Base}Ssa`
2021-02-26 11:29:07 +01:00
Erik Krogh Kristensen
c59e6fef80
add model for form-data
2021-02-26 10:54:46 +01:00
Erik Krogh Kristensen
00cfc77fc0
Revert "fix file lookup for exclude patterns"
...
This reverts commit 74630b0fd8 .
2021-02-26 10:28:20 +01:00
Erik Krogh Kristensen
4ec3289ecc
update relation name in .stats file
2021-02-26 10:26:08 +01:00
Erik Krogh Kristensen
bd19d5a93c
remove is_abstract_signature.ql
2021-02-26 10:24:40 +01:00
Erik Krogh Kristensen
1cac692b1d
Update javascript/ql/src/semmle/javascript/TypeScript.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2021-02-26 10:23:01 +01:00
Mathias Vorreiter Pedersen
42d2a673c7
C++: Respond to review comments.
2021-02-26 10:06:05 +01:00
Tamas Vajk
b3d6d0c12b
Fix method name resolution issue with nullable suppression
2021-02-26 09:48:37 +01:00
Mathias Vorreiter Pedersen
4e4ffbd790
Update cpp/change-notes/2021-02-24-memset-may-be-deleted.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-26 09:48:21 +01:00
Mathias Vorreiter Pedersen
72daf2eef9
C++: Make the tests more realistic by actually using the local variable for something. Otherwise it looks like a zero-initialization of a buffer, which the query now tries to exclude.
2021-02-26 09:19:05 +01:00
Tamás Vajk
ce69e3ae66
Merge pull request #5263 from tamasvajk/feature/fix-file-move
...
C#: Fix potentially concurrent file moves
2021-02-26 08:27:42 +01:00
Tamás Vajk
8241a9c2f1
Merge pull request #5264 from tamasvajk/feature/more-known-enums
...
C#: Add more well-known enum underlying types
2021-02-26 08:20:14 +01:00
yoff
e3b3825ab0
Merge pull request #5151 from RasmusWL/django-get-redirect-url
...
Python: Model get_redirect_url in django
2021-02-25 23:07:33 +01:00
intrigus
141f057f7b
Java: Remove duplicate code.
2021-02-25 21:29:26 +01:00
Mathias Vorreiter Pedersen
faadcd913e
C++: Exclude memsets that clear a variable that has no other uses.
2021-02-25 21:27:12 +01:00
Geoffrey White
0c4a5f5e2a
Merge pull request #5266 from geoffw0/isis
...
JS: Fix 'is, is' and 'is is'.
2021-02-25 18:55:41 +00:00
Mathias Vorreiter Pedersen
2777ca445e
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-02-25 19:49:58 +01:00
Mathias Vorreiter Pedersen
9e7c9d0ea0
C++: Respond to review comments. Relax the escaping requirements on the local variable being used in memset.
2021-02-25 18:22:48 +01:00
CodeQL CI
1bd12e6fdf
Merge pull request #5199 from asgerf/js/vue-router
...
Approved by erik-krogh
2021-02-25 07:32:57 -08:00
Tamás Vajk
505d04b13e
Merge pull request #5102 from luchua-bc/java/main-method-in-servlet
...
Java: CWE-489 Query to detect main() method in servlets
2021-02-25 16:05:06 +01:00
Mathias Vorreiter Pedersen
3f26b2940d
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-25 15:48:48 +01:00
Geoffrey White
0e071b7b79
JS: Fix 'is, is' and 'is is'.
2021-02-25 14:16:25 +00:00
Tamas Vajk
3e651f14fd
C#: Add more well-known enum underlying types
2021-02-25 14:57:23 +01:00
Rasmus Wriedt Larsen
81b29316e1
Merge pull request #4737 from yoff/python-dataflow-add-cast-nodes
...
Python: Force read- and store steps to add nodes.
2021-02-25 14:28:54 +01:00
Tamás Vajk
9ae22cbebd
Merge pull request #5189 from tamasvajk/feature/refactor-3
...
C#: Split 'Context' class between CIL and source extraction
2021-02-25 14:28:25 +01:00
Bas van Schaik
5ecd2317b0
Merge pull request #5212 from github/sj-patch-1
...
Include @xcorail (GHSL) in code reviews for `experimental` queries
2021-02-25 12:58:12 +00:00
Taus
d326d40d71
Merge pull request #5252 from RasmusWL/test-cleanup
...
Python: Minor cleanup of test setup
2021-02-25 13:33:10 +01:00
Mathias Vorreiter Pedersen
d33209388d
C++: Fix test annotations. Also exclude static locals from the query and add a testcase for this.
2021-02-25 13:25:11 +01:00
Taus
01d581ecf3
Merge pull request #5250 from tausbn/python-port-re-security-queries
...
Python: Port URL sanitisation queries to API graphs
2021-02-25 13:13:55 +01:00
Rasmus Lerchedahl Petersen
64c0eaf305
Python: Update test expectations
2021-02-25 11:49:57 +01:00
yoff
f15084254b
Add comment explaining tacky nature of code
2021-02-25 11:49:57 +01:00
Rasmus Lerchedahl Petersen
5b51a3461d
Python: Force read- and store steps to add nodes.
...
This gives muche nicer path explanations on some snapshots.
It is achieved by making stepped-to nodes `CastNode`s.
This seems somewhat reasonable as types then to change, when we move
between content and container.
We could probably refine it, though.
2021-02-25 11:49:57 +01:00
Asger Feldthaus
55a1ab5714
JS: Autoformat
2021-02-25 10:20:13 +00:00
Tamas Vajk
a5543c689e
C#: Fix potentially concurrent file moves
2021-02-25 10:35:49 +01:00
Jonas Jensen
2b54c33904
Merge pull request #5257 from MathiasVP/doh-its-2021-mathias
...
C++: Turns out we're in 2021 and not 2020.
2021-02-25 09:30:08 +01:00
Anders Schack-Mulligen
f0d3841369
Merge pull request #5105 from JLLeitschuh/feat/JLL/depricated_bintray_usage
...
CWE-1104: Maven POM dependence upon Bintray/JCenter
2021-02-25 09:08:31 +01:00
Bas van Schaik
4ede277c7c
Update CODEOWNERS
2021-02-24 18:30:22 +00:00
luchua-bc
e34a203731
Refactor the check of a main method in a test program to improve maintainability
2021-02-24 17:15:08 +00:00
Mathias Vorreiter Pedersen
70a953b633
C++: Add change-note.
2021-02-24 18:02:16 +01:00
Mathias Vorreiter Pedersen
ef8b734863
C++: Move tests out of experimental and merge with old existing tests from the other memset PRs.
2021-02-24 18:02:16 +01:00
Mathias Vorreiter Pedersen
c44fbaaf3c
C++: Promote memset query out of experimental.
2021-02-24 18:01:41 +01:00
Jonathan Leitschuh
237fefbcf1
Add release notes
2021-02-24 11:19:20 -05:00
Mathias Vorreiter Pedersen
fc4162ba1a
C++: Turns out we're in 2021 and not 2020.
2021-02-24 17:15:51 +01:00
Cornelius Riemenschneider
cea1049745
Merge pull request #5249 from geoffw0/cleanupstr
...
C++: QLDoc Pure.qll
2021-02-24 16:42:41 +01:00
Tamas Vajk
4711856c2b
Remove commented code
2021-02-24 16:21:19 +01:00
Tamas Vajk
841ef9a4ae
Make derived 'Context' classes internal and adjust visibility of members in base 'Context'
2021-02-24 16:21:19 +01:00
Tamas Vajk
539fdf952a
Extend base context in CIL project
2021-02-24 16:21:19 +01:00
Tamas Vajk
5fca946678
C#: Split 'Context' class between CIL and source extraction
2021-02-24 16:21:19 +01:00
Bas van Schaik
4b884bd5d2
Merge branch 'main' into sj-patch-1
2021-02-24 15:10:26 +00:00
CodeQL CI
bf66bdbb95
Merge pull request #5253 from RasmusWL/no-getAnArg
...
Approved by tausbn
2021-02-24 06:34:31 -08:00
Rasmus Wriedt Larsen
d05a8b8c46
Python: Remove getAnArg in DataFlow::CallCfgNode
...
Until we've had further discussion on what is the right approach to
naming (internal discussion in https://github.com/github/codeql-python-team/issues/95 )
2021-02-24 14:58:48 +01:00
Felicity Chapman
a05904f812
Merge pull request #5216 from github/felicitymay-update-process
...
Remove personal assignment to writers
2021-02-24 12:59:08 +00:00
Tamás Vajk
fd4eca6039
Merge pull request #5254 from tamasvajk/feature/fix-merge
...
C#: Fix merge conflict (with + refactoring)
2021-02-24 12:07:34 +01:00
CodeQL CI
d2816b33e2
Merge pull request #5240 from erik-krogh/vsPerf
...
Approved by asgerf
2021-02-24 02:26:16 -08:00
Taus Brock-Nannestad
404649d5f1
Python: Get rid of superfluous options file
2021-02-24 11:24:43 +01:00
Rasmus Wriedt Larsen
5c6989cf02
Revert "Python: Accept RequestWithoutValidation expected output change"
...
Apparently CI is able to produce the ../ path, I have absolutely no clue what is
goign on...
2021-02-24 11:14:18 +01:00
Erik Krogh Kristensen
055275b971
change stats file
2021-02-24 11:12:31 +01:00
Anders Schack-Mulligen
add960bc4d
Merge pull request #4880 from luchua-bc/java/sensitive-query-with-get
...
Java: Sensitive GET Query
2021-02-24 11:08:47 +01:00
Asger Feldthaus
bb858d38c4
JS: Tweak ExprNode
2021-02-24 10:03:45 +00:00
Tamas Vajk
380058a4bd
C#: Fix merge conflict (with + refactoring)
2021-02-24 10:50:51 +01:00
yoff
8262f0343b
Merge pull request #5208 from RasmusWL/flask-clean-models
...
Python: Cleanup Flask models now that we have API graphs
2021-02-24 10:36:30 +01:00
Erik Krogh Kristensen
16150a6419
update printAst expected output
2021-02-24 10:29:29 +01:00
Erik Krogh Kristensen
ed47697c09
update expected output
2021-02-24 10:29:12 +01:00
Geoffrey White
358a8fee7d
C++: 'side-effect free'.
2021-02-24 09:25:11 +00:00
Taus Brock-Nannestad
af644a0adb
Python: Decrease import depth in regex tests
...
These were increased because of the indirection needed to get to the
regex flags, but as we no longer rely on this, we can make do with a
smaller import depth.
2021-02-24 10:23:01 +01:00
Rasmus Wriedt Larsen
5bb4a1a45a
Python: Use explicit argument specification instead of getAnArg
...
I've seen quite a few places where `getAnArg` leads to wrong behavior, and I
generally just don't like it.
2021-02-24 10:19:34 +01:00
Taus Brock-Nannestad
e77c1059a3
Python: Use source nodes and prevent bad join order
2021-02-24 10:18:54 +01:00
Taus Brock-Nannestad
cac6c4acc9
Python: Add deprecation notice to mode_from_mode_object
2021-02-24 10:18:21 +01:00
Rasmus Wriedt Larsen
0b9a65d234
Python: Accept RequestWithoutValidation expected output change
...
I have no clue why this changed, but since it's only the `..` part, I guess
we'll live with it
2021-02-24 10:13:25 +01:00
Rasmus Wriedt Larsen
cef37d19ce
Python: Split CWE-295 tests
...
Mostly just because it's nice. But now we can avoid having the same `options`
files for the tests.
2021-02-24 10:12:45 +01:00
Rasmus Wriedt Larsen
0ffc801f9b
Python: Remove options for InsecureTemporaryFile tests
2021-02-24 09:57:51 +01:00
Erik Krogh Kristensen
5091bb652f
bump extractor version
2021-02-24 09:39:09 +01:00
Erik Krogh Kristensen
971ce83f8e
add change note
2021-02-24 09:34:54 +01:00
Erik Krogh Kristensen
bcb3d5aec2
add tests for nested type unions through aliases
2021-02-24 09:34:54 +01:00
Erik Krogh Kristensen
85ed402b1a
add test for union types
2021-02-24 09:34:53 +01:00
Erik Krogh Kristensen
5ae3c5952c
support abstract signatures
2021-02-24 09:34:53 +01:00
Erik Krogh Kristensen
f385c55f2c
add support for rest types elements in the middle of a tuple
2021-02-24 09:34:53 +01:00
Erik Krogh Kristensen
74630b0fd8
fix file lookup for exclude patterns
2021-02-24 09:34:53 +01:00
Erik Krogh Kristensen
8cf28c6186
update TypeScript to 4.2
2021-02-24 09:34:47 +01:00
yoff
c3d2001e85
Merge pull request #5251 from tausbn/python-port-missing-host-key-validation-query
...
Python: Port missing host key validation query
2021-02-24 08:43:52 +01:00
yo-h
1d654febfd
Merge pull request #5195 from aschackmull/java/cwe-548-test
...
Java: Add empty file to test.
2021-02-23 21:12:40 -05:00
Taus Brock-Nannestad
2942a11a69
Python: Import API graphs privately
2021-02-23 22:45:39 +01:00
Taus Brock-Nannestad
f241dbabab
Python: Clean up query a bit
2021-02-23 22:33:18 +01:00
Taus Brock-Nannestad
002d0fe565
Python: Port missing host key query
2021-02-23 22:26:03 +01:00
Taus Brock-Nannestad
e812eb777d
Python: Port URL sanitisation queries to API graphs
...
Really, this boils down to "Port `re` library model to use API graphs
instead of points-to", which is what this PR actually does.
Instead of using points-to to track flags, we use a type tracker. To
handle multiple flags at the same time, we add additional flow from
`x` to `x | y` and `y | x`
and, as an added bonus, the above with `+` instead of `|`, neatly
fixing https://github.com/github/codeql/issues/4707
I had to modify the `Qualified.ql` test slightly, as it now had a
result stemming from the standard library (in `warnings.py`) that
points-to previously ignored.
It might be possible to implement this as a type tracker on
`LocalSourceNode`s, but with the added steps for the above operations,
this was not obvious to me, and so I opted for the simpler
"`smallstep`" variant.
2021-02-23 22:02:35 +01:00
Rasmus Wriedt Larsen
358ade67e5
Merge pull request #5248 from tausbn/python-port-insecure-temporary-file
...
Python: Port `py/insecure-temporary-file`
2021-02-23 21:37:59 +01:00
Tamás Vajk
91928fa098
Merge pull request #5220 from tamasvajk/feature/limit-codescanning-csharp
...
Limit C# codeql analysis to the csharp folder
2021-02-23 21:05:38 +01:00
Tamás Vajk
e6532cbd75
Merge pull request #4695 from tamasvajk/feature/csharp9-with-expr
...
C#: Extract 'with' expressions
2021-02-23 21:04:51 +01:00
Geoffrey White
431a004127
C++: QLDoc.
2021-02-23 19:10:03 +00:00
Taus Brock-Nannestad
b8ce5e969e
Python: Port py/insecure-temporary-file
2021-02-23 20:02:22 +01:00
yoff
9eed17f647
Merge pull request #5152 from RasmusWL/improve-pyyaml-support
...
Python: Improve pyyaml support
2021-02-23 19:58:04 +01:00
CodeQL CI
c5ae8d2c53
Merge pull request #5210 from erik-krogh/barrierPerf
...
Approved by asgerf
2021-02-23 07:29:27 -08:00
luchua-bc
56e3b301e9
Resolve ambiguous method access
2021-02-23 15:18:07 +00:00
luchua-bc
45f9125bfa
Update test program
2021-02-23 14:41:44 +00:00
luchua-bc
9eb8ec7da5
Create a separate file for EJB check
2021-02-23 14:38:15 +00:00
Rasmus Wriedt Larsen
6e2445cce6
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-23 15:19:29 +01:00
Rasmus Wriedt Larsen
42de872bfa
Python: Add INTERNAL annotation to Response::InstanceSource
...
Since we need to reserve the flexibility to change this setup within the next
few months, we don't want to commit to keeping this extension point around for
the 12 months that the normal API deprecation cycle requires.
2021-02-23 15:10:58 +01:00
Rasmus Wriedt Larsen
8ebedf26d2
Python: Add comment for MethodView being known subclass
2021-02-23 15:08:07 +01:00
Anders Schack-Mulligen
b1bed2731d
Merge pull request #5172 from smowton/smowton/feature/commons-strbuilder
...
Java: Add support for commons-lang's StrBuilder class
2021-02-23 14:39:11 +01:00
Asger Feldthaus
c58947d3e6
JS: Refactor Vue::Instance to lead to better join orders
2021-02-23 13:13:59 +00:00
Tom Hvitved
bed66203c1
C#: Use shared SSA implementation for BaseSsa
2021-02-23 14:06:27 +01:00
Tom Hvitved
b0ee508f10
C#: Use shared SSA implementation for PreSsa
2021-02-23 14:06:27 +01:00
Tom Hvitved
d8792f2f7f
C#: Fix bug in BaseSSA::reachesEndOf/3
2021-02-23 14:06:27 +01:00
Taus
53711dc82f
Merge pull request #5238 from RasmusWL/no-flow-default-value
...
Python: Highlight missing flow from default value in functions
2021-02-23 13:27:41 +01:00
CodeQL CI
3f7f963ed5
Merge pull request #5227 from erik-krogh/infTest
...
Approved by asgerf
2021-02-23 04:03:18 -08:00
Erik Krogh Kristensen
539ef49b11
change join order for SystemCommandExecutors - and use ApiGraphs::getACall
2021-02-23 12:49:25 +01:00
Erik Krogh Kristensen
56405f40b0
change join order for summarizedHigherOrderCall
2021-02-23 12:48:24 +01:00
Erik Krogh Kristensen
b3aa358177
outline callee computation - to avoid many joins on getACall
2021-02-23 12:48:20 +01:00
CodeQL CI
2551aace89
Merge pull request #5236 from asgerf/js/html-invalid-attr-name
...
Approved by erik-krogh
2021-02-23 02:03:29 -08:00
Erik Krogh Kristensen
aa6cde2fe0
remove magic from inGuard
2021-02-23 10:03:21 +01:00
Erik Krogh Kristensen
69d6df7834
make globalVarRef non recursive
2021-02-23 10:03:17 +01:00
Erik Krogh Kristensen
06091e5312
cache AstNode::getParent
2021-02-23 09:52:58 +01:00
Erik Krogh Kristensen
b4e6f92505
rearange ArrayIndexingStep to avoid #shared predicate
2021-02-23 09:52:50 +01:00
yo-h
6213c20bc3
Merge pull request #5136 from aschackmull/java/csv-models
...
Java: Add support for framework modelling through csv data.
2021-02-22 19:00:41 -05:00
CodeQL CI
73e7b54bf1
Merge pull request #5214 from tausbn/actions-add-change-note-checker
...
Approved by adityasharad
2021-02-22 11:24:51 -08:00
Geoffrey White
362c12caea
Merge pull request #5217 from MathiasVP/model-bsd-sockets-part-3
...
C++: Implement models for poll, accept and select
2021-02-22 18:34:59 +00:00
Jonathan Leitschuh
ad99aa2d76
Fix typo in test output
2021-02-22 13:26:51 -05:00
Owen Mansel-Chan
110f4072fd
Merge pull request #5222 from owen-mc/update-go-supported-frameworks
...
Update supported go frameworks
2021-02-22 15:49:54 +00:00
Owen Mansel-Chan
31d6dbb9da
Update supported go frameworks
2021-02-22 15:38:56 +00:00
Rasmus Wriedt Larsen
e160c855ad
Merge pull request #5233 from yoff/python-for-tuple-iteration
...
Python: `for`-iteration of tuples
2021-02-22 15:28:13 +01:00
luchua-bc
40df01d2cd
Update qldoc and method name
2021-02-22 14:15:41 +00:00
Rasmus Wriedt Larsen
127e778970
Merge pull request #5215 from github/RasmusWL/fix-acronym-style
...
Style Guide: Fix two-letter acronym
2021-02-22 15:05:26 +01:00
Rasmus Wriedt Larsen
5249b54a9b
Python: Highlight missing flow from default value in functions
...
Although it is becoming non-trivial to get an overview of what tests we have and
don't have, I didn't find any that highlighted this one
I used all 3 variants of parameters, just to be sure :)
2021-02-22 14:52:51 +01:00
CodeQL CI
0a0bdcca4d
Merge pull request #5204 from erik-krogh/inGuard
...
Approved by asgerf
2021-02-22 02:52:11 -08:00
Asger F
b8e1987cad
Update javascript/ql/test/query-tests/DOM/HTML/DuplicateAttributes.html
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-02-22 10:08:56 +00:00
Taus Brock-Nannestad
439f9f1d90
Actions: More cleanup
...
Removes the checkout action, as this is no longer needed, and folds
the `grep` into `jq`.
2021-02-22 11:05:54 +01:00
Asger Feldthaus
e964771e9c
JS: Add test
2021-02-22 09:47:21 +00:00
Mathias Vorreiter Pedersen
f908d2f1de
C++: Remove hasTaintFlow from poll and select functions.
2021-02-22 08:54:43 +01:00
Taus Brock-Nannestad
4680b25f23
Actions: Remove dependence on external actions
2021-02-21 15:14:33 +01:00
Rasmus Lerchedahl Petersen
d23a8ad016
Python: elide test output
2021-02-21 13:12:54 +01:00
Rasmus Lerchedahl Petersen
46faba69ff
Python: Fix for-iteration of tuples
2021-02-21 12:41:16 +01:00
Rasmus Lerchedahl Petersen
0aecf33fe6
Python: test iteration through overflow parameters
...
These are in a tuple, so the for-step does not fire
2021-02-21 12:33:04 +01:00
luchua-bc
dc799019d0
Add query for Struts and Spring actions
2021-02-20 03:36:21 +00:00
luchua-bc
3d9ac0d094
Add query for enterprise beans
2021-02-20 02:00:42 +00:00
Asger Feldthaus
e9c0f170a1
JS: Restrict names of extracted HTML attributes
2021-02-19 23:28:28 +00:00
Erik Krogh Kristensen
e6009ea8e0
cache getType
2021-02-19 21:25:48 +01:00
Erik Krogh Kristensen
772e78e386
change TypeInference related join-order in module-import predicates
2021-02-19 21:25:44 +01:00
Mathias Vorreiter Pedersen
576a872316
C++: Address review comments.
2021-02-19 20:24:02 +01:00
Mathias Vorreiter Pedersen
f65843a273
Merge pull request #5221 from geoffw0/cwe676
...
C++: Add CWE-676 tag.
2021-02-19 17:51:54 +01:00
Taus Brock-Nannestad
ca48e57e30
Actions: Peg external actions to specific SHAs
2021-02-19 16:50:08 +01:00
Asger Feldthaus
5264d24f34
JS: Model vue-router
2021-02-19 15:37:24 +00:00
Tamas Vajk
e1b90912de
Limit C# codeql analysis to the csharp folder
2021-02-19 16:13:22 +01:00
Geoffrey White
79338052ad
C++: Add CWE-676 tag.
2021-02-19 14:55:31 +00:00
Shati Patel
d490bea9a9
Merge pull request #5211 from shati-patel/docs-telemetry
...
Docs (CodeQL for VS Code): Move info about telemetry into codeql.github.com
2021-02-19 13:59:18 +00:00
Shati Patel
97eb98e9eb
Emphasize that telemetry is disabled by default
2021-02-19 13:42:47 +00:00
Mathias Vorreiter Pedersen
fef824c37a
C++: Implement models for poll, accept and select.
2021-02-19 14:03:54 +01:00
Taus Brock-Nannestad
6095138acc
Actions: Address comments on change note CI check
...
- Fail the CI check if change note is missing.
- Disregards changes outside of `*/ql/src`.
- Runs the workflow on label changes, and upon moving the PR out of
draft mode.
- Only fails the CI check if the PR is out of draft.
- Changes label to `no-change-note-required`.
2021-02-19 13:55:35 +01:00
Felicity Chapman
f9ff1f2c9c
Remove personal assignment
...
This is part of the work to revise the process for requesting docs content team reviews on pull requests.
2021-02-19 11:38:15 +00:00
Rasmus Wriedt Larsen
a19da54c9e
Python: Exclude flask.request imports as RemoteFlowSource
...
When I changed the taint modeling in 19b7ea8d85 , that obviously also means that
some of the related locations for alerts will change. So that's why all the
examples needs to be updated.
Besides this, I had to fix a minor problem with having too many alerts. If
running a query agaisnt code like in the example below, there would be 3 alerts,
2 of them originating from the import.
```
from flask import Flask, request
app = Flask(__name__)
@app.route("/route")
def route():
SINK(request.args.get['input'])
```
The 2 import sources where:
- ControlFlowNode for ImportMember
- GSSA Variable request
I removed these from being a RemoteFlowSource, as seen in the diff.
I considered restricting `FlaskRequestSource` so it only extends
`DataFlow::CfgNode` (and make the logic a bit simpler), but I wasn't actually
sure if that was safe to do or not... If you know, please let me know :)
2021-02-19 12:22:05 +01:00
Rasmus Wriedt Larsen
9798e60d0f
Merge pull request #5203 from tausbn/python-add-typebacktrackers
...
Python: Add `TypeBackTracker`
2021-02-19 12:02:53 +01:00
Rasmus Wriedt Larsen
6ad3ce19d7
Style Guide: Fix two-letter acronym
...
The old text was based on what was in the [Dart guideline](https://dart.dev/guides/language/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words ) and was not adjusted in the PR when we changed our inspiration to be the [.NET guideline](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions ) -- (it was only changed in the examples in our internal discussion)
2021-02-19 11:51:45 +01:00
Anders Schack-Mulligen
9721182523
Merge pull request #5080 from github/RasmusWL/naming-for-acronyms
...
Update CodeQL Style guide to mention acronyms
2021-02-19 11:38:25 +01:00
Taus Brock-Nannestad
03d3f2c8e8
Actions: Add change note checker
2021-02-19 10:16:50 +01:00
Anders Schack-Mulligen
dae65f687a
Merge pull request #5150 from Marcono1234/marcono1234/conditional-expr-branch
...
Java: Add ConditionalExpr.getBranchExpr(boolean)
2021-02-19 10:12:43 +01:00
Bas van Schaik
8f8b8be1e9
Include @xcorail in code reviews for experimental queries
2021-02-18 18:07:09 +00:00
Rasmus Wriedt Larsen
779a464dad
Update ql-style-guide.md to not mention abbreviation
...
This rule is only really intended for acronyms, and not abbreviations in general (like `Stmt` instead of `Statement`).
2021-02-18 17:54:59 +01:00
Rasmus Wriedt Larsen
12511440fe
Update ql-style-guide.md
...
Replacing the HTTP example with a SSA variable example. I didn't want to keep both, to not bloat this section.
2021-02-18 17:52:24 +01:00
Geoffrey White
c4cca83019
Merge pull request #5196 from MathiasVP/fix-dataflow-regression-const-member-function
...
C++: Fix missing dataflow "out of" const member functions
2021-02-18 16:43:38 +00:00
Shati Patel
4dd1be5ba1
Polish headings and formatting
2021-02-18 15:45:17 +00:00
Shati Patel
28848ecf32
Link to new article
2021-02-18 15:44:17 +00:00
Erik Krogh Kristensen
814b5577f5
improve join-order for Configuration::barrierGuardBlocksEdge
2021-02-18 16:43:43 +01:00
Erik Krogh Kristensen
33f310b91e
use manual recursion in Refinements::inGuard
2021-02-18 16:42:40 +01:00
CodeQL CI
f81860c402
Merge pull request #5200 from erik-krogh/apiJoin
...
Approved by max-schaefer
2021-02-18 07:40:38 -08:00
CodeQL CI
3062f4160a
Merge pull request #5207 from github/RasmusWL/js-backtrack-grammar
...
Approved by erik-krogh
2021-02-18 07:11:23 -08:00
Rasmus Wriedt Larsen
cc72fc82f0
Merge branch 'main' into flask-clean-models
2021-02-18 16:08:18 +01:00
Rasmus Wriedt Larsen
9a42f2fb26
Python: Add missing QLdoc for FlaskMethodViewClass
2021-02-18 16:07:47 +01:00
Taus Brock-Nannestad
880451f659
Python: Add change note
2021-02-18 15:59:34 +01:00
Chris Smowton
321df82851
Apply review feedback: comment style, bracketing, and use proper MISSING test annotations
2021-02-18 14:56:52 +00:00
Taus
e9cbdc4ad3
Update python/ql/src/semmle/python/dataflow/new/TypeTracker.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-02-18 15:53:15 +01:00
Rasmus Wriedt Larsen
bb2613b02b
Python: Flask model now ready to be publicly exposed
...
With a single call-out for a member-predicate that is only for internal use.
2021-02-18 15:36:30 +01:00
Rasmus Wriedt Larsen
35876f1939
Python: Re-introduce Response::instance() in flask model
...
We don't actually need it for anything right now, but I have plans for the
future where would need it.
Although it would be nice to have it as an `API::Node`, and we could re-write
implementations so we could provide it in this instance, I'm not convinced we
can do that in general right now.
For example, if <n'th> parameter of a function has to be modeled as belonging to
a certain type, I don't see any way to specify that as an API::Node.
For me, that's ok. Until we _can_ specify things like this as API::Nodes in the
future, I would like to keep things consistent, and use `DataFlow::Node` as the
result type.
2021-02-18 15:22:16 +01:00
Rasmus Wriedt Larsen
141e2665ea
Python: Align ViewClass naming with django
...
Just as part of tyding up
2021-02-18 15:10:21 +01:00
Shati Patel
48ace064cc
Copy telemetry doc
...
No changes except for rst formatting
2021-02-18 14:09:36 +00:00
Rasmus Wriedt Larsen
19b7ea8d85
Python: Align flask taint modeling with rest of code
...
This was a good time to do this, so we don't have 2 different ways of doing the
same thing.
I needed to do this to figure out if we should expose
`API::moduleImport("flask").getMember("request")` in a helper predicate or
not. I think I ended up using more refenreces to this in the end. Although it's
not unreasonable to let someone do this themselves, I also think it's reasonable
that we provide a helper predicate for this.
2021-02-18 15:04:07 +01:00
Tamás Vajk
f3814c6468
Merge pull request #5144 from tamasvajk/feature/refactor-2
...
C# Share entity base classes between CIL and source extraction
2021-02-18 13:52:52 +01:00
Tamás Vajk
8e7a823b9a
Merge pull request #5083 from raulgarciamsft/master
...
Adding queries related to the Solorigate campaign
2021-02-18 13:50:45 +01:00
Anders Schack-Mulligen
954e0b9496
Java: Add empty file to test.
2021-02-18 13:10:29 +01:00
Rasmus Wriedt Larsen
ba61099172
Python: flask.make_response as InstanceSource of flask.Response
2021-02-18 12:52:59 +01:00
Rasmus Wriedt Larsen
e3d530dbbc
Python: Flask: Remove more type-tracking helper predicates
2021-02-18 12:13:47 +01:00
Rasmus Wriedt Larsen
e4ea5f25dc
Python: Flask: Moderize app and blueprint
2021-02-18 12:09:37 +01:00
Rasmus Wriedt Larsen
7de488b987
Python: Flask: Moderize views
2021-02-18 12:05:56 +01:00
Rasmus Wriedt Larsen
ffd3c6b016
JS: Minor grammar cleanup of type back-tracking
2021-02-18 11:31:30 +01:00
Anders Schack-Mulligen
74d35f4f37
Java: Add support for value-preserving steps.
2021-02-18 11:26:15 +01:00
Anders Schack-Mulligen
04eeeda2c9
Java: Add documentation for the final column.
2021-02-18 11:23:49 +01:00
Anders Schack-Mulligen
6f583baa90
Java: More documentation and support for field writes.
2021-02-18 11:18:31 +01:00
CodeQL CI
d94f20ff2f
Merge pull request #5194 from RasmusWL/type-tracking-snippets
...
Approved by tausbn
2021-02-18 02:13:21 -08:00
Mathias Vorreiter Pedersen
88263cb89e
Merge pull request #5114 from geoffw0/codeqltestdoc
...
Documentation: Make our policy for copied example code clear and visible.
2021-02-18 10:43:17 +01:00
Erik Krogh Kristensen
6f384630f1
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2021-02-18 10:36:49 +01:00
Mathias Vorreiter Pedersen
3082d70345
Merge branch 'main' into fix-dataflow-regression-const-member-function
2021-02-18 09:34:51 +01:00
luchua-bc
e916ce8b9b
Exclude test directories of typical build tools
2021-02-18 00:50:38 +00:00
Taus Brock-Nannestad
23e9785efd
Python: Add missing QLDoc
2021-02-17 21:38:48 +01:00
Erik Krogh Kristensen
f4e6f49ae7
change join order for API::Impl::trackDefNode
2021-02-17 21:23:11 +01:00
Erik Krogh Kristensen
dcef6cb974
change join order for API::InvokeNode::getParameter
2021-02-17 21:23:11 +01:00
Erik Krogh Kristensen
c80365c48a
change join order for API::Impl::useStep
2021-02-17 21:23:11 +01:00
Taus Brock-Nannestad
99f3a61f61
Python: Add TypeBackTracker
...
This is a fairly straight port of the JS equivalent. Also adds
`Node::getALocalSourceNode` which seems like it might come in handy.
2021-02-17 21:14:20 +01:00
CodeQL CI
8716cbd7ee
Merge pull request #5140 from erik-krogh/mark
...
Approved by asgerf
2021-02-17 11:50:11 -08:00
Raul Garcia (MSFT)
cba9f421ad
Changes to the Readme file
2021-02-17 10:05:22 -08:00
luchua-bc
5e36eedcb6
Add check for test packages
2021-02-17 18:04:55 +00:00
Erik Krogh Kristensen
4df85b44de
Update javascript/change-notes/2021-02-10-markdown.md
...
Co-authored-by: Asger F <asgerf@github.com >
2021-02-17 18:30:31 +01:00
Cornelius Riemenschneider
ebcecca9f1
Merge pull request #5157 from geoffw0/modelsbsl2
...
C++: Improve Iterator models
2021-02-17 18:04:07 +01:00
Jonathan Leitschuh
c43765917f
Fix formatting of MavenPom.qll
2021-02-17 11:55:10 -05:00
CodeQL CI
a81592dbd1
Merge pull request #5111 from asgerf/js/angular-framework-note
...
Approved by erik-krogh
2021-02-17 08:48:00 -08:00
Taus
593a96ffbb
Merge pull request #5182 from RasmusWL/update-supported-python-frameworks-docs
...
Docs: Update list of support frameworks in Python
2021-02-17 17:44:18 +01:00
CodeQL CI
3e1d2c3f81
Merge pull request #5198 from RasmusWL/revert-structure-change
...
Approved by tausbn
2021-02-17 08:36:04 -08:00
Rasmus Wriedt Larsen
4880350420
Python: Add a single missing QLDoc
2021-02-17 16:33:12 +01:00
Rasmus Wriedt Larsen
7afe3972d8
Revert "Merge pull request #5171 from RasmusWL/restructure-queries"
...
This reverts commit 8caafb3710 , reversing
changes made to ec79094957 .
2021-02-17 16:32:53 +01:00
Erik Krogh Kristensen
bc4ff813f3
Merge pull request #5193 from erik-krogh/aceLog
...
JS: avoid cartesian product in isFilteredPropertyName
2021-02-17 16:27:33 +01:00
Rasmus Wriedt Larsen
63a09fccdd
Python: Use this = <...>.getACall() for DataFlow::CallCfgNode
...
I think this reads a bit cleaner
2021-02-17 14:43:48 +01:00
Mathias Vorreiter Pedersen
908f24d23f
C++: Fix missing AST flow.
2021-02-17 14:33:58 +01:00
Anders Schack-Mulligen
862c41632e
Java: Add empty file to test.
2021-02-17 13:23:18 +01:00
Taus
ce1d8ded22
Merge pull request #5192 from RasmusWL/framework-for-routed-params
...
Python: Expose framework identifier for route-setup and request handler
2021-02-17 13:19:43 +01:00
Rasmus Wriedt Larsen
0cdb5c48cf
Python: Remove type-tracking snippets for framework modeling
...
We won't need these anymore, since we can now use API graphs
2021-02-17 13:14:23 +01:00
Rasmus Wriedt Larsen
a4de88d39c
Python: Update type-tracking snippet
...
based on what I learned in https://github.com/github/codeql/pull/5184
2021-02-17 13:13:25 +01:00
Erik Krogh Kristensen
a03507a544
avoid cartesian product in isFilteredPropertyName
2021-02-17 13:12:35 +01:00
Mathias Vorreiter Pedersen
e0dca2be20
Merge pull request #5185 from MathiasVP/block-integral-types-in-cgixss-query
...
C++: Add isBarrier to cpp/cgi-xss
2021-02-17 12:44:45 +01:00
Rasmus Wriedt Larsen
eee49cde85
Merge pull request #5184 from tausbn/python-move-type-tracker-tests-to-source-nodes
...
Python: Use `LocalSourceNode` in type tracker tests
2021-02-17 12:13:47 +01:00
Taus
8caafb3710
Merge pull request #5171 from RasmusWL/restructure-queries
...
Python: Restructure query file layout
2021-02-17 12:09:32 +01:00
Geoffrey White
ec79094957
Merge pull request #5191 from MathiasVP/regression-test-const-member-function
...
C++: Add test for missing flow due to const specifier
2021-02-17 10:59:20 +00:00
Mathias Vorreiter Pedersen
25beadcb05
Update cpp/ql/test/query-tests/Security/CWE/CWE-079/semmle/CgiXss/search.c
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-02-17 11:54:24 +01:00
Geoffrey White
c07a60818c
C++: Simplify IteratorAssignArithmeticOperator.
2021-02-17 10:49:28 +00:00
Mathias Vorreiter Pedersen
e1c4406fd4
Merge pull request #5187 from geoffw0/modelsbsl5
...
C++: Support BSL in Allocation.qll, Deallocation.qll.
2021-02-17 11:48:53 +01:00
Mathias Vorreiter Pedersen
6db75df943
Merge pull request #5186 from geoffw0/modelsbsl4
...
C++: More models work
2021-02-17 11:46:23 +01:00
Rasmus Wriedt Larsen
cf9ad0cdc5
Python: Move ExternalAPI queries back under Security
...
This was raised as a question at review, and I don't really have a good enough
argument for moving it under POI. At the end of the day, they are _security_
related enough I guess :)
2021-02-17 11:29:33 +01:00
Rasmus Wriedt Larsen
dec026a820
Python: Fix security qlref to have single empty line
2021-02-17 11:26:02 +01:00
Rasmus Wriedt Larsen
1adb510578
Python: Add a single missing QLDoc
2021-02-17 11:24:11 +01:00
Mathias Vorreiter Pedersen
1b148c4c90
C++: Add reduced testcase demonstrating the problem in codeql-c-analysis-team/issues/231.
2021-02-17 11:20:00 +01:00
Rasmus Wriedt Larsen
2927d888cf
Python: Fix location of PathInjection tests
2021-02-17 11:20:00 +01:00
Mathias Vorreiter Pedersen
f5d5460dde
C++: Fix testcase.
2021-02-17 10:53:31 +01:00
Chris Smowton
c700d004e0
Commons Lang/Text StrBuilder: propagate taint from constructors
2021-02-17 09:51:28 +00:00
Chris Smowton
c243e03133
Lang3 StrBuilder: fix typo and coding style
2021-02-17 09:50:56 +00:00
Erik Krogh Kristensen
408ac2729d
Merge pull request #5066 from CaptainFreak/express-hbs-lfr
...
JS: add query for Express-HBS LFR
2021-02-17 10:41:38 +01:00
Chris Smowton
10112c50ab
Add support for StrBuilder and TextStringBuilder in commons-text
...
These are identical to the current deprecated StrBuilder in commons-lang3.
2021-02-17 09:36:28 +00:00
Chris Smowton
714611f803
Address review feedback
2021-02-17 09:36:21 +00:00
Chris Smowton
a63f18e49d
Add models for Commons-Lang's StrBuilder class. These exclude its fluent methods for the time being, which will be added in a forthcoming PR.
2021-02-17 09:36:20 +00:00
Anders Schack-Mulligen
5188ad1444
Merge pull request #5126 from smowton/smowton/feature/commons-stringutils
...
Java: Add support for Apache Commons Lang StringUtils
2021-02-17 09:48:22 +01:00
Rasmus Wriedt Larsen
d98aae9fc1
Python: Expose framework identifier for route-setup and req handler
...
This makes collecting metrics on framework coverage a bit simpler (specifically
giving the RoutedParameter class a more descriptive result for getSourceType).
I guess it can also help a bit when trying to get an overview of a new DB, but
making metrics collection easier is my main motivation for this.
2021-02-16 23:44:03 +01:00
Geoffrey White
3323683ab2
C++: Support BSL in Allocation.qll, Deallocation.qll.
2021-02-16 19:19:06 +00:00
Sauyon Lee
8db234f5f3
Merge pull request #5092 from github/sauyon-patch-1
...
Add GoKit to Go supported library list
2021-02-16 11:04:43 -08:00
Geoffrey White
d068ede65b
Merge pull request #5180 from criemen/bsl-stdcontainer
...
C++: Refactor StdContainer.qll.
2021-02-16 18:53:08 +00:00
Geoffrey White
58230d6d0a
C++: Model BSL in Fread.qll.
2021-02-16 18:00:51 +00:00
Mathias Vorreiter Pedersen
fa44cedd38
C++: Add isBarrier to CgiXss.ql.
2021-02-16 18:58:28 +01:00
Geoffrey White
e17d539883
C++: Model BSL in Getenv.qll.
2021-02-16 17:56:48 +00:00
Taus
36be72972d
Merge pull request #2663 from tausbn/python-type-annotation-reuse-fp
...
Python: Add false positive test example for issue #2652 .
2021-02-16 18:46:15 +01:00
Taus Brock-Nannestad
04eb0c774c
Python: Use LocalSourceNode in type tracker tests
...
One minor change to the tests results needed: there is no longer local
flow going into the `ModuleVariableNode` for `attr_ref` in the
`moduleattr.ql` test, but I think this is reasonable.
2021-02-16 18:25:54 +01:00
Geoffrey White
735e014b43
C++: Model BSL in Gets.qll.
2021-02-16 17:22:59 +00:00
Cornelius Riemenschneider
f7f8dd49c6
Merge pull request #5156 from geoffw0/modelsbsl
...
C++: Improve StdSet and StdPair models
2021-02-16 18:00:23 +01:00
Cornelius Riemenschneider
3fb42194a5
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-02-16 17:58:45 +01:00
Geoffrey White
92df1f7a3d
Merge pull request #5165 from criemen/bsl-model-identity
...
C++: Refactor IdentityFunction.qll.
2021-02-16 16:32:57 +00:00
Taus
9499edf761
Merge pull request #5078 from RasmusWL/flask-blueprints
...
Python: Add modeling of Flask blueprints
2021-02-16 17:22:13 +01:00
Geoffrey White
c32e54e902
Merge pull request #5176 from criemen/bsl-smartptr
...
BSL support for smart pointers and other std classes.
2021-02-16 16:21:50 +00:00
Jonathan Leitschuh
a8167c6c9c
Add docstring for DeclaredRepository.getUrl
2021-02-16 11:21:19 -05:00
Cornelius Riemenschneider
173b16ae21
Merge pull request #5169 from criemen/bsl-pure
...
C++: Model bsl functions in Pure.qll.
2021-02-16 17:19:11 +01:00
Cornelius Riemenschneider
80eaf0b67a
Merge pull request #5174 from criemen/bsl-str
...
Model bsl functions in Str*.qll
2021-02-16 17:18:40 +01:00
Cornelius Riemenschneider
f087ff3e49
Merge pull request #5167 from criemen/bsl-memset
...
C++: Refactor Mem*.qll and include bsl model.
2021-02-16 17:18:29 +01:00
Cornelius Riemenschneider
a04883cafc
C++: Fix compilation.
2021-02-16 16:17:59 +00:00
Cornelius Riemenschneider
552f0a7c5e
C++: Address review.
2021-02-16 15:55:41 +00:00
Chris Smowton
a2eeffa9c0
Add support for Apache Commons Lang StringUtils
2021-02-16 14:48:39 +00:00
Chris Smowton
bf03c0f419
Port InlineExpectationsTest for the Java analysis
2021-02-16 14:48:39 +00:00
Rasmus Wriedt Larsen
bc8e61366b
Python: Clarify comment about flask blueprint URL prefixes
2021-02-16 15:29:25 +01:00
Rasmus Wriedt Larsen
1e1cb87436
Python: Model flask blueprints
2021-02-16 15:26:51 +01:00
Rasmus Wriedt Larsen
b7ea469e26
Python: Add tests for flask blueprints
2021-02-16 15:03:00 +01:00
Rasmus Wriedt Larsen
bf401c7498
Merge pull request #5103 from tausbn/python-port-flask-to-api-graphs
...
Python: Port Flask models to use API graphs
2021-02-16 15:00:46 +01:00
Rasmus Wriedt Larsen
4b9e37f62d
Docs: Update list of support frameworks in Python
...
So it follows what is we actually support with 6eafa9d396/python/ql/src/semmle/python/Frameworks.qll
2021-02-16 14:37:11 +01:00
Rasmus Wriedt Larsen
8494fcf45f
Python: Move query tests to reflect new file layout
2021-02-16 13:15:01 +01:00
Anders Schack-Mulligen
6eafa9d396
Merge pull request #5133 from pwntester/fix_SnakeYaml
...
Remove sanitizing condition which does not prevent vulnerability.
2021-02-16 12:58:47 +01:00
Cornelius Riemenschneider
434a5f04ed
Merge branch 'bsl-memcpy' into bsl-memset
2021-02-16 11:56:40 +00:00
Cornelius Riemenschneider
3f17171f13
C++: Address review.
2021-02-16 11:55:03 +00:00
Cornelius Riemenschneider
30659f3ecf
C++: Address review.
2021-02-16 11:54:21 +00:00
Cornelius Riemenschneider
a42700f09e
C++: Address review.
2021-02-16 11:52:39 +00:00
Cornelius Riemenschneider
5dc57e9cc2
C++: Address review.
2021-02-16 11:49:44 +00:00
Cornelius Riemenschneider
b25f1fd44a
C++: Address review.
2021-02-16 11:37:43 +00:00
Geoffrey White
b309b711ab
Merge pull request #5173 from criemen/bsl-swap
...
C++: Model bsl functions in Swap.qll.
2021-02-16 11:20:41 +00:00
Cornelius Riemenschneider
86268d49ed
C++: Refactor StdContainer.qll.
2021-02-16 11:10:57 +00:00
Rasmus Wriedt Larsen
1d6f9bee08
Python: Update qlrefs
2021-02-16 11:48:36 +01:00
Rasmus Wriedt Larsen
3a18881660
Python: Restructure query file location
...
Since I can never remember the CWE numbers
2021-02-16 11:36:10 +01:00
Geoffrey White
04f15ad43a
C++: BSL support in StdPairConstructor.
2021-02-16 09:49:09 +00:00
Tamas Vajk
a75b952333
Fix Type.GetQualifiedName()
2021-02-16 09:13:13 +01:00
Tamas Vajk
199e937e9e
C#: Rename CachedEntity.symbol to Symbol
2021-02-16 09:13:12 +01:00
Tamas Vajk
67289a498f
Share entity base classes between CIL and source extraction
2021-02-16 09:10:24 +01:00
Tamas Vajk
e7853cc3a0
Simplify TypeContainer class
2021-02-16 09:10:24 +01:00
Tamas Vajk
67caf3cad0
Remove redundant IEntity implemented interface declaration and explit interface member implemenration
2021-02-16 09:10:24 +01:00
Tamas Vajk
61e952766c
Convert CIL.GenericContext to interface
2021-02-16 09:10:24 +01:00
Tamas Vajk
3e2a6fca21
C#: Simplify CIL.GenericContext contract
2021-02-16 09:10:24 +01:00
Tamás Vajk
1c2b9f9a82
Merge pull request #4669 from tamasvajk/feature/csharp9-global-stmt
...
C#: Extract global statements
2021-02-16 09:07:48 +01:00
Tamas Vajk
9c2ca93986
Use 'Declaration::hasQualifiedName/2' in 'MainMethod'
2021-02-15 21:38:02 +01:00
Tamas Vajk
9bb501c595
Fix failing tests
2021-02-15 21:30:56 +01:00
Mathias Vorreiter Pedersen
eb8309a17d
Merge pull request #5175 from github/igfoo/thethe
2021-02-15 18:09:32 +01:00
luchua-bc
2f17943abc
Update qldoc
2021-02-15 16:58:09 +00:00
Tamas Vajk
4967664d09
Rework global statement extraction without DB scheme change
2021-02-15 17:47:33 +01:00
Tamas Vajk
a14db7a04f
Fix code review findings
2021-02-15 17:47:33 +01:00
Tamas Vajk
423fee3069
Fix argument location of top level statement entry point
2021-02-15 17:47:32 +01:00
Tamas Vajk
b79d5ab44b
Fix labeled stmt factory method parameter types
2021-02-15 17:44:44 +01:00
Tamas Vajk
6a4b54ec89
C#: Extract global statements
2021-02-15 17:44:44 +01:00
Cornelius Riemenschneider
4a07912006
C++: Small code improvement.
2021-02-15 16:36:49 +00:00
Cornelius Riemenschneider
595bb025f9
C++: Model bsl functions in StdMap.qll.
2021-02-15 16:34:07 +00:00
Tamas Vajk
8c4563b7e3
Code quality improvements
2021-02-15 17:27:33 +01:00
Marcono1234
9e2812cbd5
Sync ConditionalExpr changes with csharp
2021-02-15 17:24:56 +01:00
Tamás Vajk
d1fe542280
Merge pull request #5131 from tamasvajk/feature/refactor
...
C# Cleanup and refactoring
2021-02-15 17:24:25 +01:00
Cornelius Riemenschneider
b6b90b59eb
C++: Model bsl functions in SmartPointer.qll.
2021-02-15 16:22:52 +00:00
Cornelius Riemenschneider
d9c6f7bc35
C++: Model bsl functions in Scanf.qll.
2021-02-15 16:12:46 +00:00
Cornelius Riemenschneider
b670e5b04b
C++: Model bsl functions in Printf.qll.
2021-02-15 16:12:35 +00:00
Ian Lynagh
ba6e6337f3
C++: Fix TopLevelFunction's qldoc
2021-02-15 16:08:03 +00:00
Cornelius Riemenschneider
fd2e0292c3
C++: Model bsl functions in Strtok.qll.
2021-02-15 16:00:37 +00:00
Tom Hvitved
bb95b8a0cc
Merge pull request #5120 from rvermeulen/rvermeulen/redirect-sink
...
C#: Add Asp.Net Core redirect sinks
2021-02-15 16:52:32 +01:00
Jonathan Leitschuh
d82e8216ed
Merge branch 'main' into feat/JLL/depricated_bintray_usage
2021-02-15 10:48:28 -05:00
Cornelius Riemenschneider
fd91a972a5
C++: Model bsl functions in Strcpy.qll.
2021-02-15 15:43:31 +00:00
Cornelius Riemenschneider
9d19752d9a
C++: Model bsl functions in Strcat.qll.
2021-02-15 15:42:34 +00:00
Cornelius Riemenschneider
3afe934a05
C++: Model bsl functions in Swap.qll.
2021-02-15 15:40:17 +00:00
Cornelius Riemenschneider
28d5ef919c
Merge pull request #5158 from geoffw0/modelsbsl3
...
C++: StdString BSL support
2021-02-15 16:32:30 +01:00
Jonathan Leitschuh
73fba3a3c0
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-02-15 10:01:03 -05:00
Tamas Vajk
f878453f14
Fix performance issue with RecordCloneCallable
2021-02-15 15:49:06 +01:00
Anders Schack-Mulligen
8f5fe14e52
Merge pull request #5170 from pwntester/ArrayUtils_changeNote
...
add change note for new ArrayUtils support
2021-02-15 15:00:15 +01:00
Alvaro Muñoz
3d3f4ba797
add change note
2021-02-15 14:53:16 +01:00
Alvaro Muñoz
923e1c5e9b
add change note for new ArrayUtils support
2021-02-15 14:41:18 +01:00
Rasmus Wriedt Larsen
1961ec6e8d
Merge pull request #5159 from tausbn/python-unknown-argument-in-format-string-fp
...
Python: Add FP test for unknown argument in string format
2021-02-15 14:39:10 +01:00
Rasmus Wriedt Larsen
69e081e897
Python: Apply code-review suggestion
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-02-15 14:38:20 +01:00
Taus
2ca12aa612
Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-02-15 14:21:12 +01:00
Taus Brock-Nannestad
27c479a8ba
Python: Limit RequestInputAccess to immediate uses
...
This fixes some spurious results that occurred when we considered
_any_ use of `request.something` to be a source, even ones we had
tracked into other functions. To prevent this, using
`getAnImmediateUse` better captures the fact that we want the source
to be just the actual attribute access.
2021-02-15 13:51:29 +01:00
Anders Schack-Mulligen
b9a479dd31
Merge pull request #5134 from pwntester/ArrayUtils
...
Add support for Apache Commons Lang ArrayUtils
2021-02-15 13:50:01 +01:00
Mathias Vorreiter Pedersen
1c91d3dbe0
Merge pull request #5168 from MathiasVP/model-bsd-sockets-part-2
...
C++: Model vector versions of BSD-style reads and writes.
2021-02-15 13:39:08 +01:00
Cornelius Riemenschneider
c9af97b742
C++: Model bsl functions in Pure.qll.
2021-02-15 12:31:16 +00:00
CodeQL CI
b5143dbdb4
Merge pull request #5117 from erik-krogh/parseForm
...
Approved by asgerf
2021-02-15 04:30:59 -08:00
Cornelius Riemenschneider
79e3bf80c3
C++: Simplify code.
2021-02-15 12:13:25 +00:00
Cornelius Riemenschneider
da38377e36
C++: Simplify code.
2021-02-15 12:12:29 +00:00
Cornelius Riemenschneider
2a3d20d9a9
C++: Refactor Memset.qll and include bsl model.
2021-02-15 12:36:18 +01:00
Erik Krogh Kristensen
74ce7369f8
Update javascript/change-notes/2021-02-09-form-parsers.md
...
Co-authored-by: Asger F <asgerf@github.com >
2021-02-15 12:35:16 +01:00
Cornelius Riemenschneider
a9071a62a0
C++: Refactor Memcpy.qll and include bsl model.
2021-02-15 12:15:17 +01:00
Mathias Vorreiter Pedersen
0f9b044814
C++: Model vector versions of BSD-style reads and writes.
2021-02-15 12:04:51 +01:00
Erik Krogh Kristensen
e5db0ef16b
remove the RequestExpr requirement from FormParsers.qll, and use API graphs.
2021-02-15 11:58:26 +01:00
Cornelius Riemenschneider
f79b3144e3
C++: Refactor IdentityFunction.qll.
2021-02-15 11:31:31 +01:00
CodeQL CI
9b8d94d76e
Merge pull request #5148 from erik-krogh/apollo
...
Approved by esbena
2021-02-15 02:23:52 -08:00
Alvaro Muñoz
00a0b12dad
update expected results
2021-02-15 11:23:40 +01:00
Alvaro Muñoz
812884341b
Merge branch 'ArrayUtils' of github.com:pwntester/codeql-1 into ArrayUtils
2021-02-15 10:59:49 +01:00
Alvaro Muñoz
504d119749
adjust max parameter number
2021-02-15 10:58:17 +01:00
Rasmus Wriedt Larsen
745148474a
Python: Model get_redirect_url in django
2021-02-15 10:55:52 +01:00
Rasmus Wriedt Larsen
6934d5e642
Python: Add django test of RedirectView subclass
2021-02-15 10:55:51 +01:00
Rasmus Wriedt Larsen
79855157b3
Python: Move django response test to django v2/v3
...
That's really the django version I care about :P
2021-02-15 10:55:50 +01:00
Alvaro Muñoz
c7072aef16
update A.java test
2021-02-15 10:34:20 +01:00
Jonas Jensen
f0ce524c0d
Merge pull request #5147 from MathiasVP/model-bsd-sockets-part-1
...
C++: Add models for BSD-style send and recv functions
2021-02-15 10:34:11 +01:00
Tamas Vajk
2de7fbe062
Fix build after rebase
2021-02-15 10:18:12 +01:00
Tamas Vajk
6cc858b9ef
Move AstLineCounter to top level class
2021-02-15 10:17:08 +01:00
Tamas Vajk
4f693be33b
Move location creation to instance method on context
2021-02-15 10:17:08 +01:00
Tamas Vajk
6f07230725
Relocate 'AstLineCounter'
2021-02-15 10:17:07 +01:00
Tamas Vajk
1cd7fd6cf7
Simplify 'AstLineCounter'
2021-02-15 10:17:07 +01:00
Tamas Vajk
e8fd6e1112
Move classes to seperate files
2021-02-15 10:17:07 +01:00
Tamas Vajk
5ce5a96cb6
Remove 'ContextExtensions'
2021-02-15 10:17:07 +01:00
Tamas Vajk
9ddeff80bf
Remove useless 'IExtractor' interface
2021-02-15 10:17:07 +01:00
Tamas Vajk
6cdec2d30e
C#: Remove 'extractor.CreateContext' factory method
2021-02-15 10:17:07 +01:00
Tamas Vajk
fc3e6526ce
C#: Remove IExtractionScope.FromSource
2021-02-15 10:17:07 +01:00
Tamas Vajk
a75306acbd
C#: Remove warnings from MdProvider
2021-02-15 10:17:07 +01:00
Tamas Vajk
1a4f370d15
C#: Fix formatting issues
2021-02-15 10:17:07 +01:00
Anders Schack-Mulligen
7e83a608a2
Merge pull request #4954 from aschackmull/java/member-hasqualifiedname
...
Java: Add Member.hasQualifiedName.
2021-02-15 10:02:13 +01:00
Erik Krogh Kristensen
91f277681a
fix typo in ApolloClientRequest
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-02-15 09:59:04 +01:00
Anders Schack-Mulligen
161e756c4b
Merge pull request #5141 from github/yo-h/java-flow-check-fix
...
Java: prepare to enforce additional compiler checks in test code
2021-02-15 09:41:03 +01:00
yo-h
1d007b6e72
Java: delete two test cases as per code review
2021-02-14 21:42:58 -05:00
Rasmus Wriedt Larsen
2478a9f10e
Python: Fix wording of change-note
2021-02-14 23:20:46 +01:00
CodeQL CI
178c54e69b
Merge pull request #5139 from RasmusWL/django-improvements
...
Approved by yoff
2021-02-14 02:16:52 -08:00
Tamas Vajk
4cc9bc9bf0
Add new .stats file
2021-02-13 16:21:45 +01:00
Raul Garcia (MSFT)
782f4bc3e2
Fixing shared .qhelp issue (renaming to .qhelp.inc)& addressing a fix
2021-02-12 13:38:55 -08:00
Marcono1234
7a6db061b5
Address review feedback
2021-02-12 20:15:10 +01:00
Tamas Vajk
cb9116028c
Add change note for 'with' expression extraction
2021-02-12 20:04:22 +01:00
Tamas Vajk
10e99203e8
Add DB upgrade folder for 'with' expression
2021-02-12 19:59:14 +01:00
Tamas Vajk
7761774f88
Add record .ctor to property data flow summary
2021-02-12 19:54:52 +01:00
Tom Hvitved
6a6644b5c2
C#: Adjust data-flow for with expressions
...
In `x with { Foo = bar }`, instead of having a single data-flow step
`x => x with { Foo = bar }`
we now have two steps:
`x => { Foo = bar }`
and
`{ Foo = bar } => x with { Foo = bar }`
Moreover, `clearsContent` now targets the object initializer instead of the
whole `with` expression, which means that it will only apply to values carried
over from the old object and not those explicitly stored into the new object.
2021-02-12 19:54:52 +01:00
Tamas Vajk
dd9b1d52b5
C#: Initial data-flow for with expressions
2021-02-12 19:54:52 +01:00
Tamas Vajk
b2b4c9ecd6
C#: Extract 'with' expressions
2021-02-12 19:54:52 +01:00
Tamás Vajk
77af7edaa4
Merge pull request #4628 from tamasvajk/feature/csharp9-foreach
...
C#: Extract underlying methods of foreach statements
2021-02-12 19:53:26 +01:00
Taus Brock-Nannestad
2632422783
Python: Add FP test for unknown argument in string format
...
Reported in https://github.com/github/codeql/issues/2650
I found this during a bit of spring cleaning in my working
directory. As this doesn't have any immediate security implications, I
don't know when we'll get round to fixing it, but it can't hurt to
have the test case checked in.
2021-02-12 19:28:12 +01:00
Erik Krogh Kristensen
4fa33b151f
Merge pull request #5146 from github/more-redos-tests
...
JS: add two non ReDoS regular expressions to the ReDoS test suite
2021-02-12 18:56:52 +01:00
Geoffrey White
6d452521f7
C++: Move StdBasicStringStream to a more logical location.
2021-02-12 17:42:33 +00:00
Geoffrey White
74f05d569b
C++: BSL support.
2021-02-12 17:41:32 +00:00
CodeQL CI
179a7a89dd
Merge pull request #5098 from erik-krogh/xml2js
...
Approved by asgerf
2021-02-12 09:22:40 -08:00
Chris Smowton
402f20c5e2
Merge pull request #5154 from smowton/smowton/admin/deprecate-old-maven-predicate-names
...
Java: Re-introduce deprecated versions of old Maven predicate names
2021-02-12 17:22:05 +00:00
Chris Smowton
80978c7c35
Merge pull request #5153 from smowton/smowton/admin/move-misplaced-experimental-query
...
Move misplaced experimental query into the conventional directory
2021-02-12 17:21:57 +00:00
Geoffrey White
d362b5aa65
C++: StdSet should be private as well.
2021-02-12 16:29:44 +00:00
Geoffrey White
df91b8182c
C++: Deprecate StdPairClass properly.
2021-02-12 16:24:45 +00:00
Geoffrey White
1edfd04598
C++: BSL Support.
2021-02-12 15:56:47 +00:00
Geoffrey White
3cfb0a21fe
C++: Fix Iterator.qll taint/data flows for operator+=.
2021-02-12 14:54:47 +00:00
Geoffrey White
61b0d6a0cd
C++: Fix Iterator.qll non-member operator+= charpred.
2021-02-12 14:54:46 +00:00
Geoffrey White
da06b2a615
C++: Improve Iterator.qll layout and QLDoc.
2021-02-12 14:54:46 +00:00
Geoffrey White
90dbbbb0c2
C++: Update Iterator.qll.
2021-02-12 14:54:46 +00:00
Geoffrey White
7705fc4f98
C++: Add more test cases for iterator taint flow.
2021-02-12 14:54:45 +00:00
Alvaro Muñoz
7d294361dc
Update java/ql/src/semmle/code/java/frameworks/apache/Lang.qll
...
Co-authored-by: Joe Farebrother <joefarebrother@github.com >
2021-02-12 15:40:44 +01:00
Alvaro Muñoz
6b80a42913
apply LSP formatter and add missing dot
2021-02-12 15:03:11 +01:00
Alvaro Muñoz
8606386c2c
add bidirectional import
2021-02-12 14:59:28 +01:00
Alvaro Muñoz
49eda8ced6
apply LSP formatter
2021-02-12 14:56:10 +01:00
Anders Schack-Mulligen
085286ab58
Merge pull request #5135 from pwntester/guava_preconditions
...
Add support for the Preconditions Class in the Guava framework
2021-02-12 14:15:17 +01:00
Chris Smowton
655cfb3a47
Re-introduce deprecated versions of old Maven predicate names
2021-02-12 12:24:19 +00:00
Chris Smowton
97df60f9d6
Move misplaced experimental query into the conventional directory
2021-02-12 12:12:16 +00:00
Chris Smowton
942ae7ef47
Merge pull request #5142 from Marcono1234/marcono1234/maven-pom-improvements
...
Java: Improve MavenPom documentation, rename inconsistent predicates
2021-02-12 11:52:19 +00:00
Rasmus Wriedt Larsen
10fdc4bfb9
Python: Add support for more yaml loading functions
2021-02-12 12:30:00 +01:00
Rasmus Wriedt Larsen
2021cdbe33
Python: Add tests for more yaml loading functions
2021-02-12 12:30:00 +01:00
Rasmus Wriedt Larsen
f328e84bd2
Python: Mention yaml.safe_load in the qhelp
2021-02-12 12:29:55 +01:00
Rasmus Wriedt Larsen
1651f81ac8
Python: Refactor to avoid confusing name
...
After discussion with @yoff
2021-02-12 12:19:37 +01:00
Mathias Vorreiter Pedersen
729c7f2371
C++: Add deprecated alias to RemoteFlowSourceFunction and LocalFlowSourceFunction.
2021-02-12 10:53:34 +01:00
Mathias Vorreiter Pedersen
b1c7cb6396
C++: Address review comments.
2021-02-12 10:37:27 +01:00
Rasmus Wriedt Larsen
ed2dc5f6ad
Python: Fix date for change-note
2021-02-12 10:26:31 +01:00
Tamas Vajk
0aded1549e
Improve NestedLoopsSameVariable query performance
2021-02-12 09:33:33 +01:00
Marcono1234
905648e452
Add ConditionalExpr.getBranchExpr(boolean)
2021-02-12 04:50:41 +01:00
Marcono1234
e89891fa1f
Address review comments
2021-02-12 01:30:47 +01:00
Raul Garcia (MSFT)
710ca21d19
Addressing comments we missed earlier
2021-02-11 11:52:58 -08:00
Geoffrey White
354f21f2c3
C++: BSL support.
2021-02-11 16:57:20 +00:00
Erik Krogh Kristensen
004147a22f
add change note
2021-02-11 17:54:53 +01:00
Erik Krogh Kristensen
6f405635ef
add ClientRequest model for apollo-client
2021-02-11 17:49:44 +01:00
Mathias Vorreiter Pedersen
91627cbd88
C++: Add models for BSD-style send and recv functions.
2021-02-11 17:21:32 +01:00
Geoffrey White
21b2999722
C++: Update StdSet.qll.
2021-02-11 16:01:55 +00:00
Geoffrey White
33b5802ff6
C++: Update StdPair.qll (just for consistency).
2021-02-11 16:01:44 +00:00
Erik Krogh Kristensen
fd46b7a7bc
fix type in change-note
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-02-11 16:17:26 +01:00
Erik Krogh Kristensen
69d8aa143c
add taint step for the snarkdown libary
2021-02-11 16:16:46 +01:00
Taus Brock-Nannestad
4c66071f5f
Python: Revert "Python: Support moduleImport("dotted.name") in API graphs"
...
This reverts commit 2c4a477a4e .
It's probably best _not_ to do this, as any `getMember` cycle in the
API graph will lead to nontermination.
2021-02-11 16:08:28 +01:00
Taus Brock-Nannestad
ea30598a08
Python: Split dotted names more efficiently
2021-02-11 16:07:39 +01:00
Jonathan Leitschuh
35e2ceba13
Update java/ql/src/semmle/code/xml/MavenPom.qll
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-02-11 08:59:02 -05:00
Erik Krogh Kristensen
d14586de56
add two non ReDoS regular expressions to the ReDoS test suite
...
Adds the regular expression from #5145
2021-02-11 14:41:45 +01:00
Erik Krogh Kristensen
f12c38425f
add change-note
2021-02-11 13:36:53 +01:00
Erik Krogh Kristensen
3ee0029cd8
Update javascript/change-notes/2021-02-08-xml-parser-taint.md
...
Co-authored-by: Asger F <asgerf@github.com >
2021-02-11 13:33:42 +01:00
CodeQL CI
02578cfff2
Merge pull request #5112 from erik-krogh/forms
...
Approved by asgerf
2021-02-11 04:32:14 -08:00
Erik Krogh Kristensen
044f80215e
add change note
2021-02-11 09:34:04 +01:00
Erik Krogh Kristensen
010d580f8e
add model for multiparty
2021-02-11 09:34:04 +01:00
Erik Krogh Kristensen
61b4ffec3d
add remote flow from the Formidable library
2021-02-11 09:34:04 +01:00
Erik Krogh Kristensen
a03f4ed3cd
add remote flow source for busboy
2021-02-11 09:34:02 +01:00
Erik Krogh Kristensen
e2fbf8a68c
add files uploaded with multer as RemoteFlowSource
2021-02-11 09:33:15 +01:00
Marcono1234
2a1c11b517
Improve MavenPom documentation, rename inconsistent predicates
2021-02-10 23:56:45 +01:00
Raul Garcia (MSFT)
ef0d3720a1
Addressing a few comments
2021-02-10 13:39:24 -08:00
Raul Garcia
190164c182
Update csharp/ql/src/experimental/Security Features/campaign/Solorigate/Solorigate.qhelp
...
Co-authored-by: Bas van Schaik <5082246+sj@users.noreply.github.com >
2021-02-10 13:30:40 -08:00
Erik Krogh Kristensen
7cff1f441b
add model for the unified and remark libraries
2021-02-10 18:13:01 +01:00
Rasmus Wriedt Larsen
c57a4df819
Python: Model taint of self.request on django view class
2021-02-10 17:48:48 +01:00
Rasmus Wriedt Larsen
9ca738d921
Python: Add taint test for self.request on django view class
2021-02-10 17:48:41 +01:00
Jonathan Leitschuh
3b92f97967
Refactor DeclaredRepository to library
2021-02-10 11:41:50 -05:00
Erik Krogh Kristensen
0d497e8b9a
add model for the showdown library
2021-02-10 17:22:42 +01:00
Anders Schack-Mulligen
e9bfbb677d
Java: Connect the external sources and steps to the defaults.
2021-02-10 17:06:21 +01:00
Anders Schack-Mulligen
5a391ab6c0
Java: Add qldoc.
2021-02-10 16:54:48 +01:00
Jonathan Leitschuh
21b6f35ddc
Update java/ql/src/Security/CWE/CWE-1104/MavenPomDependsOnBintray.qhelp
2021-02-10 10:52:27 -05:00
Jonathan Leitschuh
49985a77e3
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2021-02-10 10:51:37 -05:00
Rasmus Wriedt Larsen
ca0d345987
Django: Model any class used in django route setup as view class
2021-02-10 16:26:25 +01:00
Rasmus Wriedt Larsen
b428945bc2
Django: Fix DjangoRouteHandler char-pred
...
Before it the class would contain _all_ functions xD
2021-02-10 16:21:51 +01:00
Rasmus Wriedt Larsen
78a3206fce
Python: Add test with unkown view class in django
2021-02-10 15:56:33 +01:00
Anders Schack-Mulligen
b74911204a
Merge pull request #4945 from intrigus-lgtm/java/insecure-jxbrowser
...
Java: Insecure JXBrowser
2021-02-10 15:48:17 +01:00
Rasmus Wriedt Larsen
42eceb80bd
Python: Handle view functions with decorators
2021-02-10 15:47:55 +01:00
Erik Krogh Kristensen
f76018c039
add taint step for the markdown-table library
2021-02-10 15:11:41 +01:00
Erik Krogh Kristensen
b4704f7016
add taint-step for the marked library
2021-02-10 14:51:08 +01:00
Erik Krogh Kristensen
91f7d33044
add change note
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
101d4358a9
detect DOM nodes from event callbacks
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
be9636491b
add source for react-hook-form in xss-through-dom
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
65d93c9061
detect for DOM elements from DOM events in React
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
458dda9d25
add xss-through-dom source from react-final-form
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
ff3950ce98
add model for formik
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
d1087d4e41
move sources from XssThroughDom into a customizations file
2021-02-10 14:17:49 +01:00
Erik Krogh Kristensen
4969a1ef4f
add change note
2021-02-10 14:16:31 +01:00
Erik Krogh Kristensen
0ca2310594
add model for htmlparser2
2021-02-10 14:16:31 +01:00
Erik Krogh Kristensen
e2a66bf3ed
add model for xml-js
2021-02-10 14:16:31 +01:00
Erik Krogh Kristensen
73f7cd149f
add model for sax
2021-02-10 14:16:31 +01:00
Erik Krogh Kristensen
c43025d7b3
add model for xml2js
2021-02-10 14:16:30 +01:00
Erik Krogh Kristensen
44ca2e26a6
add taint-step to XML parsers
2021-02-10 14:16:08 +01:00
intrigus
5c82ff83de
Java: Fix qhelp, fix CWE reference
2021-02-10 13:57:51 +01:00
Anders Schack-Mulligen
3a6fa9d99b
Java: Add support for framework modelling through csv data.
2021-02-10 13:25:03 +01:00
Alvaro Muñoz
645b021845
Add support for the Preconditions Class in the Guava framework
2021-02-10 13:20:29 +01:00
Alvaro Muñoz
0cf3a29429
Add support for Apache Commons Lang ArrayUtils
2021-02-10 13:09:57 +01:00
Shati Patel
18225fa254
Merge pull request #4997 from github/shati-patel/cwe-coverage-docs
...
Docs: Add outline for CWE coverage page
2021-02-10 11:45:09 +00:00
Alvaro Muñoz
3b4357792b
Remove sanitizing condition which does not prevent
...
vulnerability.
2021-02-10 12:21:48 +01:00
Anders Schack-Mulligen
66d0bf6b5e
Merge pull request #5128 from hvitved/dataflow/exploration-clears-content
...
Data flow: Take `clearsContent()` into account in flow exploration
2021-02-10 11:52:24 +01:00
yoff
9930d59aca
Merge pull request #5124 from RasmusWL/typetracking-with-decorator
...
Python: Add test for type-tracking through decorators
2021-02-10 09:34:54 +01:00
Tom Hvitved
1f9b42f9ab
Data flow: Sync files
2021-02-09 20:10:23 +01:00
Tom Hvitved
e5970f4c65
Data flow: Take clearsContent() into account in flow exploration
2021-02-09 20:09:24 +01:00
Geoffrey White
d475e55ec0
Update cpp/ql/test/README.md
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-02-09 15:20:03 +00:00
Geoffrey White
cc031118dd
Update CONTRIBUTING.md
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-02-09 15:19:30 +00:00
yo-h
e5331a4735
Java: accept changes in expected output
2021-02-09 09:17:35 -05:00
yo-h
e194411cfa
Java: fix javac errors in test code
2021-02-09 09:16:57 -05:00
luchua-bc
cb01613aa6
Exclude FP token patterns
2021-02-09 13:53:23 +00:00
Tamas Vajk
9854b95c30
Fix query performance
2021-02-09 14:45:22 +01:00
Alexander Eyers-Taylor
1c43505d30
Merge pull request #5121 from alexet/fix-js-jdoc
...
Javascript Extractor: Update <tt> tages to <code>
2021-02-09 13:07:19 +00:00
CodeQL CI
475d216f8e
Merge pull request #5087 from erik-krogh/immutable
...
Approved by asgerf
2021-02-09 12:43:19 +00:00
Rasmus Wriedt Larsen
1d25184b32
Python: Add test for type-tracking through decorators
...
In general, if there is _some_ decorator on a function, it might not be safe to
track content out of it (since the decorator could do anything), but in this
case, we can see what the decorator does, so we should be able to handle it (but
we don't right now).
By my understanding of how type-tracking works, if we track content through
`my_decorator`, then we would also track content to the result of
`unrelated_func()`, which I wanted to make sure our tests would catch.
I found out the core of the problem seems to come from our lack of being able to
track to the inner scope, and added an explicit test for that.
2021-02-09 13:43:10 +01:00
Rasmus Wriedt Larsen
eb7e30d472
Python: Add test of django view handler with decorator
...
Which we currently don't handle :(
Also added a bit more explanatory comments
2021-02-09 13:25:12 +01:00
Geoffrey White
d1910a3f5c
Update CONTRIBUTING.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-09 12:12:24 +00:00
alexet
8dd5a7e7c7
Javascript Extractor: Update <tt> tages to <code>
2021-02-09 12:10:09 +00:00
Remco Vermeulen
3818971b79
Add redirect sinks
...
Both the familiy of `Accepted` and `Created` method set the location
header based on provided input. If this is untrusted input this can
result in an URL redirect attack.
2021-02-09 13:09:02 +01:00
Alexander Eyers-Taylor
bed10ad562
Merge pull request #5113 from github/alexet/fix-var-decls-spec
...
Update the language specification to allow empty var_decls
2021-02-09 11:08:23 +00:00
CaptainFreak
503b339a1f
remove hbs specific checks
2021-02-09 07:35:35 +05:30
Raul Garcia (MSFT)
f114ef1f06
Adding unit tests
2021-02-08 16:57:49 -08:00
Geoffrey White
8bf9fc6111
Consistent capitalisation.
2021-02-08 20:29:46 +00:00
Geoffrey White
07b263bb2f
Typo.
2021-02-08 20:27:28 +00:00
Geoffrey White
bd255617d8
Three copies of a link is too much.
2021-02-08 20:25:35 +00:00
Geoffrey White
e1ca762bbc
Fix layout.
2021-02-08 20:24:15 +00:00
Geoffrey White
65ea1a4631
Add hints / links about tests and documentation to CONTRIBUTING.md.
2021-02-08 20:04:10 +00:00
Geoffrey White
690b525192
Add a link to the C/C++ CodeQL Tests README.md from the Supported CodeQL queries and libraries doc.
2021-02-08 20:04:10 +00:00
Geoffrey White
74178a5e86
Call out the copied code issue for qhelp files again (more generally) in the Supported CodeQL queries and libraries doc.
2021-02-08 20:04:09 +00:00
Geoffrey White
cb16c64540
Call out the issue of copied code for C/C++ example code in the C/C++ CodeQL Tests README.md (where we talk about it for tests).
2021-02-08 19:58:36 +00:00
Alexander Eyers-Taylor
7583904046
Update the language specification to allow empty var_decls
...
This is a degenerate form that is accepted in the compiler even if they don't make much sense.
Fixes #5060
2021-02-08 18:54:13 +00:00
Taus Brock-Nannestad
c59b5c98cb
Python: Replace use of AttrNode with getMember
2021-02-08 19:14:11 +01:00
Taus Brock-Nannestad
72a699e099
Python: Add CallCfgNode class and rewrite using that class
...
I prefer this name to `CfgCallNode` as the latter will make
autocomplete more difficult.
2021-02-08 16:55:18 +01:00
Asger Feldthaus
b278233a94
JS: Mention all versions of Angular are supported
2021-02-08 15:45:46 +00:00
Taus Brock-Nannestad
46eb3fd10a
Python: Even more API::Node pushing.
2021-02-08 14:22:42 +01:00
Taus
c0c2aa69b3
Merge branch 'main' into python-port-flask-to-api-graphs
2021-02-08 14:17:25 +01:00
Taus Brock-Nannestad
2c4a477a4e
Python: Support moduleImport("dotted.name") in API graphs
2021-02-08 14:08:34 +01:00
Taus
738d1bc3d4
Python: More use of API::Node
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-08 14:08:16 +01:00
Tamas Vajk
bd50ed975f
Fix doc comment
2021-02-08 11:18:37 +01:00
CodeQL CI
8a2e063af7
Merge pull request #5107 from asgerf/js/json-in-script-tag
...
Approved by erik-krogh
2021-02-08 09:52:53 +00:00
Erik Krogh Kristensen
504db8739d
fix typo in execa change-note file name
2021-02-08 10:00:26 +01:00
Erik Krogh Kristensen
8ca75e41d2
add change note
2021-02-08 09:59:45 +01:00
intrigus
2e30f2d9ce
Java: Fix QHelp & accept test output
...
Accept test output for changed alert message.
2021-02-08 00:05:02 +01:00
Tamas Vajk
ef55ca179b
Improve file read exception logging
2021-02-07 09:06:11 +01:00
Tamas Vajk
6d908876e0
Add new .stats file
2021-02-07 09:06:11 +01:00
Tamas Vajk
96248f8845
Add DB upgrade folder
2021-02-07 09:06:11 +01:00
Tamas Vajk
63b0fe10e4
Rework foreach_stmt_info extraction
2021-02-07 09:06:11 +01:00
Tamas Vajk
7c506f445c
C#: Extract underlying methods of foreach statements
2021-02-07 09:06:11 +01:00
Jonas Jensen
7859c5234a
Merge pull request #5085 from geoffw0/msprintf2
...
C++: Fix FormattingFunction regression.
2021-02-06 16:06:35 +01:00
yoff
f1a0ec2dec
Merge pull request #4981 from RasmusWL/port-url-redirect-query
...
Python: Port url redirect query
2021-02-06 00:39:10 +01:00
yoff
ddd362bc16
Update python/ql/src/semmle/python/frameworks/Django.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2021-02-05 23:31:20 +01:00
Raul Garcia (MSFT)
d775528069
Fixes on multiple files.
2021-02-05 14:09:26 -08:00
Asger Feldthaus
0ceb8aa638
JS: Bump extractor version
2021-02-05 21:55:43 +00:00
Asger Feldthaus
236b7c5887
JS: Tolerate JSON in script tags
2021-02-05 21:54:50 +00:00
Taus
d3a79ecff1
Update python/ql/src/semmle/python/frameworks/Flask.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-05 22:54:27 +01:00
Jonathan Leitschuh
f00b0baaea
Update java/ql/src/Security/CWE/CWE-1104/MavenPomDependsOnBintray.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-02-05 16:31:37 -05:00
Taus Brock-Nannestad
3d2548ed28
Python: Get rid of remaining type trackers in Flask model
...
At this point, we may want to reconsider whether we really want the
deeply-nested module structure we had before (and which made the type
trackers somewhat bearable).
There's also a question of how we can make this a bit more
smooth. I think we need to consider exactly how we would like the
interface to this to work.
2021-02-05 21:58:08 +01:00
Taus Brock-Nannestad
5bfde2c0f2
Python: Fix overly broad class attribute node class
...
This is not strictly necessary, but it was bothering me that this
simply covered _all_ nodes that were both definitions and names at the
same time. Now it actually encompasses what the documentation claims
it does.
2021-02-05 21:56:57 +01:00
Taus Brock-Nannestad
7f3c6acd08
Python: Handle class attribute references in API graph
...
This is slightly dubious, and should really be in the currently
unimplemented "def" counterpart to the "use" bits we already have.
However, it seems to work correctly, and in the spirit of moving
things along, this seemed like the easier solution. We can always
replace the implementation with the "proper" approach at a later point.
2021-02-05 21:54:35 +01:00
Alexander Eyers-Taylor
9af99f195e
Merge pull request #5095 from alexet/imporve-js-perf
...
Javascript: Improve performance of ExplicitInvokeNode::getArgument
2021-02-05 18:49:03 +00:00
Jonathan Leitschuh
bfa9324266
CWE-1104: Maven POM dependence upon Bintray/JCenter
2021-02-05 13:05:51 -05:00
Raul Garcia (MSFT)
d48a713f30
Fixing cutom edges predicate
2021-02-05 09:27:08 -08:00
Raul Garcia (MSFT)
681e6a9303
Adding Solorigate context for the generic backdoor queries.
2021-02-05 09:02:59 -08:00
Taus Brock-Nannestad
ef600575ca
Python: Add API graph support for subclasses
2021-02-05 16:52:58 +01:00
Taus Brock-Nannestad
b39cbf82c6
Python: Port Flask models to use API graphs
...
Most of the type trackers in this model were easily replaceable with
uses of the API graph, but the ones for tracking subclasses are
problematic, as these take us out of the API graph.
2021-02-05 14:41:42 +01:00
yoff
7fef1a8817
Merge pull request #5069 from tausbn/python-api-graphs
...
Python: Add support for API graphs
2021-02-05 13:17:09 +01:00
Shati Patel
6a46be2379
Install sphinx extension for building markdown tables
2021-02-05 12:07:06 +00:00
Shati Patel
5f17fa8366
Docs: Add outline for CWE coverage page
2021-02-05 12:06:57 +00:00
Taus Brock-Nannestad
78cb53449d
Python: Slight cleanup of Cached::call
...
Makes it more similar to the other functions in this module.
2021-02-05 12:47:26 +01:00
Taus
6c8dfb253d
Python: Use flowsTo instead of hasLocalSource
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-05 12:42:41 +01:00
Tamás Vajk
d7505e41db
Merge pull request #5091 from tamasvajk/feature/cleanup-nullable
...
C#: Fix nullable warnings and some code quality issues
2021-02-05 12:07:42 +01:00
Jonas Jensen
6e5d56cbcb
Merge pull request #5097 from geoffw0/qldoceg11
...
C++: QLDoc Improvements
2021-02-05 12:00:35 +01:00
Shati Patel
474ddc9bc8
Merge pull request #5090 from RasmusWL/docs-fix-direct-query-link
...
Docs: Use /blob/ instead of /tree/ for direct query link
2021-02-05 10:50:40 +00:00
Jonas Jensen
c945ece80d
Merge pull request #5100 from MathiasVP/fix-changenote-unsigned-difference-expression-compared-zero
...
C++: Add query author and link to original PR in change-note
2021-02-05 11:21:48 +01:00
Geoffrey White
55b0dbd7b8
C++: Autoformat.
2021-02-05 10:02:31 +00:00
Taus
a66743192e
Python: Fix typo in docs
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-05 10:58:47 +01:00
Mathias Vorreiter Pedersen
a416a089b4
Update cpp/change-notes/2020-02-04-unsigned-difference-expression-compared-zero.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-05 09:48:54 +01:00
Tamás Vajk
87ba9d55b6
Merge pull request #4687 from tamasvajk/feature/csharp9-records
...
C#: Extract record declarations
2021-02-05 08:56:24 +01:00
luchua-bc
a183b00166
Query to detect main method in servlets
2021-02-05 03:53:01 +00:00
Raul Garcia (MSFT)
3dc1b81d65
Changing ProcessNameToHash query to path-problem. Any additional feedback will be welcomed
2021-02-04 17:54:35 -08:00
Raul Garcia (MSFT)
9ef4aef28e
Changing location for NonCryptographicHash qll
...
Changing the TimeBomb query to path-problem (any suggestions to improve it would be welcomed, no previous experience iwth path-problem queries)
2021-02-04 16:59:38 -08:00
Robert Marsh
649bd03db6
Merge pull request #5101 from NateD-MSFT/patch-1
...
Add KeGetCurrentProcessorNumberEx to CWE-457 whitelist
2021-02-04 16:59:07 -08:00
Raul Garcia (MSFT)
d5c9db42de
Fixing format
2021-02-04 14:26:03 -08:00
NateD-MSFT
9470a99092
Add KeGetCurrentProcessorNumberEx to CQE-457 whitelist
...
Windows driver developers may call KeGetCurrentProcessorNumberEx in their driver. This function optionally may initialize a provided structure, but this initialization always occurs. The return value is the current processor being run on. As such, this query incorrectly marks calls to KeGetCurrentProcessorNumberEx that initialize a structure that is later used as risky, even though in reality the initialization always succeeds.
See https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-kegetcurrentprocessornumberex
2021-02-04 13:32:09 -08:00
Raul Garcia (MSFT)
1d8f8286a5
Fixes to address some of the comments during PR
2021-02-04 13:25:43 -08:00
Raul Garcia (MSFT)
8e85145df4
Updated Readme file
2021-02-04 12:51:31 -08:00
Tamas Vajk
83f0fad014
Fix expected test AST
2021-02-04 21:08:01 +01:00
Tamas Vajk
f555c0642e
Add change note
2021-02-04 21:08:01 +01:00
Tamas Vajk
f0b0845f9f
Add 'record' QL class
2021-02-04 21:08:01 +01:00
Tamas Vajk
9ffc38f5b1
Fix deterministic ordering of class members in PrintAst
2021-02-04 21:08:01 +01:00
Tamas Vajk
a6fd7a3203
C#: Extract record declarations
2021-02-04 21:08:01 +01:00
Mathias Vorreiter Pedersen
993abd4499
C++: Add query author and link to original PR in change-note.
2021-02-04 20:23:27 +01:00
Raul Garcia (MSFT)
979fdd2c6a
Addressing multiple comments
2021-02-04 10:23:01 -08:00
Taus
f0d5a91d59
Merge pull request #5093 from RasmusWL/fix-query-names-with-dunder
...
Python: Fix query names with dunder (__)
2021-02-04 18:47:45 +01:00
Taus Brock-Nannestad
d035937083
Python: Add change note
2021-02-04 18:43:44 +01:00
Taus Brock-Nannestad
a505eb6922
Python: Adhere to QLDoc style guide
2021-02-04 18:34:06 +01:00
Taus Brock-Nannestad
3c7d9c3c4b
Python: Fix typo
2021-02-04 18:33:50 +01:00
Geoffrey White
2160edc789
C++: Clean up bits I didn't finish.
2021-02-04 17:16:45 +00:00
Geoffrey White
1f928c2910
CPP: Examples Element.qll.
2021-02-04 17:08:29 +00:00
Geoffrey White
8ae01789b1
CPP: Examples Specifier.qll.
2021-02-04 17:08:29 +00:00
Geoffrey White
500097ca76
CPP: Examples Preprocessor.qll.
2021-02-04 17:08:29 +00:00
Geoffrey White
4b9532c6f7
CPP: Examples Namespace.qll.
2021-02-04 17:08:29 +00:00
Taus Brock-Nannestad
f6e1ea5b2a
Python: Fix missing global variable source nodes
...
In lieu of removing the offending flow (which would likely have
consequences for a lot of other tests), I opted to simply _include_
the relevant nodes directly.
2021-02-04 18:07:13 +01:00
Taus Brock-Nannestad
2524f23a46
Python: Add more test cases
...
There is now a bit of redundancy in the tests, but I thought it useful
to actually include some of the cases called out explicitly in the
documentation, so as to make it easy to see that the code actually
does what we expect (in these cases, anyway).
2021-02-04 18:05:33 +01:00
Taus Brock-Nannestad
aa7e9f0b56
Python: Add big explanatory comment about prefixes.
2021-02-04 18:03:34 +01:00
Geoffrey White
69c7c83bc2
Merge pull request #5094 from MathiasVP/promote-UnsignedDifferenceExpressionComparedZero
...
Promote cpp/unsigned-difference-expression-compared-zero out of experimental
2021-02-04 16:54:45 +00:00
Mathias Vorreiter Pedersen
cf0e464ab9
Merge branch 'promote-UnsignedDifferenceExpressionComparedZero' of github.com:MathiasVP/ql into promote-UnsignedDifferenceExpressionComparedZero
2021-02-04 17:24:59 +01:00
Mathias Vorreiter Pedersen
6a97d02247
C++: Address review comments.
2021-02-04 17:24:14 +01:00
alexet
9d06c75aed
Javascript: improve performance of ExplicitInvokeNode::getArgument
2021-02-04 15:55:51 +00:00
Mathias Vorreiter Pedersen
161e5679a7
Apply suggestions from code review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-02-04 16:47:45 +01:00
Taus Brock-Nannestad
305bfaba2d
Python: Fix imports/2
2021-02-04 16:46:22 +01:00
Mathias Vorreiter Pedersen
d9d82fc56a
C++: Update change-notes
2021-02-04 16:24:56 +01:00
Geoffrey White
7c54512859
Merge pull request #5010 from ihsinme/ihsinme-patch-220
...
CPP: Add query for CWE-570 detect and handle memory allocation errors.
2021-02-04 15:17:28 +00:00
Mathias Vorreiter Pedersen
707f532e10
C++: Fix bad join-order using a poor man's unbind operator.
2021-02-04 16:11:34 +01:00
Mathias Vorreiter Pedersen
fd596ebbbb
C++: Move cpp/unsigned-difference-expression-compared-zero out of experimental.
2021-02-04 16:10:34 +01:00
Mathias Vorreiter Pedersen
c1c9f963b9
C++: Fix qhelp in cpp/unsigned-difference-expression-compared-zero.
2021-02-04 16:10:30 +01:00
Taus Brock-Nannestad
07ffa9f1ae
Python: More documentation
2021-02-04 15:59:00 +01:00
Taus Brock-Nannestad
e54c925b70
Python: Greatly simplify imports/2 predicate
2021-02-04 15:58:15 +01:00
Rasmus Wriedt Larsen
b94658fd52
Python: Highlight that __slots__ query is only for Python 2 in qhelp
...
Since I was already editing this file, it was easy to just add this extra bit of
info.
2021-02-04 15:54:37 +01:00
Rasmus Wriedt Larsen
23d9e2646a
Python: Fix name of class in example of __slots__ qhelp
2021-02-04 15:54:10 +01:00
Rasmus Wriedt Larsen
dcb185b659
Python: Fix trailing whitespace in a single qhelp file
...
Since I edited already, why not get this little bonus? :D
2021-02-04 15:53:23 +01:00
Rasmus Wriedt Larsen
32be53bf72
Python: Fix missing <code> in qhelp file
2021-02-04 15:53:04 +01:00
Rasmus Wriedt Larsen
3fe715abb6
Python: Fix query names that inclde __ (dunder)
...
Without backticks, the text UNDERSCORE UNDERSCORE eq UNDERSCORE UNDERSCORE would
be considered to make things bold in our markdown output, making the query info
look strange.
Example https://codeql.github.com/codeql-query-help/python/py-slots-in-old-style-class/
2021-02-04 15:49:37 +01:00
Sauyon Lee
5927ce5d69
Add GoKit to Go supported library list
2021-02-04 14:43:34 +00:00
Anders Schack-Mulligen
35e620a19c
Merge pull request #4854 from luchua-bc/java/insecure-ldap-auth
...
Java: Insecure LDAP authentication
2021-02-04 14:56:38 +01:00
Tamas Vajk
ce27831b76
C#: Fix nullable warnings and some code quality issues
2021-02-04 14:43:51 +01:00
Rasmus Wriedt Larsen
4af7bc8090
Docs: Use /blob/ instead of /tree/ for direct query link
...
It doesn't have a huge impact, since there is a working redirect in place, but
still more correct to use /blob/ :)
For example,
https://github.com/github/codeql/tree/main/python/ql/src/Security/CWE-094/CodeInjection.ql
redirects to
https://github.com/github/codeql/blob/main/python/ql/src/Security/CWE-094/CodeInjection.ql
2021-02-04 14:30:56 +01:00
Mathias Vorreiter Pedersen
d3d56fb0af
Merge pull request #5011 from ihsinme/ihsinme-patch-221
...
CPP: add query for CWE-788 Access of memory location after the end of a buffer using strlen.
2021-02-04 14:25:27 +01:00
Mathias Vorreiter Pedersen
9b39163411
Merge pull request #5076 from MathiasVP/improve-UnsignedDifferenceExpressionComparedZero
...
C++: Improve cpp/unsigned-difference-expression-compared-zero
2021-02-04 14:05:30 +01:00
ihsinme
43045c1f03
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-02-04 15:47:16 +03:00
ihsinme
a43167faf7
Update WrongInDetectingAndHandlingMemoryAllocationErrors.qhelp
2021-02-04 15:44:28 +03:00
ihsinme
2131f35801
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-02-04 15:41:40 +03:00
Mathias Vorreiter Pedersen
b55921a391
Update cpp/ql/src/experimental/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-02-04 13:25:02 +01:00
Taus Brock-Nannestad
d01d7eea82
Python: Add documentation from DataFlowUtil::importNode
2021-02-04 13:08:19 +01:00
Julian Tibble
a666a692f9
Merge pull request #5086 from github/update-codeql-workflow
...
Update CodeQL workflow
2021-02-04 12:02:53 +00:00
Taus
634041d2d7
Merge pull request #5047 from yoff/python-dataflow-unpacking-unifying-experiments
...
Python: dataflow, unify iterated unpacking
2021-02-04 12:57:43 +01:00
Taus
bc448fe067
Merge pull request #5088 from RasmusWL/fix-small-typo
...
Python: Fix small typo in test-output
2021-02-04 12:56:56 +01:00
Geoffrey White
d41ea6c799
Merge pull request #5081 from MathiasVP/indirection-in-dataflow-models
...
C++: Add more indirection flow in dataflow models
2021-02-04 11:55:34 +00:00
Julian Tibble
121ffbbfa8
Restrict triggers for CodeQL workflow
...
Analysing all branches on both 'push' and 'pull request' events causes
duplicate analysis. It is only necessary to analyse the _target_
branches of pull requests on push.
2021-02-04 11:49:15 +00:00
Julian Tibble
ecfad6b5c7
Update CodeQL workflow
...
Bring the CodeQL workflow up to date with the latest recommended
configuration, which analyses the merge commit of pull requests (not the
head of the PR branch).
2021-02-04 11:45:15 +00:00
Taus
4627799c93
Python: Fix more typos
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-02-04 12:41:17 +01:00
Rasmus Wriedt Larsen
1de3524bc5
Update docs/ql-style-guide.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-04 12:27:38 +01:00
Taus
e5ec1e105c
Python: Fix typos in test files
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-04 12:18:07 +01:00
Rasmus Wriedt Larsen
ac0f2d37db
Python: Fix small typo in test-output
...
Spotted by yoff in https://github.com/github/codeql/pull/5069#discussion_r570063207
2021-02-04 12:11:20 +01:00
Erik Krogh Kristensen
6cbf7b3267
add of Set, Stack and similar to the Immutable model
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
b74df66463
implement Immutable merge
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
c0de6a3af2
add support for Immutable Record
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
609b16b1f7
implement Immutable OrderedMap
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
2e7bf9b53c
implement Immutable lists
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
a5c9492c87
add support for fromJS in the Immutable model
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
6cbe4caecc
support toJS() by using plain property names instead of pseudoproperties.
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
b1f092f052
add support for map.set in Immutable model
2021-02-04 12:05:44 +01:00
Erik Krogh Kristensen
b77dd54618
implement basic map get/set for immutable.js
2021-02-04 12:05:44 +01:00
Mathias Vorreiter Pedersen
55615586ee
C++: Address review comments.
2021-02-04 11:30:44 +01:00
Tamás Vajk
26288ad391
Merge pull request #5082 from tamasvajk/feature/initial-db
...
C#: Add initial DB scheme
2021-02-04 11:23:42 +01:00
Tamás Vajk
ca992f2d3c
Merge pull request #5005 from tamasvajk/feature/follow-line
...
C#: Follow line directives when getting element location
2021-02-04 11:22:55 +01:00
Mathias Vorreiter Pedersen
47ab9ba81b
C++: emplace and emplace_back takes its arguments by universal references, so they should also specify flow as indirections.
2021-02-04 11:16:27 +01:00
Geoffrey White
7087904637
C++: Solution.
2021-02-04 09:00:35 +00:00
Tamás Vajk
1fd244923b
Merge pull request #5052 from tamasvajk/feature/fnptr-df
...
C#: Add data flow 'getARuntimeTarget' predicate to 'FunctionPointerCall'
2021-02-04 08:51:03 +01:00
Tamas Vajk
543f5916c4
Fix expected test AST
2021-02-04 08:49:19 +01:00
Tamas Vajk
88d1539d43
Fix file read error log message
2021-02-04 08:42:39 +01:00
Tamas Vajk
7068a265a6
Fix XML comment processing
2021-02-04 08:42:39 +01:00
Tamas Vajk
d3244fe298
Add new .stats file
2021-02-04 08:42:39 +01:00
Tamas Vajk
dbe656fe6a
Add DB upgrade folder for preprocessor directives
2021-02-04 08:42:39 +01:00
Tamas Vajk
fd09883bfe
Add change notes for preprocessor directives
2021-02-04 08:42:39 +01:00
Tamas Vajk
899e52a68a
Adjust getMappedLocation to not include line directives
2021-02-04 08:42:39 +01:00
Tamas Vajk
a1d227dbbb
C#: Follow line directives when getting element location
2021-02-04 08:42:39 +01:00
Tamas Vajk
967765342e
Assign preprocessor directives to compilation + make compilation cached
2021-02-04 08:42:39 +01:00
Tamas Vajk
1ab4af275d
Rework if/elif/else/endif extraction
2021-02-04 08:42:39 +01:00
Tamas Vajk
72547b89e6
Rework endregion extraction
2021-02-04 08:42:39 +01:00
Tamas Vajk
a5dec5b4aa
C#: Limit ancestor traversal for 'if' and 'elif' lookup
2021-02-04 08:42:38 +01:00
Tamas Vajk
2b7cc15757
Introduce base class for branching and conditional directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
e450b61464
Fix code review findings in directives base class
2021-02-04 08:42:38 +01:00
Tamas Vajk
60b23dc505
Fix code review findings in 'endregion' directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
6ef8e51bcf
Fix code review findings in 'line' directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
f7832adfb8
Fix code review findings in 'nullable' directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
567516471c
Fix code review findings in 'define' directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
bd64dda4c3
Fix code review findings in pragma warning directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
3900698b41
Add doc comments for preprocessor directive base class
2021-02-04 08:42:38 +01:00
Tamas Vajk
a896e1522d
Extract active flag from directives, fix missing assembly location
2021-02-04 08:42:38 +01:00
Tamas Vajk
41fbce0ad0
Extract #if directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
a5d18f9b68
Extract region directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
fe0a494bab
Extract line directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
4bb8b6c992
Extract nullable directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
15c611e22f
Extract warning and error directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
3740aba4a8
Extract undef directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
9b405144ff
Extract define directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
94bf3467b7
Extract pragma checksum directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
8b9c6712d1
Extract pragma warning directives
2021-02-04 08:42:38 +01:00
Tamas Vajk
40186db768
Rename CommentPopulator
2021-02-04 08:42:38 +01:00
Tamas Vajk
48d24b2264
Get line comments from trivia lines
2021-02-04 08:42:38 +01:00
Tamas Vajk
046a37b834
Simplify element access extraction
2021-02-04 08:42:38 +01:00
Tamas Vajk
c3ef6841d0
Add tests for trivia types
2021-02-04 08:42:38 +01:00
Tamas Vajk
3be229f097
C#: Separate visitors to dedicated files, rename and reorganize comment extraction related classes
2021-02-04 08:42:38 +01:00
Raul Garcia (MSFT)
53ab787efc
Fixed format
2021-02-03 15:54:47 -08:00
Raul Garcia (MSFT)
86a2aa97ec
Fixing incorrect file extension & adding suite
2021-02-03 15:48:16 -08:00
Raul Garcia (MSFT)
5e1e27c2b6
Adding queries related to the Solorigate campaign
2021-02-03 15:12:31 -08:00
Taus Brock-Nannestad
5974af661e
Python: Update test file
...
Makes the `a.b.c.d` test more sensible.
Also adds a test that shows a case where we're currently _not_ getting
the right flow.
2021-02-03 22:43:21 +01:00
Taus Brock-Nannestad
ba98b08001
Python: Further elaboration of use/3
2021-02-03 22:31:33 +01:00
Taus Brock-Nannestad
ebfb1faf77
Python: Autoformat
2021-02-03 22:26:46 +01:00
Rasmus Lerchedahl Petersen
a7ca065411
Python: Fix ForTarget
2021-02-03 22:14:15 +01:00
yoff
b5633625b3
Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-02-03 21:56:03 +01:00
Tamas Vajk
cccca879d9
C#: Add initial DB scheme
2021-02-03 21:52:00 +01:00
Taus
56515c5708
Python: Improve documentation for moduleImport
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-02-03 21:29:15 +01:00
Tom Hvitved
cf860f1dac
Merge pull request #5071 from hvitved/csharp/ssa/uncertain-reads
...
C#: Move uncertain-read logic into shared SSA implementation
2021-02-03 20:27:45 +01:00
Taus Brock-Nannestad
05f290f734
Python: Better explanation in use/3
2021-02-03 19:52:40 +01:00
Taus Brock-Nannestad
c5d6792c1e
Python: Make toString abstract
2021-02-03 19:52:40 +01:00
Taus Brock-Nannestad
6ce160c51c
Python: Use call instead of invocation
2021-02-03 19:52:40 +01:00
luchua-bc
724c3e00e0
Update help file
2021-02-03 16:45:15 +00:00
Rasmus Wriedt Larsen
93f91d8746
Python: Apply suggestions from code review
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-02-03 17:44:04 +01:00
Taus Brock-Nannestad
3fafb47b16
Python: Fix global flow
...
A slightly odd fix, but still morally okay, I think. The main issue
here was that global variables have their first occurrence in an inner
scope inside a so-called "scope entry definition", that then
subsequently flows to the first use of this variable. This meant that
that first use was _not_ a `LocalSourceNode` (since _something_ flowed
into it), and this blocked `trackUseNode` from type-tracking to it (as
it expects all nodes to be `LocalSourceNode`s).
The answer, then, is to say that a `LocalSourceNode` is simply one
that doesn't have flow to it from _any `CfgNode`_ (through one or more
steps). This disregards the flow from the scope entry definition, as
that is flow from an `EssaNode`.
Additionally, it makes sense to exclude `ModuleVariableNode`s. These
should never be considered local sources, since they always have flow
from (at least) the place where the corresponding global variable is
introduced.
2021-02-03 16:41:22 +01:00
Mathias Vorreiter Pedersen
8cf8b704c5
C++: Add more indirection flow in dataflow models. Also revert the additions to DataFlowUtil added in #5035 as they can add too much flow.
2021-02-03 16:16:48 +01:00
Anders Schack-Mulligen
40d02e7e32
Merge pull request #4926 from luchua-bc/java/insufficient-key-size
...
Java: Query to detect weak encryption: insufficient key size
2021-02-03 15:16:10 +01:00
Anders Schack-Mulligen
0df7e9fa4e
Merge pull request #4989 from lcartey/lcartey/spring-inheritence-improvements
...
Java: Track taint through Spring Java bean getters on super types
2021-02-03 15:06:03 +01:00
Jonas Jensen
e3bdebf7a0
Merge pull request #5077 from jbj/revert-nested-fields
...
C++: Revert #4784
2021-02-03 14:07:28 +01:00
Rasmus Wriedt Larsen
2453a25833
Update docs/ql-style-guide.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-02-03 13:42:08 +01:00
Rasmus Wriedt Larsen
0ea7aa54f9
Update CodeQL Style guide to mention acronyms
...
Adding this after asking how to do this internally. Is based on https://dart.dev/guides/language/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words
2021-02-03 13:31:26 +01:00
luchua-bc
2ace10fcdf
Use PostUpdateNode for wrapper method calls
2021-02-03 12:21:31 +00:00
Erik Krogh Kristensen
d016ba2252
rename name dataflow configuration in js/template-object-injection
2021-02-03 12:29:23 +01:00
Erik Krogh Kristensen
a5bde53bfe
use the TaintedObject library in js/template-object-injection
2021-02-03 12:26:37 +01:00
Erik Krogh Kristensen
c6a22844e2
add test for js/template-object-injection
2021-02-03 12:16:57 +01:00
Tom Hvitved
a45c415c5b
Merge pull request #5067 from hvitved/csharp/cfg/patterns
...
C#: Adjust CFG for `{Recursive,Positional,Property}PatternExpr`
2021-02-03 12:09:39 +01:00
CaptainFreak
12ee497485
move query to src, rename and refactor
2021-02-03 15:48:02 +05:30
Mathias Vorreiter Pedersen
691a316460
C++: Add tests to cpp/unsigned-difference-expression-compared-zero and remove a couple of classes of FPs.
2021-02-03 11:10:57 +01:00
Jonas Jensen
064568c36d
Revert "Merge pull request #4784 from MathiasVP/mathiasvp/reverse-read-take-3"
...
This reverts commit 1b3d69d617 , reversing
changes made to 527c41520e .
2021-02-03 08:49:37 +01:00
CodeQL CI
653c900d62
Merge pull request #4987 from erik-krogh/defensiveFunctions
...
Approved by esbena
2021-02-02 14:47:23 -08:00
Erik Krogh Kristensen
c51e951d1e
add change note
2021-02-02 22:51:03 +01:00
CodeQL CI
209fe8d7e5
Merge pull request #5049 from erik-krogh/singleQuote
...
Approved by esbena
2021-02-02 13:48:42 -08:00
Taus Brock-Nannestad
e4c3544a3f
Python: Add support for from foo.bar import baz
...
This turned out to be fairly simple. Given an import such as
```python
from foo.bar.baz import quux
```
we create an API-graph node for each valid dotted prefix of
`foo.bar.baz`, i.e. `foo`, `foo.bar`, and `foo.bar.baz`. For these, we
then insert nodes in the API graph, such that `foo` steps to `foo.bar`
along an edge labeled `bar`, etc.
Finally, we only allow undotted names to hang off of the API-graph
root. Thus, `foo` will have a `moduleImport` edge off of the root, and
a `getMember` edge for `bar` (which in turn has a `getMember` edge for
`baz`).
Relative imports are explicitly ignored.
Finally, this commit also adds inline tests for a variety of ways of
importing modules, including a copy of the "import-helper" tests (with
a few modifications to allow a single annotation per line, as these
get rather long quickly!).
2021-02-02 21:59:33 +01:00
luchua-bc
3151aeff48
Enhance the query
2021-02-02 18:26:29 +00:00
Geoffrey White
047cd2b706
Merge pull request #5074 from MathiasVP/strnextc-model-implementation
...
C++: Implement a model for _strnextc and its variants
2021-02-02 16:45:16 +00:00
luchua-bc
5e3b6fa341
Update qldoc
2021-02-02 16:20:39 +00:00
Mathias Vorreiter Pedersen
ff58d5a7c0
C++: Address review comments.
2021-02-02 17:06:38 +01:00
Mathias Vorreiter Pedersen
9e75a4be34
C++: Implement a model for _strnextc and its variants.
2021-02-02 16:42:39 +01:00
Mathias Vorreiter Pedersen
98d73bf474
Merge pull request #5072 from MathiasVP/strcrement-model-implementation
...
C++: Implement model for _strinc and related functions
2021-02-02 16:22:13 +01:00
Mathias Vorreiter Pedersen
07a20752bc
Fix spelling in qldoc.
...
Co-authored-by: Cornelius Riemenschneider <criemen@github.com >
2021-02-02 15:51:40 +01:00
luchua-bc
50be54385a
Update qldoc
2021-02-02 14:49:50 +00:00
Jonas Jensen
aa9ab41e30
Merge pull request #5059 from geoffw0/mswprintf
...
C++: Exclude custom vprintf implementations from primitiveVariadicFormatter.
2021-02-02 15:13:25 +01:00
Geoffrey White
708d3870ee
C++: Actually it's more appropriate to remove the implementation of vswprintf.
2021-02-02 13:42:27 +00:00
Tamas Vajk
64f0dfb174
Fix code review findings
2021-02-02 14:21:26 +01:00
Geoffrey White
4e904dd87d
C++: Repair the test.
2021-02-02 13:08:46 +00:00
Rasmus Wriedt Larsen
e57e4e1916
Merge branch 'main' into port-url-redirect-query
2021-02-02 13:37:34 +01:00
Mathias Vorreiter Pedersen
b54f74a68a
C++: Implement model for _strinc and related functions.
2021-02-02 12:20:02 +01:00
Rasmus Wriedt Larsen
d046e39a82
Python: Fix tornado inline expectations in tests
...
After merge commit
2021-02-02 12:04:24 +01:00
Mathias Vorreiter Pedersen
5db1984315
Merge pull request #5070 from MathiasVP/strsep-model-implementation
...
C++: Add strsep model implementation.
2021-02-02 12:00:26 +01:00
Geoffrey White
eed2aee17d
C++: Effect on tests.
2021-02-02 10:59:14 +00:00
Geoffrey White
9f50f67e6d
Merge pull request #5065 from MathiasVP/scanf-model
...
C++: Add sscanf and fscanf models
2021-02-02 10:30:19 +00:00
Tom Hvitved
b19fd7bb72
C#: Only cache TDefinition in the shared SSA implementation
2021-02-02 10:52:03 +01:00
Mathias Vorreiter Pedersen
0db54e08b8
C++: Address review comments.
2021-02-02 10:48:07 +01:00
Tom Hvitved
74fd2c1c38
C#: Move uncertain-read logic into shared SSA implementation
2021-02-02 10:43:13 +01:00
CodeQL CI
4fdbda3543
Merge pull request #5056 from erik-krogh/react
...
Approved by asgerf
2021-02-02 01:40:08 -08:00
Mathias Vorreiter Pedersen
6e71c68f33
C++: Add strsep model implementation.
2021-02-02 10:29:23 +01:00
Tom Hvitved
1ffa15ea96
C#: Update expected test output
2021-02-02 08:52:28 +01:00
Tom Hvitved
8abc37fba3
Merge pull request #5051 from hvitved/csharp/ssa/caching
...
C#: Reduce caching in `SsaImplCommon.qll`
2021-02-02 08:35:03 +01:00
Erik Krogh Kristensen
ca435763b0
separate message for double and single quotes
2021-02-01 23:54:12 +01:00
Taus Brock-Nannestad
cd7b013a0c
Python: Add missing documentation
2021-02-01 18:57:25 +01:00
CodeQL CI
749dfe4358
Merge pull request #5068 from Marcono1234/patch-1
...
Approved by shati-patel
2021-02-01 08:47:55 -08:00
yoff
b92af8bcec
Merge pull request #5042 from RasmusWL/django-more-view-classes
...
Python: Add full-path modeling of Django more view classes
2021-02-01 17:33:29 +01:00
Marcono1234
fa469587c1
Remove duplicate word in language specification
2021-02-01 17:32:53 +01:00
yoff
c0511ca9f9
Merge pull request #5053 from github/python-add-essavariable-locations
...
Python: Add locations for ESSA variables
2021-02-01 17:31:25 +01:00
Tamás Vajk
700a2dbb93
Merge pull request #5063 from tamasvajk/feature/remove-indexerproperty-ast
...
C#: Report IndexerProperty as Property in the PrintAST query
2021-02-01 17:25:25 +01:00
Mathias Vorreiter Pedersen
be9908df87
C++: Fix copy/paste error.
2021-02-01 16:45:07 +01:00
yoff
384d0212b1
Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2021-02-01 16:41:43 +01:00
Mathias Vorreiter Pedersen
71e1218ad5
Merge pull request #5061 from MathiasVP/more-memcpy-memset-strcpy-strcat-models
...
C++: Add more memcpy, memset, strcat and strcpy models
2021-02-01 16:25:01 +01:00
Mathias Vorreiter Pedersen
9db19613d6
C++: Reuse logic from commons/Scanf.
2021-02-01 16:10:28 +01:00
Taus Brock-Nannestad
fc01e5607f
Python: Use getLocation directly on EssaNode
2021-02-01 14:55:18 +01:00
Taus Brock-Nannestad
b8194bd1f8
Python: Add support for API graphs
...
Currently only supports the "use" side of things.
For the most part, this follows the corresponding implementation for
JavaScript. Major differences include:
- No `MkImportUse` nodes -- we just move directly from
`MkModuleImport` to its uses.
- Paths are no longer labelled by s-expressions, but rather by a
string that mirrors how you would access it in QL. This makes it very
easy to see how to access an API component -- simply look at its
`toString`!
This PR also extends `LocalSourceNode` to support looking up attribute
references and invocations of such nodes. This was again based on the
JavaScript equivalent (though without specific classes for
`InvokeNode` and the like, it's a bit more awkward to use).
2021-02-01 14:38:59 +01:00
CodeQL CI
2de230ea75
Merge pull request #5062 from esbena/js/test-for-html-concat-obfuscation
...
Approved by erik-krogh
2021-02-01 05:29:50 -08:00
Tom Hvitved
249e431e87
C#: Adjust CFG for {Recursive,Positional,Property}PatternExpr
2021-02-01 13:52:18 +01:00
Tamas Vajk
7d62e33feb
C#: Rework function pointer/delegate call DF
2021-02-01 13:40:03 +01:00
Mathias Vorreiter Pedersen
27b41c2016
C++: Address review comments.
2021-02-01 13:32:46 +01:00
CaptainFreak
3363f5e6db
JS: add query for Express-HBS LFR
2021-02-01 18:01:34 +05:30
Mathias Vorreiter Pedersen
c747914ef2
C++: Add sscanf and fscanf model implementations.
2021-02-01 12:54:59 +01:00
Taus
b8b42eaea3
Merge pull request #5064 from RasmusWL/fix-missing-override
...
Python: Add missing override annotation
2021-02-01 12:37:38 +01:00
Mathias Vorreiter Pedersen
61125b4bf2
C++: Address review comments.
2021-02-01 12:15:57 +01:00
Taus
3179546b8c
Merge pull request #5058 from yoff/python-add-consistency-checks-to-all-dataflow-test-folders
...
Python: Add consistency checks to all data-flow test folders
2021-02-01 11:41:31 +01:00
Rasmus Wriedt Larsen
4ef9a6cf2a
Python: Add missing override annotation
2021-02-01 11:28:41 +01:00
Rasmus Wriedt Larsen
2a9e66a667
Python: Fix problem after merge conflict
2021-02-01 11:17:04 +01:00
Rasmus Wriedt Larsen
4b6a59a126
Python: Apply code-review suggestion
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-02-01 11:12:32 +01:00
Esben Sparre Andreasen
9678534f25
JS: add tests for some syntactic XSS vector obfuscations
2021-02-01 10:20:23 +01:00
Tamas Vajk
1b6cb340d3
C#: Report IndexerProperty as Property in the PrintAST query
2021-02-01 10:08:51 +01:00
Erik Krogh Kristensen
aae69c6537
update expected output
2021-02-01 09:33:52 +01:00
Tamás Vajk
aa35fcafeb
Merge pull request #5018 from tamasvajk/feature/csharp9-binary-pattern-cfg
...
C#: Extract 'and' and 'or' patterns
2021-02-01 09:17:52 +01:00
Rasmus Lerchedahl Petersen
27fd46b855
Python: Update test expectation
2021-02-01 08:55:20 +01:00
Rasmus Lerchedahl Petersen
6730396ad6
Python: Remove tests from non-test directory
2021-02-01 08:52:00 +01:00
Mathias Vorreiter Pedersen
6c3f44bba8
C++: Add more memcpy, memset, strcat and strcpy models. Also refine which strcpy functions can live in the std namespace.
2021-02-01 08:44:10 +01:00
ihsinme
2b946aee5a
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-01-31 15:21:54 +03:00
ihsinme
b7df18b97e
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.ql
2021-01-31 15:16:40 +03:00
Geoffrey White
064d89735b
Merge pull request #5046 from MathiasVP/model-more-pure-functions
...
C++: Model more pure functions
2021-01-29 22:05:48 +00:00
Geoffrey White
03922aa1f5
C++: Exclude custom vprintf implementations.
2021-01-29 21:20:36 +00:00
Rasmus Lerchedahl Petersen
f6fa1276a6
Python: Add consistency checks
...
to all data-flow test floders
2021-01-29 21:28:43 +01:00
Rasmus Lerchedahl Petersen
05a138694d
Python: Fix crashing test
2021-01-29 21:12:44 +01:00
Rasmus Lerchedahl Petersen
7f1affa122
Python: UnpackingAssignment -> IterableUnpacking
2021-01-29 17:44:53 +01:00
Rasmus Lerchedahl Petersen
182d435dc6
Python: Replace comprehension read-step by for
...
read-step. Add a version targetting sequence nodes.
2021-01-29 17:31:59 +01:00
Tamas Vajk
7e9913a8a7
Fix failing pattern tests
2021-01-29 17:25:44 +01:00
Rasmus Wriedt Larsen
94e7980ca4
Merge branch 'main' into port-url-redirect-query
2021-01-29 16:22:50 +01:00
Rasmus Wriedt Larsen
ef831bb16f
Python: Fix tornado redirect QLdoc
2021-01-29 16:21:39 +01:00
Rasmus Wriedt Larsen
9c01aa2304
Python: Add modeling for django.shortcuts.redirect
2021-01-29 15:41:00 +01:00
Rasmus Wriedt Larsen
ff2f2b5792
Python: Add django.shortcuts.redirect test
2021-01-29 15:37:20 +01:00
Tamas Vajk
a9c51e7300
Fix missing pattern matching completions
2021-01-29 15:16:30 +01:00
CodeQL CI
c9537f2639
Merge pull request #5029 from asgerf/js/silence-angular-template-fps
...
Approved by erik-krogh
2021-01-29 06:06:37 -08:00
Taus Brock-Nannestad
817a142abc
Python: Add getLocation to EssaVariable.
...
This may be a slightly "bogus" location to provide for ESSA variables,
but it can be useful for debugging. For instance, where previously you
might just see
```
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
```
where each instance of `SSA variable x` was just a bare string, now
each occurrence will tell you (via its location) _where_ this variable
is being (re)defined.
2021-01-29 14:45:12 +01:00
Taus
cb195a0dc4
Merge pull request #4752 from yoff/python-dataflow-unpacking-assignment
...
Python: Dataflow, unpacking assignment
2021-01-29 14:15:28 +01:00
Taus
be5b7bb4c4
Merge pull request #5022 from yoff/python-split-lambdas
...
Python: Callable for lambdas
2021-01-29 14:12:26 +01:00
Mathias Vorreiter Pedersen
92a5a2a06a
C++: Solve merge conflicts by merging the two test.c test files.
2021-01-29 13:34:19 +01:00
Mathias Vorreiter Pedersen
d5f1c19152
Merge branch 'main' into ihsinme-patch-221
2021-01-29 13:05:07 +01:00
Erik Krogh Kristensen
c9ec983cd8
add js/client-side-unvalidated-url-redirection test for script tags inside react code
2021-01-29 12:50:43 +01:00
Erik Krogh Kristensen
39591687ba
add js/code-injection sink for script tags in React
2021-01-29 12:50:17 +01:00
Luke Cartey
76c9b6466e
Reformat TaintTrackingUtil.qll with more recent CodeQL CLI
2021-01-29 11:27:30 +00:00
Tamas Vajk
91152d3a65
Add additional tests to delegate call data flow
2021-01-29 12:02:11 +01:00
Tamas Vajk
191962f64c
C#: Add data flow 'getARuntimeTarget' predicate to 'FunctionPointerCall'
2021-01-29 12:01:38 +01:00
Tom Hvitved
bf5851f1c2
C#: Reduce caching in SsaImplCommon.qll
2021-01-29 11:42:52 +01:00
ihsinme
bdbf5a4fae
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-01-29 13:41:45 +03:00
Tom Hvitved
1a507ff497
C#: Remove Cached module from SsaImplCommon.qll
2021-01-29 10:52:42 +01:00
Geoffrey White
50f2557dd2
Merge pull request #5043 from MathiasVP/uniform-treatment-of-params-and-qualifiers-in-model-dataflow
...
C++: Uniform treatment of parameters and qualifiers in model dataflow
2021-01-29 09:48:07 +00:00
Erik Krogh Kristensen
3f1e81533c
support html attribute concatenations with single quotes
2021-01-29 10:37:37 +01:00
ihsinme
c8eeb5f73e
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-01-29 11:51:15 +03:00
Mathias Vorreiter Pedersen
339c4c6ce0
C++: Model more pure functions.
2021-01-28 19:37:53 +01:00
Geoffrey White
7d9ebaf9d8
Merge pull request #5040 from MathiasVP/strset-and-strtok-models
...
C++: Strset and strtok model implementations
2021-01-28 18:34:06 +00:00
Geoffrey White
768be9ec2c
Merge pull request #5041 from ihsinme/ihsinme-patch-198
...
CPP: Improve cpp/memory-leak-on-failed-call-to-realloc
2021-01-28 18:29:24 +00:00
Mathias Vorreiter Pedersen
23eb4d2009
C++: Fix isParameterDeref typo.
2021-01-28 18:29:30 +01:00
Mathias Vorreiter Pedersen
75aa1e8a3b
C++: Respond to review comments.
2021-01-28 16:39:11 +01:00
Geoffrey White
02d60a26eb
Merge pull request #5037 from github/igfoo/decltype
...
C++: decltypes may have multiple expressions
2021-01-28 14:44:53 +00:00
Shati Patel
1c56c30eba
Merge pull request #5028 from shati-patel/docs/update-footer
...
Docs: Update copyright date in footer
2021-01-28 13:11:43 +00:00
Tom Hvitved
59d87e2570
Merge pull request #4557 from hvitved/csharp/dataflow/parameters
...
C#: Simpler data-flow modelling of parameters
2021-01-28 14:02:42 +01:00
ihsinme
f94a7fc2f0
Update MemoryLeakOnFailedCallToRealloc.ql
2021-01-28 15:47:38 +03:00
Mathias Vorreiter Pedersen
5a420f2bae
C++: Use the new predicates for uniform treatment of parameters and qualifiers in model dataflow.
2021-01-28 13:33:08 +01:00
ihsinme
8ed28157e1
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.expected to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.expected
2021-01-28 15:28:52 +03:00
ihsinme
f65ec97ac2
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/test.c to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen/test.c
2021-01-28 15:28:34 +03:00
ihsinme
8880b38b1f
Rename cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.qlref to cpp/ql/test/experimental/query-tests/Security/CWE/CWE-788/semmle/tests/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen/AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.qlref
2021-01-28 15:28:15 +03:00
Rasmus Wriedt Larsen
b6007cf324
Merge pull request #5023 from yoff/python-unify-synthetic-post-update-nodes
...
Python: Only generate one post-update node, even if there are multiple reasons for doing so.
2021-01-28 13:11:50 +01:00
Rasmus Wriedt Larsen
173012578e
Python: Add missing type-tracking step for django.views
...
Easy to overlook, and will onyl be caught by tests if they use `import
parent.thing` and not `from parent import thing`
2021-01-28 12:10:42 +01:00
Rasmus Wriedt Larsen
54725ccbb9
Python: Support full-path import of Django View class
...
requestHandler still MISSING :(
2021-01-28 12:10:40 +01:00
Rasmus Wriedt Larsen
61d69f2cc8
Python: Add test for full-path import of Django View class
2021-01-28 12:10:39 +01:00
ihsinme
2b4296feb1
Update MemoryLeakOnFailedCallToRealloc.ql
2021-01-28 13:38:26 +03:00
ihsinme
cf565970e3
Merge pull request #1 from github/main
...
update fork
2021-01-28 13:26:11 +03:00
yoff
1068edeb28
Merge pull request #5038 from RasmusWL/import-fix
...
Python: Fix too many results from DataFlow::importNode
2021-01-28 11:25:17 +01:00
Mathias Vorreiter Pedersen
2c70106d2d
Merge pull request #5009 from ihsinme/ihsinme-patch-219
...
CPP: add query for CWE-788 Access of memory location after the end of a buffer using strncat.
2021-01-28 11:10:30 +01:00
Anders Schack-Mulligen
bbdd7c9b57
Merge pull request #4963 from joefarebrother/guava-collections
...
Java: Add flow steps for Guava collection utilities
2021-01-28 11:01:03 +01:00
Mathias Vorreiter Pedersen
7affbfc6cb
C++: Add tests.
2021-01-28 10:57:39 +01:00
Mathias Vorreiter Pedersen
6255662114
C++: Add two new model implementation classes.
2021-01-28 10:57:30 +01:00
Tom Hvitved
e6f81bcf0b
C#: Update expected test output
2021-01-28 10:34:50 +01:00
Tom Hvitved
6ee5cdf2b2
C#: Simpler data-flow modelling of parameters
2021-01-28 10:34:47 +01:00
Jonas Jensen
69ce24d4b8
Merge pull request #5035 from MathiasVP/implied-deref-flow
...
C++: Implied dataflow models
2021-01-28 09:35:58 +01:00
Tom Hvitved
65ea01e145
Merge pull request #4999 from hvitved/csharp/dataflow/phi-input
...
C#: Adjust flow into phi nodes
2021-01-28 09:07:01 +01:00
luchua-bc
ab7d257569
Add more cases and change EC to 256 bits
2021-01-28 04:06:27 +00:00
luchua-bc
2ac7b4bab4
Update qldoc
2021-01-28 04:06:27 +00:00
luchua-bc
058f3af4b2
Refactor the hasShortSymmetricKey method
2021-01-28 04:06:27 +00:00
luchua-bc
cbaee937d0
Optimize the query
2021-01-28 04:06:27 +00:00
luchua-bc
cfc950f803
Query for weak encryption: Insufficient key size
2021-01-28 03:25:15 +00:00
luchua-bc
6a93099b64
Simplify the query and update qldoc
2021-01-28 03:02:53 +00:00
Rasmus Lerchedahl Petersen
0e0b18c214
Python: Adjust comment based on review.
2021-01-28 01:09:03 +01:00
Robert Marsh
0addce5be4
Merge pull request #5036 from MathiasVP/memcpy-models
...
C++: Model aliasing of memcpy-like functions and include more functions
2021-01-27 14:38:08 -08:00
Rasmus Lerchedahl Petersen
ae2c122159
Python: Small refactor
...
- align synthetic pre-update nodes with synthetic post -update nodes
- move the classes into the modules
- rename modules after the new main class (eliding "needs")
2021-01-27 23:15:50 +01:00
Mathias Vorreiter Pedersen
24f76f9a17
C++: Accept test changes.
2021-01-27 21:57:12 +01:00
Rasmus Lerchedahl Petersen
2120868939
Python: format
2021-01-27 19:48:01 +01:00
yoff
2c5da85e3b
Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2021-01-27 19:43:40 +01:00
Rasmus Wriedt Larsen
5646af56dd
Python: Fix too many results from DataFlow::importNode
2021-01-27 19:11:55 +01:00
Rasmus Wriedt Larsen
0d42e546a0
Python: Add deep import chain to import-helper tests
2021-01-27 19:09:09 +01:00
Rasmus Wriedt Larsen
44bb41e84b
Python: Add extra type-tracking test for "long" import chain
...
While trying to debug an other problem related to full import of django view, I
stumbled upon this oddity. (yikes)
2021-01-27 19:06:51 +01:00
Mathias Vorreiter Pedersen
c90dc62cc4
C++: Autoformat.
2021-01-27 18:57:09 +01:00
Mathias Vorreiter Pedersen
aec18e7123
C++: Add mempcpy to MemcpyFunction model class.
2021-01-27 18:12:32 +01:00
Mathias Vorreiter Pedersen
5aff5c3254
C++: Add AliasFunction model to MemcpyFunction.
2021-01-27 18:12:02 +01:00
Mathias Vorreiter Pedersen
066f83630d
C++: bcopy can never be in the std namespace.
2021-01-27 18:07:14 +01:00
Ian Lynagh
3880b48736
C++: Add an upgrade script
2021-01-27 16:31:56 +00:00
Tamas Vajk
ca5e3b4489
Add new .stats file
2021-01-27 17:18:50 +01:00
Ian Lynagh
307bef0ec3
C++: decltypes may have multiple expressions
2021-01-27 16:06:42 +00:00
Mathias Vorreiter Pedersen
52e2a69db9
C++: Accept test changes.
2021-01-27 16:56:37 +01:00
Mathias Vorreiter Pedersen
32b5c7fe06
C++: Model implied dataflow
2021-01-27 16:53:21 +01:00
Tamas Vajk
034d0a7b10
Add DB upgrade folder for binary patterns
2021-01-27 16:47:15 +01:00
Tamas Vajk
552e11de19
Fix change note date
2021-01-27 16:42:03 +01:00
Tamas Vajk
669e207600
Fix sign analysis expected file
2021-01-27 16:40:56 +01:00
Geoffrey White
a4d7bfbb2b
Merge pull request #5031 from MathiasVP/remove-linear-scan-of-functions-2
...
C++: Remove more linear scans
2021-01-27 14:29:27 +00:00
Tamas Vajk
d1cc2cc999
Remove code duplication
2021-01-27 13:52:12 +01:00
Tamas Vajk
5157236999
Fix doc comments
2021-01-27 13:49:13 +01:00
ihsinme
bdfdcbd673
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-01-27 15:48:18 +03:00
Tamas Vajk
10518744cf
C#: Remove expressions inside attributes from CFG
2021-01-27 13:20:06 +01:00
Mathias Vorreiter Pedersen
c61dec1dff
C++: Remove more linear scans.
2021-01-27 13:17:47 +01:00
ihsinme
16d058f498
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
2021-01-27 15:06:57 +03:00
ihsinme
5d163b4c15
Update WrongInDetectingAndHandlingMemoryAllocationErrors.qhelp
2021-01-27 15:05:58 +03:00
ihsinme
25de82c78c
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-01-27 15:05:01 +03:00
ihsinme
bec0064396
Update test.cpp
2021-01-27 14:54:47 +03:00
CodeQL CI
6d952bda27
Merge pull request #5020 from asgerf/js/getaqlclass-test
...
Approved by esbena
2021-01-27 03:48:57 -08:00
ihsinme
8737c1442b
Update WrongInDetectingAndHandlingMemoryAllocationErrors.cpp
2021-01-27 14:48:23 +03:00
CodeQL CI
bb423828de
Merge pull request #5025 from asgerf/js/slow-xml-parent-upgrade-script
...
Approved by erik-krogh
2021-01-27 03:27:43 -08:00
yoff
f2241e04e5
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-01-27 12:15:35 +01:00
Geoffrey White
988c1bc044
Merge pull request #5026 from MathiasVP/remove-linear-scan-of-functions
...
C++: Remove linear scan of functions table
2021-01-27 11:15:02 +00:00
ihsinme
19b7d46099
Update test.c
2021-01-27 14:06:53 +03:00
Shati Patel
4ba9d10b9a
Docs: Update copyright date in footer
2021-01-27 11:03:46 +00:00
Asger Feldthaus
1637b72092
JS: Ignore Angular templates in a few non-security queries
2021-01-27 11:02:19 +00:00
intrigus
d3e6e594b2
Java: Improve QLDoc
2021-01-27 11:57:32 +01:00
intrigus
bdba7e14fe
Java: Switch to data flow
2021-01-27 11:54:40 +01:00
Tamas Vajk
e24e5b13f5
C#: Improve CFG to handle 'and' and 'or' patterns
2021-01-27 11:52:59 +01:00
Mathias Vorreiter Pedersen
3604557e62
C++: Remove linear scan in isSVariant.
2021-01-27 11:47:45 +01:00
Tamas Vajk
4685fc0a32
C#: Extract binary patterns
2021-01-27 11:27:52 +01:00
ihsinme
68eba11dbf
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrncat.ql
2021-01-27 13:16:56 +03:00
ihsinme
aebf7bdff4
Update test.c
2021-01-27 13:12:48 +03:00
Asger Feldthaus
5a89fa3f67
JS: Fix performance issue in upgrade script
2021-01-27 10:10:37 +00:00
ihsinme
885d26805f
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.expected
2021-01-27 12:47:51 +03:00
ihsinme
9a85b761a1
Update test.c
2021-01-27 12:46:10 +03:00
Tom Hvitved
39977e9a43
Merge pull request #4724 from hvitved/csharp/cfg/not-pattern
...
C#: Implement CFG for `not` patterns
2021-01-27 10:12:31 +01:00
Anders Schack-Mulligen
0381190a30
Merge pull request #5021 from hmakholm/qlpack-test
...
Add "tests" fields to test qlpacks
2021-01-27 09:23:35 +01:00
Tom Hvitved
214505c4dc
Merge pull request #5016 from hvitved/csharp/exception-dispatch-info
...
C#: Teach CFG about `ExceptionDispatchInfo::Throw`
2021-01-27 08:36:51 +01:00
Rasmus Lerchedahl Petersen
5d62a56ed8
Python: Remove debug function
2021-01-27 08:24:11 +01:00
Rasmus Lerchedahl Petersen
d18c1602cd
Python: autoformat
2021-01-27 01:25:38 +01:00
Rasmus Lerchedahl Petersen
d29fdda779
Python: Only generate one post-update node,
...
even if there are multiple reasons for doing so.
Solves `uniqueNodeToString` inconsistencies
(and probably saves quite a lot of nodes).
2021-01-27 01:20:51 +01:00
ihsinme
5d5cd4fde5
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrncat.ql
2021-01-27 00:10:04 +03:00
ihsinme
f074564dc1
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-27 00:00:18 +03:00
ihsinme
636fe73f40
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.ql
2021-01-26 23:52:18 +03:00
ihsinme
fc9d219057
Update AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.ql
2021-01-26 23:50:54 +03:00
ihsinme
de0bbc8826
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-26 23:47:07 +03:00
Rasmus Lerchedahl Petersen
9b13834d28
Python: small refactor
2021-01-26 21:17:59 +01:00
Rasmus Lerchedahl Petersen
d3e0e84c37
Python: Separate callable for lambdas
...
Since lambdas are split, but their children are not,
we use the Function as the callable.
2021-01-26 21:17:59 +01:00
Rasmus Lerchedahl Petersen
4526a1dd2f
Python: test for split lambda
2021-01-26 21:17:59 +01:00
yoff
cd85cf1645
Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
2021-01-26 19:16:54 +01:00
yoff
500ea12224
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-01-26 19:14:46 +01:00
Henning Makholm
54f00de3e0
Add "tests" fields to test qlpacks
...
This will allow `codeql resolve tests --ignore-dubious-cases`
(and thus the VSCode extension) to recognize all `.ql` files in those
packs as test cases, even if they don't have accompanying `.expected`
files.
CLI versions prior to 2.1.0 will choke on this, but it's almost 10
months since that came out.
2021-01-26 18:15:22 +01:00
Mathias Vorreiter Pedersen
04a3c3d29c
Merge pull request #4953 from ihsinme/ihsinme-patch-207
...
CPP: Add query for CWE-14 compiler removal of code to clear buffers.
2021-01-26 18:13:18 +01:00
Mathias Vorreiter Pedersen
416aa49d99
C++: Capitalize alert message.
2021-01-26 17:24:03 +01:00
Asger Feldthaus
c69a051292
JS: Add test that depends on getAQlClass
2021-01-26 15:16:27 +00:00
Mathias Vorreiter Pedersen
aec0e9808b
Merge pull request #5017 from rvermeulen/patch-2
...
C++: Correct pointer to data member example
2021-01-26 14:56:57 +01:00
Rasmus Wriedt Larsen
902bade5ae
Merge pull request #5015 from yoff/python-add-missing-postupdate-nodes
...
Python: add missing postupdate nodes
2021-01-26 14:39:29 +01:00
Remco Vermeulen
1834403148
Replace HTTP entity
...
The code formatting operator correctly translate to HTTP entities.
2021-01-26 14:14:42 +01:00
Remco Vermeulen
8c09032d1d
Correct access specifier
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-26 13:23:43 +01:00
Remco Vermeulen
932ee968e0
Correct pointer to data member example
...
The class `PointerToMemberType` is preceded by an example that doesn't define the variable `c` used to access a data member.
2021-01-26 13:08:28 +01:00
CodeQL CI
76e1e4d668
Merge pull request #4712 from asgerf/js/api-graph-tweaks
...
Approved by max-schaefer
2021-01-26 04:04:05 -08:00
Taus
4c0f54f5d3
Merge pull request #5007 from yoff/python-disregard-comp-args
2021-01-26 12:53:33 +01:00
Rasmus Lerchedahl Petersen
e253855999
Python: Add comment about reverse reads.
2021-01-26 12:11:21 +01:00
CodeQL CI
0be0929693
Merge pull request #4958 from asgerf/js/angular2
...
Approved by erik-krogh
2021-01-26 02:53:33 -08:00
Rasmus Lerchedahl Petersen
e44f1813fa
Python: Add TODO comment
2021-01-26 11:29:14 +01:00
Tamás Vajk
e4ed050c87
Merge pull request #4970 from tamasvajk/feature/extraction-errors
...
C#: Fix extraction errors
2021-01-26 11:28:39 +01:00
Rasmus Lerchedahl Petersen
2c58643fd1
Python: Test for parameters without nodes.
2021-01-26 11:28:31 +01:00
Tamás Vajk
3ece8c3a01
Merge pull request #4835 from tamasvajk/feature/cil-fnptr
...
C#: Extract function pointer types from CIL
2021-01-26 11:28:02 +01:00
Asger Feldthaus
e6d9cd1905
JS: Add clause to getReturn/getInstance
2021-01-26 10:14:12 +00:00
CodeQL CI
c1726ed868
Merge pull request #5014 from RasmusWL/typetracking-test-track-self
...
Approved by tausbn
2021-01-26 02:10:52 -08:00
Asger Feldthaus
d59ccb7687
JS: Remove unhelpful mat-table load step
2021-01-26 09:27:48 +00:00
Asger Feldthaus
89225e222c
JS: Remove confusing comment
2021-01-26 09:25:12 +00:00
Tom Hvitved
71d25c1f8b
C#: Fix join-orders in ControlFlowTree::last()
2021-01-26 09:58:01 +01:00
Rasmus Lerchedahl Petersen
7b9ca7171a
Python: update test expectations
2021-01-26 09:47:48 +01:00
Rasmus Lerchedahl Petersen
dacc21d0b5
Python: update test expectation
2021-01-26 09:45:41 +01:00
Tom Hvitved
cd8155c201
C#: Teach CFG about ExceptionDispatchInfo::Throw
2021-01-26 09:16:53 +01:00
Tom Hvitved
07a96c3596
C#: Add CFG tests for ExceptionDispatchInfo::Throw
2021-01-26 09:01:06 +01:00
luchua-bc
fee0b94cd4
Use isRequestGetParamMethod as the source
2021-01-26 04:41:44 +00:00
yoff
09bb3001d6
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-01-25 21:58:20 +01:00
yoff
7ba0939239
Merge pull request #4995 from RasmusWL/tornado-model-http-sinks
...
Python: model HTTP sink in Tornado
2021-01-25 21:53:44 +01:00
Rasmus Wriedt Larsen
91caa13f48
Merge pull request #5004 from github/erik-krogh/ignore-venv
...
add .venv/ to .gitignore
2021-01-25 18:06:28 +01:00
Joe Farebrother
d69ecde5c1
Java: Add additional flow steps for guava collection methods and more unit tests
2021-01-25 16:37:40 +00:00
Joe Farebrother
7e11d8ed07
Java: Add modelling for guava Sets
2021-01-25 16:37:40 +00:00
Joe Farebrother
d1427fcd93
Java: Add modelling for Guava's collection classes
2021-01-25 16:37:40 +00:00
Rasmus Lerchedahl Petersen
96b7f75905
Python: add postupdate nodes for kwargs
...
drops remaining reverse read failures on saltstack.
2021-01-25 17:34:49 +01:00
Rasmus Wriedt Larsen
a8186be2fa
Python: Add test of type-tracking self in methods
2021-01-25 17:20:11 +01:00
Rasmus Lerchedahl Petersen
ad39bfb2ff
Python: Add postupdate nodes for subscripts.
...
This drops reverse read inconsistencies on saltstack from 14909 to 1353.
2021-01-25 17:01:25 +01:00
Rasmus Lerchedahl Petersen
361bee851a
Python: Tests inspired by reverse read check
2021-01-25 17:01:25 +01:00
Rasmus Lerchedahl Petersen
4ff2c6d85a
Python: fix test expectation
...
probably a copy-paste error..
2021-01-25 16:49:51 +01:00
Tom Hvitved
7c9a6064cf
C#: Get rid of ReadKind
2021-01-25 16:20:14 +01:00
CodeQL CI
4601eb9c7c
Merge pull request #4706 from max-schaefer/issue-247
...
Approved by asgerf
2021-01-25 07:11:35 -08:00
Tom Hvitved
6ffeaf8c2a
C#: Adjust flow into phi nodes
2021-01-25 15:44:37 +01:00
Tom Hvitved
38b0f743cb
C#: Add test that illustrates problem with flow through phi nodes
2021-01-25 14:20:27 +01:00
Tom Hvitved
36ad6b3432
Merge pull request #5001 from hvitved/csharp/ssa/read-kind
...
C#: Remove `ReadKind` from the shared SSA library
2021-01-25 14:11:54 +01:00
Tom Hvitved
221aebc833
C#: Fix bug in AssignOperationWithExpandedAssignment::last
2021-01-25 14:01:31 +01:00
alexet
355edcb136
Csharp: Reduce BDD usage.
2021-01-25 13:52:17 +01:00
Tom Hvitved
0543e34812
C#: Address review comment
2021-01-25 13:52:17 +01:00
Tom Hvitved
e0c7f32282
C#: Add relational pattern CFG test
2021-01-25 13:52:17 +01:00
Tom Hvitved
063733ad52
C#: Implement CFG for not patterns
2021-01-25 13:52:17 +01:00
Tom Hvitved
ab85b2c2d2
C#: Add is not null guards test
2021-01-25 13:52:17 +01:00
Tom Hvitved
0080357153
C#: Add unary pattern CFG tests
2021-01-25 13:52:17 +01:00
Erik Krogh Kristensen
0ba610f7db
Merge pull request #5013 from erik-krogh/asmWhitespace
...
JS: remove benign result for js/whitespace-contradicts-precedence related to " | 0" expressions
2021-01-25 13:29:07 +01:00
Tom Hvitved
e7b43e50b6
C#: Remove ReadKind from the shared SSA library
2021-01-25 12:09:34 +01:00
Tamas Vajk
eac69c1674
Add DB upgrade folder for CIL fnptr support
2021-01-25 11:34:47 +01:00
Tamas Vajk
b434a0f395
Add change notes
2021-01-25 11:27:13 +01:00
Tom Hvitved
1c84455a6d
Merge pull request #5003 from hvitved/csharp/remove-getaqlclass
...
C#: Remove uses of `getAQlClass()`
2021-01-25 10:57:04 +01:00
Erik Krogh Kristensen
d86705fe7a
remove benign result for js/whitespace-contradicts-precedence related to " | 0" expressions
2021-01-25 10:43:39 +01:00
Jonas Jensen
1b3d69d617
Merge pull request #4784 from MathiasVP/mathiasvp/reverse-read-take-3
...
C++: Support longer access paths in IR field flow
2021-01-25 10:36:03 +01:00
Tom Hvitved
c235462f7d
C++: Sync IRType.qll
2021-01-25 09:43:57 +01:00
ihsinme
b899229298
Add files via upload
2021-01-25 00:33:54 +03:00
ihsinme
9ae503a5a8
Add files via upload
2021-01-25 00:30:35 +03:00
ihsinme
20e19ec467
Add files via upload
2021-01-25 00:09:55 +03:00
ihsinme
9071ba2f99
Add files via upload
2021-01-25 00:06:19 +03:00
ihsinme
fcd532522d
Add files via upload
2021-01-24 22:36:42 +03:00
ihsinme
20d1b24e9c
Add files via upload
2021-01-24 22:35:11 +03:00
Rasmus Lerchedahl Petersen
89e56707c3
Python: Omit all unresolved parameter nodes.
...
Drops the results further to 139.
2021-01-24 16:16:07 +01:00
Rasmus Lerchedahl Petersen
baf0917524
On saltstack this drops the number of consistency errors
...
of type uniqueEnclosingCallable from 4026 to 614.
2021-01-24 15:30:59 +01:00
Rasmus Lerchedahl Petersen
0d20a4cb4a
Python: Simplify modelling
2021-01-22 19:40:34 +01:00
Rasmus Lerchedahl Petersen
f948ef8f27
Merge branch 'main' of github.com:github/codeql into python-dataflow-unpacking-assignment
2021-01-22 16:26:48 +01:00
CodeQL CI
527c41520e
Merge pull request #4951 from esbena/js/reintroduce-server-crash
...
Approved by erik-krogh
2021-01-22 06:37:50 -08:00
Tom Hvitved
6fc14976cf
C#: Remove uses of getAQlClass()
2021-01-22 15:00:45 +01:00
Erik Krogh Kristensen
b3497191b1
add .venv/ to .gitignore
2021-01-22 14:44:18 +01:00
Mathias Vorreiter Pedersen
87b738d48c
Merge pull request #5002 from MathiasVP/fix-PrivateCleartextWrite-format
...
C++: Fix path-problem format in cpp/private-cleartext-write
2021-01-22 14:28:03 +01:00
Mathias Vorreiter Pedersen
b4f9b1590d
C++: Restore lost result on git/git. We lost the result in a00bd7ae02 because the added check for type T to type T* conversion didn't handle const qualifiers.
2021-01-22 14:20:18 +01:00
Esben Sparre Andreasen
3f3962f7a9
Update javascript/ql/src/Security/CWE-730/examples/server-crash.GOOD-B.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-01-22 14:03:21 +01:00
Mathias Vorreiter Pedersen
682b246441
C++: Fix path-problem format.
2021-01-22 13:40:44 +01:00
Esben Sparre Andreasen
718f6eb3fd
JS: update and prettify examples
2021-01-22 13:17:38 +01:00
Asger Feldthaus
b36593a76b
JS: Fix broken link tag
2021-01-22 10:11:16 +00:00
Asger Feldthaus
0ffa720d3b
JS: Capitalize other enum constants
2021-01-22 09:48:11 +00:00
Asger Feldthaus
c257f6617f
JS: Capitalize enum members in ScopeKind and TopLevelKind
2021-01-22 09:33:25 +00:00
Mathias Vorreiter Pedersen
7bc461aeb2
Merge pull request #4990 from geoffw0/cpp401b
...
C++: Further improvements to experimental query cpp/memory-leak-on-failed-call-to-realloc
2021-01-22 09:51:10 +01:00
CodeQL CI
0e059cea56
Merge pull request #5000 from erik-krogh/redosOnlyNonMin
...
Approved by esbena
2021-01-21 15:29:03 -08:00
Erik Krogh Kristensen
11f35a5193
Update javascript/ql/src/semmle/javascript/security/performance/ReDoSUtil.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-01-21 23:11:50 +01:00
Erik Krogh Kristensen
62746bbbac
skip analyzing regular expressions in minified files for ReDoS
2021-01-21 22:31:42 +01:00
CodeQL CI
d0b70d15f0
Merge pull request #4996 from esbena/js/nodejs-client-request-event-emitter
...
Approved by erik-krogh
2021-01-21 12:37:00 -08:00
Esben Sparre Andreasen
cb25f2ab20
JS: add docstring with source examples
2021-01-21 20:46:34 +01:00
CodeQL CI
b83c949109
Merge pull request #4986 from erik-krogh/logInf
...
Approved by esbena
2021-01-21 06:02:50 -08:00
Asger Feldthaus
c29014f122
JS: Autoformat
2021-01-21 13:55:21 +00:00
ihsinme
9c53e39394
Update CompilerRemovalOfCodeToClearBuffers.ql
2021-01-21 16:52:00 +03:00
Esben Sparre Andreasen
1c100bbbc2
JS: recognize event emitters in nodejs client requests
2021-01-21 14:14:00 +01:00
Rasmus Wriedt Larsen
7a76a5134e
Python: Add redirect modeling for Tornado
...
After making https://github.com/github/codeql/pull/4995 , I realized how easy
this would be :D
Will need to do some manual merge-conflict handling, but it should be all good
:)
2021-01-21 14:04:11 +01:00
Rasmus Wriedt Larsen
2f86937e5a
Python: Remove unused param in test code
2021-01-21 13:44:56 +01:00
Rasmus Wriedt Larsen
48083d657a
Python: Apply code-review suggestion
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-01-21 13:40:58 +01:00
Rasmus Wriedt Larsen
ee2d18afd8
Merge pull request #4665 from yoff/python-dataflow-modernize-tests
...
Python: Add new-style tests
2021-01-21 13:35:39 +01:00
Rasmus Wriedt Larsen
b55817a5b2
Python: Model HTTP responses in tornado
...
This is quite a simpel model, but ends up matching what we were able to do with
points-to.
I think this modeling excercise really shows that we need a bit of a different
way to model HTTP responses... but I'm not going to try to fix that in this PR.
2021-01-21 13:26:31 +01:00
Rasmus Wriedt Larsen
ac77a8b8a8
Python: Add proper HTTP response tests for Tornado
2021-01-21 13:22:31 +01:00
Asger Feldthaus
2f58683f2d
JS: Remove PipeCallExpr
2021-01-21 12:12:17 +00:00
Asger Feldthaus
1d1149f4cd
JS: Test and QLDoc for RxJS model
2021-01-21 12:08:22 +00:00
Rasmus Lerchedahl Petersen
e786be06ae
Python: Fix broken references
2021-01-21 12:40:35 +01:00
Asger Feldthaus
144d04f3ce
JS: Add test exposing source location of attribute after line break
2021-01-21 11:25:39 +00:00
Asger Feldthaus
7c6704a63f
JS: Shift line numbers in test case
2021-01-21 11:09:36 +00:00
Asger F
34280f90b0
Update QLDoc for getATemplateArgument
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-01-21 10:51:46 +00:00
Erik Krogh Kristensen
a9a901d1e2
add change note
2021-01-21 11:08:39 +01:00
Erik Krogh Kristensen
dafec3ceaa
rename to AnalyzedCompoundNumericAssignExpr
2021-01-21 11:06:46 +01:00
Rasmus Lerchedahl Petersen
88db8f562d
Python: Elaborate comments for steps
2021-01-21 10:55:59 +01:00
Tom Hvitved
bc41c26354
Merge pull request #4959 from hvitved/csharp/ssa/split
...
C#: Split up SSA implementation
2021-01-21 10:52:49 +01:00
Rasmus Lerchedahl Petersen
bc1b50788a
Python: Small refactor
2021-01-21 10:44:58 +01:00
Rasmus Lerchedahl Petersen
19918e2e57
Python: Have Node-postfix consistently
2021-01-21 10:43:15 +01:00
CodeQL CI
30015ee995
Merge pull request #4942 from esbena/js/reintroduce-resource-exhaustion
...
Approved by erik-krogh
2021-01-21 01:21:33 -08:00
CodeQL CI
9cfbe6feb7
Merge pull request #4980 from erik-krogh/defaultExport
...
Approved by esbena
2021-01-21 00:55:15 -08:00
Esben Sparre Andreasen
b90dd89746
JS: move js/resource-exhaustion to experimental
2021-01-21 09:09:01 +01:00
Esben Sparre Andreasen
5a6e692807
add js/server-crash to the security suite
2021-01-21 08:43:13 +01:00
Esben Sparre Andreasen
9e3cc3b1b2
JS: add qhelp and changenotes for js/server-crash
2021-01-21 08:43:13 +01:00
Tamas Vajk
eb8a52ba8d
Add new .stats file
2021-01-20 21:21:03 +01:00
Rasmus Lerchedahl Petersen
419449fb8a
Python: default value for argN
2021-01-20 20:33:04 +01:00
Rasmus Lerchedahl Petersen
2409a7899b
Python: Remove func tag in some situations.
...
Also make ArgumentNode public
2021-01-20 20:18:40 +01:00
Erik Krogh Kristensen
a44aefa6c9
add test for top-level closure modules - and simplify
2021-01-20 19:47:32 +01:00
Rasmus Lerchedahl Petersen
7a5d553dd2
Merge branch 'main' of github.com:github/codeql into python-dataflow-unpacking-assignment
2021-01-20 19:27:34 +01:00
Geoffrey White
d5d8b48218
C++: More accurate solution using Guards library.
2021-01-20 17:15:42 +00:00
Mathias Vorreiter Pedersen
3877f03a46
Merge pull request #4979 from geoffw0/cpp401
...
C++: Improvements to experimental query cpp/memory-leak-on-failed-call-to-realloc
2021-01-20 18:10:13 +01:00
Luke Cartey
5c6f5b7b33
Java: Track taint through Spring Java bean getters on super types
2021-01-20 16:53:03 +00:00
yoff
e072864948
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-01-20 17:38:34 +01:00
Geoffrey White
439fe41b0a
C++: Add a couple more test cases.
2021-01-20 15:33:32 +00:00
yoff
3fc085ff38
Update python/ql/test/experimental/dataflow/TestUtil/RoutingTest.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-01-20 16:11:40 +01:00
yoff
d0663e5c3a
Merge pull request #4971 from RasmusWL/avoid-double-route-setup-django
...
Python: Avoid duplicated route-setup in django
2021-01-20 16:10:33 +01:00
Erik Krogh Kristensen
bf518f1c90
flag less overly general functions with js/unneeded-defensive-code
2021-01-20 15:48:12 +01:00
Mathias Vorreiter Pedersen
b0e255eb16
C++: Encapsulate skipSkippableInstructions in a module.
2021-01-20 15:45:37 +01:00
Tamas Vajk
ab8dc27b26
Add missing 'bindingset'
2021-01-20 15:44:05 +01:00
Tamas Vajk
727412b26b
Store by-ref type annotation in trap and add tests
2021-01-20 15:44:05 +01:00
Tamas Vajk
2804f5cba9
Add by-ref, and fix pinned CIL extraction
2021-01-20 15:44:05 +01:00
Tamas Vajk
f99bf5755c
Merge parameter extraction between methods and function pointers
2021-01-20 15:44:05 +01:00
Tamas Vajk
f986c15200
Add QL classes for CIL function pointers, and add test
2021-01-20 15:44:05 +01:00
Tamas Vajk
0c213d0926
C#: Extract function pointer types from CIL
2021-01-20 15:44:05 +01:00
Mathias Vorreiter Pedersen
f12ebe88e6
Revert "C++: Replace SkippableInstruction with local flow steps."
...
This reverts commit 258d04178f . This
change caused a ~20% performance regression.
2021-01-20 15:43:24 +01:00
Tamás Vajk
5fa0dd719c
Merge pull request #4619 from tamasvajk/feature/csharp9-function-pointer
...
C#: Extract function pointers
2021-01-20 15:42:58 +01:00
Rasmus Wriedt Larsen
9a397b6faf
Python: Apply code-review suggestion
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-01-20 15:28:20 +01:00
Erik Krogh Kristensen
2e024c3c61
fix that type inference assumed every compound-assignment have type number
2021-01-20 15:26:39 +01:00
ihsinme
4c9de4574a
Update CompilerRemovalOfCodeToClearBuffers.ql
2021-01-20 16:24:43 +03:00
CodeQL CI
2f459d9a72
Merge pull request #4977 from RasmusWL/missing-flask-class-view-handler-changenote
...
Approved by yoff
2021-01-20 02:38:30 -08:00
Rasmus Wriedt Larsen
526ccdd227
Python: Add safe example from qhelp to qltests
2021-01-20 11:35:48 +01:00
Rasmus Wriedt Larsen
37aa9b9d06
Python: Add prefix sanitizer on URL redirect query
...
This doesn't cover 100% of what we want to, but matches what we used to.
2021-01-20 11:35:47 +01:00
Rasmus Wriedt Larsen
d8bfa3565f
Python: Simple port of URL redirect query
...
Still have not added sanitizer, but seems like old sanitizer was a bit too broad
(also covering %-formatting)
2021-01-20 11:35:44 +01:00
Tamas Vajk
70c302ffbe
Add DB upgrade folder for function pointer
2021-01-20 11:20:55 +01:00
Shati Patel
bf0febd9d2
Merge pull request #4982 from github/update-sphix-readme
...
Update reference to new CodeQL site
2021-01-20 09:00:38 +00:00
Anders Schack-Mulligen
9b2f69ca94
Merge pull request #4978 from github/yo-h/struts-xml-change-note
...
Java: add change note for `struts.xml` extraction
2021-01-20 08:59:45 +01:00
Felicity Chapman
e96f942269
Update reference to new CodeQL site
2021-01-19 22:38:12 +00:00
Erik Krogh Kristensen
fbfbe70deb
add support for unnamed/default exports in PackageExports.qll
2021-01-19 22:40:45 +01:00
Rasmus Lerchedahl Petersen
5a652ab3aa
Python: Add missing test cases
2021-01-19 20:19:45 +01:00
Rasmus Lerchedahl Petersen
23d3343bfb
Merge branch 'main' of github.com:github/codeql into python-dataflow-modernize-tests
2021-01-19 18:24:52 +01:00
Rasmus Lerchedahl Petersen
8e126603b3
Python: Remember that old style tests still needs
...
updated expectations.
2021-01-19 18:21:27 +01:00
Rasmus Lerchedahl Petersen
ae38bbe03b
Python: Fearlessly adding another test
...
in the middle of the file.
2021-01-19 18:19:11 +01:00
Rasmus Lerchedahl Petersen
69913c053e
Python: relative line numbers in
...
MISSING-annotations
2021-01-19 18:10:22 +01:00
Geoffrey White
d2dd19a293
C++: It turns out __assert_fail is special (see DefaultOptions.qll) so we don't need a body here. And the body was wrong.
2021-01-19 16:56:19 +00:00
Geoffrey White
fe4ae7e975
C++: General solution for functions that may exit.
2021-01-19 16:56:19 +00:00
Geoffrey White
8fa3ffe125
C++: Add a few more test cases that we don't recognize as OK.
2021-01-19 16:56:19 +00:00
CodeQL CI
bdfb81064d
Merge pull request #4969 from asgerf/js/angular-dom-santizier-from-core
...
Approved by erik-krogh
2021-01-19 08:45:15 -08:00
Erik Krogh Kristensen
2a8a2832e2
Merge pull request #4946 from erik-krogh/libRedos
...
JS: Add library input as source for `js/polynomial-redos`
2021-01-19 17:30:20 +01:00
Tamas Vajk
d34992d36c
Add .stats file
2021-01-19 17:26:31 +01:00
Tamas Vajk
35b955f694
Update change note date
2021-01-19 17:26:31 +01:00
Tamas Vajk
f7a0c98cb3
Code quality improvement
2021-01-19 17:26:31 +01:00
Tamas Vajk
613bf6dca6
Fix failing test
2021-01-19 17:26:31 +01:00
Tamas Vajk
1d9b3ec8b4
Allow annotating fnptr return types
2021-01-19 17:26:31 +01:00
Tamas Vajk
348fe8f2fc
Address PR review comments
2021-01-19 17:26:31 +01:00
Tamas Vajk
a9986ca72d
Fix expected printed AST
2021-01-19 17:26:31 +01:00
Tamas Vajk
fd27bde4b5
Add function pointer conversion tests
2021-01-19 17:26:31 +01:00
Tamas Vajk
15e88471be
Adjust 'Cast.getTargetType()' to return the expression type instead of the type access type
2021-01-19 17:26:31 +01:00
Tamas Vajk
a11d852054
Fix address of unary operator extraction
2021-01-19 17:26:31 +01:00
Tamas Vajk
183926d9fd
C#: Add QL classes for function pointer type/invocation, tests
2021-01-19 17:26:31 +01:00
Tamas Vajk
876123315d
C#: Extract function pointers
2021-01-19 17:26:31 +01:00
Rasmus Lerchedahl Petersen
77da4b0106
Python: Remove absolute line numbers
...
- Use relative line numbers in flow test
- Elide line numbers in routing test (new concept)
2021-01-19 17:05:42 +01:00
yo-h
91fa12b1be
Java: add change note for struts.xml extraction
2021-01-19 10:19:18 -05:00
Rasmus Wriedt Larsen
9d8925ae6a
Python: Extend url-redirect tests
...
Specifically to show how it currently handles prefixing user-input with known
constant.
I changed test to be Python 3 only since I wanted to use f-string.
2021-01-19 15:37:41 +01:00
Rasmus Wriedt Larsen
830f8bfef6
Python: Add change-note for Flask class based view handlers
...
For https://github.com/github/codeql/pull/4944
2021-01-19 15:09:04 +01:00
Rasmus Wriedt Larsen
ab607b8030
Python: Add redirect modeling for Django
2021-01-19 14:45:41 +01:00
Rasmus Wriedt Larsen
aea974ee0c
Python: Add redirect modeling for Flask
2021-01-19 14:44:50 +01:00
Rasmus Wriedt Larsen
501e510622
Python: Add redirect modeling tests (flask/django)
2021-01-19 14:43:25 +01:00
Rasmus Wriedt Larsen
efb872ad1e
Python: Add HttpRedirectResponse concept
2021-01-19 14:35:19 +01:00
Jonas Jensen
24947f27b4
Merge pull request #4750 from geoffw0/modelclasses
...
C++: Model classes in StdString.qll.
2021-01-19 12:51:30 +01:00
CodeQL CI
fbab8f8539
Merge pull request #4972 from Marcono1234/marcono1234/qldoc-link-fixes
...
Approved by shati-patel
2021-01-19 03:07:41 -08:00
Shati Patel
47470e08c3
Add QLDoc link, suggested by @Marcono1234
2021-01-19 10:54:17 +00:00
Geoffrey White
cff56350e0
C++: Fix getClassAndName parameter name.
2021-01-19 10:34:25 +00:00
Tamás Vajk
e2af176727
Merge pull request #4974 from tamasvajk/feature/cleanup-db
...
C#: Remove leftover DB upgrade folder
2021-01-19 11:30:07 +01:00
Tom Hvitved
0674881ffd
C#: Do not rely on BasicBlock member predicates from SsaImplSpecific
2021-01-19 10:52:50 +01:00
Tom Hvitved
2a8060102d
C#: Split up SSA implementation
2021-01-19 10:52:50 +01:00
Tamás Vajk
b228b7d17b
Merge pull request #4975 from tamasvajk/feature/fix-build-error
...
C#: Fix build error in RelationalPattern
2021-01-19 10:10:53 +01:00
Tamas Vajk
be7d458dc6
C#: Fix build error in RelationalPattern
2021-01-19 09:49:51 +01:00
Geoffrey White
b4a5346dc3
C++: It turns out .getTemplate() is not necessary.
2021-01-19 08:46:53 +00:00
Geoffrey White
f8a1fb1c35
C++: Apply the new pattern where it doesn't matter for performance as well, for consistency.
2021-01-19 08:46:53 +00:00
Geoffrey White
bfef1a200e
C++: Apply the new pattern in other parts of StdString.qll where it matters.
2021-01-19 08:46:53 +00:00
Geoffrey White
b8e6ad8922
C++: Introduce new predicate for better performance in models.
2021-01-19 08:46:52 +00:00
Geoffrey White
a5632b272e
C++: Fix performance issue in hasTaintFlow / hasDataFlow.
2021-01-19 08:46:52 +00:00
Tamas Vajk
6cafb281b5
C#: Remove leftover DB upgrade folder
2021-01-19 09:45:34 +01:00
Tamás Vajk
b775eb4cf7
Merge pull request #4789 from tamasvajk/feature/csharp9-relational-pattern2
...
C#: Relational patterns
2021-01-19 09:38:57 +01:00
Tom Hvitved
25095f919e
Merge pull request #4962 from hvitved/csharp/nullability-extraction
...
C#: Improved extraction of type nullability
2021-01-19 09:34:38 +01:00
Rasmus Lerchedahl Petersen
42fa3bdb81
Python: Only consider the closest SOURCE
...
(in use-use flow) a source
2021-01-19 09:13:17 +01:00
Esben Sparre Andreasen
3015dcd310
JS: reformulate js/server-crash. Support promises and shorter paths.
2021-01-19 09:08:52 +01:00
Anders Schack-Mulligen
b620e02000
Merge pull request #4973 from Marcono1234/patch-1
...
Add ArrayInit.getSize(), improve documentation
2021-01-19 09:06:45 +01:00
Anders Schack-Mulligen
dde8d320f3
Apply suggestions from code review
...
Minor qldoc fixes.
2021-01-19 08:24:24 +01:00
Rasmus Lerchedahl Petersen
bd3de23c6e
Python: Remove some unhelpful store steps
2021-01-19 00:05:10 +01:00
Marcono1234
703336a77f
Add ArrayInit.getSize(), improve documentation
2021-01-18 16:44:53 +01:00
Marcono1234
e9aa63b670
Fix broken links to QLDoc specification
2021-01-18 16:18:45 +01:00
Rasmus Wriedt Larsen
8e5557eca3
Python: Avoid duplicated route-setup in django
...
When using `django.conf.urls.url` with Django 2+
2021-01-18 16:18:29 +01:00
Tamas Vajk
d05d4e22ad
C#: Fix namespace extraction of NoMetadataHandleType
2021-01-18 16:14:37 +01:00
Tamas Vajk
1b285ee792
C#: Hardcode well-known underlying enum types
2021-01-18 16:14:37 +01:00
Rasmus Lerchedahl Petersen
bfc6660795
Python: Remember to update test expectations
2021-01-18 15:00:06 +01:00
Erik Krogh Kristensen
01900d7ca2
remove false positive due to "\n" not being in the relevant relation
2021-01-18 14:47:29 +01:00
Asger Feldthaus
deca7f3cd6
JS: Add change note
2021-01-18 13:46:43 +00:00
CodeQL CI
fc2fe6cccb
Merge pull request #4928 from esbena/js/rewrite-multi-sanitization
...
Approved by asgerf
2021-01-18 05:11:42 -08:00
Asger Feldthaus
fbb5d14263
JS: Update angular test output
2021-01-18 12:19:09 +00:00
Asger Feldthaus
bb6bd9168e
JS: Update HTML TRAP tests output
2021-01-18 12:19:09 +00:00
Asger Feldthaus
2a7b4487f1
JS: More auto format
2021-01-18 12:19:09 +00:00
Asger Feldthaus
d8c9dba990
JS: Autoformat
2021-01-18 12:19:09 +00:00
Asger Feldthaus
5f4016be76
JS: Cache Import.getImportedModule
2021-01-18 12:19:09 +00:00
Asger Feldthaus
c5f2c04f16
JS: Add upgrade script
2021-01-18 12:19:09 +00:00
Asger Feldthaus
1b4a4ea2fa
JS: Bump extractor version string
2021-01-18 12:19:09 +00:00
Asger Feldthaus
44c5d36e83
JS: Simple RxJS model
2021-01-18 12:19:09 +00:00
Asger Feldthaus
00cd0644f0
JS: Implement getAResponseDataNode
2021-01-18 12:19:09 +00:00
Asger Feldthaus
2f3cef177b
JS: More steps in Angular2 model
2021-01-18 12:19:09 +00:00
Asger Feldthaus
c8901b62f5
JS: Add test for $any step
2021-01-18 12:19:08 +00:00
Asger Feldthaus
2ba98da107
JS: Only extract local vars in TemplateTopLevel
...
Angular template expressions cannot refer to global variables, any
unqualified identifier is a reference to a property provided by the
component.
We extract them as implicitly declared local variables which the
QL model can then connect with data flow steps.
2021-01-18 12:19:08 +00:00
Asger Feldthaus
faad466aa8
JS: Add ScopeKind enum
2021-01-18 12:19:08 +00:00
Asger Feldthaus
07cfceee19
JS: TRAP test for angular templates
2021-01-18 12:19:08 +00:00
Asger Feldthaus
3c0867125b
JS: Remove FP in TargetBlank
2021-01-18 12:19:08 +00:00
Asger Feldthaus
97f7cb4dc1
JS: Track location information using SourceMaps
2021-01-18 12:19:08 +00:00
Asger Feldthaus
898d22d2f4
JS: Simplify HTML element access
2021-01-18 12:19:08 +00:00
Asger Feldthaus
f24af58a60
JS: Extract mapping from HTML node to parent Expression
2021-01-18 12:19:08 +00:00
Asger Feldthaus
3b666a5646
JS: Extract mapping from TopLevel to parent HTML node
2021-01-18 12:19:08 +00:00
Asger Feldthaus
8848ee2d10
JS: Extract HTML from inline templates
2021-01-18 12:19:08 +00:00
Asger Feldthaus
6bf9345258
JS: Add test for class with locally-unused field
2021-01-18 12:19:08 +00:00
Asger Feldthaus
cc952bd2a4
JS: Reorganize test a bit
2021-01-18 12:19:08 +00:00
Asger Feldthaus
1ab36dc81f
JS: Flow through *ngFor loops
2021-01-18 12:19:08 +00:00
Asger Feldthaus
29dd8470d5
JS: Fix offset of *ngFor snippet
2021-01-18 12:18:27 +00:00
Asger Feldthaus
0da207a5f9
JS: Update test with pipes
2021-01-18 12:18:27 +00:00
Asger Feldthaus
d80313be4f
JS: Model pipe classes
2021-01-18 12:18:27 +00:00
Asger Feldthaus
debb5691a1
JS: Make PipeRefExpr a SourceNode
2021-01-18 12:18:27 +00:00
Asger Feldthaus
fcb8124376
JS: Expose data flow node for field declaration
2021-01-18 12:18:26 +00:00
Asger Feldthaus
9ee893c9c1
JS: Add data flow steps in Angular2 model
2021-01-18 12:16:13 +00:00
Asger Feldthaus
77fcf3d8a2
JS: Support postfix "!" operator in templates
2021-01-18 12:16:13 +00:00
Asger Feldthaus
c08ba1416d
JS: Add new SourceType for angular templates
2021-01-18 12:16:13 +00:00
Asger Feldthaus
b1d45a6773
JS: Mark angular pipe refs as incomplete
2021-01-18 12:16:13 +00:00
Asger Feldthaus
4b5a861ee6
JS: Add TopLevelKind enum
2021-01-18 12:16:13 +00:00
Asger Feldthaus
9b99f56d44
JS: isAngularTemplateAttributeName
2021-01-18 12:16:13 +00:00
Asger Feldthaus
ed27c8b13f
JS: Add test and fix bug in pipe parser
2021-01-18 12:16:13 +00:00
Asger Feldthaus
16a2a60b9a
JS: Add AngularPipeRef
2021-01-18 12:16:13 +00:00
Asger Feldthaus
928a382ad5
JS: Add parser for angular expressions
2021-01-18 12:16:13 +00:00
Asger Feldthaus
3db6069372
JS: Add test for new sink
2021-01-18 10:55:34 +00:00
Asger Feldthaus
2752b4ba64
JS: Shift line numbers in test
2021-01-18 10:54:39 +00:00
Asger Feldthaus
ff1d0cc4c7
JS: Recognize DomSanitizer from @angular/core
2021-01-18 10:54:27 +00:00
Rasmus Lerchedahl Petersen
66426bf0cc
Python: Add tests for iterable unpacking
...
in for-iterations and comprehensions.
2021-01-18 09:36:13 +01:00
Tamas Vajk
8400a3862b
Add DB upgrade folder
2021-01-18 09:19:27 +01:00
Tamas Vajk
ce58514453
Change release note date
2021-01-18 09:19:27 +01:00
Tamas Vajk
c0b31cbfe7
Add new stats file
2021-01-18 09:19:27 +01:00
Tamas Vajk
f235a28295
C# Add relational patterns extraction
2021-01-18 09:19:27 +01:00
Rasmus Lerchedahl Petersen
175e43d6f2
Python: Slight refactor
2021-01-18 09:12:05 +01:00
Rasmus Lerchedahl Petersen
5f189a7e43
Python: Address reviews
2021-01-15 20:18:37 +01:00
Mathias Vorreiter Pedersen
dcbae8b22b
Fix code tag.
2021-01-15 19:47:09 +01:00
yoff
1edad03622
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-01-15 18:50:04 +01:00
Erik Krogh Kristensen
401e516654
update expected output, and update PackageExports test
2021-01-15 17:40:47 +01:00
intrigus
a4cbd7037b
Java: Add tests for different versions.
...
Adds a test for version 6.24, because that version is not vulnerable.
The other test is for versions < 6.24, because these versions are
vulnerable.
2021-01-15 17:20:57 +01:00
Erik Krogh Kristensen
26783b6ab0
make getTopmostPackageJSON public again, and update PackageExports test
2021-01-15 16:05:49 +01:00
Tom Hvitved
9a9a57716c
C#: Improved extraction of type nullability
2021-01-15 16:01:14 +01:00
Asger Feldthaus
5fa3b17956
JS: Tolerate Angular-specific HTML attribute names
2021-01-15 14:51:10 +00:00
Asger Feldthaus
f33630aab6
JS: Reformat HTMLExtractor
2021-01-15 14:51:10 +00:00
yoff
48910d0597
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-01-15 14:02:27 +01:00
Erik Krogh Kristensen
1506ac09e5
limit the number of characters produced by getAThreewayIntersect
2021-01-15 13:54:16 +01:00
Erik Krogh Kristensen
0117a0fac1
specialize the getAValueExportedBy predicate to only topmost package.jsons
2021-01-15 13:54:16 +01:00
Erik Krogh Kristensen
0c9d46a7f9
changes based on review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-01-15 13:54:05 +01:00
luchua-bc
32c54628f8
Drop fieldName from the function for runtime evaluation
2021-01-15 12:33:00 +00:00
Anders Schack-Mulligen
545451e602
Merge pull request #4960 from github/yo-h/java15-change-note
...
Java: update documentation on supported language versions
2021-01-15 10:19:46 +01:00
Tamás Vajk
81ce29c6c8
Merge pull request #4656 from tamasvajk/feature/csharp9-not-pattern
...
C#: Extract unary patterns
2021-01-15 09:44:53 +01:00
luchua-bc
e5a703e49c
Revamp the query
2021-01-15 04:05:11 +00:00
yo-h
27fd16ae87
Java: update documentation on supported language versions
2021-01-14 20:29:16 -05:00
Tom Hvitved
d7ca065192
Merge pull request #4923 from hvitved/csharp/ssa/refactor
...
C#: SSA refactorings
2021-01-14 17:28:14 +01:00
Geoffrey White
15089c4117
Merge branch 'main' into modelclasses
2021-01-14 15:57:02 +00:00
Geoffrey White
7012bc05a2
C++: Simplification.
2021-01-14 15:21:26 +00:00
Geoffrey White
54bd36def2
C++: Correct QLDoc comments.
2021-01-14 15:20:29 +00:00
Geoffrey White
13d0efe96d
C++: Change to more natural expressions without use of weird predicates or 'any'. The classes for string objects now match instantiations directly rather than the template.
2021-01-14 15:02:51 +00:00
Tom Hvitved
6cf684f615
C#: Fix QL doc
2021-01-14 15:59:22 +01:00
ihsinme
805352945e
Update CompilerRemovalOfCodeToClearBuffers.ql
2021-01-14 17:27:58 +03:00
ihsinme
10ab1d9b54
Update CompilerRemovalOfCodeToClearBuffers.ql
2021-01-14 17:24:49 +03:00
ihsinme
cd0d2a5692
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:21:19 +03:00
ihsinme
7f5e5fcb99
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.qhelp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:19:57 +03:00
ihsinme
3e715ff52d
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.qhelp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:19:23 +03:00
ihsinme
0d0ea0c5e1
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:17:56 +03:00
yoff
b5d40e4c9a
Merge pull request #4944 from RasmusWL/flask-class-based-handlers
...
Python: Add modeling of Flask class based (HTTP) request handlers
2021-01-14 15:17:36 +01:00
ihsinme
4ba4de3d41
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.c
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:17:08 +03:00
ihsinme
76b768f7e0
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.c
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:16:53 +03:00
ihsinme
4631658e5e
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.c
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:16:37 +03:00
ihsinme
9e3b288f33
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.c
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:16:21 +03:00
ihsinme
b26a90e1e6
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:15:58 +03:00
ihsinme
1c4610c722
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-01-14 17:15:36 +03:00
yoff
de8ac6c12d
Merge pull request #4869 from RasmusWL/tornado-source-modeling
...
Python: Add Tornado source modeling
2021-01-14 14:40:14 +01:00
Tamas Vajk
4b32fd0556
Update change note date
2021-01-14 14:29:13 +01:00
Tamas Vajk
b7b4ed8774
Add DB upgrade folder
2021-01-14 14:26:40 +01:00
Erik Krogh Kristensen
c106b09d49
change-note
2021-01-14 14:17:32 +01:00
Tamas Vajk
66d8b0f1a0
Add new .stats file
2021-01-14 14:11:28 +01:00
Erik Krogh Kristensen
c5595f4cbd
improve alert message for js/polynomial-redos
2021-01-14 13:48:26 +01:00
Rasmus Wriedt Larsen
4cb2f2ed1e
Python: Proper models of flask MethodView classes
2021-01-14 13:42:18 +01:00
Rasmus Wriedt Larsen
e327fdb317
Python: Model flask View classes
2021-01-14 13:42:18 +01:00
Rasmus Wriedt Larsen
0b1cece523
Python: Add tests for class based handlers in Flask
2021-01-14 13:42:17 +01:00
Rasmus Wriedt Larsen
14bb10a361
Python: Use LocalSourceNode for TornadoRouteRegex
2021-01-14 13:39:41 +01:00
Erik Krogh Kristensen
86e33d9d79
select the shortest possible reason
2021-01-14 13:38:37 +01:00
Rasmus Wriedt Larsen
f9a29cb886
Python: Add change-note for tornado source modeling
2021-01-14 13:37:27 +01:00
Rasmus Wriedt Larsen
812ea5dde5
Python: Tornado: Model request handlers without known route
2021-01-14 13:37:27 +01:00
Rasmus Wriedt Larsen
1849b9e771
Python: Tornado: Handle basic route setup with tuples
...
The reason this becomes valueable right now, is that we can mark routed params
as taint-sources. Longer down the line, we can (hopefully) detect that a routed
param will only accept digits, and mark it safe for some of our taint-tracking
queries.
2021-01-14 13:37:26 +01:00
Rasmus Wriedt Larsen
39d85896a1
Python: Add basic taint modeling of tornado request
2021-01-14 13:37:26 +01:00
Rasmus Wriedt Larsen
4641150d45
Python: Basic taint-modeling of tornado.web.RequestHandler classes
2021-01-14 13:37:25 +01:00
Rasmus Wriedt Larsen
9cd8a862a0
Python: Expand Tornado tests and add annotations
...
I should probably have split this up into 2 commits, so sorry that didn't happen :|
2021-01-14 13:37:24 +01:00
Rasmus Wriedt Larsen
b4f3399534
Python: Add reverse inheritance test for Tornado
2021-01-14 13:37:24 +01:00
Rasmus Wriedt Larsen
57d08a8523
Python: Rewrite old Tornado tests
...
Now you can run them, and the examples have been adjusted so they actually work!
2021-01-14 13:37:23 +01:00
Rasmus Wriedt Larsen
7db55906b9
Python: Copy old tornado tests
2021-01-14 13:37:22 +01:00
Erik Krogh Kristensen
03d8aeb7b6
refactor PolynomialBackTrackingTerm, to allow getting the pump string and the prefix-message
2021-01-14 13:35:32 +01:00
Tom Hvitved
f5eb131e2d
C#: Address review comments
2021-01-14 12:42:43 +01:00
yoff
c69b776d34
Merge pull request #4864 from RasmusWL/django-request-handler-without-route
...
Python: Model Django request handler without route
2021-01-14 12:06:59 +01:00
Tamás Vajk
fa8e902fe4
Merge pull request #4922 from tamasvajk/feature/fix-finally-cfg-opass
...
C#: Fix expanded assignment lookup in finally blocks for CFG
2021-01-14 11:26:33 +01:00
Tamás Vajk
36a1293156
Merge pull request #4952 from tamasvajk/feature/type-mention-nullable
...
C#: Fix type mention extraction of named types with nullability enabled
2021-01-14 11:25:44 +01:00
Erik Krogh Kristensen
a520a51d42
highlight the use of the regular expression, instead of the sink for user input
2021-01-14 11:22:20 +01:00
Mathias Vorreiter Pedersen
3468593d3a
Merge pull request #4915 from geoffw0/sqltaint
...
C++: Fix FPs in cpp/sql-injection
2021-01-14 11:20:08 +01:00
Erik Krogh Kristensen
e8ea720650
adjust description to not mention user-provided values
2021-01-14 10:36:10 +01:00
Tamas Vajk
48d8ee9166
Fix failing test
2021-01-14 09:47:46 +01:00
Tamas Vajk
927dd514ea
C#: Extract unary patterns
2021-01-14 09:47:46 +01:00
Tamás Vajk
842ed62875
Merge pull request #4927 from tamasvajk/feature/comp-assembly
...
C#: Add output assembly to compilation
2021-01-14 09:45:11 +01:00
CodeQL CI
4229f556cb
Merge pull request #4751 from erik-krogh/logInjection
...
Approved by asgerf, mchammer01
2021-01-14 00:32:46 -08:00
Tamas Vajk
05c858ec2c
C#: Fix expanded assignment lookup in finally blocks for CFG
2021-01-14 08:54:10 +01:00
Tamas Vajk
5803a449be
Add test case for assign operation in finally
2021-01-14 08:39:46 +01:00
Tamas Vajk
ec669c883a
Add DB upgrade folder
2021-01-14 08:25:35 +01:00
Tamas Vajk
5060756a0b
Fix typo in comment
2021-01-14 08:20:45 +01:00
Tamás Vajk
b6107d341b
Merge pull request #4924 from tamasvajk/feature/remove-string-literal-might-throw
...
C#: Remove throw completion from StringLiteral
2021-01-14 08:15:33 +01:00
Rasmus Lerchedahl Petersen
dfdfd3c2b7
Python: FIx flow
2021-01-14 01:19:58 +01:00
Rasmus Lerchedahl Petersen
6dc0d691ac
Python: Final(?!) fix of annotations
2021-01-14 01:06:10 +01:00
Rasmus Lerchedahl Petersen
e3199fbbe2
Python: Fix inconsostencies to fix flow
...
(and fix annotations again)
2021-01-14 00:09:18 +01:00
intrigus-lgtm
b8076481bf
Java: Suggestions from Review
2021-01-13 20:32:23 +01:00
Rasmus Lerchedahl Petersen
36a4a5081e
Python: big refactor and fix tests
...
Make sure tests are valid
Fix wrong test annotations
Big refactor to make code readable
Big comment to explain code
2021-01-13 18:33:08 +01:00
Tamas Vajk
12d602b798
Add new .stats file
2021-01-13 15:46:08 +01:00
Jonas Jensen
5eafe63a82
Merge pull request #4941 from geoffw0/cpp409
...
C++: Test of taint through ConstructorDelegationInit.
2021-01-13 15:06:37 +01:00
Esben Sparre Andreasen
1bc7d68a50
Update javascript/ql/test/query-tests/Security/CWE-730/server-crash.js
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-01-13 14:49:42 +01:00
Esben Sparre Andreasen
12b985be87
Update javascript/ql/src/Security/CWE-730/ServerCrash.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-01-13 14:49:29 +01:00
Anders Schack-Mulligen
f3b8fe2e2e
Java: Add Member.hasQualifiedName.
2021-01-13 13:42:35 +01:00
Tamas Vajk
61b207f067
Rework type mention test
2021-01-13 13:24:48 +01:00
Tamas Vajk
c0e0bd2531
C#: Fix type mention extraction of named types with nullability enabled
2021-01-13 12:58:41 +01:00
Tamas Vajk
c2a4235db8
C#: Add type-mention tests with nullability
2021-01-13 12:55:27 +01:00
ihsinme
3ad45f28c9
Add files via upload
2021-01-13 14:18:54 +03:00
ihsinme
4cee67da75
Add files via upload
2021-01-13 14:17:21 +03:00
Geoffrey White
69664535b0
Merge pull request #4881 from ihsinme/main
...
CPP: Add query for CWE-401 memory leak on unsuccessful call to realloc function
2021-01-13 10:58:09 +00:00
Anders Schack-Mulligen
29935e1388
Merge pull request #4771 from intrigus-lgtm/split-cwe-295
...
Java: Add unsafe hostname verification query and remove existing overlapping query
2021-01-13 11:31:38 +01:00
Erik Krogh Kristensen
c98dacf842
changes based on doc review
2021-01-13 10:38:19 +01:00
Erik Krogh Kristensen
d71adff079
dont sanitize global replacements where the regexp is a char class
2021-01-13 10:12:12 +01:00
Tamas Vajk
fb13126676
C#: Store output assembly in compilation_assembly relation
2021-01-13 09:23:56 +01:00
Tamas Vajk
983c4d06d4
Revert "C#: Add output assembly to compilation"
...
This reverts commit 5cfa900828 .
2021-01-13 09:12:31 +01:00
Tamas Vajk
5cfa900828
C#: Add output assembly to compilation
2021-01-13 09:10:49 +01:00
Tamas Vajk
7418c05594
Always populate assemblies
2021-01-13 09:10:49 +01:00
Rasmus Lerchedahl Petersen
b2d95e617d
Python: Test interaction between nesting,
...
iteration, and conversion
2021-01-13 09:02:56 +01:00
Rasmus Lerchedahl Petersen
b10cf78e17
Python: start handling iterated unpacking
2021-01-13 08:40:47 +01:00
luchua-bc
babe744a30
Add SECURITY_PROTOCOL check
2021-01-13 03:49:08 +00:00
Esben Sparre Andreasen
d591c519a8
JS: reformulate js/server-crash as a path problem
2021-01-13 00:08:28 +01:00
intrigus
5b3086a93a
Java: Fix capitalization of JxBrowser
2021-01-12 22:43:41 +01:00
intrigus
1ebc9f4d93
Java: Only detect JxBrowser < 6.24
2021-01-12 22:39:08 +01:00
Rasmus Lerchedahl Petersen
4ee2f49f38
Python: model conversion during unpacking
2021-01-12 22:19:31 +01:00
Rasmus Lerchedahl Petersen
d8d8b45c6a
Python: add test annotations
2021-01-12 22:03:49 +01:00
Erik Krogh Kristensen
0a17b04650
refactor copy-pasted code into getAnLibraryInputParameter
2021-01-12 20:21:37 +01:00
Erik Krogh Kristensen
eaee5c2d87
add library input as source for js/polynomial-redos
2021-01-12 20:21:33 +01:00
Geoffrey White
3f09a047ae
C++: Test comments.
2021-01-12 14:52:52 +00:00
intrigus
2931e1f3fb
Java: Add change note for #4771
2021-01-12 15:37:45 +01:00
intrigus
1901f6bf55
Java: Make @id @name of query more similar.
2021-01-12 15:36:55 +01:00
intrigus
4fa8f5eab2
Java: Accept test changes
2021-01-12 15:29:03 +01:00
intrigus
b30872806d
Java: Add tests and test stubs.
2021-01-12 14:49:12 +01:00
intrigus
9b3070ab7c
Java: Add JXBrowser disabled certificate query.
2021-01-12 14:48:22 +01:00
Rasmus Wriedt Larsen
2ba7ed4940
Python: Add note about future work for getARequestHandler
2021-01-12 13:32:43 +01:00
Esben Sparre Andreasen
3c9c79a550
JS: remove flow labels from js/resource-exhaustion
2021-01-12 13:20:20 +01:00
Esben Sparre Andreasen
5965035c09
JS: add query js/resource-exhaustion
2021-01-12 13:20:20 +01:00
Rasmus Lerchedahl Petersen
a1ab5cc2b8
Python: start support for nested unpacking
2021-01-12 13:09:12 +01:00
Rasmus Lerchedahl Petersen
9c08467828
Python: add tests for conversion during unpacking
2021-01-12 12:46:51 +01:00
Rasmus Lerchedahl Petersen
4d9f5be2bc
Python: Add more unpacking tests
2021-01-12 12:30:03 +01:00
CodeQL CI
1c8547c897
Merge pull request #4774 from erik-krogh/forms
...
Approved by asgerf
2021-01-12 02:01:38 -08:00
Mathias Vorreiter Pedersen
84f1b11448
Merge branch 'main' into mathiasvp/reverse-read-take-3
2021-01-12 10:37:32 +01:00
Esben Sparre Andreasen
847687974f
JS: only select non-nullable terms in the broken sanitizer
2021-01-12 08:50:19 +01:00
Esben Sparre Andreasen
40cfbab335
JS: address review feedback
2021-01-12 08:49:08 +01:00
ihsinme
bbd3f7631e
Delete test.c
...
sorry i was in a hurry
2021-01-11 23:52:26 +03:00
ihsinme
b92d63d5df
Delete CompilerRemovalOfCodeToClearBuffers.qlref
...
sorry i was in a hurry
2021-01-11 23:51:37 +03:00
ihsinme
05f866e912
Delete CompilerRemovalOfCodeToClearBuffers.expected
...
sorry i was in a hurry
2021-01-11 23:51:18 +03:00
ihsinme
d7a5e61f8e
Delete CompilerRemovalOfCodeToClearBuffers.qhelp
...
sorry i was in a hurry
2021-01-11 23:50:47 +03:00
ihsinme
c38cfcb735
Delete CompilerRemovalOfCodeToClearBuffers.ql
...
sorry i was in a hurry
2021-01-11 23:50:19 +03:00
ihsinme
65ff526eef
Delete CompilerRemovalOfCodeToClearBuffers.c
...
sorry i was in a hurry
2021-01-11 23:49:53 +03:00
ihsinme
ed6d8e3d18
Add files via upload
2021-01-11 23:40:38 +03:00
ihsinme
b185a33157
Add files via upload
2021-01-11 23:39:02 +03:00
Geoffrey White
7409dd015e
C++: Autoformat.
2021-01-11 18:58:32 +00:00
ihsinme
b28444b55c
Update MemoryLeakOnFailedCallToRealloc.ql
...
I thought since there is no work on this PR, I will delete the residual import.
2021-01-11 21:17:49 +03:00
intrigus
85286f362c
Java: Replace global flow by local flow
2021-01-11 19:02:07 +01:00
intrigus-lgtm
722bd4dafa
Java: Revise qhelp
2021-01-11 18:57:24 +01:00
intrigus-lgtm
4cfdb10ddc
Java: Improve QLDoc & simplify code
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-01-11 18:50:43 +01:00
Geoffrey White
1cde5e1828
C++: Test of taint through ConstructorDelegationInit.
2021-01-11 17:35:50 +00:00
CodeQL CI
4bc287e89b
Merge pull request #4933 from madneal/fix-for-predicates
...
Approved by shati-patel
2021-01-11 06:01:33 -08:00
Max Schaefer
f40b406a2d
JavaScript: Address review comments.
2021-01-11 13:53:47 +00:00
Max Schaefer
c9132ca6f8
JavaScript: Refactor trackUseNode to avoid bad join order.
2021-01-11 13:53:47 +00:00
Max Schaefer
7a229d9381
JavaScript: Simplify NoSQL framework modelling.
2021-01-11 13:53:47 +00:00
Max Schaefer
b3ab6efd1d
JavaScript: Remove a bindingset annotation.
2021-01-11 13:53:47 +00:00
Max Schaefer
3853da0969
JavaScript: Teach API-graphs about bound arguments.
2021-01-11 13:53:46 +00:00
Max Schaefer
ecab17a626
JavaScript: Teach API graphs to handle promisify.
...
Following a suggestion by Asger, we track use nodes through calls to `promisify`. When we see a call to a promisified function, we introduce a new synthetic API-graph node representing the callback argument synthesised by the promisification, and track the result of the call to an `await` (or other promise resolution), which is then considered to be a use of the first parameter of the synthetic callback (the zeroth parameter being an error code, which we do not model yet).
2021-01-11 13:53:46 +00:00
madneal
ee3ffa0700
add extra clarifications in the comments
2021-01-11 21:43:24 +08:00
Esben Sparre Andreasen
2dbd762bd9
JS: reintroduce reverted js/server-crash
...
This reverts commit 0a8d15ccc4 .
2021-01-11 14:13:41 +01:00
Mathias Vorreiter Pedersen
59abcd6dae
Merge pull request #4938 from geoffw0/cpp302
...
C++: Tidy up old QL headers
2021-01-11 14:12:16 +01:00
intrigus
5c1e746c96
Java: Rename to EnvReadMethod
2021-01-11 13:42:08 +01:00
intrigus
1eb2b75389
Java: Further reduce FPs, simply Flag2Guard flow
2021-01-11 13:42:08 +01:00
intrigus
b4692734b2
Java: Add QLDoc improve query message
2021-01-11 13:42:08 +01:00
intrigus-lgtm
f4b912cd8a
Apply suggestions from doc review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-01-11 13:42:08 +01:00
intrigus
e11304a1ca
Java: Autoformat
2021-01-11 13:42:08 +01:00
intrigus-lgtm
b8f3e64a0f
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-01-11 13:42:08 +01:00
intrigus
502e4c39f5
Java: Fix Qhelp
2021-01-11 13:42:08 +01:00
intrigus-lgtm
355cb6eeec
Fix Qhelp format
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-01-11 13:42:07 +01:00
intrigus-lgtm
10fc2cf9f8
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-01-11 13:42:07 +01:00
intrigus
c88f07dde4
Java: Accept test output
2021-01-11 13:42:07 +01:00
intrigus
33b0ff28d8
Java: Update test
2021-01-11 13:42:07 +01:00
intrigus
9e2ef9bd74
Java: Filter results by feature flags.
...
This ignores results that are guarded by a feature flag
that suggests an intentionally insecure feature.
Inspired by Go's `InsecureFeatureFlag.qll` and
`DisabledCertificateCheck.ql`.
2021-01-11 13:42:07 +01:00
intrigus
a62a2e58dd
Java: Improve QL-Doc
2021-01-11 13:42:07 +01:00
intrigus
d98b171998
Java: Make EnvTaintedMethod public + QL-Doc
2021-01-11 13:42:07 +01:00
intrigus
e021158b5f
Java: Tighter model of HostnameVerifier#verify
...
This more tightly models `HostnameVerifier#verify` previously it
was possible to accidentally match other methods called `verify`.
2021-01-11 13:42:07 +01:00
intrigus
0a9df07df7
Apply suggestions from review.
2021-01-11 13:42:07 +01:00
intrigus
70b0703952
Java: Remove overlapping code
2021-01-11 13:42:07 +01:00
intrigus
3da1cb0879
Java: Add unsafe hostname verification query
2021-01-11 13:42:07 +01:00
intrigus
8df5d77398
Java: Model HostnameVerifier method
...
Model `HostnameVerifier#setDefaultHostnameVerifier`
2021-01-11 13:42:06 +01:00
Anders Schack-Mulligen
3a2dd8f1ed
Merge pull request #4867 from RasmusWL/java-externalapis-taint-step
...
Java: Fix taint-step handling for untrusted-data-external-api
2021-01-11 13:36:59 +01:00
madneal
4e373aaf29
replace error with errors
2021-01-11 19:38:27 +08:00
Rasmus Wriedt Larsen
7d94bab75e
Merge branch 'main' into django-request-handler-without-route
2021-01-11 12:24:41 +01:00
madneal
e0fc9bac08
add error for shotString
2021-01-11 19:15:22 +08:00
Rasmus Wriedt Larsen
828bb9a902
Python: Small refactor for request param modeling in Django
2021-01-11 11:29:54 +01:00
Esben Sparre Andreasen
580a24e982
JS: rewrite js/incomplete-multi-character-sanitization
2021-01-11 11:26:45 +01:00
Rasmus Wriedt Larsen
141b9adc4d
Python: Minor refactoring
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-01-11 11:18:59 +01:00
Geoffrey White
cf1d1dc5c0
C++: Remove old tags.
2021-01-11 09:31:06 +00:00
Mathias Vorreiter Pedersen
46393c33ef
C++: Fix bad join orders introduced in previous commit.
2021-01-11 09:19:58 +01:00
madneal
1e2487320c
address #4932,fix for errors of Binding behavior
2021-01-09 21:38:25 +08:00
Mathias Vorreiter Pedersen
a00bd7ae02
C++: Respond to review comments.
2021-01-08 19:47:02 +01:00
Geoffrey White
70ce5fde75
C++: Improve metadata for GlobalNamespaceClasses.ql.
2021-01-08 18:27:06 +00:00
Geoffrey White
a6937beee3
Merge branch 'main' into sqltaint
2021-01-08 17:27:43 +00:00
Geoffrey White
7f0209f72e
Merge branch 'main' into modelclasses
2021-01-08 17:11:25 +00:00
Shati Patel
b794fcb841
Merge pull request #4925 from shati-patel/fix-links
...
Fix broken links in CodeQL documentation
2021-01-08 16:35:15 +00:00
Shati Patel
53c46edc1c
Address review comments
2021-01-08 15:20:40 +00:00
Rasmus Wriedt Larsen
00c253a710
Java: Don't ignore local taint steps (fixup)
2021-01-08 15:29:01 +01:00
Anders Schack-Mulligen
e5b4975450
Merge pull request #4675 from luchua-bc/cleartext-storage-shared-prefs
...
Java: Query to detect cleartext storage of sensitive information using Android SharedPreferences
2021-01-08 12:41:34 +01:00
Tamás Vajk
136e5c93d1
Merge pull request #4672 from tamasvajk/feature/extract-anon-types
...
C#: Extract anonymous types explicitly
2021-01-08 11:54:37 +01:00
CodeQL CI
807fc94627
Merge pull request #4921 from erik-krogh/moreShellSan
...
Approved by esbena
2021-01-08 00:58:26 -08:00
Tamas Vajk
800fd94572
Add DB upgrade folder
2021-01-08 08:20:49 +01:00
Tamas Vajk
056dbe31d5
C#: Remove throw completion from StringLiteral
2021-01-08 08:14:08 +01:00
Erik Krogh Kristensen
6423c32990
Update javascript/ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-01-07 22:02:39 +01:00
Shati Patel
cdcb4a9599
Fix redirects from Sphinx linkcheck
2021-01-07 15:45:40 +00:00
Shati Patel
3da66b7fd9
Fix broken links from Sphinx linkcheck
2021-01-07 15:45:28 +00:00
Tamas Vajk
f971f42bb1
Add new stats file
2021-01-07 15:24:10 +01:00
Tamas Vajk
fdf5cf9dd0
C#: Extract anonymous types explicitly
2021-01-07 15:24:10 +01:00
Tom Hvitved
63f76b1b43
C#: Uniform treatment of all SSA definitions
2021-01-07 15:16:44 +01:00
Tom Hvitved
8d77f4bac9
C#: Remove ImplicitUntrackedDefinition
2021-01-07 15:16:39 +01:00
luchua-bc
606d0946fc
Update qldoc
2021-01-07 14:05:12 +00:00
Tamás Vajk
3b16d2689d
Merge pull request #4821 from tamasvajk/feature/csharp9-cil-init-prop
...
C#: Extract init only accessors from CIL
2021-01-07 15:04:40 +01:00
CodeQL CI
c193d9f375
Merge pull request #4823 from erik-krogh/furtherReDoS
...
Approved by esbena
2021-01-07 05:24:07 -08:00
Erik Krogh Kristensen
7eab08511b
add source code examples to blocksCharInAccess
2021-01-07 13:58:26 +01:00
Erik Krogh Kristensen
8b03ab0c01
update docstring for getAShellChar
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-01-07 13:58:26 +01:00
Erik Krogh Kristensen
2aa59a3f8b
support sanitizers that sanitize individual chars in js/shell-command-constructed-from-input
2021-01-07 13:58:25 +01:00
Mathias Vorreiter Pedersen
13a67c906e
Merge pull request #4810 from geoffw0/multtoalloc
...
C++: Query for multiplications used in allocations.
2021-01-07 13:48:58 +01:00
luchua-bc
b54e5b1c49
Revamp the library module
2021-01-07 12:44:59 +00:00
ihsinme
2d6dafc6be
Update MemoryLeakOnFailedCallToRealloc.ql
2021-01-07 15:44:50 +03:00
ihsinme
f378c14659
Update MemoryLeakOnFailedCallToRealloc.expected
2021-01-07 15:43:58 +03:00
ihsinme
592cd284e8
Update test.c
2021-01-07 15:41:31 +03:00
CodeQL CI
7db5a999e9
Merge pull request #4919 from erik-krogh/revertSum
...
Approved by esbena
2021-01-07 03:55:14 -08:00
Tamás Vajk
6cbff13778
Merge pull request #4905 from tamasvajk/fix/attribute-argument-extraction
...
C#: Fix attribute argument extraction
2021-01-07 12:28:43 +01:00
Erik Krogh Kristensen
7e21081b70
add comment about regexp detected by js/polynomial-redos
2021-01-07 12:06:12 +01:00
Alexander Eyers-Taylor
4100973d17
Merge pull request #4914 from alexet/fix-spec-bugs
...
QL Language specification. Fix multiple spec bugs.
2021-01-07 10:56:53 +00:00
Mathias Vorreiter Pedersen
7b003678a9
Merge branch 'main' into mathiasvp/reverse-read-take-3
2021-01-07 11:56:18 +01:00
Tamas Vajk
e00db46d60
Minor code quality improvements
2021-01-07 09:19:13 +01:00
Tom Hvitved
2c09f9a8f2
Merge pull request #4903 from hvitved/csharp/ssa-fast-tc
...
C#: Port SSA performance improvements from Java
2021-01-07 09:17:21 +01:00
Erik Krogh Kristensen
bfd8d1b1e9
Merge branch 'main' into revertSum
2021-01-06 23:04:08 +01:00
ihsinme
abdeaabd77
Update MemoryLeakOnFailedCallToRealloc.ql
2021-01-06 22:46:03 +03:00
ihsinme
2b8227e04d
Update cpp/ql/src/experimental/Security/CWE/CWE-401/MemoryLeakOnFailedCallToRealloc.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-01-06 22:23:46 +03:00
ihsinme
f7eb328f76
Update cpp/ql/src/experimental/Security/CWE/CWE-401/MemoryLeakOnFailedCallToRealloc.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-01-06 22:18:14 +03:00
ihsinme
d7f31ca1a0
Update cpp/ql/src/experimental/Security/CWE/CWE-401/MemoryLeakOnFailedCallToRealloc.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-01-06 22:17:26 +03:00
CodeQL CI
9d4cd0aa85
Merge pull request #4862 from erik-krogh/shellSanitizer
...
Approved by esbena
2021-01-06 11:16:12 -08:00
Geoffrey White
b5bcbd303e
C++: Cleaner solution.
2021-01-06 18:22:31 +00:00
Geoffrey White
f69ceb3dbb
Merge pull request #4904 from MathiasVP/conflated-dataflow-testcases
...
C++: Add dataflow testcases that need flow through conflated memory
2021-01-06 17:48:18 +00:00
luchua-bc
f13b8814f5
Update class/method names in the module
2021-01-06 16:49:35 +00:00
luchua-bc
5690bf49f4
Optimize the query
2021-01-06 16:21:26 +00:00
Alexander Eyers-Taylor
2686335531
Merge pull request #1 from shati-patel/fix-spec-bugs-edits
...
Editorial review for QL language updates
2021-01-06 14:48:26 +00:00
Erik Krogh Kristensen
f1cee70e82
add class-field flowstep to js/shell-command-constructed-from-input
2021-01-06 14:37:00 +01:00
Tamas Vajk
04074c425b
C#: Fix named attribute argument extraction
2021-01-06 14:27:36 +01:00
Tamas Vajk
44372f4db7
C#: Fix attribute argument extraction when default argument value is present
2021-01-06 14:27:36 +01:00
Tamas Vajk
6d95ad3282
C#: Add file instead of generated location for extraction errors when possible
2021-01-06 14:27:31 +01:00
luchua-bc
3d26e5b8a4
Update qldoc
2021-01-06 12:41:00 +00:00
Shati Patel
bc6b1e8ed7
Fix typos and small formatting bugs
2021-01-06 12:11:16 +00:00
Geoffrey White
81205f37c5
C++: Fix test annotation.
2021-01-06 11:45:17 +00:00
Tom Hvitved
74622cf6f3
C#: Fix join-order following stats update
2021-01-06 12:16:19 +01:00
Shati Patel
203d74f255
Remove links to QLDoc spec
2021-01-06 11:04:58 +00:00
Shati Patel
b230868893
Merge pull request #4874 from shati-patel/docs-highlighting
...
Docs: Tweak syntax highlighting
2021-01-06 10:51:01 +00:00
Jonas Jensen
2483b09e44
Merge pull request #4913 from MathiasVP/pre-hook-autoformat-check
...
Add pre-commit hook to scripts folder and document it
2021-01-06 11:26:39 +01:00
Erik Krogh Kristensen
28cffa1e07
add comment in isFork about /(a*)*/ regular expressions
2021-01-06 10:44:13 +01:00
Erik Krogh Kristensen
c58f67b189
reintroduce performance improvement - but sound this time
2021-01-06 10:44:13 +01:00
Erik Krogh Kristensen
4392f0270c
autoformat
2021-01-06 10:37:36 +01:00
Erik Krogh Kristensen
3d98732136
support nested stars in js/ReDoS
2021-01-06 10:37:35 +01:00
Erik Krogh Kristensen
77967c3e63
undo unsound optimization in js/ReDoS
2021-01-06 10:36:21 +01:00
Erik Krogh Kristensen
b42aac17d5
add more tests for js/ReDoS
2021-01-06 10:34:06 +01:00
luchua-bc
f1763ae354
Use the sensitive info sink
2021-01-06 01:48:19 +00:00
Shati Patel
ad07072478
clarify highlight_language conf option
2021-01-05 19:13:28 +00:00
luchua-bc
367ff99909
Change the source to be the request variable
2021-01-05 17:30:19 +00:00
Shati Patel
5a9e098479
Merge pull request #4875 from madneal/htmlComment
...
Html comment
2021-01-05 16:15:57 +00:00
CodeQL CI
60bba5ea42
Merge pull request #4886 from madneal/test-custom-quries
...
Approved by shati-patel
2021-01-05 08:07:12 -08:00
Mathias Vorreiter Pedersen
f18486aa60
Update docs/pre-commit-hook-setup.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-01-05 17:00:23 +01:00
Shati Patel
1c0e94984c
Update docs/codeql/codeql-cli/query-reference-files.rst
2021-01-05 15:50:54 +00:00
Mathias Vorreiter Pedersen
ae388ec796
Update docs/pre-commit-hook-setup.md
...
Co-authored-by: Cornelius Riemenschneider <criemen@github.com >
2021-01-05 16:27:53 +01:00
Mathias Vorreiter Pedersen
11e2bc3b78
Respond to review comments.
2021-01-05 16:21:24 +01:00
alexet
0bd8c55510
Docs: Remove qldoc from the TOC as it no longer exists
2021-01-05 15:10:59 +00:00
Shati Patel
edcd2dd294
Merge pull request #4878 from shati-patel/docs-pullquotes
...
Docs: Change remaining notes to "pull-quote" directives
2021-01-05 14:51:01 +00:00
Shati Patel
2702b65651
Merge pull request #4873 from shati-patel/docs-formatting
...
Docs: Fix CSS for "pull-quotes" and expandable sections
2021-01-05 14:50:45 +00:00
alexet
5d84ecc7f3
QLSpecification: Fix handling of fields to handle overriding properly.
2021-01-05 14:49:02 +00:00
Tamas Vajk
12c28547fc
Fix code review findings
2021-01-05 15:15:13 +01:00
Taus
75cfec863f
Merge pull request #4828 from yoff/yoff-python-add-source-nodes
...
Python: add source nodes
2021-01-05 15:07:51 +01:00
alexet
ebb253e409
QLSpec: Fix typo
2021-01-05 14:01:36 +00:00
alexet
67c2006eb0
QLSpec: Adjust wierd wording
2021-01-05 14:01:36 +00:00
alexet
3db9ad3a97
QLSpec: Prevent int-float transitive closures
2021-01-05 14:01:36 +00:00
alexet
fa8a2c0cce
QLSpec: Fix predicate resolution
2021-01-05 14:01:35 +00:00
alexet
ce905c0d34
QLSpec: Finish specification for fields.
2021-01-05 14:01:31 +00:00
Shati Patel
929c007e5d
Update docs/codeql/ql-language-reference/expressions.rst
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-01-05 13:53:19 +00:00
alexet
82187cb1f6
QLSpec:Link to common mark spec
2021-01-05 12:52:48 +00:00
alexet
2bda26b3df
QLSpec: Make qldoc part of the language.
...
We have treated it this way for a while internally and it corrects for some minor deviations from the spec.
2021-01-05 12:52:42 +00:00
Mathias Vorreiter Pedersen
229ab7623e
- Add pre-commit hook script to misc/scripts
...
- Refer to it in CONTRIBUTING.md
- Add setup note in docs folder
2021-01-05 13:47:30 +01:00
Chris Smowton
e87fd86e63
Merge pull request #4814 from luchua-bc/java/password-in-configuration
...
Java: Password in Java EE configuration files
2021-01-05 11:42:27 +00:00
Geoffrey White
18890c4a77
C++: Use isAdditionalBarrier in the SqlTainted query.
2021-01-05 11:33:39 +00:00
Geoffrey White
69efe7a72a
C++: Add isAdditionalBarrier to DefaultTaintTracking.
2021-01-05 11:32:43 +00:00
CodeQL CI
a5e28ac6d6
Merge pull request #4847 from erik-krogh/afterReDoS
...
Approved by esbena
2021-01-05 01:51:27 -08:00
Anders Schack-Mulligen
26a9ba4aa0
Merge pull request #4898 from JLLeitschuh/feat/JLL/system_get_property
...
Add MethodAccessSystemGetProperty predicate
2021-01-05 10:46:22 +01:00
Jonathan Leitschuh
ba4a562c9a
Update PrintAst.actual with new test output
2021-01-04 23:37:58 -05:00
luchua-bc
195755d687
Revamp the query to be more selective
2021-01-05 00:04:08 +00:00
luchua-bc
496db4b42f
Factor isGetServletMethod into the servlet library
2021-01-04 16:14:13 +00:00
Rasmus Lerchedahl Petersen
8ceb33d3f7
Python: Also restrict StepSumary::step
2021-01-04 16:42:11 +01:00
Geoffrey White
01b204ea30
C++: Add a test case with a tainted integer.
2021-01-04 15:35:18 +00:00
Geoffrey White
7a3f9c7895
C++: Add a test (cleaned up) that was previously in the internal repo.
2021-01-04 15:35:18 +00:00
Jonathan Leitschuh
028e4756bb
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-01-04 10:13:52 -05:00
luchua-bc
c069a5b4c6
Factor private host regex into the networking library and enhance the query
2021-01-04 14:51:32 +00:00
Erik Krogh Kristensen
368603eefa
add change note
2021-01-04 15:23:52 +01:00
Tom Hvitved
7f25efd43f
Merge pull request #4858 from hvitved/csharp/merge-format-queries
...
C#: Merge queries `FormatInvalid.ql`, `FormatMissingArgument.ql`, and `FormatUnusedArgument.ql`
2021-01-04 14:53:34 +01:00
Tom Hvitved
1237e566d0
C#: Fix typo
2021-01-04 12:59:45 +01:00
Erik Krogh Kristensen
ce8cc2368b
improve precision of intersect
2021-01-04 11:55:51 +01:00
Mathias Vorreiter Pedersen
bb158f1857
C++: Add dataflow testcases that need flow through conflated memory.
2021-01-04 11:43:23 +01:00
Tom Hvitved
c1f822c83f
C#: Port SSA performance improvements from Java
2021-01-04 10:18:17 +01:00
Jonas Jensen
86194226e2
Merge pull request #4891 from MathiasVP/get-an-overload-perf-fix
...
C++: Fix join order in getAnOverload
2021-01-04 10:02:59 +01:00
Tom Hvitved
6d973d0103
Merge pull request #4857 from hvitved/csharp/expr-has-value
...
C#: Move `Expr::hasValue()` to `DotNet::Expr`
2021-01-04 10:02:45 +01:00
Mathias Vorreiter Pedersen
134982c5a9
C++: Respond to review comments.
2021-01-04 09:06:58 +01:00
Jonathan Leitschuh
54950c2f42
Add MethodAccessSystemGetProperty predicate
2021-01-01 20:07:45 -05:00
Mathias Vorreiter Pedersen
258d04178f
C++: Replace SkippableInstruction with local flow steps.
2020-12-30 13:39:24 +01:00
Mathias Vorreiter Pedersen
454605b7b1
C++: Fix join order in getAnOverload.
2020-12-30 10:34:26 +01:00
neal1991
380d15eabe
fix for the dead link, #4885
2020-12-28 10:28:50 +08:00
ihsinme
0c7381a3b0
Add files via upload
2020-12-26 20:45:11 +03:00
ihsinme
cd7c47ea39
Add files via upload
2020-12-26 20:43:25 +03:00
luchua-bc
ffe9d4a310
Sensitive GET Query
2020-12-26 16:51:30 +00:00
Shati Patel
8c7245113d
Change ordering of sidebar TOC to match index file
2020-12-23 17:16:56 +00:00
Shati Patel
050b15103e
Convert remaining notes to pull-quote directives
2020-12-23 17:13:24 +00:00
Shati Patel
dc528767f6
Don't turn arrow into ▶ emoji
2020-12-23 16:47:37 +00:00
Shati Patel
ff8e9e6adf
Fix code block in other CodeQL docs
2020-12-23 12:41:46 +00:00
madneal
583395d862
fix LineComment and BlockComment level
2020-12-23 19:49:30 +08:00
neal1991
623de3df41
the level of HTMLHtmlCommentStart and HtmlCommentEnd should be same
2020-12-23 19:18:13 +08:00
Shati Patel
f1d8d9414f
Fix code blocks in QL language reference
2020-12-23 10:49:23 +00:00
Shati Patel
a14f53c02f
Set default highlighting language to "none" globally
...
Otherwise Python is the default
2020-12-23 10:29:10 +00:00
Shati Patel
c2fdb47abe
Docs: Fix CSS for "pull-quotes"
2020-12-23 07:30:11 +00:00
Mathias Vorreiter Pedersen
6545d0b53a
C++: Move conflation check into each disjunct.
2020-12-22 16:56:30 +01:00
Mathias Vorreiter Pedersen
d2d8377e88
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-12-22 16:34:53 +01:00
Erik Krogh Kristensen
44571ffeea
use the full ascii set instead of a few chosen chars
2020-12-22 16:00:23 +01:00
Mathias Vorreiter Pedersen
b95cf94824
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-12-22 15:57:34 +01:00
Erik Krogh Kristensen
303408b774
remove duplicate char
2020-12-22 15:48:24 +01:00
Erik Krogh Kristensen
354954c80c
changes based on review
2020-12-22 15:41:06 +01:00
Mathias Vorreiter Pedersen
ec35e0d518
C++: Respond to review comments.
2020-12-22 15:22:33 +01:00
Rasmus Wriedt Larsen
3094aedf14
Python: Fix regression in ConceptTests
...
I accidentially deleted that line :D
2020-12-22 14:42:53 +01:00
Erik Krogh Kristensen
530a4aea35
Merge branch 'main' into shellSanitizer
2020-12-22 13:57:15 +01:00
Erik Krogh Kristensen
f7f88689c4
use strings in isTypeofGard
2020-12-22 13:55:32 +01:00
CodeQL CI
2bb96369f1
Merge pull request #4868 from erik-krogh/boundShell
...
Approved by esbena
2020-12-22 03:35:42 -08:00
CodeQL CI
7c6b4d7324
Merge pull request #4865 from esbena/js/fix-execa-model
...
Approved by erik-krogh
2020-12-22 03:32:26 -08:00
Rasmus Wriedt Larsen
dc0d940331
Python: Ensure all concept tests ignore irrelevant results
...
Since this was causing a CI error.
also changed things a bit so we do it in a consistent way :)
2020-12-22 11:32:42 +01:00
Rasmus Wriedt Larsen
bc4a0bcbeb
Python: Split request handler / route setup concept tests
...
Not doing so earlier was just a mistake.
2020-12-22 11:31:20 +01:00
Erik Krogh Kristensen
da9a4e5267
add test
2020-12-22 11:22:25 +01:00
Erik Krogh Kristensen
b8b5aef5f4
recognize Object.defineProperty(obj, prop, {get: func}) as a property-write
2020-12-22 11:21:41 +01:00
Erik Krogh Kristensen
6a9089b15e
recognize bound functions in js/shell-command-constructed-from-input
2020-12-22 11:20:34 +01:00
CodeQL CI
67d0f4d938
Merge pull request #4866 from esbena/js/add-tests-for-examples
...
Approved by erik-krogh
2020-12-22 02:04:47 -08:00
Rasmus Wriedt Larsen
874af7637f
Java: Fix taint-step handling for untrusted-data-external-api
...
The previous implementation would not handle any `AdditionalTaintStep`
subclasses.
2020-12-22 11:02:50 +01:00
CodeQL CI
e2bba97794
Merge pull request #4860 from erik-krogh/functionExports
...
Approved by esbena
2020-12-22 01:05:37 -08:00
Erik Krogh Kristensen
df95562f8f
remove TTUndefined from TypeOfSanitizer in js/shell-command-constructed-from-input
2020-12-22 09:43:50 +01:00
CodeQL CI
b35edc9de6
Merge pull request #4732 from github/esbena-patch-4
...
Approved by erik-krogh
2020-12-22 00:42:25 -08:00
Erik Krogh Kristensen
6eb88b9e41
introduce and use TaintTracking::isTypeofGuard
2020-12-22 09:42:12 +01:00
Esben Sparre Andreasen
34a09ff522
JS: add js/conditional-bypass example as a test case
2020-12-22 09:34:25 +01:00
Esben Sparre Andreasen
009527c69c
JS: add change note
2020-12-22 09:26:35 +01:00
Mathias Vorreiter Pedersen
77aa9615c0
C++: Accept test changes in paths.
2020-12-22 09:14:55 +01:00
Mathias Vorreiter Pedersen
fd8034cd8c
C++: Add store step out of read side effects when we don't have a model for the callee. This brings back the lost result on boost.
2020-12-22 09:14:55 +01:00
Mathias Vorreiter Pedersen
a8b4fb6fd0
C++: Add qldoc (and remove predicate that wasn't needed).
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
72a80e3722
C++: Accept test changes.
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
145ab17f6b
Fix a bad join-order caused by the optimizer not seeing that
...
`Node.getEnclosingCallable` is functional. This is fixed in the same way
as in Java's DataFlowUtil: We make create a non-virtual dispatching
`getEnclosingCallableImpl`, and implement `getEnclosingCallable` as a
wrapper that uses the `unique` aggregate to tell the compiler that there
is exactly 1 result.
Tuple numbers from an arbitrarily chosen iteration of
DataFlowImpl3::Stage4::fwdFlow0#fffff.
Before:
4569 ~5% {5} r24 = SCAN DataFlowImpl3::Stage4::fwdFlow#fffff#prev_delta AS I OUTPUT I.<0>, I.<4> 'config', I.<1>, I.<2>, I.<3>
2876 ~1% {5} r25 = JOIN r24 WITH DataFlowImpl3::LocalFlowBigStep::localFlowEntry#ff AS R ON FIRST 2 OUTPUT r24.<2> 'cc', r24.<0>, r24.<3> 'argAp', r24.<4>, r24.<1> 'config'
409404537 ~0% {6} r26 = JOIN r25 WITH DataFlowImplCommon::getLocalCallContext#cpe#12#ff AS R ON FIRST 1 OUTPUT r25.<1>, R.<1>, r25.<0> 'cc', r25.<2> 'argAp', r25.<3>, r25.<4> 'config'
2876 ~0% {6} r27 = JOIN r26 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 2 OUTPUT r26.<0>, true, r26.<5> 'config', r26.<2> 'cc', r26.<3> 'argAp', r26.<4>
79821 ~1781% {5} r28 = JOIN r27 WITH DataFlowImpl3::Stage4::localStep#ffbfff_0241#join_rhs AS R ON FIRST 3 OUTPUT r27.<3> 'cc', r27.<4> 'argAp', r27.<2> 'config', r27.<5> 'ap', R.<3> 'node'
2876 ~0% {5} r29 = JOIN r26 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 2 OUTPUT r26.<4>, r26.<0>, r26.<2> 'cc', r26.<3> 'argAp', r26.<5> 'config'
0 ~0% {5} r30 = JOIN r29 WITH DataFlowImpl3::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r29.<1>, false, r29.<4> 'config', r29.<2> 'cc', r29.<3> 'argAp'
0 ~0% {5} r31 = JOIN r30 WITH DataFlowImpl3::Stage4::localStep#ffbfff_02413#join_rhs AS R ON FIRST 3 OUTPUT r30.<3> 'cc', r30.<4> 'argAp', r30.<2> 'config', R.<4> 'ap', R.<3> 'node'
4569 ~157% {6} r32 = JOIN DataFlowImpl3::Stage4::fwdFlow0#fffff#join_rhs AS L WITH DataFlowImpl3::Stage4::fwdFlow#fffff#prev_delta AS R CARTESIAN PRODUCT OUTPUT R.<3>, L.<0> 'ap', L.<1> 'cc', L.<2> 'argAp', R.<0>, R.<4> 'config'
0 ~0% {5} r33 = JOIN r32 WITH DataFlowImpl3::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r32.<4>, r32.<5> 'config', r32.<1> 'ap', r32.<2> 'cc', r32.<3> 'argAp'
0 ~0% {5} r34 = JOIN r33 WITH DataFlowImpl3::additionalJumpStep#fff_021#join_rhs AS R ON FIRST 2 OUTPUT R.<2> 'node', r33.<2> 'ap', r33.<3> 'cc', r33.<4> 'argAp', r33.<1> 'config'
0 ~0% {5} r35 = JOIN r34 WITH DataFlowUtil::TIRDataFlowNode#f@staged_ext AS R ON FIRST 1 OUTPUT r34.<0> 'node', r34.<1> 'ap', r34.<2> 'cc', r34.<3> 'argAp', r34.<4> 'config'
0 ~0% {6} r36 = JOIN r35 WITH project#DataFlowImpl3::Stage3::revFlow#fffff#12 AS R ON FIRST 1 OUTPUT r35.<1> 'ap', r35.<2> 'cc', r35.<3> 'argAp', r35.<4> 'config', r35.<0> 'node', R.<1>
After:
4569 ~0% {5} r24 = SCAN DataFlowImpl3::Stage4::fwdFlow#fffff#prev_delta AS I OUTPUT I.<0>, I.<4> 'config', I.<1>, I.<2>, I.<3>
2876 ~0% {5} r25 = JOIN r24 WITH DataFlowImpl3::LocalFlowBigStep::localFlowEntry#ff AS R ON FIRST 2 OUTPUT r24.<0>, r24.<2> 'cc', r24.<3> 'argAp', r24.<4>, r24.<1> 'config'
2876 ~0% {6} r26 = JOIN r25 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r25.<1> 'cc', R.<1>, r25.<0>, r25.<2> 'argAp', r25.<3>, r25.<4> 'config'
2876 ~0% {6} r27 = JOIN r26 WITH DataFlowImplCommon::getLocalCallContext#cpe#12#fb AS R ON FIRST 2 OUTPUT r26.<2>, true, r26.<5> 'config', r26.<0> 'cc', r26.<3> 'argAp', r26.<4>
79821 ~1862% {5} r28 = JOIN r27 WITH DataFlowImpl3::Stage4::localStep#ffbfff_0241#join_rhs AS R ON FIRST 3 OUTPUT r27.<3> 'cc', r27.<4> 'argAp', r27.<2> 'config', r27.<5> 'ap', R.<3> 'node'
2876 ~0% {5} r29 = JOIN r26 WITH DataFlowImplCommon::getLocalCallContext#cpe#12#fb AS R ON FIRST 2 OUTPUT r26.<4>, r26.<2>, r26.<0> 'cc', r26.<3> 'argAp', r26.<5> 'config'
0 ~0% {5} r30 = JOIN r29 WITH DataFlowImpl3::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r29.<1>, false, r29.<4> 'config', r29.<2> 'cc', r29.<3> 'argAp'
0 ~0% {5} r31 = JOIN r30 WITH DataFlowImpl3::Stage4::localStep#ffbfff_02413#join_rhs AS R ON FIRST 3 OUTPUT r30.<3> 'cc', r30.<4> 'argAp', r30.<2> 'config', R.<4> 'ap', R.<3> 'node'
4569 ~148% {6} r32 = JOIN DataFlowImpl3::Stage4::fwdFlow0#fffff#join_rhs AS L WITH DataFlowImpl3::Stage4::fwdFlow#fffff#prev_delta AS R CARTESIAN PRODUCT OUTPUT R.<3>, L.<0> 'ap', L.<1> 'cc', L.<2> 'argAp', R.<0>, R.<4> 'config'
0 ~0% {5} r33 = JOIN r32 WITH DataFlowImpl3::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r32.<4>, r32.<5> 'config', r32.<1> 'ap', r32.<2> 'cc', r32.<3> 'argAp'
0 ~0% {5} r34 = JOIN r33 WITH DataFlowImpl3::additionalJumpStep#fff_021#join_rhs AS R ON FIRST 2 OUTPUT R.<2> 'node', r33.<2> 'ap', r33.<3> 'cc', r33.<4> 'argAp', r33.<1> 'config'
0 ~0% {5} r35 = JOIN r34 WITH DataFlowUtil::TIRDataFlowNode#f@staged_ext AS R ON FIRST 1 OUTPUT r34.<0> 'node', r34.<1> 'ap', r34.<2> 'cc', r34.<3> 'argAp', r34.<4> 'config'
0 ~0% {6} r36 = JOIN r35 WITH project#DataFlowImpl3::Stage3::revFlow#fffff#12 AS R ON FIRST 1 OUTPUT r35.<1> 'ap', r35.<2> 'cc', r35.<3> 'argAp', r35.<4> 'config', r35.<0> 'node', R.<1>
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
f5a2603cc1
C++: Add store steps that target the new partial definitions.
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
7a2b69feed
C++: Add partial definition class backed by an IPA.
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
2930128421
C++: Implement read steps using ReadNodes.
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
91debe8669
C++: Add ReadNodes and implement local flow steps into them.
2020-12-22 09:14:54 +01:00
Mathias Vorreiter Pedersen
ba4da72b9e
C++: Add examples that require longer access paths
2020-12-22 09:14:53 +01:00
Esben Sparre Andreasen
ab4f3ea259
JS: fixup for execa.shell and execa.shellSync models
2020-12-22 09:06:18 +01:00
Esben Sparre Andreasen
ba714a1214
JS: add execa.shell tests
2020-12-22 09:01:43 +01:00
Erik Krogh Kristensen
34a6e15426
make TypeOfSanitizer slightly more robost
2020-12-22 08:53:14 +01:00
Erik Krogh Kristensen
18d26cabe5
Update javascript/ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-12-22 08:37:24 +01:00
Jonas Jensen
430194bb66
Merge pull request #4863 from MathiasVP/is-source-on-default-taint-tracking
...
C++: Overridable isSource on DefaultTaintTracking
2020-12-22 08:32:07 +01:00
Mathias Vorreiter Pedersen
4f07474b62
C++: Also allow custom sources in taintedWithoutGlobals
2020-12-21 19:55:47 +01:00
Rasmus Wriedt Larsen
71a6ef5b00
Python: Model RequestHandler from standard library explicitly
2020-12-21 18:02:31 +01:00
Rasmus Wriedt Larsen
05ab6cd54a
Python: Add RemoteFlowSource for django handler without route
...
A bit scary that we don't have any tests to indicate that I forgot to add this :O
2020-12-21 18:02:30 +01:00
Rasmus Wriedt Larsen
d4d6f0ca0c
Python: Model django request handlers without known route
2020-12-21 18:02:22 +01:00
Rasmus Wriedt Larsen
004ff38e22
Python: Add separate RequestHandler concept
...
Since I really want to use our existing infrastructure to model that we can
recognize something as a request handler without it having a route, we need this
as a separate concept. All tests have been adjusted.
The early modeling was based on flask, where all request-handling is based on
handling requests from a specific route. But with the standard library handling
and handlers without routes, the naming had to change.
2020-12-21 17:31:58 +01:00
Mathias Vorreiter Pedersen
f4f96fe257
C++: Use isSource in queries. These were the only queries that restrict the source after dataflow terminates.
2020-12-21 16:35:35 +01:00
Mathias Vorreiter Pedersen
0e84c638b6
C++: Add isSource to AdjustedConfiguration
2020-12-21 16:34:22 +01:00
Rasmus Wriedt Larsen
a9bbe1d087
Python: Test Django un-routed class-based route handler
2020-12-21 16:01:23 +01:00
Erik Krogh Kristensen
876ba7ef2d
add typeof sanitizer to js/shell-command-constructed-from-input
2020-12-21 14:16:55 +01:00
Tom Hvitved
0c78fb2933
Merge pull request #4855 from madneal/fix-for-csharp-docs
...
Fix for csharp docs
2020-12-21 14:11:36 +01:00
Erik Krogh Kristensen
4ef569fbbe
recognize more exported functions in js/shell-command-constructed-from-input
2020-12-21 13:50:22 +01:00
Shati Patel
0a0137bb5e
Merge pull request #4859 from github/shati-patel-patch-1
...
Fix typo in docs title
2020-12-21 12:07:32 +00:00
Erik Krogh Kristensen
e3ec67d5e3
avoid materializing isFeasibleTuple
2020-12-21 12:53:41 +01:00
Jonas Jensen
4308381057
Merge pull request #4846 from MathiasVP/default-taint-tracking-operand-instruction-interleaving
...
C++: Instruction -> Operand interleaving for DefaultTaintTracking
2020-12-21 12:44:06 +01:00
Shati Patel
66b85f1e5e
Fix typo
2020-12-21 11:29:02 +00:00
Neal Caffery
ee0257836f
removed, as it fixed by #4848
2020-12-21 19:05:37 +08:00
Erik Krogh Kristensen
cbad705029
general performance improvements in the ReDoS utility library
2020-12-21 11:49:21 +01:00
Tom Hvitved
591f90f98e
C#: Add change note
2020-12-21 10:26:49 +01:00
Tom Hvitved
b5a1e039a4
C#: Merge queries FormatInvalid.ql, FormatMissingArgument.ql, and FormatUnusedArgument.ql
2020-12-21 10:13:56 +01:00
Tom Hvitved
8d6c69bf74
C#: Move Expr::hasValue() to DotNet::Expr
2020-12-21 09:46:45 +01:00
Mathias Vorreiter Pedersen
06366fa320
Merge pull request #4856 from jbj/gvn-wrapper-test
...
C++: Test the AST wrapper for IR GVN
2020-12-21 09:31:10 +01:00
Tom Hvitved
16aee6e71e
Merge pull request #4842 from hvitved/csharp/format-method-no-insertion-param
...
C#: Recognize format methods without insertion parameters
2020-12-21 09:25:18 +01:00
Jonas Jensen
3236cbd83e
C++: Test the AST wrapper for IR GVN
...
Out of our 3 GVN libraries, the one we actually use in production didn't
have tests -- except indirectly through `diff_ir_expr.ql`.
2020-12-21 08:21:02 +01:00
neal1991
b9d24b8255
fix for issue #4849
2020-12-21 08:54:15 +08:00
neal1991
eac83df40b
fix for issue #4848
2020-12-21 08:52:42 +08:00
luchua-bc
4ec78d04f8
Insecure LDAP authentication
2020-12-21 00:15:15 +00:00
Erik Krogh Kristensen
3a43421193
add missing qhelp
2020-12-19 00:02:42 +01:00
Erik Krogh Kristensen
05569187b4
improve performance of suffix checking
2020-12-18 17:21:15 +01:00
Erik Krogh Kristensen
6369374224
implement new algorithm for detecting superlinear backtracking in regular expressions
2020-12-18 17:21:15 +01:00
Erik Krogh Kristensen
7ce91e9146
introduce cannonical representatives of RegExpTerms to decrease the number of InputSymbols in the NFA
2020-12-18 17:21:11 +01:00
Erik Krogh Kristensen
34dda6d38b
refactor to share predicates between regular expression queries
2020-12-18 16:15:56 +01:00
Rasmus Wriedt Larsen
49f902d28b
Merge pull request #4757 from yoff/python-dataflow-synthetic-callables
...
Python: Enclosing callable for synthetic arguments
2020-12-18 16:06:26 +01:00
yoff
a08eb99778
Merge pull request #4779 from RasmusWL/django-class-based-handlers
...
Python: Add modeling of django class based view handlers
2020-12-18 15:58:51 +01:00
Anders Schack-Mulligen
5106d5df53
Merge pull request #4833 from luchua-bc/java-broken-crypto-algorithms
...
Java: Add missing broken crypto algorithms
2020-12-18 15:12:29 +01:00
Rasmus Wriedt Larsen
3e6296c7b8
Python: Fix grammar in QLDoc
2020-12-18 14:54:14 +01:00
Rasmus Wriedt Larsen
ed11e8f916
Python: Simplify predicate implementation
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-12-18 14:52:20 +01:00
Mathias Vorreiter Pedersen
b5102043b1
Fix comments.
2020-12-18 14:19:02 +01:00
Chris Smowton
de4cdda839
Merge pull request #4841 from smowton/smowton/admin/mergeback-126-2020-12-16
...
Mergeback rc/1.26
2020-12-18 12:59:06 +00:00
Mathias Vorreiter Pedersen
f5e4725642
C++: Propagate flow from instruction's to non-exact operands for arrays and unions, and accept test changes.
2020-12-18 13:54:34 +01:00
Rasmus Lerchedahl Petersen
e6e1cc2398
Python: Remember to accept failing tests
2020-12-18 13:38:14 +01:00
Rasmus Lerchedahl Petersen
712765c185
Python: Use ImportExp instead of SSA nodes
...
This also reverts the previous commit.
It should be squashed with that one, but for now we keep the history,
so we can track the performance tests.
2020-12-18 13:30:24 +01:00
Erik Krogh Kristensen
b2116dc5b4
add more tests for polynomial/exponential redos
2020-12-18 13:19:17 +01:00
Mathias Vorreiter Pedersen
2bf8e47932
Merge branch 'main' into default-taint-tracking-operand-instruction-interleaving
2020-12-18 11:59:10 +01:00
Mathias Vorreiter Pedersen
7ccd48e53c
Make DefaultTaintTracking do operand->instruction->operand interleaving like DataFlowUtil.
2020-12-18 11:57:16 +01:00
Geoffrey White
dc4ca9b1b9
C++: Add qhelp and example.
2020-12-18 10:10:05 +00:00
Tom Hvitved
d53faa86dc
C#: Restrict FormatInvalid.ql and UncontrolledFormatString.ql to calls with insertions
2020-12-18 10:53:11 +01:00
Rasmus Lerchedahl Petersen
0629d3e6e7
Python: Enclosing callable for synthetic arguments
2020-12-18 10:45:24 +01:00
Rasmus Lerchedahl Petersen
a16d58dfc0
Python: Add tests cases with synthetic arguments
2020-12-18 10:41:42 +01:00
Jonas Jensen
fd7dec7f20
Merge pull request #4824 from geoffw0/modelchanges5
...
C++: Add cases in the Allocation model.
2020-12-18 09:16:01 +01:00
Tamas Vajk
8e8c3a9ded
Add change note
2020-12-18 09:15:33 +01:00
Tamas Vajk
6fd1f0049d
Add DB upgrade folder
2020-12-18 09:10:55 +01:00
yoff
39acc9a40b
Merge pull request #4735 from RasmusWL/python-untrusted-flow
...
Python: Untrusted data used in external APIs
2020-12-18 00:15:08 +01:00
yoff
9dd6439e3c
Merge pull request #4749 from RasmusWL/command-injection-tests
...
Python: Add some command injection tests
2020-12-17 23:36:06 +01:00
yoff
8a44405365
Merge pull request #4827 from RasmusWL/reword-qldoc-for-type-tracking-classes
...
Python: Reword QLDoc for class modeling with type-tracking
2020-12-17 23:28:19 +01:00
Tamas Vajk
8eeab8fdd0
Add new stats file
2020-12-17 21:22:58 +01:00
Tamas Vajk
f3a0d1d138
Add test to list all custom modifiers extracted from IL
2020-12-17 15:43:41 +01:00
Tamas Vajk
7662b55ecc
C#: Extract init only accessors and custom modifiers
2020-12-17 15:43:41 +01:00
luchua-bc
bfb138d415
Update qldoc
2020-12-17 14:42:14 +00:00
Tom Hvitved
7a132149a2
C#: Add change note
2020-12-17 15:39:01 +01:00
Tom Hvitved
fe559c190e
C#: Recognize format methods without insertion parameters
2020-12-17 15:39:01 +01:00
Geoffrey White
fda531da49
C++: Add query precision.
2020-12-17 14:31:43 +00:00
luchua-bc
7b44ee50ea
Revamp the functions to have a string parameter
2020-12-17 14:26:13 +00:00
Tamas Vajk
57c163f314
C#: Add test for CIL setter extraction
2020-12-17 15:23:33 +01:00
Tamás Vajk
45893ab084
Merge pull request #4775 from tamasvajk/feature/cil-attribute-decoding2
...
C#: Improve CIL attribute decoding
2020-12-17 15:20:44 +01:00
Tamás Vajk
65c58edbed
Merge pull request #4617 from tamasvajk/feature/csharp9-implicit-obj-creation
...
C#: Extract 'ImplicitObjectCreationExpressionSyntax'
2020-12-17 15:20:13 +01:00
Tamas Vajk
f12befdcd0
Add extra test for collection initialization
2020-12-17 13:49:02 +01:00
luchua-bc
b44f01a87b
Enhance the check for embedded passwords
2020-12-17 03:47:38 +00:00
luchua-bc
bed8a68d28
Exclude broken algorithms from the list of secure algorithms
2020-12-17 00:41:23 +00:00
Aditya Sharad
a79f1e145b
Merge pull request #4832 from github/docs/add-favicon
...
[docs] Add GitHub favicon to CodeQL docs
2020-12-16 13:29:32 -08:00
Chris Smowton
faa08c10e0
Merge branch 'rc/1.26' of https://github.com/github/codeql into smowton/admin/mergeback-126-2020-12-16
2020-12-16 21:08:20 +00:00
James Fletcher
7bfc2853cb
Merge pull request #4839 from github/docs/css-fixes-126
...
[CodeQL docs] Fix two CSS bugs (rc/1.26)
2020-12-16 18:10:18 +00:00
James Fletcher
58f17d79c2
Merge pull request #4838 from github/docs/css-fixes
...
[CodeQL docs] Fix two CSS bugs
2020-12-16 16:44:59 +00:00
james
6c430ce0c7
align list items correctly
2020-12-16 16:41:27 +00:00
james
686eca9adf
fix footnote spacing
2020-12-16 16:41:27 +00:00
Geoffrey White
136fa01b87
C++: Query headers (apart from precison - needs more research).
2020-12-16 16:24:10 +00:00
Geoffrey White
1e3535754b
C++: Violation message.
2020-12-16 16:13:02 +00:00
james
ff123f8e78
align list items correctly
2020-12-16 15:58:12 +00:00
Geoffrey White
2210344f4d
C++: Add a test.
2020-12-16 15:44:53 +00:00
james
256460dddc
fix footnote spacing
2020-12-16 15:31:25 +00:00
Tamas Vajk
1bc65a68df
Address PR review comments
2020-12-16 16:12:11 +01:00
Geoffrey White
c89f7d824b
C++: Back out support for SysAllocString. It turns out supporting all of the SysAlloc stuff is beyond our current models, supporting just SysFreeString as we do is OK.
2020-12-16 15:08:53 +00:00
CodeQL CI
41ef7a3fce
Merge pull request #4733 from erik-krogh/args
...
Approved by esbena
2020-12-16 06:51:26 -08:00
CodeQL CI
287954e0d8
Merge pull request #4686 from erik-krogh/buildFp
...
Approved by esbena
2020-12-16 06:42:41 -08:00
Erik Krogh Kristensen
94e07bb91c
add change note
2020-12-16 15:10:03 +01:00
Erik Krogh Kristensen
99af484042
move the "commander" source
2020-12-16 15:05:59 +01:00
luchua-bc
6b77922a25
Fix typo and update qldoc
2020-12-16 14:04:45 +00:00
Erik Krogh Kristensen
2ae0400922
update docstring for dashdash
2020-12-16 15:00:44 +01:00
Erik Krogh Kristensen
3d03e7192c
Update javascript/ql/src/semmle/javascript/security/dataflow/IndirectCommandInjectionCustomizations.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-12-16 14:57:20 +01:00
Erik Krogh Kristensen
d377a02825
add change note
2020-12-16 14:53:23 +01:00
James Fletcher
8b6c53cbb5
Merge pull request #4830 from owen-mc/update-go-supported-frameworks
...
Update supported Go frameworks
2020-12-16 10:07:48 +00:00
Jonas Jensen
406cc64dcc
Merge pull request #4831 from geoffw0/printfunknown
...
C++: Fix Printf.qll specsAreKnown
2020-12-16 10:56:56 +01:00
james
1a7ca1d3d2
add favicon to query help and support projects
2020-12-16 09:29:26 +00:00
CodeQL CI
9ae8880bd0
Merge pull request #4802 from max-schaefer/js/external-remote-flow-sources
...
Approved by asgerf, jf205
2020-12-16 00:34:40 -08:00
luchua-bc
d7facb42d6
Add missing broken crypto algorithms
2020-12-16 04:32:11 +00:00
james
c26ae246b3
correct path to favicon on docs landing page
2020-12-15 20:24:29 +00:00
james
f8d8082cf3
add github favicon
2020-12-15 19:34:56 +00:00
Geoffrey White
93dfeac3c8
C++: Make specsAreKnown more accurate.
2020-12-15 17:43:28 +00:00
Geoffrey White
676e85a155
C++: Re-enable the check.
2020-12-15 17:42:10 +00:00
Geoffrey White
94dea9f71d
C++: Add a test of unknown format specifiers (with specsAreKnown check disabled).
2020-12-15 17:40:32 +00:00
Tamas Vajk
8fd409898a
Add new stats file
2020-12-15 18:34:47 +01:00
Owen Mansel-Chan
1d3d4ed4bf
Update supported Go frameworks
2020-12-15 17:04:32 +00:00
Max Schaefer
cf5891487d
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-12-15 15:56:05 +00:00
Max Schaefer
f8d8a9b356
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-12-15 15:44:19 +00:00
james
7e3feb4f52
add beta note and tweak intro text
2020-12-15 15:35:28 +00:00
james
4720e6cd3b
typo
2020-12-15 15:26:07 +00:00
Rasmus Lerchedahl Petersen
638fcab12d
Python: Allow path from non-sourceNodes
...
This is against the philosophy, but we
have still restricted attributes.
We use this PR to test performance.
2020-12-15 15:35:16 +01:00
Rasmus Wriedt Larsen
8df186167e
Python: Reword QLDoc for class modeling with type-tracking
...
As discussed in https://github.com/github/codeql/pull/4797#discussion_r542423387
2020-12-15 15:15:03 +01:00
yoff
be5dbf2ccf
Merge pull request #4797 from RasmusWL/stdlib-http-source-modeling
...
Python: Model sources from stdlib HTTP servers
2020-12-15 14:49:32 +01:00
Tamas Vajk
3cf967458f
Fix failing test
2020-12-15 14:28:51 +01:00
james
99a634d2c2
add introduction to article
2020-12-15 12:11:29 +00:00
Tamas Vajk
adba961634
Add DB upgrade folder
2020-12-15 13:10:53 +01:00
Tamas Vajk
6cf3ca49e4
C#: Extract 'ImplicitObjectCreationExpressionSyntax'
2020-12-15 13:10:53 +01:00
Tom Hvitved
8c235323e7
Merge pull request #4796 from hvitved/csharp/cfg/simplify
...
C#: Various simplifications to CFG logic
2020-12-15 13:07:13 +01:00
Mathias Vorreiter Pedersen
9265e9ec3f
Merge pull request #4822 from geoffw0/swap
...
C++: Bring 'swap' models together.
2020-12-15 12:45:43 +01:00
Rasmus Wriedt Larsen
050e720770
Python: Minor rewrite
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-12-15 12:02:56 +01:00
Rasmus Wriedt Larsen
272feedb69
Merge branch 'main' into stdlib-http-source-modeling
2020-12-15 11:59:23 +01:00
Rasmus Wriedt Larsen
ed53742f03
Python: Fix additional taint-steps for cgi
...
So there isn't flow from *any* instance to *any* access of the methods,
but only from the _actual_ instance where the method is accessed.
2020-12-15 11:41:00 +01:00
Max Schaefer
00f244c1d4
JavaScript: Add documentation about new way of adding remote flow sources.
2020-12-15 10:16:20 +00:00
Geoffrey White
4bf2f3af50
C++: Fix comment.
2020-12-15 10:15:41 +00:00
Rasmus Lerchedahl Petersen
e64af59667
Merge branch 'main' of github.com:github/codeql into tausbn-python-add-source-nodes
2020-12-15 11:13:35 +01:00
Rasmus Lerchedahl Petersen
a152833a51
Merge branch 'python-add-source-nodes' of https://github.com/tausbn/codeql into tausbn-python-add-source-nodes
2020-12-15 11:13:02 +01:00
Tamás Vajk
e391356893
Merge pull request #4630 from tamasvajk/feature/csharp9-init-prop
...
C#: Add support for init only accessors
2020-12-15 11:12:32 +01:00
Geoffrey White
d7a92e581f
Merge branch 'main' into swap
2020-12-14 17:54:11 +00:00
Geoffrey White
9c77d3c829
C++: Add AliasFunction model.
2020-12-14 17:52:02 +00:00
Geoffrey White
f9a7322d68
C++: Remove redundant check.
2020-12-14 17:16:16 +00:00
luchua-bc
523f0fb247
Enhance the query and update qldoc
2020-12-14 17:01:30 +00:00
Tamas Vajk
74c88e6bac
Add DB stats
2020-12-14 17:16:29 +01:00
Geoffrey White
e02ebfb9bd
C++: Add extra cases to Allocation / Deallocation.
2020-12-14 14:00:36 +00:00
Geoffrey White
899d1ab6d8
C++: Add tests of strdup (and variants) as allocators.
2020-12-14 13:50:11 +00:00
Rasmus Wriedt Larsen
ceaaac217e
Merge pull request #4798 from yoff/python-reflected-xss-fp-examples
...
Python: Add example FP for reflected XSS
2020-12-14 13:56:24 +01:00
CodeQL CI
0420ac7aac
Merge pull request #4820 from RasmusWL/add-pymysql-modeling
...
Approved by yoff
2020-12-14 03:04:24 -08:00
CodeQL CI
90dbb60c7f
Merge pull request #4819 from RasmusWL/pep249-execute-on-connection
...
Approved by yoff
2020-12-14 03:04:08 -08:00
Rasmus Wriedt Larsen
daf418624e
Python: Make all PEP249 implementations private
...
Since we're still sticking with `private by default` at least for a while longer.
2020-12-14 10:57:51 +01:00
Rasmus Wriedt Larsen
31d4ea77cb
Python: Add modeling of PyMySQL
2020-12-14 10:56:47 +01:00
Rasmus Wriedt Larsen
e7b6400e48
Python: Add tests for PyMySQL
2020-12-14 10:55:01 +01:00
CodeQL CI
66f4120cdd
Merge pull request #4721 from github/nextReDoS
...
Approved by asgerf
2020-12-14 01:48:12 -08:00
Tom Hvitved
bb637f666c
C#: Introduce CfgScope class and generalize ControlFlowTree to include callables
2020-12-14 10:38:39 +01:00
Rasmus Wriedt Larsen
8d8e92eb09
Python: Model execute on a DB connection
2020-12-14 10:33:10 +01:00
Rasmus Wriedt Larsen
18f7dbe865
Python: Adjust PEP249 QLDocs
2020-12-14 10:26:17 +01:00
Tom Hvitved
a92404a6cd
C#: Add LabeledStmtTree for goto CFG edges
2020-12-14 09:58:54 +01:00
Tom Hvitved
06d42dac3e
C#: Use set literals in Splitting.qll
2020-12-14 09:58:54 +01:00
Tom Hvitved
0b2233155c
C#: Simplify CFG logic for finally blocks
2020-12-14 09:58:53 +01:00
Tom Hvitved
249eea9d2b
Merge pull request #4780 from hvitved/csharp/cfg/nested-finally
...
C#: Add missing CFG edges for nested `finally` blocks
2020-12-14 09:57:36 +01:00
luchua-bc
d469e9b24e
Format the code and minor text change
2020-12-13 21:15:18 +00:00
luchua-bc
e27ccd0a81
Format the code and update qldoc
2020-12-13 02:33:03 +00:00
James Fletcher
ca80f04726
Merge pull request #4808 from github/jf205-patch-2
...
Add `workflow_dispatch` to `generate-query-help-docs.yml`
2020-12-12 13:45:51 +00:00
Max Schaefer
be35e85639
JavaScript: Add change note.
2020-12-12 11:42:55 +00:00
Max Schaefer
9f8508fdc7
JavaScript: Allow specifying additional remote flow sources through JSON.
2020-12-12 11:42:55 +00:00
luchua-bc
7ba237120b
Password in Java EE configuration files
2020-12-12 05:15:04 +00:00
CodeQL CI
9ff6d68a9b
Merge pull request #4778 from asgerf/js/more-prototype-pollution
...
Approved by erik-krogh, mchammer01
2020-12-11 13:58:09 -08:00
Robert Marsh
af180d430e
Merge pull request #4805 from geoffw0/sscanf
...
C++: Refine examples and tests for cpp/memory-unsafe-function-scan (experimental) query
2020-12-11 12:42:11 -08:00
james
a5c0802379
address review comments
2020-12-11 17:29:22 +00:00
James Fletcher
e5ef0e35df
Merge pull request #4813 from github/replace-language
...
[docs] Fix find and replace error
2020-12-11 17:16:43 +00:00
james
b9c8818da5
update landing page
2020-12-11 16:27:56 +00:00
james
bc3f7b61fb
fix find and replace error
2020-12-11 14:47:40 +00:00
yoff
9bec9b46e1
Merge pull request #4801 from RasmusWL/sqlite3-support
...
Python: Add sqlite3 support
2020-12-11 13:30:24 +01:00
Tamas Vajk
1b50c2277f
Add DB upgrade folder
2020-12-11 11:24:53 +01:00
Tamas Vajk
4318941009
C#: Add support for init only accessors
2020-12-11 10:06:38 +01:00
Robert Marsh
0210c1f721
Merge pull request #4783 from geoffw0/modelchanges4
...
C++: More use of set literals.
2020-12-10 15:24:50 -08:00
Geoffrey White
b79ca4535a
C++: Undo the iterator.qll change. Notice that it was 'and' not 'or'.
2020-12-10 18:29:39 +00:00
Geoffrey White
c5592a1ed7
C++: New experimental query.
2020-12-10 16:46:09 +00:00
James Fletcher
9c6962ec25
Update generate-query-help-docs.yml
2020-12-10 09:39:44 +00:00
James Fletcher
0640d2834d
Update generate-query-help-docs.yml
2020-12-10 09:19:44 +00:00
James Fletcher
66c756b7f5
Update generate-query-help-docs.yml
2020-12-10 09:07:30 +00:00
Tamas Vajk
a7451a12fc
Fix attribute test after rebase
2020-12-09 21:24:21 +01:00
Tamas Vajk
f50cdf5ac7
Add logging to missing underlying enum type
2020-12-09 21:04:12 +01:00
Tamas Vajk
8e6e4189b3
Add logging to attribute decoding failures
2020-12-09 21:04:12 +01:00
Tamas Vajk
db426c1ffe
C#: Extract generic types in CIL attribute extraction
2020-12-09 21:04:12 +01:00
Tamas Vajk
56eb04fe6d
C#: Improve attribute argument (type, enum) decoding in CIL extraction
2020-12-09 21:04:12 +01:00
Tamas Vajk
0c0ef772c1
Add method to get qualified name of CIL extraction types
2020-12-09 21:00:39 +01:00
Tamas Vajk
d270aa2281
C#: Extract ID writing logic to separate class
2020-12-09 21:00:39 +01:00
Tamas Vajk
fc5f6c5203
C#: Fix ID of TypeReferenceType for top level classes
2020-12-09 21:00:39 +01:00
Tamas Vajk
332a64a6ca
Fix erroneous refactorings
2020-12-09 21:00:39 +01:00
Tamas Vajk
151379edd8
C#: Cleanup CIL extraction 'Type' classes
2020-12-09 21:00:39 +01:00
Tamás Vajk
b649ccd880
Merge pull request #4761 from tamasvajk/feature/cil-enum-underlying
...
C#: Extract enum underlying type from IL
2020-12-09 20:55:37 +01:00
Geoffrey White
3bef0e5c00
C++: Implement a general model.
2020-12-09 18:53:49 +00:00
yo-h
f95c480b51
Merge pull request #4799 from joefarebrother/xxe-fp
...
Java: Fix false positive in the XXE query
2020-12-09 12:08:20 -05:00
Geoffrey White
209191bb24
C++: Add another good example.
2020-12-09 16:55:07 +00:00
Geoffrey White
80db155d54
C++: Fix example and test.
2020-12-09 16:46:48 +00:00
Joe Farebrother
732542adcb
Add change note
2020-12-09 16:41:31 +00:00
James Fletcher
48a9521df9
Merge pull request #4803 from github/rename-js-dataflow-article
...
Update JavaScript dataflow guide filename to match article title
2020-12-09 15:39:19 +00:00
james
70c5ce41c2
rename js-ts article
2020-12-09 14:49:58 +00:00
Max Schaefer
0ccfe4f135
JavaScript: Teach autobuilder to include codeql-javascript-*.json files.
2020-12-09 11:35:51 +00:00
Rasmus Wriedt Larsen
36e8ef53eb
Python: Model sqlite3 as SQL interface
2020-12-09 11:36:18 +01:00
Rasmus Wriedt Larsen
767a246edc
Python: Add sqlite3 test
2020-12-09 11:36:17 +01:00
Asger F
ed729a1963
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2020-12-09 09:59:55 +00:00
Asger Feldthaus
fd293d07d7
JS: Address doc review
2020-12-09 09:58:52 +00:00
Geoffrey White
d08efb4e47
C++: Combine the member swap models.
2020-12-08 19:50:13 +00:00
Geoffrey White
4a81d36309
C++: Move all of the swap models into Swap.qll.
2020-12-08 18:19:43 +00:00
Geoffrey White
e18f290864
C++: Correct comment.
2020-12-08 16:55:19 +00:00
Joe Farebrother
24dc631a8f
Java: Fix false positive in XXE query
2020-12-08 16:38:42 +00:00
Joe Farebrother
2fd5d26b1b
Add FP as a test case
2020-12-08 16:37:53 +00:00
Rasmus Lerchedahl Petersen
a757a69f36
Python: Add example FP
2020-12-08 17:02:05 +01:00
Tamas Vajk
2257a8d47e
Add change notes
2020-12-08 16:43:16 +01:00
Tamas Vajk
2d2b919651
Add DB upgrade folder
2020-12-08 16:43:16 +01:00
Tamas Vajk
52a73cb21b
Add new stats containing 'cil_enum_underlying_type'
2020-12-08 16:40:29 +01:00
Tamás Vajk
6dd0234b68
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-12-08 16:40:29 +01:00
Tamas Vajk
214cc90af5
Fix failing test
2020-12-08 16:40:29 +01:00
Tamas Vajk
44dfafc52c
C#: remove 'System.Enum' from enums in QL
2020-12-08 16:40:29 +01:00
Tamas Vajk
6b3010e3e6
C#: Extract enum underlying type from IL
2020-12-08 16:40:29 +01:00
Tamas Vajk
c7d6c42851
C#: Add underlying enum type test for CIL extraction
2020-12-08 16:40:29 +01:00
Tamás Vajk
ec573b517f
Merge pull request #4759 from tamasvajk/feature/cil-attribute-array
...
C#: Improve array argument CIL extraction for attributes
2020-12-08 16:38:36 +01:00
Tamás Vajk
cbcae667a8
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-12-08 15:23:13 +01:00
yoff
3bddb946b7
Merge pull request #4773 from RasmusWL/path-injection-improvements
...
Python: Path injection improvements
2020-12-08 14:05:53 +01:00
Rasmus Wriedt Larsen
fabc6fb7d9
Python: Add change-note
2020-12-08 14:04:46 +01:00
Rasmus Wriedt Larsen
ba1ca70858
Python: Add source modeling of stdlib HTTPRequestHandlers
2020-12-08 14:04:15 +01:00
Rasmus Wriedt Larsen
34863721f0
Python: Model cgi.FieldStorage
2020-12-08 14:03:13 +01:00
Rasmus Wriedt Larsen
43688715f5
Python: Add test of stdlib HTTP server facilities
...
Just a port of the old tests, except for the fact that I learned
`cgi.FieldStorage()` _should_ be tainted when not specifying any arguments. (and
moved taint-test to own function)
Also clarified how imports of all the .*HTTPRequestHandler works in Python2
2020-12-08 14:01:55 +01:00
James Fletcher
2b5d12143c
Merge pull request #4795 from github/126-mergeback
...
Merge `rc/1.26` into `main`
2020-12-08 11:21:28 +00:00
Rasmus Wriedt Larsen
976559889f
Python: Reword qhelp text
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-12-08 11:34:44 +01:00
Rasmus Wriedt Larsen
fba16d24de
Python: Bring back Path Injection query
...
Which was accidentially removed when resolving a merge conflict.
2020-12-08 11:26:04 +01:00
james
da16fad0f1
Merge branch 'rc/1.26' into 126-mergeback
2020-12-08 09:26:12 +00:00
James Fletcher
a165d2e559
Merge pull request #4790 from github/link-fixes
...
Fix links to CodeQL library pages
2020-12-08 09:16:55 +00:00
Tom Hvitved
f8ad2ecc2c
Merge pull request #4777 from hvitved/csharp/default-to-string-join
...
C#: Improve join-order in `DefaultToString.qll`
2020-12-08 08:53:58 +01:00
Geoffrey White
ef131d3951
C++: Fix StandardDeallocationFunction.
2020-12-07 18:52:35 +00:00
Geoffrey White
281b56b2ae
C++: Add comments to the Allocation and Deallocation libraries indicating where the functions come from.
2020-12-07 18:52:03 +00:00
james
38085b27c3
evven more python link fixes
2020-12-07 18:14:09 +00:00
james
7f79b28a11
c++ link fixes
2020-12-07 18:09:10 +00:00
james
2c385f7121
java link fixes
2020-12-07 18:09:00 +00:00
james
915d640274
more python links
2020-12-07 18:05:21 +00:00
james
eabfeca514
fix python links
2020-12-07 18:04:51 +00:00
Rasmus Wriedt Larsen
e5e8ec6ecc
Python: Add a few test-cases for barrier guards and references
...
I'm not sure references is the best name, but it's the best I could come up with
jsut now
2020-12-07 15:27:20 +01:00
Rasmus Wriedt Larsen
5aa2c2f9d4
Python: Add command injection regex restricted FP
2020-12-07 15:26:56 +01:00
Rasmus Wriedt Larsen
32b547b3f2
Python: Add example of bad command injection sanitizer
2020-12-07 15:26:55 +01:00
Rasmus Wriedt Larsen
8444654117
Python: Adjust whitespace in command injection test
2020-12-07 15:26:54 +01:00
James Fletcher
ebdb3e25aa
Merge pull request #4768 from github/query-and-library-links
...
Update query and library links for new locations
2020-12-07 12:47:24 +00:00
CodeQL CI
8129d0c0ac
Merge pull request #4762 from asgerf/js/template-sinks-in-code-injection
...
Approved by erik-krogh, mchammer01
2020-12-07 04:35:11 -08:00
Cornelius Riemenschneider
354adf363e
Merge pull request #4787 from github/RasmusWL-patch-1
...
C++: Minor test README fixes
2020-12-07 12:42:55 +01:00
Asger Feldthaus
04f51bef5e
JS: Add missing qldoc
2020-12-07 10:52:38 +00:00
Rasmus Wriedt Larsen
9e7d5b3a9c
C++: Minor test README fixes
2020-12-07 11:52:18 +01:00
Asger Feldthaus
f96c425a72
JS: Deny -> block
2020-12-07 10:50:01 +00:00
Asger Feldthaus
254ac7f963
JS: Fix TypeofCheck
2020-12-07 10:46:00 +00:00
Tom Hvitved
6a55a22f18
Merge pull request #4781 from hvitved/csharp/persisten-cookie-tests
...
C#: Add tests for `PersistentCookie.ql`
2020-12-07 11:37:16 +01:00
Asger Feldthaus
0496642b0b
JS: Add test for captured flow into callback
2020-12-07 10:34:27 +00:00
Asger Feldthaus
355cfaaf42
JS: Autoformat
2020-12-07 10:16:39 +00:00
Asger Feldthaus
1b0bec9143
JS: Remove magic from barrier guard predicates
2020-12-07 10:16:39 +00:00
Asger Feldthaus
fe86465a0b
JS: Refactor store/load flow a bit
2020-12-07 10:16:38 +00:00
Asger Feldthaus
f132b4a279
JS: Add type confusion sink for prototype pollution checks
2020-12-07 10:16:38 +00:00
Asger Feldthaus
e10a22ec26
JS: Restrict size of some predicates
2020-12-07 10:16:38 +00:00
Asger Feldthaus
daab3c1437
JS: Add tests and fix some bugs
2020-12-07 10:16:38 +00:00
Asger Feldthaus
0a7513fdfb
JS: Move and rename test cases as well
2020-12-07 10:16:38 +00:00
Asger Feldthaus
479dcf56ad
JS: Update to use more inclusive language
2020-12-07 10:16:38 +00:00
Asger Feldthaus
544b3d9631
JS: Change note
2020-12-07 10:16:38 +00:00
Asger Feldthaus
e42ca881a3
JS: Update security suite after move to CWE-915
2020-12-07 10:16:38 +00:00
Asger Feldthaus
ca38a1c8b9
JS: Update CWE tags
2020-12-07 10:16:38 +00:00
Asger Feldthaus
25161ed338
JS: Move all prototype pollution queries to CWE-915
2020-12-07 10:16:38 +00:00
Asger Feldthaus
877b4b0752
JS: Move and rename other prototype pollution queries
2020-12-07 10:16:38 +00:00
Asger Feldthaus
972c4d61e5
JS: Add PrototypePollutingAssignment
2020-12-07 10:16:38 +00:00
Asger Feldthaus
ef52c46aed
JS: Add spread step in TaintedObject
2020-12-07 10:16:37 +00:00
Sauyon Lee
b5ec26d935
Merge pull request #4744 from github/sauyon/html-refactor
...
JavaScript: Factor out HTML extractor
2020-12-07 02:06:42 -08:00
Sauyon Lee
17e450f227
JavaScript: Factor out HTML extractor
2020-12-06 05:04:10 -08:00
Tom Hvitved
3531dde032
C#: Simplify FinallySplit::toString()
2020-12-05 20:16:11 +01:00
Tom Hvitved
2f1057383e
C#: Add missing CFG edges for nested finally blocks
2020-12-05 20:12:11 +01:00
Geoffrey White
998eaf90ee
C++: Run through updated autoformat.
2020-12-04 18:53:24 +00:00
James Fletcher
45a4d5beb9
Update docs/codeql/codeql-language-guides/abstract-syntax-tree-classes-for-working-with-go-programs.rst
2020-12-04 17:15:51 +00:00
james
d0a2582673
remove mention of odasa from javascript article
2020-12-04 17:15:51 +00:00
james
d19d23cc5e
typo on landing page
2020-12-04 17:15:51 +00:00
james
f3642fcec2
fix indentation in cpp table
2020-12-04 17:15:51 +00:00
James Fletcher
1486aef5e1
Update docs/codeql/_templates/layout.html
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-12-04 17:15:50 +00:00
james
0316c673f8
add docs landing page to sphinx project
2020-12-04 17:09:21 +00:00
james
ac2d621558
update search settings in docs template
2020-12-04 17:08:26 +00:00
james
18fc33c78c
update links to codeql cli manual
2020-12-04 17:08:26 +00:00
james
f659e6c9df
fix table in go article
2020-12-04 17:08:26 +00:00
james
e346b479d2
update links in banner
2020-12-04 17:08:26 +00:00
james
5d717a53fa
fix some table formatting and update some links
2020-12-04 17:08:26 +00:00
james
b62d01a74f
update links to query help and libraries landing pages
2020-12-04 17:08:26 +00:00
james
8c4c6501ee
update links to standard library reference pages
2020-12-04 17:08:26 +00:00
Jonas Jensen
bc340e210b
Merge pull request #4745 from ihsinme/main
...
CPP: Add query for CWE-191 into experimental this reveals a dangerous comparison
2020-12-04 18:00:41 +01:00
yo-h
54d7cac46d
Merge pull request #4718 from aschackmull/java/cleanup-deprecated
...
Java: Remove some deprecated classes.
2020-12-04 11:17:14 -05:00
yo-h
a5393b4661
Merge pull request #4746 from aschackmull/java/ssa-perf
...
Java: Improve performance of SSA.
2020-12-04 11:16:39 -05:00
Tom Hvitved
5d73566859
C#: Add tests for PersistentCookie.ql
2020-12-04 17:14:00 +01:00
Tamás Vajk
4226467556
Merge pull request #4678 from tamasvajk/feature/external-api-untrusted-data
...
C#: Add queries to check untrusted data flow to external APIs
2020-12-04 15:03:09 +01:00
Rasmus Wriedt Larsen
608ce50399
Python: Expose HTTP verbs in HTTP concept
...
Let's discuss whether doing it this way is reasonable, since I'm not 100% sure
whether this fits into "concepts" or not.
2020-12-04 14:04:56 +01:00
Rasmus Wriedt Larsen
c7ab78f8c2
Python: Add modeling of django class based view handlers
...
BUT, since MyCustomViewBaseClass.post (django-v2-v3/testapp/views.py) and
Foo.post (django-v2-v3/routing_test.py) aren't handled, this raises important
question about how to do MRO without points-to :S
2020-12-04 14:03:59 +01:00
Cornelius Riemenschneider
2ea9b4a62b
Merge pull request #4719 from geoffw0/issue84
...
C++: Create tests readme.
2020-12-04 13:49:56 +01:00
Tamas Vajk
aa3ae0f567
Remove calls to deprecated predicates
2020-12-04 13:28:14 +01:00
Jonas Jensen
9cf318b72c
C++: Autoformat the new query
...
Tweak whitespace, also in the alert message.
2020-12-04 13:27:07 +01:00
Rasmus Wriedt Larsen
4ead118a31
Python: Add class based route handler in django tests
...
Disabled CSRF middleware for now, since it blocked my debugging curl POST requests :(
2020-12-04 13:27:01 +01:00
Tamas Vajk
d55fbc8a05
Add test cases for safe API calls
2020-12-04 13:26:53 +01:00
Tamas Vajk
24670160c2
Address code review findings
2020-12-04 13:26:53 +01:00
Tamas Vajk
cd5c1f06ee
C#: Add queries to check untrusted data flow to external APIs
2020-12-04 13:26:53 +01:00
Tom Hvitved
9afce31e92
C#: Add one more CFG test for nested finally blocks
2020-12-04 13:26:00 +01:00
Jonas Jensen
bf88df8134
C++: CRLF -> LF line endings
2020-12-04 13:25:32 +01:00
Tom Hvitved
37f32f4014
C#: Improve join-order in DefaultToString.qll
2020-12-04 13:05:53 +01:00
Rasmus Wriedt Larsen
ffdbecfbb7
Python: Simplify getARouteHandler for Django
2020-12-04 11:29:52 +01:00
CodeQL CI
0f5f0ed99e
Merge pull request #4776 from asgerf/js/electron-openshell
...
Approved by erik-krogh
2020-12-04 09:12:44 +00:00
Asger F
22dbaf28ab
Merge pull request #4709 from asgerf/js/typescript-4.1
...
JS: Support for TypeScript 4.1
2020-12-04 09:10:14 +00:00
Asger Feldthaus
f0516dd9e0
JS: Address review comments
2020-12-04 09:07:44 +00:00
Jonas Jensen
b4be72268d
Merge pull request #4722 from rdmarsh2/rdmarsh2/cpp/range-analysis-overflow-perf
...
C++: Filter out lower bounds on overflowing exprs
2020-12-04 08:29:21 +01:00
ihsinme
69ed608a11
Update UnsignedDifferenceExpressionComparedZero.ql
2020-12-04 09:47:11 +03:00
Robert Marsh
b45f7846db
C++: autoformat
2020-12-03 15:48:42 -08:00
Erik Krogh Kristensen
cc98c41dd6
revert marking repetitions with possibly empty body as forks
2020-12-03 20:08:07 +01:00
Geoffrey White
13d9d5dc45
C++: Use [,] more in general.
2020-12-03 18:50:43 +00:00
Geoffrey White
2a4fba0ff9
C++: Use [,] more in models.
2020-12-03 17:27:31 +00:00
Erik Krogh Kristensen
47488f86b5
update test
2020-12-03 16:58:08 +01:00
Erik Krogh Kristensen
3bad75dae5
better support for forms in js/xss-through-dom
2020-12-03 16:57:41 +01:00
Asger Feldthaus
20d9848f07
JS: Add test case
2020-12-03 15:08:43 +00:00
Asger Feldthaus
68d2bc861d
JS: Update test expectations
2020-12-03 15:01:50 +00:00
Asger Feldthaus
e66a49bea6
JS: Change note
2020-12-03 13:58:40 +00:00
Asger Feldthaus
ec6b8d6d3a
JS: Remove old workaround for template literals in import
2020-12-03 13:58:40 +00:00
Asger Feldthaus
757398f5fd
JS: Add upgrade script and stats
2020-12-03 13:58:39 +00:00
Asger Feldthaus
3b3052d792
JS: Autoformat
2020-12-03 13:58:39 +00:00
Asger Feldthaus
5676891e44
JS: Add TemplateLiteralTypeExpr
2020-12-03 13:58:39 +00:00
Asger Feldthaus
9da5c5cc70
JS: Update to TypeScript 4.1.2
2020-12-03 13:58:39 +00:00
Asger F
254072dd6d
Merge pull request #4546 from toufik-airane/main
...
JS: Add ElectronShellOpenExternalSink class for Electron framework security
2020-12-03 13:20:46 +00:00
Rasmus Wriedt Larsen
a9ce067e15
Python: Add examples of Path Injection FPs seen
...
Not quite sure how to deal with these cases of safe if UNIX-only, otherwise not
safe.
If/when we actually try to deal with these, we also need to figure that
out. We _could_ split this queyr into 3: (1) for path injection on any
platform, (2) path injection on windows, (3) path injection on UNIX. Then
UNIX-only projects could disable the path-injection on windows query. -- that's
my best idea, if you have better ideas, DO tell 👍
2020-12-03 13:41:55 +01:00
Rasmus Wriedt Larsen
e8f63311ac
Python: Model abspath and realpath (for Path Injection)
2020-12-03 13:41:54 +01:00
Rasmus Wriedt Larsen
bd5cf80352
Python: Add Path Injection tests for realpath and abspath
...
Not supported currently
2020-12-03 13:41:53 +01:00
Rasmus Wriedt Larsen
e53ed478ab
Python: Highlight os.path.join behavior with absolute paths
2020-12-03 13:41:52 +01:00
Rasmus Wriedt Larsen
4d9f24a24c
Python: Rewrite path injection tests
...
To match how you would normally structure your application code. In itself not
that important, but makes it easier to add more tests :)
2020-12-03 13:41:26 +01:00
Tamás Vajk
3eb55ddc0b
Merge pull request #4704 from tamasvajk/feature/stats2
...
C#: Update DB stats file
2020-12-03 13:13:43 +01:00
Mathias Vorreiter Pedersen
1142a79ad5
Merge pull request #4766 from criemen/cleanup-flow-tests
...
C++: Cleanup data/taint flow tests
2020-12-03 10:10:39 +01:00
CodeQL CI
edbbc846d0
Merge pull request #4753 from max-schaefer/js/more-nosql-query-args
...
Approved by asgerf, mchammer01
2020-12-03 08:46:47 +00:00
Tamás Vajk
04bacf4347
Merge pull request #4760 from tamasvajk/feature/cil-debug-build
...
C#: Fix CIL trap file writing in debug mode
2020-12-02 22:08:22 +01:00
Aditya Sharad
2484941330
Merge pull request #4770 from github/adityasharad/rc/pin-sphinx-version
...
Actions: Pin to fixed version of Sphinx Action
2020-12-02 10:41:36 -08:00
Aditya Sharad
771425e860
Actions: Run query help workflow on PRs that modify it
2020-12-02 10:00:55 -08:00
Aditya Sharad
38ab87e5b1
Actions: Pin to fixed version of Sphinx Action
...
Better for security to fix the commit SHA of the external Action, rather than specifying a branch or tag.
2020-12-02 09:56:25 -08:00
James Fletcher
91c96ada4f
Merge pull request #4550 from github/query-help-tests
...
[docs] Add new process to generate query help for help site
2020-12-02 17:46:39 +00:00
CodeQL CI
e266cedc84
Merge pull request #4700 from RasmusWL/python-add-code-injection-FP
...
Approved by tausbn
2020-12-02 16:29:21 +00:00
CodeQL CI
6017f25106
Merge pull request #4740 from RasmusWL/fix-json-modeling
...
Approved by tausbn
2020-12-02 16:29:00 +00:00
Mathias Vorreiter Pedersen
e0a9e2dca7
Merge pull request #4754 from geoffw0/modelchanges3
...
C++: Expose more information in FormattingFunction and make subclasses private.
2020-12-02 17:12:55 +01:00
Geoffrey White
4322b214c6
C++: Link to standards.
2020-12-02 15:57:38 +00:00
Geoffrey White
420d47b676
Apply suggestions from code review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2020-12-02 15:54:28 +00:00
Tamas Vajk
ba56993396
C#: Fix CIL trap file writing in debug mode
2020-12-02 16:52:33 +01:00
Tamas Vajk
d140b0121a
C#: Improve array argument CIL extraction for attributes
2020-12-02 16:51:45 +01:00
Tamas Vajk
636ff2d76e
C#: Add CIL attribute tests
2020-12-02 16:51:45 +01:00
Tamás Vajk
6e6cd05787
Merge pull request #4758 from tamasvajk/feature/cil-structure-change
...
C#: Cleanup CIL extraction structure
2020-12-02 16:49:31 +01:00
Rasmus Wriedt Larsen
19d334c577
Merge pull request #4767 from tausbn/python-update-change-notes-for-1.26
...
Python: Update change notes for 1.26
2020-12-02 16:49:15 +01:00
Geoffrey White
d20619d779
Merge branch 'main' into modelchanges3
2020-12-02 14:45:54 +00:00
Cornelius Riemenschneider
feb05542d2
C++: Refactor common implementation of data/taint flow tests.
2020-12-02 15:42:52 +01:00
Anders Schack-Mulligen
0cc324b715
Merge pull request #3839 from luchua-bc/uncaught-servlet-exception
...
Java: Uncaught servlet exception
2020-12-02 15:12:59 +01:00
Asger Feldthaus
412939d071
JS: Autoformat
2020-12-02 13:08:32 +00:00
Taus Brock-Nannestad
d08b25c65c
Python: Update change notes for 1.26
2020-12-02 14:01:46 +01:00
Anders Schack-Mulligen
0175a596ef
Update java/ql/src/experimental/Security/CWE/CWE-600/UncaughtServletException.ql
2020-12-02 13:33:59 +01:00
Taus
9eeaceac2a
Merge pull request #4739 from RasmusWL/recrete-regex-fp
...
Python: Add regex FP with + for flags
2020-12-02 13:01:47 +01:00
Tom Hvitved
ecfa66e19a
C#: Use getParentNamespace instead of getParent
2020-12-02 10:39:29 +01:00
Mathias Vorreiter Pedersen
203bbdd84f
Merge pull request #4741 from criemen/port-dataflow-tests
...
C++: Port dataflow tests to inline expectations test library.
2020-12-02 10:25:52 +01:00
Tom Hvitved
9c516bf62c
C#: Fix join-order in UselessUpcast.ql
2020-12-02 10:12:57 +01:00
Cornelius Riemenschneider
f3a7d87d46
C++: Remove vscode snippets.
2020-12-02 09:30:10 +01:00
Arthur Baars
7f485dfe70
Merge pull request #4763 from github/yo-h/java15-merge
...
Java: adjust test options for JDK 15 upgrade
2020-12-02 05:15:10 +01:00
yo-h
cdeeefc235
Merge commit '8f2094f' into yo-h/java15-merge
2020-12-01 17:47:58 -05:00
Robert Marsh
8c1f15b261
C++: refactor getLowerBoundsImpl for perfomance
2020-12-01 14:42:37 -08:00
James Fletcher
2140a03c2e
Merge pull request #4756 from github/folder-restructure
...
[Docs] Review folder restructure
2020-12-01 22:00:10 +00:00
Cornelius Riemenschneider
239588b5e0
C++: Remove MISSING annotations for tests that are already correct.
2020-12-01 19:41:24 +01:00
Geoffrey White
39a939c36f
C++: Update change note.
2020-12-01 18:34:01 +00:00
Cornelius Riemenschneider
7700e87cca
C++: Address review.
2020-12-01 19:08:49 +01:00
Cornelius Riemenschneider
5b1ab86ac6
C++: Port DefaultTaintTracking tests to inline expectations test.
2020-12-01 19:00:45 +01:00
Asger Feldthaus
5561e8f1f6
JS: Delete old query and update qhelp
2020-12-01 17:05:48 +00:00
Asger Feldthaus
6211fe718b
JS: Add test
2020-12-01 17:05:48 +00:00
Asger Feldthaus
1459d9197d
JS: Adjust alert message for template sinks
2020-12-01 17:05:48 +00:00
Asger Feldthaus
8412a6bcbb
JS: Add template injection sinks to js/code-injection
2020-12-01 17:05:48 +00:00
Geoffrey White
7c00477736
C++: Combine getOutputParameterIndex and isOutputStream.
2020-12-01 16:27:30 +00:00
Geoffrey White
c9c159ad0b
C++: Autoformat.
2020-12-01 15:37:26 +00:00
Geoffrey White
799b932c17
C++: Restore QLDoc on deprecated predicates.
2020-12-01 15:21:06 +00:00
Tamas Vajk
9ab930f812
C#: Remove marker interfaces from CIL extraction
2020-12-01 16:06:13 +01:00
Tamas Vajk
df28544020
C#: Separate all classes to dedicated files in CIL extractor
2020-12-01 15:20:02 +01:00
james
65a048b65c
address docs review comments
2020-12-01 14:19:12 +00:00
Tom Hvitved
9dbcb7c642
C#: Improve various join orders
2020-12-01 15:16:33 +01:00
Tom Hvitved
931e695ac7
C#: Fix bad join-order in UselessTypeTest.ql
2020-12-01 15:16:00 +01:00
Tamas Vajk
dffd95cb85
Add nomagic to fix performance
2020-12-01 15:16:00 +01:00
Tamas Vajk
cf76d31161
C#: Add nomagic pragmas to fix performance issues
2020-12-01 15:16:00 +01:00
Tamas Vajk
b20a08dbac
C#: Update DB stats file
2020-12-01 15:16:00 +01:00
James Fletcher
f7fe7c03b8
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-12-01 13:42:53 +00:00
Mathias Vorreiter Pedersen
df29a16365
Merge pull request #4748 from aschackmull/autoformat-callchain
...
C++/C#/Java/JavaScript/Python: Autoformat.
2020-12-01 13:21:19 +01:00
james
5002968e86
restructure codeql docs
2020-12-01 12:00:37 +00:00
Calum Grant
9897a81a5c
Merge pull request #4677 from jbj/largeVariable-overflow
...
C++: Decrease largeVariable cut-off to 100k
2020-12-01 11:54:17 +00:00
Geoffrey White
79f32b0e26
C++: Autoformat.
2020-12-01 10:51:51 +00:00
Tom Hvitved
e86db3c7a1
Merge pull request #4725 from hvitved/csharp/cfg/constant-condition-block
...
C#: Always create basic blocks for nodes with a conditional predecessor
2020-12-01 10:03:17 +01:00
Erik Krogh Kristensen
c50951cbae
add missing qldoc
2020-12-01 09:48:35 +01:00
Erik Krogh Kristensen
afbb921c7e
add change note
2020-12-01 09:18:40 +01:00
Erik Krogh Kristensen
9a31ed13ac
add test case
2020-12-01 09:18:40 +01:00
Erik Krogh Kristensen
dea2eb5443
simplify the logging sink - using the new API-graph logging models
2020-12-01 09:18:40 +01:00
Erik Krogh Kristensen
6f29a877fa
move logInjection out of experimental
2020-12-01 09:18:40 +01:00
Erik Krogh Kristensen
f6c358861c
convert logging models to use API-graphs
2020-12-01 09:18:36 +01:00
Geoffrey White
9c277b3cb1
C++: Fix a small bug in the ArrayFunction model for FormattingFunction.
2020-11-30 17:55:25 +00:00
Geoffrey White
510bce36f1
C++: Change note.
2020-11-30 17:55:24 +00:00
Geoffrey White
b52ddbfc42
C++: Implement isOutputStream, isOutputString for UserDefinedFormattingFunction as well.
2020-11-30 17:55:24 +00:00
Geoffrey White
c3b16a5fd2
C++: Implement FormattingFunction isOutputStream, isOutputString so that subclasses don't need to be accessed for this information, and can be private.
2020-11-30 17:55:23 +00:00
Rasmus Wriedt Larsen
a08e1db601
Python: Remove leftover note to self in qhelp file
2020-11-30 17:44:18 +01:00
Cornelius Riemenschneider
659e3d46e3
C++: Add vscode snippets for Inline Expectations test.
2020-11-30 17:34:02 +01:00
Cornelius Riemenschneider
0d0fa1b341
C++: Delete difference tests.
2020-11-30 17:33:27 +01:00
Cornelius Riemenschneider
b632ca40b4
C++: Port dataflow/taint-tests to inline expectations test.
2020-11-30 17:32:54 +01:00
Max Schaefer
978d2db252
JavaScript: Add models for more Mongoose methods.
2020-11-30 16:32:13 +00:00
Geoffrey White
99b01e7d36
C++: Additional test case for FormattingFunction.
2020-11-30 15:25:51 +00:00
Rasmus Lerchedahl Petersen
289b9e62f9
Python: Add read step for unpacking assignment
2020-11-30 15:30:14 +01:00
James Fletcher
4d8983830e
Merge pull request #4734 from github/sd-263
...
[Docs] Add missing introduction text and improve sidebar toc
2020-11-30 14:06:21 +00:00
Anders Schack-Mulligen
8f2094f0bf
Autoformat.
2020-11-30 14:42:38 +01:00
Rasmus Wriedt Larsen
94e90aac39
Python: Only one Unit implementation
...
Conflict arose since the Unit in DataFlowPrivate was added in a merged PR.
The behavior from this PR will make it match what java does (931322e4c5/java/ql/src/semmle/code/Unit.qll )
2020-11-30 14:41:47 +01:00
Rasmus Wriedt Larsen
1eac1995a9
Merge branch 'main' into python-untrusted-flow
2020-11-30 14:38:52 +01:00
Rasmus Lerchedahl Petersen
f345e55951
Python: Adjust test expectations
2020-11-30 14:21:30 +01:00
Rasmus Lerchedahl Petersen
673ff901fb
Python: Test for unpacking assignment
2020-11-30 14:18:22 +01:00
Anders Schack-Mulligen
88e0759365
Java: Change RemoteUserInput to private instead of removing.
2020-11-30 13:40:53 +01:00
Rasmus Wriedt Larsen
8b2c34e267
Merge pull request #4747 from yoff/python-path-injection-doc
...
Python: Fix documentation for path injection.
2020-11-30 13:17:59 +01:00
James Fletcher
509d153b61
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-11-30 12:12:10 +00:00
Rasmus Lerchedahl Petersen
fd8c696b67
Python: Fix documentation for path injection.
2020-11-30 12:24:35 +01:00
Anders Schack-Mulligen
5a66d6ab93
Java: Improve performance of SSA.
2020-11-30 11:26:03 +01:00
Rasmus Wriedt Larsen
4ab3fff973
Python: Fix untrusted data to external API example
...
The hmac.digest function was only added in python 3.7, so obviously doesn't work
on Python 2
2020-11-30 10:42:30 +01:00
Anders Schack-Mulligen
931322e4c5
Merge pull request #4668 from aschackmull/dataflow/refactor-pruning
...
Dataflow: Refactor pruning stages.
2020-11-30 09:37:04 +01:00
Pavel Avgustinov
74af41c76d
Merge pull request #4357 from RasmusWL/design-patterns
...
Add docs on CodeQL Design Patterns
2020-11-30 08:19:15 +00:00
yo-h
7e8bc4a61b
Merge commit '2fa9037' into yo-h/java15-merge
2020-11-29 18:42:20 -05:00
Erik Krogh Kristensen
33b2701551
refine isFork to remove false positive when a state has epsilon transition to itself
2020-11-29 21:42:50 +01:00
ihsinme
d088d5b0f3
CPP: Add query for CWE-191
...
into experimental this reveals a dangerous comparison
2020-11-28 15:52:00 +03:00
Erik Krogh Kristensen
d7b22e3b1b
update expected output for PolynomialBackTracking
2020-11-27 20:15:27 +01:00
Erik Krogh Kristensen
729073fb43
detect ReDoS when the choices are "match some string" or "match Epsilon"
2020-11-27 20:15:23 +01:00
Geoffrey White
905b04a6fb
C++: Model classes in StdString.qll.
2020-11-27 19:12:01 +00:00
Rasmus Wriedt Larsen
cbfcfdf883
Python: Fix UntrustedDataToExternalAPI.qhelp
2020-11-27 17:54:22 +01:00
luchua-bc
ad0ac5b874
Change kind to problem
2020-11-27 16:43:57 +00:00
Rasmus Wriedt Larsen
faa5c220c5
Design Patterns: Add advice on abstract classes
2020-11-27 17:38:56 +01:00
Rasmus Wriedt Larsen
452417509f
Design Patterns: Reword advice on imports of subclasses
...
I had totally overlooked the fact that this doesn't only apply to abstract
classes.
2020-11-27 17:38:40 +01:00
Cornelius Riemenschneider
644a0fac98
C++: Port dataflow/dataflow-tests to inline expectations test library.
2020-11-27 16:03:15 +01:00
Rasmus Wriedt Larsen
a0c7365ae6
Python: Proper models of json.loads and json.dumps
2020-11-27 15:57:56 +01:00
Tom Hvitved
d4ee8cdd18
C#: Always create basic blocks for nodes with a conditional predecessor
2020-11-27 15:08:33 +01:00
Rasmus Wriedt Larsen
014fbfa86b
Python: Add regex FP with + for flags
...
Notice that there is no new results for line 54
I also added a test for the short-named version of a flag, just since I didn't
see any of those already. That just works out of the box (due to points-to).
2020-11-27 14:57:11 +01:00
yoff
346a007bf6
Merge pull request #4720 from RasmusWL/python-better-open-models
...
Python: better models of `open` function
2020-11-27 14:47:10 +01:00
Anders Schack-Mulligen
028a72bcdd
Merge pull request #4610 from luchua-bc/java-nfe-local-android-dos
...
Java: Query to detect Local Android DoS caused by NFE
2020-11-27 14:20:23 +01:00
Erik Krogh Kristensen
46ca56458a
introduce a printable state class
2020-11-27 13:45:41 +01:00
Erik Krogh Kristensen
8a3e87fe42
remove unnecessary one-step inline
2020-11-27 13:45:41 +01:00
Erik Krogh Kristensen
36b9f0254e
performance improvements for suffix check in js/redos
2020-11-27 13:45:41 +01:00
Erik Krogh Kristensen
e177d46c0a
add two test cases that demonstrate the limits of the suffix construction
2020-11-27 13:45:34 +01:00
Rasmus Wriedt Larsen
e6319e5d84
Python: Rewrite StringConstCompare to use IterableNode
2020-11-27 13:37:03 +01:00
Rasmus Wriedt Larsen
098f8c4f21
Python: Add IterableNode
...
I'm specifically not using an abstract class, since that is an anti-pattern:
https://github.com/github/codeql/pull/4357#discussion_r520526275 (I'm still
trying to wrap my head fully aroudn this)
2020-11-27 13:36:55 +01:00
Tamás Vajk
2fa9037934
Merge pull request #4738 from tamasvajk/feature/revert-relational-pattern
...
C#: Revert "Merge pull request #4653 from tamasvajk/feature/csharp9-relational-pattern"
2020-11-27 13:30:33 +01:00
Rasmus Wriedt Larsen
33e46e168f
Python: Add QLDoc for SetNode
2020-11-27 13:29:16 +01:00
james
4cea019cee
add/improve intro text and add links to example queries
2020-11-27 12:26:42 +00:00
Tamas Vajk
998e2de2c6
Revert "Merge pull request #4653 from tamasvajk/feature/csharp9-relational-pattern"
...
This reverts commit 5e75a4109c , reversing
changes made to c751c516bf .
2020-11-27 12:23:38 +01:00
Anders Schack-Mulligen
fec9758252
Dataflow: Sync.
2020-11-27 12:16:43 +01:00
Anders Schack-Mulligen
8f4fce185b
Dataflow: Review fixes.
2020-11-27 12:16:28 +01:00
Rasmus Wriedt Larsen
cc9a7fe4fe
Python: Move BarrierGuards to own file
2020-11-27 12:09:57 +01:00
Geoffrey White
a94f244659
Merge pull request #4736 from jbj/downgrade-to-recommendations
...
C++: Downgrade two queries to recommendation
2020-11-27 10:58:20 +00:00
CodeQL CI
d3cded330e
Merge pull request #4693 from RasmusWL/python-add-import-test-shadowing-stdlib-v2
...
Approved by tausbn
2020-11-27 10:32:21 +00:00
Tamás Vajk
5e75a4109c
Merge pull request #4653 from tamasvajk/feature/csharp9-relational-pattern
...
C#: Extract relational patterns
2020-11-27 11:23:12 +01:00
Geoffrey White
390e61b674
C++: Add public domain and translated from QL exceptions.
2020-11-27 10:15:56 +00:00
Rasmus Wriedt Larsen
7b4e890e7b
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-27 11:00:30 +01:00
Erik Krogh Kristensen
fd0d5c9e46
add command parsing model for "commander"
2020-11-27 09:58:00 +00:00
Erik Krogh Kristensen
653ebf7668
add command parsing model for "dashdash"
2020-11-27 09:57:05 +00:00
Erik Krogh Kristensen
269de49196
add model for "meow"
2020-11-27 09:57:05 +00:00
Erik Krogh Kristensen
c5ac98d2e8
add command parsing model for command-line-args
2020-11-27 09:57:05 +00:00
Erik Krogh Kristensen
f33cd8bc8e
add command parsing model for argparse
2020-11-27 09:57:05 +00:00
Erik Krogh Kristensen
45067ee651
add command parsing model for "arg"
2020-11-27 09:57:05 +00:00
Erik Krogh Kristensen
821b4be522
more accurately model command parsers that take process.argv as an argument
2020-11-27 09:56:50 +00:00
Jonas Jensen
8069e7b031
C++: Downgrade two queries to recommendation
...
The `cpp/local-variable-hides-global-variable` doesn't seem right as a
warning without some additional context. For example, is the local
variable and the global variable used in the same function body, and
do they have similar enough types that it would be possible to confuse
them.
The `cpp/missing-header-guard` query enforces good style and helps with
compilation speed, but AFAIK it has never flagged a correctness issue.
Therefore I think it should be a recommendation.
2020-11-27 10:45:03 +01:00
Tamas Vajk
07c989deb1
C#: Add upgrade folder
2020-11-27 10:21:17 +01:00
Tamas Vajk
5a808190d4
Address review comments
2020-11-27 10:16:57 +01:00
Tamas Vajk
b11fc2f957
C#: Extract relational patterns
2020-11-27 10:16:57 +01:00
Tamás Vajk
c751c516bf
Merge pull request #4614 from tamasvajk/feature/csharp9-target-typed
...
C#: C#9 Add target typed conditional tests
2020-11-27 10:10:58 +01:00
Jonas Jensen
a48235e871
Merge pull request #4730 from MathiasVP/definitionHasPhiNode-join-order-fix
...
C++: Fix join order in definitionHasPhiNode
2020-11-27 09:54:37 +01:00
Jonas Jensen
edb57c2da0
Merge pull request #4731 from criemen/remove-cpp-abstract
...
C++: Remove uses of abstract from the standard library.
2020-11-27 09:53:24 +01:00
Tom Hvitved
bc08e47a4e
Merge pull request #4664 from hvitved/csharp/cfg/refactor
...
C#: Refactor CFG implementation
2020-11-27 09:26:57 +01:00
Tamas Vajk
548f276e1f
Add more tests
2020-11-27 08:58:37 +01:00
Tamas Vajk
144e9e6271
C#: C#9 Add target typed conditional tests
2020-11-27 08:43:02 +01:00
Jonas Jensen
ad4b2beafa
Merge pull request #4727 from criemen/remove-abstract-classes
...
C++/C#/JS/Python/Java XML.qll: Remove abstract from class hierarchy.
2020-11-27 08:17:21 +01:00
yo-h
301f49a9d9
Merge pull request #4723 from github/yo-h/java-jsp
...
Java: add support for extraction of SMAP files
2020-11-26 16:09:17 -05:00
Geoffrey White
1f5c6d4e71
C++: Add examples.
2020-11-26 19:31:06 +00:00
Anders Schack-Mulligen
2234d665ce
Add manual magic
2020-11-26 13:55:20 -05:00
yo-h
9bb949a8b1
Java: make some SMAP predicates private and add QLDoc
2020-11-26 13:55:19 -05:00
yo-h
c077ca3fc9
Java: add dbscheme upgrade script for SMAP relations
2020-11-26 13:55:19 -05:00
yo-h
f9e78085ac
Java: add dbscheme stats for SMAP relations
2020-11-26 13:55:18 -05:00
yo-h
edb41655b4
Java: incorporate SMAP locations into Top.hasLocationInfo
2020-11-26 13:55:17 -05:00
yo-h
e2419e8fed
Java: add SMAP relations to dbscheme
2020-11-26 13:55:17 -05:00
Tamás Vajk
27aeb53f1e
Merge pull request #4615 from tamasvajk/feature/csharp9-lambda-modifiers
...
C#: Extract modifiers for lambdas (async, static)
2020-11-26 19:35:51 +01:00
luchua-bc
a83ddd66eb
Add comments about how the future promotion should go
2020-11-26 17:41:46 +00:00
Rasmus Wriedt Larsen
9e4910f863
Python: Untrusted data used in external APIs
...
A port of the one for Java that was added in https://github.com/github/codeql/pull/3938
2020-11-26 18:19:35 +01:00
Rasmus Wriedt Larsen
7e3dbb0149
Python: Add Unit helper library
...
Like Java did in https://github.com/github/codeql/pull/4184
2020-11-26 18:17:14 +01:00
luchua-bc
7ad031ca70
Move to experimental and update qldoc
2020-11-26 17:09:53 +00:00
Erik Krogh Kristensen
f576144ec6
more pruning based on states being inside a repetition
2020-11-26 17:30:37 +01:00
james
e50e2f8c4f
add another missing intro
2020-11-26 16:18:38 +00:00
james
a10fe44afa
rename index -> contents
2020-11-26 15:51:56 +00:00
james
d38e297ef9
add intros and tweak tocs
2020-11-26 15:51:08 +00:00
Tamas Vajk
864fce43bd
C#: Add upgrade folder
2020-11-26 16:14:38 +01:00
Tamas Vajk
47ca4b0f3b
Address review comments
2020-11-26 16:12:19 +01:00
Tamas Vajk
55d47a70f4
C#: Extract modifiers for lambdas (async, static)
2020-11-26 16:12:18 +01:00
Tamás Vajk
252692e5c1
Merge pull request #4616 from tamasvajk/feature/csharp9-attribute-local-function
...
C#: Allow attributes on local functions
2020-11-26 16:04:00 +01:00
Mathias Vorreiter Pedersen
a4c060a4c6
Merge pull request #4729 from MathiasVP/safe-external-api-function-use-model-interfaces-only
...
C++: Use model interfaces in DefaultSafeExternalAPIFunction
2020-11-26 16:00:19 +01:00
Geoffrey White
ab071b1e6a
C++: Disambiguate 'Library'.
2020-11-26 14:57:18 +00:00
Tom Hvitved
cb91dc1308
C#: Rank StandardStmt::getChildElement()
2020-11-26 15:13:57 +01:00
Erik Krogh Kristensen
9468a6e8dc
update expected output
2020-11-26 12:32:55 +01:00
Cornelius Riemenschneider
f6c3c2bdcc
C++: Auto-format Type.qll.
2020-11-26 11:45:49 +01:00
Mathias Vorreiter Pedersen
b02ac7f523
C++: Use SideEffectFunction (instead of ArrayFunction) to define DefaultSafeExternalAPIFunction.
2020-11-26 11:02:47 +01:00
Esben Sparre Andreasen
82e8114c0f
Add security tag to js/angular/double-compilation
2020-11-26 10:39:19 +01:00
Cornelius Riemenschneider
5d80417854
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2020-11-26 10:39:17 +01:00
Tamas Vajk
18a757445d
Add DB upgrade folder
2020-11-26 10:37:28 +01:00
Erik Krogh Kristensen
1b3c3ef4cb
adjust comments in ReDoS test case
2020-11-26 10:31:44 +01:00
Tamas Vajk
a931c59a28
C#: Allow attributes on local functions
2020-11-26 10:24:12 +01:00
Tamás Vajk
89a4cff5f8
Merge pull request #4662 from tamasvajk/feature/csharp9-type-pattern
...
C#: Extract type patterns
2020-11-26 10:18:55 +01:00
Cornelius Riemenschneider
ba32459adf
C++: Remove uses of abstract from the standard library.
2020-11-26 10:17:40 +01:00
Mathias Vorreiter Pedersen
5f4ad3ad7d
C++: Fix join order in definitionHasPhiNode
2020-11-26 10:07:44 +01:00
Tamas Vajk
3bd6807681
C#: Extract type patterns
2020-11-26 08:54:40 +01:00
Anders Schack-Mulligen
f70072a2db
Merge pull request #3454 from porcupineyhairs/javaSSRf
...
Java : add request forgery query
2020-11-26 08:52:15 +01:00
Tamás Vajk
d29a6ec4c6
Merge pull request #4654 from tamasvajk/feature/csharp9-parens-pattern
...
C#: Handle parenthesized pattern extraction
2020-11-26 08:46:38 +01:00
Jonas Jensen
6fecc38004
Merge pull request #4726 from MathiasVP/revert-4558
...
C++: Revert 4558
2020-11-26 08:44:32 +01:00
yo-h
eedc385b37
Java 15: adjust test options
2020-11-26 00:14:24 -05:00
Tamas Vajk
9b8d9771f8
C#: Handle parenthesized pattern extraction
2020-11-25 21:27:34 +01:00
Mathias Vorreiter Pedersen
c595baf1e3
C++: Remove INTERNAL from qldoc now that the Pure model implementations are private.
2020-11-25 21:07:47 +01:00
Geoffrey White
bc71c72084
Merge pull request #4728 from criemen/delete-magicdraw
...
C++: Remove MagicDraw.qll
2020-11-25 17:56:37 +00:00
Mathias Vorreiter Pedersen
7730f5dfcf
C++: Use model interfaces in SafeExternalAPIFunction and make the three previosuly-used implementation models private.
2020-11-25 18:20:55 +01:00
Cornelius Riemenschneider
3bfb398516
Autoformat XML.qll.
2020-11-25 18:20:50 +01:00
Cornelius Riemenschneider
acf6c218bc
C++: Remove MagicDraw.qll
2020-11-25 17:36:30 +01:00
Tamás Vajk
65dbb6e45f
Merge pull request #4612 from tamasvajk/feature/csharp9-local-function-without-body
...
C#: C#9 Extract local functions without body
2020-11-25 17:28:03 +01:00
Cornelius Riemenschneider
7eec988fb5
XML.qll: Remove abstract from class hierarchy.
2020-11-25 17:22:03 +01:00
Jonas Jensen
dcc048139e
Merge pull request #4717 from criemen/escapetree-temp-objects
...
C++: Improve EscapesTree.qll analysis in the presence of temporary objects
2020-11-25 17:11:44 +01:00
Cornelius Riemenschneider
0b8403fc05
C++: Add one more test.
2020-11-25 16:24:55 +01:00
Cornelius Riemenschneider
b4e45ad6cb
C++: Address review.
2020-11-25 16:24:25 +01:00
Mathias Vorreiter Pedersen
4c3a26fea8
Revert "Merge pull request #4558 from rdmarsh2/rdmarsh2/cpp/remove-initialize-nonlocal"
...
This reverts commit 08efd7fbd9 , reversing
changes made to cb8c5e8cca .
2020-11-25 15:51:52 +01:00
Tamas Vajk
19883302af
C#: Extract local functions without body
2020-11-25 14:42:40 +01:00
Erik Krogh Kristensen
11d878b413
adjust comments to reflect the precission of the suffix search
2020-11-25 14:40:33 +01:00
Tamás Vajk
aa45920f31
Merge pull request #4613 from tamasvajk/feature/csharp9-multiple-discards
...
C#: C#9 add test cases for discards as lambda/delegate parameters
2020-11-25 14:33:55 +01:00
Geoffrey White
2b349f299a
C++: Replace 'odasa qltest' with 'codeql test run'.
2020-11-25 13:16:50 +00:00
Erik Krogh Kristensen
b418cb5fe0
add test case where the successor of the repeating term matches epsilon
2020-11-25 13:59:10 +01:00
Erik Krogh Kristensen
500b94b50e
rename witness to pump
2020-11-25 13:57:21 +01:00
Erik Krogh Kristensen
c5f5206174
update expected output
2020-11-25 13:57:20 +01:00
Erik Krogh Kristensen
e03c19b7fc
only search prefixes/suffixes from the candidates that are used in the end
2020-11-25 13:57:20 +01:00
Erik Krogh Kristensen
b8fabfa24e
only construct prefix/suffix for regular expressions that has a pumpable state
2020-11-25 13:57:20 +01:00
Erik Krogh Kristensen
a8944c8953
model accept states more accurately by adding an AcceptAny state, modelling $, and checking the existence of rejecting suffixes
2020-11-25 13:57:20 +01:00
Erik Krogh Kristensen
d9ebb7b20e
escape tabs
2020-11-25 13:57:20 +01:00
Erik Krogh Kristensen
bcb2f2768d
search for a prefix to the state that causes exponential backtracking
2020-11-25 13:57:20 +01:00
CodeQL CI
34ffcb5677
Merge pull request #4593 from asgerf/js/react-hot
...
Approved by erik-krogh
2020-11-25 12:01:38 +00:00
Tamas Vajk
6d9510591a
C#: Adjust test for nint/nuint
2020-11-25 12:01:56 +01:00
Tamas Vajk
81b03bf876
C#: Add test cases for discards as lambda/delegate parameters
2020-11-25 11:56:25 +01:00
Rasmus Wriedt Larsen
e2c4af3031
Python: Add change note for improved open modeling
2020-11-25 11:39:02 +01:00
Tom Hvitved
7791ec3084
Merge pull request #4618 from hvitved/csharp/get-source-decl-rename
...
C#: Rename `getSourceDeclaration()` to `getUnboundDeclaration()`
2020-11-25 11:05:18 +01:00
Cornelius Riemenschneider
7f13d4c356
C++: Improve EscapesTree analysis in the presence of temporary objects.
2020-11-25 10:41:15 +01:00
Cornelius Riemenschneider
8d024c7ff1
C++: Add tests around references to pointers with temporary objects.
2020-11-25 10:40:33 +01:00
Cornelius Riemenschneider
e68352bcde
C++: Add testcase for false positive.
2020-11-25 10:40:33 +01:00
Rasmus Wriedt Larsen
cafe55f5c7
Merge pull request #4701 from yoff/python-fix-return-node-enclosing-callable
...
Python: Use default `getEnclosingCallable` for `RetrunNode`
2020-11-25 10:36:41 +01:00
Jonas Jensen
5f0141953d
Merge pull request #4644 from MathiasVP/unsafe-use-of-this-query
...
C++: Add 'unsafe use of this' query
2020-11-25 08:40:12 +01:00
Jonas Jensen
48460e3e45
Merge pull request #4716 from criemen/escapestree-code-cleanup
...
C++: Simplify and generalize EscapesTree::addressMayEscapeMutablyAt
2020-11-25 08:31:33 +01:00
Rasmus Lerchedahl Petersen
88643da01f
Python: Use default getEnclosingCallable
...
for `RetrunNode`
2020-11-25 08:19:07 +01:00
Rasmus Lerchedahl Petersen
36d9097d03
Python: Add test for inner return
2020-11-25 07:09:27 +01:00
Rasmus Lerchedahl Petersen
34896ae0d7
Python: Fix failing test
2020-11-25 07:09:27 +01:00
luchua-bc
a49160423b
Enhance the query and add more test cases
2020-11-25 04:33:26 +00:00
Robert Marsh
0cd6941a21
C++: Filter out lower bounds on overflowing exprs
...
Fixes performance issues where multiple lower bounds would be
computed for overflowing expressions
2020-11-24 12:57:11 -08:00
Robert Marsh
9b07782d19
Merge pull request #4634 from geoffw0/modelchanges2
...
C++: Make classes in models.implementations private
2020-11-24 15:18:10 -05:00
Erik Krogh Kristensen
94aa162f8d
prune state-pairs that are outside a backtracking repetition
2020-11-24 20:18:45 +01:00
Erik Krogh Kristensen
f3c3b82827
move condition inside parens
2020-11-24 20:16:40 +01:00
Erik Krogh Kristensen
d1706e8048
reuse InfiniteRepetitionQuantifier from SuperLiniearBacktracking
2020-11-24 20:16:36 +01:00
CodeQL CI
395403789e
Merge pull request #4585 from erik-krogh/moreReDoS
...
Approved by asgerf
2020-11-24 18:52:36 +00:00
Geoffrey White
71a8ac5183
C++: Autoformat.
2020-11-24 18:42:18 +00:00
porcupineyhairs
9c30b82116
Merge pull request #2 from aschackmull/java/ssrf-review
...
Java: Review fixes.
2020-11-24 23:14:50 +05:30
CodeQL CI
4be158b362
Merge pull request #4708 from erik-krogh/emptyName
...
Approved by asgerf
2020-11-24 17:34:55 +00:00
Rasmus Wriedt Larsen
d88e5bdb3a
Python: Model io.open as FileSystemAccess
2020-11-24 18:27:33 +01:00
Rasmus Wriedt Larsen
e39bb56078
Python: Model builtin open function better
2020-11-24 18:27:31 +01:00
Rasmus Wriedt Larsen
5af1fdd06f
Python: Expand tests of open
2020-11-24 18:27:30 +01:00
Rasmus Wriedt Larsen
caf73e4b9b
Python: Wrap all Stdlib modeling consistently
...
Some of these predicates had fallen outside the `private module Stdlib`
2020-11-24 18:27:29 +01:00
James Fletcher
b5626cbb70
Merge pull request #4713 from github/sd-277
...
[Docs] Combine non-migrated content into single project
2020-11-24 16:39:37 +00:00
Geoffrey White
8184f76d1f
C++: Sync identical files.
2020-11-24 16:29:14 +00:00
Geoffrey White
d677305c90
C++: Create tests readme.
2020-11-24 16:08:02 +00:00
Mathias Vorreiter Pedersen
648acc3bfc
C++: Prevent IR re-evaluation by importing GVN.
2020-11-24 17:04:54 +01:00
Cornelius Riemenschneider
026abae323
C++: Simplify some more.
2020-11-24 17:00:47 +01:00
Asger Feldthaus
432a59185f
Merge branch 'js/api-graph-tweaks' of github.com:asgerf/codeql into js/api-graph-tweaks
2020-11-24 14:32:28 +00:00
Asger Feldthaus
cf12b65c80
JS: Autoformat
2020-11-24 14:32:20 +00:00
Rasmus Wriedt Larsen
aa4345ac76
Merge pull request #4710 from yoff/python-dataflow-variable-capture
...
Python: Dataflow, variable capture
2020-11-24 15:04:38 +01:00
yoff
215986bce5
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-24 14:12:23 +01:00
Rasmus Lerchedahl Petersen
05d156ba0f
Python: add comments
2020-11-24 14:11:14 +01:00
CodeQL CI
8c68463e76
Merge pull request #4711 from erik-krogh/locType
...
Approved by asgerf
2020-11-24 13:10:32 +00:00
Anders Schack-Mulligen
b192f6dfe0
Java: Remove some deprecated classes.
2020-11-24 14:04:01 +01:00
Anders Schack-Mulligen
3f04099c25
Update java/ql/src/experimental/CWE-918/RequestForgery.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-11-24 13:18:58 +01:00
Jonas Jensen
260a8d4afb
Merge pull request #4702 from MathiasVP/qualifier-as-parameter-for-callee
...
C++: Abstractions for treating qualifiers as parameters in IR
2020-11-24 12:58:27 +01:00
CodeQL CI
2277242196
Merge pull request #4692 from yoff/python-psycopg
...
Approved by RasmusWL
2020-11-24 10:59:04 +00:00
Rasmus Lerchedahl Petersen
80dcb8da4a
Python: annotate missing flow
2020-11-24 11:55:28 +01:00
Geoffrey White
bc23809e1b
Merge branch 'main' into modelchanges2
2020-11-24 10:49:14 +00:00
Cornelius Riemenschneider
7983b16e84
C++: Simplify and generalize EscapesTree::addressMayEscapeMutablyAt predicate.
2020-11-24 11:35:18 +01:00
Anders Schack-Mulligen
0450489022
Java: Review fixes.
2020-11-24 11:31:44 +01:00
Mathias Vorreiter Pedersen
9d21b226d2
Merge branch 'main' into qualifier-as-parameter-for-callee
2020-11-24 11:13:14 +01:00
Cornelius Riemenschneider
14a03e2f54
Merge pull request #4715 from MathiasVP/remove-failing-duplicate-tests
...
C++: Remove duplication-tests
2020-11-24 11:04:46 +01:00
Rasmus Lerchedahl Petersen
737f4dff09
Python: update test annotations
2020-11-24 10:57:57 +01:00
Rasmus Lerchedahl Petersen
da805f8242
Merge remote-tracking branch 'upstream/main' into python-dataflow-modernize-tests
2020-11-24 10:56:22 +01:00
Mathias Vorreiter Pedersen
08f8660b17
C++/C#: Add pragma[noinline] to hasIndex predicates.
2020-11-24 10:45:02 +01:00
Mathias Vorreiter Pedersen
8bd14c5af6
C++: Remove duplication-tests directory since we no longer detect duplication.
2020-11-24 10:10:31 +01:00
Rasmus Lerchedahl Petersen
a19304a4a0
Python: Factor out prettyPrinter and update tests
2020-11-24 02:17:38 +01:00
Erik Krogh Kristensen
f03429a4b8
change description for source root folder
2020-11-23 23:46:44 +01:00
CodeQL CI
9123f249ad
Merge pull request #4705 from erik-krogh/bigString
...
Approved by asgerf
2020-11-23 22:40:42 +00:00
Asger F
ac6d4aac9d
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-11-23 21:20:38 +00:00
Asger Feldthaus
d3412bb0ec
JS: Fix typo in NoSQL model
2020-11-23 21:19:17 +00:00
james
9702326232
add leftover docs to support project
2020-11-23 16:18:45 +00:00
Asger Feldthaus
85f0a627c4
JS: Autoformat
2020-11-23 16:17:22 +00:00
Asger Feldthaus
c146e044ca
JS: Update NoSQL model
2020-11-23 16:17:00 +00:00
Asger Feldthaus
b6b8a55b37
JS: Add test case
2020-11-23 16:16:50 +00:00
Erik Krogh Kristensen
33dab1717e
treat nodes with type "Location" as a location source - but not if we can track it from an original node with type "Location"
2020-11-23 17:03:50 +01:00
Rasmus Lerchedahl Petersen
39c5e0d487
Python: update test expectations
2020-11-23 16:46:35 +01:00
Rasmus Lerchedahl Petersen
38bb06a207
Merge remote-tracking branch 'upstream/main' into python-dataflow-variable-capture
2020-11-23 16:40:20 +01:00
Asger Feldthaus
ac00e02855
JS: Add API::Node.getAValueReachingRhs
2020-11-23 15:37:08 +00:00
Asger Feldthaus
3b5ff73862
JS: Introduce API::InvokeNode to simplify reasoning about calls
2020-11-23 15:36:32 +00:00
Tom Hvitved
129deb0a00
C#: Add change note
2020-11-23 16:09:33 +01:00
Tom Hvitved
cd77f14a75
C#: Rename getSourceDeclaration() to getUnboundDeclaration()
2020-11-23 16:09:33 +01:00
Geoffrey White
7015a9cf53
C++: Un-private a few classes that are now used by the current DefaultSafeExternalAPIFunction implementation.
2020-11-23 14:47:22 +00:00
Anders Schack-Mulligen
2cf10a7658
Merge pull request #4427 from aschackmull/java/fastjson
...
Java: Add support for FastJson in unsafe deserialization.
2020-11-23 14:40:14 +01:00
Erik Krogh Kristensen
f7f9beeefd
avoid reporting empty names in js/exposure-of-private-files
2020-11-23 14:24:42 +01:00
Erik Krogh Kristensen
02d5fbf46b
remove superfluous space
2020-11-23 14:22:16 +01:00
Rasmus Wriedt Larsen
9156163563
Merge pull request #4703 from github/hmakholm/pr/duplicate-code-2
...
Remove unit tests for duplicate-code detection, take II
2020-11-23 13:52:24 +01:00
Tom Hvitved
f0f5d44b33
C#: Replace BreakNormalCompletion with a nested completion
2020-11-23 11:38:24 +01:00
Tom Hvitved
17df059432
C#: Replace matchesCompletion() with getAMatchingSuccessorType()
2020-11-23 11:38:24 +01:00
Tom Hvitved
f3abaa406c
C#: Refactor CFG implementation
2020-11-23 11:38:24 +01:00
Rasmus Wriedt Larsen
f35ffa5632
Python: Add support for x in ["safe", "also_safe"] (and not in)
2020-11-23 10:42:24 +01:00
Rasmus Wriedt Larsen
431aab45f7
Python: Add support for x != "safe" BarrierGuard
2020-11-23 10:36:55 +01:00
Rasmus Wriedt Larsen
18041fd059
Python: Expand string-const-compare tests
...
Also moved file to reflect that. Added tests of
+ `!=`
+ `in`
+ `not in`
2020-11-23 10:36:49 +01:00
Erik Krogh Kristensen
234730419b
restrict computation of ConcatenationRoot::getConstantStringParts to results that are less than 1 million chars long
2020-11-23 10:29:47 +01:00
Tamás Vajk
7d38b2dd17
Merge pull request #4623 from tamasvajk/feature/csharp9-type-param-nullability
...
C#: Add type parameter ref/value type tests
2020-11-23 09:58:56 +01:00
Rasmus Lerchedahl Petersen
777100f25c
Python: rename file, package, and class
2020-11-23 09:17:40 +01:00
Tom Hvitved
c571e42cd5
C#: Move internal CFG logic into separate file
2020-11-21 19:49:17 +01:00
Mathias Vorreiter Pedersen
a7644db762
C++: Use the new names in IR dataflow. Turns out DataFlowCall had its own implementation of getArgument already (which didn't handle qualifiers). The predicate wasn't used anywhere, so I simply removed it, as a better predicate is now available on the base class of DataFlowCall.
2020-11-21 01:00:59 +01:00
Mathias Vorreiter Pedersen
61bbceb201
C++/C#: Sync identical files
2020-11-21 00:55:07 +01:00
Mathias Vorreiter Pedersen
f173dc71c0
C++: Use shorter names for new IR predicates. This should hopefully guide users to use these predicates by default.
2020-11-21 00:54:50 +01:00
Geoffrey White
cc8d4b4c75
Merge branch 'main' into modelchanges2
2020-11-20 20:33:52 +00:00
Geoffrey White
fddd353155
C++: Updated autoformat.
2020-11-20 20:15:45 +00:00
Henning Makholm
a2a4938f60
Remove unit tests for duplicate-code detection, take II
...
In #4689 I forgot to remove the `.expected` files too, but they are
now of course useless.
2020-11-20 21:07:42 +01:00
Asger F
adc7bbfa4d
Merge pull request #4694 from asgerf/js/flow-to-external-api
...
JS: Add UntrustedDataToExternalAPI query
2020-11-20 15:56:04 +00:00
Asger Feldthaus
f894cf2074
JS: Add support for react-hot-loader
2020-11-20 15:28:32 +00:00
Mathias Vorreiter Pedersen
6ead6c6d38
Merge branch 'main' into qualifier-as-parameter-for-callee
2020-11-20 16:17:10 +01:00
Tamas Vajk
0fa3cf7912
Simplify test predicates
2020-11-20 16:05:12 +01:00
Asger Feldthaus
16429c8ca4
JS: followed -> followed by
2020-11-20 14:44:25 +00:00
james
dcf52f3ee3
improve lists in metadata section
2020-11-20 13:59:12 +00:00
Mathias Vorreiter Pedersen
fd4f8c557c
Merge branch 'main' into unsafe-use-of-this-query
2020-11-20 14:54:51 +01:00
Jonas Jensen
14aa6427ca
Merge pull request #4696 from MathiasVP/get-result-memory-location-join-order-fix
...
C++: Fix bad join order in AliasedSSA::getResultMemoryLocation
2020-11-20 14:50:35 +01:00
Tamas Vajk
3e836ef671
C#: Add type parameter ref/value type tests
2020-11-20 13:08:38 +01:00
Tamás Vajk
77afd5a617
Merge pull request #4633 from tamasvajk/feature/csharp9-native-int
...
C#: Add test cases for native integers
2020-11-20 12:58:11 +01:00
james
f5ae00865f
rebase on rc/1.26 branch
2020-11-20 11:51:35 +00:00
Mathias Vorreiter Pedersen
c7efc91676
C++: Use the new predicates in IR dataflow.
2020-11-20 12:24:39 +01:00
Mathias Vorreiter Pedersen
f3b5d7b830
C++/C#: Sync identical files
2020-11-20 12:23:34 +01:00
Mathias Vorreiter Pedersen
416431a7c1
C++: Add convenience predicates for working with qualifiers as parameters.
2020-11-20 12:22:37 +01:00
Rasmus Wriedt Larsen
08bcba98e6
Python: Add BarrierGuard test with exception inside unsafe branch
2020-11-20 11:55:07 +01:00
Rasmus Wriedt Larsen
34f78d4211
Python: Add BarrierGuard test with return inside unsafe branch
2020-11-20 11:52:36 +01:00
Jonas Jensen
3342fac83e
Merge pull request #4688 from criemen/printast-performance
...
C++: Speed up PrintAST.
2020-11-20 11:45:42 +01:00
Asger Feldthaus
7536c49c6f
JS: Use getAParameter and not getReceiver instead of getASuccessor
2020-11-20 10:34:30 +00:00
Tamas Vajk
52680cd1dc
C#: Add test cases for native integers
2020-11-20 11:31:20 +01:00
Asger F
405f07720a
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-11-20 10:21:19 +00:00
Asger Feldthaus
b34df9ff33
JS: Autoformat
2020-11-20 10:15:35 +00:00
Cornelius Riemenschneider
1afd32c033
C++: Add comment, rename class.
2020-11-20 10:49:12 +01:00
yoff
b478a51d4e
Apply suggestions from code review
...
Thanks for doing the work for me :-)
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-20 10:46:04 +01:00
Rasmus Wriedt Larsen
6c8937c5a9
Python: Add StringConstCompare to new data-flow queries
...
In the future, I could imagine we would have something like this, but for now,
I'm just keeping it simple.
```codeql
/**
* A collection of common guards that ensure the checked value cannot have arbitrary
* values.
*
* Currently only supports comparison with constant string value, but could also
* include checking whether all characters are alphanumeric, or whether a regex is
* matched against the value.
*
* Such guards will be useful for many taint-tracking queries, but not necessarily
* all, which is why you need to opt into these manually.
*/
class CommonNonArbitraryGuard extends BarrierGuard {
CommonNonArbitraryGuard() {
this instanceof StringConstCompare
}
override predicate checks(ControlFlowNode node, boolean branch) {
this.(StringConstCompare).checks(node, branch)
}
}
```
2020-11-20 10:44:50 +01:00
Rasmus Wriedt Larsen
12b36b2245
Python: Highlight that safe or also_safe doesn't clear taint :(
2020-11-20 10:43:46 +01:00
Rasmus Wriedt Larsen
1a52f17da3
Python: Add StringConstCompare BarrierGuard
2020-11-20 10:40:04 +01:00
Rasmus Wriedt Larsen
a82936c904
Python: Enable test for sanitizer-guard and logic expressions
...
`not` is not working properly, but otherwise pretty good
2020-11-20 10:06:25 +01:00
Cornelius Riemenschneider
eeece5937d
C++: One more speedup, address review.
2020-11-20 09:56:08 +01:00
Tamás Vajk
056b0c2627
Merge pull request #4626 from tamasvajk/feature/stats
...
C#: Add stats file from the jenkins job
2020-11-20 09:16:56 +01:00
Mathias Vorreiter Pedersen
490bba5c9f
C++: Fix bad join order in AliasedSSA::getResultMemoryLocation.
2020-11-19 17:40:41 +01:00
Rasmus Wriedt Larsen
b3d3d6e142
Python: Move logical test of sanitizers
...
Don't know why it would ever have been under default sanitizers :D
2020-11-19 16:46:07 +01:00
Rasmus Lerchedahl Petersen
7cbbf3bbf7
Python: slightly nicer test
2020-11-19 16:20:57 +01:00
Rasmus Wriedt Larsen
4c7c940273
Python: Add example of Code Injection FP
2020-11-19 15:05:51 +01:00
Rasmus Wriedt Larsen
7e407d43d2
Python: Change (single) test to match codeql database create
2020-11-19 14:56:18 +01:00
Rasmus Wriedt Larsen
8ffcff0824
Python: Add example of top-level module shadowing stdlib
...
Although this test is added under the `wrong` folder, the current results from
this CodeQL test is actually correct (compared with the Python
interpreter). However, they don't match what the extractor does when invoked
with `codeql database create`.
Since I deemed it "more than an easy fix" to change the extractor behavior for
`codeql database create` to match the real python behavior, and it turned out to
be quite a challenge to change the extractor behavior for all tests, I'm just
going to make THIS ONE test-case behave like the extractor will with `codeql
database create`...
This is a first commit, to show how the extractor works with qltest by default.
Inspired by the debugging in https://github.com/github/codeql/issues/4640
2020-11-19 14:56:17 +01:00
Asger Feldthaus
f737f34dcd
JS: Add UntrustedDataToExternalApi query
2020-11-19 13:42:25 +00:00
luchua-bc
a311462791
Move to query-test folder and update qldoc
2020-11-19 13:12:42 +00:00
Mathias Vorreiter Pedersen
2e6a3cd33b
Merge branch 'main' into unsafe-use-of-this-query
2020-11-19 13:03:29 +01:00
Jonas Jensen
cd20163f6e
Merge pull request #4676 from MathiasVP/untrusted-dataflow-to-external-api-query
...
C++: Untrusted data used in external APIs
2020-11-19 12:56:08 +01:00
Rasmus Lerchedahl Petersen
6cc8e5acf1
Python: support psycopg
2020-11-19 12:13:20 +01:00
Mathias Vorreiter Pedersen
072adaa279
C++: Require that no override of the called pure virtual function exists in any base class. This removes the false positive in the testcase. Based on the results on LGTM we have agreed to set the @precision to very-high.
2020-11-19 12:10:57 +01:00
Rasmus Lerchedahl Petersen
39f134c1c1
Python: reorganized and added to tests
2020-11-19 12:06:58 +01:00
Erik Krogh Kristensen
a3b21ad43b
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-11-19 11:42:12 +01:00
james
f2b177413a
change warnings to errors to avoid creating empty query help
2020-11-19 09:45:20 +00:00
james
13c72d243a
run script for lgtm suites
2020-11-19 09:45:20 +00:00
james
bc7264cd5d
update query help script
2020-11-19 09:45:20 +00:00
james
4a9b61274a
improve docs
2020-11-19 09:45:20 +00:00
james
e5d2edd911
run script over all languages
2020-11-19 09:45:20 +00:00
james
8414c22f67
print error if generate query help fails
2020-11-19 09:45:20 +00:00
james
78fc15174f
debug java query help errors
2020-11-19 09:45:20 +00:00
james
d6e9f4d6f2
remove unnecessary steps from work flow
2020-11-19 09:45:20 +00:00
james
4b07f395d0
run script for all languges
2020-11-19 09:45:19 +00:00
james
d70240c786
update conf.py for query help
2020-11-19 09:45:19 +00:00
james
cb962a9ce0
tests
2020-11-19 09:45:19 +00:00
james
0fe0d067e9
copy more sphinx files
2020-11-19 09:45:19 +00:00
james
27f52851ca
add sphinx step
2020-11-19 09:45:19 +00:00
james
2383960e0d
copy folder correctly
2020-11-19 09:45:19 +00:00
james
e9b2d771c2
add test steps
2020-11-19 09:45:19 +00:00
james
bb1c0a184a
fix path
2020-11-19 09:45:19 +00:00
james
1a60f961e6
add set up step
2020-11-19 09:45:19 +00:00
james
fc848e553e
fix working directory
2020-11-19 09:45:19 +00:00
james
fe5979d92a
add working-directory
2020-11-19 09:45:19 +00:00
james
d25a0ef7e6
another test
2020-11-19 09:45:19 +00:00
james
c775a27a22
test2
2020-11-19 09:45:19 +00:00
james
2d93b3a45a
test
2020-11-19 09:45:19 +00:00
james
8504724dbb
add generate-query-help workflow
2020-11-19 09:45:18 +00:00
james
47483a8e84
auto format script
2020-11-19 09:45:18 +00:00
james
6667b58b2c
make new sphinx project for query help
2020-11-19 09:45:18 +00:00
james
710e675b17
add script to generate query help
2020-11-19 09:45:18 +00:00
Tom Hvitved
02ec325380
C#: Fix bad join-orders following stats update
2020-11-19 10:42:35 +01:00
Tamas Vajk
866c98bbd9
C#: Add stats file from the jenkins job
2020-11-19 10:42:34 +01:00
Rasmus Wriedt Larsen
2945eada9e
Merge pull request #4689 from github/hmakholm/pr/no-dup-code-tests
...
Remove unit tests for duplicate-code detection
2020-11-19 10:07:04 +01:00
Dave Bartolomeo
08efd7fbd9
Merge pull request #4558 from rdmarsh2/rdmarsh2/cpp/remove-initialize-nonlocal
...
Remove InitializeNonlocalInstruction
2020-11-18 20:23:08 -05:00
Porcupiney Hairs
ebc6c49555
include suggestions from review.
2020-11-19 03:37:00 +05:30
Erik Krogh Kristensen
cc1d797cef
adjust top comment to reflect what the query does, and add comment about which kind of accepting state is assumed.
2020-11-18 21:32:31 +01:00
Robert Marsh
5753a2d401
C++: autoformat
2020-11-18 11:02:58 -08:00
Robert Marsh
693626e460
C++: accept value numbering test changes
2020-11-18 11:00:31 -08:00
Cornelius Riemenschneider
4405547b04
C++: Fix tests.
2020-11-18 17:41:08 +01:00
Cornelius Riemenschneider
cfe86bf53b
C++: Remove default getAPrimaryQlClass().
2020-11-18 17:34:56 +01:00
Cornelius Riemenschneider
f70f32e3ed
C++: Fix tests for PrintAST.
2020-11-18 17:22:13 +01:00
Henning Makholm
a86679a377
Remove unit tests for duplicate-code detection
...
The old Semmle duplicate-code detection code has never been done when
extracting databases for the CodeQL CLI, except that `codeql test run`
will run it _just_ in order to support tests of the feature. With the
sunsetting of Odasa there's no need to even _test_ the feature anymore.
This commit removes those tests that fail when the duplicate-code
detector is turned off. Once it is merged and bumped, we can finally
remove it from `codeql`.
2020-11-18 16:37:29 +01:00
Cornelius Riemenschneider
429aa15b1b
C++: Speed up PrintAST.
2020-11-18 16:08:51 +01:00
Tamás Vajk
cb8c5e8cca
Merge pull request #4663 from tamasvajk/feature/patterns
...
C#: Refactor pattern extraction
2020-11-18 16:01:15 +01:00
Erik Krogh Kristensen
58c31f0eca
prune more regexps initially in the ReDoS query
2020-11-18 15:14:46 +01:00
Erik Krogh Kristensen
c4153a617e
remove duplicated test cases from ReDoS, and adjust variables names to match test output
2020-11-18 14:49:09 +01:00
Mathias Vorreiter Pedersen
4746320f3c
Merge pull request #4684 from criemen/cleanup-api
...
C++: Clean up Type.qll, getSpecifierString() API.
2020-11-18 13:07:51 +01:00
Mathias Vorreiter Pedersen
715f233360
C++: Add a new model class describing pure memory functions, and use this new model in DefaultSafeExternalAPIFunction.
2020-11-18 12:47:33 +01:00
Geoffrey White
decbb08340
Merge pull request #4402 from github/matt-gretton-dann/cpp20-constinit-results
...
Update expected results for `constint' support
2020-11-18 11:46:41 +00:00
Cornelius Riemenschneider
959b8f39d2
C++: Autoformat.
2020-11-18 12:13:46 +01:00
Erik Krogh Kristensen
8270bf5bb9
make the character search skip unencodable characters
2020-11-18 11:55:49 +01:00
James Fletcher
47fa2d31cc
Merge pull request #4685 from github/main-126-merge
...
Merge `rc/1.26` into `main`
2020-11-18 10:41:03 +00:00
yoff
04fc1e44f2
Merge pull request #4683 from RasmusWL/python-fix-bad-join-callStep-for-dist-upgrade
...
Python: Fix bad join order in TypeTracker::callStep
2020-11-18 11:12:38 +01:00
Rasmus Wriedt Larsen
ab856d6c01
Python: Show getCallableForArgument can have multiple results
2020-11-18 10:44:32 +01:00
Erik Krogh Kristensen
64828713d6
remove FPs in js/build-artifact-leak where the "leaked" properties are constrained to a safe subset
2020-11-18 10:35:02 +01:00
Erik Krogh Kristensen
06733eadea
remove two unused imports
2020-11-18 10:34:15 +01:00
james
8c9ea1632f
Merge branch 'rc/1.26' into main-126-merge
2020-11-18 09:33:21 +00:00
Cornelius Riemenschneider
b670522a9f
Clean up Type.qll, getSpecifierString() API.
2020-11-18 10:21:03 +01:00
Mathias Vorreiter Pedersen
09c5caa3bd
C++: Move ExternalAPI files into query directory to prevent out-of-tree use.
2020-11-18 10:18:03 +01:00
Rasmus Wriedt Larsen
abf2902a69
Python: Fix QLDoc
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-11-18 09:47:23 +01:00
Rasmus Wriedt Larsen
39590a39cb
Python: Rename helper predicate based on review
2020-11-18 09:26:53 +01:00
Erik Krogh Kristensen
55f2f86a26
limit the search of state-pairs to the ones that are reachable within the given length
2020-11-18 09:23:35 +01:00
Mathias Vorreiter Pedersen
f16591dffc
C++: Respond to qhelp review comments.
2020-11-18 09:18:14 +01:00
Rasmus Wriedt Larsen
14136154d6
Python: Fix bad join order in TypeTracker::callStep
...
From a local evaluation against flask DB, after
https://github.com/github/codeql/pull/4649 was merged we would get:
```
Tuple counts for TypeTracker::callStep#ff/2@a21b71:
9876 ~0% {3} r1 = SCAN DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS I OUTPUT I.<2>, I.<0>, I.<1>
9876 ~2% {3} r2 = JOIN r1 WITH project#DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS R ON FIRST 1 OUTPUT r1.<2>, R.<0>, r1.<1>
72388997 ~0% {4} r3 = JOIN r2 WITH DataFlowPublic::ParameterNode::isParameterOf_dispred#fff_201#join_rhs AS R ON FIRST 1 OUTPUT r2.<2>, R.<2>, r2.<1>, R.<1>
4952 ~0% {2} r4 = JOIN r3 WITH DataFlowPrivate::DataFlowCall::getCallable_dispred#ff AS R ON FIRST 2 OUTPUT r3.<2>, r3.<3>
return r4
```
2020-11-18 09:17:31 +01:00
Dave Bartolomeo
ab715ec302
Merge pull request #4680 from criemen/printast-performance
...
C++: Improve PrintAST performance.
2020-11-17 23:13:26 -05:00
luchua-bc
85434ca410
Format the source code and update qldoc
2020-11-17 21:20:53 +00:00
Aditya Sharad
9a65962912
Merge pull request #4647 from github/codeql-docs-reorg-2
...
Update CodeQL docs directory structure
2020-11-17 11:07:54 -08:00
Cornelius Riemenschneider
a92f7a4563
C++: Include trailing whitespace in Type.getSpecifierString().
2020-11-17 18:50:34 +01:00
Cornelius Riemenschneider
5c3de06b6d
C++: Improve PrintAST performance.
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-11-17 17:47:16 +01:00
Aditya Sharad
b9b6a35564
Merge pull request #4629 from pwntester/improve_bean_validation_query
...
Java: add some improvements to the bean validation query
2020-11-17 08:35:49 -08:00
Erik Krogh Kristensen
c4d7533701
Merge branch 'main' into moreReDoS
2020-11-17 17:34:49 +01:00
Erik Krogh Kristensen
97acf1fd87
fix FP related to inverted character classes choosing a char that was not matched by the char class
2020-11-17 17:34:43 +01:00
Mathias Vorreiter Pedersen
52bbb326ca
QLDoc: Wrap lines and disambiguate explanation.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
d93d3c8699
C++: Use the getSourceType predicate on RemoteFlowSources for better alert messages.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
d1272d3a79
C++: Use strictcount instead of count.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
4cb25d8e18
C++: Add isParameterDerefOrQualifierObject helper predicate to FunctionInput and FunctionOutput.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
dea16d4d62
QLDoc/C++: Rename {IR}ExternalAPIsUsedWithUntrustedData to {IR}CountUntrustedDataToExternalAPI
2020-11-17 16:23:13 +01:00
Mathias Vorreiter Pedersen
eabc69b98e
C++: Autoformat
2020-11-17 16:09:25 +01:00
Matthew Gretton-Dann
62767e7e0d
Update expected results for `constinit' support
2020-11-17 14:01:00 +00:00
Anders Schack-Mulligen
f74fc0ff26
Dataflow: Fix bad join-orders.
2020-11-17 14:28:25 +01:00
Mathias Vorreiter Pedersen
5d2b85fcf5
Update cpp/ql/src/semmle/code/cpp/models/implementations/Getenv.qll
...
Co-authored-by: hubwriter <hubwriter@github.com >
2020-11-17 13:02:28 +01:00
Tom Hvitved
7f0ad2d232
Merge pull request #4646 from hvitved/csharp/cfg/post-order-exprs
...
C#: Represent all expressions in post-order in the CFG
2020-11-17 13:01:35 +01:00
Mathias Vorreiter Pedersen
c37093f4bc
C++: Add copies of qhelp files for IR.
2020-11-17 12:28:31 +01:00
Mathias Vorreiter Pedersen
3b8580efaf
C++: Add qhelp and example files (modeled after the Java examples).
2020-11-17 12:27:53 +01:00
Mathias Vorreiter Pedersen
c3c29b8dd0
C++: Add qldoc to new library files.
2020-11-17 12:27:53 +01:00
Mathias Vorreiter Pedersen
5c9b8f1cff
C++: Update sync-identical-files.
2020-11-17 12:27:53 +01:00
Mathias Vorreiter Pedersen
5ad18eb748
C++: Add ExternalAPI query files (for AST and IR).
2020-11-17 12:27:40 +01:00
Jonas Jensen
10de931b92
C++: Decrease largeVariable cut-off to 100k
...
This 10x lower cut-off has on at least one snapshot made it possible to
compute AST data flow where it was infeasible before.
Also fix an integer overflow that happened in practice on at least one
snapshot and prevented the cut-off from being applied.
2020-11-17 09:48:32 +01:00
Jonas Jensen
55a38803cb
Merge pull request #4673 from MathiasVP/ir-post-dominance
...
C++: IR post dominance
2020-11-17 09:35:51 +01:00
Tamás Vajk
f2259de5f1
Merge pull request #4666 from tamasvajk/feature/roslyn-3.8.0
...
C#: Upgrade Roslyn dependencies to 3.8.0
2020-11-17 08:59:55 +01:00
Rasmus Lerchedahl Petersen
71830abda0
Python: remaining c# tests, except lambdas
...
both via nonlocal and via dict
2020-11-17 08:28:11 +01:00
Mathias Vorreiter Pedersen
057bb14eee
C++: Add ExternalAPI library files (for AST and IR).
2020-11-16 22:59:54 +01:00
luchua-bc
0bd6255c41
Query for cleartext storage using Android SharedPreferences
2020-11-16 17:23:01 +00:00
Robert Marsh
a94826dc81
C++: common superclass for Remote/LocalFlowSource
2020-11-16 18:05:17 +01:00
Robert Marsh
31d3e94cec
C++: Grammar/style fixes from code review
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-11-16 18:03:44 +01:00
Robert Marsh
74e05c111e
C++: add local flow sources
2020-11-16 18:02:19 +01:00
Rasmus Lerchedahl Petersen
27b4c67b9f
Python: Start of tests for captured variables
2020-11-16 17:25:39 +01:00
Tamas Vajk
8bef5f417e
C#: Upgrade Roslyn dependencies to 3.8.0
2020-11-16 16:44:14 +01:00
Mathias Vorreiter Pedersen
4a7f9100e4
C++: Respond to review comments.
2020-11-16 15:30:42 +01:00
Mathias Vorreiter Pedersen
27aab4062a
C++/C#: Sync identical files.
2020-11-16 15:05:59 +01:00
Mathias Vorreiter Pedersen
088d5863fc
C++: Implement IR post-dominance predicates.
2020-11-16 15:04:40 +01:00
Mathias Vorreiter Pedersen
10a9f7ba13
Update cpp/change-notes/2020-11-12-unsafe-use-of-this.md
...
Co-authored-by: hubwriter <hubwriter@github.com >
2020-11-16 12:28:57 +01:00
Anders Schack-Mulligen
4be731d2ab
Java: Adjust reference to static method and add test.
2020-11-16 11:47:58 +01:00
Anders Schack-Mulligen
80ee92ae97
Java: Add support for FastJson in unsafe deserialization.
2020-11-16 11:47:58 +01:00
Mathias Vorreiter Pedersen
020af1c88c
C++: Add qhelp.
2020-11-16 11:21:18 +01:00
Geoffrey White
4b8f338139
C++: Autoformat.
2020-11-16 10:19:06 +00:00
CodeQL CI
09cfb24afa
Merge pull request #4648 from erik-krogh/regexpParse
...
Approved by asgerf
2020-11-16 08:20:40 +00:00
CodeQL CI
13edc3713d
Merge pull request #4638 from erik-krogh/jwt
...
Approved by asgerf
2020-11-16 08:19:58 +00:00
Anders Schack-Mulligen
3dbd48063c
Dataflow: Add Unit type for all languages.
2020-11-16 09:02:44 +01:00
james
45a3024440
Merge branch 'codeql-docs-reorg-2' of github.com:github/codeql into codeql-docs-reorg-2
2020-11-15 08:35:51 +00:00
james
8262435d4b
further changes following review
2020-11-15 08:33:52 +00:00
James Fletcher
a4a47bf88d
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-11-15 08:31:40 +00:00
Erik Krogh Kristensen
a49b99b18c
autoformat
2020-11-13 20:06:17 +01:00
Erik Krogh Kristensen
affb11b0e3
changes based on review
2020-11-13 19:46:37 +01:00
Erik Krogh Kristensen
2f4fcc2f5e
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-11-13 18:03:07 +01:00
james
52d6503fe0
fix link to cli manual
2020-11-13 16:54:05 +00:00
Mathias Vorreiter Pedersen
0a6a22562b
C++: Respond to more review comments.
...
- Remove post-dominance requirement. It was really just hiding good
results.
- Fix test annotations. Turns out Clang and GCC's 'undefined behavior'
warning didn't align with the C++ standard.
2020-11-13 15:44:33 +01:00
Geoffrey White
dfcb0ae7c2
C++: Autoformat.
2020-11-13 14:39:33 +00:00
Anders Schack-Mulligen
9e45f10c5d
Dataflow: Remove headUsesContent.
2020-11-13 15:12:39 +01:00
Anders Schack-Mulligen
e0a6a485df
Dataflow: Sync.
2020-11-13 15:12:16 +01:00
Anders Schack-Mulligen
d324cd1844
Dataflow: Some qldoc.
2020-11-13 15:09:30 +01:00
Anders Schack-Mulligen
293429f821
Dataflow: Make a bunch of the interface predicates private.
2020-11-13 15:09:30 +01:00
Anders Schack-Mulligen
d028e6b334
Dataflow: Change some headUsesContent to getHead.
2020-11-13 15:09:30 +01:00
Anders Schack-Mulligen
aa66b9bb48
Dataflow: Align more predicates.
2020-11-13 15:09:30 +01:00
Anders Schack-Mulligen
6e6e5d6414
Dataflow: Renamings.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
786edbf045
Dataflow: Align on parameterMayFlowThrough.
...
This actually provides a decent pruning improvement in stages 3 and 4.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
15bf1b1026
Dataflow: Rename some stage 1 predicates.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
af54afa24b
Dataflow: Add stage statistics.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
8b5e452728
Dataflow: Improve cons-cand relation.
...
Post-recursion we can filter the forward cons-candidates to only include
those that met a read step, and similarly restrict the reverse flow
cons-candidates to those that met a store step.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
e4fb41507b
Dataflow: Reshuffle some predicates.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
5a1c0e9ec4
Dataflow: Get rid of early filter.
...
This constructs a few more tuples in Stage3::fwdFlow0, which are then
filtered in Stage3::fwdFlow. This is cleaner and appears faster.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
3e18e02d2c
Dataflow: Refactor step predicate in fwdFlowRead.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
c5a2c261dc
Dataflow: Refactor forward store step relation.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
b6f1ab6429
Dataflow: Refactor step relation in revFlowStore.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
12fe38bcb6
Dataflow: Reorder, rename, and add columns to store-flow.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
aa28fdb83d
Dataflow: Align some qldoc.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
0a4c680e17
Dataflow: Align on localStep.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
4b5905c5e0
Dataflow: Risky! Remove fwdFlowLocalEntry.
...
This commit is a little bit risky, as it allows for some potentially bad
join-orders. The best order starts with the delta and proceeds with the
then functional `mid.getEnclosingCallable()` and `getLocalCallContext`.
In this order `localFlowEntry` becomes superfluous. The standard order
is however somewhat unwilling to choose this. If it picks
`getLocalCallContext` and `getEnclosingCallable` as the first join, the
result is really bad, but it appears that the existence of
`localFlowEntry` at least means that it'll do `localFlowEntry`,
`getEnclosingCallable`, `getLocalCallContext` in that order, which
appears to be acceptable, although it isn't optimal. Without the
`localFlowEntry` conjunct we end up with the worst case. We'll need to
watch this particular join-ordering until we get better join-ordering
directives.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
19a9285d00
Dataflow: Reshuffle a few conjuncts.
2020-11-13 15:09:29 +01:00
Anders Schack-Mulligen
7a95466241
Dataflow: Remove superfluous conjuncts.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
03ef9d00ec
Dataflow: Refactor call contexts.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
dc2b2cc13f
Dataflow: Some renamings.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
d037909c7b
Dataflow: Minor reorderings and renamings.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
00d726de3f
Dataflow: Refactor stage 4 read and stores.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
2afc572a34
Dataflow: Refactor stage 2 read and stores.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
b0e5925fea
Dataflow: Refactor stage 3 conscand predicates.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
261ef0fbff
Dataflow: Refactor forward stores and remove some useless conjuncts.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
628e0a795a
Dataflow: A few variable renamings.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
bfd8a3d104
Dataflow: Rename stage 2 cons-cand predicates.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
0a60a3abb3
Dataflow: Align on ApNil.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
60b51011b9
Dataflow: Minor refactor of Stage2::revFlow.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
c054295347
Dataflow: Rename option type branches.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
7eeae49e06
Dataflow: Remove AccessPathFront column.
...
This column is functionally determined from the access path, and was
merely included to help with some join-orders that no longer appear
problematic.
2020-11-13 15:09:28 +01:00
Anders Schack-Mulligen
1fe423550f
Dataflow: Stage comments and some formatting.
2020-11-13 15:09:27 +01:00
Anders Schack-Mulligen
586d52fac0
Dataflow: More renaming.
2020-11-13 15:09:27 +01:00
Anders Schack-Mulligen
3f25df902f
Dataflow: Rename some types and variables.
2020-11-13 15:09:27 +01:00
Anders Schack-Mulligen
f3f968ce6d
Dataflow: Rename predicates.
2020-11-13 15:09:27 +01:00
Anders Schack-Mulligen
aab5263c6a
Dataflow: Add modules.
2020-11-13 15:09:22 +01:00
Jonas Jensen
8bb9e8a4af
Merge pull request #4592 from geoffw0/varnotused
...
C++: Work around two false positive issues with the UnusedLocals.ql query
2020-11-13 14:53:58 +01:00
yoff
f7361cae31
Merge pull request #4667 from RasmusWL/python-add-code-snippets
...
Python: Add code snippets for VS Code
2020-11-13 13:48:37 +01:00
Porcupiney Hairs
402a320a55
include suggestions from review.
2020-11-13 18:07:42 +05:30
Porcupiney Hairs
4b25532b9f
include suggestions from review.
2020-11-13 17:55:56 +05:30
Rasmus Wriedt Larsen
9f1d8cd1bb
Python: Convert indentation to spaces for VS Code snippets
2020-11-13 13:05:23 +01:00
Rasmus Wriedt Larsen
5200af5244
Python: Add code snippets for VS Code
...
Notice that in this form, the filename doesn't matter, and you need to specify
`scope` to limit the snippet to only trigger for `ql`.
2020-11-13 10:57:17 +01:00
Mathias Vorreiter Pedersen
b249777bfb
C++: Respond to review comments.
2020-11-13 10:44:06 +01:00
Tom Hvitved
708fca4a2f
C#: Update ConstantCondition.ql
2020-11-13 10:23:09 +01:00
Erik Krogh Kristensen
7f68b07665
Merge branch 'main' into regexpParse
2020-11-13 09:33:16 +01:00
Rasmus Lerchedahl Petersen
dc91406ff0
Python: make .expected empty
...
still need to annotate missing results
2020-11-13 09:22:57 +01:00
Tamás Vajk
19fac60e6d
Merge pull request #4661 from tamasvajk/feature/fix-var-decl-type-mention
...
C#: Fix parent of 'TypeMention' for some variable declaration
2020-11-13 09:08:21 +01:00
Rasmus Lerchedahl Petersen
e468d49b19
Python: routing tests 3-7 and some annotations
2020-11-12 23:07:01 +01:00
Rasmus Lerchedahl Petersen
4fe2576b9a
Python: start modernizing routing tests
2020-11-12 22:43:34 +01:00
Erik Krogh Kristensen
7cf7a44fda
autoformat
2020-11-12 22:33:00 +01:00
Rasmus Lerchedahl Petersen
823ed447df
Python: Add new-style tests
...
should perhaps move `LocalFlowStepTest` and `MaximalFlowStep` into where
they are referenced (they did not seem too reusable after all).
Should also add argument tests in the same way.
2020-11-12 21:57:29 +01:00
Erik Krogh Kristensen
49be7e959f
Merge branch 'main' into jwt
2020-11-12 21:36:09 +01:00
Erik Krogh Kristensen
99d03bab24
only flag the secret key in JWT
2020-11-12 21:36:05 +01:00
Porcupiney Hairs
eb6d6113d9
minor nit.
2020-11-13 00:39:09 +05:30
Tom Hvitved
94deed39a2
C#: Represent all expressions in post-order in the CFG
2020-11-12 20:04:48 +01:00
Tom Hvitved
202f7f07ec
C#: Update modulus analysis tests
2020-11-12 20:04:48 +01:00
Porcupiney Hairs
f8de94e906
refactor SpringWebClient
2020-11-13 00:32:27 +05:30
Porcupiney Hairs
2525cfd786
include suggestions from review.
2020-11-13 00:28:06 +05:30
Geoffrey White
0804df42d1
C++: Autoformat.
2020-11-12 18:23:11 +00:00
Dave Bartolomeo
f43d9119c8
Merge pull request #4573 from MathiasVP/interleave-op-instr-field-flow
...
C++: instruction -> operand field flow
2020-11-12 10:14:19 -05:00
Mathias Vorreiter Pedersen
5e1f36e7ff
Merge branch 'unsafe-use-of-this-query' of github.com:MathiasVP/ql into unsafe-use-of-this-query
2020-11-12 15:51:19 +01:00
Mathias Vorreiter Pedersen
f417831a23
C++: Add two more tests to 'unsafe use of this'. First, test that post-dominance removes some results. Second, that a cast to the pure virtual function's defining class (skipping past a derived class that overrides the function) followed by a call to the function still results in an alert. This is also undefined behavior.
2020-11-12 15:51:04 +01:00
Mathias Vorreiter Pedersen
896dee5fb7
C++: Fix dataflow pruning by evaluating successor before flowsToSink/flowsFromSource.
2020-11-12 15:47:48 +01:00
Mathias Vorreiter Pedersen
f2317aed55
C++/C#: Make post-dominator related predicates member predicates of IRBlock.
2020-11-12 15:41:52 +01:00
Tamas Vajk
dee1690748
C#: Remove duplicated pattern extraction logic
2020-11-12 14:34:54 +01:00
Geoffrey White
498177ce02
C++: Autoformat.
2020-11-12 13:30:58 +00:00
Tamas Vajk
3f150bb09b
C#: Reorganize patterns
2020-11-12 13:47:38 +01:00
Tamas Vajk
8cbe8bc6b5
C#: Fix parent of 'TypeMention' for some variable declaration
2020-11-12 13:43:13 +01:00
CodeQL CI
6696d18f56
Merge pull request #4659 from asgerf/js/autoformat-date-functions
...
Approved by erik-krogh
2020-11-12 11:32:47 +00:00
james
ce1082dc55
update several intros
2020-11-12 11:12:55 +00:00
james
34531d559a
fix toc entry
2020-11-12 10:46:37 +00:00
james
12c6009895
lots of changes
2020-11-12 10:43:04 +00:00
james
3d9efa1dc2
recombine projects
2020-11-12 10:43:03 +00:00
james
a23b351201
move global sphinx files
2020-11-12 10:43:02 +00:00
james
ad0f99eb1b
fix links to java files
2020-11-12 10:43:02 +00:00
james
164065377f
correct java tutorial filename
2020-11-12 10:43:02 +00:00
james
132d9814e6
label index articles
2020-11-12 10:43:02 +00:00
james
8878248ff7
add labels to articles
2020-11-12 10:43:02 +00:00
james
bab6d04139
ql language ref: change code blocks
2020-11-12 10:43:02 +00:00
james
28c7c42e34
add local objects.inv
2020-11-12 10:43:02 +00:00
james
c300ccf300
sort out codeql-cli-manual
2020-11-12 10:43:02 +00:00
james
896d46469b
reorg sphinx docs
2020-11-12 10:43:01 +00:00
Mathias Vorreiter Pedersen
00f067be84
Update cpp/change-notes/2020-11-12-unsafe-use-of-this.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-11-12 11:28:12 +01:00
James Fletcher
19b974832b
Merge pull request #4658 from github/main-126-merge
...
Merge rc/1.26 into main branch
2020-11-12 10:18:24 +00:00
Asger Feldthaus
4d3d982bde
JS: Autoformat date-functions file
2020-11-12 10:07:30 +00:00
james
9fc84f8061
Merge branch 'rc/1.26' into main-126-merge
2020-11-12 09:55:32 +00:00
Mathias Vorreiter Pedersen
50e90510ef
C++: Follow the new change-note protocol.
2020-11-12 10:27:11 +01:00
Mathias Vorreiter Pedersen
4c27c3757c
C++: Respond to more review comments.
2020-11-12 10:27:03 +01:00
Tamás Vajk
b5ef3bd5ec
Merge pull request #4516 from tamasvajk/feature/attributes
...
C#: Refactor attribute extraction
2020-11-12 09:57:46 +01:00
yo-h
7c3ea0e264
Merge pull request #4602 from aschackmull/java/changenote-3812
...
Java: Add change note for #3812 .
2020-11-11 15:14:58 -05:00
Erik Krogh Kristensen
044fbc0b49
optimize the regexp parser
2020-11-11 21:13:11 +01:00
Erik Krogh Kristensen
de6b21986c
bump extractor version string
2020-11-11 21:10:03 +01:00
Erik Krogh Kristensen
74d933d475
move change note
2020-11-11 21:09:08 +01:00
Erik Krogh Kristensen
67d581edec
Update javascript/2020-11-09-jwt.md
...
Co-authored-by: Asger F <asgerf@github.com >
2020-11-11 21:06:30 +01:00
Geoffrey White
2aa6ff6239
C++: Add comments about the temporary exclusions.
2020-11-11 17:33:16 +00:00
Mathias Vorreiter Pedersen
44e38ab6d2
Merge branch 'unsafe-use-of-this-query' of github.com:MathiasVP/ql into unsafe-use-of-this-query
2020-11-11 18:30:20 +01:00
Mathias Vorreiter Pedersen
e1ef41bd38
C++: Respond to review comments.
2020-11-11 18:29:51 +01:00
Mathias Vorreiter Pedersen
de0ca0aa74
Update cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-11-11 18:12:49 +01:00
luchua-bc
dcb7324643
Add the constraint that the caller method must throw an exception
2020-11-11 16:47:53 +00:00
Geoffrey White
5359e13421
C++: Remove abstraction of OperatorNew/DeleteAllocationFunction.
2020-11-11 15:35:34 +00:00
yoff
86fc9e62ef
Merge pull request #4650 from RasmusWL/python-set-literal-formatting
...
Python: Update set literal formatting
2020-11-11 15:35:12 +01:00
Alvaro Muñoz
30d8dce389
check that either there are no custom message interpolator configured, or there is at least one that is insecure
2020-11-11 12:53:54 +01:00
CodeQL CI
f9d62adcb2
Merge pull request #4567 from asgerf/js/date-functions
...
Approved by erik-krogh
2020-11-11 11:17:30 +00:00
Alvaro Muñoz
c3bc0d6c15
Apply formatting
2020-11-11 12:06:39 +01:00
Alvaro Muñoz
5b1858a514
Do not report the issue only if all message interpolators are secure
2020-11-11 11:50:15 +01:00
Rasmus Wriedt Larsen
611398586d
Merge pull request #4649 from yoff/python-dataflow-cfgparameters
...
Python: Make `ParameterNode` a `CfgNode`
2020-11-11 10:22:12 +01:00
Tamas Vajk
453c97a8c3
Fix expected files of failing tests
2020-11-11 09:57:52 +01:00
Tom Hvitved
e57134e8a4
C#: Address comments
2020-11-11 09:54:51 +01:00
Tom Hvitved
d6515e7963
C#: Changes to extraction of attributes in assemblies
...
- Only cache on `AttributeData` and not the parent entity.
- Move `CreateGeneratedExpressionFromArgument` to `Expression.cs`.
- Restructure the various `CreateGenerated` methods so child entities are
created inside them (and therefore no need to expose child index logic).
- Add locations to generated expressions.
- Avoid linear lookup in `CompilationUnit.cs`.
- Consolidate tests.
2020-11-11 09:54:51 +01:00
Tom Hvitved
b8d6070e00
C#: Remove redundant conjunct
2020-11-11 09:54:51 +01:00
Tom Hvitved
3048919fce
C#: Introduce AssertionFailure class
2020-11-11 09:54:51 +01:00
Tom Hvitved
91dd67798a
C#: Exclude assembly attribute expressions from CFG construction
2020-11-11 09:50:59 +01:00
Tamas Vajk
4b88b237b3
C#: Fix failing tests
2020-11-11 09:50:59 +01:00
Tamas Vajk
4d6ccb1ef4
C#: Add change note for attribute extraction refactoring
2020-11-11 09:46:18 +01:00
Tamas Vajk
ba730b6f02
Fix failing tests
2020-11-11 09:46:18 +01:00
Tamas Vajk
5f18840a9e
C#: Extract attributes of referenced assembly
2020-11-11 09:46:18 +01:00
Tamas Vajk
cdea3afced
C#: Change extraction of Attributes to have ID based on the location when location is from source
2020-11-11 09:46:18 +01:00
Tamas Vajk
c04d6f479c
C#: Change attribute extraction to use AttributeData and created generated expressions when missing
2020-11-11 09:46:18 +01:00
Tamas Vajk
883795e126
C#: Add attribute test for extraction from symbols without syntax nodes
2020-11-11 09:46:18 +01:00
Tamas Vajk
c14a63488c
C#: Add missing tests for attribute extraction
2020-11-11 09:46:18 +01:00
Rasmus Wriedt Larsen
9ed15732ed
Python: Update set literal formatting
...
Now that auto-formatting rules have been updated
2020-11-11 09:38:25 +01:00
Rasmus Lerchedahl Petersen
0710963fc3
Python: update test expectations
...
EssaNode -> ControlFlowNode
2020-11-10 23:58:55 +01:00
Erik Krogh Kristensen
e01d4b104e
update expected output
2020-11-10 23:42:38 +01:00
luchua-bc
018d5c46da
Simplify the query
2020-11-10 21:07:44 +00:00
Mathias Vorreiter Pedersen
8d4b948acf
Merge branch 'main' into interleave-op-instr-field-flow
2020-11-10 21:15:50 +01:00
Erik Krogh Kristensen
6b7f8dd505
fix parse errors related to char escapes and char ranges
2020-11-10 21:02:29 +01:00
Robert Marsh
14f1fa50f1
Merge branch 'main' into rdmarsh2/cpp/remove-initialize-nonlocal
...
Accept test changes from IR temporaries and block ordering
2020-11-10 11:14:26 -08:00
Geoffrey White
2c7a01952e
C++: Improve the changes to Iterator.
2020-11-10 17:11:47 +00:00
Jonas Jensen
fc764db8e1
Merge pull request #4643 from nickrolfe/getFileBySourceArchiveName
...
Replace getEncodedFile with shared getFileBySourceArchiveName predicate
2020-11-10 17:36:29 +01:00
Geoffrey White
c635166079
Merge remote-tracking branch 'upstream/main' into modelchanges2
2020-11-10 16:30:03 +00:00
Mathias Vorreiter Pedersen
a330cae2f9
C++: Update change-notes.
2020-11-10 17:24:45 +01:00
Mathias Vorreiter Pedersen
4bcf1f498b
C++: Add new query for unsafe use of this.
2020-11-10 17:23:55 +01:00
Pavel Avgustinov
60ea9cec6e
Update docs/ql-design-patterns.md
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2020-11-10 15:59:45 +00:00
Mathias Vorreiter Pedersen
884554692f
Merge pull request #4645 from geoffw0/oddsends2
...
C++: Odds and ends
2020-11-10 16:59:10 +01:00
Mathias Vorreiter Pedersen
618d9c33a1
Merge pull request #4642 from geoffw0/memberfn
...
C++: Improve MemberFunction.qll data flows
2020-11-10 16:54:42 +01:00
Jonas Jensen
da90717ef0
Merge pull request #4641 from aschackmull/autoformat-setliterals
...
C++/C#/Java/JavaScript/Python: Autoformat set literals.
2020-11-10 16:11:11 +01:00
Tom Hvitved
7e89e57f5d
Merge pull request #4606 from hvitved/csharp/dataflow/ef
...
C#: Precise data flow for EntityFramework(Core)
2020-11-10 15:54:20 +01:00
Rasmus Wriedt Larsen
14236709f6
Fix typo ql-design-patterns.md
...
Co-authored-by: Pavel Avgustinov <54942558+p0@users.noreply.github.com >
2020-11-10 15:39:45 +01:00
Nick Rolfe
ac4a1f1d9b
Update comment to be a QLDoc comment
2020-11-10 14:14:27 +00:00
Geoffrey White
be537a8021
C++: Move ThrowExpr, ReThrowExpr definitions to a more logical location.
2020-11-10 14:06:58 +00:00
Nick Rolfe
1e1eb7ee33
Replace getEncodedFile with shared getFileBySourceArchiveName predicate
...
While also making it work with paths for databases created on Windows.
2020-11-10 13:55:27 +00:00
Geoffrey White
2beb7824ec
C++: Backticks.
2020-11-10 13:35:05 +00:00
Geoffrey White
599034668f
C++: Fix typo.
2020-11-10 13:32:31 +00:00
Geoffrey White
f109e8ccbc
C++: Remove duplicate import.
2020-11-10 13:31:47 +00:00
Geoffrey White
c4fe8df04c
C++: Support data flow from parameter deref to return value.
2020-11-10 13:17:34 +00:00
Geoffrey White
4563e32e92
C++: Remove data flows we shouldn't need in MemberFunction.
2020-11-10 13:17:24 +00:00
Anders Schack-Mulligen
89ef6ea4eb
C++/C#/Java/JavaScript/Python: Autoformat set literals.
2020-11-10 13:32:27 +01:00
Alvaro Muñoz
02cf49a773
apply codeql formatting
2020-11-10 11:46:42 +01:00
Rasmus Lerchedahl Petersen
109d55eb25
Python: Make ParameterNode a CfgNode
...
Add a step from that `CfgNode` to the corresponding `EssaNode`.
The intended effect is seen in `ImpliesDataflow.expected`.
The efeect seen in other `.expected`-files is that parameter nodes
change type, that the extra steps are seen, and that flow from
`EssaVar`s is mirrored in flow from `CfgNode`s.
There is one surprise, which is the `.0` node in
`coverage/localFlow.expected`.
2020-11-10 11:35:50 +01:00
Alvaro Muñoz
24a47fbb0f
additional qldoc commentes
2020-11-10 10:48:47 +01:00
Alvaro Muñoz
3545edb92c
address code review suggestions
2020-11-10 10:45:14 +01:00
Tom Hvitved
697b0ba4c1
C#: Address review comments
2020-11-10 10:42:05 +01:00
Erik Krogh Kristensen
ae7c7607f1
fix typos in documentation strings
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-11-10 10:41:39 +01:00
Erik Krogh Kristensen
b5b4d6d62a
add change note
2020-11-10 10:41:39 +01:00
Erik Krogh Kristensen
5ecae55e77
add keys used by jsonwebtoken as CredentialsExpr
2020-11-10 10:41:39 +01:00
Erik Krogh Kristensen
e75259d3a6
model the verify function in jsonwebtoken
2020-11-10 10:41:39 +01:00
Erik Krogh Kristensen
6732493377
add model for jwt-decode
2020-11-10 10:41:36 +01:00
yoff
26286e534e
Merge pull request #4174 from yoff/SharedDataflow_PointsToImpliesDataflow
...
Python: Dataflow, Test that `pointsTo` implies data flow
merging now, will fix `self` in a later PR
2020-11-10 10:25:29 +01:00
Robert Marsh
c00587d2cb
C++/C#: Conflated memory as IR dump annotation
...
Removes the IR consistency checks for conflated memory and marks
instructions that have a conflated result with a percent sign (%)
instead. This avoids reimplementing part of the alias analysis logic
in the consistency check.
2020-11-09 14:55:47 -08:00
Porcupiney Hairs
38de9b6433
add request forgery query
2020-11-10 01:19:35 +05:30
CodeQL CI
1e048d8045
Merge pull request #4609 from asgerf/js/destructuring-export
...
Approved by erik-krogh
2020-11-09 15:47:00 +00:00
luchua-bc
bc899b6337
Move common code to a library and add more test cases
2020-11-09 14:14:54 +00:00
luchua-bc
b10552aa2e
Specify exported Android components for local Android DoS
2020-11-09 14:10:01 +00:00
luchua-bc
76a0db84ee
Query for detecting Local Android DoS caused by NFE
2020-11-09 14:10:00 +00:00
Anders Schack-Mulligen
31ec79819e
Merge pull request #4631 from luchua-bc/java-nfe-library
...
Java: Factor NumberFormatException out into a library file
2020-11-09 13:50:31 +01:00
yoff
3215f50b73
Merge pull request #4632 from RasmusWL/python-move-configurations-out-of-queries
...
Python: move configurations out of queries
2020-11-09 13:10:33 +01:00
luchua-bc
a83f9ced96
Change the query to only catch the common exception rethrown case
2020-11-09 12:07:43 +00:00
luchua-bc
d765c7bbb2
Update qldoc
2020-11-09 11:23:48 +00:00
Asger Feldthaus
32c5bc4836
JS: Update test case output (new flow is correct)
2020-11-09 11:19:47 +00:00
Mathias Vorreiter Pedersen
25ba6ca160
Merge pull request #4637 from jbj/temp-objects-perf-fixup
...
C++: pragma[noinline] parameter index predicates
2020-11-09 10:12:50 +01:00
Mathias Vorreiter Pedersen
3c2fb5a93f
Merge branch 'main' into interleave-op-instr-field-flow
2020-11-09 09:58:19 +01:00
Rasmus Wriedt Larsen
fbe51c51bb
Python: Add missing QLDoc
2020-11-09 09:05:08 +01:00
Jonas Jensen
b8b1f0c617
C++: pragma[noinline] parameter index predicates
...
A performance regression in `definitionByReferenceNodeFromArgument#ff`
was ultimately caused by a join on parameter indexes in
`DefinitionByReferenceNode.getArgument`. Joining on numbers in QL is
always fragile, and somehow the changes in #4432 had caused the join
order here to break.
Instead of tweaking the join order in the slow predicate itself, I added
`pragma[noinline]` to one of the predicates involved in the join on
parameter indexes. This should prevent us from getting similar
performance problems in the future when we write code that joins on
parameter numbers. Joining on indexes is always risky, but it's even
more risky when one of the predicates in the join is inlined by the
compiler and expands to further joins.
I tested performance by running `CgiXss.ql` on a ChakraCore snapshot.
Tuple counts before (I interrupted execution after five minutes or so):
(626s) Tuple counts for DataFlowUtil::definitionByReferenceNodeFromArgument#ff:
58162 ~0% {3} r1 = SCAN DataFlowUtil::DefinitionByReferenceNode#class#ff AS I OUTPUT I.<1>, -1, I.<0>
26934 ~0% {2} r2 = JOIN r1 WITH Instruction::IndexedInstruction#ff AS R ON FIRST 2 OUTPUT r1.<0>, r1.<2>
26934 ~1% {2} r3 = JOIN r2 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
26850 ~1% {2} r4 = JOIN r3 WITH Instruction::CallInstruction::getThisArgumentOperand_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r3.<1>
26850 ~0% {2} r5 = JOIN r4 WITH Operand::Operand::getDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>
26850 ~1% {2} r6 = JOIN r5 WITH Instruction::Instruction::getUnconvertedResultExpression_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r5.<1>
58162 ~0% {2} r7 = SCAN DataFlowUtil::DefinitionByReferenceNode#class#ff AS I OUTPUT I.<1>, I.<0>
58162 ~4% {3} r8 = JOIN r7 WITH Instruction::IndexedInstruction#ff AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>, r7.<0>
4026581120 ~0% {4} r9 = JOIN r8 WITH Instruction::CallInstruction::getPositionalArgumentOperand_dispred#fff_102#join_rhs AS R ON FIRST 1 OUTPUT r8.<2>, R.<1>, r8.<1>, R.<2>
31154 ~4% {2} r10 = JOIN r9 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff AS R ON FIRST 2 OUTPUT r9.<3>, r9.<2>
31154 ~8% {2} r11 = JOIN r10 WITH Operand::Operand::getDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r10.<1>
31154 ~0% {2} r12 = JOIN r11 WITH Instruction::Instruction::getUnconvertedResultExpression_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r11.<1>
58004 ~0% {2} r13 = r6 \/ r12
return r13
Tuple counts after:
(0s) Tuple counts for DataFlowUtil::definitionByReferenceNodeFromArgument#ff:
385785 ~6% {2} r1 = SCAN DataFlowUtil::DefinitionByReferenceNode#class#ff AS I OUTPUT I.<1>, I.<0>
385785 ~0% {3} r2 = JOIN r1 WITH Instruction::IndexedInstruction#ff AS R ON FIRST 1 OUTPUT r1.<0>, r1.<1>, R.<1>
385785 ~1% {3} r3 = JOIN r2 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r2.<2>, r2.<1>
198736 ~4% {2} r4 = JOIN r3 WITH Instruction::CallInstruction::getPositionalArgument#fff AS R ON FIRST 2 OUTPUT R.<2>, r3.<2>
198736 ~0% {2} r5 = JOIN r4 WITH Instruction::Instruction::getUnconvertedResultExpression_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>
385785 ~1% {3} r6 = SCAN DataFlowUtil::DefinitionByReferenceNode#class#ff AS I OUTPUT I.<1>, -1, I.<0>
186891 ~1% {2} r7 = JOIN r6 WITH Instruction::IndexedInstruction#ff AS R ON FIRST 2 OUTPUT r6.<0>, r6.<2>
186891 ~2% {2} r8 = JOIN r7 WITH Instruction::SideEffectInstruction::getPrimaryInstruction_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>
183201 ~3% {2} r9 = JOIN r8 WITH Instruction::CallInstruction::getThisArgumentOperand_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r8.<1>
183201 ~0% {2} r10 = JOIN r9 WITH Operand::Operand::getDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r9.<1>
175449 ~8% {2} r11 = JOIN r10 WITH Instruction::Instruction::getUnconvertedResultExpression_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r10.<1>
374185 ~3% {2} r12 = r5 \/ r11
return r12
2020-11-09 09:01:22 +01:00
Rasmus Wriedt Larsen
ed0e4f8425
Python: reasoning about => detecting
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-11-09 09:01:04 +01:00
Erik Krogh Kristensen
3ef5d89e39
update expected output
2020-11-08 23:27:38 +01:00
Erik Krogh Kristensen
17a687b344
testing many possible intersections, instead of a single intersection
2020-11-08 23:24:36 +01:00
Erik Krogh Kristensen
34fd0d89f5
finding the minimum that is not an FP - instead of finding the minimum and then checking if it was an FP. And detecting more FPs by finding when a witness pass through the accept state
2020-11-08 23:24:27 +01:00
Erik Krogh Kristensen
ac514b1739
remove false positives where the analysis would wrongly conclude that the accept state could not be reached
2020-11-08 23:24:03 +01:00
Erik Krogh Kristensen
5f199e8b1a
improve performance by removing bindingset[char]
2020-11-08 23:24:03 +01:00
Erik Krogh Kristensen
d038e9c658
small performance improvements
2020-11-08 23:24:03 +01:00
Erik Krogh Kristensen
a5e75f53ff
add support for escape char classes inside char classes
2020-11-08 23:22:49 +01:00
Erik Krogh Kristensen
0063cb140c
add support for \W, \S, \D
2020-11-08 23:16:56 +01:00
Erik Krogh Kristensen
2dd8b6ffef
support \f and \v in the \s class
2020-11-08 23:16:56 +01:00
Erik Krogh Kristensen
68fe03060d
support \d \s and \w in ReDoS.ql
2020-11-08 23:16:56 +01:00
Erik Krogh Kristensen
fa54ad1a5e
refactor character class implementation in ReDoS.ql - preparing support for RegExpCharacterClassEscape
2020-11-08 23:16:55 +01:00
Erik Krogh Kristensen
a09ffd5cda
expand getAOverlapBetweenCharacterClasses to support overlap between more char classes
2020-11-08 23:16:37 +01:00
Erik Krogh Kristensen
4ede04f4d1
improve performance by pruning based on shared root
2020-11-08 23:16:37 +01:00
Erik Krogh Kristensen
82252c0f1c
detect redos between charclass and inverted charclass
2020-11-08 23:16:34 +01:00
Aditya Sharad
e75082a249
Merge pull request #4620 from github/codeql-docs-reorg-1
...
[docs] Rename source files to match article titles
2020-11-06 12:18:14 -08:00
Taus
a9149b7e47
Python: Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-11-06 17:15:58 +01:00
Taus Brock-Nannestad
5a9cc0861c
Merge branch 'main' into python-add-source-nodes
2020-11-06 17:12:41 +01:00
Geoffrey White
62a8427d37
C++: Change note.
2020-11-06 15:55:31 +00:00
Geoffrey White
74a4f5887b
C++: Remove implementation import from printf.qll.
2020-11-06 15:44:11 +00:00
Geoffrey White
e065466180
C++: Give Snprintf a proper interface.
2020-11-06 15:38:57 +00:00
luchua-bc
d568eb635f
Update qldoc
2020-11-06 15:33:26 +00:00
Geoffrey White
0790fb6324
Update cpp/change-notes/2020-11-02-unused-local-variable.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-11-06 14:42:48 +00:00
yoff
45317bcec9
Update python/ql/test/library-tests/PointsTo/new/code/w_function_values.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-06 15:03:20 +01:00
Rasmus Wriedt Larsen
9ebe59d393
Python: Move UnsafeDeserialization configuration to own file
2020-11-06 14:27:37 +01:00
luchua-bc
450ff26694
Convert the query to a library
2020-11-06 13:25:00 +00:00
Rasmus Wriedt Larsen
d38c48d2c8
Python: Move ReflectedXSS configuration to own file
2020-11-06 14:24:31 +01:00
Rasmus Wriedt Larsen
1897a0d59a
Python: Move PathInjection configuration to own file
...
This one required a bit more thought, but ended up pretty nicely. Had to write
some QLDoc, but I think it turned out OK.
2020-11-06 14:21:23 +01:00
Rasmus Wriedt Larsen
0c6bd8401a
Python: Move SqlInjection configuration to own file
2020-11-06 14:09:46 +01:00
Rasmus Wriedt Larsen
6299b73a46
Python: Move CommandInjection configuration to own file
2020-11-06 14:07:06 +01:00
Rasmus Wriedt Larsen
7c04c59456
Python: Move CodeInjection configuration to own file
...
This makes it easy to extend the sources/sinks of the configuration and re-run
the query from the query console on LGTM.com.
File location in `semmle.<lang>.security.dataflow.<QueryName>.qll` is matching
what we currently do in other languages (JS and C# sampled).
I did not follow the pattern in other languages for wrapping all the code in a
`module CodeInjection`, since I didn't understand the value in doing so -- I
would like confirmation from the other teams if we _should_ actually do that,
before merging.
2020-11-06 13:58:06 +01:00
Rasmus Lerchedahl Petersen
fe186bf854
Python: Add test
2020-11-06 13:30:11 +01:00
Alvaro Muñoz
9db340c9ca
add some improvements to the bean validation query
2020-11-06 13:08:45 +01:00
Asger Feldthaus
acb30e73bc
JS: More precise handling of default import fallback
2020-11-06 12:04:41 +00:00
Rasmus Lerchedahl Petersen
64b9e9150e
Python: only show results in extracted files
2020-11-06 12:01:16 +01:00
Erik Krogh Kristensen
16473fc2a4
matching a inverted char class with a char
2020-11-06 10:18:57 +01:00
Erik Krogh Kristensen
804aaf36f0
support inverted char class and dot
2020-11-06 10:18:57 +01:00
Erik Krogh Kristensen
64d680e2d3
support that an inverted char class can intersect with itself
2020-11-06 10:18:57 +01:00
Erik Krogh Kristensen
321cf09bd8
add redos support for the simplest possible inverted char class
2020-11-06 10:18:57 +01:00
Erik Krogh Kristensen
d04f3df1cd
remove rendundant check
2020-11-06 10:18:57 +01:00
Asger Feldthaus
1e45bc75c4
JS: Add change note in new format
2020-11-06 09:14:03 +00:00
Asger Feldthaus
24714c41be
JS: Update test output after rebase
2020-11-06 09:14:03 +00:00
Asger Feldthaus
9e25bbc4ed
JS: Add support for moment-timezone as well
2020-11-06 09:13:52 +00:00
Asger Feldthaus
7bf21d80b2
JS: Shift line numbers in test file
2020-11-06 09:13:52 +00:00
Asger Feldthaus
9418c6c8fe
JS: Add support for dateformat package
2020-11-06 09:13:52 +00:00
CodeQL CI
9f2eb84f2b
Merge pull request #4624 from erik-krogh/concatFix
...
Approved by asgerf
2020-11-06 09:11:41 +00:00
Asger Feldthaus
39c8226fba
JS: Autoformat
2020-11-06 09:06:20 +00:00
Asger Feldthaus
790526b529
JS: Some fixes and address review comments
2020-11-06 09:06:20 +00:00
Asger Feldthaus
8a3fba05e9
JS: Add steps through date-formatting functions
2020-11-06 09:06:18 +00:00
Anders Schack-Mulligen
cb77e460ae
Merge pull request #4600 from porcupineyhairs/urirefactor
...
Java : Refactor all instances of `java.net.URI` into TypeUri
2020-11-06 09:35:09 +01:00
Asger Feldthaus
d07e69e529
JS: Improve handling of destructuring export declaration
2020-11-05 23:51:44 +00:00
CodeQL CI
a908e5938e
Merge pull request #4574 from erik-krogh/jsdom
...
Approved by asgerf
2020-11-05 22:13:39 +00:00
Erik Krogh Kristensen
9137759d7c
calculate the size of the concatenation before doing the actual concatenation in Expr.qll
2020-11-05 22:55:52 +01:00
Tom Hvitved
a3894be1c5
Merge pull request #4607 from hvitved/csharp/msbuild-mono-no-shared-compilation
...
C#: Disable shared compilation when building with Mono+MSBuild
2020-11-05 19:56:25 +01:00
Geoffrey White
c9f846e0d2
C++: Give Iterator a proper interface.
2020-11-05 16:43:50 +00:00
Geoffrey White
b5326b3937
C++: Give OperatorNewAllocationFunction, OperatorDeleteAllocationFunction proper interfaces.
2020-11-05 16:43:49 +00:00
Geoffrey White
7f54379a0c
C++: Make more function models private (except a few that are used outside the library).
2020-11-05 16:43:42 +00:00
Taus Brock-Nannestad
7c58b28e36
Python: Write DataFlow::update more succinctly
...
This has no impact on performance, but it cleans up the code a bit,
and (hopefully) makes it more readable.
2020-11-05 16:47:41 +01:00
Taus Brock-Nannestad
bae4acabb1
Python: Fix bad join in StrConst::isUnicode
...
Also fixes a bug ("`B`" was not recognised as a bytestring prefix).
The basic idea behind this fix is that the set of possible prefixes is
fairly small, so it's easier just to precompute them, and then join
them with the entire prefix of the string in question (rather than
look at each string in isolation, get its prefix, and _then_ check
whether it looks like it's a unicode string prefix, which essentially
is what the code did before).
2020-11-05 16:45:27 +01:00
Taus Brock-Nannestad
1251bc57f5
Python: Fix bad join in TObject::literal_instantiation
...
Here, `context.appliesTo(n)` was being distributed across all of the
disjuncts, which caused poor performance.
The new helper predicate, `literal_node_class` should be fairly small,
since it only applies to a subset of `ControlFlowNode`s, and only
assigns a limited set of `ClassObjectInternal`s to these nodes.
2020-11-05 16:40:29 +01:00
Taus Brock-Nannestad
35a63e2411
Python: Fix bad join in regex::used_as_regex
...
Since the number of relevant attributes in the `re` module is fairly
small, it made sense to factor this out in a separate predicate, and
the join order also became more sensible.
2020-11-05 16:33:59 +01:00
Taus Brock-Nannestad
035e747ad5
Python: Fix slow use of regexCapture in Builtin::strValue
...
This is only _really_ expensive when there are a _lot_ of strings in
the database, but for this case, where we're always extracting the
same substring of the string, it's easier -- and faster -- to just
make a substring operation directly.
2020-11-05 16:33:33 +01:00
Taus Brock-Nannestad
83ba8c9bf5
Python: Add LocalSourceNode and flowsTo
...
This fixes the major performance problem with type tracking on
some (pathological) databases.
The interface could probably be improved a bit. In particular, I'm
thinking that we might want to have `DataFlow::exprNode` return a
`LocalSourceNode` so that a cast isn't necessary in order to use
`flowsTo`.
I have added two `cached` annotations. The one on `flowsTo` is
crucial, as performance regresses without it. The one on
`simpleLocalFlowStep` may not be needed, but Java has a similar
annotation, and to me it makes sense to have this relation cached.
2020-11-05 16:26:03 +01:00
Erik Krogh Kristensen
e124ba66b4
moving jsdom sink to js/xss
2020-11-05 16:10:33 +01:00
james
f85f99c6c2
update ql-language-reference links
2020-11-05 14:54:14 +00:00
james
e5fff6445a
rename ql-handbook -> ql-language-reference
2020-11-05 14:43:39 +00:00
james
d749b839fa
ql lang spec: update links
2020-11-05 14:40:45 +00:00
james
21cdf896bb
first pass through files and links
2020-11-05 14:36:35 +00:00
Tom Hvitved
10ab3304c1
Merge pull request #4575 from hvitved/csharp/cfg/post-dominance
...
C#: Restrict post-dominance to normal execution
2020-11-05 15:31:13 +01:00
Anders Schack-Mulligen
45d117b68e
Merge pull request #4603 from pwntester/new_deser_sink
...
New UnsafeDeserialization sink and improvements to SnakeYaml sink
2020-11-05 13:09:15 +01:00
Rasmus Lerchedahl Petersen
6cecd3ba83
Python: Move and rename query
2020-11-05 11:49:39 +01:00
Alvaro Muñoz
f103955f38
change qldoc formating according to LSP suggestion
2020-11-05 11:48:26 +01:00
james
6ed290f2bd
rename rst files
2020-11-05 09:43:40 +00:00
CodeQL CI
89a808cafe
Merge pull request #4552 from erik-krogh/tsImport
...
Approved by asgerf
2020-11-05 09:23:58 +00:00
CodeQL CI
b55f18bffd
Merge pull request #4549 from erik-krogh/pruneReturn
...
Approved by asgerf
2020-11-05 09:13:21 +00:00
CodeQL CI
c85f817cee
Merge pull request #4579 from erik-krogh/redos
...
Approved by asgerf
2020-11-05 08:38:44 +00:00
Robert Marsh
2f204869e7
Merge pull request #4604 from criemen/ir-block-sort-order
...
C++, C# IR: Stabilize sort order for basic blocks.
2020-11-04 18:22:23 -05:00
Erik Krogh Kristensen
342b6a4f2d
Update javascript/ql/src/semmle/javascript/security/performance/SuperlinearBackTracking.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-11-04 22:37:56 +01:00
Tom Hvitved
1ba9e29a40
C#: Precise data flow for EntityFramework(Core)
2020-11-04 19:48:03 +01:00
Alvaro Muñoz
302062b670
Merge branch 'new_deser_sink' of https://github.com/pwntester/ql into new_deser_sink
2020-11-04 18:58:57 +01:00
Alvaro Muñoz
6fef63306e
add qldoc
2020-11-04 18:58:41 +01:00
Erik Krogh Kristensen
e16fa0668a
update expected output
2020-11-04 18:24:31 +01:00
Asger Feldthaus
5eb3067f58
JS: Add test case
2020-11-04 16:50:23 +00:00
Geoffrey White
48628fa195
Merge pull request #4589 from criemen/model-vector-emplace
...
C++: Model std::vector emplace and emplace_back()
2020-11-04 16:09:31 +00:00
Tom Hvitved
b5063bbcb5
Merge pull request #4495 from hvitved/csharp/dataflow/summaries
...
C#: Shared interface/implementation for flow summaries
2020-11-04 17:02:19 +01:00
Cornelius Riemenschneider
78d885ee7d
C++: Accept test output.
2020-11-04 16:45:07 +01:00
Cornelius Riemenschneider
44d6584fa2
C++, C#: Auto-format.
2020-11-04 16:26:56 +01:00
Cornelius Riemenschneider
a13947424a
C++, C# IR: Stabilize sort order for basic blocks.
2020-11-04 16:26:56 +01:00
Cornelius Riemenschneider
e7e5754270
C++: Add taint model for std::vector::emplace/_back.
2020-11-04 16:20:01 +01:00
Erik Krogh Kristensen
03c46c9be0
autoformat
2020-11-04 16:18:24 +01:00
yoff
79fcf598f3
Merge pull request #4608 from RasmusWL/patch-1
...
Python: Remove unnecessary cached annotation from adjacentRefUse
2020-11-04 16:08:30 +01:00
Cornelius Riemenschneider
62a02cde73
C++: Add test to show missing taint steps for std::vector::emplace/_back
2020-11-04 16:07:15 +01:00
Cornelius Riemenschneider
081ab1e2bb
C++: Add std::vector::emplace/_back to our STL model.
2020-11-04 16:07:08 +01:00
Rasmus Lerchedahl Petersen
38b2bb2828
Python: Add testfile with regressions
2020-11-04 15:55:59 +01:00
Ian Lynagh
6ff939db5c
Merge pull request #4432 from dbartol/dbartol/temporaries/work
...
C++: Represent temporary object initialization in AST and IR
2020-11-04 14:38:45 +00:00
Rasmus Lerchedahl Petersen
6df3b8d524
Python: Update query and expectation
2020-11-04 15:17:38 +01:00
Rasmus Wriedt Larsen
31247739d7
Python: Remove unnecessary cached annotation from adjacentRefUse
...
As discussed in https://github.com/github/codeql/pull/4544#pullrequestreview-516575676
2020-11-04 15:16:08 +01:00
Rasmus Lerchedahl Petersen
9baa7b73da
Merge branch 'main' of github.com:github/codeql into SharedDataflow_PointsToImpliesDataflow
2020-11-04 15:05:59 +01:00
yoff
62cb4ec974
Merge pull request #4605 from RasmusWL/python-fix-django-response-modeling
...
Python: fix django response modeling
2020-11-04 15:00:52 +01:00
Tom Hvitved
131a05563a
C#: Disable shared compilation when building with Mono+MSBuild
2020-11-04 14:16:25 +01:00
Porcupiney Hairs
0a028dcb47
Java : Refactor all instances of java.net.URI into TypeUri
2020-11-04 18:23:26 +05:30
Rasmus Wriedt Larsen
5cf8285717
Python: Fix default mimetype for django FileResponse
2020-11-04 12:28:51 +01:00
Rasmus Wriedt Larsen
826aedeb85
Python: Remove resolved TODO
2020-11-04 12:17:31 +01:00
Rasmus Wriedt Larsen
353505ec6c
Python: Handle content of Django redirects correctly
2020-11-04 12:10:58 +01:00
Taus
180373c41d
Merge pull request #4597 from yoff/python-fix-ql-doc
...
Python: Fix ql doc
2020-11-04 11:37:32 +01:00
Rasmus Wriedt Larsen
92dc7dc2f3
Python: Use mimetype instead of content-type in django modeling
...
This enables the XSS query to actually find results from django responses.
2020-11-04 11:34:20 +01:00
Alvaro Muñoz
aa7b87aa33
Update java/change-notes/2020-11-04-commonslang-unsafe-deserialization-sinks.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-11-04 10:58:27 +01:00
Alvaro Muñoz
b284141a16
Merge branch 'new_deser_sink' of https://github.com/pwntester/ql into new_deser_sink
2020-11-04 10:51:07 +01:00
Alvaro Muñoz
436563d914
ChangeNote for new unsafe deserialization sinks
2020-11-04 10:50:50 +01:00
Anders Schack-Mulligen
22b4df0f3c
Merge pull request #4512 from luchua-bc/sensitive-broadcast
...
Java: Sensitive broadcast
2020-11-04 10:47:48 +01:00
Alvaro Muñoz
6f78b725e6
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-11-04 10:43:37 +01:00
Anders Schack-Mulligen
14c4d8d565
Java: Add change note for #3812 .
2020-11-04 10:15:08 +01:00
Anders Schack-Mulligen
26495225e0
Update java/ql/src/experimental/Security/CWE/CWE-927/SensitiveBroadcast.qhelp
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-11-04 10:05:55 +01:00
luchua-bc
3f0cdb6a1a
Update qldoc and comments
2020-11-03 19:40:28 +00:00
Tom Hvitved
c5abf29dfc
C#: Update flow-summary test
2020-11-03 20:28:42 +01:00
Dave Bartolomeo
4cc9110dbd
Fix test expectation
2020-11-03 13:39:33 -05:00
Calum Grant
4259c81061
Merge pull request #4599 from github/calumgrant/catchup-1.26
...
Catchup 1.26
2020-11-03 17:16:05 +00:00
Dave Bartolomeo
f0b9794907
Merge remote-tracking branch 'upstream/main' into work
2020-11-03 11:33:44 -05:00
luchua-bc
fa54c23a83
Handle the edge case that an exception is rethrown in a catch clause
2020-11-03 16:31:12 +00:00
Anders Schack-Mulligen
92494441a7
Merge pull request #4554 from aschackmull/dataflow/reverse-partial
...
Dataflow: Add support reverse partial flow exploration.
2020-11-03 15:34:30 +01:00
Tom Hvitved
438b8dd273
C#: Fix typos
2020-11-03 14:57:07 +01:00
Erik Krogh Kristensen
b02004430c
prune results that end with newline, where the input cannot contain newlines
2020-11-03 14:48:39 +01:00
Erik Krogh Kristensen
120faf9d1a
add a code injection sink for JSDOM when "runScripts" is set to "dangerously"
2020-11-03 14:29:00 +01:00
Tom Hvitved
f4d1d73bcd
C#: Shared interface/implementation for flow summaries
2020-11-03 13:47:28 +01:00
luchua-bc
f8fd2ea821
Add qldoc and autoformat query
2020-11-03 12:23:40 +00:00
Rasmus Lerchedahl Petersen
1023b239e4
Python: Simplify doc
2020-11-03 12:10:00 +01:00
yoff
d6a33a1253
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-03 12:04:43 +01:00
yoff
104ff5d217
Merge pull request #4596 from RasmusWL/python-import-customizations
...
Python: Import Customizations into python
2020-11-03 11:49:51 +01:00
Rasmus Lerchedahl Petersen
b71ea40dbd
Python: QL doc for Werkzeug
2020-11-03 11:44:48 +01:00
Rasmus Lerchedahl Petersen
1773cc3a38
Python: QL doc for MySQLdb
2020-11-03 11:39:28 +01:00
Rasmus Lerchedahl Petersen
01783acca6
Python: QL doc for RemoteFlowSources
2020-11-03 11:37:34 +01:00
Rasmus Lerchedahl Petersen
f44cbf4b6c
Python: QL doc for TypeTracker
2020-11-03 11:32:57 +01:00
Rasmus Lerchedahl Petersen
50eb51b6fe
Python: QL doc for StepSummary
2020-11-03 11:30:52 +01:00
Rasmus Lerchedahl Petersen
6103dbcfff
Python: QL doc for Node
2020-11-03 11:13:58 +01:00
Rasmus Lerchedahl Petersen
2bb1917733
Python: QlDoc for content
2020-11-03 11:10:33 +01:00
Rasmus Wriedt Larsen
c04e96453d
Update ::Range part of CodeQL design patterns
...
Co-authored-by: Pavel Avgustinov <54942558+p0@users.noreply.github.com >
2020-11-03 11:07:11 +01:00
Jonas Jensen
76fd710946
Merge pull request #4571 from MathiasVP/better-syntax-for-false-positives-and-negatives-inline-expectation
...
C++/Python: Better syntax for false positives and negatives in inline expectations
2020-11-03 11:05:21 +01:00
Rasmus Wriedt Larsen
cac336d053
Python: Import Customizations into python
...
Using the pattern from JS and Java to make this the _first_ import in `<lang>.qll`
2020-11-03 10:23:05 +01:00
Jonas Jensen
5680b2df13
Merge remote-tracking branch 'upstream/main' into better-syntax-for-false-positives-and-negatives-inline-expectation
...
Required fixing up semantic conflicts in tests.
Conflicts:
python/ql/test/experimental/library-tests/frameworks/stdlib/Decoding.py
2020-11-03 09:47:26 +01:00
Anders Schack-Mulligen
89361a3b75
Merge pull request #3812 from luchua-bc/java-android-remote-source
...
Java: Add remote source of Android intent extra
2020-11-03 09:35:40 +01:00
Anders Schack-Mulligen
2971784f9c
Dataflow: Add missing qldoc and sync.
2020-11-03 09:21:48 +01:00
Anders Schack-Mulligen
7eb64aa998
Dataflow: Code review fixes.
2020-11-03 09:16:20 +01:00
Anders Schack-Mulligen
1ae76a80aa
Dataflow: Fix qldoc.
2020-11-03 09:16:20 +01:00
Anders Schack-Mulligen
d5be4d7b92
Dataflow: Add support reverse partial flow exploration.
2020-11-03 09:16:19 +01:00
Dave Bartolomeo
0d1fbd1bdc
Fix annotations
2020-11-02 18:03:40 -05:00
Taus
82f37e97c8
Merge pull request #4595 from tausbn/python-promote-dataflow-libraries
...
Python: Promote experimental data-flow libraries
2020-11-02 23:55:05 +01:00
Dave Bartolomeo
e9d1f0dacf
Merge remote-tracking branch 'upstream/main' into work
2020-11-02 17:31:15 -05:00
Taus Brock-Nannestad
69d2d714a2
Python: Update identical-files.json
2020-11-02 23:25:58 +01:00
Taus Brock-Nannestad
5dadb0f476
Python: Fix imports in tests
2020-11-02 23:02:29 +01:00
Taus Brock-Nannestad
8752b1af1e
Python: Fix up remaining data-flow library copies
2020-11-02 23:02:04 +01:00
Robert Marsh
0e4d69709f
C++/C#: autoformat
2020-11-02 14:00:53 -08:00
Robert Marsh
f917cf826f
C++: accept test output
2020-11-02 13:59:23 -08:00
Taus Brock-Nannestad
b7773849d7
Python: Fix up some comments
2020-11-02 22:57:40 +01:00
Taus Brock-Nannestad
d8c554ed4f
Python: Add redirects to old data-flow libraries
2020-11-02 22:20:16 +01:00
Taus Brock-Nannestad
a5121babc8
Python: The one with changes that don't look like renames anymore
2020-11-02 22:19:15 +01:00
Taus Brock-Nannestad
fb6a02e060
Python: More import fixups
2020-11-02 22:17:42 +01:00
Taus Brock-Nannestad
5156bf756d
Python: Promote data-flow libraries
...
Step 1: Moving stuff around. Also includes a bit of import renaming.
2020-11-02 22:15:38 +01:00
Taus
25e88ed585
Merge pull request #4588 from yoff/python-pep-249
...
Python: Model PEP 249
2020-11-02 18:57:15 +01:00
yoff
1535ce1f5d
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 18:26:37 +01:00
Rasmus Lerchedahl Petersen
ea74c7f12b
Python: add tests
2020-11-02 17:59:51 +01:00
Rasmus Lerchedahl Petersen
cb47b57440
Python: fix typos
2020-11-02 17:22:01 +01:00
yoff
222a2f7f5d
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:19:21 +01:00
yoff
ca34219ec5
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:19:10 +01:00
yoff
1c83d67513
Update python/ql/src/experimental/semmle/python/frameworks/PEP249.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-11-02 17:18:18 +01:00
Rasmus Lerchedahl Petersen
6a81987284
Python: Rename and add docs
2020-11-02 17:17:12 +01:00
Erik Krogh Kristensen
e6e4a485c8
add JSDOM.fromUrl() as a request forgery sink
2020-11-02 17:05:56 +01:00
Taus
2dfffdbab8
Merge pull request #4590 from RasmusWL/python-model-base64
...
Python: Model encoding/decoding with base64 module
2020-11-02 17:00:21 +01:00
Rasmus Lerchedahl Petersen
6d850b2e0c
Merge branch 'main' of github.com:github/codeql into python-pep-249
2020-11-02 16:58:31 +01:00
Geoffrey White
6629696e8a
C++: Change note.
2020-11-02 15:46:38 +00:00
Geoffrey White
e9bde9b711
C++: Work around issue with ConditionalDeclExpr.
2020-11-02 15:46:38 +00:00
Geoffrey White
79bda0055c
C++: Work around issue with 'Unknown literal'.
2020-11-02 15:46:36 +00:00
yoff
ac85a77ac5
Update python/ql/src/experimental/semmle/python/Frameworks.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-02 16:40:22 +01:00
Calum Grant
cb527cae73
Merge pull request #4583 from tausbn/python-test-2
...
Python: Promote experimental queries
2020-11-02 14:42:27 +00:00
luchua-bc
864411b4b9
Updates to Android stub classes
2020-11-02 14:06:44 +00:00
Rasmus Wriedt Larsen
247fd4f5f3
Python: Make encoding/decoding preserve taint automatically
...
With the way we have set things up, there is no way to opt out of this behavior.
2020-11-02 14:53:30 +01:00
Rasmus Lerchedahl Petersen
36e364d6ef
Python: Django use PEP 249
2020-11-02 14:49:34 +01:00
Rasmus Wriedt Larsen
66f5d0d9d5
Python: Model encoding/decoding with base64 module
2020-11-02 14:44:53 +01:00
Rasmus Wriedt Larsen
eff244db71
Python: Add Encoding concept
...
I wasn't able to find a good opposite of "parsing", so left that out of the list
of intended purposes.
2020-11-02 14:19:20 +01:00
Taus Brock-Nannestad
8147ad4e0b
Python: Remove irrelevant files
2020-11-02 14:08:59 +01:00
Taus Brock-Nannestad
f84ab2fa99
Python: Remove old data-flow tests
2020-11-02 14:07:04 +01:00
Taus Brock-Nannestad
9d6c07c8df
Python: Add copy of old queries
2020-11-02 13:35:20 +01:00
luchua-bc
6a8ce37428
Add query for initCause and addSuppressed
2020-11-02 11:59:14 +00:00
luchua-bc
8da9b9d3ea
Add documentation to new library method and use the singular form
2020-11-02 10:53:46 +00:00
Taus Brock-Nannestad
b620b9b7c6
Python: Fixup CWE-022 tests
...
This was a bit of a mess, since there was crosstalk between the
TarSlip and PathInjection queries. (Also one of these needs the
`options` file to be in one way, and the other not). To fix this, I
split these out into separate directories.
2020-11-02 11:46:28 +01:00
Taus Brock-Nannestad
af7626a6b3
Python: Fixup CWE-079 tests
2020-11-02 11:46:02 +01:00
Taus Brock-Nannestad
57b51090ef
Python: Fixup CWE-094 tests
2020-11-02 11:45:44 +01:00
Taus Brock-Nannestad
ebb593466d
Python: Fixup CWE-089 tests
2020-11-02 11:45:14 +01:00
Taus Brock-Nannestad
7a395bf7c8
Python: Fixup CWE-078 tests.
2020-11-02 11:44:42 +01:00
Taus Brock-Nannestad
52dc905037
Python: Fixup CWE-502 tests.
2020-11-02 11:44:00 +01:00
Geoffrey White
35f4646ee0
C++: Add test cases for UnusedLocals.
2020-11-02 10:40:42 +00:00
Rasmus Lerchedahl Petersen
d35bf8f446
Python: Update comments on PEP 249 module
2020-11-02 11:22:51 +01:00
Tom Hvitved
b78234fe83
Merge pull request #4586 from hvitved/csharp/dataflow/common-sub-type-join-fix
...
C#: Fix bad join-order in `commonSubTypeGeneral/2`
2020-11-02 09:40:54 +01:00
Tom Hvitved
e89a463b25
C#: Fix bad join-order in commonSubTypeGeneral/2
2020-11-01 20:08:14 +01:00
Rasmus Lerchedahl Petersen
0240670d62
Python: import frameworks
2020-11-01 18:02:36 +01:00
Rasmus Lerchedahl Petersen
babcf7acd9
Python: add two implementations of PEP249
2020-11-01 16:01:05 +01:00
luchua-bc
78d7fe2fbb
Detect rethrowing unprocessed exceptions in catch clause
2020-11-01 02:13:50 +00:00
luchua-bc
c89ebeeb5e
Text changes
2020-11-01 00:39:00 +00:00
Mathias Vorreiter Pedersen
6d0783a3bd
Python: Make sure that expected values with tag mimetype is wrapped in quotes if the value contains a space.
2020-10-31 18:13:12 +01:00
Mathias Vorreiter Pedersen
fc80ef2ed8
C++: Sync identical file.
2020-10-31 18:02:12 +01:00
Mathias Vorreiter Pedersen
870ed0039b
Python: Allow single quote strings and accept test changes.
2020-10-31 18:01:55 +01:00
Mathias Vorreiter Pedersen
0bc4d52d66
Python: Update more tests annotations. It looks like we need to allow single-quote strings to support the existing Python use-cases, but let's do that in the next commit.
2020-10-31 17:40:19 +01:00
Mathias Vorreiter Pedersen
ed9ad8b5e3
Merge branch 'main' into better-syntax-for-false-positives-and-negatives-inline-expectation
2020-10-31 16:52:16 +01:00
luchua-bc
7ac3fb41d5
Clean up query and test files
2020-10-31 13:37:36 +00:00
Dave Bartolomeo
69dee154f3
Fix PR feedback
2020-10-31 09:03:51 -04:00
luchua-bc
756db4c03a
Simplify the query and add more test cases
2020-10-31 01:33:24 +00:00
Taus
ce00d58329
Merge pull request #4584 from yoff/python-subclass-pattern
...
Python: Use subclass pattern for Models
2020-10-31 00:16:22 +01:00
Rasmus Lerchedahl Petersen
ae3227fc33
Python: initial sketch
2020-10-31 00:10:49 +01:00
Rasmus Lerchedahl Petersen
63cbc01c32
Python: Use subclass pattern for Models
2020-10-30 22:29:38 +01:00
CodeQL CI
4a59e69722
Merge pull request #4564 from asgerf/js/react-hooks
...
Approved by esbena
2020-10-30 21:00:31 +00:00
Taus Brock-Nannestad
f903e4ffbe
Python: Promote experimental queries
...
DO NOT MERGE
Also adds performance fix to `python.qll`.
2020-10-30 19:40:56 +01:00
Taus
ecc52a1bb9
Merge pull request #4541 from RasmusWL/python-port-reflected-xss
...
Python: Port reflected XSS query
2020-10-30 19:17:33 +01:00
luchua-bc
67af9b0f3e
Add comments and update JavaDocs of GenericServlet using the source JAR
2020-10-30 17:05:53 +00:00
Rasmus Lerchedahl Petersen
80360450de
Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss
2020-10-30 17:56:36 +01:00
Dave Bartolomeo
be180aac25
Fixup after merge
2020-10-30 12:52:58 -04:00
Taus
146787bb55
Merge pull request #4539 from yoff/python-port-path-injection
...
Python: port path injection
2020-10-30 17:46:51 +01:00
luchua-bc
93d1393ded
Add error-page check
2020-10-30 16:45:56 +00:00
Rasmus Lerchedahl Petersen
ef9999a4a1
Python: fix test annotation
2020-10-30 17:43:56 +01:00
Rasmus Lerchedahl Petersen
37ad59a92a
Python: subclas of known subclasses
2020-10-30 17:37:54 +01:00
Dave Bartolomeo
ec398b2a67
Merge remote-tracking branch 'upstream/main' into work
2020-10-30 12:36:33 -04:00
yoff
a3cc9b6982
Update python/ql/src/experimental/semmle/python/frameworks/Flask.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-30 17:29:35 +01:00
Cornelius Riemenschneider
310975bf8d
Merge pull request #4581 from criemen/printast-stmtpexpr
...
C++: Add support for StmtExpr to Print AST.
2020-10-30 17:29:23 +01:00
Asger Feldthaus
c7667d372e
JS: Address review comments
2020-10-30 16:25:30 +00:00
Dave Bartolomeo
42373417e2
Merge from main
2020-10-30 12:02:56 -04:00
Mathias Vorreiter Pedersen
45b24a9bc8
Python: Update inline-expectation tests
2020-10-30 16:53:33 +01:00
Mathias Vorreiter Pedersen
6ac740a490
Python: Sync identical file
2020-10-30 16:53:17 +01:00
Mathias Vorreiter Pedersen
ee77e988b2
C++: Allow strings in inline-expectation tests
2020-10-30 16:49:14 +01:00
Cornelius Riemenschneider
e7d995313e
C++: Address review.
2020-10-30 16:30:57 +01:00
Mathias Vorreiter Pedersen
177f94368e
C++: Respond to review comments and accept test changes.
2020-10-30 15:59:39 +01:00
Cornelius Riemenschneider
84fe7ba199
C++: Add support for StmtExpr to Print AST.
2020-10-30 15:53:54 +01:00
Cornelius Riemenschneider
d3631d8f2e
Merge pull request #4562 from criemen/printast-labels
...
C++: Change PrintAST to provide the predicates that can be used to traverse the AST.
2020-10-30 15:48:46 +01:00
Dave Bartolomeo
36b27add24
Simplify ordering of children with conversions using rank
...
In `getChild(int childIndex)`, the actual values of `childIndex` don't matter, as long as they are in the correct order. Rather than doing complicated math to compute the indices for the synthesized `.getFullyConverted()` children, just use the `rank` aggregate to order all children first by whether or not the child is a conversion, then by the original child index.
2020-10-30 10:00:23 -04:00
Rasmus Lerchedahl Petersen
e7c9bc388b
Python: support some custom subclasses
2020-10-30 14:16:48 +01:00
Rasmus Lerchedahl Petersen
e69349791a
Python: django.http.response.HttpRequest.write
2020-10-30 12:51:23 +01:00
Cornelius Riemenschneider
cf8f802310
C++: Rename predicate.
2020-10-30 12:51:19 +01:00
Cornelius Riemenschneider
ab42ddb0dc
C++: Adjust code for the conversions PR, provide correct childIndexes for the new nodes.
2020-10-30 12:48:53 +01:00
Rasmus Lerchedahl Petersen
ffe10d1b7c
Python: test HttpResponse.write
2020-10-30 12:16:12 +01:00
Rasmus Lerchedahl Petersen
fa3a7e6686
Python: Known subclasses of HttpResponse
2020-10-30 11:53:24 +01:00
Rasmus Lerchedahl Petersen
c962377ef4
Python: test for subclasses
2020-10-30 10:37:40 +01:00
Erik Krogh Kristensen
39028f62a3
add test for outDir
2020-10-30 10:37:10 +01:00
Asger Feldthaus
6ab7846e81
JS: Restrict getAContextInput
2020-10-30 09:28:06 +00:00
Jonas Jensen
ba41417d61
Merge pull request #4553 from geoffw0/samateregtests
...
C++: Additional pointer tests for DefaultTaintTracking.
2020-10-30 10:02:11 +01:00
Erik Krogh Kristensen
ebc4856456
detect more expensive regexps in js/polynomial-redos
2020-10-30 09:52:13 +01:00
Tom Hvitved
54e2741064
Merge pull request #4580 from hvitved/csharp/1.26-change-notes
...
C#: Convert 1.26 change notes
2020-10-30 09:17:52 +01:00
Tom Hvitved
6723e5b31c
C#: Restrict post-dominance to normal execution
2020-10-30 09:14:12 +01:00
Tom Hvitved
ade8ff9593
C#: Add more CFG tests
2020-10-30 09:14:12 +01:00
Tom Hvitved
91d72945d7
Merge pull request #4568 from hvitved/csharp/cfg/multi-asserts
...
C#: Fix CFG for assertions with multiple assertion arguments
2020-10-30 09:13:38 +01:00
Rasmus Lerchedahl Petersen
08af839757
Python: django.http.response.HttpResponseRedirect
2020-10-30 01:29:49 +01:00
Rasmus Lerchedahl Petersen
52be896666
Python: django.http.response.JsonResponse
...
It s possible this class is not relevant to XSS
2020-10-30 01:05:36 +01:00
Rasmus Lerchedahl Petersen
0f9b8595d1
Python: rename functions by vulnerability
2020-10-30 00:51:09 +01:00
Rasmus Lerchedahl Petersen
97153b56ad
Python: add false negatives to test
2020-10-30 00:48:19 +01:00
Rasmus Lerchedahl Petersen
262b249e10
Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss
2020-10-30 00:40:39 +01:00
Rasmus Lerchedahl Petersen
2ca86f5ea7
Python: django.http.response.HttpResponse
2020-10-30 00:22:53 +01:00
Robert Marsh
7e8770d731
C#: Remove reference to InitializeNonLocal in IR
2020-10-29 16:08:23 -07:00
Robert Marsh
5dfe04a7a7
C++: Respond to PR comments
2020-10-29 16:00:08 -07:00
Dave Bartolomeo
71531af343
Merge pull request #4577 from dbartol/extension-fix/work
...
Fix path transformer handling of extensionless files
2020-10-29 18:10:30 -04:00
Tom Hvitved
0111f140de
C#: Convert 1.26 change notes
2020-10-29 20:23:07 +01:00
Mathias Vorreiter Pedersen
b5234f9245
C++: Update IR inline-expectation tests
2020-10-29 19:11:54 +01:00
Mathias Vorreiter Pedersen
acf6ffb990
Python: Sync identical file
2020-10-29 19:07:10 +01:00
yo-h
5ac8475523
Merge pull request #4578 from aschackmull/java/changenotes
...
Java: Add missing change notes for 1.26
2020-10-29 13:32:28 -04:00
luchua-bc
5a6339c1af
Remove userid from the regex
2020-10-29 15:46:05 +00:00
Anders Schack-Mulligen
5687b7c158
Java: Move existing change note to new format.
2020-10-29 16:35:27 +01:00
Anders Schack-Mulligen
a9e0f61860
Java: Add change note for https://github.com/github/codeql/pull/4287
2020-10-29 16:33:09 +01:00
Anders Schack-Mulligen
4cd77175ab
Java: Add change note for https://github.com/github/codeql/pull/3542
2020-10-29 16:27:51 +01:00
Anders Schack-Mulligen
eddd1ef29c
Java: Add change note for https://github.com/github/codeql/pull/4081
2020-10-29 16:25:11 +01:00
Anders Schack-Mulligen
e671b463dc
Java: Add change note for https://github.com/github/codeql/pull/4123
2020-10-29 16:20:35 +01:00
Anders Schack-Mulligen
d6f595f6af
Java: Add change note for https://github.com/github/codeql/pull/3543
2020-10-29 16:14:56 +01:00
Anders Schack-Mulligen
8b6c3ab9d2
Java: Add change note for https://github.com/github/codeql/pull/4088
2020-10-29 16:11:26 +01:00
Anders Schack-Mulligen
1efb377465
Java: Add change note for https://github.com/github/codeql/pull/3855
2020-10-29 16:09:01 +01:00
Anders Schack-Mulligen
d9cef5bd48
Java: Add change note for https://github.com/github/codeql/pull/4044
2020-10-29 16:05:43 +01:00
Anders Schack-Mulligen
4677eb649e
Java: Add change note for https://github.com/github/codeql/pull/3938
2020-10-29 16:02:34 +01:00
Anders Schack-Mulligen
9dbfc835fe
Java: Add change note for https://github.com/github/codeql/pull/3881
2020-10-29 15:54:25 +01:00
Tom Hvitved
51f71d4e1d
C#: Fix CFG for assertions with multiple assertion arguments
2020-10-29 15:44:13 +01:00
Tom Hvitved
5cd707f17e
C#: Add CFG test for assertion with multiple assertion arguments
2020-10-29 15:44:13 +01:00
Anders Schack-Mulligen
b3fe333957
Merge pull request #4576 from aschackmull/java/adjust-beanvalidation-qhelp
...
Java: Tweak qhelp to make it markdown-compatible.
2020-10-29 15:43:40 +01:00
Anders Schack-Mulligen
1beb3bdccd
Java: Add change note for extensible security queries.
...
This covers #3928 , #3968 , and #4172 , among others.
2020-10-29 15:37:35 +01:00
Anders Schack-Mulligen
e3ba05937f
Java: Add change note for https://github.com/github/codeql/pull/3948
2020-10-29 15:30:09 +01:00
Anders Schack-Mulligen
7f9713956f
Java: Add change note for https://github.com/github/codeql/pull/4312 .
2020-10-29 15:24:28 +01:00
Dave Bartolomeo
4189567b8c
Fix PR feedback
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2020-10-29 10:15:45 -04:00
Dave Bartolomeo
42e075dfb8
Fix path transformer handling of extensionless files
2020-10-29 10:02:55 -04:00
Rasmus Lerchedahl Petersen
96e79a2702
Python: restrict to python files
2020-10-29 15:00:47 +01:00
Cornelius Riemenschneider
4276d1f3e5
C++: Add missing comment and update test results.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
7e667b9bec
C++: Add comment to FunctionNode.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
668764ce40
C++: Make new predicates private.
2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
8c925a20a7
C++: Provide the predicates that can be used to traverse the AST as metadata.
2020-10-29 14:48:47 +01:00
Anders Schack-Mulligen
0d926dcf70
Java: Tweak qhelp to make it markdown-compatible.
2020-10-29 14:39:01 +01:00
luchua-bc
90d11812be
Update the regex to be the original one
2020-10-29 13:04:15 +00:00
Mathias Vorreiter Pedersen
f3f9a044e0
C++: Accept more tests.
2020-10-29 13:55:45 +01:00
luchua-bc
b1d6bc5ba9
Use getDeclaringType() for getIntent() method call
2020-10-29 12:55:03 +00:00
Jonas Jensen
fa344d216f
Merge pull request #4493 from criemen/fix-4278-printast-conversions
...
Fix C++ Print AST handling of Conversions
2020-10-29 13:48:15 +01:00
Rasmus Lerchedahl Petersen
6658ee9dc8
Merge branch 'python-port-reflected-xss' of https://github.com/RasmusWL/codeql into RasmusWL-python-port-reflected-xss
2020-10-29 12:46:44 +01:00
CodeQL CI
7856e784e1
Merge pull request #4566 from asgerf/js/classnames
...
Approved by erik-krogh
2020-10-29 11:00:06 +00:00
Cornelius Riemenschneider
59dd892748
C++: Address review, fix bug related to Conversions.
2020-10-29 11:40:31 +01:00
Asger Feldthaus
fee944ac2a
Merge branch 'js/react-hooks' of github.com:asgerf/codeql into js/react-hooks
2020-10-29 10:38:21 +00:00
Asger Feldthaus
a4a6e3beb3
JS: Update dataflow tests
2020-10-29 10:38:09 +00:00
Jonas Jensen
0af62b8431
Merge pull request #4515 from geoffw0/modelchanges1
...
C++: Changes to models library.
2020-10-29 11:21:56 +01:00
Mathias Vorreiter Pedersen
835d3fc2b7
C++: Accept tests
2020-10-29 09:27:03 +01:00
Mathias Vorreiter Pedersen
43a231f0a5
C++: Store steps now go from operands to instructions, and read steps now go from instructions and operands. There are a couple of read steps that still target instructions because I couldn't decide on an operand to target.
2020-10-29 09:26:51 +01:00
Tamás Vajk
64dcfbd7fc
Merge pull request #4484 from tamasvajk/feature/custom-assert-methods
...
C#: Add support for custom assert methods (DoesNotReturnIfAttribute)
2020-10-29 09:10:09 +01:00
Mathias Vorreiter Pedersen
4be02a9463
C++: Use new syntax in field-flow tests
2020-10-29 08:48:37 +01:00
luchua-bc
2ee9a45e69
Use proper class inheritance
2020-10-28 22:05:30 +00:00
Mathias Vorreiter Pedersen
176522d011
C++: Update terminology in strings and QLDoc.
2020-10-28 22:28:07 +01:00
Mathias Vorreiter Pedersen
dfb373bae3
C++: Modify the syntax of inline expectation comments. The syntax is now $ tag1,tag2=value MISSING: tag3=value3 SPURIOUS: tag4=value4.
2020-10-28 22:27:15 +01:00
Dave Bartolomeo
c49e33f9cd
Fixup after merge
2020-10-28 16:59:13 -04:00
luchua-bc
908d659906
Minor updates
2020-10-28 20:23:22 +00:00
Dave Bartolomeo
7a2c59c194
Merge from main
2020-10-28 15:35:46 -04:00
Dave Bartolomeo
5a6cd4aca9
Fix test expectations for new nodes and edges in path queries
2020-10-28 14:47:42 -04:00
Asger Feldthaus
4343fbff0e
Merge branch 'js/classnames' of github.com:asgerf/codeql into js/classnames
2020-10-28 17:00:14 +00:00
Asger Feldthaus
469767d279
JS: Fix test output
2020-10-28 17:00:05 +00:00
Geoffrey White
ae84d1383e
Merge pull request #4565 from MathiasVP/instruction-tag-for-this-addr-and-load-fix
...
C++: Fix spelling in getInstructionTagId
2020-10-28 16:53:55 +00:00
Asger F
581441d585
Update javascript/ql/src/semmle/javascript/frameworks/React.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 16:29:15 +00:00
Asger F
43336ff5a9
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 16:29:07 +00:00
Asger Feldthaus
f99db23e7b
JS: Add test and fix for contextType
2020-10-28 16:23:36 +00:00
Asger F
056ce38dad
Update javascript/ql/src/semmle/javascript/frameworks/Classnames.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-28 14:35:37 +00:00
Tamas Vajk
410af42d2b
C#: Adjust PR feedback on assertion methods
2020-10-28 15:09:50 +01:00
Asger Feldthaus
081017ea8a
JS: Autoformat
2020-10-28 13:58:02 +00:00
Asger Feldthaus
3c437d319a
JS: Change note
2020-10-28 13:56:35 +00:00
Asger Feldthaus
3d86e855f3
JS: Add model of classnames and clsx
2020-10-28 13:56:35 +00:00
Tamás Vajk
59d9be48a7
Merge pull request #4438 from tamasvajk/feature/ast-fixes
...
C#: Fixes for AST printing
2020-10-28 14:52:24 +01:00
Alvaro Muñoz
a57308a519
Fix SnakeYaml query to account for Yaml subclasses and compose methods
2020-10-28 14:52:14 +01:00
Alvaro Muñoz
c28856d3dc
remove wicket taintstep from TaintTrackingUtil
2020-10-28 14:51:44 +01:00
Rasmus Lerchedahl Petersen
cf97a56844
Merge remote-tracking branch 'upstream/main' into python-port-path-injection
2020-10-28 14:43:33 +01:00
Asger Feldthaus
7ee3846142
JS: Add missing qldoc
2020-10-28 12:43:48 +00:00
yoff
c8bb0509e5
Merge pull request #4563 from tausbn/python-remove-refersto-from-regex-libs
...
Python: Remove `refersTo` from `regex.qll`
2020-10-28 13:37:14 +01:00
Mathias Vorreiter Pedersen
614e2ba851
C++: Fix spelling
2020-10-28 13:05:37 +01:00
Mathias Vorreiter Pedersen
8c9f09195d
Merge pull request #4561 from criemen/varargs-hierarchy
...
C++: Make BuiltInVarArgs* classes subclasses of VarArgsExpr.
2020-10-28 13:03:57 +01:00
Asger Feldthaus
7a3f0095f6
JS: Autoformat
2020-10-28 11:57:23 +00:00
Asger Feldthaus
c03532edfb
JS: Change note
2020-10-28 11:57:11 +00:00
Asger Feldthaus
d116b424f4
JS: Add model of react hooks and react-router
2020-10-28 11:57:11 +00:00
Asger Feldthaus
42c03ab2fd
JS: Add flow steps through dynamic imports
2020-10-28 11:57:08 +00:00
Tom Hvitved
2fea6f05f1
Merge pull request #4489 from hvitved/csharp/cil-to-string
...
C#: Simplify `toString()` for CIL entities
2020-10-28 12:56:10 +01:00
CodeQL CI
8e57f57643
Merge pull request #4559 from erik-krogh/redis
...
Approved by asgerf
2020-10-28 11:47:12 +00:00
Taus Brock-Nannestad
1503c5ea16
Python: Remove refersTo from regex.qll
...
This was causing the old `Object` API stuff to be evaluated when using
our new library models (specifically the Django model).
2020-10-28 12:41:17 +01:00
Tamas Vajk
1830eea50a
C#: Cleanup TypeMentions in AST printing
2020-10-28 12:34:12 +01:00
Tamas Vajk
444b100c51
Minor fix in definitions.qll
2020-10-28 12:23:12 +01:00
Tamas Vajk
a9e93e5681
C#: Fix GenericType locations in jump-to-definition
2020-10-28 12:07:27 +01:00
Anders Schack-Mulligen
f3e2bd0fd9
Merge pull request #3141 from pwntester/InsecureBeanValidation
...
Insecure Bean Validation query
2020-10-28 12:04:12 +01:00
Erik Krogh Kristensen
75d996a0f9
make promisify smaller
2020-10-28 11:59:21 +01:00
Erik Krogh Kristensen
bce06d3194
add test that promisify is not imprecise
2020-10-28 11:59:03 +01:00
Erik Krogh Kristensen
c49d5081cc
Update javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-28 11:45:58 +01:00
Tamas Vajk
64b584b4a3
C#: Fix PR review findings in NamespaceDeclaration
2020-10-28 11:30:17 +01:00
Tamas Vajk
9cc7424cd0
C#: Simplify TypeMentions in PrintAST
2020-10-28 11:28:06 +01:00
Tamas Vajk
c2e8d3fb3b
C#: Minor fix in TypeMention
2020-10-28 11:28:06 +01:00
Asger Feldthaus
a9adb2912a
JS: Improve lodash model
2020-10-28 10:09:41 +00:00
Asger Feldthaus
9fc5c0bdb8
JS: Update ComposedFunctions
2020-10-28 10:09:40 +00:00
Tom Hvitved
92461d41e0
C#: Add change note
2020-10-28 11:02:12 +01:00
Tom Hvitved
28607927ee
C#: Update CIL tests
2020-10-28 10:57:01 +01:00
Cornelius Riemenschneider
f1f64fb7df
C++: Make BuiltInVarArgs* classes subclasses of VarArgsExpr.
2020-10-28 10:48:00 +01:00
Tamás Vajk
7c3964a388
Merge pull request #4543 from tamasvajk/feature/configureawait
...
C#: Add flow summary for 'Task.ConfigureAwait()'
2020-10-28 10:42:44 +01:00
Rasmus Lerchedahl Petersen
9fd1bf60fa
Merge branch 'main' of github.com:github/codeql into python-port-path-injection
2020-10-28 10:24:23 +01:00
Geoffrey White
09372f5c81
C++: Remove misleading comment.
2020-10-28 09:04:10 +00:00
Erik Krogh Kristensen
2e514c4d7b
add model for Node Redis
2020-10-28 09:52:54 +01:00
Anders Schack-Mulligen
34ae6e0576
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-28 09:15:08 +01:00
Tom Hvitved
02ca8fe3b7
Merge pull request #4556 from hvitved/csharp/dataflow/tuple-perf
...
C#: Fix bad join-order in `System.Tuple` flow-summaries
2020-10-28 08:50:37 +01:00
Tamas Vajk
7a1e1996e4
C#: Remove unneded class from CompilerServices.qll
2020-10-28 08:42:20 +01:00
luchua-bc
99c79f4aa3
Enhance the dataflow sink and update test cases
2020-10-28 03:07:01 +00:00
Dave Bartolomeo
27ad7bc297
Merge pull request #4560 from MathiasVP/instruction-tag-for-this-addr-and-load
...
C++: Make sure getInstructionTagId has a result for `this` related IPA branches
2020-10-27 21:01:09 -04:00
luchua-bc
3cc3fe9d37
Switch to TaintPreservingCallable and add test cases
2020-10-28 00:33:07 +00:00
Mathias Vorreiter Pedersen
ad9e7b7343
C++: Give getInstructionTagId a result when tag is ThisAddressTag or ThisLoadTag
2020-10-27 22:16:01 +01:00
Alvaro Muñoz
77b551b693
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:12:17 +01:00
Alvaro Muñoz
b9c75ea462
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:12:00 +01:00
Alvaro Muñoz
ac116da0dc
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:48 +01:00
Alvaro Muñoz
d5b470ea0c
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:27 +01:00
Alvaro Muñoz
9785013c29
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:11:15 +01:00
Alvaro Muñoz
d221930c81
Update java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:10:56 +01:00
Alvaro Muñoz
a9ea63b976
Update java/change-notes/2020-10-27-insecure-bean-validation.md
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-27 21:10:46 +01:00
Tom Hvitved
de4ed59f62
C#: Simplify toString() for CIL entities
2020-10-27 20:58:40 +01:00
Robert Marsh
7d7b0eaa7b
C++: accept test changes
...
The conflation-related changes result from aliased accesses for which a
precise Phi node is generated.
2020-10-27 09:33:28 -07:00
Alvaro Muñoz
1fdf0556d2
more fixes to make qlhelp linter happy
2020-10-27 17:05:00 +01:00
Alvaro Muñoz
aa981caea5
more fixes to make qlhelp linter happy
2020-10-27 16:32:13 +01:00
Alvaro Muñoz
8974f252ac
fix format and qlhelp errors blocking the merge
2020-10-27 16:19:39 +01:00
Alvaro Muñoz
11e57bd2f8
add change note for new Insecure Bean Validation query
2020-10-27 16:11:51 +01:00
Alvaro Muñoz
3378dd526e
remove compiled classes from stubs
2020-10-27 15:56:26 +01:00
Alvaro Muñoz
99044fc6ab
remove experimental query forr bean validation
2020-10-27 15:55:19 +01:00
Alvaro Muñoz
40a2007497
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:52:25 +01:00
Alvaro Muñoz
8b5aed2fe1
move md links to <a>
2020-10-27 15:52:25 +01:00
Alvaro Muñoz
8904411fe6
address review comments
2020-10-27 15:52:24 +01:00
Alvaro Muñoz
debfc686d1
Insecure Bean Validation query
2020-10-27 15:52:24 +01:00
Alvaro Muñoz
7d7933a054
move query out of experimental
2020-10-27 15:52:20 +01:00
Alvaro Muñoz
d990f7a470
move md links to <a>
2020-10-27 15:51:40 +01:00
Alvaro Muñoz
65d01f5c9e
address review comments
2020-10-27 15:51:36 +01:00
Alvaro Muñoz
f85778e9c7
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
6ca28a8bc6
move md links to <a>
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
27bd9044e7
address review comments
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
73fc9fda77
Insecure Bean Validation query
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
a36970f306
Add beanValidation remote source
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
3dcd8acf97
add expected results
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
671ea2f6c6
add test and stubs
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
a274a1516a
move source to FlowSources.qll
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
2bab9d22e9
move query out of experimental
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
df4164f2c0
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
c1decf4d0d
move md links to <a>
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
0bf3895327
address review comments
2020-10-27 15:47:54 +01:00
Alvaro Muñoz
3b23cd5be3
Insecure Bean Validation query
2020-10-27 15:47:54 +01:00
Tom Hvitved
090ea01249
C#: Fix bad join-order in System.Tuple flow-summaries
2020-10-27 14:51:11 +01:00
Geoffrey White
c8783b5ea3
Revert "C++: Create a module for models of things in Std."
...
This reverts commit ddc5150080 .
2020-10-27 13:31:16 +00:00
Alvaro Muñoz
a4a91eb1d2
new deserialization sink
2020-10-27 14:24:17 +01:00
Chris Smowton
3f298f3dc8
Add basic tests for Android intents as flow sources
2020-10-27 12:03:05 +00:00
Chris Smowton
54c1480fd6
Replace explicit extra step with TaintPreservingCallable
2020-10-27 12:02:29 +00:00
Chris Smowton
60e8910330
Follow taint across getExtras without qualifier
2020-10-27 12:01:30 +00:00
Rasmus Lerchedahl Petersen
164acf4055
Python: test that aliasing is not a problem
2020-10-27 11:25:58 +01:00
Geoffrey White
0b35b34288
C++: Add pointer tests.
2020-10-27 09:47:10 +00:00
Tom Hvitved
03a36760b8
C#: Add data-flow test for ConfigureAwait()
2020-10-27 10:23:39 +01:00
Tamas Vajk
342a711296
C#: Add flow summary for 'Task.ConfigureAwait()'
2020-10-27 10:23:39 +01:00
Asger Feldthaus
7345df63c0
JS: Include DataFlow::AdditionalFlowStep in TaintSteps metric
2020-10-27 08:41:50 +00:00
Jonas Jensen
8f6dbe982e
Merge pull request #4468 from github/rdmarsh2/cpp/output-iterators-2
...
C++: flow through output iterators with user-defined operator= and operator*
2020-10-27 08:36:14 +01:00
Rasmus Lerchedahl Petersen
2baed20067
Python: Test false negative from review
2020-10-27 08:30:16 +01:00
Rasmus Lerchedahl Petersen
b6313dddb9
Python: Add concept tests
2020-10-27 08:26:00 +01:00
Jonas Jensen
45cd47ea77
Merge pull request #4535 from criemen/jump-to-def
...
C++: Extend jump-to-def support to template instantiations.
2020-10-27 08:16:57 +01:00
Rasmus Lerchedahl Petersen
8350d64763
Python: Add concept test definitions
2020-10-27 08:00:53 +01:00
Erik Krogh Kristensen
33465dbe6b
refactor parameterPropRead and reachesReturn to get a slight performance improvement
2020-10-26 16:49:49 +01:00
Geoffrey White
12233e5874
Merge pull request #4533 from MathiasVP/mathiasvp/fix-broken-qhelp
...
C++: Fix broken qhelp links
2020-10-26 14:40:52 +00:00
Mathias Vorreiter Pedersen
9db66a1b94
Delete the msdn reference in NestedLoopSameVar
...
It was a Visual Basic reference anyway, and it doesn't seem to provide more information than the link we have already.
2020-10-26 15:27:24 +01:00
Rasmus Lerchedahl Petersen
601a803ee2
Python: DataFlow/TaintTrackin 3/4
2020-10-26 14:42:18 +01:00
Cornelius Riemenschneider
1b88ca1e81
C++: Simplify code, add comment explaining the logic.
2020-10-26 14:39:12 +01:00
Cornelius Riemenschneider
447ba205b4
C++: Move Conversions in PrintAST to the side.
2020-10-26 13:49:02 +01:00
Tom Hvitved
212b49f3dc
Merge pull request #4416 from hvitved/csharp/dataflow/tuples
...
C#: Add flow summaries for `System.[Value]Tuple`
2020-10-26 13:48:24 +01:00
Cornelius Riemenschneider
0e5c44e5c4
C++: Add new test for conversions.
2020-10-26 13:25:17 +01:00
CodeQL CI
e825af2791
Merge pull request #4548 from asgerf/js/handle-empty-package-json
...
Approved by erik-krogh
2020-10-26 11:51:12 +00:00
Chris Smowton
68876b02fe
Merge pull request #4519 from smowton/smowton/cleanup/loggertype-dead-code
...
C#: Remove dead LoggerType class
2020-10-26 11:19:27 +00:00
Mathias Vorreiter Pedersen
02bcb6d971
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-26 11:39:54 +01:00
Joe Farebrother
2050f82553
Merge pull request #4383 from joefarebrother/guava-strings
...
Java: Add modelling for Guava
2020-10-26 10:16:55 +00:00
Asger Feldthaus
c353f61091
JS: Add test case
2020-10-26 09:58:37 +00:00
Asger Feldthaus
f6c0972523
JS: Guard other uses of Gson.fromJson
2020-10-26 09:54:55 +00:00
Asger Feldthaus
fc12b0bb5e
JS: Do not crash on empty package.json file
2020-10-26 09:54:51 +00:00
Tom Hvitved
492b1141ef
Merge pull request #4445 from hvitved/csharp/sign-analysis-cfg
...
C#: Use CFG nodes instead of AST nodes in sign/modulus analysis
2020-10-26 09:45:38 +01:00
Cornelius Riemenschneider
07452c0159
C++: Add comment, explaining where this query is used.
2020-10-26 09:28:24 +01:00
Cornelius Riemenschneider
fca141146b
C++: Address review.
2020-10-26 09:27:29 +01:00
luchua-bc
07830aae05
Fix typo
2020-10-25 22:34:15 +00:00
Erik Krogh Kristensen
0b41a59dbf
add support for imports into "outDir" from tsconfig.json
2020-10-25 22:51:21 +01:00
luchua-bc
d9c140dc6c
Enhance the query to use sanitizer and null/empty array flow
2020-10-25 15:33:09 +00:00
luchua-bc
9ae5689af6
Use AndroidIntentInput source
2020-10-24 11:55:00 +00:00
Rasmus Lerchedahl Petersen
d89e985246
Python: Test showing chaining FP
2020-10-24 09:20:30 +02:00
Rasmus Lerchedahl Petersen
022cf0b2cc
Python: Add test from tracking issue
...
All tests pass, but there are spurious paths
due to configuration chaining.
2020-10-24 09:07:43 +02:00
Dave Bartolomeo
3fce971f2d
Fix taint propagation to qualifier objects and update test expectations
2020-10-23 17:48:37 -04:00
Dave Bartolomeo
86668058dc
Avoid ODR violation in test code
2020-10-23 17:45:01 -04:00
Dave Bartolomeo
4d2f658ece
Don't treat allocator argument as a string input
2020-10-23 17:44:07 -04:00
Robert Marsh
aab9797c2f
Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
...
Resolve merge conflict in tests
2020-10-23 13:50:15 -07:00
Dave Bartolomeo
1e96404ee0
Revert bad changes to basic_string
2020-10-23 13:46:27 -04:00
Dave Bartolomeo
35abcae5d3
Fix formatting
2020-10-23 13:43:29 -04:00
Dave Bartolomeo
bace0dca6d
Handle more cases that require synthesizing temporary objects
...
- Parens around qualifier expressions
- Inheritance conversions involving class prvalues
2020-10-23 12:04:09 -04:00
toufik-airane
7d2741a287
Add newline
2020-10-23 17:42:55 +02:00
toufik-airane
3ccdc2c518
Update ElectronShellOpenExternalSink location
...
Move the class ElectronShellOpenExternalSink to
ClientSideUrlRedirect.qll. It's been to be a more appropriate location.
2020-10-23 17:39:03 +02:00
Rasmus Lerchedahl Petersen
c4d1affaf8
Python: Suggestions from reviewer
2020-10-23 16:57:11 +02:00
yoff
15167753c6
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 16:52:13 +02:00
Rasmus Lerchedahl Petersen
d6e9b351e5
Python: Add qldocs
2020-10-23 16:39:38 +02:00
Rasmus Lerchedahl Petersen
821b0c918a
Python: Additional taintstep for normpath
...
Is it ok to have this in general?
2020-10-23 16:35:10 +02:00
CodeQL CI
6218a48e88
Merge pull request #4545 from RasmusWL/python-model-django-v1
...
Approved by tausbn
2020-10-23 15:27:42 +01:00
Rasmus Lerchedahl Petersen
6317db1622
Python: Reword explanation (slightly)
2020-10-23 15:54:52 +02:00
toufik-airane
e87790b828
Add ElectronShellOpenExternalSink class
...
Add ElectronShellOpenExternalSink class to detect untrusted input
interpreted by `openExternal` function call in `electron` module.
Based on the #14 Electron Security checklist:
https://www.electronjs.org/docs/tutorial/security#14-do-not-use-openexternal-with-untrusted-content
2020-10-23 15:41:03 +02:00
Rasmus Wriedt Larsen
aa9f15af76
Python: Fix typo
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 15:39:38 +02:00
Cornelius Riemenschneider
a82cf74161
C++: Improve performance of definitions.qll.
2020-10-23 15:16:53 +02:00
Rasmus Lerchedahl Petersen
9eda84debb
Python: PathCheck -> Path::SafeAccessCheck
2020-10-23 15:01:43 +02:00
Rasmus Lerchedahl Petersen
cf8462fa58
Python: Simplify chained configs
2020-10-23 14:52:47 +02:00
Rasmus Lerchedahl Petersen
f87845b1ec
Python: Copy old test
2020-10-23 14:52:07 +02:00
Rasmus Wriedt Larsen
7993a83750
Merge pull request #4544 from tausbn/python-fix-bad-join-in-use-use-ssa
...
Python: Fix bad join order in `adjacentUseUseSameVar`
2020-10-23 14:37:27 +02:00
Rasmus Wriedt Larsen
d295c64ccd
Python: Add example of flask response .set_data
2020-10-23 14:31:36 +02:00
Rasmus Wriedt Larsen
eb545204ec
Python: Show that reflected XSS works now
...
Also did autoformatting, but the important part is the change to the .expected file
2020-10-23 14:31:35 +02:00
Rasmus Wriedt Larsen
d2cfa91155
Python: Add some tricky tests of return in flask route handler
...
In these cases the `return` might end up creating a new HTTP response, so they
need to be modeled as such.
Initially I created a very naive solution that didn't handle either
tricky_return1 or tricky_return2.
The interaction in tricky_return2/helper highlighted for me that to handle this
properly, due to the fact that the flow is across functions, we either need to
use a global dataflow/taint-tracking configuration, or some clever use of
type-trackers.
In the end, this extra effort for not modeling all returns in a flask route
handler as a creation of a HTTP response doesn't really seem to be worth it (at
least not right now). Sicne we use it with taint-tracking for the Reflected XSS
query, and use a HTTP response _creation_ as the sink (without propagating taint
to the HTTP response), we won't get into trouble where we report a path to BOTH
`make_response(...)` and the `return`
```
resp = make_response(...)
return resp
```
If we change this setup in the future, we will probably need to do something to
avoid this double-path reporting.
2020-10-23 14:31:35 +02:00
Rasmus Wriedt Larsen
d60221b168
Python: Model return from flask handler as HTTP response
...
When dealing with
```
resp = make_response(...)
return resp
```
ideally we don't want to mark the return as a creation of a HTTP response. I'll
deal with this in a second commit, to show off how annoying it looks in the
tests right now :D
2020-10-23 14:31:34 +02:00
Rasmus Wriedt Larsen
44ba3469db
Python: Model response_class attribute of Flask class
2020-10-23 14:31:34 +02:00
Rasmus Wriedt Larsen
082e35c2c7
Python: Model mimetype instead of content-type for HTTP Response
...
Since that's really what we're after (at least for now)
2020-10-23 14:31:33 +02:00
Rasmus Wriedt Larsen
81a42b73a8
Python: Model flask.Response
...
I think I'll rework how we model content-type, since what we _actually_ want to
know is the mimetype
2020-10-23 14:31:32 +02:00
Rasmus Wriedt Larsen
1f99bbf744
Python: Model flask.Response
...
I kept `Response::instance()` predicate even though we don't need it for
anything right now, I thought it could be nice to keep for the future.
2020-10-23 14:31:32 +02:00
Rasmus Wriedt Larsen
7894d01248
Python: Add test for mimetype/headers priority
2020-10-23 14:31:31 +02:00
Rasmus Wriedt Larsen
35334cf630
Python: Remove status code modeling
...
I'm not even trying to model it properly right now, and don't have a specific
use-case for it RIGHT NOW. I think we could want this in the future, but I think
it's probably better to model it when we know what we want to use it for.
2020-10-23 14:31:31 +02:00
Rasmus Wriedt Larsen
19dc04de3c
Python: Handle make_response on flask app
2020-10-23 14:31:30 +02:00
Rasmus Wriedt Larsen
e38ac18e46
Python: Add (only) basic $HttpResponse tag to other tests files
...
This seems really nice to me, but you might disagree
2020-10-23 14:31:30 +02:00
Rasmus Wriedt Larsen
8b0b87ae62
Python: Model flask.make_response
2020-10-23 14:31:29 +02:00
Rasmus Wriedt Larsen
e93c20a7a8
Python: You can supply defaults for HTTP Response properties
2020-10-23 14:31:28 +02:00
Rasmus Wriedt Larsen
87f31a96d7
Python: Add flask_attr helper
2020-10-23 14:31:28 +02:00
Rasmus Wriedt Larsen
bfc29bb349
Python: Add annotations for flask response tests
...
The fact that we need to add routeSetup and routeHandler annotations is sort of
annoying :|
2020-10-23 14:31:27 +02:00
Rasmus Wriedt Larsen
47dcc09992
Python: Add tests for creating HTTP responses in flask
...
Which is runnable, if you have flask installed locally
2020-10-23 14:31:26 +02:00
Rasmus Wriedt Larsen
8aaa36bd99
Python: Port ReflectedXss query (and tests)
2020-10-23 14:31:25 +02:00
Rasmus Wriedt Larsen
df6fd53a7e
Python: Add HttpResponse concept
...
We might need to rework this a bit when we also start to handle redirects. I
could see a world where we simply allow http redirects to be subclasses of http
responses, and need to manually exclude them from queries (or create
HttpContentResponse to model the HttpResponses that will contain a body). Let us
see where the wind will take us.
I looked through JS and Go libraries, but I didn't feel their modeling would map
very well to Python.
2020-10-23 14:31:25 +02:00
Rasmus Wriedt Larsen
0d6165883c
Python: Fix spelling for Server::RouteSetup documentation
2020-10-23 14:31:24 +02:00
CodeQL CI
bbda22c769
Merge pull request #4534 from RasmusWL/python-update-flask-modeling
...
Approved by tausbn
2020-10-23 13:28:19 +01:00
Rasmus Wriedt Larsen
b3e53f8d0a
Python: Model django.conf.urls.url (v 1.x)
2020-10-23 14:26:37 +02:00
Taus Brock-Nannestad
6d81ca12c4
Python: Fix bad join order in adjacentUseUseSameVar
2020-10-23 14:08:45 +02:00
Rasmus Wriedt Larsen
ed0fe29d7d
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-23 13:53:16 +02:00
Rasmus Wriedt Larsen
be166d9c02
Python: Expand Django 2/3 routing tests with 1.x way
...
Added it to the `testapp` so it's easy to run the server to SEE that it works.
Added it to `routing_test` so it's obvious this is supported by our modeling
when we _know_ it's running Django 2/3.
2020-10-23 13:43:27 +02:00
yoff
462e839a83
Update python/ql/src/experimental/Security-new-dataflow/CWE-022/PathInjection.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-23 13:35:13 +02:00
luchua-bc
f5f7259937
Revamp the query to implement AdditionalTaintStep
2020-10-23 12:00:36 +01:00
luchua-bc
3c5c8494b1
Refine the query to check intents coming from outside only
2020-10-23 11:58:16 +01:00
luchua-bc
f86413a9b5
text changes
2020-10-23 11:58:12 +01:00
Bt2018
2ddeb0b169
Add method access qualifier as source
2020-10-23 11:57:02 +01:00
luchua-bc
f5ca459795
Add remote source of Android intent extra
2020-10-23 11:57:01 +01:00
Jonas Jensen
08bf464437
Merge pull request #4540 from criemen/printast-performance
...
C++: Improve PrintAST performance if only individual files are printed
2020-10-23 12:46:34 +02:00
Rasmus Wriedt Larsen
ae60ac211b
Python: Annotate django v1 routing tests
...
Again need to remove trailing $, since inline-expectation tests still don't
handle $
2020-10-23 12:05:05 +02:00
Rasmus Wriedt Larsen
78ab637b54
Python: Port django v1 tests
2020-10-23 12:00:27 +02:00
Rasmus Lerchedahl Petersen
f88cc3c98e
Python: Use custom PathGraph
2020-10-23 01:10:21 +02:00
Rasmus Wriedt Larsen
41ec4f8166
Python: Use FlaskModel as workaround name
...
As suggested by Taus 👍
2020-10-22 19:13:26 +02:00
Dave Bartolomeo
99072483b8
Fix PR feedback
2020-10-22 12:55:40 -04:00
Dave Bartolomeo
b62bda6c3a
Fix regression due to primary instructions for side effects not being computed correctly in the presence of synthetic temporary objects.
2020-10-22 12:55:30 -04:00
Cornelius Riemenschneider
6b072686ab
C++: Improve PrintAST performance.
...
This improves the performance of the printAst.ql query by excluding a lot of string concatenations that happen in files unrelated to the one the user is interested in printing.
This is supposed to help the performance of the AST Viewer on bigger databases.
2020-10-22 16:38:52 +02:00
Mathias Vorreiter Pedersen
a1b59e2d6c
Merge pull request #4538 from geoffw0/taintbug
...
C++: Add taint test for memcpy-ing into a vector
2020-10-22 16:05:56 +02:00
Mathias Vorreiter Pedersen
90c027f291
Merge pull request #4532 from geoffw0/wrongtypeformaterr
...
C++: Harden queries against ErroneousType
2020-10-22 14:21:14 +02:00
Geoffrey White
ceea947f5e
C++: Add another test case.
2020-10-22 12:41:23 +01:00
Mathias Vorreiter Pedersen
d0dd71ba10
Apply suggestions from code review
...
Co-authored-by: hubwriter <54933897+hubwriter@users.noreply.github.com >
2020-10-22 12:53:35 +02:00
Rasmus Lerchedahl Petersen
8ce5f41366
Python: Fix source of second part of path
2020-10-22 12:20:50 +02:00
Rasmus Lerchedahl Petersen
8549c9cfde
Python: Rewrite logic to split on nomalization
2020-10-22 11:35:55 +02:00
Rasmus Lerchedahl Petersen
391925532d
Python: PathCheck StartswithCall
...
Should this use `Value::named`?
2020-10-22 11:34:07 +02:00
Rasmus Lerchedahl Petersen
6e361c7793
Python: Make PathCheck a BarrierGuard
2020-10-22 11:32:18 +02:00
Calum Grant
7544bc872a
Merge pull request #3974 from owen-mc/docs/query-classification-and-display
...
Docs: Query classification and display
2020-10-22 10:01:19 +01:00
Geoffrey White
3cca8443f8
C++: Add memcpy(vector test.
2020-10-22 09:46:07 +01:00
Geoffrey White
227bf91626
C++: Correct test annotation.
2020-10-22 09:45:09 +01:00
Erik Krogh Kristensen
e89e99deaa
Merge pull request #4461 from erik-krogh/pyPrint
...
Python: implement printAst for Python
2020-10-22 09:37:10 +02:00
Dave Bartolomeo
f7eeadadd9
Accept more diffs
2020-10-21 18:37:49 -04:00
Dave Bartolomeo
1de1ab65b7
Merge remote-tracking branch 'upstream/main' into work
2020-10-21 18:22:55 -04:00
Dave Bartolomeo
5259f86e32
Accept diff (needs further investigation, though)
2020-10-21 18:06:34 -04:00
Rasmus Lerchedahl Petersen
f8dba85e0f
Python: PathNormalization os.path.normpath
2020-10-21 22:21:40 +02:00
Rasmus Lerchedahl Petersen
17273dd27e
Python: Add FileSystemAccess open
2020-10-21 22:01:49 +02:00
Rasmus Lerchedahl Petersen
4570c29a11
Python: port query
2020-10-21 21:40:42 +02:00
Rasmus Lerchedahl Petersen
eb5ed23354
Python: Add TaintTracking2
2020-10-21 21:39:50 +02:00
Rasmus Lerchedahl Petersen
da77cbb3d0
Python: concepts PathCheck and PathNormalization
...
Should they be in a module?
2020-10-21 21:37:43 +02:00
Cornelius Riemenschneider
9388448053
C++: Extend jump-to-def support to template instantiations.
...
This commit extends developers ability to use jump-to-def in C/C++ files opened in the VSCode extension.
Before, jump-to-def starting with code in a template instantiation did not work.
Furthermore, this fixes a bug, as the list of all references of a location did not include template instantiations.
2020-10-21 21:35:38 +02:00
Robert Marsh
1a365d2098
C++: remove InitializeNonLocalInstruction from IR
...
Instead, have AliasedDefinition initialize read-only nonlocal memory
2020-10-21 12:12:38 -07:00
Rasmus Wriedt Larsen
278c071fe6
Python: Modernise werkzeug FileStorage modeling
2020-10-21 20:36:40 +02:00
Rasmus Wriedt Larsen
d0fdb542e5
Python: Modernise werkzeug MultiDict modeling
2020-10-21 20:30:20 +02:00
Rasmus Wriedt Larsen
b6bd70a5da
Python: Modernise flask library modeling
...
Two interesting things happened while doing this:
1. I found out that you can't use the same name to define a submodule as any
parent module. So we need give unique names to the top-level module, and the
module for modeling the `flask.Flask` class. I randomly choose a new name for
the top-level module to get things moving (and not be stuck in bikeshedding
forever).
2. With this new setup, I wanted to expose the `route` and `add_url_rule`
methods on instances of `flask.Flask`. It wasn't quite obvious how to do so. I
simply lumped them next to `classRef()` and `instance()`, without too much
care. I did consider putting them inside a `instance` module, which would allow
you to access them by `flask::Flask::instance::route()`, but I wasn't quite
sure, and just did something easy to get moving.
2020-10-21 20:30:14 +02:00
Rasmus Wriedt Larsen
62d665ecb3
Python: Fix shared QLDoc for InstanceSource
2020-10-21 19:55:40 +02:00
Rasmus Wriedt Larsen
047a326183
Python: Remove reference to old PR
...
These have been added to internal tracking issue instead
2020-10-21 19:53:25 +02:00
Dave Bartolomeo
ee18db7b36
Fix IR for member accesses on prvalues
...
This fixes the IR generation for member accesses where the qualifier is a prvalue that is _not_ the load of a `TemporaryObjectExpr`. We synthesize a temporary variable during IR generation instead. It fits into the IR construction code at the same spot as `TranslatedLoad`, since it's basically the opposite of `TranslatedLoad` (prvalue->glvalue instead of vice versa). Note that array prvalues require special treatment.
This fixes some consistency errors in the `syntax-zoo`. It introduces three new ones in `dataflow-ir-consistency.expected`, but those are along the same lines as tons of existing failures.
2020-10-21 13:32:15 -04:00
Rasmus Lerchedahl Petersen
2e8cbbd866
Python: Add concept FileSystemAccess
2020-10-21 17:35:21 +02:00
Mathias Vorreiter Pedersen
056a553976
C++: Fix broken qhelp links
2020-10-21 17:26:46 +02:00
Aditya Sharad
9ff5142529
Merge pull request #4525 from adityasharad/js/autobuild-github-hidden-folder
...
JavaScript: Include .github hidden folders in autobuild
2020-10-21 07:10:42 -07:00
Rasmus Wriedt Larsen
a6abee9b3a
Merge pull request #4476 from yoff/python-port-sql-injection
...
Python: Port SqlInjection
2020-10-21 15:55:19 +02:00
Geoffrey White
678e769553
C++: Change note.
2020-10-21 14:52:43 +01:00
Geoffrey White
d97f03c2be
C++: Exclude error types from NonPortablePrintf.
2020-10-21 14:51:52 +01:00
yoff
ea4ea6b3e6
Merge pull request #4529 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Remove bad join in `getCallableScope`
2020-10-21 15:36:38 +02:00
Rasmus Lerchedahl Petersen
060481053a
Python: Add note about incompleteness
...
I was going to do this in an issue, but it makes sense
to have it in the code. We could still add an issue as well.
2020-10-21 15:15:19 +02:00
Rasmus Lerchedahl Petersen
c57c798bfa
Python: Add TODO
2020-10-21 15:10:40 +02:00
yoff
ee5221abb4
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-21 15:08:16 +02:00
Jonas Jensen
2479402a9d
Merge pull request #4522 from geoffw0/odasa704
...
C++: Non-constant format string test case
2020-10-21 14:58:02 +02:00
Jonas Jensen
6a80f3380e
Merge pull request #4527 from geoffw0/odasa3940
...
C++: Improve SizeCheck queries
2020-10-21 14:55:57 +02:00
Taus Brock-Nannestad
31c169daac
Python: Remove bad join in getCallableScope
...
Clause timing report had this suspicious entry
```
CommandInjection.ql-12:DataFlowPublic::Node::getCallableScope#bbf .................. 7.2s
(4 evaluations with max 6.4s in DataFlowPublic::Node::getCallableScope#bbf/3@i3#119d7b)
```
which indeed was a bad join:
```
Tuple counts for DataFlowPublic::Node::getCallableScope#bbf:
293509 ~2% {3} r1 = JOIN DataFlowPublic::Node::getCallableScope#bbf#prev_delta AS L WITH DataFlowPublic::TNode#f AS R ON FIRST 1 OUTPUT L.<1>, L.<0>, L.<2>
22337162 ~0% {3} r2 = JOIN r1 WITH Scope::Scope::getEnclosingScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r1.<1>, r1.<2>, R.<1>
22337162 ~0% {3} r3 = r2 AND NOT DataFlowPublic::Node::getCallableScope#bbf#prev AS R(r2.<0>, r2.<2>, r2.<1>)
22337162 ~0% {3} r4 = SCAN r3 OUTPUT r3.<0>, r3.<2>, r3.<1>
722 ~1% {3} r5 = JOIN r4 WITH m#DataFlowPublic::Node::getCallableScope#bbf AS R ON FIRST 2 OUTPUT r4.<0>, r4.<1>, r4.<2>
722 ~1% {3} r6 = JOIN r5 WITH m#DataFlowPublic::Node::getCallableScope#bbf AS R ON FIRST 2 OUTPUT r5.<0>, r5.<2>, r5.<1>
722 ~1% {3} r7 = r6 AND NOT project#DataFlowPrivate::DataFlowCallable::getScope_dispred#ff AS R(r6.<2>)
722 ~1% {3} r8 = SCAN r7 OUTPUT r7.<0>, r7.<2>, r7.<1>
return r8
```
In this case, the join went away by simply moving the helper predicate
out of the class it was situated in (and since it doesn't mention
`this`, it didn't really belong there in the first place).
Result:
```
DataFlowPublic.qll-8:DataFlowPublic::getCallableScope#ff ........................... 26ms
(4 evaluations with max 15ms in DataFlowPublic::getCallableScope#ff/2@i3#709a9e)
```
2020-10-21 14:45:05 +02:00
yoff
9bd808c924
Merge pull request #4528 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Prevent early join on `argName` in `getArg`
2020-10-21 14:43:39 +02:00
Rasmus Lerchedahl Petersen
53ff1a32c1
Merge branch 'main' of github.com:github/codeql into python-port-sql-injection
2020-10-21 14:38:02 +02:00
Geoffrey White
ac1e0692bb
C++: Exclude error types from WrongTypeFormatArguments.
2020-10-21 13:25:57 +01:00
Rasmus Lerchedahl Petersen
77d4cbc0df
Python: Only allow unsafe positional args to extra
2020-10-21 14:21:36 +02:00
Rasmus Lerchedahl Petersen
3a416bce2d
Python: Move test annotation
2020-10-21 14:18:16 +02:00
Rasmus Lerchedahl Petersen
4571b3188c
Python: Fix false negative
2020-10-21 14:16:35 +02:00
Rasmus Lerchedahl Petersen
03c62fd267
Python: Fix typo in test case
2020-10-21 14:03:46 +02:00
yoff
75357727c4
Merge pull request #4490 from RasmusWL/python-model-django-sources
...
Python: model Django HttpRequest as RemoteFlowSource
2020-10-21 13:46:51 +02:00
Rasmus Lerchedahl Petersen
7087522ed9
Python: Move doc reference
2020-10-21 13:30:38 +02:00
Rasmus Lerchedahl Petersen
e49c7d64bd
Python: test for keyword arguments to extra
2020-10-21 13:28:12 +02:00
Rasmus Lerchedahl Petersen
d249b51a5e
Python: Add test-case for indirect RawSQL
2020-10-21 13:23:19 +02:00
Taus Brock-Nannestad
eb3333c0ce
Python: Prevent early join on argName in getArg
2020-10-21 13:23:09 +02:00
Rasmus Lerchedahl Petersen
e51543ea79
Python: allow any positional argument in annotate
2020-10-21 13:17:20 +02:00
Rasmus Lerchedahl Petersen
2c855c739b
Python: Ignore relatively safe arguments of extra
2020-10-21 13:15:46 +02:00
Rasmus Lerchedahl Petersen
6805fb63cc
Python: Use modern pattern for RawSQL class
2020-10-21 13:14:32 +02:00
Rasmus Lerchedahl Petersen
e44247bb00
Python: Add links to function docs
2020-10-21 13:03:14 +02:00
yoff
8e7e107365
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-21 12:55:38 +02:00
Geoffrey White
ba29591b83
C++: Change note.
2020-10-21 11:21:53 +01:00
CodeQL CI
da58306f2d
Merge pull request #4506 from asgerf/js/separate-jquery-config
...
Approved by esbena
2020-10-21 03:13:42 -07:00
Rasmus Wriedt Larsen
5874a7b422
Merge pull request #4488 from yoff/SharedDataflow_ArgumentPassingTests
...
Python: Shared dataflow, argument passing tests
2020-10-21 12:01:37 +02:00
Geoffrey White
6d91d55669
C++: Use the AllocationExpr model.
2020-10-21 11:00:15 +01:00
CodeQL CI
9faf675f1f
Merge pull request #4486 from erik-krogh/lessTokens
...
Approved by asgerf
2020-10-21 02:56:38 -07:00
Tamas Vajk
14938f3872
C#: Add change notes for AST printing improvements
2020-10-21 11:19:51 +02:00
Mathias Vorreiter Pedersen
3fe2a17933
Merge pull request #4509 from geoffw0/intmultlong
...
C++: Add IntMultToLong test cases.
2020-10-21 11:03:13 +02:00
CodeQL CI
eaed93fa7d
Merge pull request #4513 from RasmusWL/python-model-fabric
...
Approved by yoff
2020-10-21 01:58:19 -07:00
Tamas Vajk
6d8abd8b51
C#: Add change note for
2020-10-21 10:56:39 +02:00
Rasmus Lerchedahl Petersen
9ee5a01d7e
Python: Reword comment on isBarrierIn
2020-10-21 10:30:40 +02:00
Rasmus Wriedt Larsen
ba9caacee1
Merge pull request #4524 from tausbn/python-remove-cartesian-product-in-tkwoverflownode
...
Python: Remove cartesian product in `TKwOverflowNode`
2020-10-21 10:22:45 +02:00
Rasmus Wriedt Larsen
b0af0b94d0
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-21 09:58:37 +02:00
Erik Krogh Kristensen
e18cf08d99
documentation changes based on review
2020-10-21 09:45:16 +02:00
Erik Krogh Kristensen
c1dba2ee9f
add a few shouldPrint calls to improve performance
2020-10-21 09:37:53 +02:00
CodeQL CI
897d8de65a
Merge pull request #4523 from erik-krogh/optionalPromise
...
Approved by asgerf
2020-10-21 00:34:12 -07:00
luchua-bc
478771ccc5
Fix issues with method signature check
2020-10-21 02:49:53 +00:00
Rasmus Lerchedahl Petersen
90d0cff384
Python: Use flask routing
2020-10-21 00:30:16 +02:00
Robert Marsh
413c845e97
Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
...
Accept test changes for unnamed elements
2020-10-20 15:22:08 -07:00
Rasmus Lerchedahl Petersen
383d846396
Python: address review
...
- smooth out future merge
- keyword argument for execute
2020-10-21 00:15:05 +02:00
Rasmus Lerchedahl Petersen
e1dfbc0486
Python: address review
2020-10-20 23:59:44 +02:00
Dave Bartolomeo
98e0ae4865
Add tests for member accesses on temporary objects
2020-10-20 17:35:12 -04:00
Dave Bartolomeo
08af0803ff
Add examples to QLDoc comment
2020-10-20 17:34:46 -04:00
Erik Krogh Kristensen
3306b59a14
Update python/ql/src/semmle/python/PrintAst.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-20 23:19:47 +02:00
Aditya Sharad
f7bd835dd8
JavaScript: Include .github hidden folders in autobuild
...
These folders are likely to contain GitHub-specific YAML files, such as Actions workflow configurations.
Including them by default allows analysis of such code without further configuration.
User-configured exclusions will still be respected for these folders.
2020-10-20 12:56:07 -07:00
yoff
01845d1278
Update python/ql/src/experimental/semmle/python/frameworks/Django.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-20 21:43:15 +02:00
Dave Bartolomeo
c739f98f7d
Merge remote-tracking branch 'upstream/main' into work
2020-10-20 13:42:42 -04:00
Dave Bartolomeo
8c8daa38ec
Update stats
2020-10-20 13:41:52 -04:00
Erik Krogh Kristensen
996488511c
Merge pull request #4520 from erik-krogh/LessTests
...
JS: Aggregate tests cases
2020-10-20 19:03:47 +02:00
Dave Bartolomeo
4ba281731c
Fix IR generation for member access with a prvalue on the RHS
...
For historical reasons, the extractor marks the temporary object expression used as the qualifier of a member access as a prvalue(load), even though the current C++ standard says that the temporary object materialization results in a glvalue. Added some special handling to ignore the load for both field accesses and member function calls.
This fixes all of the consistency failures in our regular tests, and all of the related failures in `syntax-zoo` other than the ones that deal with pointers-to-member, which aren't really supported yet anyway.
2020-10-20 12:53:47 -04:00
Geoffrey White
17ff34267a
C++: Resolve the overlap.
2020-10-20 17:47:49 +01:00
Geoffrey White
7db2b2ce37
C++: Make the two queries more alike.
2020-10-20 17:46:47 +01:00
Geoffrey White
4630c69950
C++: Add a test case resembling the example from ODASA-3940.
2020-10-20 17:39:32 +01:00
Geoffrey White
857a4d8a3f
C++: Merge the two tests, so that overlaps are obvious.
2020-10-20 17:33:15 +01:00
Rasmus Wriedt Larsen
6053157b09
Python: Fix QLDoc to not mention sudo method on fabric Group
2020-10-20 17:30:09 +02:00
Taus Brock-Nannestad
0e2ec0dfb4
Python: Remove cartesian product in TKwOverflowNode
...
With CP:
(0s) Tuple counts for dom#DataFlowPublic::TKwOverflowNode#ff:
1209 ~0% {2} r1 = JOIN project#AstGenerated::Function_::getKwarg_dispred#ff AS L WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<0>
4329 ~0% {3} r2 = JOIN r1 WITH DataFlowPrivate::ArgumentPassing::connects#bb_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
7819 ~2% {4} r3 = JOIN r2 WITH Flow::CallNode::getArgByName_dispred#fff AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<0>, R.<1>
7114 ~1% {4} r4 = r3 AND NOT Function::Function::getArgByName_dispred#fff_01#antijoin_rhs AS R(r3.<0>, r3.<3>)
7114 ~76% {2} r5 = SCAN r4 OUTPUT r4.<2>, r4.<1>
1123 ~0% {1} r6 = JOIN project#Exprs::Call::getKwargs_dispred#ff AS L WITH py_flow_bb_node_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>
1123 ~0% {1} r7 = JOIN r6 WITH Flow::CallNode#class#f AS R ON FIRST 1 OUTPUT r6.<0>
1357707 ~0% {2} r8 = JOIN r7 WITH project#AstGenerated::Function_::getKwarg_dispred#ff AS R CARTESIAN PRODUCT OUTPUT R.<0>, r7.<0>
1357707 ~0% {2} r9 = JOIN r8 WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<1>, R.<1>
1364821 ~0% {2} r10 = r5 \/ r9
return r10
Without CP:
(13s) Tuple counts for dom#DataFlowPublic::TKwOverflowNode#ff:
1209 ~0% {2} r1 = JOIN project#AstGenerated::Function_::getKwarg_dispred#ff AS L WITH ObjectAPI::CallableValue::getScope_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<0>
19175 ~4% {3} r2 = JOIN r1 WITH DataFlowPrivate::ArgumentPassing::connects#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
7819 ~2% {4} r3 = JOIN r2 WITH Flow::CallNode::getArgByName_dispred#fff AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<0>, R.<1>
7114 ~1% {4} r4 = r3 AND NOT Function::Function::getArgByName_dispred#fff_01#antijoin_rhs AS R(r3.<0>, r3.<3>)
7114 ~76% {2} r5 = SCAN r4 OUTPUT r4.<2>, r4.<1>
1123 ~0% {1} r6 = JOIN project#Exprs::Call::getKwargs_dispred#ff AS L WITH py_flow_bb_node_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>
574 ~0% {2} r7 = JOIN r6 WITH DataFlowPrivate::ArgumentPassing::connects#ff AS R ON FIRST 1 OUTPUT R.<1>, r6.<0>
524 ~1% {3} r8 = JOIN r7 WITH ObjectAPI::CallableValue::getScope_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>, r7.<0>
291 ~0% {2} r9 = JOIN r8 WITH project#AstGenerated::Function_::getKwarg_dispred#ff AS R ON FIRST 1 OUTPUT r8.<1>, r8.<2>
7405 ~72% {2} r10 = r5 \/ r9
return r10
2020-10-20 17:29:26 +02:00
Rasmus Wriedt Larsen
cd116fc5f2
Python: Fix grammar in QLDoc
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-20 17:26:33 +02:00
Geoffrey White
a372578571
C++: Move the SizeCheck*.ql tests to the standard location.
2020-10-20 16:02:54 +01:00
Erik Krogh Kristensen
bdbc8f5c91
add support for OptionalUse in js/missing-await
2020-10-20 16:52:57 +02:00
Geoffrey White
8198b96eb2
C++: Add test cases.
2020-10-20 15:33:57 +01:00
Dave Bartolomeo
735c657326
IR consistency checks for FieldAddress and this arguments that are not actually addresses.
...
Exposes failures in existing tests. Also added a small test case for `FieldAddress` on a prvalue.
2020-10-20 10:32:28 -04:00
Geoffrey White
540af7866c
C++: Test spacing.
2020-10-20 15:23:15 +01:00
CodeQL CI
7ea8652f49
Merge pull request #4521 from erik-krogh/moreMiddle
...
Approved by asgerf
2020-10-20 07:14:14 -07:00
Geoffrey White
cbf55ce51a
Merge branch 'main' into intmultlong
2020-10-20 14:55:53 +01:00
Asger Feldthaus
5436bb154a
JS: Mention Xss.ql in change note
2020-10-20 14:49:20 +01:00
Rasmus Wriedt Larsen
6920f3012c
Python: Django route handlers in different file now works
...
Fixed by https://github.com/github/codeql/pull/4514
2020-10-20 15:41:14 +02:00
Rasmus Wriedt Larsen
c8441dc4fb
Merge branch 'main' into python-model-django-sources
2020-10-20 15:38:20 +02:00
Erik Krogh Kristensen
e061c6a006
add support for more custom CSRF checking middlewares
2020-10-20 15:16:14 +02:00
yoff
17155b64f5
Merge pull request #4514 from tausbn/python-add-module-boundary-flow-steps
...
Python: Add module boundary flow steps
2020-10-20 14:36:10 +02:00
Chris Smowton
af6da85ec9
Remove dead LoggerType class
...
This appears to have been factored into Loggers.qll but left lying around.
2020-10-20 13:32:11 +01:00
Erik Krogh Kristensen
05d4858d4f
autoformat
2020-10-20 14:27:09 +02:00
CodeQL CI
d2282fc474
Merge pull request #4517 from erik-krogh/logAssign
...
Approved by esbena
2020-10-20 05:24:49 -07:00
Erik Krogh Kristensen
1096cb0708
aggregate the tests in library-tests/InterProceduralFlow into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
234cb5c67a
aggregate the tests in library-tests/JSLint into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
6b86b53a2c
aggregate the tests in library-tests/LocalObjects into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
3e3e9de45f
aggregate the tests in library-tests/TaintBarriers into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
f8d38227e8
aggregate the tests in library-tests/TypeInference/AnalyzedModule into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
036187cd70
aggregate the tests in library-tests/Util into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
90bb38b522
aggregate the tests in library-tests/variables into a single .ql file
2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
2707531ddd
aggregate the tests in library-tests/Closure into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
15fe0bc38a
aggregate the tests in library-tests/Comprehensions into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0ac55bd521
aggregate the tests in library-tests/Flow into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
b43e21a4c7
aggregate the tests in library-tests/HTML/HTMLElementAndHTMLAttribute into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
003854ebe7
aggregate the tests in library-tests/SensitiveActions into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
d678cc17ba
aggregate the tests in library-tests/Templates into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ad7844a6ac
aggregate the tests in library-tests/ClassNode into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
5d401f98a3
aggregate the tests in library-tests/Externs into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
e461c92708
aggregate the tests in library-tests/JSX into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0c65eee120
aggregate the tests in library-tests/YAML into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
55f130fe62
aggregate the tests in library-tests/AMD into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
10f41878a7
aggregate the tests in library-tests/frameworks/Concepts into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
aece1717aa
aggregate the tests in library-tests/frameworks/xUnit into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
771cab233e
aggregate the tests in library-tests/frameworks/Firebase into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a3e6054ee5
aggregate the tests in library-tests/frameworks/Electron into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ed77e055ed
aggregate some of the tests in library-tests/frameworks/HTTP-heuristics into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
1e537db103
aggregate the tests in library-tests/frameworks/Vue into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
26a5d62a87
aggregate the tests in library-tests/NPM into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
bc5ed100a0
aggregate the tests in library-tests/Patterns into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a47b8c30d1
aggregate the tests in library-tests/TypeScript/ImportEquals into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
778fbe6f61
aggregate the tests in library-tests/TypeScript/ArrayTypes into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
41b940de69
aggregate the tests in library-tests/TypeScript/ExternalTypes into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
7817ee7611
aggregate the tests in library-tests/TypeScript/BigInts into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a588f438b6
aggregate the tests in library-tests/TypeScript/LocalTypeResolution into a single .ql file
2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
deedc8c2d7
aggregate the tests in library-tests/TypeScript/TypeParameters into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
c9a0179f42
aggregate the tests in library-tests/TypeScript/Enums into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
fcee5fa960
aggregate the tests in library-tests/TypeScript/Modifiers into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
1e76471791
aggregate the tests in library-tests/TypeScript/TypeVariableTypes into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
a667b69d91
aggregate the tests in library-tests/NodeJS into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
c8af1d15ab
aggregate the tests in library-tests/TypeScript/Types into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
69093629e9
aggregate the tests in library-tests/XML into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
4f28b6ddd8
aggregate the tests in frameworks/UrlLibraries into a single .ql file
2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
3e532c235b
aggregate the tests in library-tests/DataFlow into a single .ql file
2020-10-20 14:08:53 +02:00
Rasmus Wriedt Larsen
80adbdfbc1
Python: Mark unhandled django route handlers with f-:
...
That is playing more nicely with the expected usage of the inline-tests.
2020-10-20 13:44:34 +02:00
Dave Bartolomeo
7de6415d00
Accept test diffs after merge
2020-10-20 07:40:44 -04:00
Dave Bartolomeo
ade6d10e58
Merge remote-tracking branch 'upstream/main' into work
2020-10-20 07:24:42 -04:00
Taus Brock-Nannestad
a21c29507c
Python: Fix false negative
...
I'm slightly suspicious of this fix -- it seems to work, but it makes
me wonder if we're potentially missing other kinds of flow, by not
handling other kinds of definitions.
Also, I feel like this should really be attached to an appropriate
post-update node of the given argument. As it is written now, the flow
will go from the argument _before_ the call, which obviously misses a
step if the argument is modified by the call. In practice, I would
expect this to be rather rare.
2020-10-20 13:16:54 +02:00
Taus Brock-Nannestad
860cafed4d
Python: Mark failing test as false negative
2020-10-20 13:11:06 +02:00
Asger Feldthaus
c91cdb5194
JS: Address review comments
2020-10-20 12:00:02 +01:00
Taus
802a725260
Merge pull request #2 from RasmusWL/python-tricky-import-ssa-filter-definition
...
Python: Add test for tricky module member for type-tracking
2020-10-20 12:51:45 +02:00
CodeQL CI
8b084ffe22
Merge pull request #4518 from asgerf/js/fix-oom
...
Approved by erik-krogh
2020-10-20 03:37:00 -07:00
Rasmus Wriedt Larsen
045a6c3cb5
Python: Add test for tricky module member for type-tracking
...
Local testing shows that the `getDefinition` result for this is a `SSA filter definition`,
and not an `AssignmentDefinition`.
2020-10-20 12:20:35 +02:00
Mathias Vorreiter Pedersen
528afc55ab
Merge pull request #3788 from geoffw0/callderef
...
C++: Add bcopy to models and use it.
2020-10-20 12:15:23 +02:00
Asger Feldthaus
8779b7c1ce
JS: Update expected output after rebase
2020-10-20 11:10:30 +01:00
Asger Feldthaus
aee970bee7
JS: Change note
2020-10-20 10:54:02 +01:00
Asger Feldthaus
28a73c1e18
JS: Add test case
2020-10-20 10:53:15 +01:00
Asger Feldthaus
6aac353777
JS: Update test output
2020-10-20 10:53:12 +01:00
Asger Feldthaus
50a015c73e
JS: Move $() sink into separate dataflow config
2020-10-20 10:52:33 +01:00
CodeQL CI
4cc7138784
Merge pull request #4507 from erik-krogh/template
...
Approved by asgerf
2020-10-20 02:45:00 -07:00
Erik Krogh Kristensen
8c8cf4fc01
autoformat
2020-10-20 11:17:06 +02:00
Erik Krogh Kristensen
7d87699e42
add test for modern compound assignment in js/implicit-operand-conversion
2020-10-20 10:50:20 +02:00
Erik Krogh Kristensen
eb786078cb
support modern compund-assignment in js/implicit-operand-conversion
2020-10-20 10:40:47 +02:00
Erik Krogh Kristensen
f47fb5ebd8
switch extends around to match @assignlogandexpr and @assignlogorexpr correctly
2020-10-20 10:38:45 +02:00
Geoffrey White
f9987cff64
C++: Update QLDoc comment.
2020-10-20 09:36:33 +01:00
Asger Feldthaus
78c85775e3
JS: Do not extend AdditionalTaintStep in the ldap library
2020-10-20 09:07:12 +01:00
Tamas Vajk
5d0c30db66
C#: Fix nullable reference type handling in type mention extraction
2020-10-20 08:23:57 +02:00
Tamas Vajk
dad5166bca
C#: Print full name of type mentions in AST
2020-10-20 08:23:57 +02:00
Tamas Vajk
7929d8a982
C#: Fix generic type name location in AST
2020-10-20 08:23:56 +02:00
Tamas Vajk
037907e442
C#: Fix qualified name type mention extraction
2020-10-20 08:23:56 +02:00
Tamas Vajk
238ed2e643
C#: Make array and pointer type mentions symmetrical
2020-10-20 08:23:56 +02:00
Tamas Vajk
a87343dd69
C#: Add more type test cases to cover type mentions
2020-10-20 08:23:56 +02:00
Tamas Vajk
f0a40f6e5e
C#: Fix type mention for stackalloc to span assignment
2020-10-20 08:23:56 +02:00
Tamas Vajk
7cb4d6d7a0
C#: Fix type mentions for stackalloc arrays
2020-10-20 08:23:56 +02:00
Tamas Vajk
ca6ecb3f1e
C#: Extract type mention for array creation
2020-10-20 08:23:56 +02:00
Tamas Vajk
7066568813
C#: Change type access and expression order in casts for AST printing
2020-10-20 08:23:56 +02:00
Tamas Vajk
6c48eb8c12
C#: Add type mentions to AST
2020-10-20 08:23:56 +02:00
Rasmus Lerchedahl Petersen
5990241c8f
Python: Support django models (with some caveats)
2020-10-20 03:20:00 +02:00
Taus
f5ec548e68
Python: Fix typo in QLDoc
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-10-19 23:51:38 +02:00
Rasmus Lerchedahl Petersen
d7308bddf2
Python: Add django sink with concept test
2020-10-19 21:34:55 +02:00
Dave Bartolomeo
2eaa4a4ecf
Merge remote-tracking branch 'upstream/main' into work
2020-10-19 15:19:03 -04:00
Dave Bartolomeo
3587235b4f
Merge pull request #4471 from github/igfoo/unnamed
...
C++: Be more consistent about unnamed entities
2020-10-19 15:18:34 -04:00
Dave Bartolomeo
d0b93df4ec
Merge from main
2020-10-19 15:17:19 -04:00
Ian Lynagh
987c16ed53
Merge remote-tracking branch 'upstream/main' into igfoo/unnamed
2020-10-19 19:09:41 +01:00
Geoffrey White
a426412b4e
Merge pull request #4497 from vadi2/patch-1
...
Add modern C++ variant
2020-10-19 19:09:23 +01:00
Geoffrey White
b68f98b332
C++: More use of [, ].
2020-10-19 19:05:29 +01:00
CodeQL CI
4c5ecb4093
Merge pull request #4478 from erik-krogh/homegrownCsrf
...
Approved by asgerf
2020-10-19 11:04:10 -07:00
CodeQL CI
502faa7d1c
Merge pull request #4494 from erik-krogh/callLimit
...
Approved by asgerf
2020-10-19 11:03:25 -07:00
Geoffrey White
658dbf45d2
C++: getParameter(_) is considered an anti-pattern.
2020-10-19 18:42:33 +01:00
Robert Marsh
5d9f54e797
Merge pull request #4502 from dbartol/dbartol/PrintLoadStoreTargets
...
C++: Print target variable name for `Load` and `Store`, if known
2020-10-19 13:30:39 -04:00
Dave Bartolomeo
2ba1ef9961
Merge remote-tracking branch 'upstream/main' into work
2020-10-19 13:28:59 -04:00
Geoffrey White
ddc5150080
C++: Create a module for models of things in Std.
2020-10-19 18:27:20 +01:00
Geoffrey White
3fad597bbf
C++: Make function models private (except ones we anticipate users accessing).
2020-10-19 18:25:23 +01:00
Taus Brock-Nannestad
7755993dd3
Python: Add jump steps for module attribute reads.
...
This is the quick-and-dirty solution, as discussed.
An even quicker-and-dirtier solution would have used
`ModuleValue::attr` and take the `getOrigin` of that as the source of
the jump step. However, this turns out to be a bad choice, since
`attr` might fail to have a value for the given attribute (for a
variety of reasons). Thus, we instead appeal to a helper predicate
that keeps track of which names are defined by which right-hand-sides
in a given module. (Observe that type tracking works correctly for `x`
in `mymodule.py`, even though `x` is never assigned a value in the
eyes of the Value API.)
This means that points-to is only used to actually figure out if the
object we're looking an attribute up on is a module or not. This is
the next thing to replace in order to eliminate the dependence on
points-to, but this will require some care to ensure that all module
lookups are handled correctly.
Only two test files needed to be changed for the tests to pass. The
first was the fixed false negative in the type tracker, and the other
was a bunch of missing flow in the regression test. I have manually
removed the `# Flow not found` annotations to make them consistent
with the output. Pay particular attention to the annotation on line
117 -- I believe it was misplaced and should have been on line 106
instead (where, indeed, we now have flow where none appeared before).
2020-10-19 19:13:32 +02:00
Robert Marsh
aad6d43423
C++: autoformat
2020-10-19 10:12:16 -07:00
Geoffrey White
8646d5c811
C++: Fix test failure (we no longer have taint flow from the size parameter).
2020-10-19 17:37:11 +01:00
luchua-bc
2c2aab6ffc
Sensitive broadcast
2020-10-19 16:16:13 +00:00
Geoffrey White
541a449bc4
Merge branch 'main' into callderef
2020-10-19 17:15:33 +01:00
Rasmus Wriedt Larsen
98691fe8ec
Python: Model fabric Group execution (version 2.x)
...
This required some thought for how to model that we're interested in subclasses
of `fabric.group.Group`, and not so much that class itself. Some thoughts:
---
After initially using this in `module Group`
/** A reference to a subclass of `fabric.group.Group` */
abstract class SubclassRef extends DataFlow::Node { }
private class SubclassInstantiation extends SubclassInstanceSource, DataFlow::CfgNode {
override CallNode node;
SubclassInstantiation() { node.getFunction() = any(SubclassRef ref).asCfgNode() }
}
with this in `module SerialGroup` and `module ThreadingGroup`:
class ClassRef extends DataFlow::Node, fabric::group::Group::SubclassRef {
ClassRef() { this = classRef(DataFlow::TypeTracker::end()) }
}
I wasn't too much of fan of that approach. Since we probably need the `SubclassInstanceSource` anyway, and don't really have a specific use for `SubclassRef`, I just went with concrete (QL) subclasses of `SubclassInstanceSource` in each of the modules for the Python subclasses.
I really don't know what the best approach is, so I'm very open to suggestions. I think we'll really have to flesh this out for handling Django responses, since we're interested in the fact that some subclasses provide default values for the content-type, and keeping track of that is important for XSS (since there is no XSS if response is `text/plain`)
2020-10-19 18:09:11 +02:00
Rasmus Wriedt Larsen
f10456e35f
Python: Model fabric task decorator (version 2.x)
2020-10-19 18:03:03 +02:00
Rasmus Wriedt Larsen
c671017252
Python: Model fabric Connection (version 2.x)
2020-10-19 18:03:02 +02:00
Rasmus Wriedt Larsen
f7502386e7
Python: Model fabric package (version 1.x)
2020-10-19 18:03:01 +02:00
Vadim Peretokin
aa578ed334
Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-19 16:58:17 +02:00
Geoffrey White
460fbea253
C++: Add some more cases.
2020-10-19 15:54:42 +01:00
Geoffrey White
6280b7d5d4
C++: Add the example code for IntMultToLong to the test.
2020-10-19 15:45:31 +01:00
Anders Schack-Mulligen
4ce41854a4
Merge pull request #4508 from smowton/smowton/fix/droid-webview-test-data
...
Fix test data for WebView experimental query
2020-10-19 16:29:20 +02:00
CodeQL CI
5ead4244fe
Merge pull request #4450 from asgerf/js/angular
...
Approved by erik-krogh
2020-10-19 07:25:59 -07:00
Owen Mansel-Chan
77312a2859
List precision options more accurately
2020-10-19 15:08:19 +01:00
Chris Smowton
4fa2a79b41
Fix test data for WebView experimental query
2020-10-19 14:57:18 +01:00
Erik Krogh Kristensen
ce95676130
add express.csrf as an CSRF protecting middleware
2020-10-19 15:39:02 +02:00
Rasmus Wriedt Larsen
6b30198d59
Python: Port old fabric tests
...
For v1 tests, just extended with explicit calls that use keyword arguments.
For v2 tests, rewrote pretty much everything to what it 100% explicit what we support
2020-10-19 14:34:22 +02:00
CodeQL CI
d644a30b19
Merge pull request #4434 from erik-krogh/printAST
...
Approved by asgerf
2020-10-19 04:42:42 -07:00
Joe Farebrother
980fdd8dea
Java: Update Guava version in test stubs and change note
2020-10-19 11:56:28 +01:00
Vadim Peretokin
f403c9d02c
Update cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2020-10-19 12:49:32 +02:00
Erik Krogh Kristensen
ca0870da53
update expected output from InterfaceDefinition -> InterfaceDeclaration change
2020-10-19 12:36:48 +02:00
Joe Farebrother
227092e2ae
Java: Minor corrections to comments
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-10-19 11:16:33 +01:00
CodeQL CI
2e52cbeb4a
Merge pull request #4499 from max-schaefer/js/module_compile
...
Approved by asgerf
2020-10-19 03:06:21 -07:00
Erik Krogh Kristensen
8f6165cd5f
print synthetic constructors in PrintAst.ql
2020-10-19 11:10:14 +02:00
Erik Krogh Kristensen
5b1ed97d68
Update javascript/ql/src/semmle/javascript/TypeScript.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-19 11:01:06 +02:00
Rasmus Lerchedahl Petersen
646ced2a1d
Python: Add concept test scaffold
2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
f17720f587
Python: Add test and fix filename
2020-10-19 10:58:57 +02:00
Rasmus Lerchedahl Petersen
d76b2c0023
Python: Add concept and port query
2020-10-19 10:58:57 +02:00
Erik Krogh Kristensen
8c44392638
add local dataflow to js/template-syntax-in-string-literal
2020-10-19 10:58:40 +02:00
Max Schaefer
e1d90e90ad
JavaScript: Add modelling for Module.prototype._compile.
2020-10-19 09:42:17 +01:00
Chris Smowton
3e03db178f
Merge pull request #4483 from smowton/smowton/admin/droid-webview-pr-rebase
...
Rebase of #3706
2020-10-19 09:29:04 +01:00
Dave Bartolomeo
ece20cdb5e
Merge branch 'main' into dbartol/temporaries/work
2020-10-18 13:11:06 -04:00
Mathias Vorreiter Pedersen
7942d7332a
Merge pull request #4501 from dbartol/dbartol/PrintPartialFlow
...
C++: Annotate IR with partial flow info
2020-10-18 17:48:54 +02:00
Dave Bartolomeo
b73cb3a4ce
Accept C# IR diffs
2020-10-18 11:11:05 -04:00
Dave Bartolomeo
2f34c78552
Fix formatting
2020-10-18 11:08:42 -04:00
Dave Bartolomeo
0b2acff837
Add upgrade script
2020-10-18 08:42:24 -04:00
Dave Bartolomeo
939bfae6e0
Fix formatting
2020-10-18 08:32:08 -04:00
Dave Bartolomeo
5f6ae32f1c
Accept test output after merge
2020-10-17 18:16:21 -04:00
Dave Bartolomeo
129e250569
Update test expectations
2020-10-17 17:01:24 -04:00
Dave Bartolomeo
eb9cea48b8
Fix modeling of std::set::emplace
2020-10-17 17:00:29 -04:00
Dave Bartolomeo
40cd96eb1d
Merge from main
2020-10-17 15:14:26 -04:00
Dave Bartolomeo
4e0afb0dc3
Print targets of Load and Store instructions in IR dump
2020-10-17 15:01:45 -04:00
Dave Bartolomeo
e4fdf699ad
Accept improved test results
2020-10-17 14:33:10 -04:00
Dave Bartolomeo
4814dcf145
Print partial flow info in PrintIRLocalFlow.qll
2020-10-17 14:32:31 -04:00
Dave Bartolomeo
a80c6fbf97
C++: Print target variable name for Load and Store, if known
...
Now that we've started printing the targets of `Call` instructions in the IR dumps, I figured I might as well print the names of the variable being loaded or stored as well. We could potentially extend this to match fields, array elements, etc., but that's quite a bit more work.
2020-10-17 14:21:27 -04:00
Dave Bartolomeo
100f13f202
C++: Annotate IR with partial flow info
...
I've added one more property to the annotations provided by `PrintIRLocalFlow.qll`: The `pflow` property will now be emitted for any operand or instruction for which `configuration.hasPartialFlow` determines that there is partial flow to that node. This requires that partial flow be enabled via overriding `Configuration::explorationLimit()` in order to display. Otherwise, you'll still just get the local flow info as before.
2020-10-17 13:17:08 -04:00
Dave Bartolomeo
1dae8f62c1
Model copy-ish constructors for std::pair
2020-10-17 11:33:20 -04:00
Dave Bartolomeo
1b53c4684d
Fix test expectations due to pair/make_pair fixes
2020-10-17 09:46:18 -04:00
Dave Bartolomeo
686f5aa8ed
Handle parameter indirections in make_shared and make_unique
2020-10-17 08:53:55 -04:00
Dave Bartolomeo
7da4eef90d
Fix subtle typing issue with std::makr_pair
2020-10-17 08:53:20 -04:00
Dave Bartolomeo
675256acab
Accept test diffs from set.cpp (50 new good results!)
2020-10-16 17:14:41 -04:00
Dave Bartolomeo
af799a79da
Accept good test diffs
2020-10-16 17:07:46 -04:00
Dave Bartolomeo
cf19fcf4c0
C++: Improve dataflow model for copy/move constructors
2020-10-16 16:55:59 -04:00
Robert Marsh
4766492e39
C++: respond to PR comments on output iterators
2020-10-16 13:47:20 -07:00
Robert Marsh
7f2aa81d0b
Merge pull request #4498 from dbartol/dbartol/PrintCallTargets
...
C++: Print static call target for `Call` instruction in dumps
2020-10-16 16:46:33 -04:00
Robert Marsh
1f8167b47b
C++: fix test annotations
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-10-16 16:16:27 -04:00
Asger Feldthaus
f0034138ce
JS: Fix DefaultFlowLabels test
2020-10-16 18:13:13 +01:00
Dave Bartolomeo
9afddf0dad
Insert a load of the temporary object for arguments passed by value
2020-10-16 12:56:46 -04:00
Dave Bartolomeo
6a9ecf7ba2
Dump static call target for Call instructions
2020-10-16 12:55:30 -04:00
Asger Feldthaus
4137d3f971
JS: Split CWE-079 tests into their own folders
2020-10-16 17:32:36 +01:00
Dave Bartolomeo
6a6eadcf50
C++: Print static call target for Call instruction in dumps
2020-10-16 11:53:27 -04:00
Chris Smowton
5a480bfb13
Give query an id and PathGraph query predicates
2020-10-16 16:19:58 +01:00
Vadim Peretokin
8933bbd672
Add modern C++ variant
2020-10-16 17:11:41 +02:00
Erik Krogh Kristensen
8cf21e3b2b
autoformat
2020-10-16 16:56:35 +02:00
Dave Bartolomeo
14ac9859c1
Remove more ODR violations from test code.
...
PrintAST now works on `library-tests/dataflow/taint-tests`.
2020-10-16 10:26:42 -04:00
Anders Schack-Mulligen
a806a4f086
Merge pull request #4312 from JLLeitschuh/feat/JLL/java/jhipster_CVE-2019-16303
...
Java: QL Query Detector for JHipster Generated CVE-2019-16303
2020-10-16 15:47:09 +02:00
Tom Hvitved
d91ea55f0c
Merge pull request #4440 from aschackmull/dataflow/adaptive-field-precision
...
Dataflow: Adaptive field flow precision
2020-10-16 15:08:56 +02:00
Erik Krogh Kristensen
27a2cd310d
inline value in nodeLeadingToCsrfWrite
2020-10-16 14:21:49 +02:00
Erik Krogh Kristensen
017c73dce3
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-16 14:20:40 +02:00
Erik Krogh Kristensen
c2338b218f
Update javascript/ql/src/semmle/javascript/dataflow/Nodes.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2020-10-16 14:12:36 +02:00
CodeQL CI
1d9b0ce059
Merge pull request #4460 from max-schaefer/js/unsafe-shell-command-construction-infeasible-paths
...
Approved by asgerf
2020-10-16 05:05:29 -07:00
Anders Schack-Mulligen
2b19a48030
Merge pull request #3880 from hvitved/dataflow/precise-aps
...
Data flow: Precise access paths
2020-10-16 13:54:35 +02:00
Anders Schack-Mulligen
b352605d12
Dataflow: Code review fixes.
2020-10-16 13:45:51 +02:00
Erik Krogh Kristensen
7598d31fc1
add change note
2020-10-16 13:35:31 +02:00
Erik Krogh Kristensen
b3d5f9c4dd
support throttle like calls as partial calls
2020-10-16 13:33:02 +02:00
Joe Farebrother
3ef9498d53
Java: Modify privateness of a couple imports for Guava
2020-10-16 12:09:39 +01:00
Anders Schack-Mulligen
664f04020f
Revert "Dataflow: Count callables instead of nodes for fieldFlowBranchLimit."
...
This reverts commit 1501a40de8 .
2020-10-16 12:51:50 +02:00
Anders Schack-Mulligen
1501a40de8
Dataflow: Count callables instead of nodes for fieldFlowBranchLimit.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
6aae51fa4f
Dataflow: Sync.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
8f055f56b8
Dataflow: Adaptive field flow precision.
2020-10-16 12:51:17 +02:00
Anders Schack-Mulligen
b0f0f89dbc
Dataflow: Minor pruning improvements.
2020-10-16 12:51:17 +02:00
Tamas Vajk
52bdd8bf99
C#: Add support for custom assert methods ([DoesNotReturnIf(true/false)])
2020-10-16 12:25:03 +02:00
Joe Farebrother
8cd00cf05f
Java: Add change note for Guava
2020-10-16 11:08:45 +01:00
Taus Brock-Nannestad
60fcb5e7d5
Python: Add PEP-328 test example
...
Based on https://www.python.org/dev/peps/pep-0328/#guido-s-decision
Original "code" is in the Public Domain.
2020-10-16 12:03:43 +02:00
Joe Farebrother
4b160b9aaf
Java: Merge Guava definitions for string utilities into one file
2020-10-16 10:46:27 +01:00
Joe Farebrother
adad75bd86
Java: Update Guava modelling to use new refactor
2020-10-16 10:39:18 +01:00
Joe Farebrother
8834a8fed6
Java: Make tests less noisy
2020-10-16 10:22:41 +01:00
Joe
f58ebad756
Java: Fix QLDoc
2020-10-16 10:22:41 +01:00
Joe
fc4d7c3161
Java: Make Guava stuff private
2020-10-16 10:22:41 +01:00
Joe
28647b20e2
Java: Add tests
2020-10-16 10:22:41 +01:00
Joe
e196c75b4e
Java: Add modelling for Guava Strings, Splitter, and Joiner
2020-10-16 10:22:30 +01:00
Rasmus Wriedt Larsen
86798063a3
Python: Model tainted attributes of django HttpRequest
2020-10-16 11:12:20 +02:00
Rasmus Wriedt Larsen
a3cdbf2052
Python: Basic modeling of Django HttpRequest
2020-10-16 11:12:19 +02:00
Rasmus Wriedt Larsen
f547b6010b
Python: Implement routed parameter for django.urls.re_path
2020-10-16 11:12:17 +02:00
Rasmus Wriedt Larsen
ff8708df67
Python: Implement routed parameter for django.urls.path
...
Matching current implementation in
f07a7bf8cf/python/ql/src/semmle/python/web/django/General.qll (L125-L133)
2020-10-16 11:12:16 +02:00
Rasmus Wriedt Larsen
8803fb2778
Python: Refactor RouteSetup with default impl for getUrlPattern
...
Having multiple copies of the StrConst data-flow tracking code means that if we
need to update this to be more sophisticated, we could easily forget to do it
somewhere :|
Until we have a proper `.getAPossibleStringValue` helper, this refactoring
should be nice :)
2020-10-16 11:12:15 +02:00
Rasmus Wriedt Larsen
44683f2959
Python: Identify route handlers for django
...
Not including class based handlers
2020-10-16 11:12:14 +02:00
Rasmus Wriedt Larsen
c0d71f767a
Python: Add taint test for django v2/v3
2020-10-16 11:12:13 +02:00
Rasmus Wriedt Larsen
09a2a6cdfd
Python: Fix django re_path kwarg test
...
Since it was using the wrong keyword argument name before :D
2020-10-16 11:12:12 +02:00
Rasmus Wriedt Larsen
b28d022be9
Python: Add simpel model of a django path/re_path route setup
...
Also had to change the annotation to not include the `r` prefix for the
raw-string... not sure why that isn't replicated, but ¯\_(ツ)_/¯
2020-10-16 11:12:11 +02:00
Rasmus Wriedt Larsen
979dc471ac
Python: Port old routing tests
2020-10-16 11:12:09 +02:00
Rasmus Wriedt Larsen
ca60132e24
Python: Django test: Add simple route handler and annotations
2020-10-16 11:12:09 +02:00
Rasmus Wriedt Larsen
44b9b7f084
Python: Django test: Enable app
...
and add a bits of use docs
2020-10-16 11:12:08 +02:00
Rasmus Wriedt Larsen
6506e5d646
Python: Django test: Add testapp
2020-10-16 11:12:07 +02:00
Rasmus Wriedt Larsen
c71c41b759
Python: Django test: Disable DB (for now)
2020-10-16 11:12:06 +02:00
Rasmus Wriedt Larsen
f704c566b9
Python: Add real django 3.1 project as base of tests
2020-10-16 11:12:05 +02:00
Rasmus Lerchedahl Petersen
cced335284
Python: Switch tests to path queries
2020-10-16 09:59:30 +02:00
Tamas Vajk
ffc2a64750
C#: do not discard duplicate trapfiles for compilation parameter extraction
2020-10-16 09:52:21 +02:00
Tom Hvitved
27fc610c0d
Python: Update expected test output
2020-10-16 09:09:06 +02:00
Tom Hvitved
5f01fda1ef
Data flow: Sync files
2020-10-16 09:05:02 +02:00
Tom Hvitved
82e56d4ebb
Data flow: Simplify pathStep and pathIntoCallable
2020-10-16 09:05:02 +02:00
Anders Schack-Mulligen
94f110f739
Sync.
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
b4ecfaeda3
Dataflow: Remove inconsistent AccessPath.getType().
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
d88c551f64
Dataflow: qldoc fix
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
98f10b29b8
Dataflow: Simplify SCC: remove some apa params.
2020-10-16 09:05:01 +02:00
Anders Schack-Mulligen
4e2f786040
Dataflow: Precalculate AccessPath to avoid massive recursion.
2020-10-16 09:05:01 +02:00
Mathias Vorreiter Pedersen
ca534ccb03
C++: Update inline expectation comments
2020-10-16 09:05:01 +02:00
Tom Hvitved
570b624eb7
C++: Update expected test output
2020-10-16 09:05:01 +02:00
Tom Hvitved
d48a6a5555
C#: Update expected test output
2020-10-16 09:04:58 +02:00
Tom Hvitved
d608138c0c
Data flow: Sync files
2020-10-16 09:03:13 +02:00
Tom Hvitved
a35a178080
Data flow: Precise access paths
2020-10-16 09:03:13 +02:00
Tom Hvitved
0dc066c515
Data flow: Rename AccessPath to AccessPathApprox
2020-10-16 09:03:13 +02:00
Rasmus Lerchedahl Petersen
41b8877579
Python: Improve test configuration
2020-10-16 08:32:05 +02:00
Asger Feldthaus
287ec0cbbb
JS: Add test for default flow labels
2020-10-16 07:16:02 +01:00
Asger Feldthaus
583f3d7fd9
JS: Also materialize labels in ZipSlip
2020-10-16 07:12:30 +01:00
Asger Feldthaus
4337c5adaf
JS: Workaround ascii PR check
2020-10-16 07:12:29 +01:00
Asger Feldthaus
b3d8b95433
JS: Autoformat
2020-10-16 07:12:29 +01:00
Asger Feldthaus
ca6cd187b7
JS: Change note
2020-10-16 07:12:29 +01:00
Asger Feldthaus
42fc4ff78c
JS: Don't create new flow labels in *Customizations.qll files
2020-10-16 07:12:29 +01:00
Asger Feldthaus
28b449226c
JS: Do not import UrlConcatenation from customizations libraries
2020-10-16 07:12:29 +01:00
Asger Feldthaus
afd82e202d
JS: Add Angular2 model
2020-10-16 07:12:29 +01:00
Dave Bartolomeo
3767a52e9a
Fix ODR violations in test code
2020-10-15 17:54:48 -04:00
Erik Krogh Kristensen
9112d417e4
avoid using getFirstToken for sorting
2020-10-15 20:57:29 +02:00
Dave Bartolomeo
ceea5b3ec6
Fix test code that returns reference to local
2020-10-15 13:37:20 -04:00
Aditya Sharad
a92a701c35
Merge pull request #4479 from github/lgtm.com
...
Merge lgtm.com back into main
2020-10-15 10:19:25 -07:00
Mathias Vorreiter Pedersen
da9e33a72c
Merge pull request #4477 from dbartol/dbartol/PrintIRLocalFlow
...
C++: Add ability to dump local dataflow info in IR dumps
2020-10-15 17:38:16 +02:00
Rasmus Wriedt Larsen
5142bfaf01
Merge pull request #4453 from yoff/python-port-unsafe-deserialization
...
Python: port unsafe deserialization
2020-10-15 17:26:31 +02:00
Rasmus Wriedt Larsen
58baec5b06
Merge pull request #4364 from yoff/SharedDataflow_ArgumentPassing
...
Python: Shared dataflow, argument passing
2020-10-15 17:10:59 +02:00
Joe Farebrother
388f60f818
Merge pull request #4430 from joefarebrother/tainttrackingutils-refactor
...
Java: Refactor part of TaintTrackingUtil.qll
2020-10-15 16:05:38 +01:00
Rasmus Lerchedahl Petersen
89f5352324
Python: fix QL format
2020-10-15 16:41:41 +02:00
Dave Bartolomeo
f32a7be874
Fix formatting
2020-10-15 10:16:13 -04:00
luchua-bc
b359802dd4
Replace non-ASCII apostrophe in Java stub classes
2020-10-15 14:53:32 +01:00
luchua-bc
6f6ec9d51a
Change the source class type and simplify the data-flow step
2020-10-15 14:53:32 +01:00
luchua-bc
f5e9690594
Update the doc comments
2020-10-15 14:53:32 +01:00
luchua-bc
c7750fd8c2
Fine tune the query
2020-10-15 14:53:32 +01:00
luchua-bc
5338332648
Enhance the query and add more test cases
2020-10-15 14:53:31 +01:00
luchua-bc
55af37312b
Text changes to the help file
2020-10-15 14:53:31 +01:00
luchua-bc
ebc2bd9a58
Text changes to the help file
2020-10-15 14:53:31 +01:00
luchua-bc
bd0c577ffd
Unsafe resource loading in Android webview
2020-10-15 14:53:30 +01:00
Rasmus Lerchedahl Petersen
ef32488596
Merge branch 'main' of github.com:github/codeql into python-port-unsafe-deserialization
2020-10-15 15:45:35 +02:00
James Fletcher
b05cc2eafd
Merge pull request #4475 from github/banner-template
...
[CodeQL docs] Update footer in Sphinx template
2020-10-15 14:39:52 +01:00
James Fletcher
fb05f02489
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-10-15 14:24:28 +01:00
CodeQL CI
ab7d28b3fb
Merge pull request #4482 from RasmusWL/promote-script
...
Approved by tausbn
2020-10-15 06:15:55 -07:00
Jonathan Leitschuh
a9c5551284
Fix formatting in Lang.qll
2020-10-15 08:52:02 -04:00
Erik Krogh Kristensen
ff054b985b
add change note
2020-10-15 14:51:02 +02:00
Erik Krogh Kristensen
8206933e85
add test for home grown CSRF protection
2020-10-15 14:51:02 +02:00
Erik Krogh Kristensen
4d1a9740f0
add support for home made CSRF protection middlewares in js/missing-token-validation
2020-10-15 14:50:59 +02:00
Geoffrey White
1b8d14077a
Merge pull request #4481 from rvermeulen/patch-1
...
C++: Fix qldoc for getIncludeText
2020-10-15 13:00:33 +01:00
Erik Krogh Kristensen
1d2ca42d49
update expected output
2020-10-15 13:42:13 +02:00
Erik Krogh Kristensen
d629eea54e
aggregate the arguments of a call into a synthetic node
2020-10-15 13:35:19 +02:00
Erik Krogh Kristensen
5770d0256f
fixing printing of NameConstants
2020-10-15 13:32:22 +02:00
Rasmus Wriedt Larsen
43cee8567c
Python: Add script to promote experimental security queries
2020-10-15 13:25:01 +02:00
Erik Krogh Kristensen
2a5dd2c8a3
fix pretty-printing of number literals
2020-10-15 13:04:52 +02:00
Rasmus Lerchedahl Petersen
cc7d32c27c
Merge branch 'python-port-unsafe-deserialization' of github.com:yoff/codeql into python-port-unsafe-deserialization
2020-10-15 13:01:38 +02:00
Erik Krogh Kristensen
1d4a605517
remove location for synthetic nodes
2020-10-15 12:57:46 +02:00
Erik Krogh Kristensen
9da8c23717
change the order of the children from FunctionDef
2020-10-15 12:57:17 +02:00
Rasmus Lerchedahl Petersen
172e058438
Python: unsafe -> mayExecuteInput
2020-10-15 12:56:29 +02:00
Rasmus Lerchedahl Petersen
00566f0eee
Python: Extend DataFlow::CfgNode when appropriate
2020-10-15 12:40:16 +02:00
yoff
c36ad7dd9b
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-15 12:35:21 +02:00
Tamás Vajk
e62c9b1382
Merge pull request #4472 from tamasvajk/feature/cleanup-3
...
C#: Change public fields to properties
2020-10-15 12:16:53 +02:00
Erik Krogh Kristensen
11ee7c7946
update expected output
2020-10-15 12:06:17 +02:00
Erik Krogh Kristensen
f9f29f53cf
remove locations where we have no exact location
2020-10-15 11:59:51 +02:00
Tom Hvitved
36f6e97cad
Merge pull request #4371 from hvitved/csharp/library-flow-refactor
...
C#: Reimplement flow-summary compilation
2020-10-15 11:56:32 +02:00
Erik Krogh Kristensen
2bb8b78a29
remove "</>" from the end when printing HTML
2020-10-15 11:56:00 +02:00
Remco Vermeulen
7848c5f54d
Fix qldoc for getIncludeText
...
The '<' was HTML encoded for some reason.
2020-10-15 11:49:18 +02:00
Erik Krogh Kristensen
a019312953
improve printing of JS object literals
2020-10-15 11:47:45 +02:00
Rasmus Lerchedahl Petersen
9c8e968cba
Python: Fix bad merge
2020-10-15 11:47:34 +02:00
Erik Krogh Kristensen
ab7542c0d2
improve printing of JSON values
2020-10-15 11:05:22 +02:00
Taus
c8b93148a2
Merge pull request #4424 from RasmusWL/python-model-python2-specific-command-execution
...
Python: model Python 2 specific command execution
2020-10-15 10:52:43 +02:00
Erik Krogh Kristensen
1ebd49b0eb
remove location from "mapping i" print node
2020-10-15 10:51:34 +02:00
Erik Krogh Kristensen
3e2d266343
improve YAMLMapping printing
2020-10-15 10:49:37 +02:00
Anders Schack-Mulligen
60ce02ac18
Merge pull request #4469 from JLLeitschuh/additional-file-taint
...
Java: Track taint through java.io.File::toPath & java.nio.file.Path::toFile
2020-10-15 10:46:35 +02:00
Erik Krogh Kristensen
1b908ce030
improve printing of DeclStmt, and remove escaped whitespace chars from printed output
2020-10-15 10:43:32 +02:00
Tom Hvitved
8728017328
C#: Increase fieldFlowBranchLimit in test
...
68014fd3bf means that more accessors are properly
extracted, and consequently the calls to `get_Item` in the test have more dispatch
targets. Increasing `fieldFlowBranchLimit` makes the test pass again.
2020-10-15 10:40:19 +02:00
Rasmus Wriedt Larsen
c5810d623b
Merge pull request #4474 from tausbn/python-fix-tostring-divergence
...
Python: Fix divergence in tuple/subscripted type `toString`
2020-10-15 10:29:33 +02:00
Erik Krogh Kristensen
c033ae9b7f
add one more case to getAPrimaryQlClass
2020-10-15 10:05:07 +02:00
Arthur Baars
a10c0138e9
Merge commit '78c58c24158e3ee4fd78318194d56591af90da69' into lgtm.com
2020-10-15 10:00:43 +02:00
Rasmus Wriedt Larsen
ce967e1249
Merge branch 'main' into python-model-python2-specific-command-execution
2020-10-15 10:00:02 +02:00
Erik Krogh Kristensen
ab10c28cc4
change the default sorting order for print children to be location based
2020-10-15 09:53:52 +02:00
Rasmus Lerchedahl Petersen
0766eef49b
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ArgumentPassing
2020-10-15 09:49:21 +02:00
Erik Krogh Kristensen
74243d39aa
remove location for arguments/parameters print node
2020-10-15 09:48:55 +02:00
Robert Marsh
fade75b0fb
C++: add operator-- tests for insert iterators
2020-10-14 15:54:34 -07:00
Dave Bartolomeo
dfb687fd47
C++: Add ability to dump local dataflow info in IR dumps
...
This change adds a new module, `PrintIRLocalFlow.qll`, which can be imported into any query that uses both `PrintIR.qll` and the IR dataflow library. The IR dump printed by `PrintIR.qll` will be annotated with information about how each operand and instruction participates in dataflow.
For each operand and instruction, the following propeties are displayed:
- `flow`: Which local operands/instructions have flow to this node, and which local operands/instruction this node has flow to.
- `source`: `true` if this node is a source
- `sink`: `true` if this node is a sink
- `barrier`: Lists which kinds of barrier this node is. Can be zero or more of `full`, `in`, `out`, and `guard`. If the node is a guard barrier, the IR of the guarding instruction is also printed.
We already had a way to print additional properties for instructions and blocks, but not for operands. I added support for operand properties to `IRPropertyProvider`. These are now printed in a curly-brace-enclosed list immediately after the corresponding operand.
When printing flow, instructions are identified by their result ID (e.g., `m128`). Operands are identified by both the result ID of their instruction and their kind (e.g., `r145.left`). For flow from an operand to its use instruction, it just prints `result` at the operand, and prints only the operand kind on the instruction.
Example output:
```
# 344| m344_34(vector<int, allocator<int>>) = Chi : total:m344_20{flow:def->@, @->result}, partial:m344_33{flow:def->@, @->result}
# 344| flow = total->@, partial->@, +m344_33->@, @->+r347_3, @->v347_7.side_effect, @->m347_9.total, @->m344_20.1
```
The `+` annotations indicate when the flow came from `isAdditionalFlowStep()`, rather than built-in local flow.
2020-10-14 18:09:54 -04:00
Dave Bartolomeo
794a6729bc
C++: Add ability to dump local dataflow info in IR dumps
...
This change adds a new module, `PrintIRLocalFlow.qll`, which can be imported into any query that uses both `PrintIR.qll` and the IR dataflow library. The IR dump printed by `PrintIR.qll` will be annotated with information about how each operand and instruction participates in dataflow.
For each operand and instruction, the following propeties are displayed:
- `flow`: Which local operands/instructions have flow to this node, and which local operands/instruction this node has flow to.
- `source`: `true` if this node is a source
- `sink`: `true` if this node is a sink
- `barrier`: Lists which kinds of barrier this node is. Can be zero or more of `full`, `in`, `out`, and `guard`. If the node is a guard barrier, the IR of the guarding instruction is also printed.
We already had a way to print additional properties for instructions and blocks, but not for operands. I added support for operand properties to `IRPropertyProvider`. These are now printed in a curly-brace-enclosed list immediately after the corresponding operand.
When printing flow, instructions are identified by their result ID (e.g., `m128`). Operands are identified by both the result ID of their instruction and their kind (e.g., `r145.left`). For flow from an operand to its use instruction, it just prints `result` at the operand, and prints only the operand kind on the instruction.
Example output:
```
# 344| m344_34(vector<int, allocator<int>>) = Chi : total:m344_20{flow:def->@, @->result}, partial:m344_33{flow:def->@, @->result}
# 344| flow = total->@, partial->@, +m344_33->@, @->+r347_3, @->v347_7.side_effect, @->m347_9.total, @->m344_20.1
```
The `+` annotations indicate when the flow came from `isAdditionalFlowStep()`, rather than built-in local flow.
2020-10-14 18:02:45 -04:00
Robert Marsh
126615a7ee
C++: add prefix operator++ in inserter tests
2020-10-14 13:33:50 -07:00
Robert Marsh
fbe9bc8587
C++: add comments in new iterator models
2020-10-14 13:13:16 -07:00
Robert Marsh
a1a441d759
C++: output iterator flow through operator= models
2020-10-14 13:06:11 -07:00
Robert Marsh
f3843b8a40
Revert "C++: output iterator flow with user-defined operators"
...
This reverts commit 28fa26629c .
2020-10-14 13:01:37 -07:00
james
98d8ec488e
add banner to sphinx template
2020-10-14 20:09:19 +01:00
Geoffrey White
09d4b3eb6d
Merge branch 'main' into callderef
2020-10-14 17:41:14 +01:00
Rasmus Lerchedahl Petersen
d2b90662a3
Python: implement ToString on mappings
2020-10-14 17:31:13 +02:00
Taus
466c22f4a8
Merge pull request #4435 from RasmusWL/python-port-code-injection
...
Python: port code injection query
2020-10-14 16:41:42 +02:00
Rasmus Lerchedahl Petersen
6a3aed337f
Python self -> range
2020-10-14 16:35:43 +02:00
Rasmus Lerchedahl Petersen
352418cb5d
Python: track safe loaders
2020-10-14 16:33:55 +02:00
Taus Brock-Nannestad
f8190feef2
Python: Fix divergence in tuple/subscripted type toString
...
A slightly more complicated version of the situation in
https://github.com/github/codeql/pull/2507 could cause the `toString`
calculation to diverge. Although the previous PR took tuples nested
inside tuples into account (and subscripted types cannot be nested
inside each other in our modelling), it did not account for having
this nesting be interleaved, and this is what caused the divergence.
I have not done the usual "test case first to show the problem
exists", since this would also diverge and take forever to fail. The
instance observed in `scipy` was likely caused by something akin to
```python
x = ()
while True:
x = x[(x,)]
```
Finally, to prevent this from happening with other types, I went
through and checked each instance where the string representation of
an `ObjectInternal` might potentially contain a reference to
itself (and thus explode). I encapsulated this in a
`bounded_toString` helper predicate, and used this in all the cases
where I was able to determine that the above _could_ happen.
2020-10-14 16:13:03 +02:00
yoff
5f6f85c998
Merge pull request #4465 from tausbn/python-remove-essa-flow
...
Python: Remove flow between ESSA variables
2020-10-14 15:37:39 +02:00
Rasmus Lerchedahl Petersen
b8cba381cf
Merge branch 'main' of github.com:github/codeql into python-port-unsafe-deserialization
2020-10-14 15:01:30 +02:00
Tamas Vajk
5a91736b7a
C#: Change public fields to properties
2020-10-14 14:44:01 +02:00
Rasmus Lerchedahl Petersen
3a281a1bd6
Python: Adjust comments and tests
2020-10-14 14:40:11 +02:00
Rasmus Wriedt Larsen
5db4f906d0
Merge branch 'main' into python-port-code-injection
2020-10-14 14:22:02 +02:00
Tom Hvitved
91806da2fa
C#: Address review comments
2020-10-14 14:15:34 +02:00
Tom Hvitved
5d1a5920c7
C#: Reimplement flow-summary compilation
2020-10-14 14:15:34 +02:00
Tom Hvitved
444e607338
C#: Add missing flow through library code using params arguments
2020-10-14 14:15:34 +02:00
Tom Hvitved
f2dc2d912a
C#: Add inter-procedural data-flow test for StringBuilder
2020-10-14 14:15:34 +02:00
yoff
ffe79f688d
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-14 14:08:16 +02:00
Ian Lynagh
9e518d2555
C++: Accept test change for p#n -> (unnamed parameter n)
2020-10-14 12:59:47 +01:00
Tom Hvitved
2af7e1c213
C#: Use CFG nodes instead of AST nodes in sign/modulus analysis
2020-10-14 13:39:44 +02:00
Taus
92ccb795fd
Merge pull request #4415 from RasmusWL/python-flask-routed-parameter
...
Python: Add support for routed parameters in flask
2020-10-14 13:29:51 +02:00
Tamas Vajk
1094d192ab
C#: Change extraction of NamespaceDeclarations to have ID based on the location
2020-10-14 13:26:01 +02:00
Rasmus Wriedt Larsen
1fde477a8f
Python: Refactor argument matching
2020-10-14 13:22:35 +02:00
Rasmus Wriedt Larsen
680a6eb2a6
Python: Refactor argument matching (more)
2020-10-14 13:21:04 +02:00
Rasmus Wriedt Larsen
61ecec7d17
Merge pull request #4467 from tausbn/python-fix-import-type-tracking
...
Python: Fix unwanted module type tracking
2020-10-14 13:08:57 +02:00
Tamas Vajk
5fae440a58
C#: Reverse assignment child nodes in AST
2020-10-14 12:49:08 +02:00
Tamas Vajk
ee9a40e16d
C#: Remove location from base types in the AST
2020-10-14 12:49:08 +02:00
yoff
27f474f0e9
Merge pull request #4429 from RasmusWL/python-model-invoke
...
Python: model invoke library
2020-10-14 12:13:35 +02:00
Rasmus Lerchedahl Petersen
dc7e7890f0
Python: Clearer naming and comments (I hope)
2020-10-14 12:03:05 +02:00
Taus Brock-Nannestad
f3c07e3849
Python: Fix up import helper tests
2020-10-14 11:58:14 +02:00
Max Schaefer
4100ab2919
JavaScript: Add another test to show that flow through functions still works.
2020-10-14 10:03:27 +01:00
Max Schaefer
1c04c07f07
JavaScript: Eliminate source of false positives in UnsafeShellCommandConstruction.
2020-10-14 10:03:04 +01:00
Tamás Vajk
8127d9b93e
Merge pull request #4404 from tamasvajk/feature/cleanup-2
...
C# extractor code cleanup
2020-10-14 11:02:40 +02:00
Rasmus Wriedt Larsen
b0cfa1d92d
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:53:18 +02:00
Rasmus Wriedt Larsen
bfa5d18476
Python: Use new importNode
2020-10-14 10:49:38 +02:00
Rasmus Wriedt Larsen
7d600e4e8e
Merge branch 'main' into python-port-code-injection
2020-10-14 10:48:38 +02:00
Rasmus Wriedt Larsen
4d9d2155fc
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:44:58 +02:00
Rasmus Wriedt Larsen
b0e79890e6
Python: Use new importNode
2020-10-14 10:43:22 +02:00
Rasmus Wriedt Larsen
4597ba64d0
Merge branch 'main' into python-model-invoke
2020-10-14 10:41:37 +02:00
Rasmus Wriedt Larsen
eff47457bf
Python: Refactor argument matching
2020-10-14 10:37:38 +02:00
Rasmus Wriedt Larsen
2ea71f574c
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:37:37 +02:00
Rasmus Wriedt Larsen
2e30f58aa2
Python: Use new importNode
2020-10-14 10:37:36 +02:00
Rasmus Wriedt Larsen
ecf70c5f30
Merge branch 'main' into python-model-python2-specific-command-execution
2020-10-14 10:36:43 +02:00
Tom Hvitved
952b2da7d4
C#: Add copy of ControlFlowReachability.qll to be used by sign/modulus analysis
2020-10-14 10:28:08 +02:00
Tom Hvitved
c32242ed50
C#: Simplify ControlFlowReachability.qll
2020-10-14 10:28:07 +02:00
Rasmus Wriedt Larsen
74bd045488
Python: Make "..Call" modeling classes extend DataFlow::CfgNode
2020-10-14 10:24:46 +02:00
Rasmus Wriedt Larsen
ba158f3317
Python: Use new importNode
2020-10-14 10:17:35 +02:00
Rasmus Wriedt Larsen
49d2e68d12
Merge branch 'main' into python-flask-routed-parameter
2020-10-14 10:16:00 +02:00
Rasmus Lerchedahl Petersen
b0ebb5b6d1
Python: Adjust tag format
2020-10-14 09:51:24 +02:00
Rasmus Lerchedahl Petersen
93383747bd
Python: Use more common name for concept
2020-10-14 09:28:58 +02:00
Rasmus Lerchedahl Petersen
a76d276b48
Python: Adjust getARelevantTag
2020-10-14 08:44:04 +02:00
yoff
3b9ea3a958
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-14 08:24:26 +02:00
Jonathan Leitschuh
fc71ca747d
Java: Track taint through java.io.File::toPath & java.nio.file.Path::toFile
2020-10-13 21:15:09 -04:00
Robert Marsh
28fa26629c
C++: output iterator flow with user-defined operators
2020-10-13 16:30:47 -07:00
Robert Marsh
6552499545
C++: add model for iter-returning functions
2020-10-13 16:19:15 -07:00
Robert Marsh
4b6ecfb0b1
C++: remove some constexprs in qltest
2020-10-13 16:19:15 -07:00
Robert Marsh
45a27d3296
C++: add tests for back_inserter iterator flow
2020-10-13 16:19:15 -07:00
Robert Marsh
108cc9ea47
C++: fix assignment to *iter++
2020-10-13 16:19:15 -07:00
Robert Marsh
f39195e339
C++: add tests for assignments to *iter++
2020-10-13 16:19:15 -07:00
Ian Lynagh
9238503bc3
C++: Make unnamed parameters follow the "(unnamed ...)" naming
2020-10-14 00:10:56 +01:00
Ian Lynagh
7680080701
C++: Accept unnamed-function changes to tests
2020-10-13 23:52:33 +01:00
Taus Brock-Nannestad
7d86b53b71
Python: Fix unwanted module type tracking
2020-10-13 22:47:57 +02:00
Taus Brock-Nannestad
76e5b59dab
Python: Add test case for unwanted module type tracking
2020-10-13 22:47:03 +02:00
Robert Marsh
b49aa677d0
Merge pull request #4459 from geoffw0/setex
...
C++: Additional taint flows through std::set
2020-10-13 15:17:54 -04:00
yoff
1f2390455c
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 19:15:33 +02:00
Rasmus Lerchedahl Petersen
5d66c485d5
Python: IPA type for arguemnt mappings
...
Not sure how arg2 in line 118 is achieved
2020-10-13 19:12:52 +02:00
Dave Bartolomeo
fba4313457
Merge remote-tracking branch 'upstream/main' into work
2020-10-13 13:07:28 -04:00
Dave Bartolomeo
93f5ae4763
Clean up test formatting and accept new lines in results
2020-10-13 12:57:52 -04:00
Taus
83937bacae
Merge pull request #4448 from RasmusWL/python-simplify-import-modeling
...
Python: simplify import modeling
2020-10-13 18:08:07 +02:00
Dave Bartolomeo
dfe69d8ada
Update taint test to propagate through string constructor
2020-10-13 12:06:34 -04:00
Rasmus Wriedt Larsen
2c5996f694
Python: Refactor subprocess_attr type-tracker
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 17:21:21 +02:00
Taus Brock-Nannestad
fdb489fc93
Python: Remove flow between ESSA variables
...
This required a minor change in the type tracker implementation, but
apart from that no other changes appear to be needed. Seems to clean
up the test output quite a bit.
2020-10-13 16:35:41 +02:00
yoff
05b744701e
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 15:31:50 +02:00
Rasmus Wriedt Larsen
b895641a83
Merge pull request #4464 from tausbn/python-remove-dataflowcfgnode
...
Python: Get rid of `DataFlowCfgNode`
2020-10-13 15:08:28 +02:00
Rasmus Wriedt Larsen
76c9b8c49f
Python: Expose importNode instead of importModule/importMember
...
Since predicate name `import` is not allowed, I adopted `importNode` as it sort
of matches what `exprNode` does.
---
Due to only using `importMember` in `os_attr` we previously didn't handle
`import os.path as alias` :|
I did creat a hotfix for this (https://github.com/github/codeql/pull/4446 ), but
in doing so I realized the core of the problem: We're exposing ourselves to
making these kinds of mistakes by having BOTH importModule and importMember, and
we don't really gain anything from doing this!
We do loose the ability to easily only modeling `from mod import val` and not
`import mod.val`, but I don't think that will ever be relevant.
This change will also make us to recognize some invalid code, for example in
import os.system as runtime_error
we would now model that `runtime_error` is a reference to the `os.system`
function (although the actual import would result in a runtime error).
Overall these are tradeoffs I'm willing to make, as it does makes things simpler
from a QL modeling point of view, and THAT sounds nice 👍
2020-10-13 15:03:22 +02:00
Tamas Vajk
ce9624e61d
C#: Remove unneeded vscode settings from settings.json
2020-10-13 14:50:46 +02:00
Rasmus Wriedt Larsen
4bfd55f1af
Python: Show problem with os.path modeling
...
This is not a very good test for showing that we don't handle direct imports,
but it was the best I had available without inventing something new. It's very
fragile, since any of these would propagate taint (due to handling all `join`
calls as if the qualifier was a string):
ospath_alias.join(ts)
ospath_alias.join(ts, "foo", "bar")
But this test DOES serve the purpose of illustrating that my fix works :D
2020-10-13 14:50:00 +02:00
Tamas Vajk
ce793c357f
C#: Adjust parameters of DefinitionField ctor
2020-10-13 14:45:38 +02:00
Tamas Vajk
ea53ea0994
C#: Prefer keywords over type names
2020-10-13 14:45:38 +02:00
Tamas Vajk
8afac25120
C#: Add params modifier on override
2020-10-13 14:45:38 +02:00
Tamas Vajk
63e173198d
C#: Make static member on generic class private
2020-10-13 14:45:38 +02:00
Tamas Vajk
6cf20d569d
C#: Remove overrides that do nothing
2020-10-13 14:45:38 +02:00
Tamas Vajk
9b349eb844
C#: Use Contains instead of IndexOf
2020-10-13 14:45:38 +02:00
Tamas Vajk
5b33f43b78
C#: Use nameof
2020-10-13 14:45:38 +02:00
Tamas Vajk
f84669904b
C#: Fix typo
2020-10-13 14:45:38 +02:00
Tamas Vajk
7075c6f8ca
C#: Fix public property naming
2020-10-13 14:45:38 +02:00
Tamas Vajk
a4fec39c11
C#: Move fields to locals where possible
2020-10-13 14:45:38 +02:00
Tamas Vajk
b07aceff6b
C#: Fix exception throwing
2020-10-13 14:45:37 +02:00
Tamas Vajk
6dfe90e479
C#: Change array-returning properties
2020-10-13 14:45:37 +02:00
Tamas Vajk
7721c7bba7
C#: Remove redundant conditions
2020-10-13 14:45:37 +02:00
Tamas Vajk
cbdd13127e
C#: Convert publicly visible fields to properties
2020-10-13 14:45:37 +02:00
Tamas Vajk
d5382f2cfd
C#: Fix modifier orders
2020-10-13 14:45:37 +02:00
Tamas Vajk
fbc128fcc7
C#: Fix type parameter names
2020-10-13 14:45:37 +02:00
Tamas Vajk
2e350caf9f
C#: Fix private field and local variable naming
2020-10-13 14:45:37 +02:00
Tamas Vajk
ecb29a267b
C#: Add editor config naming rules
2020-10-13 14:45:37 +02:00
Tamas Vajk
baf6f59bfc
C#: Add braces to multiline block statements
2020-10-13 14:45:37 +02:00
Tamas Vajk
28694513a1
C#: Use pattern matching
2020-10-13 14:45:37 +02:00
Tamas Vajk
155453d9cb
C#: Format single line if statements
2020-10-13 14:45:37 +02:00
Tamas Vajk
aec4481cfb
C#: Use var everywhere
2020-10-13 14:45:37 +02:00
Tamas Vajk
7d544e34af
C#: Add declaration visibility modifiers
2020-10-13 14:45:37 +02:00
Tamas Vajk
466e0cf085
C#: Remove naming styles from editor config, add IDE diagnostic severities
2020-10-13 13:27:46 +02:00
Tamas Vajk
ec6ed90c49
C#: Add final new line to files
2020-10-13 13:27:46 +02:00
Tamas Vajk
2e21564032
C#: Fix formatting with 'dotnet format'
2020-10-13 13:27:46 +02:00
Tamas Vajk
7f86768a49
C#: Reformat LINQ extension method call-chains
2020-10-13 13:27:46 +02:00
Tamas Vajk
115a216ea9
C#: Format nested ternary operators
2020-10-13 13:27:46 +02:00
Tamas Vajk
c38bf5ee5b
C#: Reduce nesting and fix some formatting
2020-10-13 13:27:46 +02:00
Tamas Vajk
e73ced2275
C#: Add sealed modifier to classes to fix dispose-pattern, remove explicit IDisposable implementations
2020-10-13 13:27:46 +02:00
Tamas Vajk
397be7e98f
C#: Change constructor visibility to protected in abstract classes
2020-10-13 13:27:46 +02:00
Tamas Vajk
71faa51270
C#: Dispose IDisposables
2020-10-13 13:27:46 +02:00
Tamas Vajk
e208f3d21d
C#: Simplify null checks with pattern matching, ??, and ?:
2020-10-13 13:27:46 +02:00
Tamas Vajk
504f56adeb
C#: Simplify object initialization
2020-10-13 13:27:46 +02:00
Tamas Vajk
b793af571e
C#: Remove unnecessary usings
2020-10-13 13:27:45 +02:00
Tamas Vajk
ec63acfb0c
C#: Inline out variable declarations
2020-10-13 13:27:45 +02:00
Tamas Vajk
f2e6b42aa4
C#: Add type parameter in/out
2020-10-13 13:27:45 +02:00
Tamas Vajk
33672a4058
C#: Simplify using statements
2020-10-13 13:27:45 +02:00
Tamas Vajk
412b87c5c7
C#: Fix loop that iterates only once
2020-10-13 13:27:45 +02:00
Tamas Vajk
79eff06828
C#: Remove unused out argument
2020-10-13 13:27:45 +02:00
Tamas Vajk
921d3eeaec
C#: Mark members static (remove unused members)
2020-10-13 13:27:45 +02:00
Tamas Vajk
68a45e7e9d
C: Remove unused fields
2020-10-13 13:27:45 +02:00
Tamas Vajk
0c9aaa3dce
C#: Remove unused parameters
2020-10-13 13:27:45 +02:00
Tamas Vajk
93c6d5ea58
C#: Fix empty array creation
2020-10-13 13:27:45 +02:00
Tamas Vajk
2d3985742f
C#: Fix length/emptiness checks
2020-10-13 13:27:45 +02:00
Rasmus Lerchedahl Petersen
b7e8b48e9e
Python: Move concept tests out
...
These tests should be fleshed out at some point, but currently
they test all that we model.
2020-10-13 13:06:47 +02:00
Taus Brock-Nannestad
1829126230
Python: Get rid of DataFlowCfgNode
...
Should make modelling data flow nodes that are also specific
subclasses of `ControlFlowNode` a bit smoother.
2020-10-13 13:04:59 +02:00
Erik Krogh Kristensen
83d6d6041a
Merge pull request #4462 from erik-krogh/strayTodo
...
JS: remove stray todo
2020-10-13 12:50:00 +02:00
Joe Farebrother
b2a2412f1d
Java: Clean up the constructor flow steps
2020-10-13 11:30:02 +01:00
Rasmus Lerchedahl Petersen
4685f2d5f2
Python: Address many review comments
...
still need to move concept tests
2020-10-13 12:03:23 +02:00
Rasmus Wriedt Larsen
662235bad8
Python: Use classRef instead of class_
...
Discussed offline with Taus
2020-10-13 11:56:37 +02:00
CodeQL CI
d3f8fb5e53
Merge pull request #4423 from tausbn/python-add-attribute-access-interface
...
Approved by RasmusWL
2020-10-13 02:56:21 -07:00
Erik Krogh Kristensen
96db3459d0
remove stray todo
2020-10-13 11:48:06 +02:00
Rasmus Wriedt Larsen
dcd103ea73
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 10:31:35 +02:00
Rasmus Wriedt Larsen
ce85ac3ce1
Python: Remove solved TODO
2020-10-13 10:15:03 +02:00
Rasmus Wriedt Larsen
2e430325be
Python: Refactor argument matching to use set literals
...
Co-authored-by: Taus <tausbn@github.com >
2020-10-13 10:05:35 +02:00
Erik Krogh Kristensen
9604705f64
remove pretty printing of bytes (unstable between minor versions)
2020-10-12 22:32:37 +02:00
Erik Krogh Kristensen
9b7c59f4b4
implement printAst for Python
2020-10-12 21:17:46 +02:00
CodeQL CI
e2b0c60627
Merge pull request #4449 from max-schaefer/js/api-graphs-type-handling-improvements
...
Approved by erik-krogh
2020-10-12 11:41:21 -07:00
Robert Marsh
3b7cf7fd27
Merge pull request #4439 from geoffw0/mapex
...
C++: Additional taint flows through std::map
2020-10-12 14:17:17 -04:00
Max Schaefer
9ac70e3044
JavaScript: Clarify the relationship between MkCanonicalName{Def,Use} with an upper-case M and mkCanonicalName{Def,Use} with a lower-case m.
2020-10-12 16:29:11 +01:00
Jonathan Leitschuh
48f4b6c058
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-10-12 11:16:21 -04:00
Jonathan Leitschuh
895f4d0ea6
JHipster Vuln: Add GOOD/BAD & release note links
2020-10-12 11:00:05 -04:00
Joe Farebrother
aa8bacb724
Java: Update test output
2020-10-12 15:50:47 +01:00
Joe Farebrother
3416911ac6
Java: Refector out StringBuilder and Number taint preserving callables
2020-10-12 15:50:47 +01:00
Joe Farebrother
eafde05a55
Java: Expand flow step refactoring to Callables
...
Also add some missing flow steps for StringBuilder
2020-10-12 15:50:47 +01:00
Joe Farebrother
7e2c49fadd
Java: Fix a couple of flow step issues
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-10-12 15:50:47 +01:00
Joe Farebrother
4a8b7f64e8
Java: Rename returnsTaint to returnsTaintFrom
2020-10-12 15:50:47 +01:00
Joe Farebrother
ca9038350c
Java: Add this. and fix mistake
2020-10-12 15:50:46 +01:00
Joe Farebrother
5d487b97da
Java: Merge TaintPreservingMethod with TaintTransferringMethod
2020-10-12 15:50:46 +01:00
Joe Farebrother
a510f58865
Java: Implement code review changes
2020-10-12 15:50:46 +01:00
Joe Farebrother
91ce02aad4
Java: Fix bug involving varadic parameters
2020-10-12 15:50:46 +01:00
Joe Farebrother
79209af9c0
Java: Refactor out flow steps for more frameworks.
2020-10-12 15:50:41 +01:00
Joe Farebrother
92fd8c4128
Java: Move new definitions to new file
2020-10-12 15:48:43 +01:00
Joe Farebrother
60a7666105
Java: Refactor Android SQLite flow steps
2020-10-12 15:48:43 +01:00
Joe Farebrother
ca60f2cc18
Java: Fix failing tests
2020-10-12 15:48:43 +01:00
Joe Farebrother
ff6c5c219c
Java: Start TaintTrackingUtils refactor
2020-10-12 15:48:43 +01:00
Joe Farebrother
551d86c6ea
Java: Define classes for taint propagation methods
2020-10-12 15:48:43 +01:00
Arthur Baars
fc4a3426ac
Merge pull request #4457 from daniel-beck/file-taint
...
Java: Track taint through java.io.File constructor and #toURI; URI#toURL
2020-10-12 16:42:11 +02:00
Taus Brock-Nannestad
3288cf1a75
Python: Hopefully final changes to documentation.
2020-10-12 16:38:21 +02:00
Max Schaefer
cd33d358aa
JavaScript: Add a test showing a false positive from UnsafeShellCommandConstruction due to infeasible paths.
...
The path from the API entry point to the sink contains a "return" step. A client of the library cannot match that step, resulting in an infeasible path.
2020-10-12 14:50:47 +01:00
Jonas Jensen
24da4cc344
Merge pull request #4421 from jbj/SimpleRangeAnalysis-guard-overflow
...
C++: Demonstrate overflowing guard bounds
2020-10-12 15:38:13 +02:00
yoff
433a36225b
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-12 15:26:53 +02:00
Jonas Jensen
0459248b9f
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-guard-overflow
2020-10-12 14:32:29 +02:00
CodeQL CI
8eb84b2599
Merge pull request #4391 from max-schaefer/js/api-graph-reexport
...
Approved by asgerf
2020-10-12 05:26:53 -07:00
CodeQL CI
6d1634ef8f
Merge pull request #4329 from erik-krogh/DVSA
...
Approved by esbena
2020-10-12 05:23:29 -07:00
Taus Brock-Nannestad
b07c7abacc
Python: Clear up attribute name access QLDoc
2020-10-12 13:49:08 +02:00
Tom Hvitved
35985a9189
Merge pull request #4452 from hvitved/csharp/ssa/overlapping-captured-defs
...
C#: Avoid overlapping SSA definitions for `ref`/`out` captured variables
2020-10-12 13:01:39 +02:00
Geoffrey White
6440db786d
Merge pull request #4420 from jbj/SimpleRangeAnalysis-widen-Expr
...
C++: SimpleRangeAnalysis: widen recursive *, +, -
2020-10-12 11:20:09 +01:00
Geoffrey White
58727cb8ad
C++: Update change note.
2020-10-12 11:01:09 +01:00
Geoffrey White
4363f08b45
C++: Model std::set::emplace and emplace_hint.
2020-10-12 11:01:09 +01:00
Jonas Jensen
30b9d13a45
C++: Correct annotation in test
2020-10-12 11:25:38 +02:00
Geoffrey White
5d87117dc7
C++: Model std::set::lower_bound, upper_bound, equal_range.
2020-10-12 10:10:40 +01:00
Jonas Jensen
9b12ceae8d
C++: SimpleRangeAnalysis: widen recursive *, +, -
...
The number of candidate bounds during the main `SimpleRangeAnalysis`
recursion was in principle always exponential in the size of the
program, but in practice it did not get out of hand when only `+` and
`-` operations were supported. Now that `*` is also supported, the range
analysis started timing out on the SinaMostafanejad/OpenRDM project. The
problematic expressions in that project are of the form
a*x*x*x + b*x*x + c*x + d
where most of the variables involved are recursive definitions and are
therefore likely to have a large number of candidate bounds.
The fix here is to identify those few binary operations that are most
likely to cause an explosion in the number of bounds and apply widening
to them. Previously, widening was only applied at definitions.
2020-10-12 11:09:01 +02:00
Jonas Jensen
bbeea452e1
C++: Add test with widening of binary Expr
2020-10-12 11:08:41 +02:00
Geoffrey White
fc19bba0bd
C++: Model std::set::merge and correct test annotations.
2020-10-12 10:01:57 +01:00
Tom Hvitved
9d1f64d35d
C#: Avoid overlapping SSA definitions for ref/out captured variables
2020-10-12 10:52:40 +02:00
Anders Schack-Mulligen
725194a3b8
Merge pull request #4447 from aschackmull/dataflow/postupdate-flow-consistency
...
Dataflow: Introduce consistency check for flow targeting PostUpdateNodes
2020-10-12 08:56:19 +02:00
Daniel Beck
0c70be145f
Track taint through java.io.File constructor and #toURI; URI#toURL
2020-10-10 20:54:55 +02:00
Geoffrey White
c63f7cb409
C++: Taint through emplace from qualifier to return value.
2020-10-09 17:41:24 +01:00
Geoffrey White
270517d379
C++: Revise model of emplace and emplace_hint. Note that 2 of the 3 taint regressions we shouldn't be getting because we don't yet do taint through keys.
2020-10-09 17:27:18 +01:00
Geoffrey White
49c121d370
C++: More test cases covering other std::pair constructors.
2020-10-09 17:22:29 +01:00
Anders Schack-Mulligen
091e3a2931
Dataflow: Adjust test output.
2020-10-09 16:25:14 +02:00
Rasmus Lerchedahl Petersen
4bd56fdbe4
Python: Implement framework sinks
2020-10-09 16:13:47 +02:00
Rasmus Lerchedahl Petersen
0d8bd01e10
Python: Port query and add test
2020-10-09 16:11:37 +02:00
Tom Hvitved
723699a584
C#: Add SSA test for overlapping captured variable definitions
2020-10-09 16:01:19 +02:00
James Fletcher
c8cacb9fee
Merge pull request #4451 from github/jf205-patch-2
...
Fix typo in CodeQL docs template
2020-10-09 14:47:39 +01:00
Geoffrey White
61a78e28ac
C++: Fix map::merge.
2020-10-09 14:46:23 +01:00
James Fletcher
42ee136306
Update layout.html
2020-10-09 14:33:45 +01:00
Erik Krogh Kristensen
a0cbeb6093
add change note
2020-10-09 14:54:34 +02:00
Erik Krogh Kristensen
2fb19f0b11
refactor into a single regular expression with two capture groups
2020-10-09 14:50:16 +02:00
Erik Krogh Kristensen
f6f8bbd1d8
Update javascript/ql/src/semmle/javascript/frameworks/ServerLess.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-10-09 14:46:31 +02:00
Anders Schack-Mulligen
1c043447e8
Dataflow: Introduce consistency check for flow targeting PostUpdateNodes.
2020-10-09 14:29:52 +02:00
Tom Hvitved
29fb23e6a4
C#: Add flow summaries for System.[Value]Tuple
2020-10-09 13:38:30 +02:00
Jonas Jensen
4c9ffcec27
Merge pull request #4396 from geoffw0/stringsets
...
C++: Use [, ...] syntax more widely.
2020-10-09 13:30:05 +02:00
James Fletcher
2436c56258
Merge pull request #4444 from github/codeql-style-updates
...
[CodeQL docs] First pass at style updates for docs microsite
2020-10-09 11:40:47 +01:00
Alexander Eyers-Taylor
b0d01cfe8d
Merge pull request #4370 from jbj/range-analysis-mega-change-note
...
C++: Change note for several range-analysis PRs
2020-10-09 10:45:11 +01:00
james
6d78c7b46e
fix path to primer.css in template
2020-10-09 10:04:39 +01:00
Geoffrey White
1f1be3bf9a
C++: Block try_emplace arg 0.
2020-10-09 10:04:22 +01:00
james
de42906785
hide header text on small screens and fix body width
2020-10-09 10:03:13 +01:00
james
2fe986eb79
add local primer.css
2020-10-09 10:03:13 +01:00
Geoffrey White
8786fe1ab8
C++: Add test missing test case involving tainted key.
2020-10-09 10:00:22 +01:00
Tom Hvitved
412524103c
Merge pull request #4437 from hvitved/csharp/cfg/compiler-generated-array-lengths
...
C#: Include compiler-generated array lengths in the CFG
2020-10-09 10:54:56 +02:00
CodeQL CI
3894ecf779
Merge pull request #4441 from max-schaefer/js/add-negative-api-graphs-test
...
Approved by erik-krogh
2020-10-09 00:37:38 -07:00
Erik Krogh Kristensen
3b328baaef
changes based on review
2020-10-08 21:54:23 +02:00
Erik Krogh Kristensen
65b90c411c
Update javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-10-08 21:28:50 +02:00
Erik Krogh Kristensen
d3e3c11fa6
add printAst query for printing JS/TS/JSON/YAML/HTML
2020-10-08 21:20:28 +02:00
Max Schaefer
4bf6f6ac7c
JavaScript: Add a negative test for API graphs.
...
The test ensures that flow summarization won't label property `f` of the first parameter of `assertNotNull` as a sink, which would be very imprecise.
2020-10-08 19:53:23 +01:00
Geoffrey White
493b80c44d
C++: Fix incorrect translations to hasQualifiedName.
2020-10-08 17:56:57 +01:00
Dave Bartolomeo
e4bfb75f90
C++: Fix pointer flow through temporary objects
2020-10-08 12:24:59 -04:00
Tamás Vajk
f42cbcbeae
Merge pull request #4428 from tamasvajk/feature/force-nuget-single-restore
...
C#: Add '-DisableParallelProcessing' flag to nuget restore in Autobuilder
2020-10-08 18:23:12 +02:00
Taus
60eec7b136
Python: Update python/ql/src/experimental/dataflow/internal/Attributes.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-08 18:14:20 +02:00
Taus Brock-Nannestad
d46453caaa
Python: Support named imports as attribute reads
...
Required a small change in `DataFlow::importModule` to get the desired
behaviour (cf. the type trackers defined in `moduleattr.ql`, but this
should be harmless. The node that is added doesn't have any flow
anywhere.
2020-10-08 18:08:55 +02:00
Geoffrey White
c555cfa22a
C++: Replace isParameterDeref(_).
2020-10-08 16:55:45 +01:00
Tamas Vajk
f3f908383b
C#: Adjust autobuilder tests for added nuget.exe flag
2020-10-08 17:07:40 +02:00
Tamas Vajk
522f41377f
C#: Add '-DisableParallelProcessing' flag to nuget restore in Autobuilder
2020-10-08 17:02:14 +02:00
Geoffrey White
e01e4b5bde
C++: Fix QLDoc comments.
2020-10-08 14:29:08 +01:00
Geoffrey White
5c1a510e4a
C++: Model map::lower_bound, upper_bound and equal_range.
2020-10-08 14:22:43 +01:00
Geoffrey White
ef9a7c8cdb
C++: Model map::merge.
2020-10-08 14:22:43 +01:00
Geoffrey White
b7ab89c892
C++: Model map::emplace, emplace_hint and map::try_emplace.
2020-10-08 14:22:43 +01:00
Jonas Jensen
b409cf6cea
Merge pull request #4389 from gsingh93/bitwise-and
...
Improve range analysis for bitwise and
2020-10-08 15:18:15 +02:00
Geoffrey White
6394b1b478
C++: Additional test cases for emplace.
2020-10-08 14:11:24 +01:00
Taus Brock-Nannestad
df447c0af9
Python: Remove flow from getAttributeName
2020-10-08 15:01:24 +02:00
Taus Brock-Nannestad
ceb249680e
Python: Reuse existing node fields
...
Also changes `x = TCfgNode(y)` to `x.asCfgNode() = y` where applicable.
2020-10-08 15:00:14 +02:00
Taus Brock-Nannestad
31596ef569
Python: Clean up and extend built-in call node classes
2020-10-08 14:57:39 +02:00
Taus Brock-Nannestad
e9ecc00b37
Python: Implement and use mayHaveAttributeName
2020-10-08 14:53:54 +02:00
Geoffrey White
61d5372d07
C++: Test spacing.
2020-10-08 13:43:49 +01:00
Geoffrey White
4c4dd0c959
C++: Fix a bug in the tests.
2020-10-08 12:57:30 +01:00
CodeQL CI
f179e7ebf4
Merge pull request #4291 from asgerf/js/lean-dependency-installation-plainjava
...
Approved by erik-krogh
2020-10-08 03:09:38 -07:00
Rasmus Wriedt Larsen
0b0763953e
Python: Update description of CodeInjection
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-10-08 11:15:36 +02:00
yoff
7d086b23ff
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-08 10:53:52 +02:00
Tom Hvitved
ca4e5014ae
C#: Include compiler-generated array lengths in the CFG
2020-10-08 10:35:50 +02:00
Rasmus Lerchedahl Petersen
19796a4c9c
Python: Improve tests and make validTest happy
2020-10-08 10:35:01 +02:00
Tom Hvitved
ce8567c64a
Merge pull request #4293 from hvitved/csharp/cfg/assertions
...
C#: Model assertions in the CFG
2020-10-08 10:32:13 +02:00
Rasmus Lerchedahl Petersen
cc0661bce1
Python: More/better comments
2020-10-08 10:11:00 +02:00
Tom Hvitved
b70f5bc954
Merge pull request #4433 from hvitved/csharp/dataflow/switch-expr
...
C#: Add missing data-flow for switch expressions
2020-10-08 09:13:43 +02:00
Anders Schack-Mulligen
cb00f8bcc4
Merge pull request #4362 from tamasvajk/feature/sign-analysis-cleanup
...
Sign analysis cleanup
2020-10-08 09:10:04 +02:00
Gulshan Singh
662736eb2d
Fix compiler error after removing getLOp/getROp
2020-10-07 12:45:08 -07:00
Tamás Vajk
06f1c898dc
Merge pull request #4349 from tamasvajk/feature/modulus-analysis
...
ModulusAnalysis shared between C# and Java
2020-10-07 21:21:20 +02:00
Rasmus Wriedt Larsen
46ec7fbf6e
Python: Make builtin compile function additional taint step
2020-10-07 21:17:39 +02:00
Rasmus Wriedt Larsen
c69a61bac5
Python: Model exec and eval calls as CodeExecution
2020-10-07 21:14:19 +02:00
Rasmus Wriedt Larsen
73971cff76
Python: Model exec statement (Python 2 only) as CodeExecution
2020-10-07 21:12:35 +02:00
Rasmus Wriedt Larsen
453c391bb0
Python: Add CodeExecution tests for stdlib
2020-10-07 21:12:31 +02:00
Dave Bartolomeo
1e455f08a3
Fix test expectations
2020-10-07 13:14:54 -04:00
Tom Hvitved
a9bb7b526c
Merge pull request #4413 from hvitved/csharp/indexer-explicit-interface
...
C#: Fix extraction of library indexers with explicit interface implementations
2020-10-07 18:49:30 +02:00
Rasmus Wriedt Larsen
0af86cba50
Python: Port CodeInjection query
...
and the dummy test-case we already have
2020-10-07 18:47:23 +02:00
Rasmus Wriedt Larsen
5f6e4d47ca
Python: Add CodeExecution concept
2020-10-07 18:22:45 +02:00
james
9fc6ae82d3
update template for sphinx codeql docs
2020-10-07 16:15:25 +01:00
james
b04962b5b9
small changes to conf.py
2020-10-07 16:14:58 +01:00
james
439f0a030e
tidy up custom css
2020-10-07 16:14:35 +01:00
Tom Hvitved
31816af11e
C#: Add missing data-flow for switch expressions
2020-10-07 17:10:29 +02:00
Tom Hvitved
9c503c1591
C#: Add more data/control-flow tests
2020-10-07 17:10:01 +02:00
Dave Bartolomeo
bf8340f102
Fix test expectations in syntax-zoo
2020-10-07 10:26:02 -04:00
Tamas Vajk
4df6a41616
ModulusAnalysis shared between C# and Java
2020-10-07 16:12:24 +02:00
Tamás Vajk
cec6bbea57
Merge pull request #4418 from tamasvajk/feature/reenable-test
...
C#: Reenable disabled test on OSX
2020-10-07 16:03:27 +02:00
Rasmus Lerchedahl Petersen
8196cfd21a
Python: Attempt at clearer naming of parameters
2020-10-07 15:56:35 +02:00
yoff
35b0b6b472
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-07 15:48:44 +02:00
Rasmus Lerchedahl Petersen
27a75c0bd1
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ArgumentPassing
2020-10-07 15:43:31 +02:00
james
239ea80975
add new css styles
2020-10-07 14:37:35 +01:00
Tom Hvitved
af36718dc6
C#: QL doc adjustments
2020-10-07 15:15:18 +02:00
yoff
7e6f0b0bc3
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-10-07 15:11:15 +02:00
Tom Hvitved
68014fd3bf
C#: Fix extraction of library indexers with explicit interface implementations
2020-10-07 15:02:55 +02:00
Rasmus Wriedt Larsen
bec33b745e
Python: Use range instead of self for ::Range pattern
...
Following the suggestions from https://github.com/github/codeql/pull/4357
2020-10-07 14:54:51 +02:00
Tom Hvitved
a4ce9417bc
C#: Add test for missing accessors
2020-10-07 14:53:51 +02:00
Tom Hvitved
88575799e9
Merge pull request #4417 from hvitved/csharp/named-tuple-tests
...
C#: Add test for named tuple types
2020-10-07 13:26:49 +02:00
Rasmus Wriedt Larsen
c09695af7d
Python: Properly handle invoke.task decorator
2020-10-07 12:29:19 +02:00
Rasmus Wriedt Larsen
67c5c590d2
Python: Expose getParameter on ParameterNode
2020-10-07 12:28:35 +02:00
Rasmus Wriedt Larsen
6d7f4a048b
Python: Attempt to model invoke.task decorator
2020-10-07 12:26:49 +02:00
Rasmus Wriedt Larsen
c9219b3744
Clean module imports
2020-10-07 12:21:30 +02:00
Rasmus Wriedt Larsen
ebff1794fc
Python: Model invoke.context.Context
2020-10-07 12:16:53 +02:00
Rasmus Wriedt Larsen
4ef5202382
Python: Add simple model for invoke.run and invoke.sudo
...
and I sorted the list in Frameworks.qll, that kinda makes sense :)
2020-10-07 12:13:59 +02:00
Rasmus Wriedt Larsen
300a8cdf7d
Python: Add tests for the 'invoke' package
2020-10-07 11:55:26 +02:00
Tamas Vajk
d2d8d009eb
Sync Bound between C# and Java
2020-10-07 11:43:30 +02:00
Tamas Vajk
40a7f5aa1f
Java: Minor fix to modulus analysis to handle constant expressions and not only compile time constants
2020-10-07 11:42:42 +02:00
Tamas Vajk
5688210249
Java: add test for modulus analysis
2020-10-07 11:41:55 +02:00
Rasmus Wriedt Larsen
7721db206e
Python: Don't double report paths for platform.popen and popen2.*
...
I was a bit surprised that we hadn't double reported for popen2, but it turns
out that the implementation (at least on unix) looks like:
```
def popen2(cmd, bufsize=-1, mode='t'):
... = Popen3(cmd, False, bufsize)
...
```
but since the modeling I did only considers calls to `Popen3` only if it has
been imported from the `popen2` module, we don't consider that call as a sink.
2020-10-07 10:57:31 +02:00
Tamas Vajk
94dc11c45a
Revert getNonIntegerValue unification
2020-10-07 10:56:01 +02:00
Rasmus Wriedt Larsen
36812af2c2
Python: Add test for Python2 specific command injection
2020-10-07 10:54:03 +02:00
Rasmus Wriedt Larsen
737b2b896f
Python: Fix QLDoc for popen2 module
2020-10-07 10:49:22 +02:00
Rasmus Wriedt Larsen
d8a9eacd02
Python: Remove TODO comment for popen2 module
2020-10-07 10:47:28 +02:00
Gulshan Singh
7233ffa50f
Address review comments
2020-10-07 00:21:06 -07:00
Dave Bartolomeo
22638fdfc7
Merge remote-tracking branch 'upstream/main' into work
2020-10-06 18:33:14 -04:00
Dave Bartolomeo
80b832eb49
Fix test expectations
2020-10-06 18:27:33 -04:00
Erik Krogh Kristensen
1ed026fcce
add a RemoteFlowSource for serverless handlers
2020-10-06 22:36:21 +02:00
Erik Krogh Kristensen
050ed97d9c
add node-serialize as a js/code-injection sink
2020-10-06 22:35:38 +02:00
Tom Hvitved
6ddda1fa1d
Merge pull request #4330 from tamasvajk/feature/upgrade-to-dotnet31
...
C#: Upgrade to .net core app 3.1
2020-10-06 20:59:00 +02:00
Rasmus Wriedt Larsen
6c4fd7c1ff
Python: Model Python 2 only platform.popen command execution
2020-10-06 20:25:03 +02:00
Rasmus Wriedt Larsen
12e4e07cae
Python: Model Python 2 only module popen2
2020-10-06 20:25:02 +02:00
Rasmus Wriedt Larsen
8c2f55fbd0
Python: Model Python 2 only os.popen2, popen3, popen4 functions
2020-10-06 20:25:01 +02:00
Rasmus Wriedt Larsen
6ec7ab2fd9
Python: Add test of Python 2 specific SystemCommandExecution
2020-10-06 20:25:00 +02:00
Taus Brock-Nannestad
b905a3d5e3
Python: Attribute access API
2020-10-06 16:36:29 +02:00
Max Schaefer
98ab38a630
JavaScript: Add yet another API-graph test with re-exports.
2020-10-06 15:32:21 +01:00
Tamas Vajk
4f56a97244
C#: Adjust expected files for .net 3.1 upgrade
2020-10-06 16:01:14 +02:00
Tamas Vajk
56604e005a
C#: Upgrade to .net core app 3.1
2020-10-06 16:01:14 +02:00
Jonas Jensen
984194d308
Merge pull request #4406 from geoffw0/set
...
C++: Models for std::set and std::unordered_set
2020-10-06 15:43:12 +02:00
Jonas Jensen
1d9acbfca9
C++: Demonstrate overflowing guard bounds
2020-10-06 15:31:34 +02:00
Max Schaefer
1d8051eee0
JavaScript: Further improve handling of re-exports in API graphs.
2020-10-06 14:22:55 +01:00
Max Schaefer
d054206004
JavaScript: Improve handling of re-exports in API graphs.
2020-10-06 14:22:51 +01:00
Max Schaefer
96bf82e1ca
JavaScript: Make new source-node classes in API graphs more general and more useful.
2020-10-06 14:21:36 +01:00
Max Schaefer
95b6b16b57
JavaScript: Add another API-graph test with re-exports.
2020-10-06 14:20:41 +01:00
CodeQL CI
4e116ba0db
Merge pull request #4419 from erik-krogh/jsxFactory
...
Approved by asgerf
2020-10-06 06:13:21 -07:00
CodeQL CI
0753c8a31b
Merge pull request #4247 from erik-krogh/CVE760-reexport
...
Approved by asgerf
2020-10-06 06:10:21 -07:00
CodeQL CI
ef703e72d8
Merge pull request #4401 from asgerf/js/angular-prerequisites
...
Approved by erik-krogh
2020-10-06 06:09:48 -07:00
Asger Feldthaus
396f353397
JS: Reapply fixed to javadoc
2020-10-06 14:06:10 +01:00
CodeQL CI
5bc7e19c44
Merge pull request #4414 from yoff/SharedDataflow_Conditionals
...
Approved by RasmusWL
2020-10-06 05:46:24 -07:00
Anders Schack-Mulligen
021435292b
Merge pull request #4341 from joefarebrother/location-tostring
...
Java: Include column numbers in Location.toString
2020-10-06 14:42:35 +02:00
Rasmus Lerchedahl Petersen
f9c5b864bb
Python: Fix test of parenthesized form
2020-10-06 13:12:12 +02:00
CodeQL CI
7e6fa7b4be
Merge pull request #4392 from erik-krogh/flask
...
Approved by asgerf
2020-10-06 03:41:36 -07:00
Arthur Baars
3c41548aa6
Merge pull request #4336 from aibaars/android-database
...
Java: add Android database taint and SQL injection sinks
2020-10-06 12:31:17 +02:00
Erik Krogh Kristensen
f7f82ffe4e
Merge branch 'main' into CVE760-reexport
2020-10-06 12:28:44 +02:00
CodeQL CI
bc1d3de8fe
Merge pull request #4376 from erik-krogh/simpParam
...
Approved by asgerf
2020-10-06 03:24:43 -07:00
Erik Krogh Kristensen
99213b94f5
detect uses of jsxFactory and jsxFragmentFactory in js/unused-local-variable
2020-10-06 12:23:15 +02:00
Joe
8e82687ab6
Java: Include column numbers in Location.toString
2020-10-06 11:16:06 +01:00
CodeQL CI
75d55c87b3
Merge pull request #4412 from RasmusWL/python-typetracking-across-modules
...
Approved by yoff
2020-10-06 03:15:12 -07:00
Asger Feldthaus
5374b66029
JS: Make CachedOperation private
2020-10-06 11:13:04 +01:00
Asger F
433e3e7e4e
JS: Expand doc string in installFromTarballurl
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-06 11:13:04 +01:00
Asger F
4e2b990d14
Add doc string to semVerToken
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-10-06 11:13:04 +01:00
Asger Feldthaus
0ddd825ea6
JS: Address some more review comments
2020-10-06 11:13:04 +01:00
Asger Feldthaus
b1bd612232
JS: Undo unused export
2020-10-06 11:13:04 +01:00
Asger Feldthaus
26b7d57a94
JS: Parse preferred version directly
2020-10-06 11:13:04 +01:00
Asger Feldthaus
85224aad34
JS: Address some review comments
2020-10-06 11:13:04 +01:00
Asger Feldthaus
57a588ceb6
JS: Share extraction results via symlinks
2020-10-06 11:13:03 +01:00
Asger Feldthaus
c84e43d95b
JS: Replace yarn with manual dependency resolution
2020-10-06 11:13:03 +01:00
Asger Feldthaus
f5c3aa3d39
JS: Handle types/typings fields in package.json
2020-10-06 11:13:03 +01:00
Asger Feldthaus
0220ab6784
JS: Move some TypeScript classes into .ts.extractor
2020-10-06 11:13:03 +01:00
Tamás Vajk
8d09885ae6
Merge pull request #4378 from tamasvajk/feature/flow-summary-nullable
...
Flow summary nullable
2020-10-06 11:45:41 +02:00
Tom Hvitved
e15758ba7f
C#: Add test for named tuple types
2020-10-06 11:42:11 +02:00
Tamas Vajk
36ddbcdd71
C#: Reenable disabled test on OSX
2020-10-06 11:41:48 +02:00
Rasmus Wriedt Larsen
d26a89b95e
Python: Fix QLDoc for RouteSetup
2020-10-06 11:35:18 +02:00
Rasmus Wriedt Larsen
b82727d0b8
Python: Consider routed parameter if URL pattern unknown
2020-10-06 11:03:25 +02:00
Asger Feldthaus
a962a8a3bd
JS: Autoformat
2020-10-06 10:01:36 +01:00
Asger Feldthaus
c31cdaacb2
JS: Add test for getFieldTypeAnnotation
2020-10-06 10:01:04 +01:00
Rasmus Wriedt Larsen
16bad003a0
Python: Add test for routed params with unknown url pattern
2020-10-06 10:58:46 +02:00
Rasmus Lerchedahl Petersen
0f077f5d7d
Python: Add flow inside IfExprNodes
2020-10-06 10:54:23 +02:00
Rasmus Lerchedahl Petersen
8f13d586b7
Python: More tests of conditonals
...
Also use better formatter
(better because comments are close to what they comment)
2020-10-06 10:49:15 +02:00
Arthur Baars
89710928c8
Merge branch 'main' into android-database
2020-10-06 10:48:22 +02:00
CodeQL CI
eece3ad352
Merge pull request #4411 from github/asgerf/exclude-js-tests
...
Approved by esbena
2020-10-06 01:48:21 -07:00
Tom Hvitved
6bd355784a
Merge pull request #4353 from hvitved/csharp/dataflow/task-precise
...
C#: Precise data-flow for `System.Threading.Tasks`
2020-10-06 10:45:19 +02:00
Max Schaefer
0109805ab0
JavaScript: Use new API in NoSQL models.
2020-10-06 09:45:03 +01:00
Max Schaefer
8277d5c08f
JavaScript: Introduce convenience predicate for working with typed API-graph nodes.
2020-10-06 09:25:35 +01:00
Max Schaefer
9206549a38
JavaScript: Make integration of TypeScript canonical names with modules in API graphs more consistent.
...
Previously, canonical names were direct successors of module definitions/uses, now they are successors of exports/imports.
2020-10-06 09:25:35 +01:00
Asger F
dd5fb6ce12
Exclude JS tests from code scanning
2020-10-06 08:46:43 +01:00
Tamas Vajk
576085af50
Add extra information to nullable conversion test file
2020-10-06 09:03:49 +02:00
Tamas Vajk
faf663a334
C#: Flow summary for Nullable<T>
2020-10-06 09:03:49 +02:00
Tamás Vajk
77abff7c90
Merge pull request #4405 from tamasvajk/feature/lazy-flow
...
C#: Improve data flow summary for System.Lazy<>
2020-10-06 09:01:48 +02:00
Rasmus Wriedt Larsen
fbe115c046
Python: Show TypeTracking doesn't work for module members
2020-10-06 03:12:39 +02:00
Rasmus Wriedt Larsen
f03a8a838b
Python: Make any routed parameter a RemoteFlowSource
...
I'm not 100% sure whether this approach makes everything too magic, but I like
the fact that you can't _forget_ to make routed params remove-flow sources.
2020-10-06 03:03:14 +02:00
Rasmus Wriedt Larsen
b78c665f34
Python: Model RouteSetup for flask
2020-10-06 03:03:13 +02:00
Rasmus Wriedt Larsen
d27e6955b4
Python: Add test setup for HTTP::Server::RouteSetup
2020-10-06 03:03:06 +02:00
Rasmus Wriedt Larsen
ebc3d32ff1
Python: Add concept for HTTP server modeling
...
If we want to separate out into a file, we can always do this with
```
import experimental.semmle.python.HTTP as HTTP
```
2020-10-06 03:02:32 +02:00
Rasmus Wriedt Larsen
9f1aa8ca0c
Python: Expose getParameter on ParameterNode
2020-10-06 03:02:31 +02:00
Rasmus Wriedt Larsen
d7526c40ba
Python: Copy old flask tests to new dataflow setup
2020-10-06 03:02:30 +02:00
Dave Bartolomeo
badb11750a
AST and IR support for TemporaryObjectExpr
2020-10-05 17:53:35 -04:00
Erik Krogh Kristensen
d6dc4bb655
allow flask url_for urls in TargetBlank.ql
2020-10-05 21:40:24 +02:00
Erik Krogh Kristensen
7d8bb339b6
add support for destructuring object exports in getAnExportedValue
2020-10-05 21:38:31 +02:00
CodeQL CI
339c0721c5
Merge pull request #4344 from esbena/js/fixup-cwe-20-to-cwe-020
...
Approved by erik-krogh
2020-10-05 12:30:53 -07:00
CodeQL CI
e95b665556
Merge pull request #4363 from erik-krogh/nosql-api
...
Approved by max-schaefer
2020-10-05 12:01:34 -07:00
Jonathan Leitschuh
8272d591b6
Apply suggestions from code review
...
https://github.com/github/codeql/pull/4312
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-10-05 14:12:03 -04:00
Jonas Jensen
6b2ae5d1ad
Merge pull request #4393 from MathiasVP/no-more-flow-into-read-side-effect
...
C++: No more flow into ReadSideEffect instructions
2020-10-05 19:46:32 +02:00
Robert Marsh
b7dcd5c557
Merge pull request #4395 from geoffw0/modelbeginend
...
C++: Merge StdSequenceContainerBeginEnd into the general BeginOrEndFunction
2020-10-05 12:22:27 -04:00
Tom Hvitved
c39bca5240
C#: Model data-flow for System.Threading.Tasks.Task<T>.GetAwaiter()
2020-10-05 17:15:54 +02:00
Erik Krogh Kristensen
c1b5357e74
remove stray todo
2020-10-05 16:53:05 +02:00
Geoffrey White
4db964fca9
Merge branch 'main' into set
2020-10-05 15:16:42 +01:00
Geoffrey White
d93b37d5c5
C++: Autoformat some more files.
2020-10-05 15:11:23 +01:00
Jonas Jensen
297f1c75e4
Merge pull request #4345 from geoffw0/map
...
C++: Models for std::pair, std::map and std::unordered_map
2020-10-05 15:28:10 +02:00
Mathias Vorreiter Pedersen
a6d7b1f9d9
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-10-05 15:21:15 +02:00
Mathias Vorreiter Pedersen
e95aefe0b2
C++: Now that PrimaryArgumentNode is an OperandNode we want a specialized toString on it
2020-10-05 15:13:33 +02:00
Erik Krogh Kristensen
2753a4f379
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-10-05 15:11:04 +02:00
Tom Hvitved
4ec14b1b02
Merge pull request #4399 from hvitved/csharp/error-type-population
...
C#: Handle population of error types
2020-10-05 15:04:50 +02:00
CodeQL CI
48fa8aacd5
Merge pull request #4403 from asgerf/js/remove-tslint-dependency
...
Approved by erik-krogh
2020-10-05 05:58:48 -07:00
Tamas Vajk
3b70064606
C#: Improve data flow summary for System.Lazy<>
2020-10-05 14:45:14 +02:00
Mathias Vorreiter Pedersen
d162c3d8c6
C++: Accept more test changes
2020-10-05 14:29:57 +02:00
Geoffrey White
855d2b50d7
C++: Correct test comments.
2020-10-05 13:00:51 +01:00
Anders Schack-Mulligen
30f29e0ba7
Merge pull request #4320 from aibaars/multipart-request
...
Java: add Spring::MultipartRequest as taint source
2020-10-05 13:45:06 +02:00
Geoffrey White
c757813d65
Merge branch 'main' into map
2020-10-05 12:32:49 +01:00
Anders Schack-Mulligen
e660ac54da
Merge pull request #4358 from joefarebrother/format-taint
...
Java: Add taint steps through string formatting methods
2020-10-05 13:25:54 +02:00
Geoffrey White
591c17d7cf
C++: Rearrange comments.
2020-10-05 12:22:08 +01:00
Mathias Vorreiter Pedersen
6c87b08c69
C++: Respond to review comments:
...
- ArgumentNode is now abstract
- PrimaryArgumentNode is now an OperandNode.
- ArgumentIndirectionNode is now merged into SideEffectArgumentNode.
2020-10-05 12:54:11 +02:00
Asger Feldthaus
fee99105da
JS: Remove tslint dependency
2020-10-05 11:53:58 +01:00
Rasmus Lerchedahl Petersen
478cfd7310
Python: Small clean-up
2020-10-05 12:43:30 +02:00
CodeQL CI
43b2c90538
Merge pull request #4400 from max-schaefer/js/api-graph-classrefs
...
Approved by asgerf
2020-10-05 03:12:23 -07:00
Geoffrey White
488a55b9dd
C++: Autoformat.
2020-10-05 10:39:32 +01:00
Rasmus Lerchedahl Petersen
f449da2fdb
Python: Write explanatory examples.
2020-10-05 11:39:18 +02:00
Mathias Vorreiter Pedersen
4c14f5dbb7
Merge branch 'main' into no-more-flow-into-read-side-effect
2020-10-05 11:03:42 +02:00
Asger Feldthaus
8689a9b3b9
JS: Fix a bad join order in barrierGuardBlocksNode
2020-10-05 09:55:22 +01:00
Asger Feldthaus
790d2ba0fc
JS: Fix FPs from ParameterFieldAsPropWrite.getPropertyNameExpr
2020-10-05 09:55:22 +01:00
Asger Feldthaus
cad259fb83
JS: Use more types in DOM model
2020-10-05 09:55:22 +01:00
Asger Feldthaus
3dabff6b17
JS: Recognize field types in untyped code
2020-10-05 09:55:22 +01:00
Tom Hvitved
4d62033a15
C#: Handle population of error types
2020-10-05 10:14:13 +02:00
Mathias Vorreiter Pedersen
d38121f54a
Merge pull request #4394 from geoffw0/oddsends2
...
C++: Clean up and add to taint tests
2020-10-05 09:16:50 +02:00
Rasmus Lerchedahl Petersen
8e27904f65
Python: Add explanatory comment.
2020-10-04 15:34:25 +02:00
Rasmus Lerchedahl Petersen
3463889010
Python: Add comments
2020-10-04 09:40:06 +02:00
Rasmus Lerchedahl Petersen
385e213fcf
Python: Fix comments
2020-10-04 09:33:30 +02:00
Rasmus Lerchedahl Petersen
ce18bff274
Python: Support method calls
2020-10-03 23:34:39 +02:00
Erik Krogh Kristensen
856ad07694
join-order improvement in NoSQL.qll
2020-10-03 22:07:34 +02:00
Tom Hvitved
c0b251ad9e
C#: Precise data-flow for System.Threading.Tasks
2020-10-03 11:13:45 +02:00
Tom Hvitved
26544f322a
C#: Update data-flow tests for System.Threading.Tasks
2020-10-03 11:13:45 +02:00
Arthur Baars
78c58c2415
Merge pull request #4384 from tausbn/python-fix-package-locations
...
Python: Fix `hasLocationInfo` for packages
2020-10-02 20:48:43 +02:00
Alexander Eyers-Taylor
754d82c325
Merge pull request #4382 from github/alexet-patch-1
...
Fix the name of the vscode extension recommendation
2020-10-02 18:33:36 +01:00
Alexander Eyers-Taylor
30ed6a0dac
Merge pull request #4385 from aibaars/drop-queries
...
Drop 'tech-inventory' and 'code duplication' queries from the standard query suites
2020-10-02 18:31:25 +01:00
Geoffrey White
3536d84bdf
C++: Use [, ...] syntax more widely.
2020-10-02 18:04:03 +01:00
Geoffrey White
1efe461a98
C++: Move the rest of of StdSequenceContainerBeginEnd into BeginOrEndFunction.
2020-10-02 18:03:46 +01:00
Geoffrey White
8d5bd2289b
C++: Remove parts of StdSequenceContainerBeginEnd in favour of BeginOrEndFunction.
2020-10-02 18:03:46 +01:00
Geoffrey White
8d5febf9c4
C++: Add a couple more test cases that have been discussed.
2020-10-02 18:03:07 +01:00
Geoffrey White
cc170bd513
C++: Test layout.
2020-10-02 18:03:07 +01:00
Tom Hvitved
1a93090778
C#: Improve guards SSA logic in the context of control-flow splitting
2020-10-02 18:00:34 +02:00
Tom Hvitved
f1d6f7cd0c
C#: Model assertions in the CFG
2020-10-02 17:56:41 +02:00
Geoffrey White
2dc8fba7fe
C++: Remove StdMapBeginEnd as we now have a general model BeginOrEndFunction in main.
2020-10-02 16:39:23 +01:00
Geoffrey White
0d6bd6facb
Merge branch 'main' into map
2020-10-02 16:24:03 +01:00
Geoffrey White
d4a1acedde
C++: Remove StdSetBeginEnd as we now have a general model BeginOrEndFunction in main.
2020-10-02 16:23:48 +01:00
Arthur Baars
daa1bcc06e
Also mark 'tech inventory' queries as deprecated
2020-10-02 17:23:11 +02:00
Arthur Baars
fc45b6cd3c
Drop 'tech-inventory' and 'code duplication' queries from the standard query suites
2020-10-02 17:22:04 +02:00
Geoffrey White
88a93964a7
Merge branch 'main' into set
2020-10-02 16:17:48 +01:00
Geoffrey White
28ab092e9f
C++: Add 'tainted' markers to standalone_iterators.cpp test.
2020-10-02 15:54:26 +01:00
Taus
fce76e2799
Merge pull request #4354 from RasmusWL/python-command-execution-modeling
...
Python: Better command execution modeling
2020-10-02 16:14:34 +02:00
Taus
2e4a61428d
Merge pull request #4346 from RasmusWL/python-add-implicit-init-test
...
Python: add test for implicit __init__.py files
2020-10-02 16:13:25 +02:00
Mathias Vorreiter Pedersen
072e1967c1
C++: Accept more tests
2020-10-02 15:51:29 +02:00
Tom Hvitved
17f0ac4b20
C#: Add more CFG assertion tests
2020-10-02 15:35:33 +02:00
Tom Hvitved
55d25d90fa
Merge pull request #4386 from hvitved/csharp/remove-deprecated-queries
...
C#: Remove deprecated external queries
2020-10-02 15:12:33 +02:00
Rasmus Wriedt Larsen
e5b9ac8d9c
Python: Use getCommand as tag in ConceptsTest
2020-10-02 14:12:41 +02:00
Rasmus Wriedt Larsen
eb67986916
Python: Exlucde only command injection sinks in os and subprocess
2020-10-02 14:11:07 +02:00
Mathias Vorreiter Pedersen
48902c07a4
C++: Accept test changes
2020-10-02 14:10:58 +02:00
Mathias Vorreiter Pedersen
8f4982d3f5
C++: Remove flow into ReadSideEffect instructions in simpleInstructionLocalFlowStep
2020-10-02 14:10:28 +02:00
Rasmus Wriedt Larsen
68eacef23c
Python: Refactor OsExecCall and friends for better readability
2020-10-02 13:38:54 +02:00
Rasmus Wriedt Larsen
de07d9e5d9
Python: Highlight that os.popen is not only problem for extra alerts
2020-10-02 13:34:33 +02:00
Taus Brock-Nannestad
b5d05f99c9
Python: Fix test output
2020-10-02 12:04:43 +02:00
Geoffrey White
4b0e9a4fb1
C++: Remove the model of make_pair.
2020-10-02 10:55:13 +01:00
Geoffrey White
0b6096ebfe
C++: Define make_pair and declare std::forward in the test.
2020-10-02 10:51:34 +01:00
Erik Krogh Kristensen
6acb199074
improve precision using getAnImmediateUse to check parameter names
2020-10-02 11:09:50 +02:00
Erik Krogh Kristensen
abdbe92720
refactor the NoSQL model to use API graphs
2020-10-02 10:42:49 +02:00
Max Schaefer
98e93a7b9d
JavaScript: Improve API-graph support for function-style classes.
2020-10-02 09:25:51 +01:00
Rasmus Lerchedahl Petersen
bd32faf934
Python: annotate new test
2020-10-02 10:06:54 +02:00
Rasmus Lerchedahl Petersen
2a4d21a989
Python: Test method call
2020-10-02 10:02:29 +02:00
Chris Smowton
aa707e9370
Merge pull request #4381 from smowton/smowton/admin/fix-owasp-broken-links
...
Fix OWASP broken links
2020-10-02 08:51:36 +01:00
Tamas Vajk
1cf3196b61
Fix additional PR review findings
2020-10-02 09:12:13 +02:00
Tamas Vajk
01de550ef8
Make predicates private
2020-10-02 09:12:13 +02:00
Tamas Vajk
f52cf264ec
Refactor specificSubExprSign
2020-10-02 09:12:13 +02:00
Tamas Vajk
f03146d12f
Refactor fieldSign
2020-10-02 09:12:13 +02:00
Tamas Vajk
21ff1a0445
Address some of the PR review findings
2020-10-02 09:12:13 +02:00
Tamas Vajk
638d0399a8
Java, C#: Refactor explicitSsaDefSign in sign analysis
2020-10-02 09:09:23 +02:00
Tamas Vajk
7545fe74e3
Java, C#: Refactor implicitSsaDefSign in sign analysis
2020-10-02 09:09:23 +02:00
Tamas Vajk
37fc1d6f0f
Java, C#: cleanup sign analysis
...
Add missing QL doc, improve readability
2020-10-02 09:09:23 +02:00
Gulshan Singh
f026d3a1e6
C++: Improve bitwise and range analysis
2020-10-01 23:30:51 -07:00
Gulshan Singh
78625b764d
C++: Add test for bitwise and ranges
2020-10-01 23:30:48 -07:00
Jonathan Leitschuh
ab3772eaeb
Update JHipster CodeQL query from code review
2020-10-01 15:38:56 -04:00
Tom Hvitved
bc68578c8b
C#: Remove deprecated external queries
2020-10-01 21:11:47 +02:00
Jonas Jensen
48c6f34f91
Merge pull request #4372 from matt-gretton-dann/cpp20-constinit
...
Add support for Variable.is_constinit()
2020-10-01 20:19:56 +02:00
Aditya Sharad
f7f05476a2
Merge pull request #4375 from adityasharad/javascript/client-side-url-redirect-regexp
...
JavaScript: Track taint through RegExp.prototype.exec for URL redirection
2020-10-01 09:55:19 -07:00
Geoffrey White
ad9f306352
C++: Model taint flow only when the second component of a pair would be tainted.
2020-10-01 17:38:09 +01:00
Ian Lynagh
e555b6b2a8
Merge pull request #4380 from github/igfoo/unnamed
...
C++: Accept test changes in unnamed entity naming
2020-10-01 17:16:20 +01:00
Taus Brock-Nannestad
75f4051cb5
Python: Fix hasLocationInfo for packages
2020-10-01 17:21:53 +02:00
Joe
ca4781eb78
Java: Remove use of StringFormatMethod in TaintTrackingUtils
2020-10-01 15:58:32 +01:00
Rasmus Lerchedahl Petersen
0841e92a6b
Python: Test for method call
2020-10-01 16:26:12 +02:00
Alexander Eyers-Taylor
5ce0974eb2
Fix the name of the vscode extension recommendation
...
The name is case sensitive so it didn't work before.
2020-10-01 14:40:45 +01:00
Rasmus Lerchedahl Petersen
5326125b70
Python: Handle positional construtor arguments
2020-10-01 15:28:26 +02:00
Anders Schack-Mulligen
c027f3bd2b
Merge pull request #4324 from tamasvajk/feature/unsigned-sign-analysis
...
Handle unsigned types in sign analysis (C# and Java)
2020-10-01 15:11:49 +02:00
CodeQL CI
36450a8998
Merge pull request #4338 from erik-krogh/nodejs-server-request-data
...
Approved by asgerf
2020-10-01 06:00:17 -07:00
Erik Krogh Kristensen
d54a057457
Merge pull request #4377 from erik-krogh/babelCrash
...
JS: prevent crash when TemplateLiteral is used in import
2020-10-01 14:58:45 +02:00
Chris Smowton
578ea1ae43
Fix OWASP broken links
2020-10-01 13:09:52 +01:00
Erik Krogh Kristensen
18f7f2b559
autoformat
2020-10-01 13:49:31 +02:00
Erik Krogh Kristensen
4dec2171da
add http request server data as a RemoteFlowSource
2020-10-01 13:21:56 +02:00
Rasmus Wriedt Larsen
3247b300ae
Python: Fix problem with missing use-use flow
2020-10-01 12:55:11 +02:00
Rasmus Wriedt Larsen
9b3509f0ba
Python: Highlight problem with missing use-use flow
2020-10-01 12:51:44 +02:00
Rasmus Lerchedahl Petersen
2187389da1
Python: Show constructor keyword arg problem
...
Also make tests runnable
2020-10-01 12:48:38 +02:00
CodeQL CI
0158e2ffef
Merge pull request #4374 from max-schaefer/js/api-graph
...
Approved by erik-krogh
2020-10-01 03:33:45 -07:00
Rasmus Lerchedahl Petersen
db23dad6ec
Python: Allow callables to connect to calls freely
2020-10-01 12:33:42 +02:00
Max Schaefer
7f075202c6
Merge pull request #4367 from erik-krogh/sql-api
...
JS: Fixing an API-graph gotcha in `SQL.qll`
2020-10-01 11:33:01 +01:00
Geoffrey White
084e6f6d9b
C++: Add change note.
2020-10-01 11:04:40 +01:00
Geoffrey White
fb9a3b323d
C++: Modernize MemcpyFunction.
2020-10-01 10:53:18 +01:00
Geoffrey White
ce9abe071d
C++: Remove taint flow from size parameter.
2020-10-01 10:51:01 +01:00
Geoffrey White
ed5c3b321f
C++: Repair callDereferences for failing test.
2020-10-01 10:38:12 +01:00
Erik Krogh Kristensen
fbd62abd64
prevent crash when TemplateLiteral is used in import
2020-10-01 11:26:49 +02:00
Erik Krogh Kristensen
75b9237b81
use Parameter instead of SimpleParameter in the AngularJS model
2020-10-01 10:44:10 +02:00
Erik Krogh Kristensen
c675d72629
use Parameter instead of SimpleParameter in remaining route-handler models
2020-10-01 10:44:10 +02:00
Erik Krogh Kristensen
f65ba11485
use Parameter instead of SimpleParameter in AMD.qll
2020-10-01 10:44:05 +02:00
Geoffrey White
ff78f50a03
Merge branch 'main' into callderef
2020-10-01 09:40:36 +01:00
Rasmus Lerchedahl Petersen
b092df48a5
Python: Location and toString for KwUnpacked
2020-10-01 10:15:19 +02:00
Aditya Sharad
e712d16e7e
JavaScript: Track taint through RegExp.prototype.exec for URL redirection
...
Regexp literals are currently handled, but not `RegExp` objects.
2020-09-30 15:13:02 -07:00
Rasmus Lerchedahl Petersen
29a162bc9c
Python: Proper flow **arg -> **param
2020-09-30 23:55:02 +02:00
Geoffrey White
cafd320953
C++: Add set/map constructor models.
2020-09-30 17:41:06 +01:00
Geoffrey White
6520f9d0fb
C++: Add basic std::set models.
2020-09-30 17:23:56 +01:00
Geoffrey White
5bc7d3a9b2
C++: Add tests for std::set and std::unordered_set.
2020-09-30 17:23:56 +01:00
Rasmus Wriedt Larsen
428c2a3fda
Merge branch 'main' into python-command-execution-modeling
2020-09-30 17:38:59 +02:00
Matthew Gretton-Dann
e0ca4dafb8
Add support for Variable.is_constinit()
2020-09-30 16:31:45 +01:00
Rasmus Wriedt Larsen
c4a2e1d6d1
Python: Rewrite attribute lookup helpers for better performance
...
Not that they actually had a huge problem right now, just that using the old
pattern HAS lead to bad performance in the past. See
https://github.com/github/codeql/pull/4361
2020-09-30 17:31:20 +02:00
Geoffrey White
952cc89c2a
C++: Improve make_pair in stl.h (using remove_reference).
2020-09-30 16:17:06 +01:00
Geoffrey White
7ecd229ce7
C++: Improve make_pair in stl.h (jbj solution).
2020-09-30 16:16:53 +01:00
Geoffrey White
282d3e8f7e
Merge pull request #4322 from jbj/range-analysis-custom-defs
...
C++: Support custom defs in SimpleRangeAnalysis
2020-09-30 15:43:32 +01:00
Taus
32bf7d6bdf
Merge pull request #4256 from fatenhealy/Noblowfish
...
CWE-327 BrokenCryptoAlgorithm recommendation to AES instead of Blowfish
2020-09-30 16:15:46 +02:00
Rasmus Lerchedahl Petersen
b0ed7af897
Python: Approximate **arg -> **param
2020-09-30 15:54:12 +02:00
Rasmus Lerchedahl Petersen
4ae422ce16
Python: Add test for extraneous overflow arguments
2020-09-30 15:28:29 +02:00
Erik Krogh Kristensen
bfb653a34a
rename getAReference to getAnImmediateUse
2020-09-30 15:15:49 +02:00
Erik Krogh Kristensen
eb973b39fe
Update javascript/ql/src/semmle/javascript/frameworks/SQL.qll
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-30 15:12:17 +02:00
Arthur Baars
cf6036f9b4
Java: fix some android database sinks
2020-09-30 14:42:19 +02:00
Rasmus Wriedt Larsen
f501003879
Design Patterns: Recommend this = range for ::Range pattern
2020-09-30 14:28:08 +02:00
Faten Healy
03d8fc7296
changed to AES
2020-09-30 22:18:36 +10:00
Jonas Jensen
3af3d87ecd
C++: Change note for several range-analysis PRs
2020-09-30 13:52:23 +02:00
Erik Krogh Kristensen
d316cb512e
deprecate exports and replace uses with the new getAnExportedValue
2020-09-30 13:46:28 +02:00
Rasmus Wriedt Larsen
4adc26eb62
Python: Fix command injection example code
...
`subprocess.Popen(["ls", "-la"], shell=True)` correspond to running `sh -c "ls" -la`
So it doesn't follow the pattern of the rest of the test file.
2020-09-30 13:38:37 +02:00
Taus
d694777894
Merge pull request #4369 from RasmusWL/python-ospathjoin-taintstep
...
Python: Add taint-step for os.path.join
2020-09-30 13:35:16 +02:00
Erik Krogh Kristensen
b24e959033
add getAnInvocation to the ApiGraphs API
2020-09-30 13:33:36 +02:00
Rasmus Wriedt Larsen
9c1253c8af
Python: Remove flow out of CommandInjection sinks
2020-09-30 13:29:40 +02:00
Erik Krogh Kristensen
b720bfdd11
Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2020-09-30 13:26:51 +02:00
Rasmus Lerchedahl Petersen
00966bba0d
Python: update test expectations
2020-09-30 13:11:23 +02:00
Rasmus Wriedt Larsen
a2d12f0440
Python: Update CommandInjection.expected
2020-09-30 13:00:10 +02:00
Jonas Jensen
b1c826e5c0
Merge pull request #4135 from rdmarsh2/rdmarsh2/cpp/output-iterators-1
...
C++: Output iterators in AST taint tracking
2020-09-30 12:54:55 +02:00
Arthur Baars
061c2a754f
Java: tests for android database flow steps
2020-09-30 12:42:19 +02:00
Arthur Baars
a13e845127
Java: tests for android database sinks
2020-09-30 12:42:19 +02:00
Arthur Baars
39f5284dcc
Java: add stubs for some android database classes
2020-09-30 12:33:33 +02:00
Arthur Baars
449fb24ef6
Java: android add taint and SQL sink for ContentProvider/Resolver
2020-09-30 12:33:32 +02:00
Arthur Baars
efd5b6ff66
Java: SQLite: make classes private
2020-09-30 12:32:27 +02:00
Arthur Baars
28c965765b
Move query sinks into SQLite.qll
2020-09-30 12:32:27 +02:00
Arthur Baars
b3aae276ba
Add types to SQLite.qll
2020-09-30 12:32:24 +02:00
Arthur Baars
6db4f839cb
Java: add Android database taint and SQL injection sinks
2020-09-30 12:31:11 +02:00
Rasmus Lerchedahl Petersen
30d048f9d4
Python: Support unpacking of keyword arguments.
2020-09-30 11:55:27 +02:00
Rasmus Lerchedahl Petersen
e02cfbf6b0
Python: Support keyword overflow arguments
2020-09-30 11:55:27 +02:00
Rasmus Lerchedahl Petersen
27af9bbae8
Python: Support overflow positional arguments
...
Currently ignoring starred arguments
2020-09-30 11:55:26 +02:00
Rasmus Lerchedahl Petersen
8f2ef94b3e
Python: Hook up keyword arguments
2020-09-30 11:55:26 +02:00
Rasmus Lerchedahl Petersen
f5244aab8c
Python: Add testfiles
2020-09-30 11:54:40 +02:00
Rasmus Wriedt Larsen
1595fed2d6
Python: Add preliminary taint tests for pathlib
2020-09-30 11:44:37 +02:00
Rasmus Wriedt Larsen
0542c3b91e
Python: Model os.path.join and add taint-step
2020-09-30 11:42:36 +02:00
Rasmus Wriedt Larsen
efa2484718
Python: Add taint test for os.path.join
...
Surprisingly the first two just worked, due to our very general handling of any
`join` methods :D
2020-09-30 11:35:21 +02:00
Rasmus Wriedt Larsen
aa6fad558c
Python: Minor cleanup in taint-step tests
2020-09-30 11:15:53 +02:00
Erik Krogh Kristensen
e0b25798ff
remove type-tracking from getAReference, and rewrite qldocs
2020-09-30 10:36:08 +02:00
Rasmus Wriedt Larsen
b3efa28277
Merge branch 'main' into python-command-execution-modeling
2020-09-30 10:24:11 +02:00
Jonas Jensen
68f6d93325
C++: Autoformat fixup
2020-09-30 09:49:56 +02:00
Anders Schack-Mulligen
8d4f7e2db7
Merge pull request #4366 from joefarebrother/field-rvalue-lvalue
...
Java: Make `FieldRead` and `FieldWrite` extend `RValue` and `LValue`
2020-09-30 07:55:24 +02:00
Ian Lynagh
d5f8cbc50c
C++: Accept test changes in unnamed entity naming
2020-09-29 17:30:33 +01:00
Erik Krogh Kristensen
65441705ef
renamings based on review
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
c3f5a6dcac
introduce API::Node::getACall()
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
69f4ac25c4
renamings based on review
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
1596436f7e
rename getASourceUse to getAReference
2020-09-29 18:23:10 +02:00
Erik Krogh Kristensen
adc05022f3
update comment in test case
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-29 18:21:41 +02:00
Joe
be07d27a4c
Java: Improve tests
2020-09-29 16:36:34 +01:00
Erik Krogh Kristensen
3857331657
avoid .getReturn().getAUse().(DataFlow::InvokeNode) in the SQL model
2020-09-29 17:08:09 +02:00
Erik Krogh Kristensen
deae9256dd
add convenience method to API graphs
2020-09-29 17:08:00 +02:00
Joe
efc3a25237
Java: Don't pass taint through the format methods of Console
2020-09-29 16:02:51 +01:00
Joe Farebrother
eccfa5d26a
Fix documentation typo
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-09-29 15:34:05 +01:00
Joe
d184aa7c06
Make FieldRead and FieldWrite extend LValue and RValue
2020-09-29 15:24:51 +01:00
yoff
60c310d1bf
Merge pull request #4361 from RasmusWL/python-new-flask-perf-fix
...
Python: Hotfix performance problem with flask methods
2020-09-29 15:41:14 +02:00
CodeQL CI
d7add29dc2
Merge pull request #4359 from erik-krogh/cookieWrites
...
Approved by esbena
2020-09-29 06:32:01 -07:00
CodeQL CI
910c19e613
Merge pull request #4348 from erik-krogh/needle
...
Approved by esbena
2020-09-29 02:57:32 -07:00
Erik Krogh Kristensen
51f1f03f5f
add change note for js/missing-token-validation
2020-09-29 11:56:10 +02:00
CodeQL CI
11f39a9d88
Merge pull request #4342 from erik-krogh/track-where-prop
...
Approved by asgerf
2020-09-29 02:09:53 -07:00
Rasmus Wriedt Larsen
fee279f952
Python: Hotfix performance problem with flask methods
...
This improves runtime for command injection query on
https://lgtm.com/projects/g/alibaba/funcraft from +200 seconds (I did not care
to wait more) down to ~55 seconds on my machine.
This type of tracking predicate with string as additional argument apparently
causes trouble :|
2020-09-29 11:00:57 +02:00
Erik Krogh Kristensen
89195d7ada
add change note for needle
2020-09-29 10:13:48 +02:00
Erik Krogh Kristensen
52d94f6177
use getABoundCallbackParameter instead of getCallback and getParameter.
2020-09-29 10:12:46 +02:00
Rasmus Wriedt Larsen
e859a804c4
Update docs on CodeQL design patterns
2020-09-29 09:05:18 +02:00
CodeQL CI
060c19a063
Merge pull request #4352 from erik-krogh/destructing-redirect
...
Approved by esbena
2020-09-28 12:31:42 -07:00
Erik Krogh Kristensen
e04404b713
also recognize cookie writes are leading to cookie access
2020-09-28 21:17:25 +02:00
Max Schaefer
dfc4436012
JavaScript: Teach API graphs to recognise arguments supplied in partial function applications.
2020-09-28 17:52:57 +01:00
Geoffrey White
6de29a6dd3
C++: Provide std::pair constructor initializers.
2020-09-28 17:52:33 +01:00
Ian Lynagh
8a76195f04
Merge pull request #4356 from github/igfoo/front_end
...
C++: accept test changes from extractor frontend upgrade
2020-09-28 17:27:37 +01:00
Geoffrey White
8059230bbc
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:59:28 +01:00
Geoffrey White
773bc48a91
C++: Use a more modern make_pair.
2020-09-28 16:54:41 +01:00
Geoffrey White
759324ca1b
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:51:21 +01:00
Joe
bea38fcd07
Java: Add taint modelling for string format methods
2020-09-28 16:25:45 +01:00
Rasmus Wriedt Larsen
a62c3345d1
Add docs on CodeQL Design Patterns
2020-09-28 16:38:48 +02:00
Tom Hvitved
93edaa75eb
Merge pull request #4309 from tamasvajk/feature/enum-value-init
...
Extract constant value of enum member equal clauses
2020-09-28 16:18:10 +02:00
Tamas Vajk
2bbaa4e173
Handle unsigned types in sign analysis (C# and Java)
2020-09-28 14:46:32 +02:00
Esben Sparre Andreasen
c0a67a8d7b
JS: another CWE-20 -> CWE-020
2020-09-28 14:27:10 +02:00
CodeQL CI
75262ddace
Merge pull request #4328 from erik-krogh/indirect-fix2
...
Approved by esbena
2020-09-28 04:55:19 -07:00
Jonas Jensen
165779ea09
Merge pull request #4343 from rdmarsh2/rdmarsh2/cpp/ir-construction-qldoc
...
C++: Add some IR QLDoc
2020-09-28 13:37:12 +02:00
Nick Rolfe
7609ce2d47
C++: accept test changes from extractor frontend upgrade
2020-09-28 12:23:26 +01:00
CodeQL CI
18bdc054cd
Merge pull request #4347 from max-schaefer/js/handle-empty-pkgjson
...
Approved by asgerf
2020-09-28 02:42:21 -07:00
Rasmus Wriedt Larsen
6cb2ca63a6
Python: tests to show modeling is very syntactical
2020-09-28 11:23:06 +02:00
Joe Farebrother
274147c87a
Merge pull request #4339 from joefarebrother/printAST-java-var-decls
...
Java: Add synthetic nodes for `LocalVariableDeclExpr`s in the AST view
2020-09-28 10:21:25 +01:00
Rasmus Wriedt Larsen
3af5c720cc
Python: Add test of more indirect command injection sinks
2020-09-28 11:16:52 +02:00
Rasmus Wriedt Larsen
f7f6564189
Python: Model subprocess.Popen (and helpers)
2020-09-28 11:13:04 +02:00
Rasmus Wriedt Larsen
62dc0dd263
Python: Model os.exec* os.spawn* and os.posix_spawn*
...
I also had to exclude the inline expectation tests from files outside the test
repo.
2020-09-28 11:05:33 +02:00
Rasmus Wriedt Larsen
c440fd0c09
Python: Adjust expectations for system command executions
...
I mostly did this to show my reviewers that the tests actually run and do
something ;)
2020-09-28 11:05:33 +02:00
Rasmus Wriedt Larsen
060720aae7
Python: Add tests for all SystemCommandExecution from stdlib
...
Overall idea is that `test/experimental/meta/ConceptsTest.qll` will set up
inline expectation tests for all the classes defined in `Concepts.qll`, so any
time you model a new instance of Concepts, you simply just import that
file. That makes the tests a little verbose, but allows us to share test-setup
between all the different frameworks we model.
Note that since the definitions of SystemCommandExecution subclasses are
scattered across multieple framework modeling qll files, it think it makes the
most sense to have the tests for each framework in one location.
I'm not 100% convinced about if this is the right choice or not (especially when
we want to write tests for sanitizers), but for now I'm going to try it out at
least.
2020-09-28 11:05:32 +02:00
Tamas Vajk
a635503be0
Add test cases to UselessCastToSelf
2020-09-28 11:04:22 +02:00
Tamas Vajk
3577b27f49
Fix to not report on enum member initialization
2020-09-28 11:04:22 +02:00
Tamas Vajk
77bb1b2cd9
C#: Extract constant value of enum member equal clauses
2020-09-28 11:04:22 +02:00
Tamas Vajk
a6b62a3838
C#: Add enum init value test
2020-09-28 10:56:50 +02:00
Geoffrey White
11587c930b
C++: Autoformat.
2020-09-28 09:19:35 +01:00
Tamás Vajk
20c4d94ccc
Merge pull request #4318 from tamasvajk/feature/pointer-cast
...
C#: Add implicit cast from array to pointer
2020-09-28 09:34:54 +02:00
Erik Krogh Kristensen
664342dd0f
change SimpleParameter to Parameter in the express model to support destructuring parameters
2020-09-26 21:31:06 +02:00
Robert Marsh
27dc49ff7a
C++: Fix performance issue in PartialDefinition
2020-09-25 19:08:07 -07:00
Robert Marsh
713bdae77a
C++: sync identical files
2020-09-25 13:54:58 -07:00
Robert Marsh
9240256a9f
C++: fix QLDoc
2020-09-25 11:55:39 -07:00
Rasmus Wriedt Larsen
2acfd4cdb1
Python: Show we're able to handle example with __init__.py files
2020-09-25 18:28:31 +02:00
Taus
fc84286b56
Merge pull request #3830 from yoff/SharedDataflow_FieldFlow
...
Python: Shared dataflow: Field flow
2020-09-25 14:53:57 +02:00
CodeQL CI
ea5feb2b0a
Merge pull request #4331 from erik-krogh/DVNA-files
...
Approved by esbena
2020-09-25 05:21:03 -07:00
Erik Krogh Kristensen
6b9aea82ca
model method calls in the needle library
2020-09-25 14:13:31 +02:00
Erik Krogh Kristensen
a22ddb145b
model calls to needle
2020-09-25 13:53:22 +02:00
Rasmus Lerchedahl Petersen
4621e6d8c0
Python: fix QL format
2020-09-25 13:37:39 +02:00
Rasmus Lerchedahl Petersen
88bba46698
Python: Modify tests based on review
...
The extra hist in `test.py` seen in `globalStep.expected`
are due to the removal of manual filtering code.
(That code was from when dataflow had many strange things in it.)
2020-09-25 13:35:30 +02:00
Max Schaefer
0ccbaf9e88
JavaScript: Handle empty package.json files gracefully.
2020-09-25 12:12:39 +01:00
Joe
5256c0ba39
Java: Improve PrintAst tests and rename things
...
Add tests for `EnhcancedForStmt`s and `InstanceOfExpr`s.
Rename LocalVarDeclParent to SingleLocalVarDeclParent
2020-09-25 11:31:56 +01:00
yoff
c56ff986d4
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-25 11:56:50 +02:00
Rasmus Wriedt Larsen
85607fe2d5
Python: Adjust location for .expected output
2020-09-25 11:56:45 +02:00
Rasmus Wriedt Larsen
3d5511221e
Python: Add test for implicit __init__.py files
2020-09-25 11:48:38 +02:00
Rasmus Wriedt Larsen
120a569c6f
Python: Explain how CallGraph test.py even works
...
Also remove options file, since it did nothing at all (and blocked
experimental/library-tests/options from taking effect)
2020-09-25 11:42:59 +02:00
Geoffrey White
09b5fb6753
C++: Fix comments.
2020-09-25 10:41:25 +01:00
CodeQL CI
4deb43f361
Merge pull request #4323 from RasmusWL/python-new-command-injection-query
...
Approved by tausbn
2020-09-25 02:39:46 -07:00
Geoffrey White
6fd1bf89c1
C++: Change note.
2020-09-25 10:33:40 +01:00
Esben Sparre Andreasen
ba0a2e1665
JS: tag consistency: replace cwe-20 with cwe-020
2020-09-25 10:28:05 +02:00
CodeQL CI
7b1dbb4364
Merge pull request #4337 from max-schaefer/js/fix-indirect-command-injection
...
Approved by asgerf
2020-09-25 00:18:55 -07:00
Robert Marsh
1445b31864
C++: QLDoc for Operand
2020-09-24 16:34:16 -07:00
Robert Marsh
e51b9215e4
C++: QLDoc for Overlap in IR construction
2020-09-24 15:56:29 -07:00
Robert Marsh
e9b1d817c7
C++: QLDoc for VirtualVariable in IR construction
2020-09-24 15:55:57 -07:00
Robert Marsh
46ff4d524f
C++: autoformat
2020-09-24 14:54:31 -07:00
Erik Krogh Kristensen
b8154d41b1
type-track objects where the "$where" property has been written
2020-09-24 20:55:25 +02:00
Robert Marsh
ca06637de0
C++: add qldoc comment
2020-09-24 10:40:45 -07:00
Geoffrey White
ec3c1568d2
C++: Model erase.
2020-09-24 18:38:29 +01:00
Geoffrey White
8b91d5077d
C++: Model find.
2020-09-24 18:38:29 +01:00
Geoffrey White
d550741c0c
C++: Model insert_or_assign.
2020-09-24 18:38:28 +01:00
Geoffrey White
c51294e423
C++: Model operator[] and at.
2020-09-24 18:38:28 +01:00
Geoffrey White
13b15d9bcd
C++: Model swap.
2020-09-24 18:38:27 +01:00
Geoffrey White
6119bf3430
C++: Model begin and end.
2020-09-24 18:38:27 +01:00
Geoffrey White
25e0c680c6
C++: Model insert.
2020-09-24 18:38:27 +01:00
Robert Marsh
094b06ec2a
C++: remove unneeded predicate
2020-09-24 10:37:38 -07:00
CodeQL CI
19316930cd
Merge pull request #4310 from asgerf/js/extract-xml-with-codeql
...
Approved by aibaars, esbena
2020-09-24 10:14:46 -07:00
Geoffrey White
0dca7f81bc
C++: Model std::swap.
2020-09-24 15:49:33 +01:00
Jonas Jensen
e012dce755
Merge pull request #4334 from github/faster-skip-copy-value-instructions
...
C++: Manual recursion in `skipCopyValueInstructions`
2020-09-24 16:43:25 +02:00
Geoffrey White
49f9a76c54
C++: Add tests for std::map and std::unordered_map.
2020-09-24 15:19:39 +01:00
Anders Schack-Mulligen
3ef3e6e140
Merge pull request #4319 from hvitved/python-java-block-precedes-var
...
Java/Python: Reduce size of `blockPrecedesVar`
2020-09-24 16:07:49 +02:00
Joe
9c8a468237
Java: PrintAst: Add synthetic nodes for other declarations
2020-09-24 14:31:24 +01:00
Joe
3e960c1e0b
Java: PrintAst: Refactor exceptions to the usual AST of expressions and statements using dispatch
2020-09-24 14:31:24 +01:00
Joe
1f99607624
Java: PrintAst: Improve test
2020-09-24 14:31:24 +01:00
Joe
45651cf123
Java: PrintAst: Add a synthetic node for the initialisers of for statements
2020-09-24 14:31:24 +01:00
Anders Schack-Mulligen
d4d4c0f3f9
Merge pull request #4325 from aibaars/hibernate-changenote
...
Java: change note for Hiberate ORM improvements
2020-09-24 12:58:45 +02:00
Erik Krogh Kristensen
6163e6cf5f
adjust test case for XML entity expansion
2020-09-24 09:53:06 +02:00
Mathias Vorreiter Pedersen
780a07e89c
Merge pull request #4332 from jbj/ExtendedRangeAnalysis-stub
...
C++: ExtendedRangeAnalysis stub implementation
2020-09-24 09:01:06 +02:00
Tom Hvitved
7970fef3e4
Merge pull request #4315 from hvitved/merge-rc-1.25
...
Merge rc/1.25 into main
2020-09-24 08:27:01 +02:00
Robert Marsh
89332ca303
C++: autoformat
2020-09-23 15:29:51 -07:00
Robert Marsh
774dcc7c52
C++: New model class for iterator op* and op[]
2020-09-23 15:29:37 -07:00
Jonathan Leitschuh
17603c8091
Update java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-23 13:59:49 -04:00
Geoffrey White
71a605b7d9
C++: Add tests for std::pair.
2020-09-23 18:43:28 +01:00
Tamas Vajk
48bf6d55aa
C#: Add implicit cast from array to pointer
2020-09-23 17:21:38 +02:00
Mathias Vorreiter Pedersen
f794eaa670
C++: Manual recursion in skipCopyValueInstructions instead of transitive closure
2020-09-23 16:26:40 +02:00
Erik Krogh Kristensen
83f0514475
add req.files as a RequestInputAccess in the Express model
2020-09-23 15:50:59 +02:00
Jonas Jensen
b7d0939f4a
C++: ExtendedRangeAnalysis stub implementation
...
Just to demonstrate how things fit together, I've created
`SubtractSelf.qll` that adds a (hopefully sound) version of the test
extension that was already used in `extensibility.ql`.
2020-09-23 15:50:07 +02:00
Arthur Baars
5894263671
Java: improve change note
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-09-23 15:37:55 +02:00
Max Schaefer
dc7b447895
JavaScript: Make alert locations for command injection more precise.
2020-09-23 14:07:36 +01:00
Max Schaefer
439aadf0b6
JavaScript: Do even more type tracking in command injection.
2020-09-23 14:07:36 +01:00
Max Schaefer
ef18b39124
JavaScript: Fix use of type backtracker in IndirectCommandArgument.qll.
2020-09-23 14:07:36 +01:00
Max Schaefer
825fc2228b
JavaScript: Add two new command-injection tests.
2020-09-23 14:07:36 +01:00
Rasmus Wriedt Larsen
66815c9d3d
Python: Suppress unused variable warnings in DataFlowPrivate
2020-09-23 14:33:10 +02:00
Tamás Vajk
9b14a70eef
Merge pull request #4316 from tamasvajk/feature/local-functions
...
C#: Change TrapStackBehaviour of local functions
2020-09-23 14:12:07 +02:00
Tamas Vajk
2868d5bf34
C#: Add pointer cast test cases
2020-09-23 12:20:51 +02:00
Rasmus Wriedt Larsen
6aec2ec673
Python: Fix os.popen modeling
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-09-23 11:18:32 +02:00
Rasmus Wriedt Larsen
624cdd339a
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-09-23 11:18:12 +02:00
Tom Hvitved
d652b95b21
Merge pull request #4011 from hvitved/csharp/asp-extraction-pre-finalize
...
C#: Move ASP extraction from auto builder to `pre-finalize.{sh,cmd}`
2020-09-23 09:11:11 +02:00
Tamás Vajk
03e20eed05
Merge pull request #4314 from tamasvajk/feature/switch-case-expr
...
C#: Fix switch case expression types
2020-09-23 08:57:32 +02:00
Rasmus Lerchedahl Petersen
ef4461ce54
Python: Address review comments
2020-09-22 23:48:28 +02:00
Tamás Vajk
5ab5e75b85
Merge pull request #4255 from fatenhealy/IncreaseInsufficientKeySizeValue
...
Increase insufficient key size value from 1024 to 2048
2020-09-22 23:06:12 +02:00
yoff
aece0ff652
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-22 22:33:46 +02:00
Jonathan Leitschuh
645d7c8831
Fix documentation in apache/Lang.qll
2020-09-22 15:04:06 -04:00
Erik Krogh Kristensen
ec2b3f0b6c
better join-order fix in HTTP
2020-09-22 21:02:26 +02:00
Jonathan Leitschuh
8578bc5cf0
Update java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.qhelp
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-22 15:02:00 -04:00
Robert Marsh
e28a45b8e6
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Resolve test output conflicts from IR model improvements
2020-09-22 11:17:38 -07:00
Jonathan Leitschuh
24fe3d0663
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-09-22 13:11:11 -04:00
Arthur Baars
252f8aa89d
Java: add Spring::MultipartRequest as taint source
2020-09-22 19:01:10 +02:00
Arthur Baars
b382711f14
Java: change note for Hiberate ORM improvements
2020-09-22 18:55:07 +02:00
CodeQL CI
475519c9ee
Merge pull request #4267 from asgerf/js/log-typescript-memory
...
Approved by esbena
2020-09-22 08:51:51 -07:00
Jonas Jensen
4faeede5cd
C++: Remove unnecessary comment on import
2020-09-22 16:55:25 +02:00
Rasmus Wriedt Larsen
71a75ce596
Python: Handle bound methods in flask modeling
2020-09-22 16:33:35 +02:00
Rasmus Wriedt Larsen
5709189c2a
Python: Expand flask test
2020-09-22 16:33:34 +02:00
Rasmus Wriedt Larsen
e614365963
Python: Adopt new approach in flask modeling
...
Removed all the dict-like stuff, not sure that is how we should do things.
2020-09-22 16:33:33 +02:00
Rasmus Wriedt Larsen
a82fa04d8a
Python: Add worked example of taint step modeling of external libs
...
This can't be seen on the example, but I went through quite a lot of iterations
before arriving at this fairly simple solution.
2020-09-22 16:28:26 +02:00
Rasmus Wriedt Larsen
00ea0cebc3
Python: More Flask modeling kinda works
...
It "kinda" works now, but it really is not a pretty solution. Adding all these
"tracked" objects is SUPER annoying... it _would_ be possible to skip them, but
that seems like it will give the wrong edges for dataflow/taintflow queries :|
A good chunk of it should be able to be removed with access-paths like C# does
for library modeling. Some of it could be solved by better type-tracking API
like API Graphs... but it seems like we generally are just lacking the
nice-to-have features like `.getAMemberCall` and the like. See
https://github.com/github/codeql/pull/4082/files#diff-9aa94c4d713ef9d8da73918ff53db774L33
2020-09-22 16:28:25 +02:00
Rasmus Wriedt Larsen
3c08590ee4
Python: Expand flask tests a bit
2020-09-22 16:28:24 +02:00
Rasmus Wriedt Larsen
2bdd0284dc
Python: Port py-command-line-injection with new dataflow
2020-09-22 16:28:23 +02:00
Rasmus Wriedt Larsen
7c205dd3fc
Python: First attempt at modeling Flask
2020-09-22 16:28:21 +02:00
Rasmus Wriedt Larsen
cdc5ca7aec
Python: Model os.system and os.popen
2020-09-22 16:28:20 +02:00
Rasmus Wriedt Larsen
0265f26301
Python: Add importModule and importMember DataFlow helpers
2020-09-22 16:28:19 +02:00
Rasmus Wriedt Larsen
2551173156
Python: Update example in QLDoc for TypeTracker
2020-09-22 16:28:18 +02:00
Jonas Jensen
9fd8b0431a
C++: Add a SimpleRangeAnalysisDefinition test def
2020-09-22 15:54:54 +02:00
Jonas Jensen
826632d6a9
C++: Add a test of def overrides
...
The def used in this test is not overridden yet.
2020-09-22 15:54:54 +02:00
Jonas Jensen
d1f453be36
C++: import SimpleRangeAnalysisInternal
...
This ensures that `getFullyConverted{Lower,Upper}Bounds` are available
where they need to be called.
2020-09-22 15:54:54 +02:00
Jonas Jensen
8065bf15ad
C++: Per-variable overrides
...
Without these changes, there was no way to tell which variables were
overridden by a given instance of `SimpleRangeAnalysisDefinition`. All
four overrides are needed because they fit into different mutual
recursions of the `SimpleRangeAnalysis` implementation.
2020-09-22 15:53:22 +02:00
Jonas Jensen
7dce4d0a6e
C++: Rename: name the file the same as the class
2020-09-22 15:48:36 +02:00
Tamás Vajk
54c35748f0
Merge pull request #4193 from tamasvajk/feature/sign-analysis
...
C#: Sign analysis
2020-09-22 15:33:33 +02:00
Anders Schack-Mulligen
66e2ed9b65
Merge pull request #4031 from aibaars/hibernate
...
Add additional Hibernate SQL sinks
2020-09-22 15:29:40 +02:00
Rasmus Lerchedahl Petersen
131cf8d2ec
Python: Fix compilation error
2020-09-22 15:02:31 +02:00
CodeQL CI
036a36a474
Merge pull request #4317 from max-schaefer/js/api-node-depth
...
Approved by asgerf
2020-09-22 05:58:48 -07:00
Mathias Vorreiter Pedersen
535c8cc87e
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-22 13:46:19 +01:00
Erik Krogh Kristensen
717ea2369c
Merge pull request #4311 from erik-krogh/indirect-fix
...
JS: improve join-order for HTTP::isDecoratedCall
2020-09-22 14:35:50 +02:00
CodeQL CI
9a306866c5
Merge pull request #4282 from erik-krogh/es2021
...
Approved by esbena
2020-09-22 05:34:35 -07:00
Geoffrey White
e836bae20f
C++: Tidy up test stl.h a little.
2020-09-22 13:21:50 +01:00
Rasmus Lerchedahl Petersen
b065d8724e
Python: Fixup comments after merge
2020-09-22 13:52:30 +02:00
Rasmus Lerchedahl Petersen
3e2331c87f
Merge branch 'main' of github.com:github/codeql into SharedDataflow_FieldFlow
2020-09-22 13:32:36 +02:00
Jonas Jensen
ee211b02fb
Merge remote-tracking branch 'lcartey/cpp/range-analysis-custom-defs' into range-analysis-custom-defs
2020-09-22 13:27:56 +02:00
Tamas Vajk
5f96c37b28
C#: Fix switch case expression types
2020-09-22 13:16:31 +02:00
Anders Schack-Mulligen
47506a859e
Merge pull request #4287 from joefarebrother/exectainted-array
...
Java: Improve the ExecTainted query
2020-09-22 13:16:05 +02:00
Jonas Jensen
269b7101c0
Merge pull request #4273 from lcartey/cpp/custom-range-analysis-override
...
C++: Support overriding existing simple range analysis bounds
2020-09-22 13:15:05 +02:00
Tamas Vajk
a89d13a5ee
C#: Add change notes for increased required key size in 'cs/insufficient-key-size'
2020-09-22 13:00:45 +02:00
Tom Hvitved
8de57c7d19
C#: Move ASP extraction from auto builder to pre-finalize.{sh,cmd}
2020-09-22 11:55:02 +02:00
Jonas Jensen
e86bc0c6ac
C++: Autoformat fixup
2020-09-22 11:53:05 +02:00
Asger Feldthaus
d34bd51f61
JS: Call codeql.exe instead of codeql.cmd
2020-09-22 10:28:40 +01:00
Asger Feldthaus
bc09bc45bc
JS: Concatenate paths properly
2020-09-22 10:17:30 +01:00
Faten Healy
c35a5d120a
C#: Increasing required size of RSA key to 2048
2020-09-22 11:09:49 +02:00
Tamas Vajk
cc979d0b5f
C#: Add switch case expression type test
2020-09-22 11:04:44 +02:00
Tom Hvitved
71da9045e5
Java/Python: Reduce size of blockPrecedesVar
2020-09-22 11:00:26 +02:00
Erik Krogh Kristensen
32b0f1b480
add code example to isDecoratedCall
2020-09-22 10:42:49 +02:00
Max Schaefer
dafd45f0f4
JavaScript: Add a few metric queries for API graphs.
2020-09-22 09:30:19 +01:00
Max Schaefer
46ba4a1fa8
JavaScript: Expose another useful predicate on API-graph nodes.
2020-09-22 09:30:12 +01:00
Jonas Jensen
5cbf498a2d
Merge pull request #4302 from MathiasVP/fix-field-conflation-after-4230
...
C++: Fix field conflation after #4230
2020-09-22 10:23:17 +02:00
Erik Krogh Kristensen
ec49c444ef
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-22 10:15:30 +02:00
Tamas Vajk
d8176bc00d
C#: Change TrapStackBehaviour of local functions
2020-09-22 09:53:35 +02:00
Tom Hvitved
b6d93ae81d
Merge remote-tracking branch 'upstream/rc/1.25' into merge-rc-1.25
2020-09-22 09:35:39 +02:00
Jonas Jensen
c56d5eb90e
Merge pull request #4295 from rdmarsh2/rdmarsh2/cpp/ir-qualifier-flow
...
C++: Improved qualifier flow in IR taint tracking
2020-09-22 09:23:10 +02:00
Tom Hvitved
83340e2a62
Merge pull request #4212 from hvitved/csharp/path-transformers
...
C#: Implement support for path transformers
2020-09-22 09:20:53 +02:00
Robert Marsh
772a51508f
C++: Update test comment
2020-09-21 16:19:41 -07:00
Robert Marsh
9e3bfe1968
C++: Fix iterator flow context sensitivity
2020-09-21 16:17:16 -07:00
Robert Marsh
913881b17b
C++: Add test for iterator false positive
2020-09-21 16:15:24 -07:00
Jonathan Leitschuh
ab618dcf2f
Java: QL Query Detector for JHipster Generated CVE-2019-16303
2020-09-21 18:46:13 -04:00
Erik Krogh Kristensen
4243504c8b
improve join-order for HTTP::isDecoratedCall
2020-09-21 23:20:16 +02:00
Robert Marsh
947ad02db9
C++: autoformat
2020-09-21 11:38:57 -07:00
Asger Feldthaus
e70bb20f34
JS: Support XML extraction when run with codeql
2020-09-21 17:21:54 +01:00
Rasmus Lerchedahl Petersen
08b51e67c4
Python: Update test annotation
2020-09-21 17:44:36 +02:00
Rasmus Lerchedahl Petersen
73d2d9b1f8
Python: Make constructor calls post-update nodes
2020-09-21 17:32:22 +02:00
Taus
724baaf26a
Merge pull request #4308 from RasmusWL/python-private-import-of-DataFlowPrivate
...
Python: Make import of DataFlowPrivate private
2020-09-21 17:13:48 +02:00
Tom Hvitved
06dbec78f7
C#: Add Guard::controlsBasicBlock() and simplify Guard::isEquality()
2020-09-21 16:15:12 +02:00
Tamas Vajk
8bf4a4209c
C#: Sign analysis
...
Synced between Java and C# through `identical-files.json`.
2020-09-21 16:15:12 +02:00
Rasmus Wriedt Larsen
2f9f51dbd8
Python: Fix tests that use DataFlowPrivate
2020-09-21 16:08:17 +02:00
yoff
557db3381d
Merge pull request #4265 from tausbn/python-add-global-flow-steps
...
Python: Add `ModuleVariableNode` to keep track of global reads and writes
2020-09-21 15:51:19 +02:00
Tom Hvitved
d3ea20cd2c
Merge pull request #4271 from github/matt-gretton-dann/csharp-dont-trace-macos-pkill
...
Don't trace through pkill or pgrep on macOS.
2020-09-21 15:44:48 +02:00
Tamas Vajk
441fbe3215
Add Java test file for sign analysis
2020-09-21 15:07:09 +02:00
Mathias Vorreiter Pedersen
873e871620
C++: Handle more cases in arrayReadStep.
2020-09-21 14:35:37 +02:00
Mathias Vorreiter Pedersen
73cd5ceb80
C++: Accept tests. Due to the removal of overlap between the reads steps there are fewer repeated edges in path explanations.
2020-09-21 14:17:49 +02:00
Rasmus Wriedt Larsen
6aca82fa82
Python: Make import of DataFlowPrivate private
...
Otherwise you are able to use `DataFlow::isExpressionNode` where
`isExpressionNode` is defined in `DataFlowPrivate.qll`.
2020-09-21 13:52:58 +02:00
Taus
9d7a2d2b5d
Merge branch 'main' into python-add-global-flow-steps
2020-09-21 13:50:20 +02:00
Anders Schack-Mulligen
4a3118b13e
Merge pull request #4246 from RasmusWL/java-fix-ssa-varBlockReaches
...
Java: Minor fixup for SSA AdjacentUsesImpl::varBlockReaches
2020-09-21 13:28:20 +02:00
CodeQL CI
016e6d2001
Merge pull request #4275 from erik-krogh/CVE760-indirect
...
Approved by esbena
2020-09-21 04:09:51 -07:00
Mathias Vorreiter Pedersen
62d42f20d9
C++: use(x) is no longer an array read.
2020-09-21 12:46:03 +02:00
Rasmus Wriedt Larsen
233dd43635
Java: Port varBlockReaches fix to BaseSSA.qll
2020-09-21 12:11:25 +02:00
Taus Brock-Nannestad
1d6558b4e8
Python: Add a bit more documentation to ModuleVariableNode
2020-09-21 11:46:18 +02:00
Mathias Vorreiter Pedersen
c560c7584c
C++: Add QLDoc for BufferMayWriteSideEffectFieldStoreQualifierNode
2020-09-21 11:08:06 +02:00
Mathias Vorreiter Pedersen
49dd576352
C++: Add more tests
2020-09-21 10:59:16 +02:00
Erik Krogh Kristensen
4571ba38a5
add change-note for es2021
2020-09-21 10:51:36 +02:00
Erik Krogh Kristensen
4bc91c4439
add support for Promise.any
2020-09-21 10:50:06 +02:00
Erik Krogh Kristensen
9f1b3d61b9
add test for numeric separators
2020-09-21 10:50:06 +02:00
Erik Krogh Kristensen
b09015380a
add support for String.prototype.replaceAll
2020-09-21 10:50:04 +02:00
Erik Krogh Kristensen
0dbdbfa659
bump extractor version
2020-09-21 10:49:50 +02:00
Erik Krogh Kristensen
87d4e13584
added support for ES2021 assignment operators
2020-09-21 10:49:50 +02:00
Erik Krogh Kristensen
9e7a1934ea
add express and HTTP to change-notes
2020-09-21 10:45:43 +02:00
Erik Krogh Kristensen
4dfc0680e2
support non SourceNode receiver for partialInvoke in routeHandlerStep
2020-09-21 10:42:19 +02:00
Erik Krogh Kristensen
4cde48cfb8
change comma to dot in qldoc
2020-09-21 10:23:21 +02:00
Erik Krogh Kristensen
edebbd640e
revert change to return-type
2020-09-21 10:18:22 +02:00
Mathias Vorreiter Pedersen
6dd7675a97
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-21 09:31:30 +02:00
Erik Krogh Kristensen
6c050d3160
revert change of return-type
2020-09-20 22:21:42 +02:00
Erik Krogh Kristensen
ae228cb5b2
move new predicates to a more fitting location
2020-09-20 22:15:03 +02:00
Erik Krogh Kristensen
5fd4c7a422
use PartialInvokeNode
2020-09-20 22:06:48 +02:00
Erik Krogh Kristensen
bef09254ee
rename forwardingCall to isAForwardingRouteHandlerCall
2020-09-20 21:59:33 +02:00
Erik Krogh Kristensen
62332121b2
remove getNumParameter constraint
2020-09-20 21:57:55 +02:00
Erik Krogh Kristensen
3aaa2d11a7
rename decoratedRouteHandler to isDecoratedCall
2020-09-20 21:54:56 +02:00
Rasmus Lerchedahl Petersen
9aa0cfb35c
Python: class callable -> class call
...
Only have one type of callable, but have an extra type of call.
A constructor call directs to an init callable
(should also handle `call` overrides at some point).
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
b2f1c435a8
Python: update test expectations
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
e132361736
Python: Add missing .expected file
2020-09-19 22:27:11 +02:00
Rasmus Lerchedahl Petersen
e50b66554d
Python: Add explorative test
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
aa28167177
Python: Add malloc nodes
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
27b25565ca
Python: Implement field-stores, -reads, and -content
2020-09-19 22:27:10 +02:00
Rasmus Lerchedahl Petersen
a2d006fe47
Python: Tests for field flow
2020-09-19 22:27:10 +02:00
Robert Marsh
6b3557ec58
C++: cache localAdditionalTaintStep
2020-09-18 15:42:14 -07:00
Robert Marsh
bc3e74f7d6
Merge branch 'main' into rdmarsh2/cpp/ir-qualifier-flow
...
Fix test conflicts
2020-09-18 15:40:43 -07:00
Robert Marsh
12be90a6af
C++: remove unneeded cast
2020-09-18 15:00:01 -07:00
Robert Marsh
c179a07fc7
C++: fix constructor models
2020-09-18 14:43:39 -07:00
Robert Marsh
bd7f5a41d1
C++: autoformat
2020-09-18 14:19:29 -07:00
Robert Marsh
b84bf5e9bb
C++: QLDoc for IteratorPartialDefinitionNode
2020-09-18 14:18:38 -07:00
Robert Marsh
107e9770da
C++: remove accidentally committed test code
2020-09-18 14:12:33 -07:00
Tom Hvitved
d867172d27
Merge pull request #4300 from hvitved/csharp/runtime-checks-bypass-bad-magic
...
C#: Avoid bad magic in `RuntimeChecksBypass.ql`
2020-09-18 19:40:34 +02:00
Taus Brock-Nannestad
11c85f0fb5
Python: Clean up various jump/local data flow steps
...
Removes steps from `ModuleVariableNode`s from `essaFlowStep`, and
instead puts them only in `jumpStep`. This cleans up the logic a bit.
This slightly broke the type tracker implementation (as it relied on
`essaFlowStep` being fairly liberal), so I have rewritten it to
explicitly rely on just familiar predicates for local and jump steps.
Additionally, we disallow Essa-to-Essa steps where exactly one of the
two nodes corresponds to a global variable (i.e. only local-local and
global-global steps).
2020-09-18 18:14:47 +02:00
Mathias Vorreiter Pedersen
53da751b15
C++: Accept tests
2020-09-18 17:12:27 +02:00
Mathias Vorreiter Pedersen
b6b17fe95e
C++: Add a read and store step that replace ArrayContent with FieldContent when we realize that the target of a store is a field.
2020-09-18 17:12:09 +02:00
Joe
9baf2b9eff
Fix cartesian product
2020-09-18 15:42:03 +01:00
Tom Hvitved
dff9f8264b
Merge pull request #4296 from hvitved/csharp/useless-upcast-nomagic
...
C#: Avoid bad magic in `UselessUpcast.ql`
2020-09-18 16:24:20 +02:00
Joe
abb1731be7
Java: Simplify the implementation of ExecTainted
2020-09-18 15:21:03 +01:00
Anders Schack-Mulligen
b3bf570fb7
Merge pull request #4301 from lcartey/java/update-cwe-claims
...
Java: Update some CWE claims
2020-09-18 16:08:40 +02:00
Joe
3cc38feebc
Fix a couple of typos in QLDoc comments
2020-09-18 14:51:38 +01:00
Mathias Vorreiter Pedersen
b4edbe4773
Merge pull request #4298 from MathiasVP/field-conflation-with-array-content
...
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 15:16:33 +02:00
Anders Schack-Mulligen
4f9d2f118d
Merge pull request #4288 from joefarebrother/printAST-java
...
Java: Add a container node for Imports in the PrintAst view
2020-09-18 14:17:26 +02:00
Tom Hvitved
aac2e0ebfb
C#: Avoid bad magic in RuntimeChecksBypass.ql
...
Before:
```
[2020-09-18 14:03:57] (2587s) Tuple counts for RuntimeChecksBypass::uncheckedWrite#bbf#antijoin_rhs#1:
1270 ~8% {2} r1 = SCAN RuntimeChecksBypass::uncheckedWrite#bbf#shared AS I OUTPUT I.<1>, I.<0>
188197390 ~0% {3} r2 = JOIN r1 WITH #Callable::Callable::calls_dispred#bfPlus AS R ON FIRST 1 OUTPUT R.<1>, r1.<1>, r1.<0>
2425784042 ~1% {3} r3 = JOIN r2 WITH Expr::Expr::getEnclosingCallable_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, R.<1>, r2.<2>
58 ~9% {2} r4 = JOIN r3 WITH project#RuntimeChecksBypass::checkedWrite#bfff AS R ON FIRST 2 OUTPUT r3.<0>, r3.<2>
return r4
```
After:
```
[2020-09-18 14:08:48] (5s) Tuple counts for RuntimeChecksBypass::uncheckedWrite#fff#antijoin_rhs:
24704473 ~2% {2} r1 = SCAN DataFlowPublic::localExprFlow#ff AS I OUTPUT I.<1>, I.<0>
23784154 ~6% {4} r2 = JOIN r1 WITH Expr::Expr::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r1.<1>, 28, R.<0>, R.<1>
201391 ~2% {2} r3 = JOIN r2 WITH expressions AS R ON FIRST 2 OUTPUT r2.<2>, r2.<3>
23784154 ~0% {3} r4 = JOIN r1 WITH Expr::Expr::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<0>, R.<1>
1065242 ~20% {2} r5 = JOIN r4 WITH expr_value AS R ON FIRST 1 OUTPUT r4.<1>, r4.<2>
1266633 ~16% {2} r6 = r3 \/ r5
return r6
```
2020-09-18 14:15:30 +02:00
Jonas Jensen
6463a94258
Merge pull request #4297 from github/igfoo/compileTimeConstantInt
...
C++: Improve `compileTimeConstantInt`
2020-09-18 13:58:16 +02:00
lcartey@github.com
2c6f587ee9
Java: Add coverage claim for CWE 193 (off by one)
2020-09-18 12:51:24 +01:00
lcartey@github.com
39200566c3
Java: Update CWE claims for XXE.
...
This matches the claims in the C# equivalent.
2020-09-18 12:30:52 +01:00
Mathias Vorreiter Pedersen
b40941b89c
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 13:23:23 +02:00
Tom Hvitved
4090859207
C#: Avoid bad magic in UselessUpcast.ql
2020-09-18 12:14:52 +02:00
Joe
3258134098
Java: Remove superfluous conjunct
2020-09-18 10:41:06 +01:00
lcartey@github.com
32f43a84be
Java: Add CWE 564 (SQL Injection: Hibernate)
2020-09-18 10:20:21 +01:00
Jonas Jensen
c67605f15c
Merge pull request #4230 from MathiasVP/mathiasvp/array-field-flow
...
C++: Replace `field -> object` taint rule with `ArrayContent` dataflow
2020-09-18 10:56:51 +02:00
Mathias Vorreiter Pedersen
8c615ece8a
Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
...
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-18 10:18:21 +02:00
Mathias Vorreiter Pedersen
3ef6e8a580
Merge pull request #4283 from geoffw0/stringstream4
...
C++: Model getline
2020-09-18 10:17:47 +02:00
Erik Krogh Kristensen
0b16f81f8b
improve performance by using RouteHandlerCandidate
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
b4e75bf567
update expected output
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
1f95311342
further loosen the RouteHandlerCandidate heuristic
2020-09-18 09:29:13 +02:00
Erik Krogh Kristensen
3eaa56ed60
support containers with decorated route handlers
2020-09-18 09:29:08 +02:00
Erik Krogh Kristensen
c087e94d47
add additional indirect route-handler steps
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
02c1d689e4
support indirect route-handlers for NodeJS
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
dafcd59148
add another indirect route-handler test
2020-09-18 09:26:33 +02:00
Erik Krogh Kristensen
43e5c0212c
add basic support for indirect route handlers
2020-09-18 09:26:33 +02:00
Robert Marsh
3a83cc71fe
C++: use qualifier flow in more models
2020-09-17 18:03:02 -07:00
Robert Marsh
556ace004f
C++: use qualifiers in string constructor model
2020-09-17 17:39:50 -07:00
Robert Marsh
6b7b64d7be
C++: IR data and taint flow through qualifiers
2020-09-17 17:10:11 -07:00
Robert Marsh
f73ff988e0
C++: improve cast and ptr handling in taint test
2020-09-17 16:55:36 -07:00
Mathias Vorreiter Pedersen
c6ff805a07
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-17 21:13:02 +02:00
Robert Marsh
3d07ba9d0b
Merge pull request #4290 from MathiasVP/mathiasvp/fix-join-order-in-single-field-flow
...
C++: Fix bad join order introduced by #4270
2020-09-17 14:52:59 -04:00
Mathias Vorreiter Pedersen
8e1d9e0996
C++: Fix bad join order introduced by #4270
2020-09-17 19:23:01 +02:00
Joe
9c643ec1cd
Java: Fix formatting
2020-09-17 17:46:05 +01:00
Joe
69fd579dfd
Java: Fix QLDoc
2020-09-17 17:37:16 +01:00
Joe
2da6234317
Java: Fix QLDoc
2020-09-17 17:31:24 +01:00
Joe
6d0df7cb3a
Java: Add a container node for Imports in the PrintAst view
2020-09-17 17:29:36 +01:00
Joe
810baad63f
Java: Fix formatting
2020-09-17 17:13:55 +01:00
Joe
fcfc836720
Java: Add tests for ExecTainted
2020-09-17 16:47:55 +01:00
Joe
b6cf1cce20
Java: Make the equivalent changes to ExecTaintedLocal
2020-09-17 15:53:04 +01:00
Joe
6bfc0afaeb
Java: Improve the ExecTainted query
2020-09-17 15:39:35 +01:00
Ian Lynagh
c7b6374e55
C++: Improve compileTimeConstantInt
...
It is possible for the frontend to make
(bool)e
where e has a constant value 0, but the (implicit) cast has no constant
value. This was causing us to not understand assume(0) correctly.
Now compileTimeConstantInt will handle casts itself if necessary.
2020-09-17 14:51:50 +01:00
Geoffrey White
5cc11f1c44
C++: Additional model for 'this' flow through chains.
2020-09-17 14:12:30 +01:00
Geoffrey White
73399cb5f7
C++: Model GetLine.
2020-09-17 14:05:43 +01:00
Geoffrey White
2c15e6f934
C++: Add test cases.
2020-09-17 13:43:07 +01:00
Mathias Vorreiter Pedersen
63afe1da78
Merge pull request #4276 from geoffw0/stringstream3
...
C++: More stringstream models.
2020-09-17 14:19:52 +02:00
Taus Brock-Nannestad
f93c44a688
Python: Fix typo
2020-09-17 13:26:55 +02:00
Taus Brock-Nannestad
1d462ae156
Python: Fix misnamed variable.
2020-09-17 13:22:27 +02:00
Taus Brock-Nannestad
797ac23db7
Python: Clean up global flow test
2020-09-17 13:20:58 +02:00
Geoffrey White
4d6125841d
C++: Clean up multiply defined functions.
2020-09-17 11:48:26 +01:00
Geoffrey White
c17ae3ad6c
C++: Correct dataflow for return (*this).
2020-09-17 11:34:10 +01:00
Taus Brock-Nannestad
9458861b18
Python: Add missing global flow test
2020-09-17 12:04:30 +02:00
Robert Marsh
691d0f3fb2
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Fix merge conflict in test expectations
2020-09-16 13:52:59 -07:00
Robert Marsh
44c5233459
C++: accept test output
2020-09-16 12:49:15 -07:00
Robert Marsh
086d074a26
C++: make PartialDefinition abstract
2020-09-16 12:48:38 -07:00
Robert Marsh
fa0e27b2de
C++: move interprocedural iterator flow to taint
2020-09-16 12:34:52 -07:00
Taus Brock-Nannestad
ee76d9b33d
Python: Clean up tests
2020-09-16 19:04:27 +02:00
Taus
e179df7c43
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-16 18:21:50 +02:00
Geoffrey White
86404af501
Merge pull request #4270 from MathiasVP/mathiasvp/single-field-flow-fix-cwe190test
...
C++: Use underlying type when checking whether a type is a single-field struct.
2020-09-16 17:21:07 +01:00
Geoffrey White
f1a9547b38
C++: Split off putback.
2020-09-16 16:44:39 +01:00
Taus
4b423feef9
Merge pull request #4245 from RasmusWL/python-dataflow-dynamic-tuple-tests
...
Python: Add dataflow tests for dynamic tuple creation
2020-09-16 15:19:41 +02:00
CodeQL CI
c2175b678c
Merge pull request #4263 from erik-krogh/importScripts
...
Approved by esbena
2020-09-16 06:01:35 -07:00
Mathias Vorreiter Pedersen
3520b86771
C++: Accept test changes.
2020-09-16 14:51:11 +02:00
Taus Brock-Nannestad
2d3e23ebb0
Python: Cleanup, docs, and an extra test case
2020-09-16 14:46:04 +02:00
Geoffrey White
eedbe839b5
C++: Update change note.
2020-09-16 13:45:05 +01:00
Geoffrey White
c4de071a4c
C++: Flow through swap.
2020-09-16 13:39:07 +01:00
Geoffrey White
eb7bd6e176
C++: Flow through putback.
2020-09-16 13:39:07 +01:00
Geoffrey White
7cc60a30a6
C++: Flow through get, peek, read, readsome.
2020-09-16 13:36:41 +01:00
Geoffrey White
56390c1aef
C++: Flow through operator>>.
2020-09-16 13:32:13 +01:00
Mathias Vorreiter Pedersen
3026eb4b85
Revert "C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll"
...
This reverts commit 0b97a4a182 .
2020-09-16 14:26:01 +02:00
Mathias Vorreiter Pedersen
92d81edae6
Revert "C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now."
...
This reverts commit 78b24b76a0 .
2020-09-16 14:25:42 +02:00
Tamás Vajk
5079deb92a
Merge pull request #4268 from tamasvajk/feature/java-range-analysis-fn
...
Java: Fix range analysis false negative
2020-09-16 11:08:33 +02:00
Mathias Vorreiter Pedersen
0b97a4a182
C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll
2020-09-16 10:54:23 +02:00
Joe Farebrother
4f70af500c
Merge pull request #4261 from joefarebrother/printAST-java
...
Java: Add PrintAst
2020-09-16 09:46:19 +01:00
Mathias Vorreiter Pedersen
7b456d6162
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-16 10:45:31 +02:00
Rasmus Wriedt Larsen
d828bc5f3a
Merge pull request #4251 from yoff/SharedDataflow_BarrierGuards
...
Python: Implement `BarrierGuard`
2020-09-16 10:00:26 +02:00
Mathias Vorreiter Pedersen
c8a3baf356
Merge pull request #4272 from jbj/dataflow-partial-access
...
C++: Add AST flow through arrays
2020-09-16 09:29:39 +02:00
Rasmus Lerchedahl Petersen
e46ae9b98d
Python: Move some query predicates to debug
2020-09-15 21:45:47 +02:00
Matthew Gretton-Dann
17bd678699
Merge pull request #4140 from github/matt-gretton-dann/fix-deleted-constructors
...
Update tests for extractor changes with ctors
2020-09-15 19:34:42 +01:00
Matthew Gretton-Dann
795bf0d93c
Update tests for extractor changes with ctors
2020-09-15 17:58:37 +01:00
Matthew Gretton-Dann
9296a12a91
Merge pull request #4260 from github/igfoo/coroutines
...
C++: Add coroutines* tables
2020-09-15 17:39:38 +01:00
Taus Brock-Nannestad
7cdd290b90
Python: Disregard module-time reads.
2020-09-15 18:25:24 +02:00
Joe
7e9b1a2975
Java: PrintAst: Fix more formatting issues
2020-09-15 17:15:00 +01:00
Ian Lynagh
a912a328a2
C++: Add an upgrade script
2020-09-15 15:36:19 +01:00
Ian Lynagh
56388b57bd
C++: Update stats for new coroutines* tables
2020-09-15 15:36:19 +01:00
Ian Lynagh
99c4bc5175
C++: Add coroutine metadata tables
2020-09-15 15:36:19 +01:00
lcartey@github.com
eaea860d3e
C++: Test for overriding existing simple range analysis ranges.
2020-09-15 15:34:48 +01:00
Jonas Jensen
78560833a1
C++: Add a test distilled from real code
...
Author: @rvermeulen.
The consistency warnings go away because `sink` is defined with a body
in this file.
2020-09-15 16:24:37 +02:00
Joe
3be8fa5155
Java: PrintAst: Fix formatting
2020-09-15 15:10:56 +01:00
Mathias Vorreiter Pedersen
50ad4cfec4
C++: Add comments to {Array,Pointer}StoreNode and arrayStoreStepChi.
2020-09-15 16:03:21 +02:00
Joe
28338eb32e
Java: PrintAst: Various minor fixes of typos
...
Fix references to C#
Fix getAPrimaryQlClass for JavadocTag
Fix typo for Import
Update test outputs
2020-09-15 15:02:56 +01:00
Jonas Jensen
b3c50aed5e
Merge pull request #4262 from github/igfoo/location
...
C++: Deprecate Location subclasses
2020-09-15 15:49:36 +02:00
Joe
53ab8dac06
Java: PrintAst: Fix failing tests
2020-09-15 14:45:48 +01:00
Joe
112b6d28a1
Java: PrintAst: Handle multiple javadocs in one element correctly
2020-09-15 14:45:48 +01:00
Joe
e38b583ec4
Java: PrintAst: Add tests
2020-09-15 14:45:48 +01:00
Joe
b73e7d8390
Java: PrintAST: Support Javadoc
2020-09-15 14:45:48 +01:00
Joe
c3320eeb3c
Java: Improve getAPrimaryQlClass
...
Implement it for more types
Fix typos
2020-09-15 14:45:48 +01:00
Joe
908f025888
Java: PrintAst: Fix a couple of issues related to Annotations
2020-09-15 14:45:48 +01:00
Joe
c20f802666
Java: PrintAst: Supprt generic parameters
2020-09-15 14:45:48 +01:00
Joe
19af3e5e30
Java: Add PrintAST
2020-09-15 14:45:48 +01:00
lcartey@github.com
084992d40b
C++: Support overriding existing range bounds
...
The current support only allows the user to supply bounds for previously
unsupported expressions or for variable accesses. This commit allows
SimpleRangeAnalysisExprs to override built-in range definitions.
2020-09-15 14:43:34 +01:00
Anders Schack-Mulligen
159353d545
Merge pull request #4269 from joefarebrother/PrintAST-java-rename
...
Java: Rename PrintAst.qll to PrettyPrintAst.qll
2020-09-15 15:43:24 +02:00
Jonas Jensen
bdce24735c
C++: Add flow through arrays
...
This works by adding data-flow edges to skip over array expressions when
reading from arrays. On the post-update side, there was already code to
skip over array expressions when storing to arrays. That happens in
`valueToUpdate` in `AddressFlow.qll`, which needed just a small tweak to
support assignments with non-field expressions at the top-level LHS,
like `*a = ...` or `a[0] = ...`.
The new code in `AddressFlow.qll` is copy-pasted from `EscapesTree.qll`,
and there is already a note in these files saying that they share a lot
of code and must be maintained in sync.
2020-09-15 14:46:11 +02:00
Matthew Gretton-Dann
99fd323ded
Don't trace through pkill or pgrep on macOS.
2020-09-15 13:37:22 +01:00
Taus Brock-Nannestad
2e737eda1e
Python: Add a few function-local import tests
2020-09-15 14:25:26 +02:00
Taus Brock-Nannestad
d5e9f36747
Python: Add "enclosing callable" for ModuleVariableNode
...
I've named this `DataFlowModuleScope` since it's not really a
callable (and all of the relevant methods are empty anyway).
2020-09-15 14:23:20 +02:00
Jonas Jensen
27b8dc2b13
C++: Add tests for flow through arrays
2020-09-15 14:19:34 +02:00
Mathias Vorreiter Pedersen
3005f252ca
C++: Fix annotation
2020-09-15 13:34:50 +02:00
Mathias Vorreiter Pedersen
0ba72c6685
C++: Accept changes.
2020-09-15 12:49:22 +02:00
Mathias Vorreiter Pedersen
265a641d06
C++: Use the underlying type to check whether a type is a single-field struct.
2020-09-15 12:49:16 +02:00
CodeQL CI
951e3093d2
Merge pull request #4231 from erik-krogh/CVE767
...
Approved by asgerf
2020-09-15 03:47:40 -07:00
Mathias Vorreiter Pedersen
d18dd5ab09
C++: Add testcase demonstrating the underlying problem in 6ca9c449af.
2020-09-15 12:32:15 +02:00
Joe
efe3ac0a37
Java: Rename the existing file called PrintAst.qll
2020-09-15 11:30:56 +01:00
Erik Krogh Kristensen
2de94abe9f
Merge pull request #4244 from erik-krogh/badJQueryJoin
...
JS: Fix Bad join orders in UnsafeJQueryPlugin
2020-09-15 12:29:25 +02:00
Erik Krogh Kristensen
fa255f3534
add test for self.importScripts(..)
2020-09-15 12:23:48 +02:00
Jonas Jensen
25412da845
Merge pull request #4253 from geoffw0/stringstream2
...
C++: Model more stringstream features
2020-09-15 12:19:26 +02:00
Erik Krogh Kristensen
cc5109d693
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-15 12:14:51 +02:00
Tamas Vajk
23a9d0764e
Java: Fix range analysis false negative
2020-09-15 12:09:05 +02:00
Mathias Vorreiter Pedersen
1fbb0fbf54
Merge pull request #4266 from geoffw0/cwe190tests
...
C++: CWE-190 Tests.
2020-09-15 12:08:00 +02:00
Tamas Vajk
c66473cb8a
Java: Add test for range analysis
2020-09-15 12:07:30 +02:00
Asger Feldthaus
d728c3948c
JS: Log the amount of memory passed to TypeScript process
2020-09-15 09:17:42 +01:00
Tom Hvitved
d095d6b56b
Merge pull request #4139 from hvitved/csharp/cfg/foreach-loop-empty
...
C#: Skip `foreach` loop bodies in the CFG when the iteration expression is empty
2020-09-15 09:30:29 +02:00
Robert Marsh
5f2cafc4f5
C++: Interprocedural iterator flow
2020-09-14 14:36:19 -07:00
Erik Krogh Kristensen
c5b5a4fd55
improve performance of NodeJS::NodeModule::exports
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
c1cb19abd7
add level PreCallGrapSteps to the callgraph
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
f2ecb63e5a
add a direct Export step as a PreCallGraphStep
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
29457c52dc
add reexported test to PackageExports test
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
61f6580d1e
add API in PackageExports.qll for getting a value exported under a name
2020-09-14 23:28:35 +02:00
Erik Krogh Kristensen
d3653b3030
add support for re-exports using the spread operator for NodeJS exports
2020-09-14 23:28:35 +02:00
Mathias Vorreiter Pedersen
0c14e2b69a
C++: Fix annotations in taint.cpp
2020-09-14 23:08:50 +02:00
Mathias Vorreiter Pedersen
3e56db7f83
C++: Make fieldReadStep private
2020-09-14 20:52:55 +02:00
Mathias Vorreiter Pedersen
7cd6137b34
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-14 20:45:06 +02:00
Geoffrey White
6ca9c449af
C++: Add a test demonstrating the recent regression.
2020-09-14 17:55:20 +01:00
Rasmus Lerchedahl Petersen
839cd829ce
Python: Fix formatting
2020-09-14 18:48:55 +02:00
Taus Brock-Nannestad
3727c48227
Python: Record test changes
...
Some of the places where flow has disappeared look a bit suspect, so I
don't consider this to be the final word on these tests.
2020-09-14 18:12:20 +02:00
Taus Brock-Nannestad
0bb726f21c
Python: Fix up merge weirdness
2020-09-14 17:57:45 +02:00
yoff
5efc06da2c
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-14 17:08:39 +02:00
Rasmus Lerchedahl Petersen
4c02852358
Python: add missing * (and a rename)
2020-09-14 16:56:46 +02:00
Erik Krogh Kristensen
03a3c4f4b2
update expected output
2020-09-14 16:50:47 +02:00
Erik Krogh Kristensen
f4f96ce04d
use new source in client-side-url-redirect test
2020-09-14 16:50:47 +02:00
Erik Krogh Kristensen
cb7de2714a
add onmessage handlers registered using global property as PostMessageEventHandler
2020-09-14 16:50:45 +02:00
Asger F
c106b6777c
Merge pull request #4254 from asgerf/js/bump-extractor-version-string
...
JS: Bump extractor version string
2020-09-14 15:17:29 +01:00
Erik Krogh Kristensen
283be19201
add change-note for importScripts
2020-09-14 16:02:34 +02:00
Erik Krogh Kristensen
6e84ac8e6c
add test for importScripts
2020-09-14 16:02:34 +02:00
Erik Krogh Kristensen
2e3df74dce
add importScripts as a sink for js/client-side-unvalidated-url-redirection
2020-09-14 16:02:34 +02:00
Geoffrey White
22097a9e13
C++: Add some CWE-190 tests I had lying around.
2020-09-14 14:39:02 +01:00
Rasmus Lerchedahl Petersen
ecc5a4a1f6
Python: testIsTrue -> branch
2020-09-14 15:32:03 +02:00
yoff
2a4e28db16
Apply suggestions from code review
...
Will make the same renames in the changed code also..
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-14 15:28:01 +02:00
Rasmus Lerchedahl Petersen
033529e85e
Python: avoid creating big predicate
2020-09-14 15:24:46 +02:00
Taus Brock-Nannestad
e197f52b6d
Merge branch 'main' into python-add-global-flow-steps
2020-09-14 15:13:07 +02:00
Taus Brock-Nannestad
0b641c5ce9
Python: Update type tracking and strange-essaflow tests
2020-09-14 15:05:16 +02:00
Taus Brock-Nannestad
5fb33c90bc
Python: Add ModuleVariableNode to dataflow
2020-09-14 14:57:32 +02:00
Rasmus Lerchedahl Petersen
543876f980
Python: Fix getAGuardedNode
2020-09-14 14:46:15 +02:00
Ian Lynagh
826c40fcac
C++: Deprecate Location subclasses
...
The main Location class should always be used.
2020-09-14 13:14:18 +01:00
Tamás Vajk
d21c101c0d
Merge pull request #4041 from tamasvajk/feature/update-roslyn
...
C#: upgrade Roslyn dependencies to version 3.7
2020-09-14 13:57:36 +02:00
Tamás Vajk
f5f4b8e25b
C#: Enable nullability of Semmle.Extraction.CSharp.Standalone ( #4115 )
2020-09-14 13:43:57 +02:00
Rasmus Wriedt Larsen
637ea4ad6f
Merge pull request #4226 from RasmusWL/python-missing-1.25-change-notes
...
Python: Add missing 1.25 change notes
2020-09-14 13:18:24 +02:00
Tom Hvitved
0fb9dc5bac
C#: Adjust caching of tuple types
2020-09-14 11:24:46 +02:00
Geoffrey White
6b035df660
C++: Repair taint flow from previous.
2020-09-14 10:21:43 +01:00
Tom Hvitved
e549377561
C#: Construct File::TransformedPathLazy lazily
...
This avoids calling the path transformer for `GeneratedFile`s.
2020-09-14 11:03:00 +02:00
Tom Hvitved
19746023d9
C#: Tidy code for constructing underlying tuple structs
2020-09-14 10:08:58 +02:00
Erik Krogh Kristensen
6fb534f178
fix catastrophic join order in UnsafeJQueryPlugin
2020-09-14 09:59:48 +02:00
Erik Krogh Kristensen
9502869e3c
improve join-order for aliasPropertyPresenceStep
2020-09-14 09:59:22 +02:00
Jonas Jensen
021aa647c1
Merge pull request #4142 from MathiasVP/mathiasvp/read-step-without-memory-operands
...
C++: Use IR alias analysis for field flow
2020-09-14 09:37:27 +02:00
Mathias Vorreiter Pedersen
78b24b76a0
C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now.
2020-09-14 09:26:41 +02:00
Mathias Vorreiter Pedersen
34a57e2bd4
Merge pull request #4252 from jbj/normalize-bounds
...
C++: SimpleRangeAnalysis: Always normalize bounds after a computation
2020-09-14 09:16:32 +02:00
Faten Healy
6f20516f84
Update broken_crypto.py to AES instead of Blowfish
2020-09-13 21:07:28 +10:00
Faten Healy
826fc0a630
Update BrokenCryptoAlgorithm - Blowfish to AES
2020-09-13 21:04:07 +10:00
Asger Feldthaus
1d92cbb655
JS: Bump extractor version string
2020-09-12 09:22:12 +01:00
Taus Brock-Nannestad
e0f5b208da
Python: Fix broken test of global typetracker flow
...
The missing `global g` annotation meant `g = x` was interpreted as a
local assignment.
2020-09-11 18:17:25 +02:00
lcartey@github.com
eb5782d908
C++: Support customizable ranges for RangeSsaDefinitions.
2020-09-11 17:12:10 +01:00
Geoffrey White
b404a339a4
C++: Correct isQualifierObject -> isQualifierAddress.
2020-09-11 16:15:47 +01:00
Jonas Jensen
fee7ce6c7f
Merge pull request #4221 from rajivshah3/fix/cpp-av-32-include
...
C++: Allow .inc files to be included
2020-09-11 16:53:43 +02:00
Geoffrey White
d3ca140eeb
C++: Account for pointer / reference parameters to operator<<.
2020-09-11 15:20:54 +01:00
Rasmus Lerchedahl Petersen
0eb8b6c7b0
Python: Address review
2020-09-11 14:24:49 +02:00
Calum Grant
3414063f2e
Update change-notes/1.25/analysis-python.md
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2020-09-11 13:16:26 +01:00
CodeQL CI
903bc007b8
Merge pull request #4082 from max-schaefer/js/api-graph
...
Approved by asgerf
2020-09-11 04:41:38 -07:00
Jonas Jensen
172becd67f
Merge pull request #4250 from lcartey/cpp/expose-getdefbounds
...
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 13:26:08 +02:00
Mathias Vorreiter Pedersen
2d57abdcbe
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-11 12:47:29 +02:00
Geoffrey White
d648150322
C++: Autoformat.
2020-09-11 11:14:58 +01:00
Geoffrey White
dd53e3fe65
C++: Fix data flow to return value.
2020-09-11 11:14:58 +01:00
Geoffrey White
597757d76f
C++: Model std::stringstream put and write.
2020-09-11 11:14:57 +01:00
Geoffrey White
66a5c38eef
C++: Model std::stringstream constructor.
2020-09-11 11:14:57 +01:00
Jonas Jensen
ad11f76ec6
C++: Always normalize bounds after a computation
...
This stops some cases of `-0.0` from propagating through the range
analysis, fixing a false positive on arvidn/libtorrent.
There seems to be no need for a corresponding change in the caller of
`getDefLowerBoundsImpl` since that predicate only contains computations
that cannot introduce negative zero.
2020-09-11 11:59:00 +02:00
Rasmus Lerchedahl Petersen
5dbb4af5b5
Python: Implement BarrierGuard
2020-09-11 11:55:51 +02:00
Jonas Jensen
0c8e06ba68
C++: Tests for -0.0 in range analysis
2020-09-11 11:52:39 +02:00
Tom Hvitved
6c5b30d2a4
C#: Update CIL consistency test
2020-09-11 11:49:07 +02:00
Tom Hvitved
f225a17639
C#: Even more reflection for retrieving meta data handle
2020-09-11 11:49:07 +02:00
lcartey@github.com
65d48a32b8
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 09:49:18 +01:00
Tamas Vajk
d60b7c7297
C#: Improve empty collection check to not report on collections with property writes
2020-09-11 10:46:34 +02:00
Mathias Vorreiter Pedersen
ff09104089
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-11 09:25:50 +02:00
Mathias Vorreiter Pedersen
399da6837a
Merge pull request #4227 from jbj/SimpleRangeAnalysis-NotExpr
...
C++: Support `(bool)x` and `!x` in SimpleRangeAnalysis
2020-09-11 08:59:03 +02:00
Bas van Schaik
31495b876e
Python script to generate lists of code scanning queries in CSV format ( #4177 )
...
* Create a PowerShell script that can be used to report on the set of queries inside of a particular QL Suite.
* Translate PowerShell script into Python
* support running this script from anywhere within the CodeQL git repo
* print non-fatal error if metadata is not available
* make sure warning about missing pack is printed to stderr
* only run on pushes against main and rcs
* detect repo by checking remote, rather than first SHA
* specify full sha of dsaltares/fetch-gh-release-asset
* trigger workflow on PR that modifies paths of interest
Co-authored-by: Justin Hutchings <jhutchings1@users.noreply.github.com >
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2020-09-10 12:25:02 -07:00
Rasmus Wriedt Larsen
52d8f7d395
Merge pull request #4235 from yoff/SharedDataflow_UseUseFlow
...
Python: Port use-use implementation from Java
2020-09-10 16:12:28 +02:00
Rasmus Lerchedahl Petersen
92e7a5676d
Python: Address review comments
2020-09-10 15:17:30 +02:00
yoff
3a19b1e7fd
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-09-10 15:06:06 +02:00
Tom Hvitved
2cc635f7e0
C#: Add DB upgrade script
2020-09-10 14:09:40 +02:00
Tom Hvitved
01e766c745
C#: Disable uniqueness constraint from explicitly_implements
...
The documentation on `ExplicitInterfaceImplementations` says "Properties
imported from metadata can explicitly implement more than one property", so
the constraint appears to be invalid.
2020-09-10 14:05:37 +02:00
Tamas Vajk
643a8b57c3
C#: Explicitly handle underlying tuple types
2020-09-10 14:05:37 +02:00
Tamas Vajk
221b92de04
C#: upgrade Roslyn dependencies to version 3.7
2020-09-10 13:53:39 +02:00
Rasmus Wriedt Larsen
fb3060dc3d
Java: Minor fixup for SSA AdjacentUsesImpl::varBlockReaches
...
This should not change anything in regards to correctness overall -- what we
really care about is `varBlockStep`, and that checks `varOccursInBlock(v, b2)`.
However, the comment is a bit easier to read together with the code
now (and probably also gives slightly smaller predicate result size).
2020-09-10 13:47:36 +02:00
Rasmus Wriedt Larsen
949b81b07c
Python: Add dataflow tests for dynamic tuple creation
...
Inspired by the FP-report in https://github.com/github/codeql/issues/4239
2020-09-10 13:44:48 +02:00
Rasmus Wriedt Larsen
f716f9690b
Merge pull request #4132 from yoff/SharedDataflow_NestedComprehensions
...
Python: Shared dataflow, nested comprehensions
2020-09-10 13:28:04 +02:00
Tom Hvitved
a9f322e6c3
Merge pull request #4241 from hvitved/csharp/autobuild-cmd-exit-code
...
C#: Correctly propagate exit code in `autobuild.cmd`
2020-09-10 12:43:43 +02:00
Tom Hvitved
2a3d0072d2
Merge pull request #4242 from hvitved/csharp/fix-failing-windows-tests
...
C#: Fix broken auto-builder tests on Windows
2020-09-10 12:39:01 +02:00
Geoffrey White
fed973f9c4
Merge pull request #4229 from MathiasVP/mathiasvp/make_shared_make_unique-models
...
C++: Add taint models for std::make_unique and std::make_shared
2020-09-10 10:46:30 +01:00
Geoffrey White
34a03ec523
Merge pull request #4213 from rdmarsh2/rdmarsh2/cpp/explicit-conversion-perf
...
C++: Improve performance of getExplicitlyConverted
2020-09-10 10:33:16 +01:00
Tom Hvitved
9629f1c2f4
C#: Also propagate exit code in pre-finalize.cmd
2020-09-10 11:09:38 +02:00
Rasmus Lerchedahl Petersen
2eb8ea85fb
Python: update test expectations
2020-09-10 10:59:26 +02:00
Rasmus Lerchedahl Petersen
deb1a4ceb9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_UseUseFlow
2020-09-10 10:55:34 +02:00
Tom Hvitved
fcf39eaac1
C#: Fix broken auto-builder tests on Windows
2020-09-10 10:46:39 +02:00
Erik Krogh Kristensen
88bbc2f1f4
add change note
2020-09-10 10:39:04 +02:00
Tom Hvitved
a32db3de4b
Simplify exit code logic
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-09-10 10:22:02 +02:00
Rasmus Lerchedahl Petersen
50cc5d58e9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-09-10 10:20:55 +02:00
Tom Hvitved
4cc1e4d1f1
C#: Correctly propagate exit code in autobuild.cmd
2020-09-10 10:01:43 +02:00
Max Schaefer
b71a8e2ad0
JavaScript: Expose an API-graph predicate that is useful for flow summaries.
2020-09-10 08:44:06 +01:00
Tom Hvitved
c45743588c
Merge pull request #4237 from hvitved/csharp/autobuilder/nuget
...
C#: Download nuget.exe in auto-builder if it does not exist
2020-09-10 08:43:39 +02:00
Rasmus Lerchedahl Petersen
7b10a3a546
Python: fix comment and source uses
2020-09-10 08:36:00 +02:00
Robert Marsh
10633019a6
C++: autoformat
2020-09-09 12:45:17 -07:00
Robert Marsh
2e187a51ae
C++: test for interprocedurl iterator flow
2020-09-09 12:45:06 -07:00
Mathias Vorreiter Pedersen
bb9cf72a31
Merge branch 'main' into mathiasvp/make_shared_make_unique-models
2020-09-09 20:51:56 +02:00
Robert Marsh
2c0157553f
C++: accept test improvement from conversions
...
Duplicate results were due to a mishandling of implicit array-to-pointer
conversions.
2020-09-09 11:49:37 -07:00
Geoffrey White
46a07fa9b2
C++: Model std::stringstream::str.
2020-09-09 18:22:06 +01:00
Taus
f4f47bd5ed
Merge pull request #4236 from RasmusWL/python-experimental-taint-sanitizers
...
Python: Expand on taint sanitizer tests
2020-09-09 17:51:24 +02:00
Tom Hvitved
1ce3ac74a1
Address review comments
2020-09-09 16:35:37 +02:00
Taus
17ccc137ae
Merge pull request #4238 from RasmusWL/dataflow-small-fix-for-naming
...
Dataflow: small fixes for naming in taint tracking
2020-09-09 16:26:36 +02:00
Mathias Vorreiter Pedersen
ad602b892b
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-09 16:17:23 +02:00
Tamás Vajk
dfb8761bdc
C#: Add flag to Standalone extractor to use the self contained .Net framework ( #4233 )
2020-09-09 16:12:48 +02:00
Rasmus Wriedt Larsen
b8e057f7ad
Python: isSanitizerGuard test is future work
2020-09-09 15:57:53 +02:00
Rasmus Lerchedahl Petersen
b1567827a0
Python: Repair flow out of post-update nodes
2020-09-09 15:52:07 +02:00
Mathias Vorreiter Pedersen
e91d321d28
Merge pull request #4234 from geoffw0/stringstream
...
C++: Tests and initial models for taint through std::stringstream / std::ostream.
2020-09-09 15:31:46 +02:00
Mathias Vorreiter Pedersen
17867f25a7
C++: Accept more test changes
2020-09-09 15:27:56 +02:00
Jonas Jensen
ceb198f65d
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-NotExpr
2020-09-09 14:50:00 +02:00
Rasmus Wriedt Larsen
2172fb6e65
Dataflow: s/data flow/taint propagation/ in QLDoc for sanitizers
2020-09-09 14:30:33 +02:00
Geoffrey White
d8bb49b9a0
C++: We get a few additional results for DefaultTaintTracking as well.
2020-09-09 13:18:07 +01:00
Rasmus Wriedt Larsen
d90f0be2c4
Dataflow: defaultTaintBarrier => defaultTaintSanitizer
...
Just keeping things a bit more consistent :)
2020-09-09 14:11:56 +02:00
Tom Hvitved
947040aafe
C#: Download nuget.exe in auto-builder if it does not exist
2020-09-09 14:09:41 +02:00
Rasmus Wriedt Larsen
ab8cc23ce7
Python: Expand on taint sanitizer tests
...
Most interesting to look at the custom sanitizers. Once we have use-use flow, we
should handle this case:
```
s = TAINTED_STRING
emulated_authentication_check(s)
ensure_not_tainted(s)
```
2020-09-09 13:57:25 +02:00
Rasmus Lerchedahl Petersen
9e59d79a72
Python: Repair flow from pre-update nodes
2020-09-09 13:51:24 +02:00
Rasmus Lerchedahl Petersen
ce7f82ddc6
Python: Add def-use jump-steps
2020-09-09 13:27:14 +02:00
Mathias Vorreiter Pedersen
8b23461eb5
C++: Update change note.
2020-09-09 12:22:53 +02:00
Mathias Vorreiter Pedersen
8226515138
C++: Add a taint model for std::{shared, unique}_ptr<T>::get
2020-09-09 12:22:29 +02:00
Mathias Vorreiter Pedersen
417424ab75
C++: Add QLDoc and fix comment in isArray (review comments)
2020-09-09 12:21:09 +02:00
Rasmus Lerchedahl Petersen
c661f43316
Python: Port use-use implementation from Java
2020-09-09 12:19:40 +02:00
Geoffrey White
db3f81a98f
C++: Correct QLDoc.
2020-09-09 11:16:14 +01:00
Geoffrey White
3013ef54ef
C++: Change note.
2020-09-09 11:09:47 +01:00
CodeQL CI
a1cec12377
Merge pull request #4220 from erik-krogh/colonCmd
...
Approved by esbena
2020-09-09 10:13:14 +01:00
Rasmus Wriedt Larsen
038688a55c
Python: Minor updates to 1.25 change notes
...
backporting fixes from `@sj`
2020-09-09 10:34:40 +02:00
Mathias Vorreiter Pedersen
9de1fb7c18
Merge pull request #4222 from jbj/BlockStmt
...
C++/Java/JS: Rename Block -> BlockStmt
2020-09-09 10:02:37 +02:00
Erik Krogh Kristensen
cffe573d06
add taint-steps for underscore methods
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
eb80705e99
add a taint-step for require("bluebird").mapSeries()
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
b97c09a319
use tuples to simplify arrayFunctionTaintStep
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
bb97829e1d
add a model for the ClientRequest new require("net").Socket()
2020-09-09 09:57:53 +02:00
Erik Krogh Kristensen
d5097d820d
support direct callbacks to require("net").createServer
2020-09-09 09:46:17 +02:00
Erik Krogh Kristensen
efe3fd7f1e
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-09 09:41:15 +02:00
Robert Marsh
30b5975274
C++: autoformat
2020-09-08 14:51:08 -07:00
Robert Marsh
eab1557e27
C++: output iterator flow via FlowVar
2020-09-08 14:09:57 -07:00
Robert Marsh
13c45b6664
C++: remove unnecessary parameter in FlowVar.qll
2020-09-08 13:51:58 -07:00
Robert Marsh
c8cdf68bf9
C++: Remove StdStringBeginEnd
2020-09-08 13:49:57 -07:00
Robert Marsh
703db0b9a6
C++: noisy output iterators in AST taint tracking
2020-09-08 13:45:23 -07:00
Robert Marsh
983f54f11a
C++: simple tests for vector output iterators
2020-09-08 13:27:41 -07:00
Mathias Vorreiter Pedersen
9659afdf09
C++: Accept more test changes
2020-09-08 22:25:33 +02:00
Robert Marsh
44bdf98217
C++: simplify and explain getExplicitlyConverted
2020-09-08 13:02:51 -07:00
Robert Marsh
65cc9888d5
Merge branch 'main' into rdmarsh2/cpp/explicit-conversion-perf
2020-09-08 12:29:34 -07:00
Robert Marsh
083a4b2abc
C++: handle non-casts in hasExplicitConversion
2020-09-08 12:28:16 -07:00
Mathias Vorreiter Pedersen
f025d09bf0
C++: Accept test changes
2020-09-08 19:12:00 +02:00
Mathias Vorreiter Pedersen
978b74f235
C++: Implement taint model for make_shared and make_unique
2020-09-08 19:11:48 +02:00
Mathias Vorreiter Pedersen
7ac5e84925
C++: Add make_shared and make_unique test cases
2020-09-08 19:03:54 +02:00
Geoffrey White
90c7a79272
C++: Fix the object/refs up.
2020-09-08 16:49:11 +01:00
Geoffrey White
5a3d41879a
C++: Change some of the taint flows to data flows.
2020-09-08 16:49:11 +01:00
Geoffrey White
8a143bec3a
C++: Reverse taint through operator<<.
2020-09-08 16:49:10 +01:00
Geoffrey White
b73ff8da63
C++: Flow through operator<<.
2020-09-08 16:49:10 +01:00
Jonas Jensen
911dec6f86
C++: SimpleRangeAnalysis (bool)x and !x support
2020-09-08 16:59:35 +02:00
Jonas Jensen
1b6da062cf
C++: RangeAnalysis tests for bool conversions
2020-09-08 16:58:35 +02:00
Arthur Baars
1f4028f4a0
Java: Add new SQL sinks for Hibernate versions 4 and 6
2020-09-08 16:26:13 +02:00
Erik Krogh Kristensen
4515d27ad2
Merge branch 'main' of https://github.com/github/codeql into pr/erik-krogh/4220
2020-09-08 14:10:15 +00:00
Erik Krogh Kristensen
38679b6d92
add change note
2020-09-08 14:04:40 +00:00
CodeQL CI
9879c6c204
Merge pull request #4184 from aschackmull/java/cleanup-queryinjection
...
Approved by aibaars
2020-09-08 14:52:17 +01:00
Anders Schack-Mulligen
442de2e2d2
Java: Add qldoc.
2020-09-08 15:09:39 +02:00
Mathias Vorreiter Pedersen
5d14688848
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-08 14:38:58 +02:00
Mathias Vorreiter Pedersen
41147d245d
C++: Accept test changes
2020-09-08 14:35:22 +02:00
Mathias Vorreiter Pedersen
faae2e782a
C++: Implement field flow for operator[] writes and pointer deref writes.
2020-09-08 14:35:09 +02:00
Rasmus Wriedt Larsen
2979f9813e
Python: Add missing change notes
...
I looked through PRs between rc/1.24 and rc/1.25 and added missing change notes for:
- https://github.com/github/codeql/pull/3314
- https://github.com/github/codeql/pull/3302
- https://github.com/github/codeql/pull/3212
- https://github.com/github/codeql/pull/3453
- https://github.com/github/codeql/pull/3407
- https://github.com/github/codeql/pull/3563
```
git log --grep="Merge pull request" --format=oneline rc/1.24..rc/1.25 -- python/
```
2020-09-08 14:27:12 +02:00
Jonas Jensen
f92f84e3d4
Merge remote-tracking branch 'upstream/main' into BlockStmt
2020-09-08 14:09:46 +02:00
Nick Rolfe
075ce6edbf
Merge pull request #4178 from github/igfoo/48-coroutine-support-3
...
C++: Add initial support for coroutines operators
2020-09-08 12:44:24 +01:00
Tom Hvitved
4d0a1ee857
Address review comments
2020-09-08 12:54:12 +02:00
Jonas Jensen
0935d1e155
JS: Deprecate the Block class alias
2020-09-08 08:40:20 +02:00
Jonas Jensen
464d3630a2
Java: Rename Block -> BlockStmt
2020-09-08 08:40:20 +02:00
Jonas Jensen
ab90f06ddf
C++: Rename Block -> BlockStmt
2020-09-08 08:40:20 +02:00
Rajiv Shah
f168356181
C++: Allow .inc files to be included
2020-09-07 18:09:21 -04:00
Ian Lynagh
d49bc4ccda
C++: Tweak qldoc for coroutines
2020-09-07 20:39:11 +01:00
Ian Lynagh
4bf545548b
C++: Tweak to make qlformat happy
2020-09-07 20:37:01 +01:00
Ian Lynagh
86c58afa48
C++: Update stats for co_await/co_yield/co_return
2020-09-07 20:37:01 +01:00
Ian Lynagh
49f7baf5a9
C++: Add an upgrade script
2020-09-07 20:37:01 +01:00
Ian Lynagh
cca276be84
C++: Remove co_await range-based-for support for now
...
Initial impl won't support it
2020-09-07 20:37:01 +01:00
Ian Lynagh
78b522722c
C++: Split CoReturnStmt.getExpr into CoReturnStmt.{getOperand,getExpr}
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
8b8b9d6fe3
Actually sort add Statement support
...
This commit fixes the previous one.
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
5df5e6dfce
Add initial QL support classes for coroutines
...
Add classes for expressions co_yield and co_await.
Adds classes for statements co_return and `for co_await`.
2020-09-07 20:37:01 +01:00
Matthew Gretton-Dann
8199b3a230
C++: Add DB schema support for coroutines
2020-09-07 20:37:01 +01:00
Geoffrey White
6ef67af743
C++: Add models for stringstream methods.
2020-09-07 18:27:42 +01:00
Geoffrey White
fafd2f0a7c
C++: Add test cases for stringstream / ostream.
2020-09-07 18:27:42 +01:00
CodeQL CI
22b3b0a5f1
Merge pull request #3953 from RasmusWL/python-more-call-graph-tracing
...
Approved by tausbn
2020-09-07 17:34:14 +01:00
Max Schaefer
b8a492473b
JavaScript: Stop tracking canonical function names in API graphs.
...
This blows up on the TypeScript compiler, and is likely to be much less useful than tracking type names and namespaces, which we still do.
2020-09-07 16:47:45 +01:00
Asger F
d3f19721e6
Merge pull request #4153 from erik-krogh/snake_case_pr
...
JS: rename dbscheme predicates to consistently use snake_case in dbscheme
2020-09-07 16:21:32 +01:00
Mathias Vorreiter Pedersen
9c1837e3b3
C++: Rename getField to getAField following review comments.
2020-09-07 16:52:04 +02:00
Jonas Jensen
3493c93d7b
Merge pull request #4218 from MathiasVP/mathiasvp/fix-fp-av82
...
C++: Add cases for conditional and comma operator in AV Rule 82
2020-09-07 15:27:07 +02:00
Tom Hvitved
6c716331d9
C#: Skip foreach loop bodies in the CFG when the iteration expression is empty
2020-09-07 15:26:28 +02:00
Tom Hvitved
9e240b7397
C#: Add more CFG loop unrolling tests
2020-09-07 15:26:25 +02:00
Rasmus Wriedt Larsen
61998afc56
Python: Remove unnecessary comment
...
Was introduced in 5d031d7abe when I actually fixed
the loop variable capture problem.
2020-09-07 15:06:07 +02:00
Tom Hvitved
37f1ce3122
C#: Implement support for path transformers
2020-09-07 15:02:50 +02:00
Max Schaefer
423d87b812
JavaScript: Rename TNode to TApiNode.
...
This prevents spurious recomputation of a cached stage.
2020-09-07 14:02:37 +01:00
Rasmus Wriedt Larsen
fb37330f5e
Python: Fix grammar
...
Co-authored-by: Taus <tausbn@github.com >
2020-09-07 14:59:07 +02:00
Erik Krogh Kristensen
55b79f445c
recognize commands with slash and underscore
2020-09-07 14:28:28 +02:00
Jonas Jensen
3a7bf2a15a
Merge pull request #3933 from MathiasVP/alternative-instruction-operand-flow
...
C++: Alternate instruction -> operand flow
2020-09-07 13:37:20 +02:00
Erik Krogh Kristensen
320879bc1e
recognize colon in command-prefixes
2020-09-07 13:12:38 +02:00
Jonas Jensen
0fe5d75375
Merge pull request #4196 from MathiasVP/mathiasvp/field-to-object-taint-tests
...
C++: Add field to object taint tests
2020-09-07 13:02:22 +02:00
CodeQL CI
85f6388a19
Merge pull request #4206 from erik-krogh/consistentJquery
...
Approved by esbena
2020-09-07 11:23:23 +01:00
Tom Hvitved
68f421f9c3
Merge pull request #4205 from tamasvajk/feature/printast-accessor
...
C#: Add stable order for generated accessors in printed AST
2020-09-07 11:25:46 +02:00
Erik Krogh Kristensen
8ada928b16
Merge branch 'main' into snake_case_pr
2020-09-07 11:12:57 +02:00
Erik Krogh Kristensen
4175637631
add change note for unsafe-jquery
2020-09-07 11:08:21 +02:00
Erik Krogh Kristensen
61e2e5647c
autoformat
2020-09-07 11:05:56 +02:00
CodeQL CI
b5872fe848
Merge pull request #3873 from asger-semmle/js/type-qualified-name-fallback
...
Approved by erik-krogh
2020-09-07 09:48:05 +01:00
yoff
2a70da4da6
Merge pull request #4210 from tausbn/python-remove-spurious-global-flow
...
Python: Remove implicit uses from `essaFlowStep`
2020-09-07 10:16:18 +02:00
yoff
ae9f58489d
Merge pull request #4159 from RasmusWL/python-port-dataflow-tests
...
Python: port dataflow tests
2020-09-07 09:54:12 +02:00
Tom Hvitved
14567f5314
C#: Support wild-cards in file patterns
...
Implements the specification at https://wiki.semmle.com/display/SDmaster/project-layout+format
by compiling file path specifications to regular expressions.
2020-09-07 09:03:56 +02:00
Mathias Vorreiter Pedersen
b3d18ef610
C++: Add cases for conditional and comma operator in AV RUle 82
2020-09-07 08:59:08 +02:00
Mathias Vorreiter Pedersen
a5ac8ebc2f
C++: Don't import internals.
2020-09-05 11:47:22 +02:00
Robert Marsh
4be138d790
C++: Improve performance of getExplicitlyConverted
2020-09-04 14:17:56 -07:00
Mathias Vorreiter Pedersen
a4890ef99c
C++: Add annotations describing whether the flow is an instance of field-to-object flow
2020-09-04 18:32:28 +02:00
Mathias Vorreiter Pedersen
cfd606a4e0
Merge branch 'main' into alternative-instruction-operand-flow
2020-09-04 18:26:38 +02:00
Mathias Vorreiter Pedersen
208b85c7fc
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-04 18:04:15 +02:00
Jonas Jensen
eea893483d
Merge pull request #4209 from geoffw0/taintbits
...
C++: Fix a few remaining holes in taint through std::string
2020-09-04 17:52:48 +02:00
Jonas Jensen
f92139d2b0
Merge pull request #4202 from geoffw0/localhidesparam
...
C++: Improve handling of template functions in cpp/declaration-hides-parameter
2020-09-04 17:52:35 +02:00
Mathias Vorreiter Pedersen
ed7e499b02
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-04 17:25:36 +02:00
Mathias Vorreiter Pedersen
c67951682a
C++: Fix two bad join orders in readStep and storeStep. And use a min aggregate to guarentee that a FieldContent's toString has at most one result.
2020-09-04 17:12:30 +02:00
Taus Brock-Nannestad
266365d0b6
Python: Update strange-essaflow test
2020-09-04 16:38:59 +02:00
Taus Brock-Nannestad
260763a748
Python: Update consistency test results
2020-09-04 16:35:49 +02:00
Taus Brock-Nannestad
df1448cfb2
Merge branch 'main' into python-remove-spurious-global-flow
2020-09-04 16:28:03 +02:00
Geoffrey White
156a174cf4
C++: Add explanation.
2020-09-04 14:55:55 +01:00
Geoffrey White
96098c5244
C++: Simplify getConstructedFrom.
2020-09-04 14:52:01 +01:00
Taus
5ffc959e32
Merge pull request #4211 from RasmusWL/python-strange-essaflow
...
Python: Add example of strange DataFlow::jumpStep
2020-09-04 15:47:22 +02:00
Geoffrey White
2472b40b31
C++: Fix test comments.
2020-09-04 14:37:23 +01:00
Geoffrey White
43d8e83258
Merge branch 'main' into taintbits
2020-09-04 14:26:42 +01:00
Rasmus Wriedt Larsen
720e8c432e
Python: Update comment for validTest expectations
2020-09-04 15:08:57 +02:00
Geoffrey White
5d1c2a3689
Merge pull request #4204 from jbj/SimpleRangeAnalysis-NEExpr
...
C++: Support `!= constant` in range analysis
2020-09-04 13:47:59 +01:00
Rasmus Wriedt Larsen
cf57afd102
Python: Add example of strange DataFlow::jumpStep
...
The example code is just copied from command injection tests, that is not too
important. The important part is that `jumpStep` says there is flow from the
import of `os` to `app.route()` :O
2020-09-04 14:39:16 +02:00
Taus
59c7907ee4
Merge pull request #4207 from RasmusWL/python-typetracker-small-fixes
...
Python: Small fixes for TypeTracker
2020-09-04 14:30:10 +02:00
Taus Brock-Nannestad
98266ad5da
Python: Remove implicit uses from essaFlowStep
2020-09-04 14:22:43 +02:00
Erik Krogh Kristensen
f13a4f5771
require that the plugin and sink are in the same toplevel
2020-09-04 13:59:16 +02:00
Rasmus Wriedt Larsen
6aae75799e
Python: Fix import in type tracking test
...
Fixes 7855576a6
2020-09-04 13:36:25 +02:00
CodeQL CI
fd715a5b66
Merge pull request #4179 from RasmusWL/python-tainttracking-ala-go
...
Approved by tausbn, yoff
2020-09-04 12:20:12 +01:00
Erik Krogh Kristensen
d47c852767
autoformat
2020-09-04 12:44:18 +02:00
Jonas Jensen
958f89905d
Merge pull request #4197 from github/aeisenberg/devcontainer-settings
...
Update devcontainer memory settings
2020-09-04 12:42:34 +02:00
Max Schaefer
cfc91cc5f1
JavaScript: Drop "feature" terminology.
...
It turned out to be more confusing than helpful, so we're back with plain old API-graph "nodes".
2020-09-04 10:57:21 +01:00
Erik Krogh Kristensen
9ed9ecd333
copied updated dbscheme to upgrade folder
2020-09-04 11:55:39 +02:00
Erik Krogh Kristensen
6e54cf426c
autoformat
2020-09-04 11:55:39 +02:00
Erik Krogh Kristensen
5a159abd75
renamed "interfacedefinition" to "interface_definition"
2020-09-04 11:55:33 +02:00
Erik Krogh Kristensen
3785a10ee8
renamed "classdefinition" to "class_definition"
2020-09-04 11:55:32 +02:00
Erik Krogh Kristensen
5467efe117
renamed "typeassertion" to "type_assertion"
2020-09-04 11:55:31 +02:00
Erik Krogh Kristensen
4af9508506
renamed "importspecifier" to "import_specifier"
2020-09-04 11:55:30 +02:00
Erik Krogh Kristensen
35caaf5c93
renamed "comprehensionblock" to "comprehension_block"
2020-09-04 11:55:30 +02:00
Erik Krogh Kristensen
273ae710b0
renamed "comprehensionexpr" to "comprehension_expr"
2020-09-04 11:55:29 +02:00
Erik Krogh Kristensen
586a823ce7
renamed "exprparent" to "expr_parent"
2020-09-04 11:55:28 +02:00
Erik Krogh Kristensen
b28cbf310e
renamed "typedefinition" to "type_definition"
2020-09-04 11:55:28 +02:00
Erik Krogh Kristensen
bcbd1f045f
renamed "namespacedefinition" to "namespace_definition"
2020-09-04 11:55:27 +02:00
Erik Krogh Kristensen
8c812dcdfb
renamed "exportdeclaration" to "export_declaration"
2020-09-04 11:55:26 +02:00
Erik Krogh Kristensen
4f8d2156c0
renamed "declstmt" to "decl_stmt"
2020-09-04 11:55:26 +02:00
Erik Krogh Kristensen
5e58d34e19
renamed "exportasnamespacedeclaration" to "export_as_namespace_declaration"
2020-09-04 11:55:25 +02:00
Erik Krogh Kristensen
723a1b8483
renamed "enumdeclaration" to "enum_declaration"
2020-09-04 11:55:24 +02:00
Erik Krogh Kristensen
0d5db155e6
renamed "typealiasdeclaration" to "type_alias_declaration"
2020-09-04 11:55:23 +02:00
Erik Krogh Kristensen
232dbe9fd1
renamed "interfacedeclaration" to "interface_declaration"
2020-09-04 11:55:23 +02:00
Erik Krogh Kristensen
7b94cf7d8e
renamed "doccomment" to "doc_comment"
2020-09-04 11:55:22 +02:00
Erik Krogh Kristensen
9a66f3a721
renamed "slashstarcomment" to "slashstar_comment"
2020-09-04 11:55:21 +02:00
Erik Krogh Kristensen
13a593c7b4
renamed "slashslashcomment" to "slashslash_comment"
2020-09-04 11:55:21 +02:00
Erik Krogh Kristensen
132d6d0068
renamed "htmlcommentstart" to "html_comment_start"
2020-09-04 11:55:20 +02:00
Erik Krogh Kristensen
6be328b400
renamed "blockcomment" to "block_comment"
2020-09-04 11:55:19 +02:00
Erik Krogh Kristensen
03617fe18b
renamed "linecomment" to "line_comment"
2020-09-04 11:55:18 +02:00
Erik Krogh Kristensen
136345d745
renamed "htmlcomment" to "html_comment"
2020-09-04 11:55:17 +02:00
Erik Krogh Kristensen
db0747876e
renamed "booleanliteraltype" to "boolean_literal_type"
2020-09-04 11:55:16 +02:00
Erik Krogh Kristensen
5ea08b9c0c
renamed "bigintliteraltype" to "bigint_literal_type"
2020-09-04 11:55:16 +02:00
Erik Krogh Kristensen
a35e0f9306
renamed "biginttype" to "bigint_type"
2020-09-04 11:55:15 +02:00
Erik Krogh Kristensen
0c0abefe5a
renamed "unknowntype" to "unknown_type"
2020-09-04 11:55:14 +02:00
Erik Krogh Kristensen
2481775af5
renamed "stringliteraltype" to "string_literal_type"
2020-09-04 11:55:13 +02:00
Erik Krogh Kristensen
bd3ab9d599
renamed "numberliteraltype" to "number_literal_type"
2020-09-04 11:55:12 +02:00
Erik Krogh Kristensen
6f277a7435
renamed "thistype" to "this_type"
2020-09-04 11:55:11 +02:00
Erik Krogh Kristensen
27540e77b1
renamed "lexicaltypevariabletype" to "lexical_type_variable_type"
2020-09-04 11:55:10 +02:00
Erik Krogh Kristensen
9bab197a80
renamed "tupletype" to "tuple_type"
2020-09-04 11:55:09 +02:00
Erik Krogh Kristensen
38d033644c
renamed "intersectiontype" to "intersection_type"
2020-09-04 11:55:08 +02:00
Erik Krogh Kristensen
2b3e8869c6
renamed "objectkeywordtype" to "objectkeyword_type"
2020-09-04 11:55:07 +02:00
Erik Krogh Kristensen
174afbc0df
renamed "uniquesymboltype" to "unique_symbol_type"
2020-09-04 11:55:06 +02:00
Erik Krogh Kristensen
a1daf0a428
renamed "plainsymboltype" to "plain_symbol_type"
2020-09-04 11:55:06 +02:00
Erik Krogh Kristensen
b1812b1be2
renamed "nevertype" to "never_type"
2020-09-04 11:55:05 +02:00
Erik Krogh Kristensen
8b2769953f
renamed "nulltype" to "null_type"
2020-09-04 11:55:04 +02:00
Erik Krogh Kristensen
1891a3fb49
renamed "undefinedtype" to "undefined_type"
2020-09-04 11:55:03 +02:00
Erik Krogh Kristensen
d95fc64f87
renamed "voidtype" to "void_type"
2020-09-04 11:55:02 +02:00
Erik Krogh Kristensen
37bdea4011
renamed "typeoftype" to "typeof_type"
2020-09-04 11:55:01 +02:00
Erik Krogh Kristensen
11214b574e
renamed "canonicaltypevariabletype" to "canonical_type_variable_type"
2020-09-04 11:55:00 +02:00
Erik Krogh Kristensen
1d9dd92389
renamed "objecttype" to "object_type"
2020-09-04 11:54:59 +02:00
Erik Krogh Kristensen
b72daf6559
renamed "typereference" to "type_reference"
2020-09-04 11:54:58 +02:00
Erik Krogh Kristensen
01e3888c36
renamed "falsetype" to "false_type"
2020-09-04 11:54:57 +02:00
Erik Krogh Kristensen
b3c3069c24
renamed "truetype" to "true_type"
2020-09-04 11:54:57 +02:00
Erik Krogh Kristensen
2a7b6310ad
renamed "uniontype" to "union_type"
2020-09-04 11:54:56 +02:00
Erik Krogh Kristensen
0475e9e93c
renamed "numbertype" to "number_type"
2020-09-04 11:54:55 +02:00
Erik Krogh Kristensen
e0880c8cb1
renamed "stringtype" to "string_type"
2020-09-04 11:54:55 +02:00
Erik Krogh Kristensen
579d4e0d75
renamed "anytype" to "any_type"
2020-09-04 11:54:54 +02:00
Erik Krogh Kristensen
62afd50d71
renamed "typeidentifier" to "type_identifier"
2020-09-04 11:54:53 +02:00
Erik Krogh Kristensen
e2e10c3a75
renamed "conditionaltypescope" to "conditional_type_scope"
2020-09-04 11:54:52 +02:00
Erik Krogh Kristensen
3553fe8ed8
renamed "externalmodulescope" to "external_module_scope"
2020-09-04 11:54:52 +02:00
Erik Krogh Kristensen
602f627e14
renamed "enumscope" to "enum_scope"
2020-09-04 11:54:51 +02:00
Erik Krogh Kristensen
4fe2b9dcda
renamed "mappedtypescope" to "mapped_type_scope"
2020-09-04 11:54:50 +02:00
Erik Krogh Kristensen
8b09f1dcb2
renamed "typealiasscope" to "type_alias_scope"
2020-09-04 11:54:50 +02:00
Erik Krogh Kristensen
f76329c9e3
renamed "interfacescope" to "interface_scope"
2020-09-04 11:54:49 +02:00
Erik Krogh Kristensen
24f0b20c3a
renamed "classdeclscope" to "class_decl_scope"
2020-09-04 11:54:48 +02:00
Erik Krogh Kristensen
07cef9ec36
renamed "namespacescope" to "namespace_scope"
2020-09-04 11:54:47 +02:00
Erik Krogh Kristensen
345b1ee188
renamed "classexprscope" to "class_expr_scope"
2020-09-04 11:54:47 +02:00
Erik Krogh Kristensen
8370573df0
renamed "comprehensionblockscope" to "comprehension_block_scope"
2020-09-04 11:54:46 +02:00
Erik Krogh Kristensen
9be0740b93
renamed "forinscope" to "for_in_scope"
2020-09-04 11:54:45 +02:00
Erik Krogh Kristensen
310f9708ea
renamed "forscope" to "for_scope"
2020-09-04 11:54:44 +02:00
Erik Krogh Kristensen
a45103d07d
renamed "blockscope" to "block_scope"
2020-09-04 11:54:44 +02:00
Erik Krogh Kristensen
93aa812744
renamed "modulescope" to "module_scope"
2020-09-04 11:54:43 +02:00
Erik Krogh Kristensen
5f06bf05bd
renamed "catchscope" to "catch_scope"
2020-09-04 11:54:42 +02:00
Erik Krogh Kristensen
a871963481
renamed "functionscope" to "function_scope"
2020-09-04 11:54:41 +02:00
Erik Krogh Kristensen
1341f4beb4
renamed "globalscope" to "global_scope"
2020-09-04 11:54:41 +02:00
Erik Krogh Kristensen
05e0d1a02d
renamed "importmetaexpr" to "import_meta_expr"
2020-09-04 11:54:40 +02:00
Erik Krogh Kristensen
ef5e1b0862
renamed "nullishcoalescingexpr" to "nullishcoalescing_expr"
2020-09-04 11:54:39 +02:00
Erik Krogh Kristensen
b2f28cab27
renamed "bigintliteral" to "bigint_literal"
2020-09-04 11:54:38 +02:00
Erik Krogh Kristensen
56c440b577
renamed "astypeassertion" to "as_type_assertion"
2020-09-04 11:54:37 +02:00
Erik Krogh Kristensen
ccdfe25f88
renamed "prefixtypeassertion" to "prefix_type_assertion"
2020-09-04 11:54:37 +02:00
Erik Krogh Kristensen
27a017671d
renamed "dynamicimport" to "dynamic_import"
2020-09-04 11:54:36 +02:00
Erik Krogh Kristensen
94b5645de2
renamed "externalmodulereference" to "external_module_reference"
2020-09-04 11:54:35 +02:00
Erik Krogh Kristensen
dec030558a
renamed "bindexpr" to "bind_expr"
2020-09-04 11:54:35 +02:00
Erik Krogh Kristensen
1fa3e4d2f1
renamed "exportnamespacespecifier" to "export_namespace_specifier"
2020-09-04 11:54:34 +02:00
Erik Krogh Kristensen
004ea10f2c
renamed "exportdefaultspecifier" to "export_default_specifier"
2020-09-04 11:54:33 +02:00
Erik Krogh Kristensen
4b99d056d2
renamed "functionsentexpr" to "function_sent_expr"
2020-09-04 11:54:32 +02:00
Erik Krogh Kristensen
45e6797a27
renamed "awaitexpr" to "await_expr"
2020-09-04 11:54:32 +02:00
Erik Krogh Kristensen
0785b9b81d
renamed "jsxelement" to "jsx_element"
2020-09-04 11:54:31 +02:00
Erik Krogh Kristensen
cdc97bf1f4
renamed "assignexpexpr" to "assign_exp_expr"
2020-09-04 11:54:30 +02:00
Erik Krogh Kristensen
5d06fe37e7
renamed "expexpr" to "exp_expr"
2020-09-04 11:54:29 +02:00
Erik Krogh Kristensen
144c064e93
renamed "namedexportspecifier" to "named_export_specifier"
2020-09-04 11:54:29 +02:00
Erik Krogh Kristensen
0cf6cca676
renamed "importnamespacespecifier" to "import_namespace_specifier"
2020-09-04 11:54:28 +02:00
Erik Krogh Kristensen
bc287ba472
renamed "importdefaultspecifier" to "import_default_specifier"
2020-09-04 11:54:27 +02:00
Erik Krogh Kristensen
ae32211080
renamed "namedimportspecifier" to "named_import_specifier"
2020-09-04 11:54:27 +02:00
Erik Krogh Kristensen
2e0d886d2b
renamed "newtargetexpr" to "newtarget_expr"
2020-09-04 11:54:26 +02:00
Erik Krogh Kristensen
a3f2c8f234
renamed "superexpr" to "super_expr"
2020-09-04 11:54:25 +02:00
Erik Krogh Kristensen
2efb2a2392
renamed "classexpr" to "class_expr"
2020-09-04 11:54:24 +02:00
Erik Krogh Kristensen
b34a471235
renamed "vardecl" to "var_decl"
2020-09-04 11:54:24 +02:00
Erik Krogh Kristensen
fa14369816
renamed "forofcomprehensionblock" to "for_of_comprehension_block"
2020-09-04 11:54:23 +02:00
Erik Krogh Kristensen
013b7f19b9
renamed "forincomprehensionblock" to "for_in_comprehension_block"
2020-09-04 11:54:22 +02:00
Erik Krogh Kristensen
e8ceed247b
renamed "generatorexpr" to "generator_expr"
2020-09-04 11:54:21 +02:00
Erik Krogh Kristensen
840bd90c02
renamed "arraycomprehensionexpr" to "array_comprehension_expr"
2020-09-04 11:54:20 +02:00
Erik Krogh Kristensen
cd879a6445
renamed "templateelement" to "template_element"
2020-09-04 11:54:20 +02:00
Erik Krogh Kristensen
2edf0b248b
renamed "templateliteral" to "template_literal"
2020-09-04 11:54:19 +02:00
Erik Krogh Kristensen
16a79a2f03
renamed "taggedtemplateexpr" to "tagged_template_expr"
2020-09-04 11:54:18 +02:00
Erik Krogh Kristensen
6372819684
renamed "yieldexpr" to "yield_expr"
2020-09-04 11:54:17 +02:00
Erik Krogh Kristensen
a4b2c9a114
renamed "objectpattern" to "object_pattern"
2020-09-04 11:54:17 +02:00
Erik Krogh Kristensen
79a8dcada3
renamed "arraypattern" to "array_pattern"
2020-09-04 11:54:16 +02:00
Erik Krogh Kristensen
fdd25ef5f8
renamed "spreadelement" to "spread_element"
2020-09-04 11:54:15 +02:00
Erik Krogh Kristensen
7944ab2324
renamed "vardeclarator" to "var_declarator"
2020-09-04 11:54:14 +02:00
Erik Krogh Kristensen
5d47248878
renamed "parexpr" to "par_expr"
2020-09-04 11:54:14 +02:00
Erik Krogh Kristensen
fb7b0eb629
renamed "postdecexpr" to "postdec_expr"
2020-09-04 11:54:13 +02:00
Erik Krogh Kristensen
68d6b3f236
renamed "predecexpr" to "predec_expr"
2020-09-04 11:54:12 +02:00
Erik Krogh Kristensen
ff70caf2a0
renamed "postincexpr" to "postinc_expr"
2020-09-04 11:54:11 +02:00
Erik Krogh Kristensen
bb8a8eeb77
renamed "preincexpr" to "preinc_expr"
2020-09-04 11:54:11 +02:00
Erik Krogh Kristensen
7a1c751062
renamed "assignandexpr" to "assign_and_expr"
2020-09-04 11:54:10 +02:00
Erik Krogh Kristensen
01b0a53d48
renamed "assignxorexpr" to "assign_xor_expr"
2020-09-04 11:54:09 +02:00
Erik Krogh Kristensen
8a5a25bdc3
renamed "assignorexpr" to "assign_or_expr"
2020-09-04 11:54:08 +02:00
Erik Krogh Kristensen
0cece7f7d7
renamed "assignurshiftexpr" to "assign_urshift_expr"
2020-09-04 11:54:08 +02:00
Erik Krogh Kristensen
f0fc6b3d7a
renamed "assignrshiftexpr" to "assign_rshift_expr"
2020-09-04 11:54:07 +02:00
Erik Krogh Kristensen
dae29372cf
renamed "assignlshiftexpr" to "assign_lshift_expr"
2020-09-04 11:54:06 +02:00
Erik Krogh Kristensen
7e05a721f8
renamed "assignmodexpr" to "assign_mod_expr"
2020-09-04 11:54:05 +02:00
Erik Krogh Kristensen
a9eefac985
renamed "assigndivexpr" to "assign_div_expr"
2020-09-04 11:54:04 +02:00
Erik Krogh Kristensen
aadee91def
renamed "assignmulexpr" to "assign_mul_expr"
2020-09-04 11:54:03 +02:00
Erik Krogh Kristensen
e9e7097edb
renamed "assignsubexpr" to "assign_sub_expr"
2020-09-04 11:54:02 +02:00
Erik Krogh Kristensen
1833464d23
renamed "assignaddexpr" to "assign_add_expr"
2020-09-04 11:54:01 +02:00
Erik Krogh Kristensen
f32c89b652
renamed "assignexpr" to "assign_expr"
2020-09-04 11:54:01 +02:00
Erik Krogh Kristensen
10a412175d
renamed "logorexpr" to "logor_expr"
2020-09-04 11:54:00 +02:00
Erik Krogh Kristensen
cabe2af8e3
renamed "logandexpr" to "logand_expr"
2020-09-04 11:53:59 +02:00
Erik Krogh Kristensen
ae4593f942
renamed "instanceofexpr" to "instanceof_expr"
2020-09-04 11:53:58 +02:00
Erik Krogh Kristensen
416d2bd609
renamed "inexpr" to "in_expr"
2020-09-04 11:53:57 +02:00
Erik Krogh Kristensen
006ba2e0bf
renamed "bitandexpr" to "bitand_expr"
2020-09-04 11:53:57 +02:00
Erik Krogh Kristensen
b0fce918c6
renamed "xorexpr" to "xor_expr"
2020-09-04 11:53:56 +02:00
Erik Krogh Kristensen
c0a8e3ff90
renamed "bitorexpr" to "bitor_expr"
2020-09-04 11:53:55 +02:00
Erik Krogh Kristensen
335406d212
renamed "modexpr" to "mod_expr"
2020-09-04 11:53:55 +02:00
Erik Krogh Kristensen
a0b75a3606
renamed "divexpr" to "div_expr"
2020-09-04 11:53:54 +02:00
Erik Krogh Kristensen
df85a37f6e
renamed "mulexpr" to "mul_expr"
2020-09-04 11:53:53 +02:00
Erik Krogh Kristensen
3d03974d8e
renamed "subexpr" to "sub_expr"
2020-09-04 11:53:52 +02:00
Erik Krogh Kristensen
3af0cad6aa
renamed "addexpr" to "add_expr"
2020-09-04 11:53:52 +02:00
Erik Krogh Kristensen
11f7fabba8
renamed "urshiftexpr" to "urshift_expr"
2020-09-04 11:53:51 +02:00
Erik Krogh Kristensen
6b38ed0e1e
renamed "rshiftexpr" to "rshift_expr"
2020-09-04 11:53:50 +02:00
Erik Krogh Kristensen
b7c441e514
renamed "lshiftexpr" to "lshift_expr"
2020-09-04 11:53:49 +02:00
Erik Krogh Kristensen
1f07e6afc1
renamed "geexpr" to "ge_expr"
2020-09-04 11:53:49 +02:00
Erik Krogh Kristensen
4b625e7ac7
renamed "gtexpr" to "gt_expr"
2020-09-04 11:53:48 +02:00
Erik Krogh Kristensen
ce0eabf998
renamed "leexpr" to "le_expr"
2020-09-04 11:53:47 +02:00
Erik Krogh Kristensen
2744a37dbb
renamed "ltexpr" to "lt_expr"
2020-09-04 11:53:46 +02:00
Erik Krogh Kristensen
17705100d4
renamed "neqqexpr" to "neqq_expr"
2020-09-04 11:53:46 +02:00
Erik Krogh Kristensen
c634f274ee
renamed "eqqexpr" to "eqq_expr"
2020-09-04 11:53:45 +02:00
Erik Krogh Kristensen
428e599cd2
renamed "neqexpr" to "neq_expr"
2020-09-04 11:53:44 +02:00
Erik Krogh Kristensen
51abeebb66
renamed "eqexpr" to "eq_expr"
2020-09-04 11:53:43 +02:00
Erik Krogh Kristensen
3b1f3f85bb
renamed "deleteexpr" to "delete_expr"
2020-09-04 11:53:43 +02:00
Erik Krogh Kristensen
82c049c713
renamed "voidexpr" to "void_expr"
2020-09-04 11:53:42 +02:00
Erik Krogh Kristensen
f4c1719440
renamed "typeofexpr" to "typeof_expr"
2020-09-04 11:53:41 +02:00
Erik Krogh Kristensen
5dfbcdc32c
renamed "bitnotexpr" to "bit_not_expr"
2020-09-04 11:53:40 +02:00
Erik Krogh Kristensen
d1f9d03d2c
renamed "lognotexpr" to "log_not_expr"
2020-09-04 11:53:40 +02:00
Erik Krogh Kristensen
7752eabccb
renamed "plusexpr" to "plus_expr"
2020-09-04 11:53:39 +02:00
Erik Krogh Kristensen
3604535270
renamed "negexpr" to "neg_expr"
2020-09-04 11:53:38 +02:00
Erik Krogh Kristensen
e7ef992944
renamed "indexexpr" to "index_expr"
2020-09-04 11:53:37 +02:00
Erik Krogh Kristensen
6c47f7eaba
renamed "dotexpr" to "dot_expr"
2020-09-04 11:53:37 +02:00
Erik Krogh Kristensen
f5e40ac727
renamed "callexpr" to "call_expr"
2020-09-04 11:53:36 +02:00
Erik Krogh Kristensen
3e8f9a1549
renamed "newexpr" to "new_expr"
2020-09-04 11:53:35 +02:00
Erik Krogh Kristensen
d58ae72072
renamed "conditionalexpr" to "conditional_expr"
2020-09-04 11:53:34 +02:00
Erik Krogh Kristensen
4c8245036e
renamed "seqexpr" to "seq_expr"
2020-09-04 11:53:34 +02:00
Erik Krogh Kristensen
05fbb2902e
renamed "objexpr" to "obj_expr"
2020-09-04 11:53:33 +02:00
Erik Krogh Kristensen
7317ee9992
renamed "arrayexpr" to "array_expr"
2020-09-04 11:53:32 +02:00
Erik Krogh Kristensen
29b03aebd9
renamed "thisexpr" to "this_expr"
2020-09-04 11:53:32 +02:00
Erik Krogh Kristensen
fa8ae793f2
renamed "regexpliteral" to "regexp_literal"
2020-09-04 11:53:31 +02:00
Erik Krogh Kristensen
91c3e51503
renamed "stringliteral" to "string_literal"
2020-09-04 11:53:30 +02:00
Erik Krogh Kristensen
960576438c
renamed "numberliteral" to "number_literal"
2020-09-04 11:53:29 +02:00
Erik Krogh Kristensen
f212e85426
renamed "booleanliteral" to "boolean_literal"
2020-09-04 11:53:29 +02:00
Erik Krogh Kristensen
6beaec0c71
renamed "nullliteral" to "null_literal"
2020-09-04 11:53:28 +02:00
Erik Krogh Kristensen
612e12c5a5
renamed "exportassigndeclaration" to "export_assign_declaration"
2020-09-04 11:53:27 +02:00
Erik Krogh Kristensen
3c04b4982c
renamed "importequalsdeclaration" to "import_equals_declaration"
2020-09-04 11:53:26 +02:00
Erik Krogh Kristensen
ec1f538503
renamed "exportnameddeclaration" to "export_named_declaration"
2020-09-04 11:53:26 +02:00
Erik Krogh Kristensen
8eacd32f8e
renamed "exportdefaultdeclaration" to "export_default_declaration"
2020-09-04 11:53:25 +02:00
Erik Krogh Kristensen
5c3b69f323
renamed "exportalldeclaration" to "export_all_declaration"
2020-09-04 11:53:24 +02:00
Erik Krogh Kristensen
bdfeecdee1
renamed "importdeclaration" to "import_declaration"
2020-09-04 11:53:23 +02:00
Erik Krogh Kristensen
1da7021340
renamed "classdeclstmt" to "class_decl_stmt"
2020-09-04 11:53:23 +02:00
Erik Krogh Kristensen
893b743b57
renamed "foreachstmt" to "for_each_stmt"
2020-09-04 11:53:22 +02:00
Erik Krogh Kristensen
442d3e5f70
renamed "legacy_letstmt" to "legacy_let_stmt"
2020-09-04 11:53:21 +02:00
Erik Krogh Kristensen
945e2c7fe0
renamed "letstmt" to "let_stmt"
2020-09-04 11:53:20 +02:00
Erik Krogh Kristensen
38c902f43b
renamed "constdeclstmt" to "const_decl_stmt"
2020-09-04 11:53:19 +02:00
Erik Krogh Kristensen
231583a3f8
renamed "forofstmt" to "for_of_stmt"
2020-09-04 11:53:19 +02:00
Erik Krogh Kristensen
c56746929d
renamed "catchclause" to "catch_clause"
2020-09-04 11:53:18 +02:00
Erik Krogh Kristensen
d0e4748def
renamed "vardeclstmt" to "var_decl_stmt"
2020-09-04 11:53:17 +02:00
Erik Krogh Kristensen
6f667a6e82
renamed "functiondeclstmt" to "function_decl_stmt"
2020-09-04 11:53:16 +02:00
Erik Krogh Kristensen
3ef8fb72cd
renamed "debuggerstmt" to "debugger_stmt"
2020-09-04 11:53:16 +02:00
Erik Krogh Kristensen
454893d234
renamed "forinstmt" to "for_in_stmt"
2020-09-04 11:53:15 +02:00
Erik Krogh Kristensen
712a6dfccd
renamed "forstmt" to "for_stmt"
2020-09-04 11:53:14 +02:00
Erik Krogh Kristensen
4c24e2d8ba
renamed "dowhilestmt" to "do_while_stmt"
2020-09-04 11:53:13 +02:00
Erik Krogh Kristensen
ed585de1a0
renamed "whilestmt" to "while_stmt"
2020-09-04 11:53:13 +02:00
Erik Krogh Kristensen
f749d46fe8
renamed "trystmt" to "try_stmt"
2020-09-04 11:53:12 +02:00
Erik Krogh Kristensen
4762c9eac8
renamed "throwstmt" to "throw_stmt"
2020-09-04 11:53:11 +02:00
Erik Krogh Kristensen
5e2c25eacd
renamed "returnstmt" to "return_stmt"
2020-09-04 11:53:10 +02:00
Erik Krogh Kristensen
b3746efec8
renamed "switchstmt" to "switch_stmt"
2020-09-04 11:53:10 +02:00
Erik Krogh Kristensen
3f47afa595
renamed "withstmt" to "with_stmt"
2020-09-04 11:53:09 +02:00
Erik Krogh Kristensen
569c5f19cb
renamed "continuestmt" to "continue_stmt"
2020-09-04 11:53:08 +02:00
Erik Krogh Kristensen
4a44f0ee23
renamed "breakstmt" to "break_stmt"
2020-09-04 11:53:07 +02:00
Erik Krogh Kristensen
ded939468e
renamed "labeledstmt" to "labeled_stmt"
2020-09-04 11:53:07 +02:00
Erik Krogh Kristensen
90b45c4052
renamed "ifstmt" to "if_stmt"
2020-09-04 11:53:06 +02:00
Erik Krogh Kristensen
a752ef79a2
renamed "exprstmt" to "expr_stmt"
2020-09-04 11:53:05 +02:00
Erik Krogh Kristensen
03c8eb87d2
renamed "blockstmt" to "block_stmt"
2020-09-04 11:53:04 +02:00
Erik Krogh Kristensen
54edbca268
renamed "emptystmt" to "empty_stmt"
2020-09-04 11:53:04 +02:00
Erik Krogh Kristensen
fe121fb2ba
renamed "globalaugmentationdeclaration" to "global_augmentation_declaration"
2020-09-04 11:53:03 +02:00
Erik Krogh Kristensen
b4ccf4eb60
renamed "externalmoduledeclaration" to "external_module_declaration"
2020-09-04 11:53:02 +02:00
Erik Krogh Kristensen
f7cce51152
renamed "namespacedeclaration" to "namespace_declaration"
2020-09-04 11:53:01 +02:00
Erik Krogh Kristensen
5f9ae889e0
renamed "functionexpr" to "function_expr"
2020-09-04 11:53:00 +02:00
Erik Krogh Kristensen
868214dfff
renamed "arrowfunctionexpr" to "arrow_function_expr"
2020-09-04 11:52:59 +02:00
Erik Krogh Kristensen
42084b55cc
renamed "stmtparent" to "stmt_parent"
2020-09-04 11:52:58 +02:00
Erik Krogh Kristensen
05deebbe9e
renamed "jsxemptyexpr" to "jsx_empty_expr"
2020-09-04 11:52:58 +02:00
Erik Krogh Kristensen
e5e8951b20
renamed "expressionwithtypearguments" to "expression_with_type_arguments"
2020-09-04 11:52:57 +02:00
Erik Krogh Kristensen
334bbd83a8
renamed "jsxqualifiedname" to "jsx_qualified_name"
2020-09-04 11:52:56 +02:00
Erik Krogh Kristensen
61cf752e67
renamed "equalitytest" to "equality_test"
2020-09-04 11:52:55 +02:00
Erik Krogh Kristensen
7bff2a18f0
renamed "declarablenode" to "declarable_node"
2020-09-04 11:52:55 +02:00
Erik Krogh Kristensen
1a979f52ab
renamed "classorinterface" to "class_or_interface"
2020-09-04 11:52:54 +02:00
Erik Krogh Kristensen
5efa551c80
renamed "literaltype" to "literal_type"
2020-09-04 11:52:53 +02:00
Erik Krogh Kristensen
906865b057
renamed "typevariabletype" to "typevariable_type"
2020-09-04 11:52:52 +02:00
Erik Krogh Kristensen
fea92773bd
renamed "unionorintersectiontype" to "union_or_intersection_type"
2020-09-04 11:52:51 +02:00
Erik Krogh Kristensen
5355e23c1a
renamed "symboltype" to "symbol_type"
2020-09-04 11:52:51 +02:00
Erik Krogh Kristensen
cdcf9e87fd
renamed "functiontypeexpr" to "function_typeexpr"
2020-09-04 11:52:50 +02:00
Erik Krogh Kristensen
910b328022
renamed "importtypeexpr" to "import_typeexpr"
2020-09-04 11:52:49 +02:00
Erik Krogh Kristensen
95aa5a171a
renamed "namespaceaccess" to "namespace_access"
2020-09-04 11:52:48 +02:00
Erik Krogh Kristensen
a7bfca6fea
renamed "literaltypeexpr" to "literal_typeexpr"
2020-09-04 11:52:47 +02:00
Erik Krogh Kristensen
a46f1cd070
renamed "readonlytypeexpr" to "readonly_typeexpr"
2020-09-04 11:52:46 +02:00
Erik Krogh Kristensen
28fc1d8267
renamed "bigintliteraltypeexpr" to "bigint_literal_typeexpr"
2020-09-04 11:52:45 +02:00
Erik Krogh Kristensen
bb78c3e759
renamed "resttypeexpr" to "rest_typeexpr"
2020-09-04 11:52:45 +02:00
Erik Krogh Kristensen
584901e8af
renamed "optionaltypeexpr" to "optional_typeexpr"
2020-09-04 11:52:44 +02:00
Erik Krogh Kristensen
f784579c4b
renamed "importvartypeaccess" to "import_var_type_access"
2020-09-04 11:52:43 +02:00
Erik Krogh Kristensen
cb0080ab07
renamed "importnamespaceaccess" to "import_namespace_access"
2020-09-04 11:52:42 +02:00
Erik Krogh Kristensen
fe4f3d3656
renamed "importtypeaccess" to "import_type_access"
2020-09-04 11:52:42 +02:00
Erik Krogh Kristensen
27af8f0a42
renamed "infertypeexpr" to "infer_typeexpr"
2020-09-04 11:52:41 +02:00
Erik Krogh Kristensen
a04f99b24d
renamed "conditionaltypeexpr" to "conditional_typeexpr"
2020-09-04 11:52:40 +02:00
Erik Krogh Kristensen
8ca7f3aa5c
renamed "mappedtypeexpr" to "mapped_typeexpr"
2020-09-04 11:52:40 +02:00
Erik Krogh Kristensen
9535fb4045
renamed "qualifiednamespaceaccess" to "qualified_namespace_access"
2020-09-04 11:52:39 +02:00
Erik Krogh Kristensen
a88d520866
renamed "localnamespaceaccess" to "local_namespace_access"
2020-09-04 11:52:38 +02:00
Erik Krogh Kristensen
d91ba5ac54
renamed "constructortypeexpr" to "constructor_typeexpr"
2020-09-04 11:52:37 +02:00
Erik Krogh Kristensen
bdb08156b4
renamed "plainfunctiontypeexpr" to "plain_function_typeexpr"
2020-09-04 11:52:37 +02:00
Erik Krogh Kristensen
7dd107c2be
renamed "typeparameter" to "type_parameter"
2020-09-04 11:52:36 +02:00
Erik Krogh Kristensen
b3fa43ab1d
renamed "interfacetypeexpr" to "interface_typeexpr"
2020-09-04 11:52:35 +02:00
Erik Krogh Kristensen
8ee4f79727
renamed "predicatetypeexpr" to "predicate_typeexpr"
2020-09-04 11:52:34 +02:00
Erik Krogh Kristensen
224290c861
renamed "thisvartypeaccess" to "this_var_type_access"
2020-09-04 11:52:33 +02:00
Erik Krogh Kristensen
0e4ff33652
renamed "qualifiedvartypeaccess" to "qualified_var_type_access"
2020-09-04 11:52:33 +02:00
Erik Krogh Kristensen
0f02263d83
renamed "localvartypeaccess" to "local_var_type_access"
2020-09-04 11:52:32 +02:00
Erik Krogh Kristensen
ac4a2ae6e0
renamed "typeoftypeexpr" to "typeof_typeexpr"
2020-09-04 11:52:31 +02:00
Erik Krogh Kristensen
2b2fb83cdc
renamed "typelabel" to "type_label"
2020-09-04 11:52:30 +02:00
Erik Krogh Kristensen
2ba01ec13c
renamed "generictypeexpr" to "generic_typeexpr"
2020-09-04 11:52:30 +02:00
Erik Krogh Kristensen
3caf5c9258
renamed "qualifiedtypeaccess" to "qualified_type_access"
2020-09-04 11:52:29 +02:00
Erik Krogh Kristensen
af56939703
renamed "keyoftypeexpr" to "keyof_typeexpr"
2020-09-04 11:52:28 +02:00
Erik Krogh Kristensen
30500fcf9b
renamed "tupletypeexpr" to "tuple_typeexpr"
2020-09-04 11:52:27 +02:00
Erik Krogh Kristensen
3591c22d82
renamed "parenthesizedtypeexpr" to "parenthesized_typeexpr"
2020-09-04 11:52:26 +02:00
Erik Krogh Kristensen
36e76c1146
renamed "intersectiontypeexpr" to "intersection_typeexpr"
2020-09-04 11:52:26 +02:00
Erik Krogh Kristensen
0c1b1fd836
renamed "indexedaccesstypeexpr" to "indexed_access_typeexpr"
2020-09-04 11:52:25 +02:00
Erik Krogh Kristensen
52c6ce057d
renamed "uniontypeexpr" to "union_typeexpr"
2020-09-04 11:52:24 +02:00
Erik Krogh Kristensen
2b822a56ff
renamed "arraytypeexpr" to "array_typeexpr"
2020-09-04 11:52:23 +02:00
Erik Krogh Kristensen
8b7d37ef9d
renamed "booleanliteraltypeexpr" to "boolean_literal_typeexpr"
2020-09-04 11:52:23 +02:00
Erik Krogh Kristensen
31d66dd1cd
renamed "numberliteraltypeexpr" to "number_literal_typeexpr"
2020-09-04 11:52:22 +02:00
Erik Krogh Kristensen
d72dd3253e
renamed "stringliteraltypeexpr" to "string_literal_typeexpr"
2020-09-04 11:52:21 +02:00
Erik Krogh Kristensen
d6391b4830
renamed "keywordtypeexpr" to "keyword_typeexpr"
2020-09-04 11:52:20 +02:00
Erik Krogh Kristensen
edae1a7ad3
renamed "typedecl" to "type_decl"
2020-09-04 11:52:19 +02:00
Erik Krogh Kristensen
54bd914477
renamed "localtypeaccess" to "local_type_access"
2020-09-04 11:52:19 +02:00
Erik Krogh Kristensen
81909b58dc
renamed "exprortype" to "expr_or_type"
2020-09-04 11:52:18 +02:00
Erik Krogh Kristensen
d7553461b0
renamed "exprorstmt" to "expr_or_stmt"
2020-09-04 11:52:17 +02:00
Erik Krogh Kristensen
22bce641b7
renamed "isAsync" to "is_async"
2020-09-04 11:52:16 +02:00
Erik Krogh Kristensen
ba645b555f
renamed "hasRestParameter" to "has_rest_parameter"
2020-09-04 11:52:15 +02:00
Erik Krogh Kristensen
b3f7c26669
renamed "isGenerator" to "is_generator"
2020-09-04 11:52:14 +02:00
Erik Krogh Kristensen
a57f93b41e
renamed "unicodePropertyEscapeValue" to "unicode_property_escapevalue"
2020-09-04 11:52:13 +02:00
Erik Krogh Kristensen
3ed310fb7b
renamed "unicodePropertyEscapeName" to "unicode_property_escapename"
2020-09-04 11:52:12 +02:00
Erik Krogh Kristensen
acc13ddd04
renamed "namedBackref" to "named_backref"
2020-09-04 11:52:12 +02:00
Erik Krogh Kristensen
23127cb4af
renamed "charClassEscape" to "char_class_escape"
2020-09-04 11:52:11 +02:00
Erik Krogh Kristensen
21733afc32
renamed "regexpConstValue" to "regexp_const_value"
2020-09-04 11:52:10 +02:00
Erik Krogh Kristensen
9a1a439c76
renamed "isInverted" to "is_inverted"
2020-09-04 11:52:09 +02:00
Erik Krogh Kristensen
fbcd3dd893
renamed "isNamedCapture" to "is_named_capture"
2020-09-04 11:52:08 +02:00
Erik Krogh Kristensen
2dc9022aa6
renamed "isCapture" to "is_capture"
2020-09-04 11:52:08 +02:00
Erik Krogh Kristensen
35b5b660c5
renamed "rangeQuantifierUpperBound" to "range_quantifier_upper_bound"
2020-09-04 11:52:07 +02:00
Erik Krogh Kristensen
defbee2567
renamed "rangeQuantifierLowerBound" to "range_quantifier_lower_bound"
2020-09-04 11:52:06 +02:00
Erik Krogh Kristensen
0962af51d2
renamed "isGreedy" to "is_greedy"
2020-09-04 11:52:05 +02:00
Erik Krogh Kristensen
37432232b8
renamed "regexpParseErrors" to "regexp_parse_errors"
2020-09-04 11:52:05 +02:00
Erik Krogh Kristensen
fdb615fb91
renamed "jsParseErrors" to "js_parse_errors"
2020-09-04 11:52:04 +02:00
Erik Krogh Kristensen
b5d6cbd5b3
renamed "hasAssertsKeyword" to "has_asserts_keyword"
2020-09-04 11:52:03 +02:00
Erik Krogh Kristensen
fc7f024147
renamed "isOptionalParameterDeclaration" to "is_optional_parameter_declaration"
2020-09-04 11:52:02 +02:00
Erik Krogh Kristensen
3f3b4d65bd
renamed "hasDefiniteAssignmentAssertion" to "has_definite_assignment_assertion"
2020-09-04 11:52:01 +02:00
Erik Krogh Kristensen
8ae48bbf8b
renamed "isOptionalMember" to "is_optional_member"
2020-09-04 11:52:01 +02:00
Erik Krogh Kristensen
8c969f0539
renamed "hasTypeKeyword" to "has_type_keyword"
2020-09-04 11:52:00 +02:00
Erik Krogh Kristensen
007447b0ad
renamed "hasReadonlyKeyword" to "has_readonly_keyword"
2020-09-04 11:51:59 +02:00
Erik Krogh Kristensen
4b74c1d4b3
renamed "hasProtectedKeyword" to "has_protected_keyword"
2020-09-04 11:51:58 +02:00
Erik Krogh Kristensen
719c0d2030
renamed "hasPrivateKeyword" to "has_private_keyword"
2020-09-04 11:51:58 +02:00
Erik Krogh Kristensen
82ddbc3b47
renamed "hasPublicKeyword" to "has_public_keyword"
2020-09-04 11:51:57 +02:00
Erik Krogh Kristensen
29e5bdb4d7
renamed "isAbstractClass" to "is_abstract_class"
2020-09-04 11:51:56 +02:00
Erik Krogh Kristensen
a0afcaa3a8
renamed "isConstEnum" to "is_const_enum"
2020-09-04 11:51:55 +02:00
Erik Krogh Kristensen
ac345fbecd
renamed "isAbstractMember" to "is_abstract_member"
2020-09-04 11:51:54 +02:00
Erik Krogh Kristensen
2c3b3e7173
renamed "isStatic" to "is_static"
2020-09-04 11:51:54 +02:00
Erik Krogh Kristensen
10439fb522
renamed "isMethod" to "is_method"
2020-09-04 11:51:53 +02:00
Erik Krogh Kristensen
6382f6d202
renamed "isComputed" to "is_computed"
2020-09-04 11:51:52 +02:00
Erik Krogh Kristensen
2204b1e92d
renamed "isArgumentsObject" to "is_arguments_object"
2020-09-04 11:51:51 +02:00
Erik Krogh Kristensen
3fb561d72b
renamed "isDelegating" to "is_delegating"
2020-09-04 11:51:50 +02:00
Erik Krogh Kristensen
ba600acd5e
renamed "arraySize" to "array_size"
2020-09-04 11:51:50 +02:00
Erik Krogh Kristensen
83b89fa52d
renamed "exprContainers" to "expr_containers"
2020-09-04 11:51:49 +02:00
Erik Krogh Kristensen
30ba7d29a1
renamed "enclosingStmt" to "enclosing_stmt"
2020-09-04 11:51:48 +02:00
Erik Krogh Kristensen
99f8887844
renamed "isForAwaitOf" to "is_for_await_of"
2020-09-04 11:51:47 +02:00
Erik Krogh Kristensen
621e702e99
renamed "hasDeclareKeyword" to "has_declare_keyword"
2020-09-04 11:51:46 +02:00
Erik Krogh Kristensen
49b71d515c
renamed "isInstantiated" to "is_instantiated"
2020-09-04 11:51:45 +02:00
Erik Krogh Kristensen
76f728aacd
renamed "jumpTargets" to "jump_targets"
2020-09-04 11:51:45 +02:00
Erik Krogh Kristensen
059d72858a
renamed "stmtContainers" to "stmt_containers"
2020-09-04 11:51:44 +02:00
Erik Krogh Kristensen
07fd747069
renamed "isClosureModule" to "is_closure_module"
2020-09-04 11:51:43 +02:00
Erik Krogh Kristensen
2a2901f6ae
renamed "isES2015Module" to "is_es2015_module"
2020-09-04 11:51:42 +02:00
Erik Krogh Kristensen
8782c2b8e0
renamed "isNodejs" to "is_nodejs"
2020-09-04 11:51:41 +02:00
Erik Krogh Kristensen
4fb6d6060c
renamed "isModule" to "is_module"
2020-09-04 11:51:40 +02:00
Erik Krogh Kristensen
39ff727ec7
renamed "isExterns" to "is_externs"
2020-09-04 11:51:39 +02:00
Erik Krogh Kristensen
05c38da2cb
add section to Aliases.qll for deprecated dbscheme relations
2020-09-04 11:51:38 +02:00
Erik Krogh Kristensen
41eed43aa4
create upgrade folder for renamings
2020-09-04 11:51:38 +02:00
Asger Feldthaus
961554eb6f
JS: Autoformat
2020-09-04 10:42:26 +01:00
yoff
7a00fbc654
Merge pull request #4154 from RasmusWL/python-more-complete-dataflow-tests
...
Python more complete dataflow tests
2020-09-04 11:35:24 +02:00
Rasmus Wriedt Larsen
2f480597ef
Merge pull request #4157 from RasmusWL/add-labeler-action
...
Enable labeler action again
2020-09-04 11:15:15 +02:00
Rasmus Wriedt Larsen
f12fa52e22
Python: Update inline example for TypeTracker usage
2020-09-04 11:11:30 +02:00
Rasmus Wriedt Larsen
189c94f9e3
Python: Add TypeTracker::end()
...
Copied from JS
2020-09-04 11:10:10 +02:00
Rasmus Wriedt Larsen
7855576a69
Python: TypeTracker only exposes its own interface
...
This is especially important if the TypeTracker needs to be publicly imported by
DataFlowPublic.
2020-09-04 10:58:20 +02:00
Geoffrey White
6c40e22f45
C++: Support further reverse taint flows on things that return *this.
2020-09-04 09:45:10 +01:00
Geoffrey White
018b0a5abf
C++: Model std::string front, back and push_back.
2020-09-04 09:45:07 +01:00
Geoffrey White
6e734a894f
C++: Additional test cases for std::string.
2020-09-04 09:44:58 +01:00
Tamas Vajk
e2c205deb4
C#: Add stable order for generated accessors in printed AST
2020-09-04 10:39:01 +02:00
Erik Krogh Kristensen
fd05156298
clarifying comment on the last jQuery inconsistency
2020-09-04 10:30:42 +02:00
Erik Krogh Kristensen
b18f51806c
regain the lost property presence result
2020-09-04 10:30:38 +02:00
Asger F
0704be4d41
Update javascript/ql/src/semmle/javascript/TypeScript.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-04 08:55:31 +01:00
Max Schaefer
252902d245
JavaScript: Restructure API-graph tests.
...
With the old test runner we cannot have `VerifyAssertions.qlref`s for each individual test that reference a shared `VerifyAssertions.ql` in the parent directory, since it doesn't like nested tests.
Instead, we have to turn `VerifyAssertions.ql` into `VerifyAssertions.qll`, and each `VerifyAsssertions.qlref` into a `VerifyAssertions.ql` that imports it.
But then that doesn't work with our old directory structure, since the import path would have to contain the invalid identifier `library-tests`. As a workaround, I have moved the API graph tests into a directory without dashes in its path.
2020-09-04 08:43:15 +01:00
Erik Krogh Kristensen
6fccf5aa70
use isLikelyIntentionalHtmlSink in the sink instead of in the where clause
2020-09-04 09:26:03 +02:00
CodeQL CI
58f51899c9
Merge pull request #4173 from erik-krogh/targetBlankFP
...
Approved by esbena
2020-09-04 08:21:22 +01:00
Tom Hvitved
7f18c3377e
Merge pull request #4017 from hvitved/csharp/unqualify-trap-ids3
...
C#: Remove assembly prefixes from TRAP labels
2020-09-04 09:20:39 +02:00
Jonas Jensen
fbe42fb64c
C++: Support != constant in range analysis
2020-09-04 09:20:23 +02:00
Jonas Jensen
d061b09fe0
C++: Test showing no support for != and !
2020-09-04 09:02:42 +02:00
Max Schaefer
cb433a0c0f
JavaScript: Add test for custom API-graph entry points.
2020-09-03 22:28:09 +01:00
Max Schaefer
58702e4c52
JavaScript: Rename EntryPoint.getADef to getARhs.
2020-09-03 22:28:09 +01:00
Max Schaefer
f3173ca968
JavaScript: Add a few unit tests for API graphs.
2020-09-03 22:28:09 +01:00
Max Schaefer
985399f4cf
JavaScript: Move ApiGraphs library to semmle.javascript and import it from javascript.qll.
2020-09-03 22:28:09 +01:00
Max Schaefer
aaa70e4ad3
JavaScript: Make API-graph edge labels accessible outside ApiGraphs.qll.
2020-09-03 22:28:09 +01:00
Max Schaefer
7239f1fb6f
JavaScript: Distinguish more carefully between def and use nodes in API graphs.
...
In particular, we now have two different kinds of module features: module definitions and module uses.
For the most part, `API::Definition`s correspond to right-hand sides in the data-flow graph, and `API::Use`s correspond to references. However, module definitions can have references (via the CommonJS `module` variable), and so can their exports (via `module.exports` or `exports`). Note that this is different from references to uses of the module, which are simply imports.
2020-09-03 22:28:09 +01:00
Mathias Vorreiter Pedersen
b7774b2a82
Merge pull request #4201 from geoffw0/insert
...
C++: Model iterator versions of string and vector methods
2020-09-03 21:45:36 +02:00
Geoffrey White
1d04c89927
C++: Autoformat.
2020-09-03 18:54:36 +01:00
Geoffrey White
5124660831
C++: Change note.
2020-09-03 18:54:27 +01:00
Geoffrey White
2d7552358b
C++: Put in a better fix.
2020-09-03 18:51:57 +01:00
Geoffrey White
a1c7fd8fec
C++: Remove the workaround for CPP-331.
2020-09-03 18:51:21 +01:00
Geoffrey White
5150bf30e7
C++: Add another test case inspired by CPP-331.
2020-09-03 18:50:11 +01:00
Geoffrey White
1483306c4c
C++: Add more tests.
2020-09-03 18:39:50 +01:00
CodeQL CI
f180497554
Merge pull request #4192 from max-schaefer/js/ssa__implicitinit
...
Approved by asgerf
2020-09-03 16:46:56 +01:00
Max Schaefer
d8fbf60cbf
JavaScript: Weaken a few types to stay under BDD node limit.
...
`SourceNode` in cached layers seems particularly problematic.
2020-09-03 14:29:04 +01:00
Max Schaefer
e77948103f
JavaScript: Remove AdditionalFeature from ApiGraphs.
...
I ended up not using it for flow summaries, so at this point it is purely speculative generality. We can reintroduce it later if we need to.
2020-09-03 14:29:04 +01:00
Max Schaefer
924ef6ae5d
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 14:04:23 +01:00
Rasmus Wriedt Larsen
29bf98ad26
Python: Fix CUSTOM_SOURCE dataflow regression test
2020-09-03 15:03:53 +02:00
Asger Feldthaus
c05f5c1bc2
JS: Change note
2020-09-03 14:02:08 +01:00
Asger Feldthaus
393db73d0a
JS: Update test
2020-09-03 14:01:40 +01:00
Asger Feldthaus
bfcc434a61
JS: Use both local and global names in hasQualifiedName
2020-09-03 14:01:13 +01:00
Asger Feldthaus
f7552a77c3
JS: Add metric for number of types with qualified names
2020-09-03 14:01:13 +01:00
Rasmus Wriedt Larsen
febbe1229a
Merge branch 'main' into python-more-complete-dataflow-tests
2020-09-03 14:58:20 +02:00
CodeQL CI
c8ffde20f4
Merge pull request #4195 from RasmusWL/python-taint-default-sanitizer
...
Approved by tausbn
2020-09-03 13:55:32 +01:00
Erik Krogh Kristensen
ed54fdcb06
Merge pull request #4118 from dellalibera/js/ldap
...
[javascript] CodeQL to detect LDAP Injection
2020-09-03 14:50:03 +02:00
Erik Krogh Kristensen
d56ea22018
Merge pull request #4200 from erik-krogh/typeaheadInconsistencyComment
...
JS: adjust comment about inconsistency for XSS in typeahead
2020-09-03 13:56:40 +02:00
Erik Krogh Kristensen
d946a61d6e
update expected output
2020-09-03 13:32:54 +02:00
Nick Rolfe
b8ae87470d
Merge pull request #4182 from github/igfoo/cfg
...
C++: Remove some remnants of the extractor CFG
2020-09-03 12:22:04 +01:00
Geoffrey White
50d9a85143
C++: Update change note.
2020-09-03 10:52:27 +01:00
Geoffrey White
d4cbb25e09
C++: Model std::string constructors and container constructors that use iterators.
2020-09-03 10:52:27 +01:00
Geoffrey White
1ac0aa169d
C++: Add a few more test cases.
2020-09-03 10:52:26 +01:00
Geoffrey White
1ad404c605
C++: Extend model to include std::forward_list::insert_after.
2020-09-03 10:52:26 +01:00
Geoffrey White
fcacb22cad
C++: Use [] in std::string begin model.
2020-09-03 10:52:26 +01:00
Geoffrey White
95ca4b674d
C++: Add model for std::vector::insert.
2020-09-03 10:52:25 +01:00
Geoffrey White
f61c7ffc1a
C++: Add support for iterator parameters to std::vector::assign.
2020-09-03 10:52:25 +01:00
Geoffrey White
8e9faac363
C++: Add support for std::vector begin and end.
2020-09-03 10:52:24 +01:00
Geoffrey White
4d47eaa08d
C++: Add support for iterator parameters to std::string::assign.
2020-09-03 10:52:24 +01:00
Geoffrey White
98f84646d6
C++: Result changes due to iterators PR, which adds support for std::string begin and end, and iterator parameters to std::string::insert and some similar functions.
2020-09-03 10:52:24 +01:00
Geoffrey White
7917dff843
C++: Add test cases for std::string and std::vector using iterator methods.
2020-09-03 10:52:23 +01:00
Geoffrey White
fcdbe0f512
C++: Add a const conversion constructor to std::iterator in the tests.
2020-09-03 10:52:23 +01:00
Rasmus Wriedt Larsen
9a821bf449
Merge pull request #4 from yoff/RasmusWL-python-more-complete-dataflow-tests
...
Python: Annotate test file
2020-09-03 11:28:42 +02:00
Rasmus Lerchedahl Petersen
aad51af4ce
Python: use concrete iterable source
2020-09-03 11:25:41 +02:00
yoff
8997799e4d
Merge pull request #1 from RasmusWL/RasmusWL-python-more-complete-dataflow-tests
...
Small fixups to your PR to my PR
2020-09-03 11:14:52 +02:00
Rasmus Wriedt Larsen
b958c3b833
Python: Update comment for test8
2020-09-03 11:13:32 +02:00
CodeQL CI
aa4237c27c
Merge pull request #4191 from erik-krogh/v8Syntax
...
Approved by esbena
2020-09-03 09:57:00 +01:00
Erik Krogh Kristensen
3952553953
adjust comment about inconsistency for XSS in typeahead
2020-09-03 10:50:40 +02:00
Alessio Della Libera
116e7d006d
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 10:32:18 +02:00
Alessio Della Libera
bfae0ef5d5
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-03 10:32:08 +02:00
CodeQL CI
2ba84be565
Merge pull request #4185 from erik-krogh/unusedArrDestruct
...
Approved by esbena
2020-09-03 09:18:15 +01:00
Erik Krogh Kristensen
4fdd2cd794
add change note
2020-09-03 10:06:52 +02:00
Erik Krogh Kristensen
1f9749fbfe
revert mailto: change in TargetBlank.ql
2020-09-03 09:39:01 +02:00
Erik Krogh Kristensen
d7a96d685a
simplify implementation of getDelimiterMatchingRegexp
2020-09-03 09:37:43 +02:00
Erik Krogh Kristensen
87d39db95f
add change note
2020-09-03 08:58:33 +02:00
Erik Krogh Kristensen
ec21236bba
update docstring for isNonLastDestructedArrayElement
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-09-03 08:51:10 +02:00
Erik Krogh Kristensen
fb3148a7a8
autoformat
2020-09-03 08:17:08 +02:00
Mathias Vorreiter Pedersen
0fed7c0745
C++/C#: Sync identical files
2020-09-02 22:53:45 +02:00
Max Schaefer
ec3c1f114c
JavaScript: Simplify steps through promises.
2020-09-02 21:40:34 +01:00
Mathias Vorreiter Pedersen
fa26eed3e2
Update cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-09-02 22:29:38 +02:00
Mathias Vorreiter Pedersen
428bcc5e03
Update cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2020-09-02 22:29:28 +02:00
Arthur Baars
00668b536a
Merge pull request #4188 from aibaars/csharp-buildless
...
C#: autobuild: fix buildless mode for CodeQL
2020-09-02 21:04:39 +02:00
Andrew Eisenberg
d2a91970f3
Update devcontainer memory settings
...
CodeQL CLI needs a minimum of 2G of memory. By default, the memory used is slightly less than that, leading to poor performance.
2020-09-02 12:04:34 -07:00
Max Schaefer
702192c316
JavaScript: Make implicit inits of module and exports source nodes.
...
This is instead of making every access to those variables source nodes, and fixes a regression in `DeadStoreOfProperty`.
2020-09-02 19:52:13 +01:00
Max Schaefer
9840a7ddfb
JavaScript: Add utility predicate SSA::implicitInit.
2020-09-02 19:46:59 +01:00
Max Schaefer
d81d80430e
JavaScript: Add a regression test for DeadStoreOfProperty.
2020-09-02 19:45:27 +01:00
Max Schaefer
df49818152
JavaScript: Address review comments.
2020-09-02 19:45:27 +01:00
Ian Lynagh
8c7431c4ae
C++: Put {true,false}cond_base back as deprecated predicates for now
2020-09-02 19:10:36 +01:00
Ian Lynagh
c980ccf7c5
C++: Add an upgrade script
2020-09-02 19:05:05 +01:00
Ian Lynagh
8ce1edbed3
C++: Update stats now CFG tables have been removed
2020-09-02 19:05:05 +01:00
Tom Hvitved
26639a113e
C#: Rename Layout.Condition to FilePattern and move to separate file
2020-09-02 19:41:22 +02:00
Max Schaefer
82d92dc726
JavaScript: Avoid bad join order.
...
The optimiser decided that it would be a great idea to start the pipeline with `getReturn().getAUse().(DataFlow::InvokeNode)`. It's not.
2020-09-02 17:42:33 +01:00
Max Schaefer
500f7bd8fa
JavaScript: Reduce complexity of SystemCommandExecutors charpred.
2020-09-02 17:42:32 +01:00
Max Schaefer
e3a9906071
JavaScript: Switch MissingRateLimiting.qll to API graphs.
...
The added test shows how this helps us avoid false positives.
2020-09-02 17:35:47 +01:00
Max Schaefer
e34a821cc6
JavaScript: Switch system-command executor modelling from source nodes to API graphs.
2020-09-02 17:35:47 +01:00
Max Schaefer
6d68036d85
JavaScript: Add test demonstrating more SQL flow.
2020-09-02 17:35:47 +01:00
Max Schaefer
68b3ccdc65
JavaScript: Switch SQL modelling from source nodes to API graphs.
2020-09-02 17:35:47 +01:00
Max Schaefer
f3e9104be4
JavaScript: Add implementation of API graphs.
2020-09-02 17:35:47 +01:00
Arthur Baars
babe69d6e9
Update unit tests
2020-09-02 17:59:56 +02:00
Mathias Vorreiter Pedersen
3cbc4cf0b9
C++: Add field to object taint tests
2020-09-02 17:32:46 +02:00
Rasmus Wriedt Larsen
bf34b07605
Python: Add a few taint tests for default sanitizer
...
specifically the ones removes from dataflow tests in https://github.com/yoff/codeql/pull/1
2020-09-02 16:56:05 +02:00
Taus
8e86d56bce
Merge pull request #4189 from RasmusWL/python-experimental-file-structure
...
Python: Move files in experimental dirs to be consistent
2020-09-02 16:34:35 +02:00
Arthur Baars
90f013d74f
Merge pull request #4176 from aibaars/missing-qhelp
...
Add missing QHelp files
2020-09-02 16:12:42 +02:00
Asger F
2c0e9f0c86
Merge pull request #4186 from github/rc/1.25
...
Mergeback: 1.25 -> main
2020-09-02 15:12:25 +01:00
Mathias Vorreiter Pedersen
7f5f6b15f7
C++: Make FieldContent private again
2020-09-02 16:05:40 +02:00
Rasmus Wriedt Larsen
4387d106aa
Python: Fix formatting (last time, promise)
2020-09-02 15:36:50 +02:00
Rasmus Wriedt Larsen
8aab0c8be7
Python: Fix .qlref for experimental security tests
2020-09-02 15:35:50 +02:00
Max Schaefer
cd64ce7b1a
JavaScript: Add utility predicate SSA::implicitInit.
2020-09-02 14:34:52 +01:00
CodeQL CI
c017308505
Merge pull request #4134 from erik-krogh/genCalls
...
Approved by asgerf
2020-09-02 14:23:39 +01:00
Alessio Della Libera
785f335ab8
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:33 +02:00
Alessio Della Libera
548cb65a64
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:23 +02:00
Alessio Della Libera
26046a4847
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:22:07 +02:00
Alessio Della Libera
6ad88bf93f
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.ql
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-02 15:21:55 +02:00
Arthur Baars
3ed6465716
Address comments
2020-09-02 15:18:31 +02:00
Jonas Jensen
5760213490
Merge pull request #4190 from lcartey/cpp/range-analysis-extensible-assign-ops
...
C++: Support `AssignOperation`s with `SimpleRangeAnalysisExpr`s
2020-09-02 15:16:35 +02:00
Anders Schack-Mulligen
ed6c1798e2
Java: Fix reference to Unit.
2020-09-02 14:47:01 +02:00
Anders Schack-Mulligen
ca8fd6197a
Merge pull request #4187 from RasmusWL/java-experimental-file-structure
...
Java: Move files in experiemntal dirs to be consistent
2020-09-02 14:41:26 +02:00
Mathias Vorreiter Pedersen
69c1eadfdc
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-02 14:21:23 +02:00
Erik Krogh Kristensen
bb0e5d5718
give V8 build-ins their correct name
2020-09-02 14:05:59 +02:00
Rasmus Wriedt Larsen
bf3a266f58
Python: dataflow regression tests: remove taint tracking tests
...
they will be reintroduced in an other PR
2020-09-02 13:51:00 +02:00
Mathias Vorreiter Pedersen
5546830af7
C++: Fix a join order in readStep using the unbindInt predicate from the shared dataflow library. This is the tuple counts on ChakraCore before the fix:
...
(5539s) Tuple counts for DataFlowPrivate::readStep#fff:
3208924 ~0% {2} r1 = SCAN Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS I OUTPUT I.<1>, I.<0>
3208924 ~2% {2} r2 = JOIN r1 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<1>
751306 ~8% {2} r3 = JOIN r2 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
751306 ~0% {3} r4 = JOIN r3 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r3.<0>, r3.<1>, R.<1>
751306 ~0% {4} r5 = JOIN r4 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<0>, r4.<2>
751306 ~2% {4} r6 = JOIN r5 WITH Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r5.<1>, r5.<2>, r5.<3>
209341 ~0% {4} r7 = JOIN r6 WITH Instruction::Instruction::getResultType_dispred#fb AS R ON FIRST 1 OUTPUT R.<1>, r6.<1>, r6.<2>, r6.<3>
7115323 ~1% {6} r8 = JOIN r7 WITH DataFlowPrivate::FieldContent#class#ffff_1023#join_rhs AS R ON FIRST 1 OUTPUT R.<2>, R.<3>, r7.<1>, r7.<2>, r7.<3>, R.<1>
81341188413 ~0% {5} r9 = JOIN r8 WITH SSAConstruction::Cached::getUsedInterval#fff_120#join_rhs AS R ON FIRST 2 OUTPUT r8.<3>, R.<2>, r8.<2>, r8.<4>, r8.<5>
137684 ~7% {3} r10 = JOIN r9 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 2 OUTPUT r9.<2>, r9.<4>, r9.<3>
751306 ~0% {3} r11 = JOIN r4 WITH Instruction::LoadInstruction::getSourceAddress_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<2>
94306 ~0% {3} r12 = JOIN r11 WITH Instruction::FieldInstruction::getField_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r11.<1>, r11.<2>
152363 ~6% {3} r13 = JOIN r12 WITH DataFlowPrivate::FieldContent::getField_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r12.<1>, R.<1>, r12.<2>
290047 ~22% {3} r14 = r10 \/ r13
return r14
and after:
(851s) Tuple counts for DataFlowPrivate::readStep#fff:
3208924 ~0% {2} r1 = SCAN Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS I OUTPUT I.<1>, I.<0>
3208924 ~2% {2} r2 = JOIN r1 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r1.<1>, R.<1>
751306 ~8% {2} r3 = JOIN r2 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, r2.<1>
751306 ~0% {3} r4 = JOIN r3 WITH DataFlowUtil::TInstructionNode#ff AS R ON FIRST 1 OUTPUT r3.<0>, r3.<1>, R.<1>
751306 ~0% {4} r5 = JOIN r4 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT r4.<0>, r4.<1>, r4.<2>, R.<1>
751306 ~0% {5} r6 = JOIN r5 WITH Instruction::CopyInstruction::getSourceValueOperand_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r5.<1>, r5.<0>, r5.<2>, r5.<3>
751306 ~0% {5} r7 = JOIN r6 WITH Operand::NonPhiMemoryOperand::getAnyDef_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r6.<1>, r6.<2>, r6.<3>, r6.<4>
209341 ~1% {5} r8 = JOIN r7 WITH Instruction::Instruction::getResultType_dispred#fb AS R ON FIRST 1 OUTPUT R.<1>, r7.<1>, r7.<2>, r7.<3>, r7.<4>
7115323 ~0% {7} r9 = JOIN r8 WITH DataFlowPrivate::FieldContent#class#ffff_1023#join_rhs AS R ON FIRST 1 OUTPUT r8.<4>, r8.<1>, r8.<2>, r8.<3>, R.<1>, R.<2>, R.<3>
7116087 ~0% {9} r10 = JOIN r9 WITH SSAConstruction::Cached::getUsedInterval#fff@staged_ext AS R ON FIRST 1 OUTPUT r9.<1>, r9.<2>, r9.<3>, r9.<0>, r9.<4>, r9.<5>, r9.<6>, R.<1>, R.<2>
449879 ~4% {9} r11 = SELECT r10 ON r10.<5> <= r10.<7>
193804 ~1% {9} r12 = SELECT r11 ON r11.<5> >= r11.<7>
154980 ~0% {9} r13 = SELECT r12 ON r12.<6> <= r12.<8>
137684 ~0% {9} r14 = SELECT r13 ON r13.<6> >= r13.<8>
137684 ~7% {3} r15 = SCAN r14 OUTPUT r14.<0>, r14.<4>, r14.<2>
751306 ~0% {3} r16 = JOIN r4 WITH Instruction::LoadInstruction::getSourceAddress_dispred#ff AS R ON FIRST 1 OUTPUT R.<1>, r4.<1>, r4.<2>
94306 ~0% {3} r17 = JOIN r16 WITH Instruction::FieldInstruction::getField_dispred#3#ff AS R ON FIRST 1 OUTPUT R.<1>, r16.<1>, r16.<2>
152363 ~6% {3} r18 = JOIN r17 WITH DataFlowPrivate::FieldContent::getField_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r17.<1>, R.<1>, r17.<2>
290047 ~22% {3} r19 = r15 \/ r18
return r19
2020-09-02 13:50:55 +02:00
Rasmus Wriedt Larsen
552637a446
Python: dataflow regression tests: fix flow_in_iteration
2020-09-02 13:50:24 +02:00
Rasmus Wriedt Larsen
4977790617
Python: dataflow regression tests: fix source2
2020-09-02 13:49:56 +02:00
Mathias Vorreiter Pedersen
7d00b49d05
C++: Accept test changes
2020-09-02 13:42:35 +02:00
Rasmus Wriedt Larsen
34c5da563e
Python: Move files in experiemntal dirs to be consistent
...
Except for dataflow (where we have a lot of changes, and I don't want to
introduce lots of merge conflicts right now).
2020-09-02 13:39:01 +02:00
Rasmus Wriedt Larsen
9c8b829d65
Python: Fix formatting
2020-09-02 13:27:35 +02:00
Arthur Baars
223d94219e
C#: autobuild: fix buildless mode for CodeQL
2020-09-02 13:23:23 +02:00
lcartey@github.com
fdfa75f3ec
C++: Range analysis, allow extensible assign operations
...
- defDependsOnDef supporting all analyzable AssignOperations
- getDef(Upper|Lower)Bound supporting all analyzable AssignOperations
2020-09-02 12:22:14 +01:00
Rasmus Wriedt Larsen
7a54d0b493
Java: Move files in experiemntal dirs to be consistent
2020-09-02 13:19:21 +02:00
Erik Krogh Kristensen
a24db09418
only flag unused array-destructs if it is the last variable
2020-09-02 11:40:35 +02:00
CodeQL CI
48a1ee6233
Merge pull request #4130 from erik-krogh/bbFix
...
Approved by asgerf
2020-09-02 10:38:50 +01:00
Anders Schack-Mulligen
89829e870d
Java: Clean up SqlInjectionLib.
2020-09-02 11:17:56 +02:00
Tom Hvitved
701e189c1b
C#: Add change note
2020-09-02 10:52:22 +02:00
Tom Hvitved
1b769ebac9
C#: Address more review comments
2020-09-02 10:52:05 +02:00
Tom Hvitved
51dc1515ab
C#: Address review comments
2020-09-02 10:52:05 +02:00
Tom Hvitved
92bf830a8a
C#: Avoid bad magic in UselessUpcast.ql
2020-09-02 10:52:05 +02:00
Tom Hvitved
c7f776984f
C#: Add CFG tests for callables with multiple implementations
2020-09-02 10:52:05 +02:00
Tom Hvitved
8a0355720a
C#: Make Callable::get[Expression|Statement]Body() return all possible implementations
...
Previosly, we returned only the body belonging to "the most likely" implementation,
based on a CFG size heuristics. However, now that more callables are mapped to the
same entity, it makes more sense to treat such callables (to some extent) like
partial methods. This means, for instance, that data flow will branch out to all possible
implementations, much like we do for virtual dispatch.
2020-09-02 10:52:05 +02:00
Tom Hvitved
afbbafe132
C#: Simplify TypeRef.qll
2020-09-02 10:52:05 +02:00
Tom Hvitved
d17f88bbcd
C#: Remove assembly prefix from all extractor IDs
2020-09-02 10:52:04 +02:00
Calum Grant
7628caa2db
C#: Avoid typerefs for constructed types.
2020-09-02 10:52:04 +02:00
Calum Grant
aa99269015
C#: Fix merge conflicts. Unfortunately, the type of symbolEntityCache needed to be the same as objectEntityCache to fix nullability warnings.
2020-09-02 10:52:04 +02:00
Calum Grant
0cfe424fc2
C#: Address review comments.
2020-09-02 10:52:04 +02:00
Calum Grant
9a51192d86
C#: Move TypeRefs into a separate file and import it privately. Reorder imports into alphabetical order.
2020-09-02 10:52:04 +02:00
Calum Grant
4740b47f5d
C#: Minor edits
2020-09-02 10:52:04 +02:00
Calum Grant
f4b1594461
C#: Unqualify method names and nested types.
2020-09-02 10:52:04 +02:00
Calum Grant
f61fdc6891
C#: Only resolve a single, canonical type for each typeref.
2020-09-02 10:52:04 +02:00
Calum Grant
90517580a5
C#: Address review comment: Make dictionary type more specific.
2020-09-02 10:52:04 +02:00
Calum Grant
cd51a67c0d
C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created.
2020-09-02 10:52:04 +02:00
Calum Grant
d1cde2a815
C#: Address review comment.
2020-09-02 10:52:03 +02:00
Calum Grant
4657ddcb7c
C#: Avoid qualifying explicit interface implementations.
2020-09-02 10:52:03 +02:00
Calum Grant
6649d72a2d
C#: Qualify type parameters with the entity that declares them
2020-09-02 10:52:03 +02:00
Calum Grant
6e5c2ef0e7
C#: Remove assembly qualifier from some trap-ids.
2020-09-02 10:52:03 +02:00
Calum Grant
29b3759655
Merge pull request #3961 from tausbn/python-add-typetracker
...
Python: Add type tracker and step summary implementation.
2020-09-02 09:42:14 +01:00
Mathias Vorreiter Pedersen
9887d8b7eb
C++: Remove redundant rules
2020-09-02 10:33:12 +02:00
Erik Krogh Kristensen
f0a0f41c3c
allow urls that are prefixed with # or ? in js/unsafe-external-link
2020-09-02 10:19:42 +02:00
Jonas Jensen
db45b29806
Merge pull request #4102 from rdmarsh2/rdmarsh2/cpp/input-iterators-1
...
C++: Basic input iterator models
2020-09-02 07:57:35 +02:00
ubuntu
042d07161c
Rename getQueryCall to getQueryCallSink
2020-09-01 22:43:31 +02:00
ubuntu
15562e4814
Update LdapjsSearchOptions
2020-09-01 22:28:58 +02:00
ubuntu
e2e55455c1
Update LdapjsSearchOptions and getQueryCall
2020-09-01 22:23:07 +02:00
Robert Marsh
015bf6e879
C++: Add reverse flow when this ptr is returned
2020-09-01 13:08:44 -07:00
Robert Marsh
2a57fa22e3
C++: handle reference args to iterator operators
2020-09-01 12:52:01 -07:00
Alessio Della Libera
8f00acd4e2
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:49 +02:00
Alessio Della Libera
78ebcee570
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:38 +02:00
Alessio Della Libera
b86b9ba510
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 21:00:21 +02:00
Alessio Della Libera
28729915d7
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:56:25 +02:00
Alessio Della Libera
1b50477fae
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:55:44 +02:00
Alessio Della Libera
44e728016b
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-09-01 20:54:58 +02:00
Erik Krogh Kristensen
6cbdc7ad8f
autoformat
2020-09-01 20:16:49 +02:00
Mathias Vorreiter Pedersen
d4293ad9c3
C++: Fix code after review comments.
2020-09-01 18:25:46 +02:00
Anders Schack-Mulligen
cc61e6117e
Merge pull request #3542 from porcupineyhairs/mongoJava
...
Java : add MongoDB injection sinks
2020-09-01 16:19:17 +02:00
CodeQL CI
311e62f21d
Merge pull request #4081 from aschackmull/java/dispatch-ctx-this-param
...
Approved by aibaars
2020-09-01 15:06:47 +01:00
Ian Lynagh
1cba09dde2
C++: Remove some remnants of the extractor CFG
2020-09-01 14:49:36 +01:00
Rasmus Wriedt Larsen
ab06c459f4
Python: Make validTest error on empty output again
...
I accidentially disabled that when introducing the ability to handle more than
one OK.
2020-09-01 14:42:11 +02:00
yoff
caa680c72e
Merge pull request #4149 from RasmusWL/python-more-additional-taint-steps
...
Python: more additional taint steps
2020-09-01 14:38:33 +02:00
Rasmus Wriedt Larsen
0cc018fec0
Python: Taint tracking setup alá Go
...
\## TaintFlow sources
The class `RemoteFlowSource` is very similarly defined as the other languages [C++](ac22e7950c/cpp/ql/src/semmle/code/cpp/security/FlowSources.qll ), [Java](6de612a566/java/ql/src/semmle/code/java/dataflow/FlowSources.qll ), [C#](fddbce0b7b/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Remote.qll ), [JS](78334af354/javascript/ql/src/semmle/javascript/security/dataflow/RemoteFlowSources.qll ), and [Go](24b3133e0c/ql/src/semmle/go/security/FlowSources.qll ). There are some minor differences:
- Java/C++ defines the class in `FlowSources.qll`
- C# uses `csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Remote.qll`, and provide `StoredFlowSource` and `LocalFlowSource` in separate classes.
- JS uses `RemoteFlowSources.qll`.
- JS defines additional predicate `RemoteFlowSource.isUserControlledObject`
- Go uses the class name `UntrustedFlowSource`, but still defined in `ql/src/semmle/go/security/FlowSources.qll`
- Go uses the `::Range` pattern to allow both extensibility and refinement
The big difference is how a RemoteFlowSource is specified:
- Java and C# have all subclasses of `RemoteFlowSource` defined in the same file
- Go and JS defines subclasses for frameworks in the actual framework `.qll` file, and all frameworks are transitively imported by `import go` or `import javascript` (so subclasses are always in scope).
- C++ uses class `RemoteFlowFunction` to do all the heavy lifting (and its subclasses are transitively imported).
\### What we will do
Use file `RemoteFlowSource.qll`, define subclasses in framework library classes.
_Why? Personally I really like it, Go/JS is already doing it, and Tom expressed a preference for doing the same for C# (although that is not what they are doing today)._
Jonas gave this advice:
> Whether you split the definitions between multiple files or keep them all in one file, the property you want is that all definitions are included when the abstract class is included. Otherwise you can get unexpected results via transitive includes.
We will make imports of all frameworks in the same file that defines `RemoteFlowSource`, as it seems to be the least intrusive change. If that turns out to be a problem, we can also move them to `python.qll` (the other way is not so easy).
\## TaintFlow sinks
[JS](473787a426/javascript/ql/src/semmle/javascript/Concepts.qll ) and [Go](ecff1e6a16/ql/src/semmle/go/Concepts.qll ) defines abstract base classes for interesting sinks in `Concepts.qll` (and all uses the `::Range` pattern in Go).
I really like this idea, since it allows multiple queries to reuse the same sink definitions, and it makes it _easy_ to discover what default sinks are available.
Personally I'm not 100% on board with the naming, but I don't have any good reason to change the naming convention.
\## Framework modeling
Following the model from Go ([example](https://github.com/github/codeql-go/blob/main/ql/src/semmle/go/frameworks/Gin.qll )), I propose that we make every definition in a framework modeling `private`. This allows some greater flexibility in changing our modeling, since we don't need to think about keeping deprecated versions around for a whole year.
It _does_ have the downside that someone writing a query can't reuse the classes/predicates for a framework, but it didn't seem to be too big of a concern. If we need to provide access, we can always make the definitions non-private (the other way is not so easy).
\## Customizations
Also introduced `Customizations.qll` like in JS/Java/Go (to replace `site.qll`)
2020-09-01 14:37:11 +02:00
Taus Brock-Nannestad
6a96c53d15
Python: Add missing getNode invocation
2020-09-01 14:04:31 +02:00
Rasmus Lerchedahl Petersen
8b13a429b7
Python: Address review comments
2020-09-01 14:00:41 +02:00
Taus Brock-Nannestad
26d14aba98
Python: Use nodeFrom/nodeTo instead of pred/succ
2020-09-01 14:00:30 +02:00
CodeQL CI
b9a6183ec2
Merge pull request #4175 from aschackmull/java/adjust-cwe-089-qltest
...
Approved by aibaars
2020-09-01 12:43:56 +01:00
Erik Krogh Kristensen
2628c05e43
split out comment over multiple lines
2020-09-01 13:12:44 +02:00
Erik Krogh Kristensen
c6947320ea
use isAsyncOrGenerator instead of isOrdinary
2020-09-01 13:11:44 +02:00
Arthur Baars
2729d109a5
Merge pull request #4123 from aschackmull/java/records-dataflow
...
Java: Add data flow for record getters.
2020-09-01 13:02:24 +02:00
Anders Schack-Mulligen
e5d7208c12
Java: Adjust a few qltests.
2020-09-01 12:49:09 +02:00
Arthur Baars
aedfa47cb4
Add missing QHelp files
2020-09-01 12:46:57 +02:00
Rasmus Wriedt Larsen
c5e3333d10
Python: Update expected tests after last commit
...
I'm pushing too fast it seems
2020-09-01 12:01:34 +02:00
Rasmus Wriedt Larsen
e0cfe8123e
Python: Update comments for new taint tests
...
I see I didn't keep them up to date as I implemented things
2020-09-01 11:58:26 +02:00
Rasmus Lerchedahl Petersen
6d23d7fa0e
Python: Test that pointsTo implies data flow
...
Running the test on a larger database gives some interesting results.
2020-09-01 11:56:22 +02:00
Rasmus Wriedt Larsen
cda88a5e64
Python: Refactor: use DataFlow::Node.asExpr()
2020-09-01 11:53:06 +02:00
Rasmus Wriedt Larsen
ddc55a18cf
Python: Fix taint handling of copy.deepcopy
...
(test results didn't change)
Thanks @yoff 👍
2020-09-01 11:50:46 +02:00
Rasmus Wriedt Larsen
e5a361c230
Python: Better taint tests for copy.deepcopy
2020-09-01 11:50:33 +02:00
Mathias Vorreiter Pedersen
aa3b268525
Merge pull request #4162 from jbj/ssa-ref-parameters
...
C++: SSA and range analysis for reference parameters
2020-09-01 11:48:41 +02:00
Anders Schack-Mulligen
82692876d8
Java: Add some test cases.
2020-09-01 11:24:30 +02:00
Mathias Vorreiter Pedersen
472363b86e
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-01 11:08:52 +02:00
Anders Schack-Mulligen
c25dd4be8c
Merge pull request #3363 from ggolawski/xslt-injection
...
CodeQL query to detect XSLT injections
2020-09-01 11:03:19 +02:00
Anders Schack-Mulligen
1dae99e4a5
Merge pull request #3543 from porcupineyhairs/WebsocketReadAsSource
...
Java: add websocket reads as remote flow source.
2020-09-01 10:58:02 +02:00
Mathias Vorreiter Pedersen
91a23096bb
C#: Sync identical files
2020-09-01 10:54:54 +02:00
Mathias Vorreiter Pedersen
3cca74e654
C++: Accept test changes
2020-09-01 10:54:46 +02:00
Mathias Vorreiter Pedersen
9de570b300
C++: Use the newly added predicates in field flow. This commit also adds a Class column to the FieldContent branch so FieldContent has a pretty toString implementation again.
2020-09-01 10:54:09 +02:00
Mathias Vorreiter Pedersen
1e13a39932
C++: Add getUpdatedInterval predicate to ChiInstructions, and getUsedInterval predicate to NonPhiMemoryOperands.
2020-09-01 10:53:48 +02:00
Anders Schack-Mulligen
beca44ec2f
Merge pull request #4172 from rvermeulen/java/xss-sink-extensible
...
Java: Customizable XSS analysis
2020-09-01 09:27:50 +02:00
Robert Marsh
87b657054f
C++: reverse flow for iterator operator qualifiers
2020-08-31 14:53:05 -07:00
Robert Marsh
d4cf92e374
C++: Improve non-member iterator operator detection
2020-08-31 14:52:29 -07:00
Robert Marsh
10005dd199
Merge branch 'main' into rdmarsh2/cpp/input-iterators-1Merge changes to input/output models for functions that return thisand resolve conflicting changes to taint tests.
2020-08-31 14:49:01 -07:00
Remco Vermeulen
2bdd3d7712
Apply qldoc suggestions
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-08-31 17:28:51 +02:00
Taus Brock-Nannestad
ec64606d5a
Python: Remove CopyStep branch type
2020-08-31 17:23:02 +02:00
Taus Brock-Nannestad
eb6443df21
Merge branch 'python-add-typetracker' of github.com:tausbn/ql into python-add-typetracker
2020-08-31 17:22:13 +02:00
Taus
8e1f99af99
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-31 17:20:12 +02:00
Taus Brock-Nannestad
3547c70d35
Python: Add tests with redefinition of fields/variables
2020-08-31 17:17:37 +02:00
Taus Brock-Nannestad
06103f4ff2
Python: Consistently use attribute/attr
2020-08-31 17:16:31 +02:00
CodeQL CI
35494ab97c
Merge pull request #4171 from max-schaefer/js/promise-flow-public
...
Approved by erik-krogh
2020-08-31 15:15:27 +01:00
CodeQL CI
79e87a6c3d
Merge pull request #4088 from aschackmull/java/string-formatted
...
Approved by aibaars
2020-08-31 15:02:49 +01:00
Erik Krogh Kristensen
f7edf28d0d
allow mailto links in js/unsafe-external-link
2020-08-31 16:01:28 +02:00
Rasmus Wriedt Larsen
cf2eacd7a6
Python: Adjust additional taint after PostUpdateNode addition
...
Still no results though :(
2020-08-31 14:59:29 +02:00
Rasmus Wriedt Larsen
4e73abc254
Merge branch 'main' into python-more-additional-taint-steps
2020-08-31 14:34:42 +02:00
Tom Hvitved
4e963a8a8e
Merge pull request #4165 from hvitved/csharp/foreach-guard
...
C#: Fix bug in guards logic for `foreach` loops
2020-08-31 14:32:09 +02:00
CodeQL CI
dc9cc20fdd
Merge pull request #4161 from yoff/SharedDataflow_PostUpdateNodes
...
Approved by RasmusWL, aschackmull, hvitved, jbj
2020-08-31 11:57:44 +01:00
Max Schaefer
22ccae6006
JavaScript: Make PromiseFlow module public.
2020-08-31 11:55:10 +01:00
CodeQL CI
9d6b2e7684
Merge pull request #4042 from aschackmull/java/xsssink-extensible
...
Approved by aibaars
2020-08-31 11:54:25 +01:00
Anders Schack-Mulligen
b89a22b583
Merge pull request #4170 from aibaars/drop-inefficient-toarray
...
Java: remove InefficientToArray.ql
2020-08-31 12:45:06 +02:00
Arthur Baars
66d39bb5f6
Java: remove InefficientToArray.ql
...
This query was deprecated 4 years ago.
Fixes : #4167
2020-08-31 10:39:03 +02:00
Rasmus Lerchedahl Petersen
5f3eda0a22
Python: Annotate test file
...
Also add test of custom flow
2020-08-31 09:06:13 +02:00
Grzegorz Golawski
0f555d42ed
Fix test
2020-08-30 22:55:17 +02:00
Porcupiney Hairs
441825919c
Java : add MongoDB injection sinks
2020-08-31 02:24:23 +05:30
Grzegorz Golawski
5e462a897d
Merge branch 'main' into xslt-injection
2020-08-30 22:45:31 +02:00
Grzegorz Golawski
37f4410764
Fix test
2020-08-30 22:32:57 +02:00
Porcupiney Hairs
4f07733b06
remove U+200B
2020-08-30 04:54:02 +05:30
ubuntu
104c9b5dac
Move sinks into separate classes
2020-08-29 11:24:58 +02:00
Alessio Della Libera
8f98723822
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-29 11:18:41 +02:00
Taus Brock-Nannestad
7108d28395
Python: Remove failing non-inline test
...
It is subsumed by `tracked.ql` anyway.
2020-08-28 21:21:29 +02:00
Taus Brock-Nannestad
5d853e840a
Merge branch 'main' into python-add-typetracker
2020-08-28 19:59:58 +02:00
Taus Brock-Nannestad
8b78b6b1dc
Python: Add inline tests
...
Nodes to which we track type tracking flow from the source (any
identifier named `tracked`) are indicated with a `$tracked` tag, and
`$tracked=attr_name` if the attribute is for the specified attribute
of the given node.
For nodes that do have flow from `tracked`, I indicate this in one of
two ways:
- If it's expected due to the design of type tracking, I omit the
`$tracked tag.
- If it's flow that _ought_ to be there, I indicate it as a false
negative: `$f-:tracked`
Currently, only an instance of global flow is in the latter category.
2020-08-28 19:55:52 +02:00
Taus Brock-Nannestad
fbe8b64dd4
Python: Add support for attribute reads and writes
2020-08-28 19:55:14 +02:00
Jonas Jensen
023f2e97c1
C++: Really accept test results this time
2020-08-28 16:50:23 +02:00
Tom Hvitved
b205702853
C#: Fix bug in guards logic for foreach loops
2020-08-28 15:19:11 +02:00
Tom Hvitved
ddb33c914b
C#: Add test that demonstrates issue with guards logic for foreach statements
2020-08-28 15:13:18 +02:00
Asger F
813d14791d
Merge pull request #4043 from erik-krogh/ts4
...
JS: Add support for TypeScript 4
2020-08-28 14:02:08 +01:00
Rasmus Lerchedahl Petersen
750735c70c
Dataflow: Update test expectations
2020-08-28 15:00:01 +02:00
Jonas Jensen
2c613a72b9
C++: Autoformat
2020-08-28 14:56:19 +02:00
Jonas Jensen
a25cc2d9c7
C++: Accept range-analysis test results
2020-08-28 14:54:44 +02:00
lcartey@github.com
a4cb774932
C++: Support dereferenced variables in simple range analysis
...
- Support inference of guards on reference variables
- Support type bounds for reference variables
- Support reference variables when widening
- Support reference variables when determining arithmetic assignment
2020-08-28 14:52:36 +02:00
Jonas Jensen
027f22d8e7
C++: Test that range analysis ignores references
2020-08-28 14:41:57 +02:00
Jonas Jensen
a3a3423db2
C++: Treat reference parameters as non-references
2020-08-28 14:33:01 +02:00
Rasmus Lerchedahl Petersen
6b8d9f2a77
Merge branch 'main' of github.com:github/codeql into SharedDataflow_PostUpdateNodes
2020-08-28 13:01:14 +02:00
Rasmus Lerchedahl Petersen
9503c5d8bb
Python: Add post-update nodes
2020-08-28 12:59:11 +02:00
Erik Krogh Kristensen
f4060723bb
add stats for new properties
2020-08-28 12:43:26 +02:00
Calum Grant
93e0bd9d85
Merge pull request #4126 from tamasvajk/feature/array-index
...
C#: Fix computed sizes for implicitly sized array creation
2020-08-28 11:21:39 +01:00
Tom Hvitved
6eca97bc32
Merge pull request #4113 from tamasvajk/feature/nullability-extraction-cil
...
Enable nullability checks on Semmle.Extraction.CIL
2020-08-28 12:06:54 +02:00
Tom Hvitved
647ed03a2b
Merge pull request #4136 from tamasvajk/feature/qldocs
...
C#: Add missing QlDocs
2020-08-28 12:03:03 +02:00
Taus
8caaf8f17c
Merge pull request #4158 from RasmusWL/python-reformualte-js-team-comment
...
Python: Reformualte explanation of experience from JS
2020-08-28 11:33:00 +02:00
Rasmus Wriedt Larsen
2d2b036b8c
Python: Fix expected output for moved taint tests
2020-08-28 11:25:46 +02:00
Rasmus Wriedt Larsen
7213da195c
Python: Use standard naming scheme for taint flow tests
...
We got into problems since using `string.py` would shadow the string module from
the standard library. By some reason I adopted a pattern of `_` as suffix, but
let us just use the standard pattern of `test_` prefix like a normal testing
framework like pytest does.
2020-08-28 11:22:42 +02:00
Rasmus Wriedt Larsen
621e3f6c3c
Python: Add dataflow test of deep call graph
2020-08-28 11:17:23 +02:00
Rasmus Wriedt Larsen
45ab723423
Python: Add dataflow test for a,b = b,a
...
Also enables a single test to output more than one OK
2020-08-28 11:12:25 +02:00
Rasmus Wriedt Larsen
496d856c48
Python: Reformualte explanation of experience from JS
2020-08-28 10:49:33 +02:00
Erik Krogh Kristensen
038cca814a
Merge branch 'main' into ts4
2020-08-28 10:27:49 +02:00
Taus
afe234dade
Merge pull request #4156 from RasmusWL/python-fix-changenote-fstring-taint
...
Python: fstring taint change note should be for 1.26
2020-08-28 10:23:06 +02:00
Jonas Jensen
55d7ac88f9
Merge pull request #4148 from geoffw0/vecextra
...
C++: Improvements to string and vector models.
2020-08-28 10:05:42 +02:00
CodeQL CI
80cb8be405
Merge pull request #4155 from asger-semmle/js/lower-duplicate-element-id-precision
...
Approved by esbena
2020-08-28 08:52:58 +01:00
Rasmus Wriedt Larsen
7e6ebfd636
Enable labeler action again
...
This time using `pull_request_target`, so it will work properly with forks. See
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
This reverts commit d5d6093e75 .
2020-08-28 09:31:46 +02:00
CodeQL CI
ac94869978
Merge pull request #3978 from dellalibera/js/insecure-cookies
...
Approved by esbena
2020-08-28 08:31:38 +01:00
Rasmus Wriedt Larsen
deff36e9af
Python: fstring taint change note should be for 1.26
...
This fixes problem introduced in https://github.com/github/codeql/pull/4127
2020-08-28 09:00:07 +02:00
Tamas Vajk
29eaacdeaf
Fix typos and comment styling
2020-08-28 08:41:46 +02:00
Mathias Vorreiter Pedersen
ceddc2497a
Merge pull request #4151 from geoffw0/reftaint
...
C++: Taint tests for array and reference assignments.
2020-08-27 20:00:13 +02:00
Robert Marsh
2a6c624407
C++: fix up some iterator taint flows
2020-08-27 10:27:53 -07:00
Taus
1206ff5889
Merge pull request #4150 from RasmusWL/python-dataflow-private-import
...
Python: Make import of python private in shared dataflow
2020-08-27 18:05:55 +02:00
Geoffrey White
9b3da1f6c7
C++: Autoformat.
2020-08-27 16:55:45 +01:00
Geoffrey White
208cd4c888
C++: Fix assign in the test stl.h.
2020-08-27 16:52:22 +01:00
Rasmus Wriedt Larsen
f12d29de07
Python: Add taint test of more colleciton methods
2020-08-27 17:36:10 +02:00
Taus Brock-Nannestad
7112aa2e9a
Merge branch 'main' into python-add-typetracker
2020-08-27 17:05:26 +02:00
Asger Feldthaus
e7a0bc6be6
JS: Lower precision of ambiguous HTML ID attribute
2020-08-27 15:51:34 +01:00
Geoffrey White
927a4faa58
C++: Remove the non-reference case that we shouldn't need.
2020-08-27 15:42:40 +01:00
Rasmus Wriedt Larsen
654c4f39ac
Python: Add missing module.py to consistency/regression tests
2020-08-27 16:32:26 +02:00
Geoffrey White
071b303ea0
C++: Make the other versions consistent with this.
2020-08-27 15:24:48 +01:00
Rasmus Wriedt Larsen
36ac111659
Merge pull request #4152 from tausbn/python-sync-inline-test-expectations-files
...
Python: Sync InlineExpectationsTest.qll between Python and C++
2020-08-27 16:23:08 +02:00
Rasmus Wriedt Larsen
f1e11f1efd
Python: updated expected output from new shared dataflow tests
...
I did not verify whether these changes are OK or not, simply ran and accepted
the tests.
2020-08-27 16:17:12 +02:00
Geoffrey White
865d91de80
C++: Fix getAValueTypeParameterIndex().
2020-08-27 15:08:58 +01:00
Rasmus Wriedt Larsen
b11b5784b2
Python: Adtop more complete tests from old dataflow impl
...
The ones in test/experimental/dataflow/[consistency,regression]/test.py was a
copy from test/library-tests/taint/dataflow/test.py.
However, test/library-tests/taint/dataflow/test.py only contains a subset of
test/library-tests/taint/config/test.py, that only contains a subset of
test/library-tests/taint/general/test.py
This commit updates the experimental dataflow tests to be a copy of the
test/library-tests/taint/general/test.py file.
There seems to have been a few changes to the file after it being copied, in
`test_truth` and `test_early_exit`. I have no reproduced those changes.
2020-08-27 16:08:51 +02:00
Jonas Jensen
c507b337f2
Merge pull request #3921 from catenacyber/NullCheckParam
...
C++: Adds another redundant null check rule
2020-08-27 16:07:13 +02:00
Geoffrey White
816b8abd7c
C++: Add a test case using a const int *.
2020-08-27 15:05:23 +01:00
Tamas Vajk
7e2cf9a858
Adjust code review findings
2020-08-27 15:11:55 +02:00
Tamas Vajk
fcd426210f
C#: Add missing QlDoc for code duplication
2020-08-27 14:43:16 +02:00
Taus Brock-Nannestad
797e290a67
Python+CPP: Change values to value
2020-08-27 14:12:40 +02:00
Taus Brock-Nannestad
dccbcc15b3
Python: Sync InlineExpectationsTest.qll between Python and C++
...
Also changes `valuesasas` to `values` in the test example.
2020-08-27 13:37:26 +02:00
Rasmus Wriedt Larsen
9da6da6106
Python: Fix imports in shraed dataflow tests
2020-08-27 13:29:41 +02:00
Taus
e7322d114f
Merge pull request #4077 from yoff/MagicMethods
...
Python: Add support for magic methods
2020-08-27 13:20:56 +02:00
Taus
d3175a7899
Merge pull request #4110 from yoff/SharedDataflow_ParsimoniousFlowNodes
...
Python: Shared dataflow, parsimonious flow nodes
2020-08-27 13:19:23 +02:00
CodeQL CI
30ac2f9c84
Merge pull request #4143 from tausbn/python-add-inline-test-expectations-library
...
Approved by RasmusWL
2020-08-27 12:18:41 +01:00
Taus
a750252c07
Merge pull request #4147 from RasmusWL/python-remove-symlink
...
Python: Remove symlink from experimental test
2020-08-27 13:16:07 +02:00
Geoffrey White
a5a3078b58
C++: Add a test case using a typedef int.
2020-08-27 12:11:56 +01:00
Tom Hvitved
35e1c04b93
Merge pull request #4144 from hvitved/csharp/autobuilder/vsdevcmd
...
C#: Teach autobuilder about `VsDevCmd.bat`
2020-08-27 12:38:49 +02:00
Geoffrey White
6f62803e1f
C++: Taint tests for array and reference assignments.
2020-08-27 11:26:25 +01:00
Rasmus Wriedt Larsen
909bff2313
Python: Make import of python private in shared dataflow
2020-08-27 11:48:56 +02:00
Rasmus Wriedt Larsen
627363d6ea
Python: Test taint step for string augmented assignment
...
Apprently it just works 😕 :magic:
2020-08-27 11:37:56 +02:00
Geoffrey White
111da4c352
C++: Add a model of std::vector::assign.
2020-08-27 10:22:31 +01:00
Rasmus Wriedt Larsen
569e54e7bb
Python: Remove symlink from experimental test
2020-08-27 11:19:55 +02:00
Geoffrey White
0952fb9777
C++: Minor correction in one of the string models.
2020-08-27 10:13:12 +01:00
Geoffrey White
fbac4ce44f
C++: Split StdStringCStr and allow reverse flow on data.
2020-08-27 10:11:03 +01:00
Geoffrey White
fbff44ea45
C++: Add reverse taint as well.
2020-08-27 10:09:51 +01:00
Geoffrey White
6ae96baaf6
C++: Model std::vector::data.
2020-08-27 10:08:58 +01:00
Geoffrey White
2235c19593
C++: Add test cases for 'assign' and extra cases for 'data'.
2020-08-27 10:08:42 +01:00
Rasmus Wriedt Larsen
d0081dfbfa
Python: Attempt at taint step for list.append/set.add
2020-08-27 10:57:07 +02:00
Rasmus Wriedt Larsen
af20c3e082
Python: Make new taint tracking tests runnable again
...
since the files was called `collection`, that conflicted with import system :|
2020-08-27 10:44:14 +02:00
Esben Sparre Andreasen
9aa1404646
JS: fix formatting of InsecureCookie.qll
2020-08-27 09:44:45 +02:00
Tom Hvitved
2ac732c50a
C#: Teach autobuilder about VsDevCmd.bat
2020-08-27 09:05:37 +02:00
Rasmus Lerchedahl Petersen
09025c2198
Python: Fix test, update results and annotations
2020-08-27 08:40:13 +02:00
Esben Sparre Andreasen
67278d9c93
Merge pull request #4141 from esbena/js/clarify-sanitization
...
JS: make sanitization a "common" technique rather than "important"
2020-08-27 08:08:17 +02:00
ubuntu
736f76b685
Simplify getQueryCall
2020-08-27 02:12:17 +02:00
ubuntu
30e7f958a8
Highlight API call
2020-08-27 01:42:16 +02:00
Robert Marsh
c0edc08315
C++: Simplify non-member iterator operator models
2020-08-26 16:19:03 -07:00
Robert Marsh
994e845ab0
C++: use set literals in iterator models
2020-08-26 16:08:39 -07:00
ubuntu
7eeec0d765
Correct typo example
2020-08-27 01:07:13 +02:00
ubuntu
cbe879ae73
Correct typo examples
2020-08-27 01:05:49 +02:00
Robert Marsh
6f0cc16979
C++: remove non-existent operators from model
2020-08-26 15:52:53 -07:00
ubuntu
68ff480892
Update .qhelp
2020-08-27 00:51:08 +02:00
ubuntu
13f443d2c3
Update getLdapjsClientDNMethodName
2020-08-27 00:48:29 +02:00
Alessio Della Libera
616113aeff
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:47:29 +02:00
ubuntu
94bd9c6d3e
Rename LdapjsDN to LdapjsDNArgument and add it as Sink
2020-08-27 00:43:38 +02:00
ubuntu
7d36b3b4d2
Correct typo
2020-08-27 00:26:54 +02:00
ubuntu
2305a642eb
Correct typo
2020-08-27 00:24:50 +02:00
Alessio Della Libera
23287aacee
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:17:55 +02:00
Alessio Della Libera
f12ac8ca60
Update javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-27 00:17:33 +02:00
ubuntu
cd1d50b637
Update expected output
2020-08-26 23:50:15 +02:00
Alessio Della Libera
dcf51c75e9
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.ql
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 23:33:52 +02:00
Porcupiney Hairs
3f6eef8437
Java: add websocket reads as remote flow source.
...
Currently, JAX-WS reads are considered as untrusted. However, `java.net.http.WebSocket` reads are not marked as such.
This PR adds support for the same.
2020-08-27 02:45:59 +05:30
Rasmus Wriedt Larsen
bd21fc5601
Python: Autoformat
2020-08-26 20:37:48 +02:00
Rasmus Wriedt Larsen
c24e3452f5
Python: Add more expected collection taint steps
2020-08-26 20:28:33 +02:00
Rasmus Wriedt Larsen
423139bc22
Python: Add additional taint steps for iterable-unpacking
2020-08-26 20:21:15 +02:00
Esben Sparre Andreasen
d27442e846
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-26 20:18:54 +02:00
Rasmus Wriedt Larsen
afb160fbbb
Python: Add additional taint steps for for-iteration
2020-08-26 20:18:31 +02:00
Rasmus Wriedt Larsen
e2a89aa296
Python: Add additional taint steps for copy
...
deepcopy was already handled somehow, don't really know how :D
2020-08-26 19:39:38 +02:00
Rasmus Wriedt Larsen
b974dadca1
Python: Add additional taint steps for containers
2020-08-26 19:39:37 +02:00
Rasmus Wriedt Larsen
b6049765a8
Python: Add a few more collection taint tests
2020-08-26 19:39:36 +02:00
Rasmus Wriedt Larsen
32f9d30136
Python: Add syntactic taint steps for json methods
2020-08-26 19:39:36 +02:00
Rasmus Wriedt Larsen
41e24ae93f
Python: Add non-syntactical test for taint of json methods
2020-08-26 19:39:35 +02:00
Rasmus Wriedt Larsen
5f9aa4c3b9
Python: Restructure defaultAdditionalTaintStep tests
...
This makes it easier to add a new test-case, and makes it easier to work with
the existing files. It does have a downside on making it a bit more annoying
looking at TestTaint.expected, and possible longer runtime, but I think it's
still worth it.
2020-08-26 19:39:33 +02:00
Rasmus Wriedt Larsen
a1ada62596
Python: Remodel taint tests for shared lib
...
I took the bits from ql/test/library-tests/taint/ that seemed easy to port. I
left out namedtuple for now, but it is part of internal tracking ticket, so
won't be forgotten.
2020-08-26 19:39:32 +02:00
Mathias Vorreiter Pedersen
1221165792
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-08-26 19:13:54 +02:00
Dave Bartolomeo
01a61469d3
Merge pull request #4137 from tausbn/python-cpp-make-inline-test-libs-language-agnostic
...
CPP: Make inline expectation test library language agnostic.
2020-08-26 13:00:19 -04:00
Mathias Vorreiter Pedersen
d900a70738
C++: Accept test changes in query tests
2020-08-26 18:10:21 +02:00
Rasmus Lerchedahl Petersen
dcabd37974
Python: Update test expectations
2020-08-26 17:58:35 +02:00
Rasmus Lerchedahl Petersen
bf6211f639
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ParsimoniousFlowNodes
2020-08-26 17:50:17 +02:00
Rasmus Lerchedahl Petersen
6c173047e6
Merge branch 'MagicMethods' of github.com:yoff/codeql into MagicMethods
2020-08-26 17:43:27 +02:00
Rasmus Lerchedahl Petersen
47e35c530d
Merge branch 'main' of github.com:github/codeql into MagicMethods
2020-08-26 17:42:44 +02:00
Taus Brock-Nannestad
0f221ccfa2
Merge branch 'main' into python-cpp-make-inline-test-libs-language-agnostic
2020-08-26 17:23:25 +02:00
Mathias Vorreiter Pedersen
dd8984dfc5
C++: Keep ExplicitFieldStoreQualifierNode private
2020-08-26 16:14:58 +02:00
Taus Brock-Nannestad
e193e12b3f
Python: Add support for inline test expectations library
2020-08-26 16:10:04 +02:00
Taus
b1946c60dd
Merge pull request #4127 from RasmusWL/python-tainttracking-fstring
...
Python: Handle f-strings in (current) taint tracking
2020-08-26 16:06:01 +02:00
Taus Brock-Nannestad
a824d75e4f
C++: Add documentation for the LineComment class
2020-08-26 16:02:26 +02:00
Tamas Vajk
18c65e9f73
Fix typo in change notes
2020-08-26 15:57:41 +02:00
Mathias Vorreiter Pedersen
e4807c0181
C++: Accept test changes
2020-08-26 15:51:09 +02:00
Mathias Vorreiter Pedersen
9d9c78c9f6
C++: Use the information provided by the IR alias analysis to detect dataflow read and store steps.
2020-08-26 15:51:03 +02:00
Mathias Vorreiter Pedersen
2a8ee90828
C++: Demonstrate lack of flow when taking the address of a field and loading it afterwards
2020-08-26 15:50:57 +02:00
Esben Sparre Andreasen
89305865d0
JS: make sanitization a "common" technique rather than "important"
2020-08-26 15:41:54 +02:00
Tamas Vajk
3f54e5d310
Add change note
2020-08-26 15:12:11 +02:00
Jonas Jensen
f60abd8cf9
Merge pull request #4125 from geoffw0/oparray2
...
C++: Model operator[]
2020-08-26 13:44:02 +02:00
Nick Rolfe
00316dca8b
Merge pull request #4120 from github/igfoo/global_vars
...
C++: Give fewer types to global variables
2020-08-26 12:29:41 +01:00
Taus Brock-Nannestad
f8ba4c1579
CPP: Make inline expectation test library language agnostic.
...
In preparation for adding this to Python, I have split out the
definition of the comment class in a separate file (which will be
specific to each language).
2020-08-26 13:06:24 +02:00
Tamás Vajk
9ef827641f
C#: Add .editorconfig file ( #4129 )
2020-08-26 12:41:00 +02:00
Tamas Vajk
8a4754f8d7
C#: Add missing QlDoc for frameworks
2020-08-26 11:48:02 +02:00
Tamas Vajk
4be15af06a
C#: Add missing QlDoc for various predicates
2020-08-26 11:34:20 +02:00
Tamas Vajk
ce68e458e0
C#: Add QlDoc for predicates in Helpers
2020-08-26 11:21:44 +02:00
Tamas Vajk
048428a6fa
C#: Add missinq QlDoc for Serialization classes, remove unused DangerousCallable
2020-08-26 11:21:44 +02:00
Geoffrey White
3f04530d84
C++: Autoformat.
2020-08-26 09:34:06 +01:00
Tamas Vajk
36a9e47178
C#: Add missing QlDoc for dotnet base constructs
2020-08-26 09:13:01 +02:00
Erik Krogh Kristensen
61427393be
add qldoc to Generators.qll file
2020-08-26 09:11:39 +02:00
Alessio Della Libera
57f3c73d3d
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjectionCustomizations.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:31 +02:00
Alessio Della Libera
6979c394fe
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:18 +02:00
Alessio Della Libera
355c7bc3b5
Update javascript/ql/src/experimental/Security/CWE-090/LdapInjection.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2020-08-26 02:08:08 +02:00
Alessio Della Libera
e027c8cc13
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:48:05 +02:00
Alessio Della Libera
a1f64e26cf
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:47:52 +02:00
Alessio Della Libera
3bd7615a75
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:47:37 +02:00
Alessio Della Libera
57cf447188
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-26 01:46:59 +02:00
Robert Marsh
28d3343e2b
Merge pull request #4122 from jbj/constexpr-const-test
...
C++: Demonstrate that constexpr implies const
2020-08-25 19:36:13 -04:00
Robert Marsh
83260740ff
C++: QLDoc for StdStringBeginEnd
2020-08-25 13:28:13 -07:00
Robert Marsh
c3a65148bc
C++: add some missing QLDoc
2020-08-25 13:24:54 -07:00
Robert Marsh
34ddbc0dc2
C++: add std::string::end to model
2020-08-25 13:22:00 -07:00
Rasmus Lerchedahl Petersen
fae915bbb5
Python: QL doc
2020-08-25 21:02:17 +02:00
Erik Krogh Kristensen
e6bfffaed3
update basic-block on ExceptionalFunctionReturnNode and FunctionReturnNode
2020-08-25 20:09:41 +02:00
Erik Krogh Kristensen
840f30f7bc
add basic-block test to dataflow tests
2020-08-25 20:09:36 +02:00
Erik Krogh Kristensen
90422fe705
add support for delegating yield
2020-08-25 20:05:53 +02:00
Erik Krogh Kristensen
6a07e1e82b
add more passing tests
2020-08-25 20:04:35 +02:00
Erik Krogh Kristensen
afaaea8922
support basic generators
2020-08-25 20:04:30 +02:00
Geoffrey White
fdf45f02f1
C++: Autoformat.
2020-08-25 18:53:19 +01:00
Geoffrey White
c083c6235d
C++: Explicitly model data flow in through reference return values.
2020-08-25 16:20:12 +01:00
Tamas Vajk
997388b075
Fix first set of code review comments
2020-08-25 17:11:34 +02:00
Rasmus Lerchedahl Petersen
551ae42fb9
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-08-25 15:45:20 +02:00
Rasmus Lerchedahl Petersen
d67f57a0bb
Python: Remove dead code
2020-08-25 15:39:37 +02:00
Taus
000fa33d54
Merge pull request #4013 from yoff/SharedDataflow_SequenceFlow
...
Python: Shared dataflow: Content flow
2020-08-25 15:38:14 +02:00
Rasmus Lerchedahl Petersen
56b78a664e
Python: Store step for generators
2020-08-25 15:36:26 +02:00
Rasmus Lerchedahl Petersen
ecf3928ed1
Python: Handle comprehensions with multiple fors
2020-08-25 15:21:08 +02:00
CodeQL CI
92c97b1778
Merge pull request #4124 from RasmusWL/python-taint-tracking-string-methods
...
Approved by yoff
2020-08-25 14:14:47 +01:00
Erik Krogh Kristensen
592ed8a3a1
remove ordinary return flow from generator functions
2020-08-25 14:02:57 +02:00
Geoffrey White
76a07f7292
C++: Use [, ...] syntax.
2020-08-25 12:30:06 +01:00
Geoffrey White
d31987d496
C++: Additional QLDoc.
2020-08-25 12:21:06 +01:00
Geoffrey White
23a792b8c6
C++: Add tests of nested vectors.
2020-08-25 12:13:32 +01:00
Rasmus Wriedt Larsen
2dbf83b579
Python: TaintTracking: Move tests of py3 string methods
2020-08-25 13:06:27 +02:00
Rasmus Wriedt Larsen
cf121cc4d0
Python: TaintTracking: stringMethods => stringManipualtion
2020-08-25 13:05:27 +02:00
Rasmus Lerchedahl Petersen
1cdb6be531
Merge branch 'main' of github.com:github/codeql into SharedDataflow_NestedComprehensions
2020-08-25 13:05:13 +02:00
Rasmus Wriedt Larsen
238e0845aa
Python: Minor refactoring
2020-08-25 12:50:41 +02:00
Rasmus Wriedt Larsen
0439b83c60
Python: Taint when using unicode
2020-08-25 12:50:32 +02:00
Rasmus Wriedt Larsen
2a29e26687
Python: Fix grammar
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2020-08-25 12:41:53 +02:00
Tamás Vajk
74db25d80c
C#: Enable nullability on Semmle.Extraction.CIL.Driver ( #4114 )
2020-08-25 11:44:08 +02:00
CodeQL CI
722b1a24f6
Merge pull request #4087 from erik-krogh/thisJsx
...
Approved by asgerf
2020-08-25 10:20:32 +01:00
CodeQL CI
844abc51e8
Merge pull request #4108 from erik-krogh/packType
...
Approved by asgerf
2020-08-25 10:17:28 +01:00
Rasmus Wriedt Larsen
483bd0e863
Python: Fix shared taint tracking tests
...
Since there was a .ql file, qltest tried to run a test in
test/experimental/dataflow/taintracking/ which failed since there was no code.
2020-08-25 11:15:11 +02:00
yoff
3140b43db2
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-25 10:48:01 +02:00
Tamás Vajk
dc62cd166c
C#: Enable nullability checks in Semmle.Extraction.Tests ( #4112 )
2020-08-25 08:40:30 +02:00
Robert Marsh
9aa3735165
C++: add tests for non-std:: iterators
2020-08-24 14:19:34 -07:00
Tamas Vajk
66e3739e72
Fix failing PrintAst test
2020-08-24 22:41:08 +02:00
Erik Krogh Kristensen
b0d4e79653
split out trap tests to avoid "package.json" naming conflict in trap test
2020-08-24 21:36:34 +02:00
Geoffrey White
adbfad21ef
C++: Correct the localFlow test.
2020-08-24 18:05:30 +01:00
ubuntu
22f5ae4ad4
Format code
2020-08-24 18:53:37 +02:00
Geoffrey White
c0aaed2fac
Merge branch 'main' into oparray2
2020-08-24 17:36:18 +01:00
Geoffrey White
ae807f7f33
C++: Autoformat.
2020-08-24 17:36:07 +01:00
Rasmus Wriedt Larsen
13148b42d3
Python: Handle taint of f-strings
2020-08-24 17:23:10 +02:00
Rasmus Wriedt Larsen
2f090df6d3
Python: Transform comments to QLDoc for security.strings.Basic
2020-08-24 17:20:04 +02:00
Rasmus Lerchedahl Petersen
2608509fa7
Merge branch 'main' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-24 17:16:33 +02:00
Rasmus Lerchedahl Petersen
e91581e9fa
Python: Experiments with nested comprhensions
2020-08-24 17:15:31 +02:00
Rasmus Wriedt Larsen
be2acc00db
Python: Add test for tainted f-string
2020-08-24 17:14:51 +02:00
CodeQL CI
e2c6a01c00
Merge pull request #4097 from erik-krogh/createRequire
...
Approved by esbena
2020-08-24 15:57:10 +01:00
Rasmus Wriedt Larsen
d96ef73033
Python: Handle taint for f-strings
...
Which we seem to not handle in the current taint tracking :O
f-strings needs to be Python 3 only, so enabled that test setup. I really liked
the idea for having the version specific tests right next to the normal tests,
so you don't have to look in
test/experimental/3/dataflow/i/will/forget/to/look/here.
2020-08-24 16:46:00 +02:00
Tamas Vajk
3dea6b3218
C#: Change implicitly sized array test input
2020-08-24 16:14:00 +02:00
Tamas Vajk
7516825b5f
C#: Fix computed sizes for implicitly sized array creation
2020-08-24 16:14:00 +02:00
Geoffrey White
1c38a4d5d6
Update cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-24 14:33:51 +01:00
Tamas Vajk
699cafa890
C#: Add implicitly sized array creations to tests
2020-08-24 15:27:35 +02:00
Geoffrey White
d3c8ffb995
C++: Clean up, comment, and restrict the new flow to the post-update node of the returned reference.
2020-08-24 14:07:06 +01:00
Geoffrey White
f2caa8a2b0
C++: Reverse taint through function models returning a reference.
2020-08-24 14:05:04 +01:00
Geoffrey White
f25ef26c37
C++: Permit taint flow to the left side of an assignment.
2020-08-24 14:01:49 +01:00
Geoffrey White
1da78ada14
C++: Model 'operator[]' and 'at' for std::string, std::vector and other containers.
2020-08-24 13:58:43 +01:00
Rasmus Wriedt Larsen
cb4b4e91ab
Python: Taint for string multiplication
2020-08-24 14:54:06 +02:00
Rasmus Wriedt Larsen
b688fe68d6
Python: Add options file to shared dataflow tests
...
Since there isn't one in top-level of experimental, making a single import made
tests go really slow :|
2020-08-24 14:54:05 +02:00
Rasmus Wriedt Larsen
5125c7a55c
Python: Add taint tests for encode/decode functions
2020-08-24 14:54:04 +02:00
Geoffrey White
f6770c5b88
C++: Add tests for std::string 'operator[]' and 'at()'.
2020-08-24 13:49:39 +01:00
Rasmus Wriedt Larsen
31b398937a
Python: Handle taint from bytes(obj)
2020-08-24 14:17:59 +02:00
Rasmus Wriedt Larsen
1e447c5ca2
Python: Handle taint for % formatting
2020-08-24 14:15:27 +02:00
Rasmus Wriedt Larsen
80745e8881
Python: Model string methods in shared taint tracking library
2020-08-24 13:58:42 +02:00
Rasmus Wriedt Larsen
a77f118b62
Python: Shared taint tracking: Handle string concat + subcript
2020-08-24 13:58:41 +02:00
Rasmus Wriedt Larsen
61f89ca3c3
Python: Add tests for shared taint tracking for strings
...
I adopted the TestTaint testing setup that I made for the "old" taint tracking
tests. This time around we should figure out if we can use .qlref or similar so
it doesn't end up in multiple copies that are not kept up to date :|
The `repr` predicate could probably be placed somewhere better. For now I just
wanted something that could help me. I considered just expanding the `repr`
predicate in `ql/src/semmle/python/strings.qll`, but since it's currently used
by queries, I didn't want to do anything about it.
Anyway, the output it gives is much more useful than seeing this ;)
```
| test.py:20 | ok | str_operations | test.py:20:9:20:10 | ts |
| test.py:21 | fail | str_operations | test.py:21:9:21:18 | BinaryExpr |
| test.py:22 | fail | str_operations | test.py:22:9:22:18 | BinaryExpr |
| test.py:23 | fail | str_operations | test.py:23:9:23:21 | Subscript |
| test.py:24 | fail | str_operations | test.py:24:9:24:13 | Subscript |
| test.py:25 | fail | str_operations | test.py:25:9:25:18 | Subscript |
| test.py:26 | fail | str_operations | test.py:26:9:26:13 | Subscript |
| test.py:27 | fail | str_operations | test.py:27:9:27:15 | str() |
| test.py:35 | fail | str_methods | test.py:35:9:35:23 | Attribute() |
| test.py:36 | fail | str_methods | test.py:36:9:36:21 | Attribute() |
| test.py:37 | fail | str_methods | test.py:37:9:37:22 | Attribute() |
| test.py:38 | fail | str_methods | test.py:38:9:38:23 | Attribute() |
| test.py:40 | fail | str_methods | test.py:40:9:40:19 | Attribute() |
| test.py:41 | fail | str_methods | test.py:41:9:41:23 | Attribute() |
| test.py:42 | fail | str_methods | test.py:42:9:42:36 | Attribute() |
| test.py:44 | fail | str_methods | test.py:44:9:44:25 | Attribute() |
| test.py:45 | fail | str_methods | test.py:45:9:45:45 | Attribute() |
| test.py:47 | fail | str_methods | test.py:47:9:47:21 | Attribute() |
| test.py:48 | fail | str_methods | test.py:48:9:48:19 | Attribute() |
| test.py:49 | fail | str_methods | test.py:49:9:49:18 | Attribute() |
| test.py:51 | fail | str_methods | test.py:51:9:51:32 | Attribute() |
| test.py:52 | fail | str_methods | test.py:52:9:52:34 | Attribute() |
| test.py:54 | fail | str_methods | test.py:54:9:54:21 | Attribute() |
| test.py:55 | fail | str_methods | test.py:55:9:55:19 | Attribute() |
| test.py:56 | fail | str_methods | test.py:56:9:56:18 | Attribute() |
| test.py:57 | fail | str_methods | test.py:57:9:57:21 | Attribute() |
| test.py:58 | fail | str_methods | test.py:58:9:58:18 | Attribute() |
| test.py:59 | fail | str_methods | test.py:59:9:59:18 | Attribute() |
| test.py:60 | fail | str_methods | test.py:60:9:60:21 | Attribute() |
| test.py:62 | fail | str_methods | test.py:62:9:62:26 | Attribute() |
| test.py:63 | fail | str_methods | test.py:63:9:63:42 | Attribute() |
| test.py:65 | fail | str_methods | test.py:65:9:65:26 | Attribute() |
| test.py:66 | fail | str_methods | test.py:66:9:66:42 | Attribute() |
| test.py:69 | fail | str_methods | test.py:69:9:69:25 | Attribute() |
| test.py:70 | fail | str_methods | test.py:70:9:70:26 | Attribute() |
| test.py:71 | fail | str_methods | test.py:71:9:71:22 | Attribute() |
| test.py:72 | fail | str_methods | test.py:72:9:72:21 | Attribute() |
| test.py:73 | fail | str_methods | test.py:73:9:73:23 | Attribute() |
| test.py:78 | ok | str_methods | test.py:78:9:78:39 | Attribute() |
```
2020-08-24 13:58:39 +02:00
Jonas Jensen
b2cd98a98f
C++: Confirm correct behaviour on C++20
...
Making `constexpr` imply `const` was correct for C++11 and was a correct
emulation of a GCC bug on GCC < 5.0. This test confirms that the problem
isn't there in C++20.
2020-08-24 13:42:40 +02:00
Philippe Antoine
07610e0899
Format document
2020-08-24 13:12:54 +02:00
Ian Lynagh
3ead154c9a
C++: Add VariableDeclarationEntry test to library-tests/variables/global
2020-08-24 11:51:52 +01:00
Erik Krogh Kristensen
309346841a
Merge branch 'main' into packType
2020-08-24 12:44:24 +02:00
Erik Krogh Kristensen
5acfd92e0f
bump the extractor version
2020-08-24 12:42:19 +02:00
Erik Krogh Kristensen
d633410e3c
make the extractor not crash on invalid "package.json" files
2020-08-24 12:42:08 +02:00
Erik Krogh Kristensen
eb84f97e7f
Merge branch 'main' into ts4
2020-08-24 12:20:48 +02:00
CodeQL CI
765c40ef03
Merge pull request #4019 from erik-krogh/asyncCalls
...
Approved by asgerf
2020-08-24 11:18:42 +01:00
Anders Schack-Mulligen
d82fee11b1
Java: Add data flow for record getters.
2020-08-24 11:51:04 +02:00
Jonas Jensen
cd8e9a1ece
C++: Demonstrate that constexpr implies const
...
This test shows that a member function declared `constexpr` also gets a
`const` specifier.
2020-08-24 11:39:41 +02:00
Taus
b8d6f76749
Merge pull request #4056 from yoff/SharedDataflow_ParameterTests
...
Python: Shared dataflow, parameter routing tests
2020-08-24 11:36:30 +02:00
Ian Lynagh
fb62ce6d25
C++: Give fewer types to global variables
...
Follows change in the extractor.
2020-08-24 00:49:33 +01:00
Mathias Vorreiter Pedersen
6f750dac88
Merge remote-tracking branch 'origin/main' into alternative-instruction-operand-flow
2020-08-23 18:46:07 +02:00
ubuntu
3e97ec85b2
Add CodeQL to detect LDAP Injection in JS
2020-08-23 15:24:29 +02:00
Robert Marsh
bc0d21879d
Merge branch 'main' into rdmarsh2/cpp/input-iterators-1
...
Resolve test conflict
2020-08-21 14:36:27 -07:00
Robert Marsh
141d240813
C++: autoformat
2020-08-21 14:22:44 -07:00
Robert Marsh
4c82753e8d
C++: remove constexpr in stl.h temporarily
2020-08-21 14:22:32 -07:00
Robert Marsh
94d4e05c25
C++: Fix iterator taint flow
2020-08-21 14:04:45 -07:00
Robert Marsh
656340f5c6
C++: more tests for string iterator flow
2020-08-21 13:48:36 -07:00
Erik Krogh Kristensen
db57f3661e
Merge branch 'main' into ts4
2020-08-21 15:08:30 +02:00
Erik Krogh Kristensen
65a1769d43
Merge branch 'main' into asyncCalls
2020-08-21 14:58:27 +02:00
Erik Krogh Kristensen
1b655f9046
use threadsafe cache stored in ExtractorState
2020-08-21 14:45:24 +02:00
Erik Krogh Kristensen
7aca84cd45
search directly for "package.json" instead of iterating through the files in a folder
2020-08-21 14:31:49 +02:00
Erik Krogh Kristensen
3f0f2c796c
pass extension instead of locationManager to isAlways*Module
2020-08-21 14:27:47 +02:00
Erik Krogh Kristensen
bbbb0a2c5e
specialize module.createRequire support to ES2015 modules
2020-08-21 14:14:05 +02:00
Calum Grant
a93a84fb2e
Merge pull request #4065 from hvitved/csharp/dataflow-type-restriction
...
C#: Restrict `DataFlowType` to types belonging to `Node`s
2020-08-21 11:57:29 +01:00
yoff
d05954e5cc
Merge pull request #4109 from RasmusWL/python-basic-taint-tracking
...
Python: Basic taint tracking with shared library
2020-08-21 12:20:22 +02:00
Rasmus Lerchedahl Petersen
e1343c7f1e
Python: Support set literals.
2020-08-21 11:15:04 +02:00
Rasmus Lerchedahl Petersen
ccff84d546
Python: Test flow into conprehension
2020-08-21 10:40:22 +02:00
Rasmus Lerchedahl Petersen
f9b1c5e4bd
Python: Fix bug pointed out by reviewer
2020-08-21 10:04:27 +02:00
Erik Krogh Kristensen
e00951edf0
update TypeScript to 4.0.2
2020-08-21 09:50:27 +02:00
yoff
bfd9c0860f
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-21 09:43:29 +02:00
yoff
8e2b2540fa
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-21 09:39:00 +02:00
Tom Hvitved
86b91cec8a
Merge pull request #4111 from tamasvajk/feature/nullability-extraction
...
C#: Fix nullability warning in Semmle.Extraction
2020-08-21 09:22:05 +02:00
Tom Hvitved
ea77828a6a
Merge pull request #4116 from hvitved/csharp/print-ast-order-top-level
...
C#: Order top-level elements by location in `PrintAst.qll`
2020-08-21 09:09:20 +02:00
Tom Hvitved
b8cde180b9
C#: Order top-level elements by location in PrintAst.qll
2020-08-21 06:17:37 +02:00
CodeQL CI
29183fa0a1
Merge pull request #4067 from erik-krogh/noBin
...
Approved by esbena
2020-08-20 23:07:02 +01:00
CodeQL CI
508ade29f4
Merge pull request #4106 from erik-krogh/depTracked
...
Approved by esbena
2020-08-20 21:23:24 +01:00
Tamas Vajk
9cdee63ed7
C#: Enable nullability checks on Semmle.Extraction.CIL
2020-08-20 16:46:42 +02:00
Tamas Vajk
b9e3b327d6
C#: Fix nullability warning in Semmle.Extraction
2020-08-20 16:33:02 +02:00
Erik Krogh Kristensen
cef681d009
bump extractor version (again)
2020-08-20 15:58:44 +02:00
Erik Krogh Kristensen
68f7942820
Merge branch 'main' into noBin
2020-08-20 15:58:15 +02:00
Jonas Jensen
d56a03389c
Merge pull request #4107 from geoffw0/vecmethods
...
C++: Initial models for std::vector
2020-08-20 15:53:35 +02:00
Anders Schack-Mulligen
bcad18f490
Java: Use the instance argument type in call contexts.
2020-08-20 15:17:04 +02:00
Rasmus Lerchedahl Petersen
94e6fd9199
Python: Convenience methods
...
asVar, asCfgNode, and asExpr
2020-08-20 15:16:23 +02:00
Erik Krogh Kristensen
fa8edeed6a
change StoredXss example to use TypeTracking
2020-08-20 15:05:38 +02:00
Erik Krogh Kristensen
906705f84c
add SourceNode example to the TrackedNode deprecation description
2020-08-20 15:01:40 +02:00
Rasmus Lerchedahl Petersen
5a734730de
Python: Control flow nodes are dataflow nodes
...
iff they are expression nodes
We could refine this later, but it seems to work for now...
2020-08-20 15:00:42 +02:00
Rasmus Wriedt Larsen
7fb8e0e277
Python: Add basic shared taint tracking test
2020-08-20 14:49:17 +02:00
Rasmus Wriedt Larsen
0baac8fd54
Python: Adjust shared taint tracking skeleton
...
So it fits the setup from Java/Go, with AdditionalTaintStep class.
2020-08-20 14:49:09 +02:00
Geoffrey White
3d171f358a
Merge remote-tracking branch 'upstream/main' into vecmethods
2020-08-20 13:29:28 +01:00
Erik Krogh Kristensen
372e1a3d84
support the "type" field on package.json files while extracting
2020-08-20 14:26:15 +02:00
Tamás Vajk
2a8ff8785a
C#: Add AST printing ( #4038 )
2020-08-20 14:24:43 +02:00
Geoffrey White
258b61c5f8
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdContainer.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-08-20 12:53:23 +01:00
Geoffrey White
689c637d48
C++: Rename things.
2020-08-20 12:52:40 +01:00
Anders Schack-Mulligen
ec7a65777b
Merge pull request #3855 from JLLeitschuh/feat/JLL/jOOQ_SQL_injection
...
Add jOOQ methods as SQL Injection Sinks
2020-08-20 13:17:07 +02:00
Erik Krogh Kristensen
bf88c81f78
bump extractor version
2020-08-20 12:57:48 +02:00
Erik Krogh Kristensen
a347569385
inline StandardCharsets.UTF_8
2020-08-20 12:57:05 +02:00
Erik Krogh Kristensen
410ef8fe0e
exit early if the default encoding is not UTF-8
2020-08-20 12:50:43 +02:00
Erik Krogh Kristensen
fe41521e0c
add tutorial for how to get around TrackedNodes deprecation
2020-08-20 12:46:17 +02:00
Geoffrey White
61158e759b
C++: Improve StdContainerConstructor model.
2020-08-20 11:04:59 +01:00
Geoffrey White
acd1437103
C++: Change note.
2020-08-20 10:46:12 +01:00
Geoffrey White
f2ac4fa94a
C++: Autoformat.
2020-08-20 10:44:54 +01:00
Geoffrey White
cda9fd250b
C++: Model vector methods.
2020-08-20 10:30:01 +01:00
Geoffrey White
620126d38c
C++: Add vector taint cases to test.
2020-08-20 10:27:25 +01:00
Erik Krogh Kristensen
8f68f512df
deprecate TrackedNodes.qll
2020-08-20 11:26:22 +02:00
Geoffrey White
43c8efdf63
C++: Repair the range based for test.
2020-08-20 10:19:54 +01:00
CodeQL CI
6adedac337
Merge pull request #4096 from erik-krogh/qlMod
...
Approved by esbena
2020-08-20 10:05:30 +01:00
Geoffrey White
8afa92d881
C++: Add more detail to the vector class in the test stl.h.
2020-08-20 09:39:35 +01:00
Tom Hvitved
65b4d35add
Merge pull request #4055 from tamasvajk/feature/partial-methods
...
C#: Add body to partial methods
2020-08-20 10:14:56 +02:00
Tom Hvitved
6dc1244410
Merge pull request #4064 from hvitved/csharp/gvn-speedup
...
C#: Speed up `Implements.qll` and `Unification.qll`
2020-08-20 10:11:36 +02:00
Mathias Vorreiter Pedersen
aa522b54c1
Merge pull request #4098 from jbj/SimpleRangeAnalysis-mul-constant
...
C++: Support multiplication by constants in range analysis
2020-08-20 09:22:05 +02:00
Erik Krogh Kristensen
5b42e242af
add change note for supporting ".cjs" files
2020-08-20 09:18:26 +02:00
Jonas Jensen
b1c0e6f626
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-mul-constant
2020-08-20 08:20:31 +02:00
Robert Marsh
6b1243e8b4
C++: respond to PR comments on Iterator.qll
2020-08-19 16:23:00 -07:00
Robert Marsh
20188b7bc2
C++: input iterator models
2020-08-19 12:11:36 -07:00
Robert Marsh
d32d6c9d8d
WIP: more iterator cases
2020-08-19 11:51:41 -07:00
Robert Marsh
d50dd090be
C++: rename to Iterator*Operator
2020-08-19 11:51:41 -07:00
Robert Marsh
85af74eb06
C++: Models for bidirectional input iterators
2020-08-19 11:51:41 -07:00
Robert Marsh
a457d54ad1
Merge pull request #4078 from jbj/SimpleRangeAnalysis-AssignMulExpr
...
C++: Range analysis for unsigned AssignMulExpr
2020-08-19 14:42:04 -04:00
Rasmus Lerchedahl Petersen
18e946d4aa
Python: Small rearrangement
2020-08-19 17:56:02 +02:00
Jonas Jensen
b14bc42756
Merge pull request #4090 from geoffw0/strmethods
...
C++: Model taint through many more methods in std::string
2020-08-19 16:40:46 +02:00
Tom Hvitved
a23bb6d5ec
Merge pull request #4095 from hvitved/csharp/dataflow/ap5
...
C#: Increase `accessPathLimit` from 3 to 5
2020-08-19 16:12:22 +02:00
Jonas Jensen
21d16d13fc
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-AssignMulExpr
2020-08-19 14:50:40 +02:00
Anders Schack-Mulligen
e7709f73e9
Merge pull request #4099 from hvitved/java/dataflow/unique-encl-callable
...
Java: Use `unique` aggregate in `Node::getEnclosingCallable()`
2020-08-19 13:30:01 +02:00
Anders Schack-Mulligen
28578fd572
Java: Autoformat.
2020-08-19 13:12:24 +02:00
Jonas Jensen
83884c0dc5
Merge pull request #4089 from jbj/jbj/printFloat-precise
...
C++: Accept float.toString changes in tests
2020-08-19 12:58:27 +02:00
Rasmus Lerchedahl Petersen
bd53a711d3
Merge branch 'main' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-19 11:42:41 +02:00
Mathias Vorreiter Pedersen
eed6fe96ae
Merge branch 'main' into alternative-instruction-operand-flow
2020-08-19 11:18:51 +02:00
Erik Krogh Kristensen
3d5c1560e4
basic support for .cjs files
2020-08-19 10:53:57 +02:00
Erik Krogh Kristensen
103f739d16
add test for types of modules
2020-08-19 10:52:38 +02:00
Jonas Jensen
3e8f62fa5f
Merge pull request #4100 from nickrolfe/ssa_errors
...
C++: fix compilation errors in ssa.cpp
2020-08-19 09:58:49 +02:00
CodeQL CI
2319c289aa
Merge pull request #4092 from erik-krogh/strictExtractor
...
Approved by esbena
2020-08-19 08:47:07 +01:00
Rasmus Lerchedahl Petersen
176aa06fad
Python: Address review comments
2020-08-19 09:21:16 +02:00
yoff
5e84754f73
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-19 08:03:47 +02:00
yoff
06bd436aea
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-08-19 08:02:53 +02:00
yoff
8fbb447f4c
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:02:29 +02:00
yoff
1c3b945e55
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:01:54 +02:00
yoff
43a5e74c65
Update python/ql/src/experimental/dataflow/internal/DataFlowPublic.qll
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-19 08:01:42 +02:00
Nick Rolfe
d7849bc13f
C++: fix compilation errors in ssa.cpp
2020-08-18 18:39:00 +01:00
Jonathan Leitschuh
341ab2ee0e
Fix formatting on jOOQ.qll
2020-08-18 13:20:56 -04:00
Jonas Jensen
01a226bdcf
C++: Rename multipliesBy->effectivelyMultipliesBy
...
From code review of #4098 .
2020-08-18 16:53:29 +02:00
Jonas Jensen
b65f82210f
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-mul-constant
2020-08-18 16:51:56 +02:00
Jonas Jensen
f79c140dc1
C++: Cosmetic: use [0, 1] instead of [0 .. 1]
2020-08-18 16:48:23 +02:00
Jonas Jensen
fd0937eb01
C++: Accept improved IntegerOverflowTainted test
2020-08-18 16:47:29 +02:00
Jonas Jensen
dd5b561f08
C++: Use getValue(e) instead of e.getValue()
2020-08-18 16:45:24 +02:00
Rasmus Lerchedahl Petersen
de1c75c279
Python: QL format
2020-08-18 16:34:04 +02:00
Tom Hvitved
13577967f3
Data flow: Document Node::getEnclosingCallable()
2020-08-18 15:16:00 +02:00
Rasmus Lerchedahl Petersen
f8364dc74b
Python: QL doc
2020-08-18 15:11:20 +02:00
Tom Hvitved
129e528e1c
Java: Use unique aggregate in Node::getEnclosingCallable()
...
I noticed while running tuple stats on JDK that the functionality of `Node::getEnclosingCallable()`
is not know to the QL compiler (possibly because it is defined recursively).
Here is an example pipeline before:
```
[2020-08-18 14:45:03] (29s) Starting to evaluate predicate DataFlowImpl::flowFwdIn#ffffffff#cur_delta/8[93]@efe539 (iteration 93)
[2020-08-18 14:45:04] (30s) Tuple counts for DataFlowImpl::flowFwdIn#ffffffff#cur_delta:
4034 ~4% {6} r1 = SCAN DataFlowImpl::flowFwd#ffffff#prev_delta AS I OUTPUT I.<0>, I.<5>, I.<1>, I.<2>, I.<3>, I.<4>
11410 ~4% {7} r2 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#ffffff_1502#join_rhs AS R ON FIRST 2 OUTPUT r1.<5>, r1.<2>, r1.<3>, r1.<4>, r1.<1>, R.<2>, R.<3>
11095 ~2% {7} r3 = JOIN r2 WITH DataFlowImpl::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r2.<1>, r2.<2>, r2.<3>, r2.<0>, r2.<4>, r2.<5>, r2.<6>
11661 ~0% {10} r4 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#ffffff_150234#join_rhs AS R ON FIRST 2 OUTPUT r1.<0>, r1.<2>, r1.<3>, r1.<4>, r1.<5>, r1.<1>, R.<2>, R.<3>, R.<4>, R.<5>
1489 ~0% {10} r5 = SELECT r4 ON r4.<9> = true
1489 ~16% {7} r6 = SCAN r5 OUTPUT r5.<1>, r5.<2>, r5.<3>, r5.<4>, r5.<5>, r5.<6>, r5.<7>
12584 ~14% {7} r7 = r3 \/ r6
4966 ~6% {8} r8 = JOIN r7 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r7.<5>, R.<1>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1115 ~6% {8} r9 = JOIN r8 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R ON FIRST 2 OUTPUT r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<5>, r8.<6>, r8.<7>
1652 ~11% {8} r10 = JOIN r9 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::prunedViableImplInCallContext#fff@staged_ext AS R ON FIRST 2 OUTPUT r9.<7>, R.<2>, r9.<2>, r9.<3>, r9.<4>, r9.<5>, r9.<6>, r9.<0>
4966 ~0% {8} r11 = JOIN r7 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<6>, R.<1>
3851 ~0% {8} r12 = r11 AND NOT DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R(r11.<5>, r11.<7>)
3851 ~7% {7} r13 = SCAN r12 OUTPUT r12.<5>, r12.<0>, r12.<1>, r12.<2>, r12.<3>, r12.<4>, r12.<6>
3763916 ~0% {8} r14 = JOIN r13 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r13.<6>, R.<1>, r13.<1>, r13.<2>, r13.<3>, r13.<4>, r13.<5>, r13.<0>
3765568 ~0% {8} r15 = r10 \/ r14
4604 ~20% {7} r16 = JOIN r7 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1383356 ~0% {8} r17 = JOIN r16 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r16.<6>, R.<1>, r16.<1>, r16.<2>, r16.<3>, r16.<4>, r16.<5>, r16.<0>
5148924 ~0% {8} r18 = r15 \/ r17
1076 ~20% {7} r19 = JOIN r7 WITH DataFlowImplCommon::Cached::TAnyCallContext#f@staged_ext AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
660959 ~3% {8} r20 = JOIN r19 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r19.<6>, R.<1>, r19.<1>, r19.<2>, r19.<3>, r19.<4>, r19.<5>, r19.<0>
5809883 ~0% {8} r21 = r18 \/ r20
1938 ~2% {7} r22 = JOIN r7 WITH DataFlowImplCommon::Cached::TReturn#fff_2#join_rhs AS R ON FIRST 1 OUTPUT r7.<5>, r7.<0>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<6>
1184996 ~5% {8} r23 = JOIN r22 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 1 OUTPUT r22.<6>, R.<1>, r22.<1>, r22.<2>, r22.<3>, r22.<4>, r22.<5>, r22.<0>
6994879 ~0% {8} r24 = r21 \/ r23
11590 ~18% {8} r25 = JOIN r24 WITH DataFlowUtil::Node::getEnclosingCallable#ff AS R ON FIRST 2 OUTPUT r24.<0>, r24.<2>, r24.<3>, r24.<4>, r24.<5>, r24.<6>, r24.<7>, r24.<1>
11378 ~10% {9} r26 = JOIN r25 WITH project#DataFlowImpl::flowCand#fffff#10 AS R ON FIRST 1 OUTPUT r25.<1>, r25.<2>, r25.<3>, r25.<4>, r25.<5>, r25.<6>, r25.<0>, r25.<7>, R.<1>
11378 ~10% {9} r27 = SELECT r26 ON r26.<8> >= r26.<4>
11378 ~10% {9} r28 = SELECT r27 ON r27.<8> <= r27.<4>
11378 ~13% {8} r29 = SCAN r28 OUTPUT r28.<5>, r28.<7>, r28.<0>, r28.<1>, r28.<2>, r28.<3>, r28.<4>, r28.<6>
149 ~43% {7} r30 = JOIN r29 WITH DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R ON FIRST 2 OUTPUT r29.<0>, r29.<2>, r29.<3>, r29.<4>, r29.<5>, r29.<6>, r29.<7>
149 ~45% {8} r31 = JOIN r30 WITH DataFlowImplCommon::Cached::TSpecificCall#ff@staged_ext AS R ON FIRST 1 OUTPUT r30.<1>, r30.<2>, r30.<3>, r30.<4>, r30.<5>, r30.<0>, r30.<6>, R.<1>
11378 ~10% {8} r32 = SCAN r28 OUTPUT r28.<0>, r28.<1>, r28.<2>, r28.<3>, r28.<4>, r28.<5>, r28.<6>, r28.<7>
11229 ~9% {8} r33 = r32 AND NOT DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R(r32.<5>, r32.<7>)
11229 ~17% {7} r34 = SCAN r33 OUTPUT r33.<0>, r33.<1>, r33.<2>, r33.<3>, r33.<4>, r33.<5>, r33.<6>
11229 ~11% {8} r35 = JOIN r34 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R CARTESIAN PRODUCT OUTPUT r34.<0>, r34.<1>, r34.<2>, r34.<3>, r34.<4>, r34.<5>, r34.<6>, R.<0>
11378 ~11% {8} r36 = r31 \/ r35
11378 ~11% {8} r37 = r36 AND NOT DataFlowImpl::flowFwdIn#ffffffff#prev AS R(r36.<5>, r36.<6>, r36.<0>, r36.<7>, r36.<1>, r36.<2>, r36.<3>, r36.<4>)
11378 ~9% {8} r38 = SCAN r37 OUTPUT r37.<5>, r37.<6>, r37.<0>, r37.<7>, r37.<1>, r37.<2>, r37.<3>, r37.<4>
return r38
```
And after:
```
[2020-08-18 15:02:55] (121s) Starting to evaluate predicate DataFlowImpl::flowFwdIn#ffffffff#cur_delta/8[93]@5ed760 (iteration 93)
[2020-08-18 15:02:55] (121s) Tuple counts for DataFlowImpl::flowFwdIn#ffffffff#cur_delta:
3918 ~2% {6} r1 = SCAN DataFlowImpl::flowFwd#ffffff#prev_delta AS I OUTPUT I.<0>, I.<5>, I.<1>, I.<2>, I.<3>, I.<4>
16820 ~0% {7} r2 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#fffff_1402#join_rhs AS R ON FIRST 2 OUTPUT r1.<5>, r1.<2>, r1.<3>, r1.<4>, r1.<1>, R.<2>, R.<3>
16525 ~1% {7} r3 = JOIN r2 WITH DataFlowImpl::TNil#ff_1#join_rhs AS R ON FIRST 1 OUTPUT r2.<6>, r2.<1>, r2.<2>, r2.<3>, r2.<0>, r2.<4>, r2.<5>
16820 ~0% {9} r4 = JOIN r1 WITH DataFlowImpl::flowIntoCallNodeCand2#fffff_14023#join_rhs AS R ON FIRST 2 OUTPUT r1.<0>, r1.<2>, r1.<3>, r1.<4>, r1.<5>, r1.<1>, R.<2>, R.<3>, R.<4>
1211 ~0% {9} r5 = SELECT r4 ON r4.<8> = true
1211 ~0% {7} r6 = SCAN r5 OUTPUT r5.<7>, r5.<1>, r5.<2>, r5.<3>, r5.<4>, r5.<5>, r5.<6>
17736 ~6% {7} r7 = r3 \/ r6
17736 ~4% {8} r8 = JOIN r7 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<6>, r7.<0>, R.<1>
6757 ~3% {9} r9 = JOIN r8 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<5>, R.<1>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
112 ~62% {9} r10 = JOIN r9 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::prunedViableImplInCallContext#fff@staged_ext AS R ON FIRST 3 OUTPUT r9.<0>, r9.<1>, r9.<3>, r9.<4>, r9.<5>, r9.<6>, r9.<7>, r9.<8>, r9.<2>
112 ~62% {8} r11 = JOIN r10 WITH DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R ON FIRST 2 OUTPUT r10.<7>, r10.<2>, r10.<3>, r10.<4>, r10.<5>, r10.<6>, r10.<0>, r10.<8>
6757 ~0% {9} r12 = JOIN r8 WITH DataFlowImplCommon::Cached::TSpecificCall#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>, R.<1>
6757 ~0% {9} r13 = JOIN r12 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r12.<2>, r12.<3>, r12.<4>, r12.<5>, r12.<6>, r12.<0>, r12.<7>, r12.<1>, r12.<8>
4945 ~0% {9} r14 = r13 AND NOT DataFlowImplCommon::Cached::DispatchWithCallContext::reducedViableImplInCallContext#fff_02#join_rhs AS R(r13.<5>, r13.<8>)
4945 ~4% {8} r15 = SCAN r14 OUTPUT r14.<6>, r14.<0>, r14.<1>, r14.<2>, r14.<3>, r14.<4>, r14.<5>, r14.<7>
5057 ~5% {8} r16 = r11 \/ r15
7628 ~12% {8} r17 = JOIN r8 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
7628 ~9% {8} r18 = JOIN r17 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r17.<7>, r17.<2>, r17.<3>, r17.<4>, r17.<5>, r17.<6>, r17.<0>, r17.<1>
12685 ~14% {8} r19 = r16 \/ r18
1411 ~10% {8} r20 = JOIN r8 WITH DataFlowImplCommon::Cached::TAnyCallContext#f@staged_ext AS R ON FIRST 1 OUTPUT r8.<5>, r8.<7>, r8.<0>, r8.<1>, r8.<2>, r8.<3>, r8.<4>, r8.<6>
1411 ~11% {8} r21 = JOIN r20 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r20.<7>, r20.<2>, r20.<3>, r20.<4>, r20.<5>, r20.<6>, r20.<0>, r20.<1>
14096 ~14% {8} r22 = r19 \/ r21
17736 ~10% {8} r23 = JOIN r7 WITH DataFlowUtil::Node::getEnclosingCallable_dispred#ff AS R ON FIRST 1 OUTPUT r7.<6>, R.<1>, r7.<1>, r7.<2>, r7.<3>, r7.<4>, r7.<5>, r7.<0>
17736 ~4% {8} r24 = JOIN r23 WITH VirtualDispatch::viableCallable#ff AS R ON FIRST 2 OUTPUT r23.<2>, r23.<3>, r23.<4>, r23.<5>, r23.<6>, r23.<0>, r23.<7>, r23.<1>
1940 ~0% {8} r25 = JOIN r24 WITH DataFlowImplCommon::Cached::TReturn#fff_2#join_rhs AS R ON FIRST 1 OUTPUT r24.<6>, r24.<0>, r24.<1>, r24.<2>, r24.<3>, r24.<4>, r24.<5>, r24.<7>
16036 ~13% {8} r26 = r22 \/ r25
14256 ~8% {9} r27 = JOIN r26 WITH project#DataFlowImpl::flowCand#fffff#10 AS R ON FIRST 1 OUTPUT r26.<1>, r26.<2>, r26.<3>, r26.<4>, r26.<5>, r26.<6>, r26.<0>, r26.<7>, R.<1>
14256 ~8% {9} r28 = SELECT r27 ON r27.<8> >= r27.<4>
14256 ~8% {9} r29 = SELECT r28 ON r28.<8> <= r28.<4>
14256 ~9% {8} r30 = SCAN r29 OUTPUT r29.<5>, r29.<7>, r29.<0>, r29.<1>, r29.<2>, r29.<3>, r29.<4>, r29.<6>
122 ~28% {7} r31 = JOIN r30 WITH DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R ON FIRST 2 OUTPUT r30.<0>, r30.<2>, r30.<3>, r30.<4>, r30.<5>, r30.<6>, r30.<7>
122 ~30% {8} r32 = JOIN r31 WITH DataFlowImplCommon::Cached::TSpecificCall#ff@staged_ext AS R ON FIRST 1 OUTPUT r31.<1>, r31.<2>, r31.<3>, r31.<4>, r31.<5>, r31.<0>, r31.<6>, R.<1>
14256 ~3% {8} r33 = SCAN r29 OUTPUT r29.<0>, r29.<1>, r29.<2>, r29.<3>, r29.<4>, r29.<5>, r29.<6>, r29.<7>
14134 ~3% {8} r34 = r33 AND NOT DataFlowImplCommon::Cached::recordDataFlowCallSite#ff@staged_ext AS R(r33.<5>, r33.<7>)
14134 ~12% {7} r35 = SCAN r34 OUTPUT r34.<0>, r34.<1>, r34.<2>, r34.<3>, r34.<4>, r34.<5>, r34.<6>
14134 ~7% {8} r36 = JOIN r35 WITH DataFlowImplCommon::Cached::TSomeCall#f@staged_ext AS R CARTESIAN PRODUCT OUTPUT r35.<0>, r35.<1>, r35.<2>, r35.<3>, r35.<4>, r35.<5>, r35.<6>, R.<0>
14256 ~7% {8} r37 = r32 \/ r36
14256 ~7% {8} r38 = r37 AND NOT DataFlowImpl::flowFwdIn#ffffffff#prev AS R(r37.<5>, r37.<6>, r37.<0>, r37.<7>, r37.<1>, r37.<2>, r37.<3>, r37.<4>)
14256 ~9% {8} r39 = SCAN r38 OUTPUT r38.<5>, r38.<6>, r38.<0>, r38.<7>, r38.<1>, r38.<2>, r38.<3>, r38.<4>
return r39
```
2020-08-18 15:09:08 +02:00
Jonas Jensen
a72d05ccdb
C++: Change note for *= and constant *
2020-08-18 15:07:35 +02:00
Jonas Jensen
b316644ac2
C++: SimpleRangeAnalysis for *= by constant
2020-08-18 15:07:20 +02:00
Erik Krogh Kristensen
1e65ed2228
support module.createRequire
2020-08-18 14:43:03 +02:00
Rasmus Lerchedahl Petersen
aab603d261
Python: QL doc
2020-08-18 14:37:59 +02:00
Tom Hvitved
bc77916246
Merge pull request #4093 from tamasvajk/feature/change-notes
...
C#: Add change notes for C# analysis
2020-08-18 14:35:01 +02:00
Rasmus Lerchedahl Petersen
d0eaa13974
Python: Magic -> Special and reaarange classes
2020-08-18 14:14:38 +02:00
Jonas Jensen
ca1f5317b3
Merge pull request #4068 from geoffw0/uncontrolled-alloc-size
...
C++: Downgrade `cpp/uncontrolled-allocation-size` query precision.
2020-08-18 13:59:53 +02:00
Tom Hvitved
f761a604f3
Merge pull request #4094 from tamasvajk/feature/comp-gen-array-size
...
C# Compiler generated flag for length arguments of implicitly sized arrays
2020-08-18 13:43:02 +02:00
Tom Hvitved
acb08287ab
C#: Rename isComplete() to isFullyConstructed()
2020-08-18 13:38:46 +02:00
Tom Hvitved
bdf4ae5f27
C#: Increase accessPathLimit from 3 to 5
2020-08-18 13:30:16 +02:00
Anders Schack-Mulligen
f75f5ab125
Merge pull request #3838 from hvitved/dataflow/flow-fwd-ctx
...
Data flow: Use precise call contexts in `flowFwd()`
2020-08-18 13:06:11 +02:00
yoff
b9bf11adb4
Update python/ql/src/semmle/python/Magic.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:57 +02:00
yoff
571520602d
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:20 +02:00
yoff
59cee284b5
Update python/ql/src/experimental/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-18 12:59:04 +02:00
Rasmus Lerchedahl Petersen
bbf925fcc4
Python: Magic subscript and format
...
(this in preparation for addressing reviews)
2020-08-18 12:56:15 +02:00
Erik Krogh Kristensen
246d9b8c70
update expected trap files
2020-08-18 12:51:36 +02:00
Tamas Vajk
0cf4c99986
C#: Change compiler generated flag for length arguments of implicitly sized arrays
2020-08-18 12:06:01 +02:00
Tamas Vajk
99e62ceee6
C#: Add test for length argument of implicitly sized arrays
2020-08-18 11:44:24 +02:00
Jonas Jensen
b6b72729f6
C++: SimpleRangeAnalysis for MulExpr by constant
2020-08-18 11:37:59 +02:00
Erik Krogh Kristensen
03cb95c82b
bump extractor version
2020-08-18 11:20:04 +02:00
Tamas Vajk
6ae53b1865
C#: Add change notes for C# analysis
2020-08-18 11:10:04 +02:00
Jonas Jensen
2e2f99cabf
C++: Correctly classify the MulExpr rounding bugs
2020-08-18 10:39:57 +02:00
Jonas Jensen
a7d9715fd9
C++: BinaryOperation.hasOperands
...
QLDoc borrowed from JavaScript. Implementation borrowed from Java.
Parameter names changed.
2020-08-18 10:28:59 +02:00
Tamas Vajk
beeadea48f
Add extra tests for partial methods
2020-08-18 10:26:31 +02:00
Erik Krogh Kristensen
d1b3963e2d
correctly treat ES2015 modules as being in strict-mode in the extractor
2020-08-18 10:13:20 +02:00
Jonas Jensen
27345c64f3
C++: Also accept PointlessComparison test changes
2020-08-18 09:32:05 +02:00
Tamas Vajk
eba2c4331f
Add launch.json to gitignore
2020-08-18 09:23:38 +02:00
Erik Krogh Kristensen
61d4648893
update expected output of trap test
2020-08-17 22:53:16 +02:00
Erik Krogh Kristensen
eb5dfe8438
autoformat
2020-08-17 22:46:20 +02:00
Geoffrey White
5d485859af
Merge remote-tracking branch 'upstream/main' into
...
uncontrolled-alloc-size
2020-08-17 20:49:35 +01:00
Geoffrey White
be91cec7ad
C++: Add change note.
2020-08-17 20:45:49 +01:00
Geoffrey White
d76b25ec22
C++: Change note.
2020-08-17 17:55:52 +01:00
Geoffrey White
390af0d7d2
C++: Autoformat.
2020-08-17 17:55:52 +01:00
Geoffrey White
0234bca6ca
C++: Fix a hole in StdStringAppend and clarify comments.
2020-08-17 17:55:44 +01:00
Robert Marsh
9decb47bf0
Merge pull request #4076 from jbj/SimpleRangeAnalysis-AssignOperation
...
C++: Fix SimpleRangeAnalysis for AssignOperation
2020-08-17 12:55:26 -04:00
Geoffrey White
a11ca06189
C++: Implement more std::string models.
2020-08-17 17:33:09 +01:00
Geoffrey White
9204940830
C++: Add test cases for std::string methods.
2020-08-17 17:31:26 +01:00
Geoffrey White
789e781eb7
C++: Add prototypes for std::string methods to test.
2020-08-17 16:01:25 +01:00
Rasmus Lerchedahl Petersen
ca7c045d31
Python: bad re match made the tests fail..
2020-08-17 16:24:00 +02:00
Mathias Vorreiter Pedersen
bb3254d4ab
Merge branch 'main' into alternative-instruction-operand-flow
2020-08-17 16:21:10 +02:00
Erik Krogh Kristensen
73d1fac88e
support named tuples where not all tuple elements are named
2020-08-17 16:20:26 +02:00
Geoffrey White
4b4b8a9faa
Merge pull request #4074 from jbj/SimpleRangeAnalysis-extensible
...
C++: extensible range analysis
2020-08-17 14:46:57 +01:00
Tom Hvitved
a2fc92b9db
Data flow: Address review comments
2020-08-17 15:46:43 +02:00
Erik Krogh Kristensen
83ed41b247
move indices comment into plain comment
2020-08-17 15:43:52 +02:00
Erik Krogh Kristensen
0f87a89fd1
use typeLabel instead of typeDecl
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-17 15:31:41 +02:00
Erik Krogh Kristensen
c28889225a
skip binary files when extracting JavaScript
2020-08-17 15:21:15 +02:00
Jonas Jensen
e03fe81ce7
C++: Accept float.toString changes in tests
2020-08-17 15:07:00 +02:00
Anders Schack-Mulligen
a5701db3fa
Java: Support String.formatted in the format string queries.
2020-08-17 15:01:48 +02:00
CodeQL CI
c917cd02bd
Merge pull request #4054 from erik-krogh/urlIncludes
...
Approved by esbena
2020-08-17 13:54:25 +01:00
Erik Krogh Kristensen
6f28ddf1f8
proper support for this inside a JSX-name
2020-08-17 14:23:42 +02:00
Rasmus Lerchedahl Petersen
8eacef3467
Python: Add QL doc
2020-08-17 12:01:36 +02:00
Rasmus Lerchedahl Petersen
676690acb2
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ParsimoniousFlowNodes
2020-08-17 11:42:45 +02:00
Remco Vermeulen
894b3f2cd4
Add or change qldocs
2020-08-17 11:40:08 +02:00
Rasmus Lerchedahl Petersen
bfdb580206
Python: Experiemntal cleanup strategy
2020-08-17 11:37:52 +02:00
Jonas Jensen
edc5e5fbcf
C++: Simplify defDependsOnDef for AssignOperation
...
These cases were unnecessarily transitive. There is no need for
`defDependsOnDef` to be transitive since that's handled in
`defDependsOnDefTransitively`.
The dependency information from the LHS of an `AssignmentOperation` is
now deduced the say way as the information from the RHS: by calling
`exprDependsOnDef`. This should effectively give us the same information
and recursion structure as if the operation (`x += e`) were desugared
(`x = x + e`).
2020-08-17 11:06:39 +02:00
Remco Vermeulen
8db5c4f2e2
Abstract additional taint step
2020-08-17 10:41:27 +02:00
Tom Hvitved
8876dd51c7
Merge pull request #4079 from hvitved/csharp/xml-data-flow-config
...
C#: Use `DataFlow3` instead of `DataFlow2` in `Xml.qll` to avoid overlap
2020-08-17 10:36:56 +02:00
Remco Vermeulen
518459c0f7
Abstract Xss sanitizer
...
Turn the Xss sanitizer into an abstract class to support customizations
and provide a default implementation.
2020-08-17 10:31:44 +02:00
Tom Hvitved
28a7656813
Merge pull request #4073 from aschackmull/java/move-test
...
Java: Temporarily move a qltest.
2020-08-17 09:08:44 +02:00
ubuntu
8ec91ef0c6
Change polarity predicate isInsecure
2020-08-16 15:23:29 +02:00
ubuntu
5d6e6be4e4
Add query-tests
2020-08-16 15:02:52 +02:00
ubuntu
3e9142bf71
Remove examples
2020-08-16 14:58:37 +02:00
ubuntu
2a322976c6
Changed .qhelp
2020-08-16 14:57:04 +02:00
ubuntu
91d44854c0
Replace class and module name
2020-08-16 14:53:31 +02:00
ubuntu
d4b231b867
Replace regex
2020-08-16 14:48:26 +02:00
ubuntu
e2908026c5
Remove redundancy
2020-08-16 14:41:55 +02:00
Alessio Della Libera
1ba39e4130
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:34:19 +02:00
Alessio Della Libera
05ffd672d7
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:33:38 +02:00
Alessio Della Libera
ab20beba56
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:32:51 +02:00
Alessio Della Libera
bfef84e1b5
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:32:05 +02:00
Alessio Della Libera
a2e9456450
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:31:21 +02:00
Alessio Della Libera
14c8e4ce76
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:30:45 +02:00
Alessio Della Libera
275b8dfda2
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:29:36 +02:00
Alessio Della Libera
9292e3b80e
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:28:39 +02:00
Alessio Della Libera
ab128f7172
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:27:26 +02:00
Alessio Della Libera
40e101de5a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:26:15 +02:00
Alessio Della Libera
97f039af3a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:25:11 +02:00
Alessio Della Libera
fb3ffb895a
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:23:17 +02:00
Alessio Della Libera
e463014759
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:21:56 +02:00
Alessio Della Libera
5cae3005f3
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:20:22 +02:00
Alessio Della Libera
10bd745740
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:18:54 +02:00
Alessio Della Libera
8d26b810ee
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:17:16 +02:00
Alessio Della Libera
0c121062b6
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:13:54 +02:00
Alessio Della Libera
67fccac8a9
Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-16 14:13:03 +02:00
Jonas Jensen
768e5190a1
Merge pull request #4080 from geoffw0/split
...
C++: Split test file stl.cpp
2020-08-14 15:59:46 +02:00
Geoffrey White
89c2b6dc4b
Merge remote-tracking branch 'upstream/master' into split
2020-08-14 14:03:34 +01:00
Rasmus Lerchedahl Petersen
7ea3fc04c8
Python: adjust test annotation (for after feature)
2020-08-14 14:46:39 +02:00
Rasmus Lerchedahl Petersen
4bc04486cb
Python: Annotate tests (as before the new feature)
2020-08-14 14:41:35 +02:00
Tom Hvitved
357109a410
C#: Use DataFlow3 instead of DataFlow2 in Xml.qll to avoid overlap
...
`semmle.code.csharp.frameworks.system.Xml` is imported in `LibraryTypeDataFlow.qll`,
and therefore part of the default namespace. This means that the use of `DataFlow2`
inside `Xml.qll` overlaps with some queries. Bumping to `DataFlow3` resolves the issue.
2020-08-14 14:33:12 +02:00
Rasmus Lerchedahl Petersen
2817602a97
Merge branch 'master' of github.com:github/codeql into SharedDataflow_ParameterTests
2020-08-14 14:27:57 +02:00
Jonas Jensen
fe72b559d3
C++: Range analysis for unsigned AssignMulExpr
...
This is essentially a copy-paste job of `AssignAddExpr`, together with
the math from the `UnsignedMulExpr` support.
2020-08-14 14:19:54 +02:00
Rasmus Lerchedahl Petersen
e808d3033a
Python: Add magic to DataFlowCall
2020-08-14 14:19:18 +02:00
CodeQL CI
e9a36b2524
Merge pull request #4062 from tausbn/python-fix-unknown-import-star
...
Approved by yoff
2020-08-14 13:17:45 +01:00
Jonas Jensen
f90d779122
C++: Fix SimpleRangeAnalysis for AssignOperation
...
The range analysis wasn't producing useful bounds for `AssignOperation`s
(`+=`, `-=`) unless their RHS involved a variable. This is because a
shortcut was made in the `analyzableDef` predicate, which used to
specify that an analyzable definition was one for which we'd specified
the dependencies. But we can't distinguish between having _no
dependencies_ and having _no specification of the dependencies_.
The fix is to be more explicit about which definitions are analyzable.
To avoid too much repetition I'm still calling out to `analyzableExpr`
in the new code.
2020-08-14 14:15:58 +02:00
Rasmus Lerchedahl Petersen
4211f7f346
Merge branch 'master' of github.com:github/codeql into MagicMethods
2020-08-14 13:26:27 +02:00
Rasmus Lerchedahl Petersen
360ddc6314
Python: better charPred
2020-08-14 13:25:17 +02:00
Taus
8cbd4974ae
Merge pull request #3981 from yoff/SharedDataflow_Classes
...
Python: Dataflow, test magic methods
2020-08-14 12:45:55 +02:00
Jonas Jensen
e01e702f46
Merge pull request #4060 from bgianfo/patch-1
...
C++: Detect GoogleTest tests cases in FNumberOfTests.ql
2020-08-14 12:42:12 +02:00
Jonas Jensen
f7273b8665
C++: Add custom modeling to extensibility.ql
2020-08-14 12:27:30 +02:00
Jonas Jensen
ee3312503e
C++: Add test for extensible range analysis
...
This commit demonstrates that the range is too wide before custom
modeling has been added to the test.
2020-08-14 12:27:30 +02:00
Jonas Jensen
bf7732ec9d
C++: Silence QL compiler errors
2020-08-14 12:27:30 +02:00
Jonas Jensen
1deb1e6429
C++: Add SimpleRangeAnalysisExpr.dependsOnChild
2020-08-14 12:27:30 +02:00
Jonas Jensen
1b5b374a8e
C++: Move getFullyConverted{Upper,Lower}Bounds
...
Rather than being public, these internal predicates are now exposed
through a `SimpleRangeAnalysisInternal` module so it's clear that they
are not for general use.
2020-08-14 12:27:30 +02:00
Jonas Jensen
18ba562c25
C++: Fix: remember to bind e
2020-08-14 12:27:30 +02:00
Jonas Jensen
1c0e83a374
C++: Autoformat fixup
2020-08-14 12:27:30 +02:00
Jonas Jensen
aa78c6e750
C++: Move to experimental
...
And rename to `SimpleRangeAnalysisExpr` to clarify which of our range
analysis libraries this belongs to.
2020-08-14 12:27:30 +02:00
Jonas Jensen
cdddf5fd40
Merge remote-tracking branch 'upstream/master' into SimpleRangeAnalysis-extensible-base
2020-08-14 12:26:59 +02:00
Rasmus Lerchedahl Petersen
9556937840
Python: address review comments
2020-08-14 11:29:58 +02:00
Rasmus Lerchedahl Petersen
5ed3107045
Python: Start scaffold for magic methods
2020-08-14 11:12:23 +02:00
Tom Hvitved
e518cbabd6
Python: Sync data flow files
2020-08-14 11:04:45 +02:00
Tom Hvitved
9ebf8d1d58
Data flow: Sync files
2020-08-14 11:04:45 +02:00
Tom Hvitved
2d29fa1d15
Data flow: Use precise call contexts in flowFwd()
2020-08-14 11:04:45 +02:00
yoff
8d49ad7325
Update python/ql/test/experimental/dataflow/coverage/datamodel.py
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-14 10:53:37 +02:00
yoff
4b336e9b01
Update python/ql/test/experimental/dataflow/coverage/classes.py
...
Co-authored-by: Taus <tausbn@github.com >
2020-08-14 10:53:10 +02:00
CodeQL CI
82f9826966
Merge pull request #4044 from aschackmull/java/xsssink-printwriter-format
...
Approved by aibaars
2020-08-14 08:34:48 +01:00
Anders Schack-Mulligen
4947e1d817
Java: Temporarily move a qltest.
2020-08-14 09:25:32 +02:00
Robert Marsh
ed06604b46
Merge pull request #4045 from geoffw0/plus
...
C++: Model more of std::string in models.
2020-08-13 16:59:47 -04:00
Brian Gianforcaro
a6bcbe7974
C++: Detect GoogleTest tests cases in FNumberOfTests.ql
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-08-13 12:06:00 -07:00
Geoffrey White
498b350add
Merge remote-tracking branch 'upstream/master' into plus
2020-08-13 18:21:28 +01:00
Geoffrey White
a839f1fae5
C++: Split off stringstream.cpp.
2020-08-13 18:17:24 +01:00
Geoffrey White
49d2f66ddb
C++: Tidy up sources and sinks.
2020-08-13 18:08:58 +01:00
Geoffrey White
f343eb9143
C++: Split stl.cpp into string.cpp and vector.cpp.
2020-08-13 18:04:46 +01:00
Geoffrey White
5d7f771933
C++: Split off stl.h from stl.cpp.
2020-08-13 18:04:45 +01:00
Robert Marsh
de87f8fc42
Merge pull request #4057 from geoffw0/sal
...
C++: SAL.qll QLDoc and cleanup
2020-08-13 12:33:52 -04:00
Geoffrey White
93f95b1c22
Merge pull request #4053 from jbj/SimpleRangeAnalysis-mul
...
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-13 16:59:31 +01:00
Geoffrey White
3d60756d40
C++: Downgrade the query precision.
2020-08-13 15:45:57 +01:00
Anders Schack-Mulligen
ecbbcc2f61
Merge pull request #4066 from Marcono1234/marcono1234/simplify-VarAccess-isLValue
...
[Java] Simplify VarAccess.isLValue()
2020-08-13 16:40:28 +02:00
Geoffrey White
7349333006
C++: Taint through char append.
2020-08-13 15:13:47 +01:00
Geoffrey White
3c0e7a709f
C++: Add a test of append with CharT.
2020-08-13 14:52:34 +01:00
Geoffrey White
732a8fa4c9
C++: Add another member function.
2020-08-13 14:52:34 +01:00
CodeQL CI
6c60589dbd
Merge pull request #4063 from erik-krogh/noJsMsg
...
Approved by esbena
2020-08-13 14:02:18 +01:00
Anders Schack-Mulligen
3469ad7ca6
Merge pull request #3600 from luchua-bc/java-sensitive-log4j2-logging
...
Add Log4J 2 and a new search string secret
2020-08-13 13:35:52 +02:00
Tom Hvitved
46f10fc032
C#: Restrict DataFlowType to types belonging to Nodes
2020-08-13 13:16:10 +02:00
Marcono1234
cca2d9d825
Simplify VarAccess.isLValue()
2020-08-13 13:12:57 +02:00
Tom Hvitved
dcccdee227
C#: Speed up Implements.qll and Unification.qll
...
Restrict constructed GVN types to those that are complete, and reduce
intermediate string construction in `toString()` computations.
2020-08-13 13:11:04 +02:00
Erik Krogh Kristensen
15a74493e0
more permissive path elements in js/incomplete-url-substring-sanitization
2020-08-13 11:46:13 +02:00
Erik Krogh Kristensen
3fb9c28806
adjust comment about slash position
2020-08-13 11:46:13 +02:00
Erik Krogh Kristensen
dc6943b739
Update change-notes/1.26/analysis-javascript.md
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2020-08-13 11:34:53 +02:00
Erik Krogh Kristensen
2c7bb8c51f
adjust error message when files have been found while extracting
2020-08-13 11:18:27 +02:00
Taus Brock-Nannestad
a1a1218f95
Python: Ignore from foo import * when foo is absent.
2020-08-13 10:50:28 +02:00
Taus Brock-Nannestad
dc5c0f8e7a
Python: Add test case for missing modules
2020-08-13 10:49:11 +02:00
Geoffrey White
f5abf74e0f
Update cpp/ql/src/Microsoft/SAL.qll
...
Co-authored-by: Robert Marsh <rdmarsh2@gmail.com >
2020-08-13 09:05:22 +01:00
Anders Schack-Mulligen
8891ae70b6
Merge pull request #3938 from lcartey/java/untrusted-data-to-external-api
...
Java: Untrusted data used in external APIs
2020-08-13 09:53:57 +02:00
Erik Krogh Kristensen
d35d3f4271
add test for catch with type unknown
2020-08-13 09:37:55 +02:00
Erik Krogh Kristensen
d95d427c5b
better support for the &&=, ||=, and ??= operators
2020-08-13 09:22:32 +02:00
Jonas Jensen
5e5a112c36
C++: Change note
2020-08-13 08:37:13 +02:00
Rasmus Lerchedahl Petersen
3f2fcbf0ae
Python: Remove most noise in the query output
...
Just a quick change, the query should probably be rewritten
2020-08-13 08:23:12 +02:00
Rasmus Lerchedahl Petersen
2cc7712d40
Python: Annotate test cases
2020-08-13 08:02:42 +02:00
Geoffrey White
2655616a0a
C++: Autoformat.
2020-08-12 16:59:15 +01:00
Geoffrey White
9719da8643
C++: Move a class that looks like it's intended to be public (and is used outside of the library) above the 'Implementation details' threshold.
2020-08-12 16:58:50 +01:00
Geoffrey White
d444778535
C++: Make a few things in SAL.qll private where it looks like that was intended (and they're not used outside the file).
2020-08-12 16:57:43 +01:00
Geoffrey White
aa6cb51bba
C++: QLDoc SAL.qll.
2020-08-12 16:55:26 +01:00
Rasmus Lerchedahl Petersen
6dfa2ea9d5
Python: update test expectation
2020-08-12 16:59:06 +02:00
Erik Krogh Kristensen
fd9eb1d40b
use Identifier instead of just a plain string when getting tuple-element-names
2020-08-12 16:55:55 +02:00
Rasmus Lerchedahl Petersen
20ffb3fd4c
Python: tests for argument routing
...
Needs annotations
2020-08-12 15:43:07 +02:00
Tamas Vajk
def1d888c6
C#: Add body of partial methods
2020-08-12 15:22:14 +02:00
lcartey@github.com
6f83c55ebd
Java: Switch to low as a precision
...
Code Scanning doesn't support "very-low"
2020-08-12 13:48:59 +01:00
CodeQL CI
66541f260b
Merge pull request #4012 from erik-krogh/getId
...
Approved by asgerf, esbena
2020-08-12 13:28:18 +01:00
Erik Krogh Kristensen
dc55ce2bf0
add change note
2020-08-12 14:27:33 +02:00
Erik Krogh Kristensen
1d111c3e1f
expand what urls are detected by js/incomplete-url-substring-sanitization
2020-08-12 14:25:35 +02:00
Luke Cartey
56ff8cf084
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-12 13:12:06 +01:00
CodeQL CI
aa9dfa0d6f
Merge pull request #4039 from intrigus-lgtm/patch-3
...
Approved by erik-krogh
2020-08-12 13:07:22 +01:00
Geoffrey White
b99ca60154
C++: Address review comments.
2020-08-12 12:56:28 +01:00
Erik Krogh Kristensen
a7a016c5df
update expected output
2020-08-12 13:29:43 +02:00
Jonas Jensen
b4679cb8cf
C++: Autoformat fixup
2020-08-12 13:09:23 +02:00
Jonas Jensen
93d8d8eb1d
C++: Demonstrate range analysis MulExpr bugs
...
Unless these issues can be reproduced in far less contrived code, I
don't think they will cause problems in practice.
2020-08-12 12:10:23 +02:00
Erik Krogh Kristensen
0e33eae960
add dbscheme upgrade script
2020-08-12 11:50:32 +02:00
Erik Krogh Kristensen
26dcd2faae
add support for getting the name from named tuple elements
2020-08-12 10:33:49 +02:00
lcartey@github.com
6b6172fa5b
Java: ExternalAPIs: Further review comments
...
- Extra qldoc
- Remove unnecessary module
2020-08-12 09:21:14 +01:00
Jonas Jensen
1ee96a4b4f
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-12 10:03:04 +02:00
Erik Krogh Kristensen
211ef61039
add change note
2020-08-12 09:29:34 +02:00
Erik Krogh Kristensen
b101305248
autoformat
2020-08-12 09:27:43 +02:00
Robert Marsh
e80cc63219
Merge pull request #3861 from dilanbhalla/privatedata
...
C++: Private Data File/Buffer Writes
2020-08-11 15:49:31 -04:00
Erik Krogh Kristensen
e1ecc4662c
fix typo
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-11 20:00:22 +02:00
Geoffrey White
a655124213
C++: I think this is more correct.
2020-08-11 17:28:31 +01:00
Geoffrey White
50558257fc
C++: Change note.
2020-08-11 17:05:49 +01:00
Geoffrey White
128b8328b9
C++: Autoformat.
2020-08-11 17:03:03 +01:00
Geoffrey White
f62ad75048
C++: Taint through std::string operator+=.
2020-08-11 17:03:02 +01:00
Geoffrey White
cf6f530823
C++: Taint through std::string operator+.
2020-08-11 16:58:55 +01:00
Geoffrey White
a57dfd6b67
C++: Taint through std::string append.
2020-08-11 16:54:39 +01:00
Geoffrey White
f824a893ca
C++: Add test cases for appending strings.
2020-08-11 16:50:52 +01:00
Geoffrey White
030ab4f626
C++: Add string append operators to the test (changes layout).
2020-08-11 16:47:56 +01:00
Jonas Jensen
2ea25b9d90
C++: Precise printing of integer bounds
...
The pretty-printing of a QL `float` didn't include enough digits to tell
whether a large number had accurate bounds. The `toString` value of a
float appears to be more precise.
2020-08-11 16:48:01 +02:00
lcartey@github.com
e1d4b98923
Java: Add further missing </p> to qhelp
2020-08-11 15:28:55 +01:00
lcartey@github.com
8a65dd2cd6
Java: Address review comments
2020-08-11 15:28:06 +01:00
Erik Krogh Kristensen
656ff9c441
autoformat
2020-08-11 15:40:30 +02:00
Anders Schack-Mulligen
21246624b4
Java: Add PrintWriter.format as XSS sink.
2020-08-11 15:15:39 +02:00
Rasmus Lerchedahl Petersen
dd4d00293d
Python: remaining class tests
2020-08-11 14:16:02 +02:00
Erik Krogh Kristensen
d2c87d0a2e
add support for the new assign expression in TypeScript 4
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
2f34990ae6
add another test for spread elements in tuple types
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
ea583fe862
add basic support for named tuple elements
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
2612e0c5dd
add test for spread in tuple in non-last position
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
b602a36a24
add test for generic spreads in a tuple
2020-08-11 13:57:11 +02:00
Erik Krogh Kristensen
08c017eb09
change where tuples elements are loaded from to match TS 4.0
2020-08-11 13:57:10 +02:00
Erik Krogh Kristensen
ba2d19c70f
upgrade ts version in package.json
2020-08-11 13:57:10 +02:00
Anders Schack-Mulligen
99c9524639
Java: Make XssSink extensible.
2020-08-11 13:09:27 +02:00
Rasmus Lerchedahl Petersen
394991164f
Python: Update test expectations
2020-08-11 13:05:35 +02:00
Rasmus Lerchedahl Petersen
f834d71bab
Python: split out data model tests
2020-08-11 11:22:11 +02:00
Rasmus Lerchedahl Petersen
2c5de7f50e
Python: fix r/l confusion
2020-08-11 10:48:23 +02:00
Jonas Jensen
0476b97f63
Merge pull request #3789 from dilanbhalla/cpp
...
C++ Memory Unsafe Functions
2020-08-11 10:09:37 +02:00
Rasmus Lerchedahl Petersen
12dfc4afd9
Python: clean up validity check code
2020-08-11 08:16:49 +02:00
Rasmus Lerchedahl Petersen
3929e01350
Python: tests for async iterators/context managers
2020-08-11 08:10:46 +02:00
Rasmus Lerchedahl Petersen
681657f070
Merge branch 'master' of github.com:github/codeql into SharedDataflow_Classes
2020-08-11 07:24:17 +02:00
intrigus-lgtm
5a3acc231e
Fix typo
2020-08-11 01:01:53 +02:00
dilanbhalla
7bd5464b01
Update cpp/ql/src/experimental/Security/CWE/CWE-120/MemoryUnsafeFunctionScan.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-10 15:43:16 -07:00
dilanbhalla
4dcaa7be57
pr fixes
2020-08-10 15:30:09 -07:00
dilanbhalla
dcfbb86674
pr fixes
2020-08-10 15:14:12 -07:00
Rasmus Lerchedahl Petersen
5da37f5cf4
Python: Update test expectations
2020-08-10 17:07:00 +02:00
Erik Krogh Kristensen
dc5167bbe7
autoformat
2020-08-10 11:52:45 +00:00
Erik Krogh Kristensen
34778578db
fill in docstring
2020-08-10 13:34:36 +02:00
Erik Krogh Kristensen
9bcac10d9e
summarize exceptions thrown by immidiatly awaited function calls
2020-08-10 13:28:25 +02:00
Jonas Jensen
1f432dc45f
Merge pull request #4023 from geoffw0/loopdir
...
C++: Exclude decrementing unsigned counters from inconsistentLoopDirection.ql
2020-08-10 12:10:29 +02:00
Rasmus Lerchedahl Petersen
a963f15100
Python: format strings are unnecessary and mess up
...
For some reason, we got no results when format strings were present.
2020-08-10 11:54:24 +02:00
Erik Krogh Kristensen
85de5aa16b
add deprecated modifier
...
Co-authored-by: Asger F <asgerf@github.com >
2020-08-10 10:51:21 +02:00
Rasmus Lerchedahl Petersen
959c6315c4
Python: update reference to fix tests
2020-08-10 09:24:45 +02:00
Erik Krogh Kristensen
410b696562
add deprecated aliases getId() forwarding to getIdentifier()
2020-08-10 09:11:38 +02:00
Rasmus Lerchedahl Petersen
639d914a47
Python: test Awaitable, framework for async test
2020-08-10 09:03:28 +02:00
CodeQL CI
7c4e10df17
Merge pull request #4014 from erik-krogh/stringify
...
Approved by esbena
2020-08-10 07:50:21 +01:00
Rasmus Lerchedahl Petersen
02478774c3
Python: tests for context managers
2020-08-10 08:11:25 +02:00
Erik Krogh Kristensen
30dc77e538
update expected output
2020-08-08 21:26:45 +02:00
Erik Krogh Kristensen
244052f419
autoformat
2020-08-08 21:20:20 +02:00
Rasmus Lerchedahl Petersen
5b7c7f933c
Python: tests for numeric classes
2020-08-08 00:31:29 +02:00
Rasmus Lerchedahl Petersen
f6d6f91a42
Python: tests for containers
2020-08-07 23:39:42 +02:00
Rasmus Lerchedahl Petersen
aff4535965
Python: fix tests for descriptors
2020-08-07 23:07:58 +02:00
Arthur Baars
5874ecc28b
Merge pull request #3976 from luchua-bc/java-unsecure-basic-auth
...
Java: Insecure basic authentication
2020-08-07 21:39:23 +02:00
Rasmus Lerchedahl Petersen
d84294df3d
Python: Check that tests are valid
2020-08-07 20:07:02 +02:00
Erik Krogh Kristensen
2680afcdc9
deduplicate some implementation in storeStep and loadStep
2020-08-07 19:16:28 +02:00
Geoffrey White
3cf11eca2a
C++: And more test cases.
2020-08-07 17:30:07 +01:00
Erik Krogh Kristensen
aab2e6f803
update name of test file
2020-08-07 18:20:22 +02:00
Erik Krogh Kristensen
7670e7da97
retarget change-note for 1.26
2020-08-07 18:17:46 +02:00
Geoffrey White
7d491afaeb
C++: More test cases.
2020-08-07 17:05:13 +01:00
Erik Krogh Kristensen
54fd7d97c0
share implementation instead of copy-pasting
2020-08-07 18:00:10 +02:00
Erik Krogh Kristensen
94cf3a8ddb
correct copy-paste note after refactorings
2020-08-07 17:48:55 +02:00
Erik Krogh Kristensen
8f06e9651f
update expected output
2020-08-07 17:40:58 +02:00
Erik Krogh Kristensen
b9a98f51ea
update existing tests to work with FunctionReturnNode
2020-08-07 17:40:02 +02:00
Erik Krogh Kristensen
0edb46c20d
improve precision for load/store steps with async functions
2020-08-07 17:39:59 +02:00
Erik Krogh Kristensen
26ef2f34da
add precise return-flow for async functions
2020-08-07 17:33:26 +02:00
Erik Krogh Kristensen
cc94c5ec60
remove imprecise return-flow from async functions
2020-08-07 17:33:24 +02:00
Erik Krogh Kristensen
0004c28fe8
introduce and use FunctionReturnNode
2020-08-07 17:32:25 +02:00
Geoffrey White
b7d2e0ca63
C++: Make all the tests meaningful.
2020-08-07 14:18:28 +01:00
CodeQL CI
1b0cfc96b3
Merge pull request #4015 from erik-krogh/nonAbstract
...
Approved by asgerf
2020-08-07 13:44:23 +01:00
Geoffrey White
0ba59210fc
Merge pull request #4020 from jbj/taint-range-based-for-ast
...
C++: Taint through RangeBasedForStmt (AST only)
2020-08-07 13:41:49 +01:00
lcartey@github.com
bdcf4198e6
Add additional Hibernate SQL sinks
2020-08-07 14:03:24 +02:00
Anders Schack-Mulligen
e3a12c5fea
Merge pull request #4004 from Marcono1234/patch-2
...
[Java] Clarify Wildcard.hasUpperBound() doc
2020-08-07 13:06:13 +02:00
Tom Hvitved
c20d763490
Merge pull request #3951 from raulgarciamsft/users/raulgarciamsft/dataset_serialization
...
C#: DataSet serialization
2020-08-07 12:54:10 +02:00
Jonas Jensen
c8911ab973
C++: Test range-based-for with std::vector too
2020-08-07 12:40:00 +02:00
Anders Schack-Mulligen
77db87efb7
Merge pull request #3968 from rvermeulen/java-importable-cwe-090
...
Java: Move LDAP injection sinks, sanitizers, and additional taint steps to importable location
2020-08-07 11:57:51 +02:00
Arthur Baars
c177eff3d8
Merge pull request #4027 from aschackmull/java/weak-crypto-precision
...
Java: Update precision of java/weak-cryptographic-algorithm.
2020-08-07 10:31:38 +02:00
Anders Schack-Mulligen
f9de8eb3b4
Java: Update precision of java/weak-cryptographic-algorithm.
2020-08-07 09:40:21 +02:00
Anders Schack-Mulligen
05e956b374
Merge pull request #4022 from aibaars/int-to-long
...
Java: remove security tag from java/integer-multiplication-cast-to-long
2020-08-07 09:32:43 +02:00
Marcono1234
0e54b498b7
Clarify Wildcard.hasTypeBound() doc
2020-08-06 23:15:25 +02:00
Marcono1234
f477e09190
Clarify Wildcard.hasUpperBound() doc
2020-08-06 23:15:16 +02:00
Remco Vermeulen
3ae3a879d2
Fix qldoc grammar and style mistakes
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-06 23:00:03 +02:00
Raul Garcia
3682a902de
Update csharp/ql/src/experimental/Security Features/Serialization/DataSetSerialization.qhelp
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2020-08-06 12:09:02 -07:00
Geoffrey White
6e18be43f3
C++: Change note.
2020-08-06 19:27:12 +01:00
Geoffrey White
0281456948
C++: Add a 1.26 change note file (what happened to the templates?)
2020-08-06 19:21:06 +01:00
Geoffrey White
0534c69c76
C++: Autoformat.
2020-08-06 19:11:46 +01:00
Geoffrey White
0b5b7fa095
C++: Fix another edge case.
2020-08-06 19:06:42 +01:00
Geoffrey White
b3f3f6d95a
C++: Fix edge case.
2020-08-06 19:03:43 +01:00
Geoffrey White
cbf30e37ed
C++: Fix the issue.
2020-08-06 18:50:18 +01:00
Geoffrey White
a7564c9e0e
C++: Add a test of unsigned count-down loops.
2020-08-06 18:44:22 +01:00
Arthur Baars
f16c263393
Java: remove security tag from java/integer-multiplication-cast-to-long
2020-08-06 17:42:01 +02:00
Rasmus Lerchedahl Petersen
3db1ceeb70
Python: format ql
2020-08-06 15:42:14 +02:00
Rasmus Lerchedahl Petersen
614103c3b6
Python: Test calls rather than flows
2020-08-06 15:40:41 +02:00
Jonas Jensen
7cc877cbbb
C++: Taint through RangeBasedForStmt (AST only)
2020-08-06 15:37:41 +02:00
Rasmus Lerchedahl Petersen
ce86a8b72e
Python: format ql
2020-08-06 14:42:56 +02:00
Rasmus Lerchedahl Petersen
e77ceaf4b8
Python: Track dictionary keys
...
Also, less hacky comprehension,
but I think we still want to fix the extractor
2020-08-06 13:31:54 +02:00
Remco Vermeulen
408db412dc
Add missing predicate qldoc
2020-08-06 13:29:02 +02:00
Remco Vermeulen
5a819422c1
Reuse Unit class from TaintTracking
2020-08-06 12:02:34 +02:00
Remco Vermeulen
7f7ad88dea
Limit LdapAdditionalTaintStep to Ldap configuration
2020-08-06 11:35:03 +02:00
Anders Schack-Mulligen
205dd1aead
Merge pull request #3881 from intrigus-lgtm/more-pathcreations
...
Java: Centralize and model additional path creations.
2020-08-06 11:21:39 +02:00
luchua-bc
b821f918e5
Address issues with matching empty host and host in a concatenated string
2020-08-06 01:53:29 +00:00
luchua-bc
9a8eed8440
Enhance address match
2020-08-05 19:57:31 +00:00
intrigus
1011325cf7
Accept test changes.
2020-08-05 21:45:41 +02:00
Rasmus Lerchedahl Petersen
7c235597de
Python: More precise dataflow for tuples
...
(and dictionaries, but that is not fleshed out)
2020-08-05 19:22:54 +02:00
Remco Vermeulen
a1411407c1
Consolidate sanitizers into default sanitizer
2020-08-05 17:07:05 +02:00
Remco Vermeulen
0c09d66d43
Consolidate different sinks into a default sink.
2020-08-05 16:53:50 +02:00
Erik Krogh Kristensen
f1dc36244c
update tests and queries that used getId()
2020-08-05 14:32:09 +00:00
yoff
e642808a75
Update python/ql/test/experimental/dataflow/coverage/classes.py
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-05 15:12:27 +02:00
Jonas Jensen
5f635aca36
Merge pull request #3768 from geoffw0/copymove
...
C++: Clean up ConversionConstructor.
2020-08-05 14:35:05 +02:00
Rasmus Lerchedahl Petersen
a89624698d
Python: format ql
2020-08-05 14:28:28 +02:00
Rasmus Lerchedahl Petersen
2639e68a0d
Python: format ql
2020-08-05 14:16:50 +02:00
Rasmus Lerchedahl Petersen
81ad4552c9
Python: full list of magic methods to be tested
2020-08-05 13:30:30 +02:00
Erik Krogh Kristensen
cc5ef4d5e1
rename JsonSerializeCall to JsonStringifyCall
2020-08-05 13:22:41 +02:00
Erik Krogh Kristensen
b43d410ab1
add change log for JSON serializers
2020-08-05 12:14:56 +02:00
Erik Krogh Kristensen
f70cb2e7b3
add test for new JSON serializers
2020-08-05 12:14:56 +02:00
Erik Krogh Kristensen
5a3f67a682
introduce model for JSON.stringify and similar libraries
2020-08-05 12:14:51 +02:00
Anders Schack-Mulligen
9e78341e43
Merge pull request #3928 from rvermeulen/java-importable-cwe-113
...
Java: Move `HeaderSplittingSink` and `WhitelistedSource` into importable library
2020-08-05 10:16:00 +02:00
Erik Krogh Kristensen
67c4320287
make JumpStmt non abstract
2020-08-05 10:03:46 +02:00
Erik Krogh Kristensen
016bdc1614
make ControlStmt non abstract
2020-08-05 09:59:30 +02:00
Anders Schack-Mulligen
32d9d270fc
Merge pull request #3948 from aibaars/java-3941
...
Java: stack trace exposure: address false positives
2020-08-05 09:31:01 +02:00
Jonas Jensen
ea0896c78b
Merge pull request #3999 from MathiasVP/mathiasvp/range-based-for-loop-taint-tests
...
C++: Add tests for taint through range-based for loops
2020-08-05 09:11:53 +02:00
Raul Garcia (MSFT)
aa27eaf7e0
Addrssing the comments from https://github.com/github/codeql/pull/3951#discussion_r464894547 that I missed previously
2020-08-04 15:50:58 -07:00
Geoffrey White
9f5c37ccaa
Merge branch 'master' into copymove
2020-08-04 15:41:27 +01:00
Erik Krogh Kristensen
5727e6f9f8
make CompoundAssignExpr non-abstract
2020-08-04 16:17:08 +02:00
Erik Krogh Kristensen
cf3f275aa1
make DestructuringPattern non-abstract
2020-08-04 16:02:32 +02:00
Rasmus Lerchedahl Petersen
d7c08f732d
Merge branch 'master' of github.com:github/codeql into SharedDataflow_Classes
2020-08-04 16:01:42 +02:00
Rasmus Lerchedahl Petersen
9312b42e79
Python: More easy-to-get content flow
...
There are some things that should be rewritten, though,
but it may involve the extractor
2020-08-04 13:54:50 +02:00
Erik Krogh Kristensen
0867c5567e
rename getId() to getIdentifier()
2020-08-04 13:22:19 +02:00
Luke Cartey
5a96ee1a7b
Remove parameter names from signatures
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:41:40 +01:00
Luke Cartey
368572f1f0
Update java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.qhelp
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:40:59 +01:00
Luke Cartey
7928a02424
Add missing full stop.
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2020-08-04 09:40:51 +01:00
Luke Cartey
e0c081a2af
Add missing </p> tag
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2020-08-04 09:40:28 +01:00
Raul Garcia (MSFT)
c52064af78
Fixing problems based on CR feedback.
...
https://github.com/github/codeql/pull/3951#pullrequestreview-458987208
2020-08-03 16:39:41 -07:00
Rasmus Lerchedahl Petersen
9d09b4c811
Python: Comprehension stores
2020-08-03 08:53:22 +02:00
Rasmus Lerchedahl Petersen
f21777c6ce
Python: Simplyfy sequence stores
2020-08-03 08:16:43 +02:00
Rasmus Lerchedahl Petersen
4a8d532a71
Python: update test expectations and annotations
2020-08-03 07:25:06 +02:00
Rasmus Lerchedahl Petersen
6debc48e79
Merge branch 'master' of github.com:github/codeql into SharedDataflow_SequenceFlow
2020-08-03 07:05:34 +02:00
luchua-bc
ff0dacf1d7
Optimize the TaintTracking
2020-08-03 00:52:47 +00:00
luchua-bc
b65a033302
Shorten the regex private domain match
2020-08-01 03:42:13 +00:00
luchua-bc
ff58abb7d3
Revamp the sink code
2020-08-01 03:25:02 +00:00
Rasmus Lerchedahl Petersen
b21da86ac1
Python: Field flow for sequence elements
...
only from displays so far
2020-07-31 15:45:20 +02:00
Mathias Vorreiter Pedersen
4990d00498
C++: Add taint tests demonstrating lack of taint through range based for loops
2020-07-31 09:57:35 +02:00
Mathias Vorreiter Pedersen
b88ef56cb4
C++: Add basic iterator definition that matches STL
2020-07-31 09:45:32 +02:00
Raul Garcia (MSFT)
a5dab4e768
removing a redundant line
2020-07-30 17:05:42 -07:00
luchua-bc
81de1b14d9
Revamp the source of path query
2020-07-30 19:16:48 +00:00
Raul Garcia (MSFT)
64f4613a3f
Removing the options file as requested
2020-07-30 10:25:15 -07:00
Raul Garcia (MSFT)
9e74c183fe
Fixing expected results after adding comments to the unit test .cs file
2020-07-30 10:24:24 -07:00
Raul Garcia (MSFT)
6f845b0044
Using CodeQL AutoFormat
2020-07-29 18:01:46 -07:00
Raul Garcia (MSFT)
7923c480af
Fixing queries based on suggestions/comments.
...
TODO: Auto-formatting is still pending (need guidance on how to enable it on my environment). Thanks
2020-07-29 17:14:37 -07:00
Raul Garcia
83e9d052d9
Update csharp/ql/src/experimental/Security Features/Serialization/DataSetSerialization.qll
...
Co-authored-by: Jaroslav Lobačevski <novaisas@gmail.com >
2020-07-29 16:24:13 -07:00
Rasmus Lerchedahl Petersen
d32e2772a0
Python: some doc, a generator, and a corotuine
2020-07-29 15:52:56 +02:00
Rasmus Lerchedahl Petersen
488a7f4d01
Python: update test expectations
2020-07-28 21:46:45 +02:00
Rasmus Lerchedahl Petersen
eab64f125b
Python: Dataflow, start on test for classes
2020-07-28 20:32:12 +02:00
luchua-bc
5520504658
Update expected results
2020-07-28 15:41:23 +00:00
luchua-bc
a91cc9b7ec
Convert the query to path-problem
2020-07-28 15:36:12 +00:00
luchua-bc
7f911f00ee
Rename to insecure basic auth
2020-07-28 11:40:21 +00:00
luchua-bc
248628b11e
Enhance basic auth string search with a recursive method
2020-07-27 20:31:07 +00:00
luchua-bc
3a23451395
Enhance the query
2020-07-27 18:50:47 +00:00
Rasmus Lerchedahl Petersen
38acea633f
Python: Dataflow, expand callable to classes
2020-07-27 17:58:21 +02:00
Owen Mansel-Chan
6dbed5e848
Address review comments
2020-07-27 10:19:48 +01:00
Owen Mansel-Chan
4094fa9db3
Docs: Query classification and display
...
Converted from Semmle wiki
2020-07-27 10:06:16 +01:00
ubuntu
8dee3da4fe
Update .qhelp
2020-07-26 23:50:22 +02:00
ubuntu
ac7c511d86
Update .qhelp
2020-07-26 23:47:53 +02:00
ubuntu
2cec8f7e9d
Update .qhelp
2020-07-26 23:23:56 +02:00
ubuntu
c469f71957
Add Codeql query to detect if cookies are sent without the flag being set
2020-07-26 22:56:36 +02:00
luchua-bc
01fb51829c
Unsecure basic authentication
2020-07-24 20:35:09 +00:00
Rasmus Wriedt Larsen
e0016f6c52
Python: CG trace: Mention adding projects in README
2020-07-24 20:08:39 +02:00
Rasmus Wriedt Larsen
aca703e131
Python: CG trace: Add support for flask
2020-07-24 20:06:53 +02:00
Rasmus Wriedt Larsen
bb80635dc3
Python: CG trace: Updated README
2020-07-24 19:35:06 +02:00
Rasmus Wriedt Larsen
ecafc760e8
Python: CG trace: Improved debugging queries a bit
2020-07-24 19:34:51 +02:00
Rasmus Wriedt Larsen
2407c8b07e
Python: CG trace: Better handling of builtins without __module__
...
Not 100% perfect, but better
2020-07-24 19:13:53 +02:00
Rasmus Wriedt Larsen
9c76618d8b
Python: CG trace: Make ./helper.sh show help again
2020-07-24 18:59:29 +02:00
Rasmus Wriedt Larsen
8057e11fe4
Python: CG trace: Add ./helper.sh metrics command
2020-07-24 18:38:12 +02:00
Rasmus Wriedt Larsen
779a82ee07
Python: CG trace: Minor cleanup in helper.sh
2020-07-24 18:37:48 +02:00
Rasmus Wriedt Larsen
4c689434c3
Python: CG trace: Restructure QL code
2020-07-24 17:00:13 +02:00
Rasmus Wriedt Larsen
321d5104f0
Python: CG trace: Autogenerate BytecodeExpr.qll
...
Some code I had lying around, just hadn't comitted.
Not that useful since most of these have been disabled in 55404ae98 for now.
2020-07-24 16:51:14 +02:00
Rasmus Wriedt Larsen
a7bc9544b6
Python: CG trace: Metrics, number of recorded calls not ignored
...
turned out to be useful after all :P
2020-07-24 16:49:54 +02:00
Rasmus Wriedt Larsen
367a49803b
Python: CG trace: handle class instantiation properly in points-to
2020-07-24 11:19:11 +02:00
Rasmus Wriedt Larsen
3ead2e3dc7
Python: CG trace: Improve performance by only logging when needed
...
Seems like a 2x performance overall
wcwidth:
- DEBUG=True 5.78 seconds
- DEBUG=False 2.70 seconds
youtube-dl
- DEBUG=True 238.90 seconds
- DEBUG=False 120.70 seconds
2020-07-23 20:14:49 +02:00
Rasmus Wriedt Larsen
fbd939133e
Python: CG trace: More caching
...
Improves runtime of tracing youtube-dl from 296.19 seconds to 224.50 seconds.
Better, but still not that amazing :|
2020-07-23 18:07:55 +02:00
Rasmus Wriedt Larsen
ce42221cf7
Python: CG trace: Fix some printing in helper.sh
2020-07-23 17:57:52 +02:00
Rasmus Wriedt Larsen
55404ae980
Python: CG trace: Experiment with disabling some opcodes
...
Currently not supported in the QL code, so no reason to pay performance to
record them right now :P
2020-07-23 17:39:43 +02:00
Rasmus Wriedt Larsen
14c51eb3c7
Python: CG trace: XML exporter will tell what file it wrote to
2020-07-23 17:38:54 +02:00
Rasmus Wriedt Larsen
c45cc2aa2f
Python: CG trace: Add helper.sh to run tracing against real projects
2020-07-23 17:37:01 +02:00
Rasmus Wriedt Larsen
5d031d7abe
Python: CG trace: Fix sorting of ExternalCallee
...
Also exposed that the better_compare_for_dataclass was exposed to bad loop
variable capture :|
2020-07-23 17:36:31 +02:00
Rasmus Wriedt Larsen
da518ed0d5
Python: CG trace: Remove Python 3.8 only f"{var=}" usage
2020-07-23 14:01:29 +02:00
Rasmus Wriedt Larsen
bb4b8dceaa
Python: CG trace: More robust logging setup
2020-07-23 14:01:29 +02:00
Rasmus Wriedt Larsen
9157385571
Python: CG trace: XML can export list of dataclass
2020-07-22 17:40:59 +02:00
Remco Vermeulen
3320061178
Add and adjust QL docs for classes and predicates
2020-07-22 16:04:55 +02:00
Remco Vermeulen
2c42d3cca5
Extract additional taint steps
...
This is done for logical cohesion. We already have the capability of
extending additional taint steps by extending
`TaintTracking::AdditionalTaintStep`.
2020-07-22 16:04:55 +02:00
Remco Vermeulen
57e7411c0a
Extract Ldap injection sanitizers to importable lib
...
This includes a new abstract class that represents all the Ldap injection
santizers and can be used to add additional santizers through
extension.
2020-07-22 16:04:55 +02:00
Remco Vermeulen
0d5f9113a3
Extract ldap injection sink into importable library
2020-07-22 16:04:55 +02:00
Rasmus Wriedt Larsen
746c577d72
Python: CG trace: Update naming and add QLDoc
2020-07-22 15:49:11 +02:00
Rasmus Wriedt Larsen
67b45164eb
Python: CG trace: Partial matching of BytecodeExpr and AST not safe
2020-07-22 15:19:57 +02:00
Rasmus Wriedt Larsen
1e89388f2b
Python: CG trace: Don't abuse example dir
2020-07-22 14:22:04 +02:00
Rasmus Wriedt Larsen
ad2e336ead
Python: CG trace: Autoformat
2020-07-22 13:53:22 +02:00
Rasmus Wriedt Larsen
ccffa7d99d
Python: CG trace: Ignore some calls for call-grahp metrics
...
and provide some internal metrics as well
2020-07-22 13:12:52 +02:00
Rasmus Wriedt Larsen
b227a7ec90
Python: CG trace: Add overall metrics query
2020-07-22 00:55:53 +02:00
Rasmus Wriedt Larsen
278ab4b883
Python: CG trace: Much improved toString for QL
2020-07-22 00:55:53 +02:00
Rasmus Wriedt Larsen
a5838b66ed
Python: CG trace: Small improvements to QL code
2020-07-22 00:00:17 +02:00
Rasmus Wriedt Larsen
b86ca19264
Python: CG trace: Apply better_compare_for_dataclass to all
2020-07-21 23:37:33 +02:00
Rasmus Wriedt Larsen
9bff615fad
Python: CG trace: Handle BUILD_LIST
2020-07-21 23:08:33 +02:00
Rasmus Wriedt Larsen
8c8656ccca
Python: CG trace: Handle BUILD_TUPLE
2020-07-21 23:05:49 +02:00
Rasmus Wriedt Larsen
0d05d96b50
Python: CG trace: Handle CALL_FUNCTION_EX
2020-07-21 22:54:45 +02:00
Rasmus Wriedt Larsen
3539798c22
Python: CG trace: ignore with statement for now
2020-07-21 22:54:19 +02:00
Rasmus Wriedt Larsen
4843d29ad6
Python: CG trace: Cache calls seen
...
This improved runtime from ~10 seconds to 1 seconds when running one of the
tests fo wcwidth
2020-07-21 22:54:10 +02:00
Rasmus Wriedt Larsen
ebbea0cd61
Python: CG trace: Ignore IMPORT_NAME
2020-07-21 22:17:17 +02:00
Rasmus Wriedt Larsen
6830804112
Python: CG trace: More logging
2020-07-21 22:08:15 +02:00
Rasmus Wriedt Larsen
3752a25665
Python: CG trace: Handle LOAD_DEREF
2020-07-21 22:02:25 +02:00
Rasmus Wriedt Larsen
61b1d3eef3
Python: CG trace: Handle subscript
2020-07-21 21:45:53 +02:00
Rasmus Wriedt Larsen
79c2c682d7
Python: CG trace: Nicer logging
2020-07-21 21:34:20 +02:00
Rasmus Wriedt Larsen
0a7e6a9938
Python: CG trace: Avoid handling jumps for now
2020-07-21 20:07:33 +02:00
Rasmus Wriedt Larsen
4e3ae98ddf
Python: CG trace: Handle list-comprehension and iteration
...
Which relies on LOAD_CONST and MAKE_FUNCTION
2020-07-21 19:54:59 +02:00
Rasmus Wriedt Larsen
58f11194a8
Python: CG trace: Refactoring
2020-07-21 19:53:05 +02:00
Rasmus Wriedt Larsen
290eb638f9
Python: CG trace: Handle SystemExit
...
otherwise, with-exit would end the tracer without producing any output :|
2020-07-21 19:40:58 +02:00
Rasmus Wriedt Larsen
296d7d1725
Python: CG trace: Allow tracing modules
...
As would normally be invoked by `python -m <module-name>` now works with
`cg-trace --module <module-name>`.
This is useful for tracing invocations of `pytest`.
2020-07-21 19:39:51 +02:00
Rasmus Wriedt Larsen
89e8202d11
Python: CG trace: Add some tests using classes
2020-07-21 11:16:52 +02:00
Rasmus Wriedt Larsen
eeeadad359
Python: CG trace: Don't commit examples traces all the time
2020-07-21 11:14:07 +02:00
Rasmus Wriedt Larsen
38af1930fe
Python: CG trace: Rename ValidRecordedCall to IdentifiedRecordedCall
2020-07-21 10:19:47 +02:00
Raul Garcia (MSFT)
55473c65f1
Improving documentation
2020-07-20 13:54:23 -07:00
Raul Garcia (MSFT)
9d7d6b39cb
Small fixes based on feedback
2020-07-20 11:14:59 -07:00
Remco Vermeulen
c2733ad22e
Apply grammar suggestions
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2020-07-20 14:55:00 +02:00
Rasmus Wriedt Larsen
bbfea44db0
Python: CG trace: Handle multiple calls to same func on same line
...
Such as
```
one(); one()
```
Now there are no InvalidRecordedCall in the current examples.
2020-07-20 14:54:05 +02:00
Rasmus Wriedt Larsen
cb98f4433d
Python: CG trace: Handle multiple calls on one line
...
Reduced number of InvalidRecordedCall from 16 to 2. This is the calls
```
one(); one()
```
since they are not distinguishable from the expression.
2020-07-20 14:07:09 +02:00
Rasmus Wriedt Larsen
a1c1ab080b
Python: CG trace: Add examples of multiple calls on one line
...
There are currently 16 InvalidRecordedCall
2020-07-20 14:03:37 +02:00
Rasmus Wriedt Larsen
49a90c058d
Python: CG trace: minor adjustment to recreate-dh.sh
2020-07-20 13:00:47 +02:00
Rasmus Wriedt Larsen
5ef817012a
Python: CG trace: restructure QL for new XML format
2020-07-20 13:00:07 +02:00
Rasmus Wriedt Larsen
c2748bf7cf
Python: CG trace: reconstruct call expr from bytecode
...
So we can differentiate multiple calls in one line.
2020-07-20 11:28:05 +02:00
Rasmus Wriedt Larsen
d46b410111
Python: CG trace: Proper exception handling
2020-07-20 01:22:33 +02:00
intrigus
f94055fa2c
Move tainted path ad-hoc guard back.
2020-07-19 00:19:29 +02:00
intrigus
33526f61a8
Make path creation subclasses private.
2020-07-19 00:11:04 +02:00
intrigus
b705f7f3e9
Improve "PathCreation" Test.
2020-07-19 00:10:39 +02:00
intrigus
4570444c7e
Rename to getAnInput and clarify doc.
2020-07-19 00:10:13 +02:00
Rasmus Wriedt Larsen
10ec1e078a
Python: CG trace: Better type hints
2020-07-18 17:56:56 +02:00
Rasmus Wriedt Larsen
8b6de17461
Python: CG trace: Use logging module for debuging
2020-07-18 17:56:10 +02:00
Rasmus Wriedt Larsen
acc5f70d4a
Python: CG trace: Python 3.7 is minimal version
2020-07-18 17:10:53 +02:00
Taus Brock-Nannestad
cec3694c89
Python: Add type tracker and step summary implementation.
2020-07-17 16:36:56 +02:00
Rasmus Wriedt Larsen
6c60881cbe
Python: CG trace: Move code to src/
...
As recommended in https://blog.ionelmc.ro/2014/05/25/python-packaging/ and
following pattern of black and pytest
2020-07-17 14:41:49 +02:00
Rasmus Wriedt Larsen
0a0c24f3c5
Python: CG trace: Make code modular
2020-07-17 14:40:54 +02:00
Rasmus Wriedt Larsen
94a03d73a3
Python: CG trace: blackify
...
And make code pass flake8 tests
2020-07-17 13:49:25 +02:00
Raul Garcia (MSFT)
5387294168
Moving to experimental as requested
2020-07-16 09:32:17 -07:00
Rasmus Wriedt Larsen
1c2e259970
Python: CG trace: Handle builtins
2020-07-16 18:04:04 +02:00
Rasmus Wriedt Larsen
92e8e1622c
Python: CG trace: move traces to own dir
2020-07-16 16:47:23 +02:00
Geoffrey White
c4940aaa86
Merge branch 'master' into copymove
2020-07-15 15:01:01 +01:00
Rasmus Wriedt Larsen
abcc76baec
Python: CG trace: use lxml to pretty-print xml
2020-07-15 14:48:58 +02:00
Rasmus Wriedt Larsen
7ac4ea9bf1
Python: CG trace: use standardized etree import
...
makes it easy to switch out XML library.
2020-07-15 14:41:39 +02:00
Rasmus Wriedt Larsen
ba4207fc90
Python: CG trace: sort output before writing/printing
...
Allows comparing output of one run with another
2020-07-15 14:37:41 +02:00
Rasmus Wriedt Larsen
e6873956ca
Python: CG trace: add canonic_filename helper
2020-07-15 14:25:42 +02:00
Raul Garcia (MSFT)
3e0481b889
Queries to help on the detection based on misuse of DataSet and DataTable serialization that could lead to security problems.
...
https://go.microsoft.com/fwlink/?linkid=2132227
2020-07-14 17:54:54 -07:00
Raul Garcia (MSFT)
896cdf9b12
Merge branch 'master' of https://github.com/github/codeql
2020-07-14 11:16:51 -07:00
Geoffrey White
37158f46ed
C++: Remove deprecated class from test.
2020-07-14 15:36:48 +01:00
Geoffrey White
3f6d8490e0
C++: Autoformat.
2020-07-14 15:09:12 +01:00
Geoffrey White
646efe2a20
C++: Deprecate ConversionConstructor.
2020-07-13 15:04:39 +01:00
Arthur Baars
c585b2e483
Java: stack trace exposure: address false positives
2020-07-13 15:26:55 +02:00
Geoffrey White
61178c5330
Merge branch 'master' into copymove
2020-07-13 14:11:12 +01:00
dilanbhalla
48e540fa9a
minor fixes
2020-07-13 01:25:42 -07:00
dilanbhalla
db6d5c329f
file/buffer write dataflow queries complete
2020-07-13 00:57:05 -07:00
Jonathan Leitschuh
1f6615b3b8
Merge branch 'master' into feat/JLL/jOOQ_SQL_injection
...
* master: (485 commits)
C++: Remove @stmt_while from the TConditionalStmt union type.
C++: Remove abstract classes from Stmt.qll
Drop Map.merge as taint step
Add the printAst.ql contextual query for C++
Fix modelling of Stack.push
C#: Sync identical files
C++: Replace getResultType() with getResultIRType() in IR dataflow
C++: Replace getResultType() with getResultIRType() in IR range analysis
C++: Introduce isSigned() and isUnsigned() predicates on IRIntegerType to mirror IntegralType
Add missing java import
Add missing java import
Mark ServletUrlRedirectSink private
Java: model Object.clone
Add file-level qldoc
Optimize imports
Join ServletUrlRedirectSink with UrlRedirectSink
Extend UrlRedirectSink from DataFlow::Node
Remove superfluous imports
Java: ContainerFlow add comments
Generalize QueryInjectionSink
...
2020-07-10 14:37:41 -04:00
Philippe Antoine
bf7e3a004e
Reverting to enclosing block logic
2020-07-10 14:58:00 +02:00
Philippe Antoine
50b2b12ce2
put back missing condition
2020-07-10 14:41:35 +02:00
Philippe Antoine
3117c67a66
Updates result message to be more precise
2020-07-10 14:26:09 +02:00
Mathias Vorreiter Pedersen
2e9c0fc6a5
C++: Cache the TIRDataFlowNode newtype
2020-07-10 11:10:41 +02:00
Remco Vermeulen
c739c733fe
Update class qldocs
...
Change the ql docs to meet the style-guide points 1 and 3 for
classes.
2020-07-09 17:31:37 +02:00
Philippe Antoine
50f2f69f5f
indent comments
2020-07-09 16:14:26 +02:00
Remco Vermeulen
b3bb4cbf54
Rename and update qldoc of default safe header splitting source
2020-07-09 16:14:21 +02:00
Philippe Antoine
06c8a0bf20
move to experimental
2020-07-09 16:09:57 +02:00
Philippe Antoine
d2763e8149
Comments taken into account
2020-07-09 16:05:24 +02:00
Remco Vermeulen
b147be6fea
Restrict SafeHeaderSplittingSource to RemoteFlowSource
2020-07-09 15:13:18 +02:00
Remco Vermeulen
782573ed43
Add and format qldocs according to the style guide.
2020-07-09 14:58:53 +02:00
Remco Vermeulen
4ad6357cd7
Add missing Java import
2020-07-09 14:54:46 +02:00
Remco Vermeulen
7435dac3d2
Move source and sink into importable library
2020-07-09 14:53:59 +02:00
intrigus
641c5df79f
Centralize and model additional path creations.
2020-07-09 14:48:47 +02:00
Remco Vermeulen
b66f391c31
Extend source and sink from DataFlow::Node instead of DataFlow::exprNode
2020-07-09 14:39:08 +02:00
Remco Vermeulen
fed506a12f
Rename TrustedSource to SafeHeaderSplittingSource
2020-07-09 14:36:23 +02:00
Mathias Vorreiter Pedersen
834263f72a
C++: Alternate instruction -> operand flow
2020-07-09 11:36:54 +02:00
Philippe Antoine
5eff8d3165
Performance improvements suggested
2020-07-09 11:31:47 +02:00
lcartey@github.com
0638b512bc
C++: Support custom range expression modeling for variable accesses
2020-07-08 17:56:31 +01:00
dilanbhalla
6e6921b11e
implemented pr fixes
2020-07-08 09:23:52 -07:00
dilanbhalla
05a4798b5e
working on implementing pr fixes
2020-07-08 09:19:46 -07:00
Remco Vermeulen
5f560e0465
Extract HeaderSplittingSink and WhitelistedSource
...
- Extract `HeaderSplittingSink` and `WhitelistedSource` into an
importable library.
- Rename the existing `HeaderSplittingSink` implementation to
`ServletHeaderSplittingSink`.
2020-07-08 17:17:24 +02:00
lcartey@github.com
b4929dbb97
C++: Adopt range analysis interface in the SimpleRangeAnalysis library
2020-07-08 16:00:44 +01:00
lcartey@github.com
5c1275ec5d
C++: Add an interface for exprs that can contribute to range analysis
2020-07-08 16:00:07 +01:00
dilanbhalla
3b9daa2db2
added pr fixes
2020-07-07 11:05:39 -07:00
dilanbhalla
d201c4ba8a
fixed pr suggestions for tags/formatting
2020-07-07 09:34:04 -07:00
Philippe Antoine
8f7ff1a537
Adds another redundant null check rule
2020-07-06 21:45:54 +02:00
luchua-bc
d6e9b07a9e
Add JBoss BasicLogger and SciJava Logger
2020-07-03 22:34:48 +00:00
lcartey@github.com
b242a61701
Java: Untrusted data used in external APIs
...
This commit adds two queries for identifying external APIs which are
used with untrusted data.
These queries are intended to facilitate a security review of the
application, and will report any external API which is called with
untrusted data. The purpose of this is to:
- review how untrusted data flows through this application
- identify opportunities to improve taint modeling of sinks and taint
steps.
As a result this is not suitable for integration into a developer
workflow, as it will likely have high false positive rate, but it may
help identify false negatives for other queries.
2020-07-03 17:32:08 +01:00
luchua-bc
6d329bce6e
Add Apache Commons Logging and debugv method
2020-07-03 01:13:11 +00:00
luchua-bc
a61f814b4b
Change to ServletResponse type and fix formatting error
2020-07-02 12:49:25 +00:00
luchua-bc
1d0232b464
Add more servlet methods and fix formatting errors
2020-07-02 03:07:19 +00:00
dilanbhalla
263f00784f
formatting
2020-07-01 09:25:09 -07:00
dilanbhalla
25bfc3a168
fixed references and used autoformat
2020-07-01 09:23:36 -07:00
dilanbhalla
259654b1a4
moved library to experimental
2020-06-30 18:04:41 -07:00
dilanbhalla
e1130a2bfa
moved privatedata to experimental
2020-06-30 17:58:24 -07:00
dilanbhalla
3fdd11a9b5
scanf fixes, still need to update qhelp file
2020-06-30 17:22:29 -07:00
dilanbhalla
f462156cdf
private data file/buffer write
2020-06-30 12:09:50 -07:00
Jonathan Leitschuh
fa8b278332
Add jOOQ methods as SQL Injection Sinks
2020-06-30 11:57:17 -04:00
Geoffrey White
3016798101
Merge branch 'master' into copymove
2020-06-30 16:20:41 +01:00
Geoffrey White
c57c016ced
C++: Go the other way.
2020-06-30 16:16:00 +01:00
luchua-bc
d978f28822
Simplify the query for subtype check
2020-06-30 11:15:18 +00:00
luchua-bc
382e5a5a7a
Revert "Add remote source of Android intent extra"
...
This reverts commit 65e76ab18f .
2020-06-30 00:55:05 +00:00
luchua-bc
3e8e9f9969
Revert "Add method access qualifier as source"
...
This reverts commit 87668bf075 .
2020-06-30 00:54:27 +00:00
luchua-bc
065b90ab6b
Revert "text changes"
...
This reverts commit 0f8dd7c328 .
2020-06-30 00:53:03 +00:00
luchua-bc
ede9cec4a9
Uncaught Servlet Exception
2020-06-29 20:07:53 +00:00
luchua-bc
0f8dd7c328
text changes
2020-06-27 22:56:00 +00:00
Bt2018
87668bf075
Add method access qualifier as source
2020-06-27 18:00:52 -04:00
luchua-bc
65e76ab18f
Add remote source of Android intent extra
2020-06-25 20:20:18 +00:00
Geoffrey White
edc5d5d128
C++: Add a test of MissingNullTest.
2020-06-25 11:04:06 +01:00
dilanbhalla
0552f9b0cc
memory unsafe scan functions
2020-06-24 11:47:34 -07:00
Geoffrey White
7af79abdbc
C++: Use the ArrayFunction model in Dereferenced.qll.
2020-06-24 19:06:05 +01:00
Geoffrey White
d258aaff26
C++: Extend the memcpy model to include 'bcopy'.
2020-06-24 19:05:38 +01:00
Geoffrey White
dd19ee47a1
C++: Clean up ConversionConstructor.
2020-06-23 11:22:59 +01:00
luchua-bc
9affa157b6
Add Log4J 2 and a new search string secret
2020-06-02 03:21:27 +00:00
Grzegorz Golawski
14ce049fc6
Add support for Saxon
2020-05-15 00:12:08 +02:00
Raul Garcia (MSFT)
f051f46ee9
Merge branch 'master' of https://github.com/semmle/ql
2020-05-05 13:37:03 -07:00
Grzegorz Golawski
d590f3fba8
CodeQL query to detect XSLT injections
2020-04-27 22:35:35 +02:00
Taus Brock-Nannestad
ead687da06
Python: Add false positive test example for issue #2652 .
2020-01-21 15:28:01 +01:00
Raul Garcia (MSFT)
908d789f1b
Merge branch 'master' of https://github.com/semmle/ql
2019-11-22 13:25:22 -08:00
Raul Garcia
e44229435c
Merge pull request #6 from Semmle/master
...
Merge
2019-10-26 19:05:58 -07:00