Max Schaefer
152b290bdf
Revert "JS: More robust hasUnderlyingType"
...
This reverts commit 3e5dc1efb7 .
2021-07-21 11:31:38 +01:00
Max Schaefer
044c759682
Revert "JavaScript: Model chaining calls in sqlite3."
...
This reverts commit 8f91e9eba0 .
2021-07-21 11:28:53 +01:00
Cornelius Riemenschneider
a1c38b78a9
Merge pull request #6163 from adityasharad/lines-of-code-make-unique
...
Ensure only one query per language is tagged `lines-of-code`
2021-06-28 10:57:29 +02:00
Aditya Sharad
61e6dcb56d
Ensure only one query per language is tagged lines-of-code
...
Some languages have multiple `summary` queries for lines of code,
representing different forms of counting (user written, total, etc).
When Code Scanning sees results from multiple such summary queries in a single run,
it will need to choose one as the primary LoC count to display in the UI.
By ensuring only one query per language has the `lines-of-code` tag,
in future we can teach Code Scanning to look for this particular tag
to identify the primary LoC count.
If a "lines of user code" query is available, use that.
Otherwise use the total "lines of code".
(It is completely fine for multiple queries to be tagged with `summary`.)
2021-06-25 16:45:37 -07:00
Chris Smowton
8aa9cd52b5
Merge pull request #5811 from mogwailabs/insecureJmxRmiServerEnvironment
...
Java: Add query - insecure environment configuration during JMX/RMI server init
2021-06-25 22:09:20 +01:00
Timo Mueller
e5fa5325b5
Auto formatting .ql file
2021-06-25 22:31:29 +02:00
Timo Mueller
eb0a13f60f
Merge branch 'insecureJmxRmiServerEnvironment' of github.com:mogwailabs/codeql into insecureJmxRmiServerEnvironment
2021-06-25 22:29:43 +02:00
Chris Smowton
def4a23af2
Merge pull request #4879 from intrigus-lgtm/java/improve-trustmanager
...
Java: Add/improve insecure trustmanager query
2021-06-25 18:15:55 +01:00
Tom Hvitved
e624fb46f9
Merge pull request #6152 from hvitved/csharp/dataflow/csv-out-ref
2021-06-25 18:02:59 +02:00
intrigus
5aa711a956
Accept test changes.
2021-06-25 17:04:36 +02:00
Owen Mansel-Chan
44f0411b7c
Merge pull request #6138 from owen-mc/java/model/apache-commons-collections
...
Model Apache commons collections MapUtils class and keyvalue package
2021-06-25 15:53:03 +01:00
Anders Schack-Mulligen
a79356e316
Apply suggestions from code review
2021-06-25 16:47:26 +02:00
intrigus
be57aeccf2
Remove change-note.
2021-06-25 16:47:26 +02:00
intrigus
5106aec319
Fix test location.
2021-06-25 16:47:25 +02:00
intrigus
36575bb26f
Move back to experimental.........
2021-06-25 16:47:25 +02:00
intrigus
fe923facc8
Java: Move comments to separate lines.
...
Move comments to separate lines to improve
the rendering in the finished query help.
2021-06-25 16:47:25 +02:00
intrigus-lgtm
f527df73d5
Apply suggestions from code review.
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-06-25 16:47:25 +02:00
intrigus
f0d4b1d2b0
Java: Add change-note.
2021-06-25 16:47:25 +02:00
intrigus
6bfdf8d148
Java: Fix qhelp errors.
2021-06-25 16:47:24 +02:00
intrigus
dc0b06a735
Java: Factor out SecurityFlag library.
2021-06-25 16:47:24 +02:00
intrigus-lgtm
51fdcf86c8
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-06-25 16:47:24 +02:00
intrigus
6f217d37da
Java: Apply suggestions from review.
2021-06-25 16:47:24 +02:00
intrigus
4a00670b68
Java: Reduce long comment.
2021-06-25 16:47:24 +02:00
intrigus
45cec3df1c
Java: Use this consistently in QL classes.
2021-06-25 16:47:24 +02:00
intrigus
0c1ce74135
Java: Switch from tabs to spaces.
2021-06-25 16:47:24 +02:00
intrigus
281e0859d1
Java: Accept test changes.
2021-06-25 16:47:23 +02:00
intrigus
6413af4fbe
Java: Expand tests.
2021-06-25 16:47:23 +02:00
intrigus
484533c659
Java: Flag "intentionally" unsafe methods in tests.
...
Previously intentionally unsafe methods such as `disableCertificate`
would be ignored by this query. But now they will also be flagged
as it is hard to guess intentions...
Adjust the tests to account for this change.
2021-06-25 16:47:23 +02:00
intrigus
7023793af4
Java: Fix compilation errors in test.
2021-06-25 16:47:23 +02:00
intrigus
6d09db6fd6
Java: Explicitly list custom flow steps.
2021-06-25 16:47:23 +02:00
intrigus
e4775e0fae
Java: Remove "intention-guessing" sanitizer & simplify.
...
This removes the sanitizer part that classified some results as FP
if the results were in methods with certain names, like
`disableVerification()`. I now think that it's a bad idea to filter
based on the method name.
The custom flow steps in `flagFlowStep` are now listed explicitly.
Simplified check whether a method throws an exception.
2021-06-25 16:47:23 +02:00
intrigus
8a7f6b72e9
Java: Apply suggestions for QHelp
2021-06-25 16:47:23 +02:00
intrigus
d37d922e8f
Java: Fix Typos
2021-06-25 16:47:22 +02:00
intrigus-lgtm
030c286902
Java: Use machine-in-the-middle consistently
2021-06-25 16:47:22 +02:00
intrigus-lgtm
f52e438f3e
Java: Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-06-25 16:47:22 +02:00
intrigus
592fd1e8ca
Java: Accept test changes
2021-06-25 16:47:22 +02:00
intrigus
1b96d0ac54
Java: Remove overlapping code
2021-06-25 16:47:22 +02:00
intrigus
87554a78d4
Java: Add insecure trust manager query.
2021-06-25 16:47:22 +02:00
Timo Müller
8daa398af6
Update InsecureRmiJmxEnvironmentConfiguration.ql
2021-06-25 16:12:37 +02:00
Timo Mueller
b969b9b5e7
Merge branch 'insecureJmxRmiServerEnvironment' of github.com:mogwailabs/codeql into insecureJmxRmiServerEnvironment
2021-06-25 16:11:47 +02:00
Timo Mueller
72ef4983db
Fixed wrong match for symbolic constant
2021-06-25 16:11:37 +02:00
Timo Müller
328b69f46c
Update java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql
2021-06-25 16:10:20 +02:00
Owen Mansel-Chan
bad32716e8
Import Apache Collections models in ExternalFlow
2021-06-25 14:51:09 +01:00
Timo Mueller
5aeeb3a801
Fixed and validated qhelp
2021-06-25 15:37:47 +02:00
Owen Mansel-Chan
044ecc51e5
Manually improve tests #2
2021-06-25 13:51:18 +01:00
Owen Mansel-Chan
e2803800dc
Add change note
2021-06-25 12:55:09 +01:00
Owen Mansel-Chan
2fd4c9f1b9
Manually improve tests
2021-06-25 11:17:11 +01:00
Owen Mansel-Chan
1bb33bca33
Add Apache Commons Collections to coverage reports
2021-06-25 11:17:10 +01:00
Owen Mansel-Chan
eb469c0811
Duplicate models for old package name
...
The package name was org.apache.commons.collection until release 4.0.
2021-06-25 11:17:09 +01:00
Owen Mansel-Chan
2e670c4050
Manually update automatically generated stubs
2021-06-25 11:17:08 +01:00
Owen Mansel-Chan
acc43fcaca
Add options file
2021-06-25 11:17:07 +01:00
Owen Mansel-Chan
5feee9cc17
Add automatically-generated stubs
2021-06-25 11:17:06 +01:00
Owen Mansel-Chan
7004c87ec0
Manually edit tests so they pass
2021-06-25 11:17:05 +01:00
Owen Mansel-Chan
4388f19ddf
Add automatically-generated tests
2021-06-25 11:17:04 +01:00
Owen Mansel-Chan
224fd343f3
Fix models (addressing PR review comments)
2021-06-25 11:17:03 +01:00
Owen Mansel-Chan
e78d56e7e9
Model MapUtils class and keyvalue package
2021-06-25 11:17:02 +01:00
Owen Mansel-Chan
213f5d6a37
Model and use isEmpty from Apache Collections
2021-06-25 11:17:01 +01:00
Owen Mansel-Chan
492f6ebc7c
Model isNotEmpty from Apache Commons Collections
2021-06-25 11:17:00 +01:00
Anders Schack-Mulligen
2d24387e9e
Merge pull request #6149 from edoardopirovano/fix-java-regression
...
Performance: Fix bad join order in Java dataflow library
2021-06-25 10:42:05 +02:00
Timo Müller
d0478eac95
XML validation and spelling/ordering changes
...
* XML validation and summary changes in qhelp file
;
* Encode entities within <code> snippet
* Updated minor descriptions and examples
* Implemented spelling review
2021-06-25 09:45:46 +02:00
Tamás Vajk
1cddcdfcb1
Merge pull request #6123 from tamasvajk/feature/framework-coverage-pr
...
Add scheduled job to update framework coverage
2021-06-25 09:18:10 +02:00
CodeQL CI
28c060e758
Merge pull request #6113 from erik-krogh/promise
...
Approved by esbena
2021-06-24 13:25:42 -07:00
yo-h
61c89369b8
Merge pull request #6151 from tamasvajk/fix/csv-comment-backwards-compat
...
Fix framework coverage commenting action
2021-06-24 15:57:03 -04:00
Tom Hvitved
7a9f9e245f
C#: Handle CSV data-flow summaries with out/ref parameters
2021-06-24 18:34:25 +02:00
Chris Smowton
2acb4de2cb
Merge pull request #5955 from haby0/java/JShellCodeInjection
...
Java: JShell Injection
2021-06-24 17:03:30 +01:00
Anders Schack-Mulligen
95ad8b55fe
Merge pull request #6107 from aschackmull/dataflow/implicit-reads
...
Dataflow: Add support for implicit reads
2021-06-24 15:38:35 +02:00
Anders Schack-Mulligen
01fc3e6559
C++/C#/Java/Python: Add change notes.
2021-06-24 14:29:34 +02:00
Anders Schack-Mulligen
cd0efbe7ce
Dataflow: Sync.
2021-06-24 14:19:17 +02:00
Anders Schack-Mulligen
1c1d11a4a4
DataFlow: Address review comments.
2021-06-24 14:18:45 +02:00
haby0
3cf71c50b8
Mobile stubs
2021-06-24 19:24:38 +08:00
Anders Schack-Mulligen
1e511c0a9e
Merge pull request #6137 from smowton/smowton/feature/java-util-optional
...
Java: Model java.util.Optional
2021-06-24 13:21:36 +02:00
Tamás Vajk
173be0cce0
Merge pull request #6144 from tamasvajk/feature/stub-dapper
...
C#: Change Dapper stub to nuget-based one (stub also System.Data.SqlC…
2021-06-24 11:41:12 +02:00
Rasmus Wriedt Larsen
686638a65f
Merge pull request #6049 from RasmusWL/jmespath
...
Python: Add modeling of `jmespath`
2021-06-24 11:13:19 +02:00
Tamas Vajk
477dfa28ec
Fix framework coverage commenting action
...
This commit handles the case when the current run finds no coverage change and the previous run is identified,
but it doesn't have the required artifacts.
2021-06-24 10:44:36 +02:00
Edoardo Pirovano
0909c9ff22
Performance: Fix bad join order in dataflow library
2021-06-24 08:24:17 +01:00
Tamas Vajk
ad6e47be39
Apply code review findings
2021-06-24 09:13:08 +02:00
Tamas Vajk
7557b7a67d
Add scheduled coverage job to open PR with changes
2021-06-24 09:13:08 +02:00
Tamás Vajk
4a19a9978a
Merge pull request #6115 from tamasvajk/feature/framework-coverage-comment-noise
...
Only post comment with framework coverage change if it changed or wasn't done before
2021-06-24 08:44:03 +02:00
CodeQL CI
c02c96369d
Merge pull request #6139 from erik-krogh/colors
...
Approved by esbena
2021-06-23 14:02:17 -07:00
yo-h
ffdc752720
Merge pull request #6059 from smowton/smowton/fix/qualified-name-generic-types
...
Adapt to static methods and nested types returning unbound declaring types
2021-06-23 14:45:51 -04:00
Chris Smowton
4c777eb04a
Add change note
2021-06-23 18:54:27 +01:00
Tamás Vajk
8518e7c5a3
Merge pull request #6146 from tamasvajk/feature/stub-nhibernate
...
C#: Change nHibernate stub to nuget-based one
2021-06-23 18:00:45 +02:00
Tamás Vajk
4dc70fa959
Merge pull request #6145 from tamasvajk/feature/stub-jsonnet
...
C#: Change Newtonsoft.Json stub to nuget-based one
2021-06-23 18:00:27 +02:00
Chris Smowton
f6ba4e0235
Merge pull request #6142 from artem-smotrakov/better-spring-exporters
...
Added sinks for RmiBasedExporter and HessianExporter
2021-06-23 16:39:10 +01:00
CodeQL CI
469e709113
Merge pull request #6055 from RasmusWL/rsa-modeling
...
Approved by yoff
2021-06-23 08:35:25 -07:00
Chris Smowton
9c91d1a965
Add change note
2021-06-23 16:09:29 +01:00
Chris Smowton
74feaf2893
Adapt to static methods and nested types returning unbound declaring types
...
Previously these returned raw declaring types instead
2021-06-23 16:03:18 +01:00
Chris Smowton
b34448af87
{Generic,Parameterized,Raw}Type: implement getAPrimaryQlClass
...
An aid to debugging
2021-06-23 15:58:31 +01:00
Mathias Vorreiter Pedersen
9b8f558fb8
Merge pull request #6125 from MathiasVP/improve-tainted-arithmetic
...
C++: Add more barriers to `cpp/tainted-arithmetic`
2021-06-23 16:44:20 +02:00
Mathias Vorreiter Pedersen
295e022df3
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 15:45:18 +02:00
Ian Lynagh
089e4e2e1e
Merge pull request #6147 from AlexDenisov/adjust_test_expectation
...
C++: Adjust test expectations after frontend upgrade
2021-06-23 14:43:47 +01:00
Tamas Vajk
b0447089d9
C#: Change Dapper stub to nuget-based one (stub also System.Data.SqlClient)
2021-06-23 15:04:57 +02:00
Anders Schack-Mulligen
6374914053
Java: Fix bad magic.
2021-06-23 14:39:18 +02:00
Alex Denisov
653afc8448
C++: Adjust test expectations after frontend upgrade
2021-06-23 14:39:16 +02:00
Mathias Vorreiter Pedersen
c44475458e
Update cpp/ql/src/Security/CWE/CWE-190/Bounded.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-06-23 14:38:36 +02:00
Erik Krogh Kristensen
dbc8b9cf6a
autoformat
2021-06-23 14:21:15 +02:00
CodeQL CI
a86f50e091
Merge pull request #6135 from erik-krogh/chokidar
...
Approved by esbena
2021-06-23 05:16:06 -07:00
CodeQL CI
b66f4cb965
Merge pull request #6134 from erik-krogh/templates
...
Approved by asgerf, esbena
2021-06-23 05:09:23 -07:00
Tamas Vajk
f352bcb0a3
C#: Change nHibernate stub to nuget-based one
2021-06-23 13:55:19 +02:00
Tamas Vajk
1188e1b678
Fix extra constructor stubbing
2021-06-23 13:50:54 +02:00
Tamas Vajk
e200ecde4a
C#: Change Newtonsoft.Json stub to nuget-based one
2021-06-23 13:49:11 +02:00
Rasmus Wriedt Larsen
0774e985ce
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-06-23 13:37:38 +02:00
Tamás Vajk
2dc0849b79
Merge pull request #5664 from tamasvajk/feature/stub-generation
...
C#: Stub generation
2021-06-23 13:33:10 +02:00
Rasmus Wriedt Larsen
447099a1df
Python: Update jmespath tests
2021-06-23 13:32:19 +02:00
Artem Smotrakov
0dfb869c5b
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-06-23 13:23:54 +02:00
Mathias Vorreiter Pedersen
6379463bcf
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 11:42:45 +02:00
Tamas Vajk
09dd615c6b
Regenerate stubs (add System.Void struct)
2021-06-23 11:38:41 +02:00
Geoffrey White
298f70f082
Merge pull request #6120 from MathiasVP/not-overflow-is-barrier-in-cwe-190
...
C++: Recognize any non-overflowing arithmetic expression as a barrier for `cpp/uncontrolled-arithmetic`
2021-06-23 10:35:33 +01:00
Tamas Vajk
d698f0ae27
Fix VoidType handling
2021-06-23 11:30:47 +02:00
Mathias Vorreiter Pedersen
9b94f3a650
Merge branch 'main' into improve-tainted-arithmetic
2021-06-23 11:04:08 +02:00
Rasmus Wriedt Larsen
c0964617d7
Merge pull request #6111 from tausbn/python-a-few-minor-cleanups
...
Python: A few minor bits of cleanup
2021-06-23 10:42:41 +02:00
Erik Krogh Kristensen
6cf275bb36
update change-note
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-06-23 10:42:26 +02:00
Erik Krogh Kristensen
700dfcc3a7
add comment about why colors/safe is not safe
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-06-23 10:39:56 +02:00
Mathias Vorreiter Pedersen
a611e76ed2
C++: Respond to review comments.
2021-06-23 10:28:00 +02:00
Erik Krogh Kristensen
8b5c285ac8
add support for the chokidar library
2021-06-23 09:59:34 +02:00
Artem Smotrakov
14e724bce6
Added sinks for RmiBasedExporter and HessianExporter
2021-06-23 09:53:47 +02:00
Tamas Vajk
133d760659
Regenerate stubs to update nested class names in comments
2021-06-23 09:53:39 +02:00
Tamas Vajk
9ba1529f19
Fix nested class names in comments of stubs expected test file
2021-06-23 09:38:29 +02:00
Tamas Vajk
b40b6f40b6
Change frameworks folder to _frameworks
2021-06-23 09:26:55 +02:00
Tamas Vajk
5b2be8ce2d
Fix code review findings
2021-06-23 09:26:55 +02:00
Tom Hvitved
026bcc72f2
C#: Improve performance of stubbing library
2021-06-23 09:26:54 +02:00
Tamas Vajk
405c008b47
Fix conversion operator stubbing + reduce skipped ctor noise in stubs
2021-06-23 09:26:54 +02:00
Tamas Vajk
e4b02e377c
Add .net core and asp.net core stubs
2021-06-23 09:26:54 +02:00
Tamas Vajk
0f18fd6892
Adjust script to handle .net core framework reference
2021-06-23 09:26:54 +02:00
Tamas Vajk
4eee6ef1d9
Handle system.object missing base type
2021-06-23 09:26:54 +02:00
Tamas Vajk
97cd006b2c
Add missing required private constructors
2021-06-23 09:26:54 +02:00
Tamas Vajk
d7a93a5367
Move default excluded assembly definition
2021-06-23 09:26:54 +02:00
Tamas Vajk
f597c9a7ed
Handle special case of duplicate type constraints
2021-06-23 09:26:54 +02:00
Tamas Vajk
42fcfad0d8
Handle types defined in multiple assemblies
2021-06-23 09:26:54 +02:00
Tamas Vajk
22f3b05170
Handle all structs (simple types, intptr, system.void)
2021-06-23 09:26:54 +02:00
Tamas Vajk
914da6bdd2
Fix various stubbing issues
2021-06-23 09:26:54 +02:00
Tamas Vajk
fec0ddd2d2
Add test for tuples with arity < 2
2021-06-23 09:26:54 +02:00
Tamas Vajk
d7d653b9d2
Fix tuple stubbing with arity < 2
2021-06-23 09:26:54 +02:00
Tamas Vajk
2edfa15472
Reduce size of stubDefaultArguments predicate
2021-06-23 09:26:54 +02:00
Tamas Vajk
e93736f583
Change base class of GeneratedDeclaration to Modifiable
2021-06-23 09:26:54 +02:00
Tamas Vajk
53054290d1
Improve QL check for path match on netcore.app.ref in exluded assemblies
2021-06-23 09:26:54 +02:00
Tamas Vajk
a00c2ccf31
Remove _stub.cs file generation
2021-06-23 09:26:54 +02:00
Tamas Vajk
31795c3e6b
Introduce test option to include files from projects
2021-06-23 09:26:54 +02:00
Tamas Vajk
cce7404470
Add csproj generation
2021-06-23 09:26:54 +02:00
Tamas Vajk
b725f6e547
Handle types that are defined in multiple assemblies
2021-06-23 09:26:54 +02:00
Tamas Vajk
ce214cfbf8
Split generated stubs to separate files
2021-06-23 09:26:53 +02:00
Tamas Vajk
88c97bd34e
Generate stubs per assembly
2021-06-23 09:26:53 +02:00
Tamas Vajk
ba238578d1
Add stubbing tests
2021-06-23 09:26:53 +02:00
Tamas Vajk
7e7a52de3c
Stub IndexerName attribute
2021-06-23 09:26:53 +02:00
Tamas Vajk
5e07d82b42
Stub unsafe modifier
2021-06-23 09:26:53 +02:00
Tamas Vajk
4e0bbffac4
Fix ExtraGeneratedConstructor to exclude static constructors and take into account generic derived classes
2021-06-23 09:26:53 +02:00
Tamas Vajk
e96754c2d5
Fix all remaining issues to stub entity framework core
2021-06-23 09:26:53 +02:00
Tamas Vajk
3e92be5324
Extract private/internal members from referenced assemblies + stub required non public constructors
2021-06-23 09:26:53 +02:00
Tamas Vajk
bd83f74dca
Fix generic type constraint order
2021-06-23 09:26:53 +02:00
Tamas Vajk
9b6e9ab148
Escape field names
2021-06-23 09:26:53 +02:00
Tamas Vajk
3c3ddcc8fb
Fix protected internal on override in the same assembly
2021-06-23 09:26:53 +02:00
Tamas Vajk
e6bfb0d1d2
Fix qualified name stubbing for nested types
2021-06-23 09:26:53 +02:00
Tamas Vajk
8cbdd30e1e
Fix generic type constraint stubbing on overrides
2021-06-23 09:26:53 +02:00
Tamas Vajk
ff4db5b8d2
Fix abstract override member generation
2021-06-23 09:26:53 +02:00
Tamas Vajk
cda285de18
Use dotnet format to format the output stub file
2021-06-23 09:26:53 +02:00
Tamas Vajk
53655d4ae4
Only stub declarations from libraries
2021-06-23 09:26:53 +02:00
Tamas Vajk
eabf6b0be8
Only stub effectively public declarations
2021-06-23 09:26:53 +02:00
Tamas Vajk
66eca53b00
Fix accessibility modifier stubbing
2021-06-23 09:26:53 +02:00
Tamas Vajk
1aadd3f3d6
Fix constant value stubbing
2021-06-23 09:26:53 +02:00
Tamas Vajk
264d216a33
Generate stub for nested classes
2021-06-23 09:26:53 +02:00
Tamas Vajk
27608b3b38
Add support for event stubbing
2021-06-23 09:26:53 +02:00
Tamas Vajk
85b3ec6096
Add support for base ctor calls in stubbing
2021-06-23 09:26:53 +02:00
Tamas Vajk
7bf1794310
Add support for delegate stubbing
2021-06-23 09:26:53 +02:00
Tamas Vajk
a273f88a51
Add support for explicitly implemented indexers
2021-06-23 09:26:53 +02:00
Tamas Vajk
481ae0ff19
Exclude default struct constructors from stubs
2021-06-23 09:26:53 +02:00
Tamas Vajk
3f0a158b3c
Add query to select all public declarations from target assemblies
2021-06-23 09:26:53 +02:00
Tamas Vajk
bfa9bf33c0
C#: Add nuget based stubbing script
2021-06-23 09:26:53 +02:00
Erik Krogh Kristensen
fa02651542
add taint step through the strip-ansi library
2021-06-23 09:13:03 +02:00
Erik Krogh Kristensen
fe76341820
add taint step through the chalk library
2021-06-23 09:12:48 +02:00
Erik Krogh Kristensen
053d9b5564
add taint step through the kleur library
2021-06-23 09:12:25 +02:00
Tamas Vajk
9d004ec2d5
Handle case when changes had been reported, and then removed
2021-06-23 08:25:20 +02:00
Tamas Vajk
5657c215e9
Change workflow step name
2021-06-23 08:25:20 +02:00
Tamas Vajk
a165cde808
Compute framework coverage diff in artifacts job
2021-06-23 08:25:20 +02:00
Tamas Vajk
d6361d8500
Use string interpolation
2021-06-23 08:23:44 +02:00
Tamas Vajk
12e4ad2640
Fix code quality issues
2021-06-23 08:23:44 +02:00
Tamas Vajk
d28fd363f9
Fix string vs int ID comparison
2021-06-23 08:23:44 +02:00
Tamas Vajk
801007357f
Only post comment with framework coverage change if it changed or wasn't done before
2021-06-23 08:23:44 +02:00
Tamas Vajk
0e91269a23
Refactor framework coverage job to download artifacts from python
2021-06-23 08:23:44 +02:00
Tamás Vajk
fa215bcda5
Merge pull request #6132 from tamasvajk/fix/coverage-commenter-base
...
Fix framework coverage commenter to use merge commit parent instead o…
2021-06-23 08:12:07 +02:00
CodeQL CI
37b66f9045
Merge pull request #6117 from asgerf/js/sharpen-match-calls
...
Approved by esbena
2021-06-22 22:52:37 -07:00
Erik Krogh Kristensen
6e2b92468f
add taint step through the slice-ansi library
2021-06-22 23:14:14 +02:00
Erik Krogh Kristensen
35c513d38a
add taint step through the cli-color library
2021-06-22 23:10:40 +02:00
Erik Krogh Kristensen
ec9c885908
add taint step through the cli-highlight library
2021-06-22 23:06:50 +02:00
Erik Krogh Kristensen
d114cdc6e5
add taint step through the colorette library
2021-06-22 23:02:01 +02:00
Erik Krogh Kristensen
e4427bb34a
add taint step through the wrap-ansi library
2021-06-22 22:59:03 +02:00
Erik Krogh Kristensen
626a653401
add taint step through the colors library
2021-06-22 22:55:15 +02:00
Erik Krogh Kristensen
a21ebbbe8f
add taint step through the ansi-colors library
2021-06-22 22:47:58 +02:00
Chris Smowton
9fd1606238
Model java.util.Optional
2021-06-22 21:17:22 +01:00
CodeQL CI
d719a1e627
Merge pull request #6114 from erik-krogh/promisify
...
Approved by esbena
2021-06-22 12:19:38 -07:00
Erik Krogh Kristensen
2ba2642c7a
add more template sinks for the js/code-injection query
2021-06-22 20:24:42 +02:00
CodeQL CI
bde1bb4030
Merge pull request #6126 from erik-krogh/dates
...
Approved by esbena
2021-06-22 10:35:51 -07:00
Taus
317c6867aa
Python: Fix sneaky semantic change
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-06-22 16:46:54 +02:00
CodeQL CI
eb95dff746
Merge pull request #6129 from erik-krogh/ReDoSCWE
...
Approved by esbena
2021-06-22 07:02:39 -07:00
Shati Patel
396de59ad7
Merge pull request #6131 from erik-krogh/toUnicodeDoc
...
mention the new `toUnicode` method in the QL language specification
2021-06-22 14:36:16 +01:00
Erik Krogh Kristensen
062502fecc
add back support for util-promisifyall
2021-06-22 15:34:51 +02:00
Tamas Vajk
870e4125dc
Fix framework coverage commenter to use merge commit parent instead of (old) base repo SHA
2021-06-22 13:24:26 +02:00
Erik Krogh Kristensen
3bdd9f7a30
mention the new toUnicode method in the QL language specification
2021-06-22 13:13:30 +02:00
Tom Hvitved
38a38fd2c1
Merge pull request #6003 from hvitved/csharp/external-summaries
...
C#: CSV-based flow summaries
2021-06-22 12:59:44 +02:00
Asger Feldthaus
16e3681fd3
JS: Update RegExpInjection test case
2021-06-22 12:00:04 +02:00
Anders Schack-Mulligen
206a37cf08
Merge pull request #6130 from aschackmull/java/collection-test
...
Java: Improve test and fix a few missing cases.
2021-06-22 11:56:44 +02:00
Erik Krogh Kristensen
4360e5dcbc
add model of the thenify library
2021-06-22 11:55:58 +02:00
Erik Krogh Kristensen
61cc415a32
add model of the util.promisify library
2021-06-22 11:55:58 +02:00
Erik Krogh Kristensen
2f3ea4412f
add model of the pify library
2021-06-22 11:55:54 +02:00
Rasmus Wriedt Larsen
5db627042f
Merge pull request #6091 from tausbn/python-exclude-main-py-files
...
Python: Avoid `__main__.py` files as entry points.
2021-06-22 11:29:02 +02:00
Rasmus Wriedt Larsen
e05d6e71b8
Merge pull request #6064 from tausbn/python-add-get-method-call
...
Python: Add `getAMethodCall` to `LocalSourceNode`
2021-06-22 11:16:39 +02:00
Anders Schack-Mulligen
38fc8a750c
Java: Improve test and fix a few missing cases.
2021-06-22 11:16:02 +02:00
Jonas Jensen
ae296fc6db
Merge pull request #6101 from github/AlonaHlobina-patch-3
...
Adding C++20 Beta support.rst
2021-06-22 11:02:15 +02:00
Erik Krogh Kristensen
c736606695
add support for moment/dayjs/luxon instances returned by @date-io adapters
2021-06-22 10:42:24 +02:00
Erik Krogh Kristensen
f2ca2134d1
refactor promisify models into a module
2021-06-22 10:40:22 +02:00
Erik Krogh Kristensen
f53955fb5e
add support for the promise.allsettled library
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
95a7b16315
add support for the lie polyfill
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
085efe5d20
add support for the any-promise polyfill
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
cb82cdf6e9
add support for the synchronous-promise library
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
5cb3c2c650
add support for the pinkie polyfill
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
b574292dab
add support for the pinkie-promise polyfill
2021-06-22 10:30:33 +02:00
Erik Krogh Kristensen
bb1c971348
add support for the when polyfill, and expand the defition of ES2015PromiseDefinition
2021-06-22 10:30:32 +02:00
Erik Krogh Kristensen
e467ea2ea6
add support for the native-promise-only polyfill
2021-06-22 10:30:32 +02:00
Erik Krogh Kristensen
ebde9015d8
add support for the rsvp and es6-promise polyfill
2021-06-22 10:30:32 +02:00
Erik Krogh Kristensen
d7a47e8fbd
add support for the promise-polyfill polyfill
2021-06-22 10:30:32 +02:00
Erik Krogh Kristensen
f095e190a9
add support for the promise polyfill
2021-06-22 10:30:32 +02:00
Erik Krogh Kristensen
967ccfef0c
add support for kew
2021-06-22 10:30:28 +02:00
Erik Krogh Kristensen
a4303bc81d
add CWE-1333 to the JS ReDoS queries
2021-06-22 10:24:56 +02:00
AlonaHlobina
2a9d0009be
Update versions-compilers.rst
2021-06-22 10:36:19 +03:00
Erik Krogh Kristensen
227f61b954
add model for the luxon library
2021-06-21 23:29:12 +02:00
Erik Krogh Kristensen
cdf3cdcf71
add model for the formatByString and formatByNumber functions in @date-io
2021-06-21 23:29:01 +02:00
Erik Krogh Kristensen
2a4570eaaa
add model for the dayjs library
2021-06-21 23:28:45 +02:00
Taus
ba6ab8ff3d
Python: Expand __main__.py comment
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-06-21 18:14:03 +02:00
Taus
768cab3642
Python: Address review comments
...
- changes `getReceiver` to `getObject`
- fixes `calls` to avoid unwanted cross-talk
- adds some more documentation to highlight the above issue
2021-06-21 14:57:19 +00:00
Mathias Vorreiter Pedersen
3bc6b11ae5
C++: Share the 'bounded' predicate from 'cpp/uncontrolled-arithmetic' and use it in 'cpp/tainted-arithmetic'.
2021-06-21 16:38:17 +02:00
Anders Schack-Mulligen
c06e152e90
Java: Remove outdated test.
2021-06-21 16:08:59 +02:00
Anders Schack-Mulligen
27c973e157
Java: Fix some qltests.
2021-06-21 16:08:52 +02:00
Mathias Vorreiter Pedersen
05389bb9d4
Merge pull request #6099 from geoffw0/weak-crypto3
...
Further improvements to cpp/weak-cryptographic-algorithm
2021-06-21 15:46:50 +02:00
Rasmus Wriedt Larsen
1c48aca630
Merge branch 'main' into jmespath
2021-06-21 15:26:45 +02:00
CodeQL CI
565af1a879
Merge pull request #6071 from RasmusWL/fix-input-cwe
...
Approved by calumgrant, tausbn
2021-06-21 06:23:18 -07:00
Geoffrey White
05ed4ed739
Update cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-06-21 14:22:56 +01:00
AlonaHlobina
281a619646
Merge branch 'main' into AlonaHlobina-patch-3
2021-06-21 16:22:10 +03:00
yoff
baf8d0a990
Merge pull request #6045 from RasmusWL/twisted
...
Python: Model twisted
2021-06-21 14:52:57 +02:00
Anders Schack-Mulligen
810de73246
C/C++: Update qltest expected output.
2021-06-21 14:47:31 +02:00
Anders Schack-Mulligen
14b485efa4
Merge pull request #6119 from smowton/smowton/fix/jaxrs-tests-field-flow
...
Increase field flow branch limit in Jax-RS tests
2021-06-21 14:43:59 +02:00
Anders Schack-Mulligen
d383c0f69b
Java: Remove temporary store-as-taint.
2021-06-21 14:42:47 +02:00
Anders Schack-Mulligen
65ac8be5ac
Java: Add defaultImplicitTaintRead and sync.
2021-06-21 14:42:47 +02:00
Anders Schack-Mulligen
38319a4832
C/C++: Make Content public as DataFlow::Content.
2021-06-21 14:42:47 +02:00
Anders Schack-Mulligen
aa82d0b815
Java: Make Content public as DataFlow::Content.
2021-06-21 14:42:47 +02:00
Anders Schack-Mulligen
80880320d5
Dataflow: Sync.
2021-06-21 14:42:47 +02:00
Anders Schack-Mulligen
b7ac329ba1
DataFlow: Add support for configuration-specific implicit reads.
2021-06-21 14:41:19 +02:00
Mathias Vorreiter Pedersen
238c483e5b
C++: Make any non-overflowing arithmetic operation a barrier.
2021-06-21 14:05:34 +02:00
Mathias Vorreiter Pedersen
18e5d3cce8
C++: Add false positive with multiplication.
2021-06-21 14:04:27 +02:00
Chris Smowton
e2aaae8181
Increase test fieldFlowBranchLimit to 1000
...
Might as well head off future failures in this test
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-06-21 12:51:37 +01:00
Chris Smowton
c5eef7be8c
Increase field flow branch limit in Jax-RS tests
...
This fixes apparently-missing results by allowing the dataflow library to persist even when there are many Map implementations possibly available.
2021-06-21 12:46:13 +01:00
Geoffrey White
6f808c9e4c
C++: Update change note.
2021-06-21 12:32:48 +01:00
Geoffrey White
79198974dc
Merge branch 'main' into weak-crypto3
2021-06-21 11:55:29 +01:00
Anders Schack-Mulligen
9110dfaeb3
Merge pull request #6095 from hvitved/dataflow/local-cc-join
...
Data flow: Fix `getLocalCallContext` join-order
2021-06-21 12:53:38 +02:00
Geoffrey White
90e2a2d222
C++: Change note.
2021-06-21 11:30:12 +01:00
Asger Feldthaus
0754ed2b5c
JS: Change note
2021-06-21 11:46:44 +02:00
Rasmus Wriedt Larsen
d6ec4d30fc
Python: Twisted refactor of getRequestParamIndex
2021-06-21 10:54:28 +02:00
Rasmus Wriedt Larsen
8208aebd7e
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-06-21 10:43:25 +02:00
Shati Patel
bbb5a39c02
Merge pull request #6072 from shati-patel/shati-patel/vs-code-setting
...
[Already shipped] Docs: Update setting in CodeQL for VS Code
2021-06-21 08:34:14 +01:00
Taus
3aea270e10
Python: Autoformat
2021-06-18 18:30:27 +00:00
yo-h
26a04d6659
Merge pull request #6108 from tamasvajk/fix/coverage-commenter
...
Fix diff in the framework coverage PR comment
2021-06-18 14:02:15 -04:00
Taus
aeac03663f
Python: Remove old ClickHouseDriver.qll
...
The merge must've gone wrong some way, as this file is not supposed to
exist in `experimental` anymore.
2021-06-18 17:41:09 +00:00
Taus
348b20ca9d
Merge branch 'main' of https://github.com/github/codeql into python-a-few-minor-cleanups
2021-06-18 17:38:43 +00:00
Taus
9351688da8
Python: asCfgNode cleanup
2021-06-18 17:22:42 +00:00
Taus
c386f4a009
Python: Clean up py/insecure-protocol
...
Going all the way to the AST layer seemed excessive to me, so I rewrote
it to do most of the logic at the data-flow layer. In principle this
_could_ result in more names being computed (due to splitting), but in
practice I don't expect this make a big difference.
2021-06-18 17:22:42 +00:00
Taus
f24a9a46d9
Python: add getAnAttributeWrite
2021-06-18 17:22:42 +00:00
Taus
c78ba476cf
Python: Clean up a few verbose casts
2021-06-18 17:22:42 +00:00
Tamas Vajk
b3f44f457a
Fix diff in the framework coverage PR comment
2021-06-18 16:33:50 +02:00
haby0
1750efad2a
fix
2021-06-18 21:46:48 +08:00
haby0
dca737190b
Modify JShellInjection.expected
2021-06-18 21:36:45 +08:00
haby0
2b77f7d1bc
Modify isAdditionalTaintStep
2021-06-18 21:36:44 +08:00
haby0
a71757f0f4
Update java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-06-18 21:36:44 +08:00
haby0
bfe0d40987
using isAdditionalTaintStep
2021-06-18 21:36:44 +08:00
haby0
3a2a99e289
Fix 1
2021-06-18 21:36:44 +08:00
haby0
ed0aabef46
add isAdditionalTaintStep
2021-06-18 21:36:44 +08:00
haby0
921b8e80a2
Jshell Injection
2021-06-18 21:36:44 +08:00
Mathias Vorreiter Pedersen
17df8e44d0
C++: Convert 'cpp/tainted-arithmetic' to a 'path-problem' query.
2021-06-18 14:56:17 +02:00
AlonaHlobina
ac35438b5f
Update versions-compilers.rst
2021-06-18 15:35:37 +03:00
CodeQL CI
081fd28090
Merge pull request #6102 from RasmusWL/js-qhelp-fixup
...
Approved by erik-krogh
2021-06-18 04:52:48 -07:00
Chris Smowton
6302187a5d
Merge pull request #5957 from haby0/java/BeanShellInjection
...
Java: BeanShell Injection
2021-06-18 12:38:51 +01:00
Jonas Jensen
f829fff2ad
Merge pull request #6100 from github/AlonaHlobina-patch-2
...
Update C/C++ Clang and GCC versions.rst
2021-06-18 13:10:29 +02:00
AlonaHlobina
288a314108
Update versions-compilers.rst
2021-06-18 13:35:11 +03:00
Rasmus Wriedt Larsen
968a0921d4
JS: Fix secure example inclusion in InsecureDownload.qhelp
2021-06-18 12:12:06 +02:00
Anders Schack-Mulligen
7eb6da3888
Merge pull request #5772 from smowton/smowton/feature/apache-tuple-flow
...
Add models for Apache Commons Lang's tuple types
2021-06-18 11:25:07 +02:00
AlonaHlobina
bd820458f5
Update docs/codeql/support/reusables/versions-compilers.rst
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-06-18 12:24:34 +03:00
haby0
a73cb3f04a
Fix error
2021-06-18 17:22:26 +08:00
CodeQL CI
1ffd9c9ba7
Merge pull request #6086 from asgerf/js/knex
...
Approved by esbena
2021-06-18 01:58:21 -07:00
Calum Grant
32f6a465b0
Merge pull request #6080 from github/calumgrant/security-severities
...
Update security-severity scores
2021-06-18 09:40:40 +01:00
Tom Hvitved
eb86bceb4d
Address review comments
2021-06-18 10:18:47 +02:00
AlonaHlobina
9c5ba8d4f6
Adding C++20 Beta support.rst
2021-06-18 10:56:11 +03:00
haby0
0d18e4ff9c
BeanShell Injection
2021-06-18 15:54:13 +08:00
AlonaHlobina
9feda2ddd6
Update C/C++ Clang and GCC versions.rst
2021-06-18 10:46:22 +03:00
Tamás Vajk
0545bcfbd2
Merge pull request #6028 from github/tamasvajk/feature/csv-coverage-report-comment
...
Add CSV coverage PR commenter
2021-06-18 09:32:45 +02:00
Tom Hvitved
66e4940ac3
C#: Remove bad magic
2021-06-17 20:47:20 +02:00
Tom Hvitved
d5163ca244
C#: Cache NamedElement::hasQualifiedName/2
2021-06-17 20:47:07 +02:00
Geoffrey White
b4cbe6dce8
C++: Increase query precision to high.
2021-06-17 14:33:17 +01:00
Geoffrey White
b5c71fd1d7
C++: Repair funcion call in a function call.
2021-06-17 14:33:16 +01:00
Geoffrey White
e5147c2a1f
C++: Exclude functions that don't involve buffers.
2021-06-17 14:33:16 +01:00
Tom Hvitved
eca11f1b40
C#: Adjust getQualifiedName for type parameters
2021-06-17 14:47:19 +02:00
Chris Smowton
64001cc02c
Merge pull request #5587 from smowton/smowton/admin/promote-ssrf-query
...
Promote SSRF query from experimental
2021-06-17 13:02:33 +01:00
Chris Smowton
d28c95d16c
Field foo of -> Field[foo] of
2021-06-17 12:49:25 +01:00
Chris Smowton
74b2a2c7a6
Improve style of interpretField
2021-06-17 12:45:44 +01:00
Geoffrey White
a481e5c292
C++: Exclude template code.
2021-06-17 12:36:14 +01:00
Geoffrey White
8efdf359dc
C++: Fix some incorrect uses of 'const' in the tests.
2021-06-17 12:36:13 +01:00
Geoffrey White
3641cdcc1f
C++: Add a test case involving an array.
2021-06-17 12:36:09 +01:00
Chris Smowton
5cf0243dd0
Add change note
2021-06-17 12:34:40 +01:00
Chris Smowton
2cc1f46871
Model constructors for (Imm|M)utable(Pair|Triple)
2021-06-17 12:34:40 +01:00
Chris Smowton
fbaa382158
Add tests for Pair.of and Triple.of
2021-06-17 12:34:40 +01:00
Chris Smowton
eebaab8fe9
Order left and right consistently
2021-06-17 12:34:40 +01:00
Chris Smowton
365aab9bd9
Improve matching of Field specifiers; add Field recognition in tests
2021-06-17 12:34:36 +01:00
Geoffrey White
23db21cd90
C++: Test spacing.
2021-06-17 12:33:31 +01:00
Chris Smowton
472a2a64dd
Add models for Apache Commons tuples
2021-06-17 12:25:21 +01:00
Chris Smowton
73fa680224
Add support for CSV-specified flow to or from fields.
2021-06-17 12:24:28 +01:00
Geoffrey White
d590952aaa
C++: Add a test case involving nested function calls.
2021-06-17 12:23:18 +01:00
Geoffrey White
7632c9edb5
C++: Add test cases involving strings and comparisons.
2021-06-17 12:23:17 +01:00
Geoffrey White
2e236dd2a9
C++: Add a test case involving a harmless assert.
2021-06-17 12:23:17 +01:00
Geoffrey White
dca397dfb1
C++: Add a test case with a template class.
2021-06-17 12:23:16 +01:00
Tamas Vajk
07b83d5dc1
Remove commented code
2021-06-17 13:04:39 +02:00
Tamás Vajk
c532db58fd
Apply suggestions from code review
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-06-17 13:04:39 +02:00
Tamas Vajk
e61f725196
Apply code review findings
2021-06-17 13:04:39 +02:00
Tamas Vajk
4abaa7870f
Add CSV coverage PR commenter
2021-06-17 13:04:39 +02:00
Tamás Vajk
200126b302
Merge pull request #6008 from github/tamasvajk/feature/csv-coverage-report
...
Add timeseries CSV generator script
2021-06-17 13:03:41 +02:00
Chris Smowton
11b70326fd
Add Jakarta WS url-open sink
2021-06-17 11:58:41 +01:00
Chris Smowton
da1e760269
Adjust Spring models to use erased function signatures
2021-06-17 11:43:33 +01:00
Chris Smowton
1176fec287
Improve docs
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-06-17 11:43:33 +01:00
Chris Smowton
09f27554d0
Note incidental extra models in change note
2021-06-17 11:43:33 +01:00
Chris Smowton
7509e36382
Remove no-longer-needed BasicRequestLine model from InsecureBasicAuth.ql; adjust test expectations accordingly
2021-06-17 11:43:33 +01:00
Chris Smowton
c531b81ebe
Rename RequestForgery.java -> SanitizationTests.java
2021-06-17 11:43:33 +01:00
Chris Smowton
cb99e17f4d
Split and rename JavaNetHttp and ApacheHttp tests for consistency
2021-06-17 11:43:32 +01:00
Chris Smowton
6c4a909b86
Remove dead code from test
2021-06-17 11:43:32 +01:00
Chris Smowton
08ab5f5546
Remove redundant test
2021-06-17 11:43:32 +01:00
Chris Smowton
74569ce316
Tidy Jax-RS test
2021-06-17 11:43:32 +01:00
Chris Smowton
57ca36baad
Tidy Spring test
2021-06-17 11:43:32 +01:00
Chris Smowton
8b080a94e7
Convert request forgery tests to inline expectations; add missing models revealed by this process.
2021-06-17 11:43:32 +01:00
Chris Smowton
b66dcbe5b6
Factor request-forgery config so it can be used in an inline-expectations test
2021-06-17 11:43:32 +01:00
Chris Smowton
ee872f1752
Add missing tests, add additional models revealed missing in the process, and add stubs to support them all.
2021-06-17 11:43:32 +01:00
Chris Smowton
49bbfc3f4b
Convert SSRF sinks into url-open CSV sinks
...
I also drop the previous approach of taint-tracking through various builder objects in favour of assuming that a URI set in a request-builder object is highly likely to end up requested in some way or another.
This will cause the `java/non-https-url` query to pick the new sinks up too, and fixes a Spring case that had never worked but went unnoticed until now.
2021-06-17 11:43:30 +01:00
Chris Smowton
0f2139ff5d
Fix and document one-based argument indexing in StringFormat's getAnArgUsageOffset
2021-06-17 11:41:06 +01:00
Chris Smowton
55c72cebf2
Improve StringBuilder append chain tracking
...
Previously this didn't catch the case of constructors chaining directly into appends, like `StringBuilder sb = new StringBuilder("1").append("2")`
2021-06-17 11:41:06 +01:00
Chris Smowton
5b25694a52
Simplify and improve AddExpr logic
...
The improvement is in considering (userSupplied + "/") itself a sanitising prefix.
2021-06-17 11:41:06 +01:00
Chris Smowton
6b76f42d22
Broaden PrimitiveSanitizer to include boxed primitives and other java.lang.Numbers
2021-06-17 11:41:06 +01:00
Chris Smowton
3167af29bd
Tidy and remove catersian product from getUrlArgument
2021-06-17 11:41:05 +01:00
Chris Smowton
f388aae78e
Fix getAnArgUsageOffset and improve its space complexity
...
Also add tests checking the output of the new function
2021-06-17 11:41:05 +01:00
Chris Smowton
0db5484399
Copyedit documentation
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-06-17 11:41:05 +01:00
Chris Smowton
1549993565
Update test results to account for changed model structure
...
(Models now have internal nodes in order to allow field flow through them)
2021-06-17 11:41:05 +01:00
Chris Smowton
8d70e3d22e
Fix casing of change note
2021-06-17 11:41:05 +01:00
Chris Smowton
9138d2b8f5
Improve comment casing
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-06-17 11:41:05 +01:00
Chris Smowton
b25e8671b9
Java SSRF query: comment on sanitizing regex
2021-06-17 11:41:05 +01:00
Chris Smowton
a665d5d111
Improve RequestForgery.qhelp recommendation
2021-06-17 11:41:05 +01:00
Chris Smowton
0d9a6e2b61
Update java/ql/src/semmle/code/java/security/RequestForgery.qll
...
SpringRestTemplateUrlMethods -> SpringRestTemplateUrlMethod
2021-06-17 11:41:05 +01:00
Chris Smowton
fb2989c16b
Copyedit comments and function names
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-06-17 11:41:04 +01:00
Chris Smowton
960a903185
Java SSRF query: document RequestForgeryAdditionalTaintStep and use Unit not string for a supertype.
2021-06-17 11:41:04 +01:00
Chris Smowton
575198a0e4
Java SSRF query: Server Side -> Server-Side everywhere.
2021-06-17 11:41:04 +01:00
Chris Smowton
7899e17f3a
Java SSRF query: move RequestForgery qll file into semmle/code hierarchy
...
This makes it importable by people wishing to extend the query.
2021-06-17 11:41:04 +01:00
Chris Smowton
532a10bfdf
Java SSRF query: Provide hook for custom taint-propagating steps; make all default sinks/sanitizers/steps private.
2021-06-17 11:41:04 +01:00
Chris Smowton
5bdd9da27a
Java SSRF query: credit original author
2021-06-17 11:41:04 +01:00
Chris Smowton
e8613367e8
Java SSRF query: copyedit qhelp
2021-06-17 11:41:04 +01:00
Chris Smowton
3333e7d186
Java SSRF query: sanitize primitives
...
Even 'char' isn't a realistic vector for an exploit, unless somebody is copying out a string char by char.
2021-06-17 11:41:04 +01:00
Chris Smowton
93a9f471ce
Add change note
2021-06-17 11:41:04 +01:00
Chris Smowton
77904d9597
Remove failing test
...
The case where something might be exactly a constant is general across all queries, and not handled yet, particularly in the case where the result of `getParameter("uri")` might have changed between the check and the use.
2021-06-17 11:41:04 +01:00
Chris Smowton
6933d06a46
Add exactly the string '/' as a sanitizing prefix.
...
Usually this is ignored for suspicion that it could be taken for a protocol specifier, but on balance the context `(something) + "/" + tainted()` is more likely to be taken for a user-controlled location within a host the user does not control.
2021-06-17 11:41:03 +01:00
Chris Smowton
bc43b6d760
Fix typo
2021-06-17 11:41:03 +01:00
Chris Smowton
e6249eed79
Add doc comments
2021-06-17 11:41:03 +01:00
Chris Smowton
26e10f3ad5
SSRF: don't consider results of fetches we initiated to be untrustworthy
2021-06-17 11:41:03 +01:00
Chris Smowton
c63d5986cf
Sanitize StringBuilder appends that follow directly from a constructor.
...
Note that some of this logic ought to be incorporated into StringBuilderVar once that code can be reviewed.
2021-06-17 11:41:03 +01:00
Chris Smowton
b5a450b881
SSRF query: add sanitizer looking for a variety of ways of prepending a sanitizing prefix, such as one that restricts the hostname a URI will refer to.
2021-06-17 11:41:03 +01:00
Chris Smowton
487c1db6ed
Promote SSRF query to main query set
2021-06-17 11:41:01 +01:00
Anders Schack-Mulligen
6ca8d69b26
Merge pull request #5881 from haby0/java/UnsafeDeserialization
...
Java: CWE-502 Add UnsafeDeserialization sinks
2021-06-17 12:36:34 +02:00
Anders Schack-Mulligen
8fe2f4a554
Merge pull request #6034 from owen-mc/java/jax-rs
...
Improve JAX-WS and JAX-RS models
2021-06-17 12:35:34 +02:00
Anders Schack-Mulligen
b173b4141d
Merge pull request #6096 from smowton/smowton/fix/inline-expectations-missing-prefix
...
Inline expectation tests: accept // $MISSING: and // $SPURIOUS:
2021-06-17 11:41:15 +02:00
haby0
363ad5b470
Fix error
2021-06-17 17:36:35 +08:00
Owen Mansel-Chan
945db01f56
Address review comments
2021-06-17 10:29:33 +01:00
Owen Mansel-Chan
b9bc1f978c
Update style of inline expectation comments
2021-06-17 10:04:15 +01:00
Chris Smowton
558813acf7
Inline expectation tests: accept // $MISSING: and // $SPURIOUS:
...
Previously there had to be a space after the $ token, unlike ordinary expectations (i.e., // $xss was already accepted)
2021-06-17 09:44:39 +01:00
Owen Mansel-Chan
0987425f94
Reinstate failing tests with MISSING: prefix
2021-06-17 09:36:51 +01:00
Tom Hvitved
0febf5a592
Merge pull request #6094 from hvitved/dataflow/consistency-compiler-too-smart
...
Data flow: Workaround for too clever compiler in consistency queries
2021-06-17 10:23:31 +02:00
Tom Hvitved
ffb2350a54
Data flow: Fix getLocalCallContext join-order
2021-06-17 10:02:31 +02:00
Tom Hvitved
cc383e0f6a
Data flow: Workaround for too clever compiler in consistency queries
2021-06-17 09:43:36 +02:00
haby0
3dd851fffb
expected
2021-06-17 15:20:03 +08:00
Owen Mansel-Chan
5f82993b0b
Put parameters with inline expectation comments on their own lines
2021-06-17 06:41:01 +01:00
Tom Hvitved
3f6beaf9df
C#: Add tests for complex CSV flow summaries
2021-06-16 19:36:05 +02:00
Tom Hvitved
0af44a7f94
C#: Changes to Type::{getQualifier,hasQualifiedName}
2021-06-16 19:36:05 +02:00
CodeQL CI
bcafe532ac
Merge pull request #5944 from RasmusWL/async-api-graph-tests
...
Approved by tausbn
2021-06-16 08:46:26 -07:00
CodeQL CI
9b84a8e146
Merge pull request #6048 from erik-krogh/graphql
...
Approved by esbena
2021-06-16 06:35:42 -07:00
Tom Hvitved
8866e6c969
C#: Always use fully qualified names in CSV data-flow summaries
2021-06-16 14:09:45 +02:00
Tom Hvitved
def3d6bac4
C#: CSV-based flow summaries
2021-06-16 14:09:45 +02:00
Owen Mansel-Chan
5d00bb23e4
Move logic for URL redirection sinks
2021-06-16 12:48:11 +01:00
yoff
0ddeb7a8c1
Merge pull request #5950 from RasmusWL/promote-clickhouse
...
Python: Promote ClickHouse SQL models
2021-06-16 13:38:41 +02:00
Taus
e647403948
Python: Avoid __main__.py files as entry points.
...
According to the official documentation, the purpose of `__main__.py`
files is that their presence in a package (say, `foo`) means one can
execute the package directly using `python -m foo` (which will run the
aforementioned `foo/__main__.py` file).
In principle this means that adding `if __name__ == "__main__"` in these
files is superfluous, as they are only intended to be executed (and not
imported by some other file).
However, in practice people often _do_ include the above construct.
Here are some instances of this on LGTM.com:
https://lgtm.com/query/7521266095072095777/
In particular, 10 out of 33 files in `cpython` have this construct.
This causes some confusion in our module naming, as we usually see the
presence of `__name__ == "__main__"` as an indication that a file may
be run directly (and hence with "absolute import" semantics). However,
when run with `python -m`, the interpreter uses the usual package
semantics, and this leads to modules getting multiple names.
For this reason, I think it makes sense to simply exclude `__main__.py`
files from consideration. Note that if there is a `#!` line mentioning
the Python interpreter, then they will still be included as entry
points.
2021-06-16 10:59:56 +00:00
Tamás Vajk
eaa69dfa5d
Merge pull request #6084 from tamasvajk/feature/effective-publicness
...
C#: Fix isEffectively* visibility predicates
2021-06-16 12:52:38 +02:00
Anders Schack-Mulligen
75d5fe67ea
Merge pull request #6090 from atorralba/atorralba/move-httpsurls-tests
...
Java: Move/tweak some tests
2021-06-16 12:00:55 +02:00
Tamas Vajk
28ef0e86f6
Apply code review findings
2021-06-16 10:51:52 +02:00
Tamas Vajk
c5b8acf216
Add change notes
2021-06-16 10:51:52 +02:00
Tamas Vajk
db8a777aa9
Fix isEffectively* predicates to members extracted from multiple assemblies
2021-06-16 10:51:52 +02:00
Tamas Vajk
77f8f3fa8a
Adjust comments on isEffectively*
2021-06-16 10:51:52 +02:00
Tamas Vajk
eea96a5585
Fix effective publicness of protected private and protected internal
2021-06-16 10:51:52 +02:00
Tamas Vajk
f715445c7a
Fix effective privateness of explicitly implemented members
2021-06-16 10:51:08 +02:00
Tamas Vajk
a24006239b
C#: Add more tests to effective visibility
2021-06-16 10:50:15 +02:00
Taus
96d8fc78f8
Merge pull request #6078 from hvitved/type-tracker-caching
...
Python: Move cached predicates in type tracker library to same stage
2021-06-16 10:45:02 +02:00
Tamás Vajk
9f44bc575f
Merge pull request #6089 from tamasvajk/feature/interface-member-modifier
...
C#: Allow abstract modifier on interface members
2021-06-16 10:44:43 +02:00
haby0
c1ada6d85b
Merge branch 'main' into java/UnsafeDeserialization
2021-06-16 16:37:03 +08:00
Tamás Vajk
386d88ab93
Merge pull request #6085 from tamasvajk/feature/unsafe
...
C#: Fix `Modifiable::isUnsafe` to handle declarations extracted from assemblies
2021-06-16 10:30:09 +02:00
Tony Torralba
e2918d55b5
Move tests back from internal repo
2021-06-16 10:09:44 +02:00
Tamas Vajk
66835651fe
C#: Allow abstract modifier on interface members
2021-06-16 09:56:36 +02:00
Tamas Vajk
dacb044790
C#: Add tests for abstract/virtual modifier of interface members
2021-06-16 09:54:34 +02:00
Asger Feldthaus
5838e54a46
JS: Sharpen recognition of string 'match' calls
2021-06-16 09:27:02 +02:00
haby0
9badd7aa27
change name
2021-06-16 11:29:37 +08:00
Taus
359bc5eff9
Python: Autoformat
2021-06-15 15:56:40 +00:00
Tamas Vajk
74c4765ab9
Add change note
2021-06-15 17:30:48 +02:00
Tamas Vajk
44b30b70da
C#: Fix Modifiable::isUnsafe to handle declarations extracted from assemblies
2021-06-15 17:30:48 +02:00
Asger Feldthaus
af9cc07066
JS: Change note
2021-06-15 17:19:39 +02:00
Asger Feldthaus
9f052a2ecd
JS: Add Knex model
2021-06-15 17:19:39 +02:00
CodeQL CI
847faf536d
Merge pull request #6070 from asgerf/js/script-with-tsx-lang
...
Approved by erik-krogh
2021-06-15 08:17:53 -07:00
Taus
b55c034502
Python: Fix up getAMethodCall
...
Now that we have a `MethodCallNode` class, it would be silly not to use
that as the return type.
2021-06-15 15:13:54 +00:00
Taus
92063dc191
Python: Add change note
2021-06-15 15:13:03 +00:00
Taus
41ee325bc9
Python: Clean up Stdlib.qll
...
Not as many opportunities to clean stuff up here.
2021-06-15 15:04:30 +00:00
Taus
e90ec807ef
Python: Clean up Ssl.qll
2021-06-15 15:04:29 +00:00
Taus
82fab3ba75
Python: Clean up Cryptography.qll
2021-06-15 15:04:29 +00:00
Taus
d4b05547ba
Python: Add MethodCallNode class
...
Roughly patterned after the JS equivalent.
2021-06-15 15:04:29 +00:00
Taus
87ee7849a9
Merge pull request #6077 from RasmusWL/fix-pypi-names
...
Python: Fixup for names of supported PyPI packages
2021-06-15 15:01:35 +02:00
yoff
b19d64f173
Merge pull request #6013 from RasmusWL/sensitive-improvements
...
Python: Improve sensitive data modeling
2021-06-15 14:45:40 +02:00
Calum Grant
771e686946
Update security-severity scores
2021-06-15 13:25:17 +01:00
Tom Hvitved
c03ee32f02
Python: Move cached predicates in type tracker library to same stage
2021-06-15 13:42:43 +02:00
Rasmus Wriedt Larsen
b1fb68bc54
Python: Rename .qll file for mysql-connector-python support
...
Just like our support for the `PyYAML` PyPI package that you import with
`import yaml` is in `Yaml.qll`.
Since this file does not provide any public predicates/modules, it
should be safe to rename it.
2021-06-15 13:06:53 +02:00
Rasmus Wriedt Larsen
b154f034cb
Python: Fix names of supported PyPI packages
2021-06-15 12:55:52 +02:00
Tamas Vajk
255e422172
Apply code review findings
2021-06-15 11:35:10 +02:00
Rasmus Wriedt Larsen
00af18a622
Python: Autoformat
2021-06-15 11:31:38 +02:00
Rasmus Wriedt Larsen
156b10cb59
Merge branch 'main' into promote-clickhouse
2021-06-15 11:30:19 +02:00
Anders Schack-Mulligen
19305a217a
Merge pull request #5374 from joefarebrother/guava-base
...
Java: Model additional flow steps for the package `com.google.common.base` of the Guava framwork.
2021-06-15 10:58:48 +02:00
Tom Hvitved
501ba4bd8a
Merge pull request #6012 from hvitved/csharp/early-labels
...
C#: Populate labels earlier
2021-06-15 10:28:23 +02:00
Erik Krogh Kristensen
60920c1ecc
require that the URL refers to graphql in some way
2021-06-15 09:53:32 +02:00
Erik Krogh Kristensen
416c986cbc
add support for graphql in @actions/github
2021-06-15 09:43:11 +02:00
Asger Feldthaus
53bef94b75
JS: Extractor version bump
2021-06-15 09:34:54 +02:00
Cornelius Riemenschneider
0ebf53b9df
Merge pull request #6073 from geoffw0/loc
...
C++: Add lines of user code query
2021-06-15 09:18:46 +02:00
Shati Patel
cce8eac0a7
Merge pull request #5946 from shati-patel/vscode-custom-logs
...
Docs: Describe custom log directory setting in VS Code extension
2021-06-14 20:30:54 +01:00
Aditya Sharad
75ed7c0568
Merge pull request #6014 from github/docs-4179-legacy-tools
...
Remove docs about legacy tools
2021-06-14 11:50:18 -07:00
Taus
c6c9a5110a
Merge pull request #6063 from tausbn/python-promote-type-tracking-library
...
Python: Promote shared type tracking library
2021-06-14 18:56:03 +02:00
Geoffrey White
d7db18213d
C++: Add a generated file to the test.
2021-06-14 16:21:30 +01:00
Geoffrey White
1e1ae27974
C++: Test the new query.
2021-06-14 16:06:20 +01:00
Geoffrey White
e71264d1d2
C++: Lines of user code query.
2021-06-14 16:03:16 +01:00
Tom Hvitved
6b63e032a9
C#: Populate labels earlier
2021-06-14 15:17:33 +02:00
Rasmus Wriedt Larsen
d19bc1252b
Python: limit size of extraStepForCalls predicate
...
On django/django, this reduced the number of results in
`extraStepForCalls` from 201,283 to 541
2021-06-14 15:06:42 +02:00
shati-patel
17f9aecab8
Docs: Update setting in CodeQL for VS Code
2021-06-14 13:38:06 +01:00
Rasmus Wriedt Larsen
4eed94a262
Python: Fix CWE tag for py/use-of-input
...
So it better matches what is in `py/code-injection`. I had my doubts
about CWE-95, but after reading
https://owasp.org/www-community/attacks/Direct_Dynamic_Code_Evaluation_Eval%20Injection
I think it's fine to add CWE-95 as well 👍
Definitions are:
CWE-78: Improper Neutralization of Special Elements used in an OS
Command ('OS Command Injection')
CWE-94: Improper Control of Generation of Code ('Code Injection')
CWE-95: Improper Neutralization of Directives in Dynamically Evaluated
Code ('Eval Injection')
2021-06-14 14:08:34 +02:00
Asger Feldthaus
c58942092f
JS: Add change note
2021-06-14 13:43:11 +02:00
Asger Feldthaus
bc375196d1
JS: Extract script tags with lang=tsx
2021-06-14 13:40:53 +02:00
Joe Farebrother
36cb207600
Increase precision of tests to test value flow
2021-06-14 11:20:07 +01:00
Owen Mansel-Chan
5e89fce734
Avoid strange bug by commenting out two tests
2021-06-14 10:57:28 +01:00
CodeQL CI
02c017afec
Merge pull request #6058 from RasmusWL/more-aiohttp
...
Approved by yoff
2021-06-14 02:56:59 -07:00
Owen Mansel-Chan
8cf47f12b4
Model constructors of classes implementing MultivaluedMap
2021-06-14 10:56:35 +01:00
Felicity Chapman
60b4669813
Remove sentence about legacy tools
2021-06-14 08:41:28 +01:00
Taus
6333752014
Python: Add getAMethodCall to LocalSourceNode
...
This seems like something we have been missing for a while now, so I
figured it might be useful to add. It is roughly based on the JavaScript
equivalent, with one major difference: in the JavaScript libraries,
`getAMethodCall` is reserved for syntactic method calls (`obj.m(...)`)
whereas `getAMemberInvocation` is used for both this and the case where
the bound method `obj.m` is stored in a temporary variable and then
subsequently invoked in the same local scope.
It seems to me that the more general predicate is more useful, and hence
should have the simpler name. (And also we don't really work with a
notion of "invocation" in the Python libraries, so we would need a
better name for it anyway.)
I think as long as the documentation makes the behaviour clear, it
should be okay.
2021-06-11 21:26:58 +00:00
Taus
8016715fb6
Python: Add missing QLDoc
2021-06-11 20:35:58 +00:00
Taus
3869ab76d1
Python: Promote shared type tracking library
...
This was slightly messier than anticipated, as I hadn't accounted for
the dozen uses of `startInAttr` in our codebase. To circumvent this,
I decided to put the type tracking implementation in the `internal`
directory, and wrap it with a file that ensures the old interface still
works.
2021-06-11 20:20:22 +00:00
Jonas Jensen
e23b88b7f1
Merge pull request #6052 from jsinglet/jsinglet/stdtypes
...
Implementation of standard C/C++ fixed width, minimum width, and maximum width types
2021-06-11 17:03:01 +02:00
Calum Grant
85467adc5e
Merge pull request #5839 from github/security-severities5
...
Add security-severity scores
2021-06-11 15:56:20 +01:00
John L. Singleton
8c6c011be2
Formatting fixes, comment moving.
2021-06-11 10:17:05 -04:00
Joe Farebrother
678597f3f9
Update CSV rows for collection flow
2021-06-11 15:08:27 +01:00
John L. Singleton
9c946a79c7
Update cpp/change-notes/2021-06-10-std-types.md
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-06-11 09:49:44 -04:00
Rasmus Wriedt Larsen
53f7633662
Python: Model await request.post() as MultiDictProxy
...
as highlight as being quite easy to do by @yoff 👍
2021-06-11 14:53:30 +02:00
Chris Smowton
76838809bb
Merge pull request #5818 from artem-smotrakov/rmi-deserialization
...
Java: Unsafe RMI deserialization
2021-06-11 13:43:07 +01:00
yoff
97486b448a
Merge pull request #5999 from RasmusWL/aiohttp-modeling
...
Python: Add aiohttp.web modeling
2021-06-11 14:26:52 +02:00
Rasmus Wriedt Larsen
dee93783a2
Python: Update .expected for py/weak-sensitive-data-hashing
...
Now there is a path from the _imports_ of the functions that would
return sensitive data, so we produce more alerts.
I'm not entirely happy about this "double reporting", but I'm not sure
how to get around it without either:
1. disabling the extra taint-step for calls. Not ideal since we would
loose good sources.
2. disabling the extra sources based on function name. Not ideal since
we would loose good sources.
3. disabling the extra sources based on function name, for those calls
that would be handled with the extra taint-step for calls. Not ideal
since that would require running the data-flow query initially to
prune these out :|
So for now, I think the best approach is to accept some risk on this,
and ship to learn :)
2021-06-11 13:56:55 +02:00
Anders Schack-Mulligen
f24565738b
Merge pull request #6029 from atorralba/atorralba/tainted-key-read-steps
...
Java: Add Map key-read-steps as local additional taint steps
2021-06-11 13:14:18 +02:00
Joe Farebrother
dc19d1db35
Add change note
2021-06-11 11:41:30 +01:00
Joe Farebrother
04ffe80366
Add unit tests
2021-06-11 11:41:27 +01:00
Joe Farebrother
153e0c4ac3
Add modelling for more com.google.common.base methods
2021-06-11 11:40:37 +01:00
Rasmus Wriedt Larsen
df67028a1d
Python: Model aiohttp.StreamReader
2021-06-11 12:06:53 +02:00
Tony Torralba
c828c7031f
Add change note
2021-06-11 12:04:11 +02:00
Rasmus Wriedt Larsen
2d31ef7016
Python: Fix last TODOs in aiohttp tests
2021-06-11 12:00:02 +02:00
Rasmus Wriedt Larsen
64a0e3fd0a
Merge branch 'main' into aiohttp-modeling
2021-06-11 11:42:24 +02:00
Rasmus Wriedt Larsen
8b8e1334cc
Python: Fix syntax error
2021-06-11 11:42:14 +02:00
Rasmus Wriedt Larsen
46f7a2b572
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-06-11 11:28:11 +02:00
Rasmus Wriedt Larsen
6f29b01abc
Python: Model rsa
2021-06-11 11:23:06 +02:00
Rasmus Wriedt Larsen
40714c05b7
Python: Add tests for rsa PyPI package
2021-06-11 11:17:13 +02:00
Rasmus Wriedt Larsen
3d5f379b8c
Merge branch 'main' into sensitive-improvements
2021-06-11 10:48:20 +02:00
John L. Singleton
cd61fb4753
this should be abstract
2021-06-10 19:54:58 -04:00
John L. Singleton
219dc71ae6
changlog entry
2021-06-10 17:15:06 -04:00
John L. Singleton
2a01324172
more maintainable pattern for class abstractions
2021-06-10 17:09:32 -04:00
Calum Grant
a594afb828
Add security-severity metadata
2021-06-10 20:11:08 +01:00
Erik Krogh Kristensen
50d574d20d
add graphql injection to the sql-injection query
2021-06-10 21:01:54 +02:00
John L. Singleton
bd7c416356
comment change
2021-06-10 11:21:11 -04:00
John L. Singleton
0d3f53b013
Changes to structure per feedback of @jbj
2021-06-10 11:16:58 -04:00
Taus
e7b9603c5b
Merge pull request #6053 from RasmusWL/fix-tests
...
Python: Fix tests
2021-06-10 16:55:45 +02:00
Rasmus Wriedt Larsen
dd457f9641
Python: Fix tests
2021-06-10 15:58:56 +02:00
John L. Singleton
f174d7a0e0
Comment changes
2021-06-10 09:52:22 -04:00
John L. Singleton
14c419a75f
autoformatting
2021-06-10 09:39:43 -04:00
CodeQL CI
a241c114da
Merge pull request #5836 from RasmusWL/ec-class-improvement
...
Approved by tausbn
2021-06-10 06:20:56 -07:00
Rasmus Wriedt Larsen
04db33513e
Merge branch 'main' into sensitive-improvements
2021-06-10 15:11:09 +02:00
Rasmus Wriedt Larsen
ea0c1d7db3
Python: Better handling of sensitive functions
...
This solution was the best I could come up with, but it _is_ a bit
brittle since you need to remember to add this additional taint step
to any configuration that relies on sensitive data sources... I don't
see an easy way around this though :|
2021-06-10 15:08:21 +02:00
Tamas Vajk
916780a452
Fix codeql CLI path
2021-06-10 15:07:54 +02:00
Rasmus Wriedt Larsen
f167143a84
Python: Use real config in TestSensitiveDataSources
...
This will enable better tests in just one second
2021-06-10 15:01:31 +02:00
Rasmus Wriedt Larsen
c341643ec1
Python: Add more tests for sensitive function handling
2021-06-10 14:36:05 +02:00
Owen Mansel-Chan
e0130a932e
Update experimental query using NewCookie
2021-06-10 13:33:20 +01:00
Owen Mansel-Chan
c173b89529
Model NewCookie
2021-06-10 13:32:39 +01:00
Owen Mansel-Chan
ee6019a2d8
Fix tests for experimental httponly query
2021-06-10 13:31:28 +01:00
Rasmus Wriedt Larsen
eb4f168dd4
Python: Clarify SensitiveAttributeAccess
...
The comment about imports was placed wrong. I also realized we didn't
even have a single test-case for
`this.(DataFlow::AttrRead).getAttributeNameExpr() = sensitiveLookupStringConst(classification)`
so I added that (notice that this is only `getattr(foo, x)` and not
`getattr(foo, "password")`)
2021-06-10 14:09:47 +02:00
Owen Mansel-Chan
d5d27d5ccf
Duplicate tests for Jakarta
2021-06-10 10:43:40 +01:00
Owen Mansel-Chan
0ad35421f2
Comment out stubs (Jakarta)
2021-06-10 10:43:40 +01:00
Owen Mansel-Chan
318d1ea484
Stubs in javax-ws-rs-api-3.0.0
...
Generated using java-autostub
2021-06-10 10:43:39 +01:00
Owen Mansel-Chan
e6a6a8898b
Move Jax XSS sinks to JaxWS.qll and add tests
2021-06-10 10:43:39 +01:00
Owen Mansel-Chan
d1fe62d4d5
(Minor) Update comments to match ExternalFlow docs
2021-06-10 10:43:38 +01:00
Owen Mansel-Chan
1ae9d68409
Move and convert URL redirect sinks
...
Adds for them as well
2021-06-10 10:43:37 +01:00
Owen Mansel-Chan
f2ff2aa3e1
Add flow tests for JAX-RS
2021-06-10 10:43:37 +01:00
Owen Mansel-Chan
155d63d5f7
Add tests for JAX-RS
2021-06-10 10:43:36 +01:00
Owen Mansel-Chan
f63fd68bfb
Fix models to work with collection flow
...
And also removal of `Argument` with indices
2021-06-10 10:43:36 +01:00
Owen Mansel-Chan
e929de98ec
Delete duplicated taint summary rows
2021-06-10 10:43:35 +01:00
Owen Mansel-Chan
2b8bb5c231
Fix JAX-RS models
2021-06-10 10:43:35 +01:00
Owen Mansel-Chan
baa21c5bcf
Manually comment out parts of stubs
...
This is to avoid having to make more stubs, which we don't really need
2021-06-10 10:43:34 +01:00
Owen Mansel-Chan
caf96b01e1
Stubs in javax-ws-rs-api-2.1.1
...
Generated using java-autostub
2021-06-10 10:43:34 +01:00
Owen Mansel-Chan
7b3acd8b45
(Minor) Add missing this.
2021-06-10 10:43:33 +01:00
Owen Mansel-Chan
07f7fd0342
Add missing QLDocs in JaxWS.qll
...
And correct one QLDoc
2021-06-10 10:43:15 +01:00
Tamas Vajk
b067309909
Change artifact names
2021-06-10 11:26:07 +02:00
yoff
716627c1dd
Merge pull request #5878 from RasmusWL/fix-concept-tests-pretty-print
...
Python: Fix concept tests pretty print
2021-06-10 11:21:08 +02:00
Tamas Vajk
73aaeb4c0d
Change workflow names
2021-06-10 11:01:45 +02:00
Tamas Vajk
55dd6ed3d1
Allow space separated package patterns in framework-aggregated reports
2021-06-10 10:54:12 +02:00
Tamas Vajk
74c00383d2
Update java framework coverage reports
2021-06-10 10:26:34 +02:00
Tamas Vajk
3605b9f720
Update java framework data
2021-06-10 10:11:24 +02:00
Tamas Vajk
ba9c2e0702
Rework CSV report generator and change timeseries report to use framework.csv
2021-06-10 10:11:24 +02:00
Tamas Vajk
c6cb7c6eed
Rename time-series file to timeseries
2021-06-10 10:11:24 +02:00
Tamas Vajk
d0ec1e2f37
Generate file with package info
2021-06-10 10:11:24 +02:00
Tamas Vajk
3353c3ecdd
Add workflow to generate timeseries CSV coverage report
2021-06-10 10:11:24 +02:00
Tamas Vajk
4de4277a8d
Add timeseries CSV generator script
2021-06-10 10:11:23 +02:00
Tamas Vajk
270cf62f08
Fix variable reference
2021-06-10 10:11:23 +02:00
Tamas Vajk
49190615a7
Cleanup CSV coverage report generator
2021-06-10 10:11:23 +02:00
John L. Singleton
01cac13a48
format ql test files.
2021-06-09 17:16:26 -04:00
John L. Singleton
b91a0dbe16
removed accidental modification.
2021-06-09 17:12:59 -04:00
John L. Singleton
1fe3c9d093
removed accidental modification.
2021-06-09 17:11:39 -04:00
John L. Singleton
28e2cdb54e
adding standard C/C++ fixed width, minimum width, and maximum width types
2021-06-09 16:12:58 -04:00
Taus
b14fa8b4cd
Merge pull request #5925 from RasmusWL/pep249-import
...
Python: Use absolute import for PEP249
2021-06-09 18:32:28 +02:00
Dave Bartolomeo
4f81484e91
Merge pull request #6050 from MathiasVP/fix-join-order-in-addressOperandAllocationAndOffset
...
C++: Fix join order in `addressOperandAllocationAndOffset`
2021-06-09 12:20:50 -04:00
Shati Patel
bc4184e859
Merge pull request #6051 from github/shati-patel/rank
...
Clarify docs about rank aggregate
2021-06-09 16:03:34 +01:00
shati-patel
b5420a6f39
Update wording
2021-06-09 15:54:57 +01:00
shati-patel
0c9b53a9b2
Fix table formatting
2021-06-09 15:27:01 +01:00
shati-patel
405b2c84d6
Clarify how to think about rank aggregate
...
- Mention that `rank[1](...)` is the same as `min(...)`
- Make this (+ note about 1-based indexing) more visible
2021-06-09 15:25:28 +01:00
Mathias Vorreiter Pedersen
879bfbbd4e
C++: Match the join order from before #5522 .
2021-06-09 15:02:31 +02:00
Taus
e3a6daaecb
Merge pull request #6046 from RasmusWL/typetracking-attributes
...
Python: Add type-tracking test for attrs set in functions/methods
2021-06-09 14:45:48 +02:00
Rasmus Wriedt Larsen
aaddd36236
Python: Add another type-tracking attr test
...
This one just works out of the box 💪
2021-06-09 14:20:50 +02:00
Rasmus Wriedt Larsen
89cba216ca
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-06-09 14:15:59 +02:00
CodeQL CI
d65e6bbfa1
Merge pull request #6035 from erik-krogh/joi
...
Approved by asgerf
2021-06-09 04:42:54 -07:00
Rasmus Wriedt Larsen
dec6723183
Python: Minor refactor
...
A bit too much copy paste 😄
2021-06-09 12:19:11 +02:00
Rasmus Wriedt Larsen
fa6abea465
Python: Add modeling of jmespath
2021-06-09 12:14:35 +02:00
Rasmus Wriedt Larsen
5cdd60d0d6
Python: Add jmespath tests
2021-06-09 12:12:50 +02:00
Erik Krogh Kristensen
3e171adaab
update qldoc
...
Co-authored-by: Asger F <asgerf@github.com >
2021-06-09 10:45:55 +02:00
CodeQL CI
6bdd7df810
Merge pull request #6002 from erik-krogh/history
...
Approved by asgerf
2021-06-08 13:17:38 -07:00
CodeQL CI
a02f96d660
Merge pull request #6043 from erik-krogh/serialize-javascript-typo
...
Approved by asgerf
2021-06-08 12:18:52 -07:00
CodeQL CI
169e67cbb8
Merge pull request #5990 from erik-krogh/prettier
...
Approved by asgerf
2021-06-08 12:17:24 -07:00
Rasmus Wriedt Larsen
3d2de03674
Python: Add type-tracking test for attr set in function
2021-06-08 19:03:53 +02:00
Rasmus Wriedt Larsen
dcd448b743
Python: Refactor formatting
2021-06-08 19:03:53 +02:00
Rasmus Wriedt Larsen
09de1bcf44
Python: Add tests for type-tracking attrs on instances
2021-06-08 19:03:53 +02:00
Mathias Vorreiter Pedersen
8fb15666ee
Merge pull request #6041 from geoffw0/uncontrolled-allocation-size
...
C++: Add CWE-789 tag to cpp/uncontrolled-allocation-size.
2021-06-08 17:44:02 +02:00
Rasmus Wriedt Larsen
7c758f5c81
Python: Add change-note for twisted
2021-06-08 16:20:29 +02:00
Rasmus Wriedt Larsen
afd35f2e21
Python: Fix wording of change-note
...
`aiohttp.web` is a web _framework_, and not a web _server_.
2021-06-08 16:19:25 +02:00
Rasmus Wriedt Larsen
23f668f8ee
Python: Model redirects in twisted
2021-06-08 16:16:56 +02:00
Owen Mansel-Chan
2cb76fe407
Test JAX-WS endpoints
2021-06-08 15:12:04 +01:00
Owen Mansel-Chan
d9cf1aaf39
Add stubs for JAX-WS
2021-06-08 15:12:04 +01:00
Chris Smowton
55d584b044
Add doc comment for JaxWS file
2021-06-08 15:12:03 +01:00
Chris Smowton
f71897d166
Rename JAX-WS -> JAX-RS where necessary. Improve change note and fix missing QLDoc.
2021-06-08 15:12:03 +01:00
Chris Smowton
ca684bea0e
Jax-WS: support jakarta.ws.rs package everywhere
...
Releases since Java EE 9 use this.
2021-06-08 15:12:02 +01:00
Chris Smowton
adb5764aac
Add URL redirect sinks relating to JAX-WS
2021-06-08 15:12:02 +01:00
Chris Smowton
260a228367
Add change note
2021-06-08 15:12:02 +01:00
Chris Smowton
314980c64c
Model taint-propagating methods in the core JAX-WS library.
2021-06-08 15:11:57 +01:00
Rasmus Wriedt Larsen
a21039170b
Python: Model (most of) twisted
2021-06-08 16:11:18 +02:00
Chris Smowton
9335e095a9
MIME type -> content type
...
This matches the terminology used elsewhere
2021-06-08 15:05:28 +01:00
Chris Smowton
5f7165efbb
Add JaxWS XSS sink
...
Based on d44e4d0e63 by @lcartey
2021-06-08 15:05:27 +01:00
lcartey@github.com
cc497bf213
Java: Improve JaxRS modelling
...
- Handle inherited annotations
- Fix `ResponseBuilder` charpred.
- Model `@Produces` annotations.
2021-06-08 15:05:14 +01:00
Rasmus Wriedt Larsen
151a733ff2
Python: Add tests for twisted
...
These were largely based on the old tests in
6011cb74f8/python/ql/test/library-tests/web/twisted/test.py
2021-06-08 15:27:51 +02:00
CodeQL CI
fec39857fa
Merge pull request #6015 from erik-krogh/resolve
...
Approved by asgerf
2021-06-08 04:15:19 -07:00
CodeQL CI
6279c67949
Merge pull request #5901 from erik-krogh/regFP
...
Approved by asgerf
2021-06-08 04:14:06 -07:00
Erik Krogh Kristensen
4b98af0c2b
fix typo in prettier qldoc
...
Co-authored-by: Asger F <asgerf@github.com >
2021-06-08 13:13:33 +02:00
Erik Krogh Kristensen
ba6d504746
fix typo in SerializeJavascriptSanitizer qldoc
2021-06-08 13:12:23 +02:00
Geoffrey White
32545a1346
C++: Add CWE-789 tag to cpp/uncontrolled-allocation-size.
2021-06-08 10:59:03 +01:00
Erik Krogh Kristensen
8b4c3c4462
refactor ValidationCall back to a CallNode
2021-06-08 11:18:49 +02:00
Mathias Vorreiter Pedersen
025043afca
Merge pull request #6010 from geoffw0/charloc
...
C++: Test and fix maxCols / charLoc
2021-06-08 11:15:04 +02:00
CodeQL CI
561c8d0e1a
Merge pull request #6033 from erik-krogh/serverlessLib
...
Approved by asgerf
2021-06-08 01:44:40 -07:00
CodeQL CI
95b591d72b
Merge pull request #6025 from erik-krogh/serve
...
Approved by asgerf
2021-06-08 01:42:38 -07:00
Erik Krogh Kristensen
b1d7c61d8e
add missing qldoc
2021-06-08 09:56:32 +02:00
Erik Krogh Kristensen
1ad08677c2
model serve-handler in js/exposure-of-private-files
2021-06-08 09:52:56 +02:00
CodeQL CI
260ae47940
Merge pull request #6031 from asgerf/js/lines-of-user-code
...
Approved by erik-krogh
2021-06-08 00:37:51 -07:00
AlexDenisov
378a357251
Merge pull request #6032 from AlexDenisov/alexdenisov/fix-outdated-comment
...
C++: Remove outdated comment
2021-06-08 08:56:38 +02:00
Erik Krogh Kristensen
be7abede22
add model for the joi library
2021-06-07 20:04:17 +02:00
Felicity Chapman
44b9de04e5
Merge pull request #6011 from github/docs-4433-diagnostic-info
...
Make minimal changes to CodeQL docs for new diagnostic data
2021-06-07 17:20:15 +01:00
Felicity Chapman
aad738ba9f
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2021-06-07 17:05:40 +01:00
Erik Krogh Kristensen
7f09edcf59
add change note
2021-06-07 17:25:18 +02:00
Erik Krogh Kristensen
bcf08e6472
add remote flow source for the serverless library
2021-06-07 17:19:19 +02:00
Alex Denisov
a12954a403
C++: Remove outdated comment
2021-06-07 17:15:21 +02:00
AlexDenisov
d254524f3f
Merge pull request #6027 from AlexDenisov/alexdenisov/fix-string-literal-expectation
...
C++: Fix string literal expectation
2021-06-07 17:13:12 +02:00
Erik Krogh Kristensen
09a2c055a7
add test for the serverless express API
2021-06-07 16:50:01 +02:00
Asger Feldthaus
4cf3c11e83
JS: Add lines of user code summary query
2021-06-07 16:41:59 +02:00
Felicity Chapman
71019419e2
Update following writer review
2021-06-07 15:13:43 +01:00
Tamás Vajk
3f33f2de13
Merge pull request #5980 from tamasvajk/fix/extension-method-as-target
...
C#: Extract correct method symbol as target of extension method calls
2021-06-07 15:57:24 +02:00
Erik Krogh Kristensen
a63b0b28d4
refactor the history library model, add support for the global variable
2021-06-07 15:42:13 +02:00
Erik Krogh Kristensen
5419143e72
remove createHashHistory from the history sink
2021-06-07 15:24:59 +02:00
CodeQL CI
4963a8f6b9
Merge pull request #6024 from erik-krogh/serialize-javascript
...
Approved by asgerf
2021-06-07 06:08:05 -07:00
Rasmus Wriedt Larsen
3819a361b5
Python: Autoformat
2021-06-07 14:16:33 +02:00
Felicity Chapman
d292be3880
Update the revised section
2021-06-07 12:00:20 +01:00
Felicity Chapman
e09774be03
Address technical review feedback
2021-06-07 11:49:28 +01:00
Geoffrey White
6f05fd4839
C++: Autoformat.
2021-06-07 11:01:00 +01:00
Tony Torralba
52f1930e1d
Add key-read-steps as local additional taint steps
2021-06-07 11:37:05 +02:00
Mathias Vorreiter Pedersen
3923acb5e0
Merge pull request #6017 from github/dbartol/pack/extra-queries-xml
...
C++: Replace an odd `queries.xml` with `qlpack.yml`
2021-06-07 10:58:19 +02:00
Rasmus Wriedt Larsen
e82ad6fc22
Python: Add missing QLDoc
2021-06-07 10:13:26 +02:00
Rasmus Wriedt Larsen
9dcb26d151
Python: Autoformat
...
I had not set up the pre-commit hook properly
2021-06-07 10:05:48 +02:00
Anders Schack-Mulligen
96da85449d
Merge pull request #5823 from atorralba/promote-jexl-injection
...
Java: Promote JEXL Injection query from experimental
2021-06-07 10:03:12 +02:00
Alex Denisov
17be6e1271
C++: Fix string literal expectation
2021-06-07 09:47:26 +02:00
Tamás Vajk
1a1b74cfcc
Merge pull request #5998 from tamasvajk/fix/tuple-members
...
C#: Fix container type extraction of tuple members
2021-06-07 09:18:05 +02:00
Erik Krogh Kristensen
5961dd1459
add another test for the resolve library
2021-06-06 22:54:12 +02:00
Erik Krogh Kristensen
0adc001df0
add taint-step for serialize-javascript
2021-06-06 22:48:53 +02:00
Erik Krogh Kristensen
dd2fe2a489
add the resolve library as a sink to js/path-injection
2021-06-06 22:04:32 +02:00
Dave Bartolomeo
ac3ded7d5a
Replace an odd queries.xml with qlpack.yml
...
This one C++ test has its own `queries.xml` to make "outside-of-source" path filtering work, as detailed in commit 2550788598 . I've replaced the `queries.xml` with `qlpack.yml`, added a comment, and added that pack to the `.codeqlmanifest.json` at the root of the repo. This will allow the library dependencies of this pack to be resolved without the need for a `--search-path` option with the upcoming packaging changes.
2021-06-06 09:04:18 -04:00
Dave Bartolomeo
e276e2684e
Merge pull request #5986 from MathiasVP/side-effects-for-nonconst-smart-pointers
...
C++: Fix `hasDefaultSideEffect` for non-const smart pointers
2021-06-04 13:57:44 -04:00
Mathias Vorreiter Pedersen
8e8c2e677a
C++: Accept test changes.
2021-06-04 18:49:20 +02:00
Mathias Vorreiter Pedersen
27586d77f8
C++: Copy isDeeplyConst{Below} into SideEffects and modify it so that it works for smart pointers.
2021-06-04 18:46:52 +02:00
Mathias Vorreiter Pedersen
f2d7988d72
C++: Add tests involving various non-const and const smart pointers.
2021-06-04 18:46:05 +02:00
Geoffrey White
799e19bdc2
C++: Update the other version as well.
2021-06-04 16:21:04 +01:00
CodeQL CI
eb0491598a
Merge pull request #6009 from erik-krogh/whatwg-fetch
...
Approved by esbena
2021-06-04 08:19:36 -07:00
Geoffrey White
3c6a1f165b
Update cpp/ql/src/semmle/code/cpp/Location.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-06-04 16:19:11 +01:00
Felicity Chapman
919555cae4
Remove info for legacy tools
2021-06-04 15:13:24 +01:00
Chris Smowton
4ddf4558a7
Merged simplified query
2021-06-04 16:07:15 +02:00
Mathias Vorreiter Pedersen
f21e949898
Merge pull request #6007 from geoffw0/weak_crypto2
...
C++: Combine results for cpp/weak-cryptographic-algorithm
2021-06-04 16:06:29 +02:00
Tom Hvitved
3c7c10a424
Merge pull request #5991 from hvitved/java/shared-external-source-sink
...
Java: Move common CSV logic for sources and sinks into shared library
2021-06-04 16:04:25 +02:00
Rasmus Wriedt Larsen
7f119dd5a9
Python: Add change-note
2021-06-04 15:27:36 +02:00
Geoffrey White
b24dc810c9
C++: Combine results from cpp/weak-cryptographic-algorithm that are in the same file.
2021-06-04 14:04:02 +01:00
Tamas Vajk
b3a2998d96
Fix failing test after rebase
2021-06-04 14:34:45 +02:00
Tamas Vajk
75060baaa3
Add change note
2021-06-04 14:33:12 +02:00
Tamas Vajk
33daa2c41d
Fix container type extraction of tuple members
2021-06-04 14:33:12 +02:00
Tamas Vajk
4f4bf59cd4
C#: Add tuple member tests
2021-06-04 14:33:12 +02:00
Tom Hvitved
42202402a4
Address review comments
2021-06-04 14:32:37 +02:00
Felicity Chapman
2a9904d1fd
Make minimal changes to CodeQL docs
2021-06-04 13:27:23 +01:00
Geoffrey White
a93246d28b
C++: Fix maxCols.
2021-06-04 13:05:13 +01:00
Geoffrey White
ea96826810
C++: Add a test of charLoc and subsumes.
2021-06-04 13:05:07 +01:00
Tamas Vajk
f98781db63
Fix non-constructed generic extension method extraction
2021-06-04 13:34:19 +02:00
Tamas Vajk
127d66ccd1
Remove unneeded ReducedExtension method handling
2021-06-04 13:34:19 +02:00
Tamas Vajk
e05e2365ea
C#: Extract correct method symbol as target of extension method calls
2021-06-04 13:34:19 +02:00
Tamas Vajk
fc0fc740ac
C#: Add test for extension method calls
2021-06-04 13:32:03 +02:00
Erik Krogh Kristensen
46f90006c2
add model for whatwg-fetch
2021-06-04 13:13:13 +02:00
Anders Schack-Mulligen
f73960da8f
Merge pull request #5788 from Marcono1234/marcono1234/stmt-toString
...
Java: Override toString() for statements
2021-06-04 12:41:03 +02:00
Anders Schack-Mulligen
60377a8f86
Merge pull request #5383 from smowton/smowton/feature/strbuilder-fluent-methods
...
Java: Add models for StrBuilder's fluent methods
2021-06-04 12:33:24 +02:00
Anders Schack-Mulligen
30cb80b341
Merge pull request #5181 from smowton/smowton/feature/commons-tostringbuilder
...
Java: Add models for Commons ToStringBuilder
2021-06-04 12:30:36 +02:00
Rasmus Wriedt Larsen
350f79e1e1
Python: Model sensitive data based on variable names
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
f5fd0f8d1c
Python: Model sensitive data based on parameter names
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
925e67d734
Python: Model sensitive data from subscripts
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
d6532e280a
Python: minor cleanup in SensitiveDataSources
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
00a71a1c41
Python: Port sensitive data modeling
...
No longer using points-to 🎉
2021-06-04 11:28:07 +02:00
Tamás Vajk
8d7f8a5bab
Merge pull request #5997 from tamasvajk/fix/colliding-method-ids
...
C#: Base IDs for constructed methods on their unconstructed counterparts
2021-06-04 10:29:53 +02:00
Tamás Vajk
63c6ddd426
Merge pull request #6000 from tamasvajk/feature/extract-non-public-symbols
...
C#: Change compilation settings to include all non-public symbols
2021-06-04 10:28:55 +02:00
yo-h
8d879facf7
Merge pull request #5988 from github/AlonaHlobina-patch-1
...
Update versions-compilers.rst
2021-06-03 13:56:28 -04:00
yo-h
c0aadcf8ba
Update docs/codeql/support/reusables/versions-compilers.rst
2021-06-03 13:49:57 -04:00
Marcono1234
6003b6edd2
Java: Adjust change note for statement toString() changes
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-06-03 17:17:00 +02:00
Marcono1234
485b0be805
Java: Fix expected test output
2021-06-03 17:15:00 +02:00
Marcono1234
2889f94128
Java: Add change note for statement toString() changes
2021-06-03 16:27:37 +02:00
Marcono1234
e0a45507f8
Java: Adjust toString() for statements
2021-06-03 16:27:36 +02:00
Marcono1234
7e778bc008
Java: Override toString() for statements
...
Additionally remove redundant QLDoc which is inherited anyways.
2021-06-03 16:27:35 +02:00
Anders Schack-Mulligen
bd9e3d0fa9
Merge pull request #5751 from aschackmull/java/collection-flow
...
Java: Convert all collection and array steps from taint flow to value flow.
2021-06-03 15:29:14 +02:00
Tom Hvitved
cc02c95092
C#: Sync files
2021-06-03 13:54:51 +02:00
Tom Hvitved
d0b6808299
Java: Move common CSV logic for sources and sinks into shared library
2021-06-03 13:54:51 +02:00
Rasmus Wriedt Larsen
3b68c87b6c
Python: Add sensitive data test-cases
2021-06-03 13:38:29 +02:00
Tamas Vajk
1ce7c631ff
Fix failing tests
2021-06-03 13:01:42 +02:00
Erik Krogh Kristensen
d30f53a21a
add change note
2021-06-03 12:35:39 +02:00
Erik Krogh Kristensen
608a0314df
add location reads from the history libary as client-side remote flow
2021-06-03 12:33:25 +02:00
Erik Krogh Kristensen
e543c6c665
add a js/client-side-unvalidated-url-redirection sink for the history library
2021-06-03 12:23:05 +02:00
Rasmus Wriedt Larsen
79bef11cf7
Python: Use "new" SensitiveDataHeuristics
2021-06-03 12:10:29 +02:00
Tamas Vajk
793e3db085
C#: Change compilation settings to include all non-public symbols
2021-06-03 11:54:05 +02:00
Rasmus Wriedt Larsen
e9acea8643
Python: Improve multidict modeling
2021-06-03 11:50:49 +02:00
Rasmus Wriedt Larsen
2e851cd5f0
Python: Improve yarl.URL modeling
2021-06-03 11:38:15 +02:00
Rasmus Wriedt Larsen
9372e3b284
Python: Add aiohttp.web change-note
2021-06-03 11:23:28 +02:00
Tamas Vajk
5a3a011b8e
Fix test results
2021-06-03 11:17:01 +02:00
Tom Hvitved
3d60c146ad
C#: Base IDs for constructed methods on their unconstructed counterparts
2021-06-03 11:11:32 +02:00
Tamas Vajk
d044b15533
C#: Add colliding method ID tests
2021-06-03 11:11:32 +02:00
Tony Torralba
56a429a5f9
Merge branch 'main' into promote-jexl-injection
2021-06-03 11:10:56 +02:00
Tony Torralba
607dcd4a27
Don't use CSV models for private flow configs
2021-06-03 11:05:13 +02:00
Rasmus Wriedt Larsen
3c47e583d8
Python: Add test for missing data-flow step in aiohttp.web
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
2dbbf52903
Python: Model HTTP responses in aiohttp.web
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
735df4597f
Python: Aiohttp add response tests
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
5d4140d3e2
Python: Handle more complicated route-setup in aiohttp
...
Since we want to be able to easy select request-handlers that are not
set up as part of a view-class, we need to easily be able to identify
those. To handle cases like the one below, we _can't_ just define these
to be all the async functions that are not methods on a class :(
```py
# see https://docs.aiohttp.org/en/stable/web_quickstart.html#organizing-handlers-in-classes
class MyCustomHandlerClass:
async def foo_handler(self, request): # $ MISSING: requestHandler
return web.Response(text="MyCustomHandlerClass.foo")
my_custom_handler = MyCustomHandlerClass()
app.router.add_get("/MyCustomHandlerClass/foo", my_custom_handler.foo_handler) # $ routeSetup="/MyCustomHandlerClass/foo"
```
So it seemed easiest to narrow down the route-setups, but that means we
want both refinement and extensibility... so `::Range` pattern to the
rescue 🎉
The important piece of code that still works after this commit, but
which hasn't been changed, is the one below:
```codeql
/**
* A parameter that will receive a `aiohttp.web.Request` instance when a request
* handler is invoked.
*/
class AiohttpRequestHandlerRequestParam extends Request::InstanceSource, RemoteFlowSource::Range,
DataFlow::ParameterNode {
AiohttpRequestHandlerRequestParam() {
exists(Function requestHandler |
requestHandler = any(AiohttpCoroutineRouteSetup setup).getARequestHandler() and
```
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
919a0b6b84
Python: aiohttp route setup is more complicated than expected
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
c69b857662
Python: Add self.request as RemoteFlowSource for aiohttp View
...
Just like we do for Django in
7393443f8c/python/ql/src/semmle/python/frameworks/Django.qll (L1786-L1804)
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
c4b618dcf5
Python: Model view-classes in aiohttp.web
...
No taint modeling of them yet though
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
8c039d5688
Python: Add more aiohttp view routing tests
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
1aa222d7cc
Python: Add taint-test for class-based view
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
fb21bc04fa
Python: Add taint-steps for yarl.URL
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
72e6a1489c
Python: Add taint-steps for MultiDictProxy
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
e76f02b016
Python: Minor refactor to use LocalSourceNode
...
This just more correctly reflects the reality, since the type-tracking
predicate just below only holds for LocalSourceNode anyway.
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
dd131e6bf7
Python: Add taint-step for methods on aiohttp.web.Request
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
63c7fa0c2c
Python: aiohttp match_info should be tainted
...
Whoops
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
597a9dfc80
Python: Don't consider has_body tainted
...
Although it technically is, I think it belong in the section of things
that are unlikely to be exploitable
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
d953ea47d4
Python: Basic handling of tainted attributes in aiohttp
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
88158e7414
Python: Add basic model setup for aiohttp.web.Request
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
2b992a635a
Python: Add aiohttp taint tests
2021-06-03 10:55:34 +02:00
Rasmus Wriedt Larsen
3cbb909a3a
Python: Add modeling of coroutine routes in aiohttp.web
2021-06-03 10:55:33 +02:00
Rasmus Wriedt Larsen
fa1d4e6de7
Python: Extract poor mans function resolution (from django)
...
Since I also want to use this for aiohttp.web modeling
2021-06-03 10:55:33 +02:00
Rasmus Wriedt Larsen
85d9483c7b
Python: Add basic aiohttp tests
2021-06-03 10:55:33 +02:00
Tony Torralba
00836c4bac
Fix QLDocs
2021-06-03 10:52:52 +02:00
Tony Torralba
2833f8daa4
Change predicate isUnsafeEngine -> isSafeEngine to improve performance
2021-06-03 10:42:41 +02:00
CodeQL CI
ffad65be40
Merge pull request #5993 from erik-krogh/lib-debug
...
Approved by esbena
2021-06-03 01:38:57 -07:00
CodeQL CI
60fb1a3b59
Merge pull request #5995 from erik-krogh/webpack-merge
...
Approved by esbena
2021-06-03 01:38:08 -07:00
CodeQL CI
7663095b57
Merge pull request #5948 from erik-krogh/fixRandom
...
Approved by esbena
2021-06-03 01:37:23 -07:00
CodeQL CI
40b6c85341
Merge pull request #5972 from erik-krogh/ts43
...
Approved by esbena
2021-06-03 01:35:58 -07:00
CodeQL CI
87268d57b8
Merge pull request #5994 from erik-krogh/abstractMongooseFunction
...
Approved by esbena
2021-06-03 01:34:44 -07:00
AlonaHlobina
99708c33fd
Update versions-compilers.rst
2021-06-03 09:50:18 +02:00
Anders Schack-Mulligen
e86c534c48
Revert "Java: Update coverage."
...
This reverts commit 1c081eeaed .
2021-06-03 09:02:49 +02:00
Anders Schack-Mulligen
c86d433e2d
Merge pull request #5996 from tamasvajk/feature/csv-coverage-2
...
Temporarily disable CSV coverage PR file comparison step
2021-06-03 08:51:44 +02:00
Anders Schack-Mulligen
acca26f1d6
Merge pull request #5992 from hvitved/java/is-unreachable-perf
...
Java: Improve performance of `isUnreachableInCall()`
2021-06-03 08:49:51 +02:00
Tamas Vajk
374adc8819
Temporarily disable CSV coverage PR file comparison step
2021-06-03 08:17:28 +02:00
Erik Krogh Kristensen
3bda1f2e26
update expected test output
2021-06-03 00:43:54 +02:00
Erik Krogh Kristensen
143bf9de14
add change note
2021-06-02 23:48:29 +02:00
Erik Krogh Kristensen
48ab630559
model webpack-merge as an extend call
2021-06-02 23:43:53 +02:00
Erik Krogh Kristensen
185811ee22
make MongooseFunction abstract
2021-06-02 23:23:30 +02:00
Erik Krogh Kristensen
431c995131
add support for the debug library
2021-06-02 23:11:15 +02:00
Erik Krogh Kristensen
69d6c74e7e
fix typescript version
2021-06-02 21:56:47 +02:00
Erik Krogh Kristensen
1e19da155c
move TaintedPath sink into TaintedPathCustomizations to avoid side-effects
2021-06-02 21:25:48 +02:00
AlonaHlobina
98ee763d57
Update docs/codeql/support/reusables/versions-compilers.rst
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2021-06-02 20:56:06 +02:00
Tom Hvitved
daf2cc3d53
Java: Improve performance of isUnreachableInCall()
2021-06-02 20:39:05 +02:00
Erik Krogh Kristensen
27ff256b0e
add change note
2021-06-02 15:34:01 +02:00
Erik Krogh Kristensen
788c5ba701
add support for the prettier API
2021-06-02 15:33:08 +02:00
Anders Schack-Mulligen
8e6dd51f50
Merge pull request #5868 from Marcono1234/marcono1234/ignore-not-closing-char-array-closeable
...
Java: Ignore char array based closeables for CloseReader.ql and CloseWriter.ql
2021-06-02 15:00:59 +02:00
AlonaHlobina
f9ede137f9
Update versions-compilers.rst
2021-06-02 14:19:18 +02:00
Chris Smowton
7382b349c2
Merge pull request #5987 from aschackmull/java/query-metadata
...
Java: Add missing metadata.
2021-06-02 12:40:34 +01:00
Anders Schack-Mulligen
8a20395857
Merge pull request #5940 from pwntester/main
...
Remove XSS sink for Java
2021-06-02 12:30:20 +02:00
Anders Schack-Mulligen
c0e562de21
Merge pull request #5979 from hvitved/java/shared-external-summaries
...
Java: Move some CSV flow summary code into shared library
2021-06-02 12:28:45 +02:00
Alvaro Muñoz
a3a215afea
HTTP -> Http
2021-06-02 11:12:39 +02:00
Anders Schack-Mulligen
5e96e28792
Java: Add missing metadata.
2021-06-02 10:24:46 +02:00
Tamás Vajk
348fab82fd
Merge pull request #5970 from tamasvajk/feature/csv-coverage-impr
...
Improve error reporting in CI check for CSV coverage report comparison
2021-06-02 09:03:35 +02:00
Alvaro Muñoz
9aba92397d
lift XssSink check to InformationLeakSink
2021-06-01 17:16:41 +02:00
Jonas Jensen
7282ad90d0
Merge pull request #5854 from dbartol/dbartol/smart-pointers/side-effects
...
C++: Generate side effect instructions for smart pointer indirections
2021-06-01 16:57:05 +02:00
Dave Bartolomeo
da14647e5a
Merge pull request #5522 from github/rdmarsh2/cpp/ssa-reuse
...
C++: reuse unaliased SSA results when computing aliased SSA
2021-06-01 10:17:54 -04:00
Anders Schack-Mulligen
650c4f19d2
Java: More qldoc.
2021-06-01 16:09:17 +02:00
Alvaro Muñoz
970b4e7d6a
update java library coverage documentation
2021-06-01 14:54:31 +02:00
Anders Schack-Mulligen
922b421a45
Java: Add change note.
2021-06-01 14:33:52 +02:00
Anders Schack-Mulligen
1c081eeaed
Java: Update coverage.
2021-06-01 14:00:05 +02:00
Alvaro Muñoz
0fb692400c
fix failing test
2021-06-01 13:57:13 +02:00
Tom Hvitved
ecf7f24cde
C#: Sync latest FlowSummaryImpl.qll changes
2021-06-01 13:22:14 +02:00
Tom Hvitved
14f9a5c280
Java: Move some CSV flow summary code into shared library
2021-06-01 13:22:14 +02:00
Henning Makholm
534e771309
Merge pull request #5934 from github/hmakholm/pr/monotonic-agg
...
QL language reference: add monotonic aggregate example
2021-06-01 13:10:50 +02:00
Tamás Vajk
e7a349be2d
Merge pull request #5978 from tamasvajk/fix/change-note-workflow
...
Fix change note workflow to handle paginated results
2021-06-01 12:50:32 +02:00
Anders Schack-Mulligen
fc913e744e
Java: Minor model fix.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
dbe352f3ff
Java: Remove deprecated tests.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
901996f9fd
Java: Add collection flow test.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
43d1b0ab27
Java: Update qltests.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
a40880af70
Java: Add read-as-taint and config-dependent store-as-taint.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
2f087e17cb
Java: Allow <> in types for now.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
3f538e7fac
Java: Update some models.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
9e313d0cf6
Java: Remove container taint steps.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
3b6cef4f74
Java: Add container flow models.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
ffd52bb673
Java: Fix bug in matching generic signatures.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
1001dd84e6
Java: Switch array steps and one containerstep.
2021-06-01 11:47:52 +02:00
Anders Schack-Mulligen
ce509eb7e1
Merge pull request #5927 from aschackmull/dataflow/flowthrough-dispatch-perf
...
Dataflow: Improve performance in flow-through pruning
2021-06-01 11:46:22 +02:00
Anders Schack-Mulligen
a4661e1aca
Merge pull request #5704 from edvraa/regexj
...
Java: Regex injection
2021-06-01 11:45:59 +02:00
Artem Smotrakov
8dc1451d42
Better recommendation in UnsafeDeserializationRmi.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-06-01 12:16:09 +03:00
Erik Krogh Kristensen
0b225419a3
Merge pull request #5977 from security-prince/patch-1
...
Adding reference link for csurf
2021-06-01 11:07:36 +02:00
Tom Hvitved
5771b0420f
Merge pull request #5936 from hvitved/csharp/cfg/perf-tweaks
...
C#: Various CFG related performance tweaks
2021-06-01 11:06:01 +02:00
Anders Schack-Mulligen
5d21c64247
Dataflow: qldoc fix.
2021-06-01 10:49:47 +02:00
Tamas Vajk
bc02f28ddd
Fix change note workflow to handle paginated results
2021-06-01 10:44:44 +02:00
Jonas Jensen
2261085cfe
Merge pull request #5973 from MathiasVP/more-uncontrolled-arith-improvements
...
C++: More `cpp/uncontrolled-arithmetic` improvements
2021-06-01 10:44:29 +02:00
Anders Schack-Mulligen
4f9a6c151b
Dataflow: Code review fixes.
2021-06-01 10:29:17 +02:00
Mathias Vorreiter Pedersen
8765c33847
C++: Also check the number of parameters to keep the tests happy.
2021-06-01 10:17:57 +02:00
Ishaq Mohammed
96150a455d
Update javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.qhelp
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2021-06-01 13:47:43 +05:30
Ishaq Mohammed
975355de4a
Adding reference link for csurf
2021-06-01 13:41:25 +05:30
Mathias Vorreiter Pedersen
615c805b2c
C++: Only use std::rand as a source of randomness.
2021-06-01 09:28:06 +02:00
Henning Makholm
70b9739d2d
QL language reference: add monotonic aggregate example
...
It's easier to understand what's going on if we start with a
(contrived) example that _doesn't_ involve recursion.
2021-05-31 21:23:08 +02:00
Mathias Vorreiter Pedersen
41c93d92d7
C++: Remove FPs from right shifts and explicitly bounded random functions.
2021-05-31 15:40:02 +02:00
Mathias Vorreiter Pedersen
10755ece88
C++: Add testcase with bounded randomness source.
2021-05-31 15:33:39 +02:00
Anders Schack-Mulligen
683f853fa5
Dataflow: Fix another bad join order.
2021-05-31 15:14:13 +02:00
Erik Krogh Kristensen
85bd8f1020
add change-note for TypeScript 4.3
2021-05-31 13:08:52 +02:00
Erik Krogh Kristensen
e6b1c61e81
add tests for TypeScript 4.3
2021-05-31 13:08:43 +02:00
Erik Krogh Kristensen
2cc2d116bc
bump extractor version
2021-05-31 13:08:24 +02:00
Erik Krogh Kristensen
35d7fda5e2
update typescript to 4.3 in the extractor
2021-05-31 13:08:09 +02:00
Mathias Vorreiter Pedersen
6d7b95c15d
Merge pull request #5966 from erik-krogh/overrideConsistency
...
CPP/C#: make some parameter names consistent with the names used in the super class
2021-05-31 11:57:10 +02:00
Jonas Jensen
4e502d10d6
Merge pull request #5951 from MathiasVP/optimize-switcCase-getAStmt
...
C++: Remove large antijoin in `SwitchCase.getAStmt`
2021-05-31 11:50:32 +02:00
Taus
bae3728e3c
Merge pull request #5945 from RasmusWL/minor-qldoc-cleanup
...
Python: Minor QLDoc cleanup
2021-05-31 11:40:44 +02:00
Taus
d9911a016e
Merge pull request #5933 from RasmusWL/expand-use-of-input-test
...
Python: Expand test of py/use-of-input
2021-05-31 11:39:33 +02:00
Mathias Vorreiter Pedersen
b4e4c12d0f
C++: Use a rank aggregate for a much better implementation.
2021-05-31 11:17:09 +02:00
Jonas Jensen
f97b8ad1d4
Merge pull request #5961 from MathiasVP/fix-FPs-in-incorrect-allocation-error-handling
...
C++: Exclude custom `operator new` from `cpp/incorrect-allocation-error-handling`
2021-05-31 10:54:59 +02:00
Mathias Vorreiter Pedersen
66d284ee59
Merge pull request #5766 from ihsinme/ihsinme-patch-267
...
CPP: Add query for CWE-415 Double Free
2021-05-31 10:51:32 +02:00
ihsinme
d808a5b131
Update cpp/ql/test/experimental/query-tests/Security/CWE/CWE-415/semmle/tests/test.c
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-31 11:16:38 +03:00
Mathias Vorreiter Pedersen
175fdbb105
C++: Replace exists(not ...) with not exists(...).
2021-05-31 09:54:24 +02:00
Tamas Vajk
18931e39c8
Improve error reporting in CI check for CSV coverage report comparison
2021-05-31 09:52:14 +02:00
haby0
d6782767b7
Fix typos
2021-05-31 11:12:22 +08:00
Alvaro Muñoz
41d034d5a0
Attempt to use information-leak sink category
2021-05-30 00:22:40 +02:00
Artem Smotrakov
b28d639166
Fixed errors in UnsafeDeserializationRmi.qhelp
2021-05-29 09:32:08 +02:00
Artem Smotrakov
62c6bee5f8
Simplified UnsafeDeserializationRmi.ql
2021-05-29 09:21:20 +02:00
Alvaro Muñoz
ece84d13e5
Merge branch 'github:main' into main
2021-05-28 22:40:10 +02:00
Henry Mercer
263699d8bc
Merge pull request #5914 from github/henrymercer/code-scanning-diagnostic-queries
...
Code Scanning selectors: Include diagnostic queries
2021-05-28 18:53:11 +01:00
Mathias Vorreiter Pedersen
64975e5c1e
Merge pull request #5842 from japroc/cpp-pqxx-sqli-sink
...
C++: SqlPqxxTainted query searches for sql injections via pqxx connector to postgres
2021-05-28 17:01:27 +02:00
Erik Krogh Kristensen
b947334eea
CPP: make some parameter names consistent with the names used in the super class
2021-05-28 16:48:47 +02:00
Alvaro Muñoz
f60df3b26a
Update java/change-notes/2021-05-28-remove-senderror-xss-sink.md
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-05-28 15:13:19 +02:00
Alvaro Muñoz
5a894ac7f7
update java library coverage documentation
2021-05-28 15:13:19 +02:00
Alvaro Muñoz
db2f05ac24
Updated Java change notes
2021-05-28 15:13:18 +02:00
Alvaro Muñoz
735e4e4b7b
update failing tests
2021-05-28 15:13:18 +02:00
Alvaro Muñoz
706874491b
Remove XSS sink for Java
2021-05-28 15:13:18 +02:00
Rasmus Wriedt Larsen
6e9d74403a
Merge pull request #5963 from adityasharad/python/lines-of-user-code
...
Python: Treat `py/summary/lines-of-user-code` as the primary summary metric
2021-05-28 11:08:35 +02:00
Jonas Jensen
eda25bb402
Merge pull request #5962 from erik-krogh/getAPrimaryQlClass
...
CPP/Java: Fix getAPrimaryQlClass implementations
2021-05-28 09:31:16 +02:00
Aditya Sharad
b41a06a15c
Python: Treat py/summary/lines-of-user-code as the primary summary metric
...
Move the `lines-of-code` tag from `py/summary/lines-of-code`.
Code Scanning will eventually look for this tag.
The intent is to treat the number of lines of user code for Python as the summary of
how much code was analysed, ignoring both external libraries and generated code.
This matches the current baseline metric the CodeQL Action computes for Python.
We'll revisit this decision, and the baseline, if necessary.
2021-05-27 13:20:24 -07:00
Erik Krogh Kristensen
79989cc3f4
CPP/Java: Fix getAPrimaryQlClass implementations
2021-05-27 21:36:27 +02:00
Rasmus Wriedt Larsen
ab73b10869
Merge pull request #5959 from github/igfoo/ReturnValueIgnored_python
...
python: Correct the ReturnValueIgnored.qhelp docs
2021-05-27 11:51:42 +02:00
Mathias Vorreiter Pedersen
4107e350cb
C++: Add qldoc to NoThrowType.
2021-05-27 11:39:03 +02:00
Mathias Vorreiter Pedersen
71a860a356
C++: Exclude custom operator new allocators from the ThrowingAllocator class.
2021-05-27 11:23:11 +02:00
Evgenii Protsenko
efa657d47c
C++: SqlPqxxTainted.ql Add namespace check
2021-05-27 00:13:54 +03:00
Mathias Vorreiter Pedersen
e01d7127e2
Merge pull request #5958 from github/igfoo/ReturnValueIgnored
...
C++: Update the ReturnValueIgnored.qhelp docs to match the code
2021-05-26 19:04:41 +02:00
Ian Lynagh
f0bec74ce3
python: Correct the ReturnValueIgnored.qhelp docs
2021-05-26 17:40:57 +01:00
Ian Lynagh
f9ede97fcd
C++: Update the ReturnValueIgnored.qhelp docs to match the code
2021-05-26 17:38:49 +01:00
Rasmus Wriedt Larsen
795a1c7006
Merge pull request #5443 from jorgectf/jorgectf/python/ldapInjection
...
Python: Add LDAP Injection query
2021-05-26 11:52:31 +02:00
Rasmus Wriedt Larsen
f807c2f52b
Python: autoformat
2021-05-26 11:07:48 +02:00
Rasmus Wriedt Larsen
d5f2846394
Merge branch 'main' into jorgectf/python/ldapInjection
2021-05-26 11:01:48 +02:00
ihsinme
9088475339
Update DoubleFree.qhelp
2021-05-26 09:44:03 +03:00
ihsinme
2909dde179
Update test.c
2021-05-26 09:31:15 +03:00
ihsinme
fbf95df537
Update DoubleFree.c
2021-05-26 09:27:20 +03:00
ihsinme
7c2100efd9
Apply suggestions from code review
...
thanks for your corrections.
and of course sorry for my text.
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-26 09:15:46 +03:00
Evgenii Protsenko
55045626df
C++: SqlPqxxTainted.ql style fixes
2021-05-25 22:38:27 +03:00
Mathias Vorreiter Pedersen
b2bdf95a9d
C++: Remove large antijoin in SwitchCase.getAStmt().
2021-05-25 17:25:42 +02:00
Timo Mueller
75f6ec1f0d
Updated test cases to include test for java10+ CREDENTIALS_FILTER_PATTERN constant
2021-05-25 17:08:58 +02:00
Timo Mueller
72901e3724
Merge branch 'insecureJmxRmiServerEnvironment' of github.com:mogwailabs/codeql into insecureJmxRmiServerEnvironment
2021-05-25 16:41:17 +02:00
Timo Mueller
59ebe08c78
Added stup for RMIConnectorServer for valid test case
2021-05-25 16:40:41 +02:00
Rasmus Wriedt Larsen
1b3f857a2f
Python: Promote ClickHouse SQL models
2021-05-25 16:27:23 +02:00
Rasmus Wriedt Larsen
eb1da152a0
Python: Rewrite ClickHouse SQL lib modeling
...
This did turn into a few changes, that maybe could have been split into
separate PRs 🤷
* Rename `ClickHouseDriver` => `ClickhouseDriver`, to better follow
import name in `.qll` name
* Rewrote modeling to use API graphs
* Split modeling of `aioch` into separate `.qll` file, which does re-use
the `getExecuteMethodName` predicate. I feel that sharing code between
the modeling like this was the best approach, and stuck the
`INTERNAL: Do not use.` labels on both modules.
* I also added handling of keyword arguments (see change in .py files)
2021-05-25 16:13:31 +02:00
Rasmus Wriedt Larsen
c9a9535dbc
Python: Use ConceptsTests for ClickHouse SQL libs
...
This did reveal a few places where we do not detect the incoming SQL
2021-05-25 16:10:06 +02:00
Geoffrey White
2fd461e984
Merge pull request #5938 from MathiasVP/promote-access-of-memory-location-after-end-of-buffer-using-strncat
...
C++: Promote `cpp/access-memory-location-after-end-buffer-strncat` out of experimental
2021-05-25 14:36:53 +01:00
Tamás Vajk
1997f500c2
Merge pull request #5832 from tamasvajk/feature/csv-coverage-report
...
Java: github action for CSV coverage report
2021-05-25 14:51:19 +02:00
Anders Schack-Mulligen
d05f524759
Merge pull request #5941 from aschackmull/java/virt-disp-perf
...
Java: Improve performance of virtual dispatch calculation.
2021-05-25 14:44:51 +02:00
Rasmus Wriedt Larsen
ee3477c20a
Python: Remove dummy clickhouse SQL injection query
2021-05-25 14:27:29 +02:00
Rasmus Wriedt Larsen
35793a10bb
Merge pull request #5889 from japroc/python-clickhouse-driver
...
Python: Implement module ClickHouseDriver.qll
2021-05-25 14:25:28 +02:00
Mathias Vorreiter Pedersen
78cc8f01d6
C++: Shorter description.
2021-05-25 14:11:03 +02:00
Tamas Vajk
70b3066bb8
Add regenerated CSV reports
2021-05-25 13:38:22 +02:00
Tamas Vajk
8880d0055e
Fix file formatting
2021-05-25 13:33:26 +02:00
Tamas Vajk
b17ffbd2a4
Include all .ql and .qll files in PR path triggers
2021-05-25 13:33:26 +02:00
Tamas Vajk
d4f1cbe8d8
Add updated coverage report
2021-05-25 13:33:26 +02:00
Tamas Vajk
511486d045
Rework file diff (show line differences)
2021-05-25 13:33:26 +02:00
Tamas Vajk
ce53586002
Refactor file comparison
2021-05-25 13:33:26 +02:00
Tamas Vajk
3db22ba482
Add Java coverage report files
2021-05-25 13:33:26 +02:00
Tamas Vajk
f09352620f
Add comparison step to workflow
2021-05-25 13:33:26 +02:00
Tamas Vajk
f1911e338d
Move and generate files to documentation folder + clean up after the script is executed
2021-05-25 13:33:26 +02:00
Tamas Vajk
6dc46ec1ee
Add org.apache.commons.io to frameworks, and handle overlapping package prefixes
2021-05-25 13:33:25 +02:00
Tamas Vajk
663e6a8d73
Use non-breaking hyphen in CWE identifier
2021-05-25 13:33:25 +02:00
Tamas Vajk
dda401f62a
Inline CSV table into RST page
2021-05-25 13:33:25 +02:00
Tamas Vajk
2e67a3216c
Add option to manually trigger the workflow
2021-05-25 13:33:25 +02:00
Tamas Vajk
1297d1c744
Add framework and cwe static data
2021-05-25 13:33:25 +02:00
Tamas Vajk
2adb3e992a
Code quality improvements on coverage report generator script
2021-05-25 13:33:25 +02:00
Tamas Vajk
d0a46eb7b7
Adjust formatting
2021-05-25 13:33:25 +02:00
Tamas Vajk
f26dba67ac
Adjust 'Total' label to 'Totals'
2021-05-25 13:33:25 +02:00
Tamas Vajk
564fca0da4
Adjust workflow triggers and uploads
2021-05-25 13:33:25 +02:00
Tamas Vajk
ef414681be
Add RST documentation page
2021-05-25 13:33:25 +02:00
Tamas Vajk
beea36191b
Add CSV file with framework and CWE info to be used in RST file
2021-05-25 13:33:25 +02:00
Tamas Vajk
979034a17f
Add github action to generate CSV coverage report
2021-05-25 13:33:25 +02:00
Mathias Vorreiter Pedersen
5382ef7761
C++: Split the overview section of qhelp into a couple of paragraphs.
2021-05-25 13:18:15 +02:00
Mathias Vorreiter Pedersen
f842d09a16
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-05-25 13:16:04 +02:00
Timo Müller
f44b97c1c3
Apply suggestions from code review
...
Improved variable naming in examples and some documentation clearup
Co-authored-by: Chris Smowton <smowton@github.com >
2021-05-25 13:03:07 +02:00
Timo Müller
e7021ffbee
Apply suggestions from code review
...
More clear or precise wording within the documentation
Co-authored-by: Chris Smowton <smowton@github.com >
2021-05-25 12:53:47 +02:00
shati-patel
bfc8845f23
Update wording
2021-05-25 11:36:18 +01:00
Erik Krogh Kristensen
c70651b6fe
always have arrayLikeElement as TypeTracking properties
2021-05-25 11:48:54 +02:00
Anders Schack-Mulligen
4884da363f
Java: Bugfix.
2021-05-25 11:48:35 +02:00
Anders Schack-Mulligen
017bf68906
Dataflow: Fix bad join order.
2021-05-25 11:40:53 +02:00
Tom Hvitved
8cbb3caaa4
Merge pull request #5947 from hvitved/csharp/encode-display-name
...
C#: Encode `"` in `BuildDisplayName`
2021-05-25 10:58:31 +02:00
Mathias Vorreiter Pedersen
b33adb8630
Merge pull request #5930 from MathiasVP/promote-incorrect-allocation-error-out
...
C++: Promote `cpp/incorrect-allocation-error-handling`
2021-05-25 10:57:31 +02:00
Tom Hvitved
b55bce46f8
C#: Restrict non-returning CIL analysis to methods not from source
2021-05-25 10:41:58 +02:00
Mathias Vorreiter Pedersen
eb244c0eb2
C++: Fix documentation.
2021-05-25 10:16:22 +02:00
Mathias Vorreiter Pedersen
e857ac1149
C++: Add more tests and remove redundant conjunct.
2021-05-25 09:17:42 +02:00
Tom Hvitved
2a33756bdf
C#: Encode " in BuildDisplayName
2021-05-23 14:44:48 +02:00
Tom Hvitved
0d14b9413d
C#: Avoid recomputing ControlFlowTree::Range outside the CFG construction stage
2021-05-23 14:14:43 +02:00
Tom Hvitved
088a1a9707
C#: Simplify TriedControlFlowElement::getAThrownException()
2021-05-23 14:14:43 +02:00
Tom Hvitved
3162e12082
C#: Redefine ControlFlowElement::getAssembly
2021-05-23 14:14:43 +02:00
Tom Hvitved
5102fcd5f3
C#: Rewrite predicates from using forall to using unique
...
This avoids generation of expensive anti-join predicates with Cartesian products.
2021-05-23 14:14:43 +02:00
Tom Hvitved
2361476966
C#: Improve join-order in SplitImpl::hasSuccessor
...
Joining on `succ` first gets rid of bad join-orders like
```
Tuple counts for Splitting::SplitImpl::hasSuccessor_dispred#ffff/4@i4#f49ebw:
59306 ~2% {3} r1 = JOIN Splitting::SplitImpl::appliesTo#ff#prev_delta WITH Splitting::Cached::TAssertionSplit#ffff_30#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'this', Lhs.1 'pred'
454395 ~0% {3} r2 = JOIN r1 WITH Splitting::AssertionSplitting::getAnAssertionDescendant#ff ON FIRST 1 OUTPUT Lhs.2 'pred', Rhs.1 'succ', Lhs.1 'this'
12157 ~0% {4} r3 = JOIN r2 WITH ControlFlowGraphImpl::succ#fff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'pred', Lhs.1 'succ', Rhs.2 'c'
0 ~0% {4} r4 = JOIN Splitting::LoopSplitting::LoopUnrollingSplitImpl::appliesToPredecessor_dispred#fff#prev_delta WITH Splitting::Cached::TLoopSplit#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'pred', Lhs.2 'c', Rhs.1, Rhs.0
0 ~0% {5} r5 = JOIN r4 WITH ControlFlowGraphImpl::succ#fff_021#join_rhs ON FIRST 2 OUTPUT Lhs.2, Lhs.3 'this', Lhs.0 'pred', Lhs.1 'c', Rhs.2 'succ'
0 ~0% {5} r6 = r5 AND NOT Splitting::SplitImpl::hasSuccessor_dispred#ffff#antijoin_rhs#2(Lhs.2 'pred', Lhs.4 'succ', Lhs.3 'c', Lhs.0)
0 ~0% {4} r7 = SCAN r6 OUTPUT In.1 'this', In.2 'pred', In.4 'succ', In.3 'c'
12157 ~0% {4} r8 = r3 UNION r7
0 ~0% {3} r9 = SCAN Splitting::BooleanSplitting::BooleanSplitImpl::appliesToBlock_dispred#fff#prev_delta OUTPUT In.1, In.0 'this', In.2
0 ~0% {4} r10 = JOIN r9 WITH project#PreBasicBlocks::PreBasicBlock::getElement_dispred#fff ON FIRST 1 OUTPUT Rhs.1 'pred', Lhs.1 'this', Lhs.0, Lhs.2
0 ~0% {6} r11 = JOIN r10 WITH ControlFlowGraphImpl::succ#fff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2, Lhs.3, Lhs.0 'pred', Rhs.1, Rhs.2 'c'
0 ~0% {6} r12 = r11 AND NOT PreBasicBlocks::PreBasicBlock::getLastElement_dispred#ff(Lhs.1, Lhs.3 'pred')
0 ~0% {4} r13 = SCAN r12 OUTPUT In.0 'this', In.3 'pred', In.4 'succ', In.5 'c'
35244 ~1% {3} r14 = JOIN Splitting::SplitImpl::appliesTo#ff#prev_delta WITH Splitting::Cached::TInitializerSplit#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'this', Lhs.1 'pred'
24640675 ~6% {3} r15 = JOIN r14 WITH Splitting::InitializerSplitting::constructorInitializes#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2 'pred'
24640675 ~21147% {3} r16 = JOIN r15 WITH Splitting::InitializerSplitting::InitializedInstanceMember::getInitializer_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2 'pred'
470227342920 ~481608% {3} r17 = JOIN r16 WITH Splitting::InitializerSplitting::InitializedInstanceMember::getAnInitializerDescendant#ff ON FIRST 1 OUTPUT Lhs.2 'pred', Rhs.1 'succ', Lhs.1 'this'
24560447 ~66468% {4} r18 = JOIN r17 WITH ControlFlowGraphImpl::succ#fff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'pred', Lhs.1 'succ', Rhs.2 'c'
24560447 ~66468% {4} r19 = r13 UNION r18
24572604 ~48162% {4} r20 = r8 UNION r19
0 ~0% {3} r21 = JOIN r9 WITH project#PreBasicBlocks::PreBasicBlock::getElement_dispred#fff ON FIRST 1 OUTPUT Rhs.1 'pred', Lhs.2, Lhs.1 'this'
0 ~0% {4} r22 = JOIN r21 WITH ControlFlowGraphImpl::succ#fff_021#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'pred', Rhs.2 'succ', Rhs.1
0 ~0% {5} r23 = JOIN r22 WITH Splitting::Cached::TBooleanSplit#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2 'succ', Lhs.0 'this', Lhs.1 'pred', Lhs.3 'c'
0 ~0% {4} r24 = JOIN r23 WITH Splitting::BooleanSplitting::SsaBooleanSplitSubKind::canReachCorrelatedCondition#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'pred', Lhs.1 'succ', Lhs.4 'c'
0 ~0% {2} r25 = SCAN Splitting::FinallySplitting::FinallySplitImpl::appliesToPredecessor_dispred#ff#prev_delta OUTPUT In.1 'pred', In.0 'this'
0 ~0% {4} r26 = JOIN r25 WITH ControlFlowGraphImpl::succ#fff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.0 'pred', Rhs.1, Rhs.2 'c'
0 ~0% {4} r27 = r26 AND NOT Splitting::FinallySplitting::FinallyControlFlowElement::isEntryNode_dispred#f(Lhs.2 'succ')
0 ~0% {5} r28 = JOIN r27 WITH Splitting::Cached::TFinallySplit#fff_21#join_rhs ON FIRST 1 OUTPUT Lhs.2 'succ', Lhs.0 'this', Lhs.1 'pred', Lhs.3 'c', Rhs.1
0 ~0% {6} r29 = JOIN r28 WITH ControlFlowGraphImpl::Statements::TryStmtTree::getAFinallyDescendant#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2 'pred', Lhs.0 'succ', Lhs.3 'c', Lhs.4
0 ~0% {7} r30 = JOIN r29 WITH ControlFlowGraphImpl::Statements::TryStmtTree::nestLevel_dispred#ff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2 'pred', Lhs.3 'succ', Lhs.4 'c', Lhs.5, Lhs.0, Rhs.1
0 ~0% {7} r31 = SELECT r30 ON In.6 >= In.4
0 ~0% {4} r32 = SCAN r31 OUTPUT In.0 'this', In.1 'pred', In.2 'succ', In.3 'c'
0 ~0% {4} r33 = r24 UNION r32
0 ~0% {4} r34 = JOIN r25 WITH ControlFlowGraphImpl::succ#fff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.0 'pred', Rhs.2 'c'
0 ~0% {4} r35 = JOIN r34 WITH Splitting::FinallySplitting::FinallyControlFlowElement::isEntryNode_dispred#f ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2 'pred', Lhs.0 'succ', Lhs.3 'c'
0 ~0% {5} r36 = JOIN r35 WITH Splitting::Cached::TFinallySplit#fff_21#join_rhs ON FIRST 1 OUTPUT Lhs.2 'succ', Lhs.0 'this', Lhs.1 'pred', Lhs.3 'c', Rhs.1
0 ~0% {6} r37 = JOIN r36 WITH ControlFlowGraphImpl::Statements::TryStmtTree::getAFinallyDescendant#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2 'pred', Lhs.0 'succ', Lhs.3 'c', Lhs.4
0 ~0% {7} r38 = JOIN r37 WITH ControlFlowGraphImpl::Statements::TryStmtTree::nestLevel_dispred#ff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.2 'pred', Lhs.3 'succ', Lhs.4 'c', Lhs.5, Lhs.0, Rhs.1
0 ~0% {7} r39 = SELECT r38 ON In.6 > In.4
0 ~0% {4} r40 = SCAN r39 OUTPUT In.0 'this', In.1 'pred', In.2 'succ', In.3 'c'
0 ~0% {3} r41 = SCAN Splitting::ExceptionHandlerSplitting::ExceptionHandlerSplitImpl::appliesToPredecessor_dispred#fff#prev_delta OUTPUT In.1 'pred', In.2 'c', In.0 'this'
0 ~0% {4} r42 = JOIN r41 WITH ControlFlowGraphImpl::last#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2 'this', Lhs.0 'pred', Lhs.1 'c'
0 ~0% {5} r43 = JOIN r42 WITH Stmt::TryStmt::getCatchClause_dispred#fff_201#join_rhs ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.1 'this', Lhs.2 'pred', Lhs.3 'c'
0 ~0% {4} r44 = JOIN r43 WITH Stmt::TryStmt::getCatchClause_dispred#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.2 'this', Lhs.3 'pred', Lhs.4 'c'
0 ~0% {5} r45 = JOIN r44 WITH Stmt::CatchClause::isLast_dispred#f ON FIRST 1 OUTPUT Lhs.0, 1, Lhs.1 'this', Lhs.2 'pred', Lhs.3 'c'
0 ~0% {3} r46 = JOIN r45 WITH catch_type_02#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'pred', Lhs.4 'c'
0 {3} r47 = MATERIALIZE r46 AS unknown
0 ~0% {3} r48 = Splitting::ExceptionHandlerSplitting::ExceptionHandlerSplitImpl::appliesToPredecessor_dispred#fff#prev_delta AND NOT r47(Lhs.0 'this', Lhs.1 'pred', Lhs.2 'c')
0 ~0% {3} r49 = SCAN r48 OUTPUT In.1 'pred', In.2 'c', In.0 'this'
0 ~0% {4} r50 = JOIN r49 WITH ControlFlowGraphImpl::succ#fff_021#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'pred', Lhs.1 'c', Rhs.2 'succ'
0 ~0% {4} r51 = JOIN r49 WITH ControlFlowGraphImpl::succ#fff_021#join_rhs ON FIRST 2 OUTPUT Rhs.2 'succ', Lhs.2 'this', Lhs.0 'pred', Lhs.1 'c'
0 ~0% {5} r52 = JOIN r51 WITH ControlFlowGraphImpl::ControlFlowTree::first_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'this', Lhs.2 'pred', Lhs.3 'c', Lhs.0 'succ'
0 ~0% {6} r53 = JOIN r52 WITH Stmt::CatchClause::getBlock_dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, 1, Lhs.1 'this', Lhs.2 'pred', Lhs.3 'c', Lhs.4 'succ'
0 ~0% {4} r54 = JOIN r53 WITH catch_type_02#join_rhs ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'pred', Lhs.4 'c', Lhs.5 'succ'
0 {4} r55 = MATERIALIZE r54 AS unknown
0 ~0% {4} r56 = r50 AND NOT r55(Lhs.0 'this', Lhs.1 'pred', Lhs.2 'c', Lhs.3 'succ')
0 ~0% {4} r57 = r56 AND NOT ControlFlowGraphImpl::Statements::StandardStmt::getChildElement0_dispred#fff#antijoin_rhs#2(Lhs.3 'succ')
0 ~0% {4} r58 = SCAN r57 OUTPUT In.0 'this', In.1 'pred', In.3 'succ', In.2 'c'
0 ~0% {4} r59 = r40 UNION r58
0 ~0% {4} r60 = r33 UNION r59
24572604 ~48162% {4} r61 = r20 UNION r60
24572604 ~48162% {4} r62 = r61 AND NOT Splitting::SplitImpl::hasSuccessor_dispred#ffff#prev(Lhs.0 'this', Lhs.1 'pred', Lhs.2 'succ', Lhs.3 'c')
return r62
```
2021-05-23 14:14:43 +02:00
Artem Smotrakov
1b51dd47ec
Added an example with deserialization filter to UnsafeDeserializationRmi.qhelp
2021-05-23 13:24:42 +02:00
Artem Smotrakov
c837605c85
Added test cases with sanitizers for UnsafeDeserializationRmi.ql
2021-05-23 13:01:22 +02:00
Artem Smotrakov
d2e29fc72c
Renamed RmiUnsafeDeserialization.ql -> UnsafeDeserializationRmi.ql
2021-05-23 10:21:05 +02:00
Artem Smotrakov
2d93eeae33
Covered deserialization filters in RmiUnsafeDeserialization.ql
2021-05-23 10:21:05 +02:00
Artem Smotrakov
e28f919f3d
Look for remote callable method only in RmiUnsafeDeserialization.ql
2021-05-23 10:21:05 +02:00
Artem Smotrakov
0182dfe1c0
Added RmiUnsafeDeserialization.qhelp
2021-05-23 10:21:04 +02:00
Artem Smotrakov
5ffe04d6a5
Updated expected output for RmiUnsafeDeserialization.java test
2021-05-23 10:21:04 +02:00
Artem Smotrakov
3d20330a92
More tests for RmiUnsafeDeserialization
2021-05-23 10:21:04 +02:00
Artem Smotrakov
ec6186a1c5
Draft of tests for RmiUnsafeDeserialization.ql
2021-05-23 10:21:04 +02:00
Artem Smotrakov
efa4b4f414
Cover Registry in RmiUnsafeDeserialization.ql
2021-05-23 10:21:04 +02:00
Artem Smotrakov
8b96ff9601
First draft of RmiUnsafeDeserialization.ql
2021-05-23 10:21:04 +02:00
shati-patel
254c769089
Docs: Describe custom log directory setting in VS Code extension
2021-05-21 21:41:09 +01:00
Robert Marsh
7ac04a8650
Merge pull request #5942 from MathiasVP/fix-change-note-dates
...
C++: Convert yyyy-dd-mm change-notes to yyyy-mm-dd
2021-05-21 12:34:30 -07:00
Ian Lynagh
23081f0193
Merge pull request #5922 from AlexDenisov/ref-qualifiers
...
C++: Add ref qualifiers
2021-05-21 17:35:57 +01:00
jorgectf
37d6ff76a3
Update tests and .expected
2021-05-21 17:47:53 +02:00
Tamás Vajk
f5acc51d6f
Merge pull request #5909 from tamasvajk/fix/foreach-ir-temp-var
...
C#: Fix type of temp foreach variable in IR
2021-05-21 17:24:08 +02:00
Rasmus Wriedt Larsen
71a93ad311
Python: Fix QLDoc for PyYAML to follow convention
2021-05-21 17:17:23 +02:00
Rasmus Wriedt Larsen
6f50b12333
Python: Fix QLDoc for Werkzeug
2021-05-21 17:16:09 +02:00
Rasmus Wriedt Larsen
c4e244eb80
Python: Add getAwaited to API::Node
...
I _really_ wanted to call this `.await()`, but that did not fit in with
the convention, or the corresponding `getPromised` in JS.
54f191cfe3/javascript/ql/src/semmle/javascript/ApiGraphs.qll (L184)
2021-05-21 17:11:20 +02:00
Mathias Vorreiter Pedersen
d086ba618f
C++: Convert the yyyy-dd-mm change-notes to yyyy-mm-dd.
2021-05-21 16:24:15 +02:00
Jorge
9e9678b3ca
Apply documentation suggestions
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-05-21 16:17:39 +02:00
Rasmus Wriedt Larsen
e29b7568bf
Python: Add missing QLDoc for subclass label
2021-05-21 16:17:17 +02:00
Rasmus Wriedt Larsen
2408573a0a
Python: Add API graph test for calling coroutines
2021-05-21 16:08:15 +02:00
Rasmus Wriedt Larsen
7a5fd02442
Python: API graph tests: add --max-import-depth=1
...
Before this, I ended up extracting 454 modules locally 😱
2021-05-21 15:58:15 +02:00
Rasmus Wriedt Larsen
9a4709c134
Python: API graph tests: Disallow results outside project
...
Running the tests locally would result in thousands of results before
this 😱
2021-05-21 15:57:10 +02:00
Anders Schack-Mulligen
d00618f4f4
Java: Improve performance of virtual dispatch calculation.
2021-05-21 15:04:08 +02:00
CodeQL CI
131c08e436
Merge pull request #5939 from max-schaefer/js/set-constructor-args
...
Approved by esbena
2021-05-21 05:02:27 -07:00
Mathias Vorreiter Pedersen
3662ec4c83
C++: Credit the original query author in change-note.
2021-05-21 11:12:19 +02:00
Mathias Vorreiter Pedersen
84b0b8c2bd
C++: Add change-note.
2021-05-21 10:57:23 +02:00
Max Schaefer
6e34784fc5
Add new experimental query MultipleArgumentsToSetConstructor.
2021-05-21 09:54:41 +01:00
Mathias Vorreiter Pedersen
12cd09d5d4
C++: Delete the experimental query and its tests, and accept the test changes.
2021-05-21 10:35:57 +02:00
Mathias Vorreiter Pedersen
8d0cfb4e91
C++: Merge tests from 'cpp/access-memory-location-after-end-buffer-strncat' into the tests from 'cpp/unsafe-strncat'.
2021-05-21 10:34:59 +02:00
Anders Schack-Mulligen
f4f257819d
Merge pull request #5932 from zbazztian/spring-improvements
...
Add method invocations of Spring's SavedRequest as remote sources
2021-05-21 10:34:54 +02:00
Mathias Vorreiter Pedersen
5300dd2fa8
C++: Merge the experimental query 'cpp/access-memory-location-after-end-buffer-strncat' into 'cpp/unsafe-strncat'.
2021-05-21 10:33:56 +02:00
Evgenii Protsenko
1e40213abb
use <class> instead of <class>::Range
2021-05-20 22:56:08 +03:00
Sebastian Bauersfeld
ffcca4d5e9
Add change note.
2021-05-20 20:07:14 +07:00
Sebastian Bauersfeld
28f597440f
Add method invocations of Spring's SavedRequest as a remote sources.
2021-05-20 20:00:14 +07:00
Rasmus Wriedt Larsen
f17fe442a2
Python: Expand test of py/use-of-input
2021-05-20 14:52:10 +02:00
Rasmus Wriedt Larsen
0292ca6b67
Merge pull request #5880 from tausbn/python-limit-builtins
...
Python: Limit set of globals that may be built-ins
2021-05-20 14:47:22 +02:00
Tom Hvitved
2a7ceb2e19
Merge pull request #5928 from hvitved/python/type-tracker-split
...
Python: Split up `(small)step` into intra/interprocedural predicates
2021-05-20 14:13:44 +02:00
Tom Hvitved
1fc95a68ca
Python: Add more type tracking QL doc
2021-05-20 13:47:23 +02:00
Taus
c4bb3c27e0
Python: Update python/ql/src/semmle/python/ApiGraphs.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-05-20 13:14:09 +02:00
Alex Denisov
694eba66f3
C++: Adjust tests for new specifiers
2021-05-20 10:49:20 +02:00
CodeQL CI
17afbdf258
Merge pull request #5635 from RasmusWL/port-weak-crypto-algorithm
...
Approved by yoff
2021-05-20 01:22:32 -07:00
Alex Denisov
ab23507e3f
C++: Add ref qualifiers
2021-05-20 10:03:54 +02:00
Mathias Vorreiter Pedersen
b2432158a8
C++: Add change-note.
2021-05-20 10:00:32 +02:00
Mathias Vorreiter Pedersen
152c0161a2
C++: Fix formatting.
2021-05-20 09:48:32 +02:00
Mathias Vorreiter Pedersen
9504592909
C++: Promote cpp/incorrect-allocation-error-handling out of experimental.
2021-05-20 09:47:45 +02:00
Tom Hvitved
f63c1d2383
Python: Split up (small)step into intra/interprocedural predicates
2021-05-19 19:59:25 +02:00
Anders Schack-Mulligen
4406b8e339
Dataflow: Sync.
2021-05-19 19:22:36 +02:00
Anders Schack-Mulligen
bb258813a1
Dataflow: Improve performance for dispatch-join in flow-through.
2021-05-19 19:20:57 +02:00
Rasmus Wriedt Larsen
753dca91b1
Python: weak-crypto: Make algorithm selection less brittle
...
As discussed in https://github.com/github/codeql/pull/5635#discussion_r633477154
2021-05-19 17:47:09 +02:00
Rasmus Wriedt Larsen
22d4d7956a
Python: Fix typo in QLDoc
2021-05-19 17:47:05 +02:00
Rasmus Wriedt Larsen
8d1e7da851
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-19 17:42:46 +02:00
Rasmus Wriedt Larsen
61ad5d0673
Python: Allow printing PostUpdateNode in ConceptsTest.qll
...
See how this works in `test_json.py`
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
9dbb364cca
Python: Move json tests to be part of stdlib
...
This is better, since the modeling is also part of Stdlib.qll
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
51a25e45fe
Python: Use shared prettyExpr in ConceptsTest.qll
...
This required quite some changes in the expected output. I think it's much more
clear what the selected nodes are now 👍 (but it was a bit boring work to fix
this up)
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
1af6d97c51
Python: Remove straggling f-: annotations
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
f66dccafda
Python: Rename prettyExp => prettyExpr
...
So we're consistenly using `expr` and not leaving our the `r`.
2021-05-19 17:10:33 +02:00
Taus
75a43e76e8
Python: Address review comments.
...
- Removes the version check on the set of built-in names.
- Renames the predicate used to represent said set.
- Documents how these lists of names were obtained.
- Gets rid of a superfluous import.
2021-05-19 11:54:47 +00:00
Mathias Vorreiter Pedersen
c4f604bafe
Merge pull request #5896 from geoffw0/weak_crypto
...
C++: Improve cpp/weak-cryptographic-algorithm
2021-05-19 13:17:13 +02:00
Alexander Eyers-Taylor
c80495fbdd
Merge pull request #5851 from github/alexet/patch
...
Use only_bind_out to force a good join order.
2021-05-19 12:00:07 +01:00
CodeQL CI
9bdfdb02d3
Merge pull request #5916 from erik-krogh/scriptSink
...
Approved by esbena
2021-05-19 03:46:17 -07:00
Geoffrey White
aaae717328
Merge branch 'main' into weak_crypto
2021-05-19 11:19:08 +01:00
CodeQL CI
c793ac933a
Merge pull request #5921 from erik-krogh/expressChain
...
Approved by esbena
2021-05-19 03:17:40 -07:00
Geoffrey White
e985204a62
C++: Add change note.
2021-05-19 11:14:23 +01:00
CodeQL CI
23e8092452
Merge pull request #5864 from RasmusWL/some-framework-modeling
...
Approved by tausbn
2021-05-19 02:31:06 -07:00
Geoffrey White
e66b5559a4
Merge pull request #5924 from MathiasVP/cleanup-modelFlow
...
C++: Remove a disjunction from `modelFlow`
2021-05-19 10:12:20 +01:00
Geoffrey White
99833f16e1
Merge pull request #5923 from MathiasVP/range-analysis-in-overflow-static
...
C++: Add range analysis to `cpp/static-buffer-overflow`
2021-05-19 10:12:02 +01:00
Rasmus Wriedt Larsen
904eacf9a2
Python: Use absolute import for PEP249
2021-05-19 11:10:06 +02:00
Mathias Vorreiter Pedersen
4d00513606
C++: Use the isParameterDerefOrQualifierObject predicate to remove a disjunction.
2021-05-19 10:47:04 +02:00
Mathias Vorreiter Pedersen
741eed93b2
C++: Replace minimum(any(...)) with a min aggregate. Also removed the min aggregate further down since it's no longer needed.
2021-05-19 09:03:05 +02:00
yoff
60da193620
Update python/ql/src/semmle/python/frameworks/Cryptodome.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-05-19 08:08:59 +02:00
Erik Krogh Kristensen
9a1f80aa93
accept updated test output for express test
2021-05-18 22:23:29 +02:00
Erik Krogh Kristensen
e9d2dd0b57
support the chaining methods on Express apps
2021-05-18 22:23:27 +02:00
Robert Marsh
db85a215ab
C++: fix alias model for smart pointer setters
2021-05-18 13:16:22 -07:00
Robert Marsh
e590a7bc33
C++: Handle alias models for this/qualifiers
2021-05-18 13:15:38 -07:00
Evgenii Protsenko
af75d85b2e
ClickHouseSQLInjection.qll : add tests
2021-05-18 22:49:11 +03:00
Chris Smowton
0c970b5f1f
Merge pull request #5802 from luchua-bc/java/rhino-injection
...
Java: CWE-094 Rhino code injection
2021-05-18 19:25:53 +01:00
Mathias Vorreiter Pedersen
6103aabdce
C++: Add change-note.
2021-05-18 19:17:11 +02:00
luchua-bc
02aa9c6fc7
Optimize the sink and update qldoc
2021-05-18 16:12:23 +00:00
luchua-bc
d4323a4a54
Update qldoc
2021-05-18 16:12:23 +00:00
luchua-bc
9d392263a5
Refactor inconsistent method names
2021-05-18 16:12:23 +00:00
luchua-bc
2fa249a8eb
Update method name and qldoc
2021-05-18 16:12:23 +00:00
luchua-bc
2c1374bdcf
Use inline implementation for ScriptEngineFactory
2021-05-18 16:12:23 +00:00
luchua-bc
0ac8453398
Allow all arguments of methods in ScriptEngineFactory
2021-05-18 16:12:23 +00:00
luchua-bc
e4699f7fa9
Optimize the query
2021-05-18 16:12:22 +00:00
luchua-bc
d664aa6d6a
Include more scenarios and update qldoc
2021-05-18 16:12:22 +00:00
luchua-bc
852bcfb5c7
Refactor the ScriptEngine query and the Rhino code injection query into one
2021-05-18 16:12:22 +00:00
luchua-bc
b0b5338359
Rhino code injection
2021-05-18 16:12:22 +00:00
Mathias Vorreiter Pedersen
26c4a66dc4
C++: Add range analysis to fix FPs.
2021-05-18 17:54:30 +02:00
Mathias Vorreiter Pedersen
df9981de4f
C++: Add testcases with false positives.
2021-05-18 17:53:20 +02:00
Ethan Palm
9deaace756
Merge pull request #5898 from ethanpalm/go-build-commands
...
Docs: Document Go tracer support
2021-05-18 11:49:31 -04:00
Ethan Palm
610e041e28
Add reviewer feedback
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2021-05-18 11:42:08 -04:00
Chris Smowton
4230869ee2
Merge pull request #5819 from luchua-bc/java/jpython-injection
...
Java: CWE-094 Jython code injection
2021-05-18 16:38:40 +01:00
Chris Smowton
71f540a755
Merge pull request #5844 from haby0/SpringRedirects
...
[Java] CWE-601 Spring url redirection detect
2021-05-18 16:37:40 +01:00
Geoffrey White
cdf261b54b
C++: In fact it's just not good enough to get additional evidence from the declaring type.
2021-05-18 14:31:19 +01:00
Geoffrey White
88dc0861ac
C++: Fix copy-paste error.
2021-05-18 14:27:31 +01:00
Geoffrey White
c7382ee06d
C++: Repair for function call macros.
2021-05-18 14:27:08 +01:00
Geoffrey White
012840e602
C++: Add more test cases.
2021-05-18 14:26:12 +01:00
Geoffrey White
3d8513c1e0
C++: Add 'MAC' as additional evidence.
2021-05-18 13:24:51 +01:00
Geoffrey White
da83e9142b
C++: Replace getAnExpandedElement with getAGeneratedElement as it's all we really need.
2021-05-18 13:23:49 +01:00
luchua-bc
2a0721b2ae
Optimize the sink and update method name
2021-05-18 12:18:14 +00:00
CodeQL CI
1d120824ac
Merge pull request #5920 from erik-krogh/clone
...
Approved by esbena
2021-05-18 05:13:57 -07:00
Rasmus Wriedt Larsen
97fadd9970
Merge branch 'main' into port-weak-crypto-algorithm
2021-05-18 14:04:18 +02:00
Rasmus Wriedt Larsen
6c755024ac
Python: Refactor code, inline some type-tracking
2021-05-18 14:03:36 +02:00
Rasmus Wriedt Larsen
770429fd68
Python: Autoformat
2021-05-18 14:02:46 +02:00
haby0
e46de44473
Solve errors caused by private ownership
2021-05-18 19:56:32 +08:00
Erik Krogh Kristensen
06514a2bb6
move clone model to Extend.qll
2021-05-18 13:16:41 +02:00
haby0
caf5f4d605
modified comment
2021-05-18 19:10:03 +08:00
Erik Krogh Kristensen
1435ac715a
add support for the clone library
2021-05-18 12:46:34 +02:00
Rasmus Wriedt Larsen
9156316b14
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-18 11:53:11 +02:00
Rasmus Wriedt Larsen
0ade23ab2a
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-18 11:49:59 +02:00
Erik Krogh Kristensen
cac0ab299b
add writes to textContent on a <script /> as a sink for code-injection
2021-05-18 10:25:25 +02:00
Anders Schack-Mulligen
9b0e3b1950
Merge pull request #5814 from JLLeitschuh/feat/JLL/jackson_as_taint_step
...
[Java] Add taint tracking through Jackson deserialization
2021-05-18 09:31:16 +02:00
haby0
a0cd551bae
Add filtering of String.format
2021-05-18 11:05:10 +08:00
luchua-bc
e652d8771c
Update method name and qldoc
2021-05-17 20:36:15 +00:00
Chris Smowton
ef410b9984
Update java/change-notes/2021-05-14-close-resource-leaks-improvements.md
2021-05-17 19:27:10 +01:00
Henry Mercer
0ad69d11a8
Code Scanning selectors: Include diagnostic queries
2021-05-17 18:39:33 +01:00
Geoffrey White
3b29920255
C++: Replace getAChild with getAnArgument().
2021-05-17 16:10:39 +01:00
Geoffrey White
09d00b133e
C++: Acknowledge another not detected result in tests.
2021-05-17 15:53:03 +01:00
Geoffrey White
930b9fe3e5
C++: Add triple-DES to the bad algorithms list.
2021-05-17 15:51:17 +01:00
Geoffrey White
57354def9e
C++: Real world diffs suggest that 'Cipher' should be an encryption word as well.
2021-05-17 15:36:27 +01:00
Geoffrey White
9e75f53798
C++: Prefer matches to regexpMatch.
2021-05-17 15:35:19 +01:00
Tom Hvitved
ae6326b1f3
Merge pull request #5882 from hvitved/csharp/autobuilder/shared-compilation
2021-05-17 16:05:08 +02:00
Tamas Vajk
6853f6affa
C#: Fix type of temp foreach variable in IR
2021-05-17 15:53:57 +02:00
Mathias Vorreiter Pedersen
d46452e8de
Merge pull request #5903 from MathiasVP/tainted-allocation-size-barrier
...
C++: Add barriers to `cpp/uncontrolled-allocation-size`
2021-05-17 15:24:45 +02:00
CodeQL CI
12b1bbe484
Merge pull request #5897 from erik-krogh/uid
...
Approved by RasmusWL, esbena
2021-05-17 06:01:04 -07:00
haby0
689c28a178
modified JsonIoSafeOptionalArgs
2021-05-17 19:00:59 +08:00
haby0
95c33a240f
Update java/change-notes/2021-05-17-add-unsafe-deserialization-sinks.md
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-05-17 18:49:16 +08:00
Anders Schack-Mulligen
77c93dcf26
Make private
2021-05-17 10:35:04 +02:00
Tom Hvitved
b142ecb1db
C#: Address review comment
2021-05-17 10:33:06 +02:00
haby0
58d774ae85
add change notes
2021-05-17 14:52:05 +08:00
Mathias Vorreiter Pedersen
31091c66c1
C++: Add a test containing a guarded long.
2021-05-17 08:06:06 +02:00
Robert Marsh
d706d7b7a4
Merge pull request #5887 from MathiasVP/fewer-rand-sources-in-uncontrolled-arithmetic
...
C++: Add more sanitizers to `cpp/uncontrolled-arithmetic`
2021-05-14 15:35:56 -07:00
Marcono1234
e205e4bbce
Java: Add change note for close resource query changes
2021-05-14 22:31:14 +02:00
Marcono1234
73c7e15580
Java: Add back StringInputStream to CloseReader.ql
2021-05-14 22:25:00 +02:00
Ethan P
58c746e42b
fix formatting
2021-05-14 14:09:07 -04:00
Ethan P
0e99d5e379
Add examples of both tracing mechanisms
2021-05-14 14:05:55 -04:00
Ethan Palm
6dd30ee5e2
clarify options for tracing
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-05-14 14:00:33 -04:00
Robin Neatherway
17b74319fa
Merge pull request #5902 from github/rneatherway/lines-of-code-tags
...
Add lines-of-code tags
2021-05-14 17:16:50 +01:00
Ethan Palm
4cf695b5ab
specify `--command` option
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-05-14 10:00:17 -04:00
Mathias Vorreiter Pedersen
58dde68b10
C++: Add change-note.
2021-05-14 14:16:00 +02:00
Mathias Vorreiter Pedersen
2d0a56128d
C++: Prevent flow out of pointer-difference expressions.
2021-05-14 13:49:48 +02:00
Mathias Vorreiter Pedersen
c1d41b3169
C++: Add false positive result from pointer-difference expressions.
2021-05-14 13:47:23 +02:00
luchua-bc
1497fba6f2
Remove the isAdditionalTaintStep predicate
2021-05-14 11:43:49 +00:00
Mathias Vorreiter Pedersen
5031b73f35
C++: Add barrier to cpp/uncontrolled-allocation-size that blocks flow when overflow isn't possible.
2021-05-14 13:43:20 +02:00
Erik Krogh Kristensen
3766678d60
move RegexpMetaChars into Regexp.qll
2021-05-14 13:23:36 +02:00
CodeQL CI
af0d31695a
Merge pull request #5862 from asgerf/js/has-underlying-type
...
Approved by erik-krogh, max-schaefer
2021-05-14 04:10:43 -07:00
Robin Neatherway
f378513ea3
Add lines-of-code tags
...
This is a proposed method for advertising which queries are measuring
the lines of code in a project in a more robust manner than inspecting
the rule id.
Note that the python "LinesOfUserCode" query should _not_ have this
property, as otherwise the results of the two queries will be summed.
2021-05-14 11:20:43 +01:00
haby0
60fc607449
Modify ql
2021-05-14 18:17:05 +08:00
Erik Krogh Kristensen
33641c84f6
recognize sanitizing string replace call for regexp-injection
2021-05-14 11:58:27 +02:00
haby0
498c99e26c
Add left value, Add return expression tracing flow
2021-05-14 16:31:59 +08:00
Ethan P
406fb1e383
Update with Go custom build options
2021-05-13 17:29:34 -04:00
Erik Krogh Kristensen
9d60ec035f
fix casing on the uid regexp
2021-05-13 23:04:30 +02:00
Erik Krogh Kristensen
662e335424
keep python in sync
2021-05-13 22:54:39 +02:00
Erik Krogh Kristensen
51067af784
add "uid" (and friends) as maybe being sensitive account info
2021-05-13 22:34:10 +02:00
Geoffrey White
9cdf838981
C++: Bug fix.
2021-05-13 16:20:52 +01:00
Geoffrey White
a9d57450c8
C++: Autoformat.
2021-05-13 16:19:09 +01:00
CodeQL CI
9b0c24abc2
Merge pull request #5876 from erik-krogh/moreAxios
...
Approved by asgerf
2021-05-13 08:03:33 -07:00
Geoffrey White
3a83ff54e6
C++: Add support for class methods.
2021-05-13 16:02:00 +01:00
Geoffrey White
2576075b98
C++: Repair result message.
2021-05-13 15:52:28 +01:00
Geoffrey White
5d1ef49f8f
C++: Add support for enum constants.
2021-05-13 15:42:42 +01:00
Geoffrey White
e4d2c7cfc4
C++: Rewrite so that we look for additional evidence.
2021-05-13 13:19:39 +01:00
Geoffrey White
123889a671
C++: Fix 'triple DES' false positives.
2021-05-13 10:21:06 +01:00
haby0
02e415045f
Delete RedirectBuilderFlowConfig
2021-05-13 15:48:15 +08:00
Geoffrey White
40cf29b625
C++: Rearrange the library.
2021-05-13 08:39:37 +01:00
haby0
effa2b162a
Add spring url redirection detect
2021-05-13 09:55:37 +08:00
Taus
79cfe5aca2
Python: Limit py/use-of-input to Python 2
2021-05-12 21:23:16 +00:00
Taus
fad55b3635
Python: Reimplement py/use-of-input
2021-05-12 21:09:51 +00:00
Evgenii Protsenko
470e3eb089
[python] ClickHouseDriver.qll: add support for subclasses
2021-05-13 00:03:53 +03:00
Erik Krogh Kristensen
34fbafafde
remove redundant "put" case
2021-05-12 22:34:44 +02:00
Evgenii Protsenko
2efa0ad105
[C++] Implement module ClickHouseDriver.qll
2021-05-12 22:36:24 +03:00
Taus
fe12e620dd
Python: Avoid clobbering range in test
...
This was an unwanted interaction between two unrelated tests, so I
switched to a different built-in in the second test. I also added a test
case that shows an unfortunate side effect of this more restricted
handling of built-ins.
2021-05-12 18:42:10 +00:00
Geoffrey White
0450caa73d
C++: Exclude array initializers.
2021-05-12 19:39:30 +01:00
Geoffrey White
52a88af6c1
C++: Exclude macro invocations in switch case expressions.
2021-05-12 19:33:18 +01:00
Geoffrey White
9404d0676d
C++: Exclude macros that don't generate anything.
2021-05-12 19:28:08 +01:00
Geoffrey White
b6d5f7c315
C++: Fix FPs caused by substring regexp.
2021-05-12 19:23:49 +01:00
Geoffrey White
109fa4d38e
C++: Add test cases for BrokenCryptoAlgorithm.ql.
2021-05-12 19:16:00 +01:00
Taus
ff2b6b9737
Python: Correctly locate stores to built-ins
2021-05-12 18:07:18 +00:00
Mathias Vorreiter Pedersen
7d26aca793
C++: Add change-note.
2021-05-12 16:34:23 +02:00
Erik Krogh Kristensen
e0f78dde56
make the axios error catch match the non-error case
2021-05-12 16:23:37 +02:00
Mathias Vorreiter Pedersen
e94dab70b5
C++: Add sanitizers to cpp/uncontrolled-arithmetic.
2021-05-12 15:44:09 +02:00
Jonathan Leitschuh
48b50f93c2
Update java/ql/src/semmle/code/java/frameworks/jackson/JacksonSerializability.qll
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2021-05-12 08:58:01 -04:00
Taus
3d30efed11
Python: Add exec as a shared built-in
...
This is _slightly_ wrong, since `exec` isn't a built-in function in
Python 2. It should be harmless, however, since `exec` is a keyword,
and so cannot be redefined anyway.
2021-05-12 11:07:16 +00:00
Anders Schack-Mulligen
7974e3ad38
Merge pull request #5883 from zbazztian/consider-boxed-booleans-to-avoid-xxe-fps
...
Consider boxed booleans to avoid false positives for XXE.ql
2021-05-12 12:51:22 +02:00
Sebastian Bauersfeld
b05512a958
Add change notes.
2021-05-12 16:58:24 +07:00
Taus
5c7e73d485
Python: Add exception types
2021-05-12 09:53:09 +00:00
Sebastian Bauersfeld
bf4d88175c
Consider boxed booleans to avoid false positives for XXE.ql
2021-05-12 16:40:00 +07:00
Geoffrey White
8f152b7380
Merge pull request #5877 from MathiasVP/detect-more-abs-in-overflow-library
...
C++: Detect more uses of `abs`
2021-05-12 10:02:12 +01:00
Tom Hvitved
fc121e1cbd
Merge pull request #5865 from tamasvajk/feature/remove-base-class-dependency-id
...
C#: Remove base class from type IDs in trap files
2021-05-12 10:30:31 +02:00
Taus
07a70af344
Python: Limit set of globals that may be built-ins
...
I am very tempted to leave out the constants, or at the very least
`False`, `True`, and `None`, as these have _many_ occurrences in the
average codebase, and are not terribly useful at the API-graph level.
If we really do want to capture "nodes that refer to such and such
constant", then I think a better solution would be to create classes
extending `DataFlow::Node` to facilitate this.
2021-05-12 08:19:35 +00:00
Tom Hvitved
961467e06e
C#: Always pass /p:UseSharedCompilation=false to dotnet build in auto builder
2021-05-12 10:15:04 +02:00
Anders Schack-Mulligen
a247ae4357
Merge pull request #5843 from JLLeitschuh/feat/JLL/improve_kryo_support
...
[Java] Fix Kryo FP & Kryo 5 Support
2021-05-12 09:52:24 +02:00
Anders Schack-Mulligen
74ae2e0857
Merge pull request #5773 from hvitved/dataflow/aggressive-caching
...
Data flow: Cache most language-dependent predicates
2021-05-12 09:41:55 +02:00
haby0
12f47bcf24
Add UnsafeDeserialization
2021-05-12 12:37:16 +08:00
Tamas Vajk
8e371fd05a
Adjust expected IR test file
2021-05-11 21:54:05 +02:00
Mathias Vorreiter Pedersen
948f1d8e34
C++: Add testcase with INTMAX_MIN.
2021-05-11 19:43:21 +02:00
Marcono1234
8969da7775
Java: Improve not closing resource query; add tests
2021-05-11 19:32:02 +02:00
luchua-bc
e7cd6c9972
Optimize the query
2021-05-11 16:56:12 +00:00
Jonathan Leitschuh
5a68ac88ef
Cleanup Jackson logic after code review
2021-05-11 10:48:22 -04:00
Jonathan Leitschuh
bacc3ef5b3
[Java] Jackson add support for 2 step deserialization taint flow
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
e97bad3b33
Support field access data flow for JacksonDeserializedTaintStep
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
83d527ed19
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
b871f48c50
[Java] Add release note to Jackson change
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
d0b0b767a2
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
d0638db6e7
[Java] Add data flow through Iterator deserializers for Jackson
2021-05-11 10:36:47 -04:00
Jonathan Leitschuh
56b1f15dda
[Java] Add taint tracking through Jackson deserialization
2021-05-11 10:36:47 -04:00
Geoffrey White
d7e560c611
Merge pull request #5767 from ihsinme/ihsinme-patch-268
...
CPP: Add query for CWE-1126: Declaration of Variable with Unnecessarily Wide Scope
2021-05-11 15:24:25 +01:00
Mathias Vorreiter Pedersen
3e21f479a9
C++: Add change-note.
2021-05-11 14:58:48 +02:00
Tom Hvitved
d66506b0a3
Data flow: Rename {Argument,Parameter}NodeExt to {Arg,Param}Node
2021-05-11 14:40:10 +02:00
Mathias Vorreiter Pedersen
48e783184c
C++: Fix false positive by recognizing more absolute value functions in Overflow.qll
2021-05-11 14:30:28 +02:00
Jonathan Leitschuh
0d9a85ca6b
Update java/change-notes/2021-05-05-kryo-improvements.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-05-11 08:29:50 -04:00
Mathias Vorreiter Pedersen
24d8abd2c2
C++: Add false positive testcase when an absolute value is used in comparison.
2021-05-11 14:27:53 +02:00
CodeQL CI
922b276fac
Merge pull request #5728 from asgerf/js/source-sink-queries
...
Approved by erik-krogh
2021-05-11 05:04:47 -07:00
Tamas Vajk
717070c7e4
Fix/cleanup passed and default arguments values
2021-05-11 13:11:35 +02:00
yoff
a7f97895ac
Merge pull request #5863 from erik-krogh/printReg
...
JS: add printAst.ql support for regular expressions
2021-05-11 12:45:49 +02:00
yoff
0e5a2c4573
Merge pull request #5442 from jorgectf/jorgectf/python/redos
...
Python: Add Regular Expression Injection query
2021-05-11 12:11:35 +02:00
yoff
549c9eee1a
Merge pull request #5739 from RasmusWL/share-sensitive-data-modeling
...
Python/JS: Share sensitive data modeling
2021-05-11 11:53:59 +02:00
CodeQL CI
a87731115a
Merge pull request #5860 from max-schaefer/js/improve-sql-modelling
...
Approved by asgerf
2021-05-11 02:24:52 -07:00
Erik Krogh Kristensen
99e98419dc
add support for error values in an axios client request
2021-05-11 11:24:21 +02:00
Erik Krogh Kristensen
52991dc4a1
rewrite the axios model to use API graphs
2021-05-11 11:23:51 +02:00
Erik Krogh Kristensen
54f191cfe3
add support for rejected promise values in API graphs
2021-05-11 11:23:03 +02:00
CodeQL CI
beb66fc4db
Merge pull request #5719 from asgerf/js/nestjs
...
Approved by esbena
2021-05-11 02:08:27 -07:00
Anders Schack-Mulligen
744c495ac2
Merge pull request #5824 from JLLeitschuh/feat/JLL/guava_first_non_null
...
[Java] Add support for com.google.common.base.MoreObjects#firstNonNull
2021-05-11 09:42:20 +02:00
AlexDenisov
2905bb8b9a
Merge pull request #5861 from AlexDenisov/alexdenisov/adjust-user-defined-literals-test
...
C++: Adjust user-defined literals test' expectations
2021-05-11 09:31:54 +02:00
Anders Schack-Mulligen
7d6a497136
Merge pull request #5857 from dbartol/container/work
...
Java: Fix QLDoc for `Container.toString()`
2021-05-11 08:37:41 +02:00
Dave Bartolomeo
f85aff869c
Java: Fix PR feedback
2021-05-10 16:37:23 -04:00
Marcono1234
2e098f050e
Java: Ignore char array based closeables for CloseReader.ql and CloseWriter.ql
2021-05-10 18:33:07 +02:00
Mathias Vorreiter Pedersen
5016c6436a
Merge pull request #5859 from MathiasVP/fix-fp-in-comparison-with-wider-type
...
C++: Fix false positive in `cpp/comparison-with-wider-type`
2021-05-10 17:58:31 +02:00
Jonathan Leitschuh
d27316eb3e
Apply suggestions from code review
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-10 11:55:31 -04:00
Chris Smowton
0afe22d60c
Merge pull request #5710 from p0wn4j/jsch-os-injection
...
[Java] CWE-078: Add JSch lib OS Command Injection sink
2021-05-10 16:12:00 +01:00
Tamas Vajk
dd86da3f24
C#: Remove base class from type IDs in trap files
2021-05-10 17:06:10 +02:00
Tamas Vajk
31ac6442e8
C#: Fix default parameter value generation in case of error symbols
2021-05-10 17:03:08 +02:00
Rasmus Wriedt Larsen
1b0d5053e7
Python: simplejson load/dump only works with lib installed
...
Which I had done locally. Problem is the same about not having PostUpdateNode
when points-to is not able to resolve the call, so I'm happy to just make CI
happy right now, and hopefully we'll get a fix to the underlying problem soon 😊
2021-05-10 16:21:29 +02:00
Mathias Vorreiter Pedersen
d55db836cb
C++: Remove implied conjunct.
2021-05-10 16:13:54 +02:00
Tom Hvitved
498f9b2547
Merge pull request #5848 from hvitved/csharp/trap-key-escape
...
C#: Escape IDs in TRAP label definitions
2021-05-10 16:13:13 +02:00
Mathias Vorreiter Pedersen
51d04cb5b3
C++: Correct test annotation.
2021-05-10 15:30:35 +02:00
Mathias Vorreiter Pedersen
c0b65314be
C++: Fix false positive by restricting _both_ the old (unconverted) expression _and_ all of the conversions.
2021-05-10 15:18:42 +02:00
Rasmus Wriedt Larsen
c2a6b811fc
Python: Add modeling of ujson PyPI package
...
The problem with `tainted_filelike` not having taint, is that in the call
`ujson.dump(tainted_obj, tainted_filelike)`
there is no PostUpdateNote for `tainted_filelike` :( The reason is that
points-to is not able to resolve the call, so none of the clauses in
`argumentPreUpdateNode` matches
See 08731fc6cf/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll (L101-L111)
Let's deal with that issue in an other PR though
2021-05-10 15:10:31 +02:00
Rasmus Wriedt Larsen
72d08f4d6e
Python: Model json load/dump
2021-05-10 15:10:30 +02:00
Rasmus Wriedt Larsen
63f28d7d9b
Python: Model keyword args to json loads/dumps
2021-05-10 15:10:29 +02:00
Rasmus Wriedt Larsen
784e0cdb96
Python: Improve tests of json module
...
Inspired by the work on previous commit
2021-05-10 15:10:28 +02:00
Rasmus Wriedt Larsen
3fe9a3d933
Python: Add modeling of simplejson PyPI package
...
I noticed that we don't handle PostUpdateNote very well in the concept tests,
for exmaple for `json.dump(...)` there _should_ have been an `encodeOutput` as
part of the inline expectations.
I'll work on fixing that up in a separate PR, to keep things clean.
2021-05-10 15:10:27 +02:00
Mathias Vorreiter Pedersen
c7cd75437f
C++: Add testcase demonstrating false positive from conversions.
2021-05-10 14:58:33 +02:00
CodeQL CI
a3d17a1437
Merge pull request #5769 from erik-krogh/libXss
...
Approved by esbena
2021-05-10 05:58:07 -07:00
yoff
78370cf63f
Update python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll
2021-05-10 14:53:40 +02:00
Erik Krogh Kristensen
504c34ed2c
use shouldPrint to filter out regular expressions from other files
2021-05-10 14:51:13 +02:00
Erik Krogh Kristensen
d6f9e37e39
add printAst.ql support for regular expressions
2021-05-10 13:31:00 +02:00
ihsinme
9e5a38debd
Update DeclarationOfVariableWithUnnecessarilyWideScope.expected
2021-05-10 14:17:40 +03:00
Asger Feldthaus
3e5dc1efb7
JS: More robust hasUnderlyingType
2021-05-10 13:17:25 +02:00
ihsinme
d3c6093f37
Update test.c
2021-05-10 14:16:38 +03:00
ihsinme
c8f2937df9
Update DeclarationOfVariableWithUnnecessarilyWideScope.ql
2021-05-10 14:16:11 +03:00
Tom Hvitved
7f1f2b4dd3
C#: Fix GetHashCode/Equals on EscapingTextWriter
2021-05-10 13:05:51 +02:00
Alex Denisov
dcdd54593e
C++: Adjust user-defined literals test' expectations
2021-05-10 13:03:40 +02:00
Max Schaefer
8f91e9eba0
JavaScript: Model chaining calls in sqlite3.
2021-05-10 10:58:58 +01:00
Rasmus Wriedt Larsen
8afdf26540
Python: Add modeling of idna PyPI package
2021-05-10 11:47:11 +02:00
Asger F
f4e636dcd6
Update javascript/ql/src/semmle/javascript/frameworks/ClassValidator.qll
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-05-10 10:08:10 +01:00
CodeQL CI
097b6e5e33
Merge pull request #5794 from erik-krogh/rxPipe
...
Approved by asgerf
2021-05-10 02:06:34 -07:00
Erik Krogh Kristensen
d913668943
move hasPathWithoutUnmatchedReturn to Configuration.qll
2021-05-10 10:55:33 +02:00
Rasmus Wriedt Larsen
7ed20a8b2c
Python: Add reminder to update docs for new frameworks
2021-05-10 10:55:21 +02:00
Erik Krogh Kristensen
b4e35f54d9
fix typo
2021-05-10 10:48:43 +02:00
Erik Krogh Kristensen
646bf99489
rewrite the qhelp to focus more on documenting unsafe functions
2021-05-10 10:48:40 +02:00
Asger Feldthaus
df5eab33f9
JS: Update relevantTaintSource()
2021-05-10 09:43:33 +01:00
CodeQL CI
b1f28afcbd
Merge pull request #5741 from asgerf/js/more-cheat-sheet
...
Approved by erik-krogh
2021-05-10 01:34:56 -07:00
Mathias Vorreiter Pedersen
474b337eeb
C++: Add change-note.
2021-05-10 10:22:44 +02:00
Mathias Vorreiter Pedersen
c91ed80e6c
C++: Fix false positive by computing range of the converted expression.
2021-05-10 10:12:43 +02:00
Mathias Vorreiter Pedersen
7ac7830973
C++: Add testcase with false positive involving a conversion on the large-expression side of the comparison.
2021-05-10 10:11:31 +02:00
Erik Krogh Kristensen
3fe5dd0f35
add comment about filtering away jQuery from the source
2021-05-10 10:05:18 +02:00
Tom Hvitved
8b465e86e0
Merge pull request #5820 from hvitved/csharp/cfg/constructor-same-compilation
...
C#: Improve CFG for constructors when there are multiple implementations
2021-05-10 09:23:16 +02:00
jorgectf
8665747316
Update sink and sanitizer to match new naming
2021-05-08 18:08:50 +02:00
Dave Bartolomeo
d9f243d18a
Java: Fix QLDoc for Container.toString()
...
Fixes #5828
The QLDoc was just too specific about the default implementation. I've improved the wording.
2021-05-08 11:14:02 -04:00
Hayk Andriasyan
fd88b72101
Delete JSchOSInjection.qhelp
2021-05-08 12:51:15 +04:00
Dave Bartolomeo
773e5f2e2e
Merge remote-tracking branch 'upstream/main' into side-effects
2021-05-07 16:50:48 -04:00
Dave Bartolomeo
187e136ecc
C++: Generate IR side effects for smart pointer indirections
...
When inserting side effect instructions for argument indirections, we now insert side effects for smart pointers as we would for raw pointers. The address operand of the side effect instruction is the smart pointer object, which is a bit odd. However, I'd like to think through the design of a more principled solution before doing additional work.
A few new tests are added to the existing IR tests. In addition, the IR tests now `#include` some of the shared STL headers. I've disabled IR dumps for functions from those headers, since they only get in the way of the test cases we intended.
2021-05-07 16:50:03 -04:00
Dave Bartolomeo
f0a994a570
C++: Fix pointer flow modeling for smart pointer setters
2021-05-07 16:33:15 -04:00
jorgectf
2ad72ad693
Add LDAP framework entry in Frameworks.qll
2021-05-07 22:16:12 +02:00
jorgectf
6159fbea2b
Update functions naming
2021-05-07 22:15:51 +02:00
jorgectf
34b8af30ac
Move structure to LDAP.qll
2021-05-07 22:09:57 +02:00
Dave Bartolomeo
653ef9d257
C++: Improve consistency failure message for multiple MemoryLocations on a memory access.
2021-05-07 16:04:01 -04:00
Dave Bartolomeo
54b9f2175d
C++: Allow annotating IR dumps with Alias Analysis info
...
This commit adds a `PrintAliasAnalysis.qll` module, which can be imported alongside `PrintIR.qll` to annotate those dumps with alias analysis results.
2021-05-07 16:03:11 -04:00
Jorge
c2b96b3a5e
Add documentation to main classes' functions.
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-05-07 21:51:10 +02:00
Geoffrey White
65ac5b862d
Merge pull request #5847 from MathiasVP/improve-wrong-in-detecting-and-handling-memory-allocation-errors
...
Improve wrong in detecting and handling memory allocation errors
2021-05-07 17:39:04 +01:00
Mathias Vorreiter Pedersen
2241d7b359
Merge pull request #5616 from geoffw0/unsigneddiff2
...
C++: Improve cpp/unsigned-difference-expression-compared-zero
2021-05-07 17:58:53 +02:00
Geoffrey White
75edcf0b4f
Merge branch 'main' into unsigneddiff2
2021-05-07 16:35:16 +01:00
Geoffrey White
69468514f0
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-07 16:26:42 +01:00
Geoffrey White
91be483c57
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-07 16:26:36 +01:00
Geoffrey White
fc96c1c400
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-07 16:26:23 +01:00
Geoffrey White
5db6abe2f4
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-07 16:22:48 +01:00
Geoffrey White
894f5d523c
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-05-07 16:19:48 +01:00
Felicity Chapman
10e76ff28f
Merge pull request #5831 from github/3893-code-scanning
...
Update CodeQL CLI article to use different query suite example
2021-05-07 12:37:47 +01:00
Tony Torralba
e78e5b9ee4
Merge branch 'main' into promote-jexl-injection
2021-05-07 12:36:49 +02:00
Mathias Vorreiter Pedersen
fc7d9c2c09
C++: Fix missing result by properly specifying that the function with unknown code actually didn't throw an exception.
2021-05-07 12:34:38 +02:00
Tony Torralba
b37b15cea4
Re-structure imports, add some new comments to tests
2021-05-07 12:33:51 +02:00
Mathias Vorreiter Pedersen
90e8368258
C++: Properly handle conversions in convertedExprMayThrow. This recursive implementation idea is stolen from convertedExprMightOverflow in SimpleRangeAnalysis.
2021-05-07 12:31:43 +02:00
Mathias Vorreiter Pedersen
7adb7b67f2
C++: Add false positive testcase involving conversions.
2021-05-07 12:19:19 +02:00
Anders Schack-Mulligen
8783746516
Merge pull request #5774 from atorralba/promote-xpath-injection
...
Java: Promote XPath Injection query from experimental
2021-05-07 12:04:49 +02:00
Mathias Vorreiter Pedersen
88e6cbaacd
C++: Include Assignments in exprMayThrow and accept test changes.
2021-05-07 11:49:25 +02:00
Mathias Vorreiter Pedersen
80d41d9fe5
C++: Add false positive testcase involving assignments.
2021-05-07 11:48:09 +02:00
Tom Hvitved
ca89560849
C#: Remove unnecessary !
2021-05-07 11:42:53 +02:00
Mathias Vorreiter Pedersen
08fa611700
C++: Avoid calling SwitchCase.getAStmt for performance reasons. This turns out to not be needed as the statements inside the switch case will get picked up by the BlockStmt.getAStmt case already.
2021-05-07 11:18:50 +02:00
Tony Torralba
2a501956b3
Mark a MISSING test result as suggested in code review
2021-05-07 11:17:51 +02:00
Tony Torralba
b69be30b88
Fix imports as suggested in code review
2021-05-07 11:07:06 +02:00
Robert Marsh
9ac55aff0e
C++: One more join order fix
2021-05-06 17:43:28 -07:00
Erik Krogh Kristensen
b53759c5a0
corrections after code review
2021-05-06 22:49:25 +02:00
CodeQL CI
7a7586488a
Merge pull request #5833 from erik-krogh/filterStep
...
Approved by esbena
2021-05-06 13:47:23 -07:00
Erik Krogh Kristensen
be69c3a458
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-05-06 21:59:35 +02:00
Erik Krogh Kristensen
2d1ba59e6d
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-05-06 21:55:30 +02:00
Aditya Sharad
68e53054c6
Merge pull request #5840 from github/henrymercer/update-code-scanning-selectors
...
Update code scanning selectors to include summary metrics and `@kind alert` aliases
2021-05-06 11:51:12 -07:00
Tom Hvitved
fab8400ecd
C#: Escape IDs in TRAP label definitions
2021-05-06 19:12:13 +02:00
alexet
852134023d
Use only bind-out to fix join order.
2021-05-06 18:11:28 +01:00
Mathias Vorreiter Pedersen
856d512aa6
C++: Simplify noThrowInTryBlock.
2021-05-06 18:36:09 +02:00
Mathias Vorreiter Pedersen
7c1720a1d1
C++: Remove NoThrowAllocator and inline its (corrected) definition in ThrowingAllocator.
2021-05-06 18:02:05 +02:00
Mathias Vorreiter Pedersen
5437bd7a41
C++: Fix annotation.
2021-05-06 17:57:57 +02:00
Shati Patel
cf80773453
Merge pull request #5830 from Marcono1234/marcono1234/guides-link-updates
...
Docs: Use GitHub links for guides, improve formatting
2021-05-06 16:44:11 +01:00
Robert Marsh
b3e598c1a7
C++/C#: fix another join order in SSA construction
2021-05-06 08:14:49 -07:00
Robert Marsh
5318aa8ead
C++: autoformat
2021-05-06 08:14:48 -07:00
Robert Marsh
35594eac22
C++: fix bad join order in phi node sharing
2021-05-06 08:14:47 -07:00
Robert Marsh
5406783e9c
C++: autoformat
2021-05-06 08:14:46 -07:00
Robert Marsh
230f4bcae8
C++: accept test changes from IR sharing
2021-05-06 08:14:45 -07:00
Robert Marsh
b2811022d7
C#: sync IR files and update for C++ SSA reuse
2021-05-06 08:14:45 -07:00
Robert Marsh
5d7d26bed1
C++: fixups and file sync for SSA sharing
2021-05-06 08:14:44 -07:00
Robert Marsh
1f69b31239
C++: test changes in annotate_sinks_only
2021-05-06 08:14:43 -07:00
Robert Marsh
195b811422
C++: handle phi operands from unreachable blocks
2021-05-06 08:14:42 -07:00
Robert Marsh
6600436dd9
C++: handle degenerate phi nodes
2021-05-06 08:14:41 -07:00
Robert Marsh
7930c4ab19
C++: tests for phi nodes after unreachable blocks
2021-05-06 08:14:41 -07:00
Dave Bartolomeo
922cf640f4
C++/C#: Add combineOverlap() predicate
2021-05-06 08:14:40 -07:00
Robert Marsh
86b1d032ae
C++: accept test regressions
2021-05-06 08:14:38 -07:00
Robert Marsh
f9e0ba17e0
C++: remove points-to expectations for reused SSA
2021-05-06 08:14:37 -07:00
Robert Marsh
1c72ea97a7
C++: accept phi node reorderings in IR tests
2021-05-06 08:14:37 -07:00
Robert Marsh
8bc7e5993e
autoformat and sync C++ files
2021-05-06 08:14:36 -07:00
Robert Marsh
deff5c3af1
C++: Reuse SSA from earlier stages
...
This refactors the SSA stages of the IR so that instructions which have
a modeled memory result in the unaliased SSA stage do not have SSA
recomputed in the aliased SSA stage.
2021-05-06 08:14:34 -07:00
Robert Marsh
a9d7990596
C++: make unaliased_ssa IR stage sound
2021-05-06 08:14:33 -07:00
Robert Marsh
d95ef89cee
C++: add test for IR alias analysis soundness
2021-05-06 08:14:32 -07:00
Mathias Vorreiter Pedersen
d1eb774737
C++: Remove implied conjunction.
2021-05-06 17:03:42 +02:00
Mathias Vorreiter Pedersen
e0606d61b6
C++: Fix qldoc.
2021-05-06 16:58:49 +02:00
Mathias Vorreiter Pedersen
c12837cff0
C++: Fix false negative.
2021-05-06 16:57:09 +02:00
Mathias Vorreiter Pedersen
7b8a51f995
C++: Add test with missing result.
2021-05-06 16:56:11 +02:00
Mathias Vorreiter Pedersen
47a419a5f1
C++: Respond to review comments. First: Avoid using locations to detect constructor and destructor calls. Second: Include missing statements in stmtMayThrow.
2021-05-06 16:37:26 +02:00
Mathias Vorreiter Pedersen
4463293dc4
C++: Move common code from NewExpr and NewArrayExpr into the NewOrNewArrayExpr class.
2021-05-06 16:35:41 +02:00
Tony Torralba
f16605b3c1
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2021-05-06 15:17:55 +02:00
Mathias Vorreiter Pedersen
167dc86f7a
C++: Accept test changes.
2021-05-06 14:36:35 +02:00
Mathias Vorreiter Pedersen
95e65dec8f
C++: Make sure a CatchBlock that catches a const std::bad_alloc& is also a BadAllocCatchBlock.
2021-05-06 14:35:27 +02:00
Mathias Vorreiter Pedersen
42b8f923be
C++: Call noexcept constructor instead.
2021-05-06 14:30:43 +02:00
Mathias Vorreiter Pedersen
6cdef782c8
Merge branch 'main' into improve-wrong-in-detecting-and-handling-memory-allocation-errors
2021-05-06 13:37:21 +02:00
Mathias Vorreiter Pedersen
420215931c
C++: Rename query.
2021-05-06 13:35:08 +02:00
Mathias Vorreiter Pedersen
d3576b9c92
C++: Accept test changes.
2021-05-06 13:29:28 +02:00
Mathias Vorreiter Pedersen
56d7342398
C++: Improve the cpp/detect-and-handle-memory-allocation-errors query.
2021-05-06 13:29:20 +02:00
Mathias Vorreiter Pedersen
58f3048808
C++: Add more testcases.
2021-05-06 13:15:34 +02:00
Tony Torralba
f1fab854c4
Fix tests for XXE, introduced a dependency with jaxen
2021-05-06 12:11:55 +02:00
Evgenii Protsenko
b1a6394959
C++: SqlPqxxTainted.ql. Change @id in query metadata
2021-05-06 12:36:48 +03:00
Erik Krogh Kristensen
3815797dda
add sanitizers from DOM and jQuery queries
2021-05-06 11:05:03 +02:00
Erik Krogh Kristensen
8ba5bddae8
add jQuery options objects as sources
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
5c37e6a435
add change note
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
7ef641e7b2
add qhelp
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
ee0140e704
share code between unsafe-shell and unsafe-html queries
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
23908f9ec2
remove flowpaths that has a returns without a matching call
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
6e754c70aa
add test for js/html-constructed-from-input
2021-05-06 11:05:02 +02:00
Erik Krogh Kristensen
e86a3b5e57
add js/html-constructed-from-input query
2021-05-06 11:04:49 +02:00
Erik Krogh Kristensen
a400a1e9d4
split the markdown steps into a separate class
2021-05-06 10:44:39 +02:00
Tony Torralba
76468559ba
Add safe example for dom4j
2021-05-06 10:17:25 +02:00
Tony Torralba
926fedb7fb
Update java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-06 09:18:50 +02:00
Tony Torralba
00a7576679
Rename XPath Injection test file
2021-05-06 09:18:50 +02:00
Tony Torralba
8af7f4a484
New sinks and test cases
2021-05-06 09:18:49 +02:00
Tony Torralba
ccb3ea4453
Fix XPath Injection tests classpath
2021-05-06 09:18:49 +02:00
Tony Torralba
509fc8a640
Add missing docs to stubs
2021-05-06 09:18:49 +02:00
Tony Torralba
26c3ff2cee
Move from experimental to standard
2021-05-06 09:18:49 +02:00
Tony Torralba
215118c7ea
Fixes in QLDocs and imports
2021-05-06 09:18:49 +02:00
Tony Torralba
720b5d6da3
Refactored sto use CSV sink model. Also, added more sinks
2021-05-06 09:18:49 +02:00
Tony Torralba
ab62bb66f4
Consider second parameter of Node.selectNodes
2021-05-06 09:18:49 +02:00
Tony Torralba
d72dd9b861
javax.xml.xpath.XPath is an interface
2021-05-06 09:18:49 +02:00
Tony Torralba
2bb2baf6f7
Support more methods that evaluate XPath expressions
2021-05-06 09:18:49 +02:00
Tony Torralba
3705970bfd
Refactored XPath.qll to remove redundant classes and restrict visibility
2021-05-06 09:18:49 +02:00
Tony Torralba
d739a8cac2
Moved configuration from XPath.qll back to XPath Injection query
2021-05-06 09:18:48 +02:00
Tony Torralba
ee269fbc69
Added missing doc comments
2021-05-06 09:18:48 +02:00
Tony Torralba
fb3e56eac8
Fix imports and stubs so that tests pass
2021-05-06 09:18:48 +02:00
Tony Torralba
a62997463f
Remove unused imports; use set literals in hasName
2021-05-06 09:18:48 +02:00
Tony Torralba
ed5619498c
WIP: XPath Injection promotion
2021-05-06 09:18:48 +02:00
Jonathan Leitschuh
67e9f06304
[Java] Fix Kryo FP & Kryo 5 Support
...
Closes #4992
2021-05-05 17:38:34 -04:00
ihsinme
976ccda135
Update DeclarationOfVariableWithUnnecessarilyWideScope.ql
2021-05-05 23:34:21 +03:00
ihsinme
b277082462
Update DeclarationOfVariableWithUnnecessarilyWideScope.qhelp
2021-05-05 23:28:04 +03:00
Evgenii Protsenko
330eaea467
C++: SqlPqxxTainted.ql style fixes
2021-05-05 21:48:14 +03:00
Evgenii Protsenko
955d97f6be
C++: Init SqlPqxxTainted.ql
2021-05-05 21:25:36 +03:00
Henry Mercer
a3c57c43c8
Code Scanning selectors: Include summary metrics
2021-05-05 16:38:39 +01:00
Henry Mercer
74c9994305
Code Scanning selectors: Add alert aliases
2021-05-05 16:36:39 +01:00
Shati Patel
059a5f35fa
Merge pull request #5812 from mario-campos/patch-1
...
Add React Native to JavaScript frameworks docs
2021-05-05 16:03:41 +01:00
Erik Krogh Kristensen
4ac21e9f3f
make the .filter step more precise
2021-05-05 14:53:09 +02:00
Rasmus Wriedt Larsen
d50f22504e
Python: Fix .expected
2021-05-05 14:07:15 +02:00
CodeQL CI
69cd9dfb7d
Merge pull request #5826 from erik-krogh/moreLib
...
Approved by esbena
2021-05-05 04:40:49 -07:00
Felicity Chapman
8b2009cfb1
Minor updates to qhelp file
2021-05-05 12:36:29 +01:00
Rasmus Wriedt Larsen
668bfd3a41
Python: Support EC keygen without class-instance for cryptography
...
I also added a new test to show off how what the origin ends up looking
like... I think it looks ok
2021-05-05 12:29:55 +02:00
Erik Krogh Kristensen
ab53f3b380
add array.filter() as a taint-step
2021-05-05 12:03:14 +02:00
Erik Krogh Kristensen
e333267e69
require that the factory function is in a main module file
2021-05-05 12:00:38 +02:00
Erik Krogh Kristensen
fc3f5adbbb
more source code examples in PackageExports.qll
2021-05-05 11:48:41 +02:00
Erik Krogh Kristensen
28eef264e5
recognize the define(..) call in PackageExports.qll
2021-05-05 11:23:25 +02:00
Jonas Jensen
390ee3a6b8
Merge pull request #5829 from MathiasVP/reorder-get-instruction-opcode
...
C++: Reorder getInstructionOpcode
2021-05-05 11:13:15 +02:00
Erik Krogh Kristensen
3ca670146e
remove outdated comment
2021-05-05 11:10:45 +02:00
Rasmus Wriedt Larsen
3ceb8bbcc6
Python: Add cryptography test for EC
...
Apparently, passing in the class (without instantiating it) is allowed
2021-05-05 10:52:57 +02:00
Rasmus Wriedt Larsen
dc4a0c1d38
Python/JS: Fix typo
2021-05-05 10:13:54 +02:00
Mathias Vorreiter Pedersen
066cdb55d7
C++: Add qldoc explaining column order.
2021-05-05 09:30:12 +02:00
Mathias Vorreiter Pedersen
f03c99ab03
Merge pull request #5835 from hmakholm/hmakholm/pr/blowup-fix
...
CPP: fix semi-unused variables in WrongInDetectingAndHandlingMemoryAllocationErrors.q
2021-05-05 08:15:37 +02:00
Henning Makholm
4964ce347b
CPP: fix semi-unused variables in WrongInDetectingAndHandlingMemoryAllocationErrors.ql
...
The fact that `aex` and `it` was each used in just one disjunct of the
exists() body caused the optimizer to generate perfectly horrible
code, including a pointless cartesian product between them that caused
the evaluation to blow up.
Fix it such that each variable is logically scoped. That makes the
compiler much happier.
2021-05-05 02:31:11 +02:00
CodeQL CI
95f26aadd3
Merge pull request #5681 from yoff/python-support-pathlib
...
Approved by tausbn
2021-05-04 09:20:24 -07:00
Robert Marsh
5ee74d269a
Merge pull request #5822 from MathiasVP/more-cwe-tags-in-code-scanning
...
C++: Add more CWE tags to queries in the Code Scanning suite
2021-05-04 09:01:00 -07:00
Timo Müller
a65481d24b
Apply suggestions from code review more precise help text
2021-05-04 17:30:49 +02:00
Timo Müller
65642df1a0
Apply suggestions from code review for help text
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 17:28:34 +02:00
Timo Mueller
152f4862ec
Reworked the references a bit
2021-05-04 16:10:15 +02:00
Timo Mueller
81363a8843
Some better (and more styleguide compliant) descriptions within the query.
2021-05-04 15:57:47 +02:00
Timo Mueller
f7437422c1
InstanceOf check instead of comparing classnames
2021-05-04 15:51:40 +02:00
Timo Mueller
fd52135f29
Removed unnecessary check for type
2021-05-04 15:45:30 +02:00
Timo Mueller
787a4ede85
Fixed file reference in test cases
2021-05-04 15:33:53 +02:00
Timo Mueller
374ed851a0
Fixed file reference in test cases
2021-05-04 15:12:50 +02:00
Mathias Vorreiter Pedersen
d5793418f9
C++: Remove parent CWE tags.
2021-05-04 14:39:23 +02:00
Timo Müller
c476b6c088
Fix accordance to style guide
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 14:00:01 +02:00
Timo Müller
030e2bdd9b
Fix accordance to style guide
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:59:52 +02:00
Timo Müller
ab308b5e9e
Fix accordance to style guide
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:59:43 +02:00
Timo Müller
485a3a139a
Fixed content to confirm with the style guide
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:58:38 +02:00
Timo Müller
45443baf84
Fixed Typo
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:58:00 +02:00
Timo Müller
1fd2be3879
Added more clear reference
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:57:19 +02:00
Timo Müller
7026d82a72
Fixed typo
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:53:14 +02:00
Timo Müller
f28e994121
Update java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp
...
More descriptive (and PC) description.
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-05-04 13:52:47 +02:00
CodeQL CI
b160badbf6
Merge pull request #5768 from erik-krogh/cacheMore
...
Approved by esbena
2021-05-04 04:16:15 -07:00
Tony Torralba
6e94dc5b85
Autoformatting
2021-05-04 13:15:20 +02:00
Felicity Chapman
616a57d6d4
Update article with code scanning example
2021-05-04 12:11:18 +01:00
Tamás Vajk
05c045070e
Merge pull request #5810 from tamasvajk/feature/culture
...
C#: Use invariant culture in the extractor
2021-05-04 13:09:38 +02:00
Mathias Vorreiter Pedersen
568724bffd
C#: Fix getInstructionOpcode to make sure IRConstruction.qll compiles for C#.
2021-05-04 13:00:40 +02:00
Marcono1234
ab90fe18fd
Docs: Use GitHub links for guides, improve formatting
2021-05-04 12:35:23 +02:00
Mathias Vorreiter Pedersen
ded377bcd2
C++: Reorder getInstructionOpcode to produce better RA.
2021-05-04 12:13:34 +02:00
Tony Torralba
f79d2e06f9
Fix failing checks
2021-05-04 11:29:09 +02:00
Tamas Vajk
c547907784
C#: Use invariant culture in the extractor
2021-05-04 11:17:33 +02:00
Anders Schack-Mulligen
5bcf810a7c
Merge pull request #5821 from JarLob/patch-1
...
Update UncaughtServletException.qhelp
2021-05-04 10:39:02 +02:00
Anders Schack-Mulligen
9ee9186a1a
Merge pull request #5825 from github/yo-h/java-diagnostic-queries
...
Java: split extractor diagnostics query into two
2021-05-04 10:12:32 +02:00
Erik Krogh Kristensen
aaf754ebf5
recognize more library input
2021-05-04 10:06:14 +02:00
Tony Torralba
6b79ca6403
Fix warning
2021-05-04 09:32:03 +02:00
CodeQL CI
6931d9a6f7
Merge pull request #5785 from edvraa/httponlyjs
...
Approved by esbena
2021-05-03 23:14:26 -07:00
luchua-bc
703fbf139a
Add more methods and update the library name
2021-05-04 02:54:49 +00:00
yo-h
edf1a90161
Java: split extractor diagnostics query into two
2021-05-03 20:27:07 -04:00
edvraa
6fa2f1e653
update test message
2021-05-04 00:32:01 +03:00
Jonathan Leitschuh
dfad1fc740
[Java] Add support for com.google.common.base.MoreObjects#firstNonNull
2021-05-03 12:58:00 -04:00
Taus
483199878d
Merge pull request #5793 from RasmusWL/fix-qldoc
...
Python: Minor fix to Django RawSQL QLDoc
2021-05-03 18:18:02 +02:00
Tony Torralba
e68c6e66a5
Remove qlref file
2021-05-03 17:53:37 +02:00
Tony Torralba
745a6f6fb4
Getters called on parameters propagate taint
2021-05-03 17:43:33 +02:00
Mathias Vorreiter Pedersen
2912c2e7f5
C++: Add more CWE tags to queries in the code scanning suite.
2021-05-03 16:58:47 +02:00
Edwin
27c680e28b
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2021-05-03 16:41:09 +03:00
Jaroslav Lobačevski
38bce39baa
Update UncaughtServletException.qhelp
...
There is no single word in https://cwe.mitre.org/data/definitions/600.html about possible DoS or unexpected state.
2021-05-03 15:06:57 +03:00
Tony Torralba
4d5ec87de9
Use InlineTest
2021-05-03 13:27:24 +02:00
Tony Torralba
4bfd34b1fe
Moved from experimental
2021-05-03 13:15:24 +02:00
edvraa
cef845ac47
Support string expressions
2021-05-03 13:46:56 +03:00
Tony Torralba
38e052482c
More csv sinks and sources
2021-05-03 12:44:53 +02:00
edvraa
ea38f0d3bd
a new test for simple flow
2021-05-03 12:19:05 +03:00
edvraa
000826af11
typo
2021-05-03 12:18:43 +03:00
Tom Hvitved
182b2d0457
C#: Improve CFG for constructors when there are multiple implementations
2021-05-03 10:46:36 +02:00
Tom Hvitved
633f228dc2
C#: Add CFG tests for partial classes
2021-05-03 10:23:29 +02:00
Tom Hvitved
bb1cb73675
Merge pull request #5795 from hvitved/csharp/implicit-constructor-inits
...
C#: Extract implicit constructor initializer calls
2021-05-03 10:21:04 +02:00
Tom Hvitved
b77b3da8d6
C#: Add change note
2021-05-03 09:40:13 +02:00
Jonas Jensen
c05ef1225c
Merge pull request #5803 from MathiasVP/no-magic-in-getUnspecifiedType
...
C++: Add nomagic to getUnspecifiedType
2021-05-03 09:03:58 +02:00
edvraa
65183cde80
Move to experimental
2021-05-03 09:59:52 +03:00
edvraa
bd99114cd6
Comments added
2021-05-03 09:55:04 +03:00
luchua-bc
4709e8139d
JPython code injection
2021-05-03 01:43:56 +00:00
edvraa
a24c1c8114
fix comment
2021-05-03 00:36:38 +03:00
edvraa
fa94fedfc3
simple dataflow for sensitive name
2021-05-03 00:36:26 +03:00
edvraa
97bc7e38d2
check for sensitive property name
2021-05-03 00:31:29 +03:00
edvraa
7ab91bb185
Inline getOptionsArgument
2021-05-03 00:09:15 +03:00
ihsinme
bb97507ebc
Update test.c
2021-05-02 22:59:56 +03:00
ihsinme
21f43252e6
Update DeclarationOfVariableWithUnnecessarilyWideScope.expected
2021-05-02 22:59:04 +03:00
ihsinme
0935c5a0f2
Update DeclarationOfVariableWithUnnecessarilyWideScope.ql
2021-05-02 22:58:30 +03:00
ihsinme
8c3980d80b
Update cpp/ql/src/experimental/Security/CWE/CWE-1126/DeclarationOfVariableWithUnnecessarilyWideScope.c
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-05-02 22:54:43 +03:00
Tony Torralba
53e04d0d96
Refactor to CSV sink model
2021-04-30 17:53:43 +02:00
Mario Campos
ae857db657
Add React Native to JavaScript frameworks
...
According to @asgerf, React Native is already supported 🎉
2021-04-30 10:47:08 -05:00
Timo Mueller
c22eeacbfc
Fixed accidential double init of variable
2021-04-30 16:28:56 +02:00
Timo Mueller
61d053f6b3
Fixed missing metadata description
2021-04-30 16:28:17 +02:00
Timo Mueller
15a3068f8a
Added query for insecure environment configuration RMI JMX (CVE-2016-8735)
2021-04-30 16:23:17 +02:00
Chris Smowton
b2c0259197
Merge pull request #5631 from haby0/UseOfLessTrustedSource
...
[Java] CWE-348: Using a client-supplied IP address in a security check
2021-04-30 15:20:53 +01:00
haby0
fdcc517b9f
UseOfLessTrustedSource -> ClientSuppliedIpUsedInSecurityCheck"
2021-04-30 17:43:34 +08:00
haby0
f41301f8f5
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.java
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-30 16:55:17 +08:00
haby0
0691cac5ab
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-30 16:54:41 +08:00
haby0
8142810455
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-30 16:54:28 +08:00
Tom Hvitved
ecd40e5cae
Merge pull request #5808 from intrigus-lgtm/fix-lambda-typos
...
Fix typo.
2021-04-30 09:08:28 +02:00
haby0
711a74c9c9
Eliminate false positives\
2021-04-30 10:31:40 +08:00
intrigus
08731fc6cf
Fix typo.
2021-04-29 20:26:34 +02:00
Jorge
bd4b189373
Polish documentation consistency
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-29 16:26:28 +02:00
Chris Smowton
ad9ea40954
Merge pull request #5597 from intrigus-lgtm/java/jwt-insecure-parse
...
[Java] JWT without signature check.
2021-04-29 14:41:11 +01:00
Geoffrey White
c4069362ce
Merge pull request #5804 from MathiasVP/improve-detect-and-handle-memory-allocation-errors
...
C++: Improve qhelp and tests for cpp/detect-and-handle-memory-allocation-errors
2021-04-29 14:34:41 +01:00
haby0
e813257431
use hardCode
2021-04-29 21:23:52 +08:00
Anders Schack-Mulligen
404a6c1506
Merge pull request #5805 from smowton/smowton/admin/spring-setter-method-docs
...
Document `SpringProperty::getSetterMethod`.
2021-04-29 15:10:58 +02:00
Anders Schack-Mulligen
c78285e557
Merge pull request #5784 from Marcono1234/marcono1234/switch-expr-stmt-parent
...
Java: Add StmtParent as superclass of SwitchExpr
2021-04-29 15:02:05 +02:00
Tom Hvitved
c3890a9435
C#: Adjust CFG for instance constructors
2021-04-29 14:05:42 +02:00
Tom Hvitved
ee62522c51
C#: Extract implicit constructor initializer calls
2021-04-29 14:05:42 +02:00
Mathias Vorreiter Pedersen
c67ab8f1f0
C++: Respond to review comments.
2021-04-29 14:01:04 +02:00
Chris Smowton
2787c2f874
Document SpringProperty::getSetterMethod.
2021-04-29 12:28:26 +01:00
Mathias Vorreiter Pedersen
e81b40978e
C++: Improve the description tag.
2021-04-29 12:10:29 +02:00
Arthur Baars
6693c5bdd0
Merge pull request #5395 from tausbn/python-share-typetracker
...
Python: Make the type tracking implementation shareable
2021-04-29 12:06:12 +02:00
Mathias Vorreiter Pedersen
9e39b08325
C++: Improve the qhelp for cpp/detect-and-handle-memory-allocation-errors.
2021-04-29 11:58:36 +02:00
Mathias Vorreiter Pedersen
44de127bff
C++: Extend and improve the testcases for cpp/detect-and-handle-memory-allocation-errors.
2021-04-29 11:57:43 +02:00
Rasmus Wriedt Larsen
af0723c185
Merge pull request #5656 from asgerf/js/files-diagnostics
...
JS: Add file diagnostics queries
2021-04-29 11:53:11 +02:00
CodeQL CI
84d43946de
Merge pull request #5755 from RasmusWL/non-alert-data-part1
...
Approved by tausbn
2021-04-29 02:51:34 -07:00
jorgectf
213d011a8c
Edit code example in CompiledRegex
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-29 11:10:03 +02:00
Mathias Vorreiter Pedersen
39c7816ede
C++: Dont allow magic in getUnspecifiedType.
2021-04-29 10:09:46 +02:00
Tom Hvitved
0cb826a511
Merge pull request #5797 from hvitved/cpp/has-multi-scope-node-noinline
...
C++: Do not inline `Dominance::hasMultiScopeNode`
2021-04-29 09:51:05 +02:00
CodeQL CI
3240536d0e
Merge pull request #5798 from erik-krogh/trackLoc
...
Approved by esbena
2021-04-29 00:45:21 -07:00
Aditya Sharad
4d2db08934
Merge pull request #5801 from github/aeisenberg/fix-codescanning
...
Actions: Fix code scanning workflow
2021-04-28 15:21:43 -07:00
Andrew Eisenberg
0376a13dd8
Actions: Fix code scanning workflow
2021-04-28 15:05:13 -07:00
intrigus
a8865e2fa2
Java: Cleanup jwt stubs.
2021-04-28 20:46:09 +02:00
Erik Krogh Kristensen
dfd63e5d5a
track window object to where .location is read
2021-04-28 18:52:00 +02:00
Shati Patel
d288b9216e
Merge pull request #5790 from github/cklin-find-the-thief-conditions-sync
...
Fix inconsistency in the find-the-thief exercise
2021-04-28 17:16:58 +01:00
CodeQL CI
9c5ad44e27
Merge pull request #5782 from erik-krogh/domFP
...
Approved by esbena
2021-04-28 09:12:00 -07:00
Rasmus Lerchedahl Petersen
16bde2729d
Python: add flow from methods to calls
2021-04-28 17:02:24 +02:00
Tom Hvitved
058925cca9
C++: Do not inline Dominance::hasMultiScopeNode
2021-04-28 16:50:08 +02:00
yoff
73521e22de
Merge pull request #5791 from tausbn/python-limit-absolute-imports
...
Python: Limit absolute imports
2021-04-28 16:22:08 +02:00
Tom Hvitved
c35a2b959a
Python: Update data-flow caching
2021-04-28 14:49:05 +02:00
Tom Hvitved
e8347c2c20
C++: Update data-flow caching
2021-04-28 14:49:05 +02:00
Erik Krogh Kristensen
902a4368a1
assume that all pipe elements that return something, return outputs
2021-04-28 12:36:07 +02:00
Erik Krogh Kristensen
2f14a6218a
generalize RxJS pipes
2021-04-28 12:26:02 +02:00
Rasmus Wriedt Larsen
baa926359e
Python: Minor fix to Django RawSQL QLDoc
2021-04-28 12:18:27 +02:00
Rasmus Wriedt Larsen
8b9c5f8228
Python/JS: Remove "Only added to aid with internal rewrite"
2021-04-28 11:50:06 +02:00
Erik Krogh Kristensen
d5450f1df6
use isWildcardLike in MetacharEscapeSanitizer
2021-04-28 11:46:50 +02:00
Erik Krogh Kristensen
d07c71c99d
unlimited repetition of a wildcard is also a wildcard
2021-04-28 11:46:35 +02:00
Erik Krogh Kristensen
160fa148f1
move InfiniteRepetitionQuantifier to Regexp.qll
2021-04-28 11:39:28 +02:00
Erik Krogh Kristensen
e60628d463
add global replacements using inverted char classes as a sanitizer for DOM based XSS
2021-04-28 11:29:30 +02:00
Rasmus Wriedt Larsen
f2b4e31e7f
Python: Make Diagnostics tests pass
...
I had comitted a bad .expected file it seems, and since the encoding for UTF-8
is named differently from Python 2 to Python 3, we're only going to run the test
for one version.
2021-04-28 10:21:59 +02:00
Tamás Vajk
310baab73f
Merge pull request #5740 from tamasvajk/feature/diag
...
C#: Add extraction error diagnostic query
2021-04-28 08:46:35 +02:00
haby0
b0f745365d
Node type restriction
2021-04-28 14:32:25 +08:00
Taus
4ae3a23089
Python: Limit absolute imports
...
Limits the behaviour of github/codeql#5614 in two ways:
First, we only consider files that are contained in the source archive.
This prevents unnecessary computation involving files in e.g. the
standard library.
Secondly, we ignore any relative imports (e.g. `from .foo import ...`),
as these only work inside packages anyway.
This fixes an observed performance regression on projects that include
`google-cloud-sdk` as part of their source code.
2021-04-27 21:47:38 +00:00
CodeQL CI
2b9fb79b1d
Merge pull request #5786 from erik-krogh/anser
...
Approved by esbena
2021-04-27 14:40:48 -07:00
Chuan-kai Lin
c27363cea5
Fix inconsistencies in information about the thief
...
The find-the-thief exercise is inconsistent. The first part lists 10 answered questions about the thief, but later discussion silently adds a new question as question 8, so there are a total of 11 answered questions.
This commit updates the first list of answered questions so that it matches later discussions and the sample solution.
2021-04-27 13:57:16 -07:00
Mathias Vorreiter Pedersen
0f141edbc3
Merge pull request #5737 from dbartol/dbartol/smart-pointers/work
...
C++: IR Alias Analysis for smart pointers
2021-04-27 21:40:14 +02:00
jorgectf
21e01b809f
Add code example in CompiledRegex
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:42 +02:00
jorgectf
8a800986a2
Remove unused class variables
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:42 +02:00
jorgectf
20b532ec5e
Update to-cast sink's naming
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:41 +02:00
Jorge
c0c71c509c
Apply suggestions from code review
...
Update `RegexExecution` docs and use `flowsTo()` instead of `getALocalSource()`.
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-27 19:54:41 +02:00
jorgectf
c4322848ec
Polish qhelp
2021-04-27 19:54:40 +02:00
jorgectf
12ccd7e3b6
Update .expected
2021-04-27 19:54:39 +02:00
jorgectf
05ee853c4e
Remove wrong comment
2021-04-27 19:54:39 +02:00
jorgectf
3fae3fd93e
Take ApiGraphs out of Concepts.qll
2021-04-27 19:54:39 +02:00
jorgectf
6a20a4dcc3
Add newline to qhelp
2021-04-27 19:54:38 +02:00
jorgectf
d968eea914
Move expected to /test
2021-04-27 19:54:38 +02:00
jorgectf
81d23c066c
Move tests and qlref from /src to /test
2021-04-27 19:54:37 +02:00
jorgectf
d401d18e71
Add .expected and qlref
2021-04-27 19:54:36 +02:00
jorgectf
ec85ee4537
Sink's predicate typo
2021-04-27 19:54:36 +02:00
jorgectf
03825a6052
Add comment to Sink's predicates
2021-04-27 19:54:36 +02:00
jorgectf
fc27c6c547
Fix RegexExecution ambiguity
2021-04-27 19:54:35 +02:00
jorgectf
3655514924
Fix ambiguity
2021-04-27 19:54:35 +02:00
jorgectf
b6721971dd
Improve code comments
2021-04-27 19:54:35 +02:00
jorgectf
d4a89b2fd8
Fix qhelp typo while converting to python's regex injection
2021-04-27 19:54:34 +02:00
jorgectf
d49c23fe67
Improve tests' readability
2021-04-27 19:54:34 +02:00
jorgectf
0e169ba10e
Format qhelp
2021-04-27 19:54:33 +02:00
jorgectf
c54f08f33a
Improve qhelp
2021-04-27 19:54:33 +02:00
jorgectf
66ee67a781
Polished select statement
2021-04-27 19:54:32 +02:00
jorgectf
f75110365f
Fix Sink utilization in select
2021-04-27 19:54:32 +02:00
jorgectf
a5850f4a99
Use getRegexModule to know used lib
2021-04-27 19:54:31 +02:00
jorgectf
e78e2ac266
Get rid of (get)regexMethod
2021-04-27 19:54:30 +02:00
jorgectf
18ce257fc8
Move RegexInjectionSink to query config (qll)
2021-04-27 19:54:29 +02:00
jorgectf
53d61c4fb6
Use custom Sink
2021-04-27 19:54:29 +02:00
jorgectf
36cc7b5e3f
Fix CompiledRegex
2021-04-27 19:54:28 +02:00
jorgectf
35f1c45d32
Change from Attribute to DataFlow::CallCfgNode in getRegexMethod()
2021-04-27 19:54:28 +02:00
jorgectf
c127b109d0
Create re.compile().ReMethod test
2021-04-27 19:54:27 +02:00
jorgectf
be09ffec3f
Create RegexEscape Range
2021-04-27 19:54:27 +02:00
jorgectf
805f86a5cf
Polish RegexEscape
2021-04-27 19:54:26 +02:00
jorgectf
3d990c5950
Get back to ApiGraphs
2021-04-27 19:54:26 +02:00
jorgectf
30554a16da
Format
2021-04-27 19:54:24 +02:00
jorgectf
ee1d2b645b
Delete DirectRegex and CompiledRegex
2021-04-27 19:54:24 +02:00
jorgectf
ce23db2e9c
Move Sanitizer to ReEscapeCall
2021-04-27 19:54:23 +02:00
jorgectf
b5ea41fcca
Fix CompiledRegex
2021-04-27 19:54:22 +02:00
jorgectf
d61adccd3c
Take main Concepts.qll out of the PR
2021-04-27 19:54:22 +02:00
jorgectf
a1a3c98d92
Undo main Concepts.qll change
2021-04-27 19:54:21 +02:00
jorgectf
28fdeba4fa
Structure development
2021-04-27 19:54:20 +02:00
jorgectf
444a15a461
Polish imports
2021-04-27 19:54:20 +02:00
Jorge
0f20eeb395
Apply suggestions
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-27 19:54:19 +02:00
Jorge
b27b77c38f
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-27 19:54:18 +02:00
Jorge
249e4097e3
Change query ID
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-27 19:54:17 +02:00
jorgectf
b207929e0a
RegexExecution restructuring
2021-04-27 19:54:16 +02:00
jorgectf
3daec8e6a2
Enclose Sinks and ReMethods in a module
2021-04-27 19:54:15 +02:00
jorgectf
caaf5436c6
Attempt to restructuring ReMethods and RegexExecution's modules
2021-04-27 19:54:14 +02:00
jorgectf
6d5a0f2f84
Limit Sanitizer to re.escape(arg)
2021-04-27 19:54:13 +02:00
jorgectf
a1b5cc3bc6
Typo
2021-04-27 19:54:13 +02:00
jorgectf
e4736d064e
Typo
2021-04-27 19:54:12 +02:00
jorgectf
f45307f990
Apply rebase
2021-04-27 19:54:12 +02:00
jorgectf
5dae920783
Edit filenames to match consistent naming
2021-04-27 19:54:11 +02:00
jorgectf
63f708dd57
Apply suggestions
2021-04-27 19:54:10 +02:00
Jorge
6cc714464c
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-27 19:54:09 +02:00
jorgectf
21f8135fa6
Move to experimental folder
2021-04-27 19:54:08 +02:00
jorgectf
afc4f51e9c
Remove CWE references
2021-04-27 19:54:07 +02:00
jorgectf
bd3d2ec686
Update to match consistent naming across languages
2021-04-27 19:54:07 +02:00
jorgectf
7adc3c2fba
Upload ReDoS query, qhelp and tests
2021-04-27 19:54:05 +02:00
edvraa
5eb96c1e45
Remove Class cast
2021-04-27 20:26:29 +03:00
Tom Hvitved
bd0a196a39
Java: Update data-flow caching
2021-04-27 19:06:39 +02:00
Tom Hvitved
befc80b3cb
C#: Update data-flow caching
2021-04-27 19:06:39 +02:00
Tom Hvitved
914184f3dd
Data flow: Sync files
2021-04-27 19:06:39 +02:00
Tom Hvitved
0c8886967b
Data flow: Cache nodeIsHidden
2021-04-27 19:05:11 +02:00
Tom Hvitved
1112c0f994
Data flow: Cache ParameterNode
2021-04-27 19:05:11 +02:00
Tom Hvitved
7d4feaca2f
Data flow: Cache ArgumentNode
2021-04-27 19:05:11 +02:00
Tom Hvitved
ade99c2c2b
Data flow: Cache Cast(ing)Node
2021-04-27 19:05:11 +02:00
Tom Hvitved
346af4f97a
Data flow: Cache ReturnNodeExt
2021-04-27 19:05:10 +02:00
Tom Hvitved
9738de2cb9
Data flow: Cache OutNodeExt
2021-04-27 19:05:10 +02:00
Tom Hvitved
23113c4ff7
Data flow: Cache isUnreachableInCall
2021-04-27 19:05:10 +02:00
Tom Hvitved
1bf0e01a83
Data flow: Cache clearsContent
2021-04-27 19:05:10 +02:00
Tom Hvitved
4009c01558
Data flow: Cache readStep
2021-04-27 19:05:10 +02:00
Tom Hvitved
96aa182893
Data flow: Cache jumpStep
2021-04-27 19:05:10 +02:00
Tom Hvitved
8bfeae768f
Data flow: Cache simpleLocalFlowStep
2021-04-27 19:05:10 +02:00
Tom Hvitved
1a56f0b79c
Data flow: Cache getNodeType
2021-04-27 19:05:10 +02:00
Tom Hvitved
044c92016b
Data flow: Cache enclosing callable predicates
2021-04-27 19:05:09 +02:00
Tom Hvitved
37377644c9
Merge pull request #5781 from hvitved/java/predictable-seed-df6
...
Java: Use separate data-flow copy for `PredictableSeedFlowConfiguration`
2021-04-27 19:01:55 +02:00
Andrew Eisenberg
c6db90e9b7
Merge pull request #5775 from aeisenberg/aeisenberg/codeql-action-main
...
Actions: Use the main branch of the codeql action
2021-04-27 09:36:33 -07:00
Tamás Vajk
4cc88662e2
Merge pull request #5557 from tamasvajk/feature/java-sinks-csv
...
Java: convert sinks to CSV
2021-04-27 15:58:09 +02:00
Erik Krogh Kristensen
9178f4b1c5
add support for the anser library
2021-04-27 15:57:17 +02:00
Tamas Vajk
51e08d4940
Fix error severity
2021-04-27 15:47:16 +02:00
edvraa
3aec9c1a41
Cookies without HttpOnly
2021-04-27 16:28:32 +03:00
Marcono1234
05ce49adaf
Java: Add StmtParent as superclass of SwitchExpr
...
Database type `@stmtparent` already includes `@switchexpr`, this commit merely
changes the class SwitchExpr to also accordingly extend StmtParent.
2021-04-27 15:17:55 +02:00
Tamas Vajk
5b79094f34
Fix naming in HTTPS URL check
2021-04-27 14:59:52 +02:00
Rasmus Wriedt Larsen
523ed8272d
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-04-27 14:42:05 +02:00
yoff
0509a12790
Merge pull request #5770 from tausbn/python-small-api-graph-fix
...
Python: Use only `TApiNode` in `API::Impl`
2021-04-27 14:06:09 +02:00
Geoffrey White
afa89256c5
Merge pull request #5780 from MathiasVP/cleanup-missingGuard-predicates-after-range-analysis-fix
...
C++: Cleanup missingGuardAgainstOverflow
2021-04-27 12:56:10 +01:00
Chris Smowton
64a2320be7
Merge pull request #5757 from smowton/smowton/admin/fix-dead-qhelp-links
...
Fix all dead qhelp links
2021-04-27 12:17:08 +01:00
Tom Hvitved
2e266c7ddd
Merge pull request #5756 from hvitved/csharp/string-builder-fluent
...
C#: Add missing `StringBuilder` flow summaries
2021-04-27 11:24:56 +02:00
Tom Hvitved
fb606112fa
Merge pull request #5754 from hvitved/csharp/guards/performance
...
C#: Improve performance of guards library
2021-04-27 10:53:01 +02:00
Tamas Vajk
e08b629cb5
Add documentation for URL opening sinks
2021-04-27 10:32:41 +02:00
Tom Hvitved
017beb6786
Java: Use separate data-flow copy for PredictableSeedFlowConfiguration
2021-04-27 10:07:33 +02:00
CodeQL CI
79ed94b22c
Merge pull request #5779 from erik-krogh/updateJSAndTSVersionDoc
...
Approved by esbena
2021-04-27 00:51:58 -07:00
Mathias Vorreiter Pedersen
04a785b9fb
C++: Accept test changes.
2021-04-27 09:43:27 +02:00
Mathias Vorreiter Pedersen
a41e9055c5
C++: Delete the fix that was introduced in bb447d7174. This is no longer needed after #5678 .
2021-04-27 09:43:02 +02:00
Mathias Vorreiter Pedersen
05d693e3bb
C++: Also include the assignment versions in exprThatCanOverflow.
2021-04-27 09:41:13 +02:00
Rasmus Wriedt Larsen
37db21d269
Merge pull request #5284 from yoff/python-port-insecure-protocol
...
Python: port py/insecure-protocol
2021-04-27 09:30:18 +02:00
ihsinme
0c3e2b9ab7
Update test.c
2021-04-27 10:11:32 +03:00
Erik Krogh Kristensen
0b322a3143
update JS/TS versions to reflect supported versions
2021-04-27 08:53:15 +02:00
haby0
5be9fbbc5a
Remove LogOperationSink and PrintSink
2021-04-27 14:12:33 +08:00
ihsinme
c31a761750
Add files via upload
2021-04-26 23:05:08 +03:00
ihsinme
b7de370918
Add files via upload
2021-04-26 23:04:08 +03:00
Andrew Eisenberg
0e53ad33f6
Actions: Add permissions block to code scanning workflow
2021-04-26 10:53:29 -07:00
Geoffrey White
0e7eeb3051
Merge pull request #5678 from MathiasVP/sound-expr-might-overflow-predicate
...
C++: Make exprMightOverflowPositively sound for unanalyzable expressions
2021-04-26 17:38:23 +01:00
Andrew Eisenberg
3670c729c0
Actions: Use the main branch of the codeql action
...
This commit switches to the bleeding edge, main branch of the
codeql action. This helps us test the action before merging all
of the new changes into main, which occurs roughly once a week.
If there are commits that introduce bugs in codeql-action, then
we will be more likely to catch it before releasing to the world
if we are using it in this extension.
2021-04-26 08:43:28 -07:00
Taus
3889c8afec
Python: Use only TApiNode in API::Impl
...
This ensures that changes to `API::Node` does not invalidate the cached
`module Impl`. At present, I don't expect this to have any effect (as
the `Node` class is also fairly static, though not explicitly cached),
but I can imagine us making some of the `Node` methods have
user-extensible behaviour, in which case we definitely do not want this
to result in reevaluation of `API::Impl`.
2021-04-26 13:10:15 +00:00
Shati Patel
a09c12acfe
Merge pull request #5537 from alexet/ambig-super
...
Docs: Update the language specification for changes to super.
2021-04-26 13:34:50 +01:00
Hayk Andriasyan
7455b1b4f0
Update JSchOSInjectionSanitized.java
2021-04-26 15:17:57 +04:00
p0wn4j
3d891f0b39
[Java] CWE-078: Add JSch OS command injection sink
2021-04-26 18:20:32 +04:00
Chris Smowton
d717fc7b1f
Use Microsoft archive of vijaysk's blog
2021-04-26 10:13:04 +01:00
Tom Hvitved
824c243268
C#: Add change note
2021-04-26 10:50:17 +02:00
Mathias Vorreiter Pedersen
772d5eacca
C++: Add change note.
2021-04-26 09:55:32 +02:00
Erik Krogh Kristensen
4e8ae77b6f
cache more predicates
2021-04-26 08:57:20 +02:00
ihsinme
98f7f70814
Add files via upload
2021-04-25 22:35:40 +03:00
ihsinme
50c63a88c3
Add files via upload
2021-04-25 22:34:41 +03:00
ihsinme
c1d125b378
Add files via upload
2021-04-25 22:25:17 +03:00
ihsinme
f2b2300da9
Add files via upload
2021-04-25 22:23:31 +03:00
intrigus
b1a3633495
Java: Remove redundant condition + docs.
2021-04-23 22:06:04 +02:00
Rasmus Lerchedahl Petersen
7cc97836a9
Python: More cleanup from reviewer suggestions
2021-04-23 20:26:13 +02:00
Chris Smowton
78b9682a4e
Fix dead links in JS externs too
2021-04-23 15:46:48 +01:00
Tamás Vajk
a7030c7fed
Merge pull request #5308 from tamasvajk/feature/flow-sources-sinks
...
C#: Add Console.Read* to local flow sources
2021-04-23 16:36:16 +02:00
Tamás Vajk
c3058f4744
Merge pull request #5749 from tamasvajk/feature/fix-fromsource
...
C#: Adjust 'fromSource' to hold only on files passed to the compiler as a source file
2021-04-23 16:35:40 +02:00
Chris Smowton
455b840712
Fix all dead qhelp links
...
For those documents with no obvious new home I've pointed the links to the Internet Archive.
2021-04-23 15:20:21 +01:00
Tom Hvitved
004450b201
C#: Add missing StringBuilder flow summaries
2021-04-23 16:17:49 +02:00
Mathias Vorreiter Pedersen
86822f6c61
C++: Exclude pointer results from cpp/integer-overflow-tainted.
2021-04-23 16:01:53 +02:00
Mathias Vorreiter Pedersen
3cf4f1f956
C++: Accept test changes.
2021-04-23 16:00:23 +02:00
Shati Patel
6f2103f312
Merge pull request #5722 from github/tamasvajk-patch-1
...
C#: Add Dapper to supported frameworks
2021-04-23 14:32:22 +01:00
Jonas Jensen
9b5bb95766
Merge pull request #5696 from jbj/reapply-inconsistency-workaround
...
Revert "Revert "C++: Work around extractor issue CPP-383""
2021-04-23 14:49:32 +02:00
Asger Feldthaus
0da0670a79
JS: Add Nest.js to list of supported framworks
2021-04-23 13:15:35 +01:00
Asger Feldthaus
71e3041370
JS: Fewer spurious reflected xss sinks
2021-04-23 13:15:35 +01:00
Asger Feldthaus
4f53a1ab40
JS: Cache ClassNode::Range
2021-04-23 13:15:35 +01:00
Asger Feldthaus
d0b8b32345
JS: Add change notes
2021-04-23 13:15:35 +01:00
Asger Feldthaus
671e968936
JS: Model NestJS
2021-04-23 13:15:35 +01:00
Anders Schack-Mulligen
bc8c55836a
Merge pull request #5743 from aschackmull/java/flow-summary-tweaks
...
Java/C#: Move a couple of flow summary tweaks to the shared implementation.
2021-04-23 13:46:04 +02:00
Tamas Vajk
1b4c3c7415
Fix code review findings
2021-04-23 13:44:34 +02:00
Tamás Vajk
819be43ce7
Fix alphabetical order of supported frameworks
2021-04-23 13:41:59 +02:00
Tamas Vajk
b4bd7af9c8
Add change note
2021-04-23 13:40:12 +02:00
Tamas Vajk
e3f10c0e32
Cleanup DiagnosticError classes
2021-04-23 13:37:42 +02:00
Rasmus Wriedt Larsen
deb3db3f95
Python: Add non-alert data for extractor diagnostics
...
This is basically just a port of the C++/JS queries added in:
- https://github.com/github/codeql/pull/5414 (C++)
- https://github.com/github/codeql/pull/5656 (JS)
SyntaxError should capture all errors we have information about. At least in
`python/ql/src/semmlecode.python.dbscheme` the only match for `error` is
`py_syntax_error_versioned` (which `SyntaxError` is based on).
2021-04-23 13:29:44 +02:00
Rasmus Wriedt Larsen
354dee1b09
Python: Add non-alert data for lines of code
...
`py/summary/lines-of-code` is just a port of the C++/JS queries added in:
- https://github.com/github/codeql/pull/5271 (C++)
- https://github.com/github/codeql/pull/5304 (JS)
We are the first to implement the `lines-of-user-code` query, so nothing to
compare with in other languages -- but it makes a lot of sense to do for Python 👍
2021-04-23 13:22:18 +02:00
Asger Feldthaus
109d1ad27f
JS: Model fs.promises
2021-04-23 11:59:48 +01:00
Asger Feldthaus
822d4525af
JS: Drive-by change in LogInjection
2021-04-23 11:59:48 +01:00
Asger Feldthaus
ad12f383d9
JS: Reduce reliance on RouteHandler in Express model
2021-04-23 11:59:48 +01:00
Tamás Vajk
43dc9bbc94
Merge pull request #5744 from tamasvajk/feature/java-loc
...
Java: Introduce LoC summary metric query
2021-04-23 11:39:42 +02:00
Mathias Vorreiter Pedersen
e6077127be
C++: Only unary and binary arithmetic operations and left shifts are now
...
reported as overflowing when we cannot analyze them.
2021-04-23 11:13:34 +02:00
Tom Hvitved
956507b5fa
C#: Add guards stress test
2021-04-23 10:25:31 +02:00
yoff
1954c0ba84
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-04-23 10:20:18 +02:00
Tom Hvitved
4c597dd467
C#: Improve performance of guards library
2021-04-23 10:09:43 +02:00
Jonas Jensen
6de5b3021e
C++: Replace Jira ticket reference with GH issue
2021-04-23 09:58:39 +02:00
Jonas Jensen
6e059ea002
C++: Remove reference to obsolete issue CPP-383
2021-04-23 09:58:15 +02:00
Shati Patel
96a4d91a6c
Merge pull request #5731 from shati-patel/docs/unbind-pragmas
...
Docs: New "directional binding" pragmas
2021-04-23 08:37:02 +01:00
intrigus
98dcd4e52b
Java: Tighten definition of sink.
2021-04-23 00:14:48 +02:00
CodeQL CI
635fb4c25a
Merge pull request #5685 from erik-krogh/markdownIt
...
Approved by asgerf
2021-04-22 14:55:31 -07:00
intrigus
a385b30c29
Java: Factor common expr into class.
2021-04-22 23:51:27 +02:00
intrigus-lgtm
958e2fab05
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-22 23:36:17 +02:00
Dave Bartolomeo
3b04bedee0
Stub out additional bits of Alias model for C#
2021-04-22 17:19:00 -04:00
Dave Bartolomeo
5d0a4cae90
C++: Add {AllAliased} side effects for smart pointers
...
Smart pointer constructors, assignments, and `reset()` can actually have fairly large side effects, especially with custom deleters, destructors for objects being destroyed, and so on. I've re-introduced `{AllAliased}` side effects for these functions. There was no immediate effect on analysis results.
2021-04-22 16:51:36 -04:00
Taus
3e4ff9e472
Merge pull request #5742 from RasmusWL/django-3.2
...
Python: Add support for new features in Django 3.2
2021-04-22 17:39:02 +02:00
Rasmus Wriedt Larsen
f9383a31bf
Python: Fix BrokenCryptoAlgorithm.qhelp
2021-04-22 15:58:28 +02:00
Rasmus Wriedt Larsen
222c087e8c
Python: Remove type-tracking performance workaround
...
Since we shouldn't need it anymore (yay)
2021-04-22 15:31:49 +02:00
Rasmus Wriedt Larsen
b82209964a
Python: Add change-note for new weak crypto queries
2021-04-22 15:23:42 +02:00
Rasmus Wriedt Larsen
fc1a6d0e32
Python: Say salting is not part of py/weak-sensitive-data-hashing
2021-04-22 15:23:41 +02:00
Rasmus Wriedt Larsen
ac83c695ad
Python: Add py/weak-sensitive-data-hashing query
2021-04-22 15:23:41 +02:00
Rasmus Wriedt Larsen
499adc26a3
Python: Extend SensitiveDataSource tests
...
Now it contains all the sort of things we actually support 👍
2021-04-22 15:23:40 +02:00
Rasmus Wriedt Larsen
794a86a6b0
Python: Add SensitiveDataSource
2021-04-22 15:23:39 +02:00
Rasmus Wriedt Larsen
56c409737d
Python: Port py/weak-cryptographic-algorithm
...
The other query (py/weak-sensitive-data-hashing) is added in future commit
2021-04-22 15:23:38 +02:00
Rasmus Wriedt Larsen
59edd18c34
Python: Move framework test-files out of experimental
...
This PR was rebased on newest main, but was written a long time ago when all the
framework test-files were still in experimental. I have not re-written my local
git-history, since there are MANY updates to those files (and I dare not risk
it).
2021-04-22 15:23:37 +02:00
Rasmus Wriedt Larsen
1616975e06
Python: Model hashlib from standard library
2021-04-22 15:23:37 +02:00
Rasmus Lerchedahl Petersen
5a4e661e60
Merge branch 'main' of github.com:github/codeql into python-support-pathlib
2021-04-22 15:04:21 +02:00
CodeQL CI
bdb41423e2
Merge pull request #5748 from asgerf/js/rate-limiting-fixes
...
Approved by erik-krogh
2021-04-22 05:56:50 -07:00
Rasmus Wriedt Larsen
7ffbfa8043
Python: Expand stdlib md5 tests with keyword-arguments
2021-04-22 14:51:20 +02:00
Rasmus Wriedt Larsen
fa88f22453
Python: Model hashing operations in cryptography package
2021-04-22 14:51:20 +02:00
Rasmus Wriedt Larsen
c5f826580b
Python: Model encrypt/decrypt in cryptography package
...
I introduced a InternalTypeTracking module, since the type-tracking code got so
verbose, that it was impossible to get an overview of the relevant predicates.
(this means the "first" type-tracking predicate that is usually private, cannot
be marked private anymore, since it needs to be exposed in the private module.
2021-04-22 14:51:19 +02:00
Rasmus Wriedt Larsen
bf6f5074c2
Python: Port cryptodome tests to crypto
...
I don't know if this is really a smart test-setup... I feel a bit stupid when
doing this xD
2021-04-22 14:51:19 +02:00
Rasmus Wriedt Larsen
f8254381f3
Python: Add MISSING: CryptographicOperationAlgorithm annotations
...
For RSA it's unclear what the algorithm name should even be. Signatures based on
RSA private keys with PSS scheme is ok, but with pkcs#1 v1.5 they are
weak/vulnerable. So clearly just putting RSA as the algorithm name is not enough
information...
and that problem is also why I wanted to do this commit separetely (to call
extra atten to this).
2021-04-22 14:51:18 +02:00
Rasmus Wriedt Larsen
23140dfb76
Python: Add CryptographicOperation modeling for Cryptodome
2021-04-22 14:51:17 +02:00
Rasmus Wriedt Larsen
1b2ed9d99a
Python: Align cryptodome tests
2021-04-22 14:51:16 +02:00
Rasmus Wriedt Larsen
2c0df8e656
Python: Add MD5 tests
2021-04-22 14:51:16 +02:00
Rasmus Wriedt Larsen
a8de2aba3b
Python: Move CryptoAlgorithms implementation
2021-04-22 14:51:15 +02:00
Rasmus Wriedt Larsen
65c8d9605e
Python: Add CryptographicOperation Concept
...
I considered using `getInput` like in JS, but things like signature verification
has multiple inputs (message and signature).
Using getAnInput also aligns better with Decoding/Encoding.
2021-04-22 14:51:14 +02:00
Rasmus Wriedt Larsen
d18fbb7f07
Python: Add working tests of AES and RC4
2021-04-22 14:51:14 +02:00
Rasmus Wriedt Larsen
cf64701bcb
Python: Move weak-crypto-algorithm tests to own folder
2021-04-22 14:51:13 +02:00
Tamas Vajk
ed42c878b0
Adjust 'fromSource' to hold only on '.cs' files
2021-04-22 14:17:16 +02:00
Tamas Vajk
b36d35bf1e
Revert "C#: Adjust 'fromSource' to hold only on files passed to the compiler as a source file"
...
This reverts commit 1dab1590ea .
2021-04-22 14:16:10 +02:00
haby0
407dcea751
add String type startsWith
2021-04-22 19:20:54 +08:00
haby0
1712d01b74
Merge branch 'UseOfLessTrustedSource' of https://github.com/haby0/codeql into UseOfLessTrustedSource
2021-04-22 19:02:23 +08:00
haby0
9b4442be8b
Fix some errors
2021-04-22 19:01:55 +08:00
haby0
aaef4ef22b
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-22 18:52:55 +08:00
Tamás Vajk
cb28bc80b7
Merge branch 'main' into feature/java-sinks-csv
2021-04-22 11:41:18 +02:00
Tamas Vajk
7134eb9079
Improve documentation of csv sink models
2021-04-22 11:37:41 +02:00
Mathias Vorreiter Pedersen
2b8afe55e8
Merge pull request #5747 from rdmarsh2/rdmarsh2/cpp/deprecate-return-stack-allocated-object
...
C++: deprecate cpp/return-stack-allocated-object
2021-04-22 11:37:07 +02:00
Tamas Vajk
1caa5c4780
Adjust hostname verifier sink identifier name
2021-04-22 11:22:18 +02:00
Tamas Vajk
6c78a247f2
Revert erroneous refactoring in header splitting sink base class
2021-04-22 11:20:39 +02:00
Tamas Vajk
9b1c54e81b
Add argument indices to HTTP header splitting sinks
2021-04-22 11:17:25 +02:00
Tamas Vajk
180904e9f6
Revert "Java: Convert Google HTTP client API parseAs sink to CSV format"
...
This reverts commit 3e53484bb3 .
2021-04-22 11:14:51 +02:00
Owen Mansel-Chan
fea9f5f431
Merge pull request #5746 from owen-mc/java/refactor-exec-tainted
...
Make ExecTainted easier to extend
2021-04-22 10:14:28 +01:00
Tamas Vajk
a8a920c8f0
Add change note
2021-04-22 11:01:12 +02:00
Owen Mansel-Chan
8a01799fb8
Make imports private
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-04-22 09:46:49 +01:00
Rasmus Lerchedahl Petersen
b724e51cab
Python: Improvements from review suggestions
2021-04-22 10:40:42 +02:00
Owen Mansel-Chan
4b8d4f5bbd
Update docs
2021-04-22 09:30:50 +01:00
Owen Mansel-Chan
e448dcb725
Avoid bad join order
...
We want to avoid joining on `i` first.
2021-04-22 09:30:49 +01:00
Owen Mansel-Chan
9f1704560b
Include constructors in abstract class
2021-04-22 09:30:48 +01:00
Tamas Vajk
1dab1590ea
C#: Adjust 'fromSource' to hold only on files passed to the compiler as a source file
2021-04-22 10:21:28 +02:00
Tamas Vajk
1a708affbf
Include compilation errors in diagnostic check
2021-04-22 10:08:33 +02:00
Asger Feldthaus
d2646ea4ad
JS: More consistent section capitalization
2021-04-22 09:06:44 +01:00
Asger Feldthaus
0dceabe704
JS: Reference specific section of cheat sheet
2021-04-22 09:06:09 +01:00
Tamas Vajk
64354bbfaa
Fix test results after rebase
2021-04-22 09:23:59 +02:00
Tamas Vajk
ff9327a035
Add diagnostic query to get correctly extracted files
2021-04-22 09:21:46 +02:00
Tamas Vajk
b05e211e21
Fix failing test
2021-04-22 09:21:45 +02:00
Tamas Vajk
353d43a039
Log model errors even in standalone extraction
2021-04-22 09:13:06 +02:00
Tamas Vajk
5149ffdd16
C#: Add extraction error diagnostic query
2021-04-22 09:13:06 +02:00
edvraa
ade238307f
Add a test
2021-04-22 10:02:06 +03:00
Tamás Vajk
9c936867fa
Exclude code from XML files
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2021-04-22 09:00:31 +02:00
Tamás Vajk
a7cc9f98ef
Merge pull request #5745 from tamasvajk/feature/fix-arg-default
...
C#: Fix special case of default argument value extraction
2021-04-22 08:58:13 +02:00
edvraa
86444bfa09
Use set literal expression
2021-04-22 09:48:46 +03:00
edvraa
9774b24c4e
Use TypeString
2021-04-22 09:44:07 +03:00
haby0
454324781d
delete IfStmt
2021-04-22 11:59:33 +08:00
Robert Marsh
cac1bef6ea
C++: deprecate cpp/return-stack-allocated-object
2021-04-21 15:17:31 -07:00
Asger Feldthaus
fe8deeaf6b
JS: Autoformat
2021-04-21 23:13:57 +01:00
Dave Bartolomeo
383210096c
C++: Isolate models from AST dataflow's reference/object conflation
...
`DataFlowFunction` models treat references a pointers - an explicit level of indirection. The AST dataflow library generally treats references as if they were the referred-to object. This commit removes a workaround in the dataflow model for unary `operator*` on smart pointers, and makes the AST dataflow library adjust the results of querying the model so that a returned reference only gets flow that was modeled as going to the dereference of the return value.
This fixes some missing flow in IR dataflow, and recovers some (presumably) missing reverse taint flow in AST taint tracking as well.
2021-04-21 18:09:44 -04:00
Asger Feldthaus
e98bfe921e
JS: QLDoc
2021-04-21 22:14:50 +01:00
Asger Feldthaus
bb7934b381
JS: Change note
2021-04-21 21:20:12 +01:00
Asger Feldthaus
c113cfd8b7
JS: Autoformat
2021-04-21 21:13:07 +01:00
Dave Bartolomeo
0bc4b0421d
C++: Remove unnecessary cast
2021-04-21 12:12:01 -04:00
Rasmus Wriedt Larsen
5a9e27c6fc
Merge branch 'main' into django-3.2
2021-04-21 17:15:47 +02:00
Chris Smowton
76091f0f8d
Use ArrayElement accessor where needed
2021-04-21 15:58:41 +01:00
Chris Smowton
2c95b7539f
Remove now-redundant steps
2021-04-21 15:57:09 +01:00
Chris Smowton
874733a61b
Argument -> specific Argument indices
2021-04-21 15:53:55 +01:00
Chris Smowton
fce1d6122f
Add change note
2021-04-21 15:47:20 +01:00
Chris Smowton
6589460357
Add models for Commons ToStringBuilder
...
These don't include support for reflectionToString yet, which is coming up in a subsequent PR.
2021-04-21 15:47:19 +01:00
Chris Smowton
94f0a1532d
Merge pull request #5682 from smowton/smowton/docs/fix-has-modifier-comment
...
Fix documentation of Modifier.qll
2021-04-21 15:41:29 +01:00
Tamas Vajk
a0f5e45ae9
C#: Fix special case of default argument value extraction
2021-04-21 16:34:29 +02:00
Geoffrey White
ba335089c4
Merge pull request #5601 from ihsinme/ihsinme-patch-259
...
CPP: Add query for CWE-691 Insufficient Control Flow Management After Refactoring The Code
2021-04-21 15:13:38 +01:00
Owen Mansel-Chan
9c72e73a82
Make ExecTainted easier to extend
...
To add a method that executes a command, you can now define a class
extending ExecMethod.
2021-04-21 14:55:37 +01:00
CodeQL CI
30d7f0dc98
Merge pull request #5687 from RasmusWL/inline-taint-tests
...
Approved by yoff
2021-04-21 06:24:12 -07:00
Taus
71780228ae
Python: Rename TypeTrackerPrivate.qll
2021-04-21 13:08:26 +00:00
Asger Feldthaus
2c9a6e7bef
JS: Cache function-wrapping steps in type-tracking stage
2021-04-21 13:45:58 +01:00
Tamas Vajk
e25305e3cc
Java: Introduce LoC summary metric query
2021-04-21 14:27:00 +02:00
Anders Schack-Mulligen
f9599da32d
Java/C#: Move a couple of flow summary tweaks to the shared implementation.
2021-04-21 14:24:15 +02:00
Rasmus Wriedt Larsen
be9cbd79d6
Python: Add change-note for Django 3.2 support
2021-04-21 13:58:34 +02:00
Rasmus Wriedt Larsen
59c6f76457
Python: Add test for new response.headers in Django
...
See https://docs.djangoproject.com/en/3.2/ref/request-response/#setting-header-fields
2021-04-21 13:55:22 +02:00
Rasmus Wriedt Larsen
2302c8d5fa
Python: Model new alias method on django QuerySets
2021-04-21 13:52:38 +02:00
yoff
a19373ab54
Merge pull request #5727 from tausbn/python-use-localsource-in-stepsummary
...
Python: Use `LocalSourceNode` in `StepSummary::step`
2021-04-21 13:50:31 +02:00
Tamás Vajk
205469316c
Merge pull request #5738 from tamasvajk/feature/loc
...
C# Add line of code metric query
2021-04-21 13:49:32 +02:00
Taus
489e1e94e4
Python: Prevent bad joins
...
Adds a few unbinds to prevent bad joins from occurring.
Firstly, we never want to join `StepSummary::step` with
`TypeTracker::append` on `summary` as the first join, as the resulting
relation is absolutely massive. So we decouple the two occurrences of
`summary` by unbinding each of them.
Secondly, in some cases the node we're stepping to (`nodeTo` for type
trackers, `nodeFrom` for type backtrackers) will get joined eagerly
with the typetracker one is defining, and again this produces an
uncomfortably large intermediate join. A bit of unbinding prevents this
as well.
2021-04-21 11:44:34 +00:00
Taus
9e95f6e7c1
Python: Remove typePreservingStep
...
This requires a bit of explanation, so strap in.
Firstly, because we use `LocalSourceNode`s as the start and end points
of our `StepSummary::step` relation, there's no need to include
`simpleLocalFlowStep` (via `typePreservingStep`) in `smallstep`. Indeed,
since the successor node for a `step` is a `LocalSourceNode`, and local
sources never have incoming flow, this is entirely futile -- we can find
values for `mid` and `nodeTo` that satisfy the body of `step`, but
`nodeTo` will never be a `LocalSourceNode`.
With this in mind, we can simplify `smallstep` to only refer to
`jumpStep`.
This then brings the other uses of `typePreservingStep` into question.
The only other place we use this predicate is in the `TypeTracker` and
`TypeBackTracker` `smallstep` predicates. Note, however, that here we
no longer need `jumpStep` to be part of `typeTrackingStep` (as it is
already accounted for in `StepSummary::smallstep`) so we can simplify
to `simpleLocalFlowStep`. At this point, `typePreservingStep` is unused.
Finally, because of the way `smallstep` is used in `step` (inside
`StepSummary`), `nodeTo` must always be a `LocalSourceNode`, so I have
propagated this restriction to `smallstep` as well. We can always lift
this restriction later, but for now it seems like it's likely to cause
fewer surprises to have made this explicit.
2021-04-21 11:12:06 +00:00
asgerf
226792c73a
JS: Expand RemoteFlowSource and move into own section
2021-04-21 12:04:09 +01:00
asgerf
5df8583056
JS: Mention isUserControlledObject
2021-04-21 11:40:27 +01:00
asgerf
ff73c0b247
JS: Add section with access paths to cheat sheet
2021-04-21 11:40:27 +01:00
edvraa
452ec8c43f
comments
2021-04-21 13:12:53 +03:00
edvraa
13655b5d80
Add RegExUtils
2021-04-21 13:08:35 +03:00
asgerf
f611d06ed0
JS: Add getALocalUse to cheat sheet
2021-04-21 10:53:10 +01:00
Rasmus Wriedt Larsen
08e86fdfe5
JS: Make CredentialsFunctionName use nameIndicatesSensitiveData
...
Someone from JS team needs to verify that this is actually OK.
2021-04-21 11:38:52 +02:00
Rasmus Wriedt Larsen
e977d6eb75
JS: Rewrite to use notSensitiveRegexp
2021-04-21 11:36:39 +02:00
Rasmus Wriedt Larsen
b9a1a1fd5c
JS: Rewrite to use nameIndicatesSensitiveData
...
I added this predicate mostly because it was nice with an easy shortcut for it,
but also since I spotted the `CredentialsFunctionName` not checking agaisnt the
regexps in `notSensitive`, which looked suspicious. So the main goal of adding
`nameIndicatesSensitiveData` is that you don't accidentially forget to ensure
that the name doesn't match against `notSensitve`.
2021-04-21 11:36:38 +02:00
Rasmus Wriedt Larsen
b6f8e5057b
JS: Rewrite to use SensitiveDataClassification::password (and like)
2021-04-21 11:36:17 +02:00
Rasmus Wriedt Larsen
94fec5f8b7
JS: Rewrite to use SensitiveDataClassification
2021-04-21 11:34:02 +02:00
Rasmus Wriedt Larsen
0d08718f08
JS: Adapt SensitiveActions to use shared lib
...
Although there are warnings for the new deprecated classes/predicates, the test
in javascript/ql/test/library-tests/SensitiveActions/ passes 👍
2021-04-21 11:34:01 +02:00
Rasmus Wriedt Larsen
775ed41592
Python: Update SensitiveDataHeuristics with newer JS version
...
which also prompted me to rewrite the QLDoc for `nameIndicatesSensitiveData`
2021-04-21 11:34:01 +02:00
Rasmus Wriedt Larsen
16b62486e9
Python: Extract SensitiveDataHeuristics to be shared with JS
...
Initially I had called `nameIndicatesSensitiveData` for `maybeSensitiveName`,
which made the relationship with `maybeSensitive` and `notSensitive` quite
strange -- and therefore I added the more informative `maybeSensitiveRegexp` and
`notSensitiveRegexp`.
Although I'm no longer using `maybeSensitiveName`, and I no longer have a strong
argument for making this name change, I still like it. If someone thinks this is
a terrible idea, I'm happy to change it though 👍
2021-04-21 11:31:28 +02:00
Tamas Vajk
2a6f979ce6
C# Add line of code metric query
2021-04-21 10:42:06 +02:00
Anders Schack-Mulligen
9362ae0687
Merge pull request #5422 from tamasvajk/feature/sink-migration-ldap
...
Java: Migrate LDAP injection sinks to CSV format
2021-04-21 10:05:28 +02:00
Rasmus Wriedt Larsen
63a2657aef
Merge branch 'main' into inline-taint-tests
2021-04-21 10:02:55 +02:00
Tom Hvitved
7080b256fb
Merge pull request #5715 from hvitved/csharp/ssa/perf-tweaks
...
C#: A few minor SSA performance tweaks
2021-04-21 09:59:12 +02:00
Tom Hvitved
def62e8c22
Merge pull request #5718 from hvitved/csharp/hardcoded-cred-remove-cp
...
C#: Remove CP from `HardcodedCredentials::getCredentialSink`
2021-04-21 09:58:56 +02:00
Tom Hvitved
1ed11b297b
Merge pull request #5725 from hvitved/csharp/dataflow/performance
...
C#: Various data-flow performance tweaks
2021-04-21 09:46:15 +02:00
haby0
84f00c21df
update IfConditionSink.
2021-04-21 15:38:41 +08:00
Dave Bartolomeo
1d0cb0407d
Merge from main
2021-04-20 23:37:04 -04:00
Dave Bartolomeo
b9da6ce04a
C++: Prepare for merge of smart pointer models
2021-04-20 23:12:05 -04:00
Dave Bartolomeo
a447b049fc
C++: Impoved alias analysis of smart pointers
2021-04-20 19:42:06 -04:00
Dave Bartolomeo
63fe4fb317
C++: More general model for pointer flow
2021-04-20 19:41:15 -04:00
Dave Bartolomeo
078d2522d2
C++: Add missing shared_ptr<T> members
2021-04-20 19:40:36 -04:00
Dave Bartolomeo
45968efd28
C++: Add shared test headers to emulate standard library types
2021-04-20 18:21:50 -04:00
intrigus
231b07795c
Java: Ignore results in test directories.
2021-04-20 23:25:13 +02:00
intrigus
fcaf5e7657
Java: Plural type name -> singular type name.
2021-04-20 23:09:44 +02:00
intrigus
3acec94773
Java: Fix typos.
2021-04-20 23:04:06 +02:00
intrigus
149c4491ce
Java: Simplify qldoc.
2021-04-20 23:03:10 +02:00
intrigus
9e4fa90f6e
Java: Refer to Java types in qldoc instead of ql types.
2021-04-20 23:02:18 +02:00
intrigus
26502881d7
Java: Consistently use this in charpred.
2021-04-20 22:56:58 +02:00
yoff
0c4181178d
Update python/ql/src/semmle/python/frameworks/Stdlib.qll
...
Co-authored-by: Taus <tausbn@github.com >
2021-04-20 22:15:09 +02:00
yoff
ef0ea247c4
Merge pull request #5679 from tausbn/python-fix-bad-points-to-joins
...
Python: Fix bad points-to joins
2021-04-20 21:19:32 +02:00
Asger Feldthaus
02707f0777
JS: informational -> info
2021-04-20 19:51:16 +01:00
Dave Bartolomeo
5085e462b0
C++: Allow alias propagation to/from side effects (part 1)
2021-04-20 14:09:41 -04:00
Dave Bartolomeo
01a95316c2
C++: Add Instruction::getAParameterSideEffect().
2021-04-20 14:03:48 -04:00
Rasmus Lerchedahl Petersen
6408ee2eaf
Python: Fix bad join
2021-04-20 20:03:06 +02:00
Tom Hvitved
3eba5b0aac
Merge pull request #5676 from hvitved/csharp/dispatch/get-a-viable-overrider-perf
...
C#: Speedup `DispatchMethodOrAccessorCall::getAViableOverrider()`
2021-04-20 19:57:59 +02:00
Erik Krogh Kristensen
357e1c0802
Update javascript/ql/src/semmle/javascript/frameworks/Markdown.qll
...
Co-authored-by: Asger F <asgerf@github.com >
2021-04-20 19:57:47 +02:00
yo-h
00137f2905
Merge pull request #5721 from github/yo-h/java-diagnostic-queries
...
Java: add extractor `diagnostic` queries
2021-04-20 13:36:49 -04:00
Shati Patel
98a0959784
Docs: New "directional binding" pragmas
2021-04-20 18:12:35 +01:00
Rasmus Lerchedahl Petersen
fc2c62350e
Python: Fix bad join
...
Also fixed up the QLDoc
2021-04-20 18:54:03 +02:00
Asger Feldthaus
9f8a9b9cad
JS: Add taint source/sink summary queries
2021-04-20 17:10:31 +01:00
Taus
890f96d9b5
Python: Prevent bad joins in TypeBackTracker
...
Perhaps unsurprisingly, the join orderer was eager and willing to find
the wrong join order in this predicate as well. Applying a similar
fix to the one used in `TypeTracker::step` fixes the problem.
2021-04-20 15:01:04 +00:00
Taus
c0569da65c
Python: Move track/backtrack to LocalSourceNode
...
This is merely making explicit what was implicitly enforced. The move
to change the return type of `step` already meant that `this` and
`result` had to be `LocalSourceNode`. By moving these methods to their
rightful place, we should hopefully avoid a bit of suprising behaviour.
2021-04-20 14:39:56 +00:00
Taus
2a07441c19
Python: ModuleVariableNodes are not API uses
...
This caused some suprising test changes, where suddenly we had flow from
a `ModuleVariableNode` (as a `RemoteFlowSource`) to a sink. This of
course makes little sense, so instead we simply exclude these nodes as
uses in the first place.
2021-04-20 14:33:42 +00:00
Rasmus Lerchedahl Petersen
9c893cb0f4
Merge branch 'main' of github.com:github/codeql into python-port-insecure-protocol
2021-04-20 16:33:03 +02:00
Taus
7581cbade6
Python: Fix forgotten type tracker
...
This was the last remaining type tracker that did not use
`LocalSourceNode`.
2021-04-20 14:32:56 +00:00
Tamas Vajk
583513bafd
Fix review findings
2021-04-20 16:28:47 +02:00
Asger Feldthaus
43ca8ea5f7
JS: Fix perf issue in forwardsParameter
2021-04-20 15:15:12 +01:00
Chris Smowton
a5cfdd2cfe
Merge pull request #5467 from p0wn4j/groovy-execute
...
[Java] CWE-094: Query to detect Groovy Code Injections
2021-04-20 14:49:56 +01:00
Erik Krogh Kristensen
62dfd1fa7d
improve the markdown-it model
2021-04-20 15:23:03 +02:00
Taus
38548c9acd
Python: Simplify charpred for LocalSourceNode
...
The somewhat convoluted `comes_from_cfgnode` was originally introduced
in order to have local sources for instances of global variables. This
was needed because global variables have an implicit "scope entry" SSA
definition that flows to the first actual use of the variable (and so
would not fit the strict "has no incoming flow" definition of a local
source node).
However, a subsequent change means that we include all global variable
reads anyway, and so the old definition is no longer needed.
(See commit 3fafb47b16 for further
context.)
2021-04-20 13:19:36 +00:00
Taus
038bf612be
Python: Add change note
2021-04-20 13:06:30 +00:00
Jonas Jensen
f02c86cb22
Merge pull request #5726 from MathiasVP/fix-false-positive-in-return-stack-allocated-memory-2
...
C++: Fix false positive in return stack allocated memory (second attempt)
2021-04-20 15:05:11 +02:00
Taus
a55b43b67e
Python: Use LocalSourceNode throughout step
...
This commit does a lot of stuff all at once, so here are the main
highlights:
In `TypeTracker.qll`, we change `StepSummary::step` to step only between
source nodes. Because reads and writes of global variables happen in two
different (jump) steps, this requires the intermediate
`ModuleVariableNode` to _also_ be a `LocalSourceNode`, and we therefore
modify the charpred for that class accordingly. (This also means
changing a few of the tests to account for these new source nodes.)
In addition, we change `TypeTracker::step` to likewise step between
local source nodes.
Next, to enable the use of the `track` convenience method on nodes, we
add some pragmas to `TypeTracker::step` that prevent bad joins from
occurring. With this, we can eliminate all of the manual type tracker
join predicates.
Next, we observe that because `StepSummary::step` now uses `flowsTo`, it
automatically encapsulates all local-flow steps. In particular this
means we do not have to use `typePreservingStep` in `smallstep`, but can
use `jumpStep` directly. A similar observation applies to
`TypeTracker::smallstep`.
Having done this, we no longer need `typePreservingStep`, so we get rid
of it.
2021-04-20 12:59:33 +00:00
Taus
31bd701bd5
Python: Final LocalSourceNode fixes
2021-04-20 12:59:33 +00:00
Chris Smowton
9bfb0d93ca
Autoformat QL
2021-04-20 13:59:09 +01:00
Rasmus Wriedt Larsen
897105de02
Merge pull request #5717 from tausbn/python-use-api-graphs-in-django
...
Python: Use API graphs in Django model
2021-04-20 14:57:55 +02:00
Erik Krogh Kristensen
19c5889775
use mayHaveBooleanValue
2021-04-20 14:39:54 +02:00
Erik Krogh Kristensen
13d915927b
add change note
2021-04-20 14:39:54 +02:00
Erik Krogh Kristensen
7046f1a902
add taint-step for markdown-it when the HTML flag is set
2021-04-20 14:39:54 +02:00
Taus
76700d17d6
Merge pull request #5684 from RasmusWL/flask-more-taint-tests
...
Python: Add taint tests for .get() in flask
2021-04-20 14:08:08 +02:00
Asger Feldthaus
f8d428cb2d
JS: Use function-forwarding steps when tracking rate limiters
2021-04-20 13:00:42 +01:00
Mathias Vorreiter Pedersen
93e55e2631
C++: Fix FP in cpp/return-stack-allocated-memory.
2021-04-20 13:58:12 +02:00
Mathias Vorreiter Pedersen
1797b6c7f9
C++: Add FP test from the work on smart pointers in dataflow.
2021-04-20 13:54:57 +02:00
Asger Feldthaus
581f4ed757
JS: Generalize handling of route handler wrapper functions
2021-04-20 12:46:40 +01:00
Chris Smowton
0ec3ee29e4
Style last use of SecureASTCustomizer
2021-04-20 12:44:49 +01:00
Hayk Andriasyan
bb58a50503
Update GroovyInjection.qhelp
2021-04-20 15:41:58 +04:00
p0wn4j
f2de440886
[Java] CWE-094: Query to detect Groovy Code Injections
2021-04-20 19:18:24 +04:00
haby0
3e376f95c4
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:36:16 +08:00
haby0
b1ee864ad9
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:35:52 +08:00
haby0
9e87f4ec4e
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:35:34 +08:00
haby0
408dd31d3c
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:34:37 +08:00
haby0
9ece4dac0f
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:33:47 +08:00
haby0
d82878ac3b
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:33:06 +08:00
haby0
0b1637a409
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:32:39 +08:00
haby0
b60bffaf83
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-20 19:31:59 +08:00
Jonas Jensen
d4fdd50e2c
Merge pull request #5723 from MathiasVP/cleanup-smart-ptr-model
...
C++: Simplify smart pointer model
2021-04-20 13:25:02 +02:00
Tom Hvitved
dd1bb18938
C#: Various data-flow performance tweaks
...
- Cache `DataFlowCall::getEnclosingCallable()`.
- Cache `ParameterNode`.
- Cache `ArgumentNode`.
- Force proper join-orders for uses of `getNodeType()`.
- Inline `localFlow` to prevent calculating full TC.
2021-04-20 11:56:25 +02:00
Tom Hvitved
1f9239089f
Merge pull request #5695 from hvitved/csharp/dispose-not-called-on-exc-perf
...
C#: Improve performance of `DisposeNotCalledOnException.ql`
2021-04-20 11:52:18 +02:00
Tom Hvitved
b2a7a3ed30
Merge pull request #5674 from hvitved/csharp/ssa/call-graph-perf
...
C#: Improve performance of `SsaImpl::CallGraph::SimpleDelegateAnalysis`
2021-04-20 11:51:52 +02:00
Geoffrey White
2b7e599dc4
Merge pull request #5703 from MathiasVP/improve-access-of-memory-location-after-end-of-buffer-using-strncat
...
C++: Improve cpp/access-memory-location-after-end-buffer-strncat
2021-04-20 10:44:24 +01:00
Mathias Vorreiter Pedersen
61d4d17225
C++: Simplify smart pointer model and accept test changes.
2021-04-20 09:57:58 +02:00
Tamás Vajk
408954e4d8
C#: Add Dapper to supported frameworks
2021-04-20 09:30:47 +02:00
haby0
0053158884
update qhelp file and ql comments
2021-04-20 10:58:54 +08:00
yo-h
87cd72496c
Java: add extractor diagnostic queries
2021-04-19 15:34:16 -04:00
yo-h
cb524b6c19
Merge pull request #5611 from github/yo-h/java16
...
Java: adjust test `options` for JDK 16 upgrade
2021-04-19 15:12:23 -04:00
Taus
bc6685aa3f
Python: Fix typo
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-19 19:57:35 +02:00
Anders Schack-Mulligen
5458c02cc2
Merge pull request #5456 from aschackmull/java/adopt-flow-summary
...
Java: Use shared flow summary library for CSV models.
2021-04-19 16:21:10 +02:00
Anders Schack-Mulligen
33db0c13cd
Merge pull request #5689 from github/aeisenberg/rework-staleness
...
Actions: Change staleness calculation
2021-04-19 15:57:41 +02:00
Tom Hvitved
9128ec72ad
C#: A few minor SSA performance tweaks
2021-04-19 15:51:14 +02:00
Anders Schack-Mulligen
80eb0a2df6
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-19 15:45:58 +02:00
CodeQL CI
437bba1e3c
Merge pull request #5716 from erik-krogh/vscodeRegress
...
Approved by esbena
2021-04-19 06:30:02 -07:00
Tom Hvitved
15e4b7f95d
C#: Remove CP from HardcodedCredentials::getCredentialSink
2021-04-19 15:03:11 +02:00
haby0
0159956fa5
Fix Modify the ql query (the qhelp part is not modified).
2021-04-19 21:03:01 +08:00
Rasmus Wriedt Larsen
d607c13ab6
Python: Taint tests: include elment for forgotten MISSING
2021-04-19 15:01:42 +02:00
haby0
8296abcea8
Fix Modify the ql query (the qhelp part is not modified).
2021-04-19 20:59:47 +08:00
Rasmus Wriedt Larsen
9585390941
Python: Taint tests, report error location first
...
To better match the standard output from inline expectation tests
2021-04-19 14:59:47 +02:00
Rasmus Wriedt Larsen
b2cb284ff2
Python: Add more examples of what is ok with new taint tests
2021-04-19 14:56:20 +02:00
Anders Schack-Mulligen
7d84cfacef
Java: Add MapKeyContent and MapValueContent.
2021-04-19 14:06:27 +02:00
Anders Schack-Mulligen
39862740e0
Java: Convert support for fluent interfaces.
2021-04-19 14:06:27 +02:00
Anders Schack-Mulligen
579c955892
Java: Adjust some tests.
2021-04-19 14:06:27 +02:00
Anders Schack-Mulligen
175c71221a
Java: Adjust some test output with more edges/nodes.
2021-04-19 14:06:27 +02:00
haby0
23b508c5e7
Merge remote-tracking branch 'upstream/main' into UseOfLessTrustedSource
2021-04-19 20:05:49 +08:00
Anders Schack-Mulligen
60965b0d8c
Java: Adjust some csv models.
2021-04-19 14:02:19 +02:00
Anders Schack-Mulligen
a27dac029f
Java: Use shared flow summary library for csv models.
2021-04-19 14:02:19 +02:00
Chris Smowton
36abf8733e
Merge pull request #5714 from aschackmull/java/add-misc-qltests
...
Java: Add a few qltests
2021-04-19 13:00:10 +01:00
Taus
9acc71a7cb
Python: Get rid of all _attr methods in Django.qll
2021-04-19 11:54:10 +00:00
Erik Krogh Kristensen
9e6f28e335
fix bad join order in Xss.qll
2021-04-19 13:17:49 +02:00
Anders Schack-Mulligen
29aec0d770
Java: Adjust expected output.
2021-04-19 13:16:46 +02:00
Anders Schack-Mulligen
c5193cf03f
Apply suggestions from code review
2021-04-19 13:14:56 +02:00
Anders Schack-Mulligen
06514159be
Java: Add XXE tests.
2021-04-19 10:58:21 +02:00
Anders Schack-Mulligen
daad62c4e0
Java: Add TaintedPath test.
2021-04-19 10:07:03 +02:00
Jonas Jensen
1ab75eb6f4
Merge pull request #5708 from github/fix-id-in-JsonpInjection-1
...
Java: Fix id in experimental JsonpInjection.ql query
2021-04-19 08:23:34 +02:00
yoff
118840dad4
Merge pull request #5690 from tausbn/python-disallow-post-update-nodes-as-local-source-nodes
...
Python: Disallow `PostUpdateNode` as `LocalSourceNode`
2021-04-19 06:56:11 +02:00
ihsinme
c2d97b98e2
Merge branch 'main' into ihsinme-patch-259
2021-04-18 21:01:56 +03:00
Mathias Vorreiter Pedersen
e36b42a03f
Java: Fix invalid id in experimental query
...
The invalid id broke CI here: https://github.com/github/codeql/pull/5703 (see https://github.slack.com/archives/CPSEA0G22/p1618602834224600 )
2021-04-17 09:47:15 +02:00
edvraa
29e320627f
Regex injection
2021-04-16 23:29:08 +03:00
Taus
f3661c34ee
Python: Clean up Django models using API graphs
...
First sweep. Takes care of most of the models.
2021-04-16 19:53:36 +00:00
Mathias Vorreiter Pedersen
95742aec69
C++: Accept test changes for the other experimental query in the directory. This is only a change in line numbers.
2021-04-16 21:29:17 +02:00
Mathias Vorreiter Pedersen
64f8316a6d
C++: Tidy up the ql file and accept test changes.
2021-04-16 21:22:13 +02:00
Mathias Vorreiter Pedersen
1e327289b2
C++: Add false negative test.
2021-04-16 18:38:51 +02:00
Mathias Vorreiter Pedersen
50abb6e3a1
C++: Cleanup test.c
2021-04-16 17:32:44 +02:00
Shati Patel
5c2bf68a05
Merge pull request #5692 from tamasvajk/feature/doc-cs9
...
Update supported C#/.NET versions
2021-04-16 16:22:06 +01:00
Jonas Jensen
f8d45f04ed
Revert "Revert "C++: Work around extractor issue CPP-383""
...
**Revert the revert** of the workaround for CFG issues when a
`FunctionCall` has a `getTarget` that does not exist. While we've fixed
the main cause of the problem, it can apparently still happen in rare
cases as a result of extractor crashes.
This reverts commit ee5eaef5e4 .
2021-04-16 16:44:58 +02:00
Tom Hvitved
40b74167e0
C#: Improve performance of DisposeNotCalledOnException.ql
2021-04-16 14:34:16 +02:00
Rasmus Wriedt Larsen
3c8ea167c4
Merge pull request #5668 from tausbn/python-use-api-graphs-in-fabric
...
Python: Use API graphs in Fabric model
2021-04-16 14:27:55 +02:00
Rasmus Wriedt Larsen
6ed1016bb8
Merge pull request #5669 from tausbn/python-use-api-graphs-for-invoke
...
Python: Use API graphs for Invoke
2021-04-16 14:27:19 +02:00
Taus
92b4eb7f02
Python: Cleanup and more explanation
...
Goes into some detail about the intended semantics of local source nodes
and `flowsTo`.
2021-04-16 11:54:20 +00:00
Geoffrey White
e1028a2765
Merge pull request #5667 from MathiasVP/use-range-analysis-in-overflow
...
C++: Use range analysis in Overflow.qll
2021-04-16 12:00:28 +01:00
Taus
5c79ad2412
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-16 11:38:29 +02:00
Taus
af0c32c01d
Python: Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-16 11:35:12 +02:00
Anders Schack-Mulligen
605f28f741
Merge pull request #5686 from smowton/haby0/JsonHijacking
...
Java: JSONP Injection w/cleanups
2021-04-16 11:09:17 +02:00
Tom Hvitved
946fcf1c82
C#: Speedup DispatchMethodOrAccessorCall::getAViableOverrider()
...
In addition to improved performance, the analysis no longer applies a closed-world
assumption to type parameters. That is, if the type of a receiver is a type parameter,
then the call may target any method of a compatible receiver type, not just the
types that actually instantiate the type parameter.
2021-04-16 10:43:17 +02:00
Tamas Vajk
b0975bb3ea
Update supported C#/.NET versions
2021-04-16 09:15:43 +02:00
Rasmus Lerchedahl Petersen
a8280f9b12
Python: update test expectation
2021-04-16 08:25:29 +02:00
Rasmus Lerchedahl Petersen
0678745677
Python: refactor based on review suggestion
2021-04-16 08:22:00 +02:00
Rasmus Lerchedahl Petersen
341dbcef2e
Python: simplify code following review suggestion
...
also standardise on camelCase.
2021-04-16 07:41:00 +02:00
Rasmus Lerchedahl Petersen
8aa6b1a87c
Python: use standard tracking construction
2021-04-16 07:36:04 +02:00
Taus
451d36dc97
Python: Allow _some_ PostUpdateNodes
...
Specifically, allow the ones arising from calls, but not reads or
writes. This should fix the tests.
2021-04-15 21:26:12 +00:00
Taus
c9c8259ed0
Python: Disallow PostUpdateNode as LocalSourceNode
...
Previously, in cases like
```python
def foo(x):
x.bar()
x.baz()
x.quux()
```
we would have flow from the first `x` to each use _and_ flow from the
post-update node for each method call to each subsequent use, and all
of these would be `LocalSourceNode`s. For large functions with the above
pattern, this would lead to a quadratic blowup in `hasLocalSource`.
With this commit, only the first of these will count as a
`LocalSourceNode`, and the blowup disappears.
2021-04-15 17:56:14 +00:00
Andrew Eisenberg
5d827b6fc8
Actions: Change staleness calculation
...
Calculate staleness on issues that have the
`Stale` label. Leave all other issues untouched.
2021-04-15 10:14:13 -07:00
Rasmus Wriedt Larsen
3e7dc12246
Python: Port taint tests to use inline expectations
...
The meat of this PR is described in the new python/ql/test/experimental/meta/InlineTaintTest.qll file:
> Defines a InlineExpectationsTest for checking whether any arguments in
> `ensure_tainted` and `ensure_not_tainted` calls are tainted.
>
> Also defines query predicates to ensure that:
> - if any arguments to `ensure_not_tainted` are tainted, their annotation is marked with `SPURIOUS`.
> - if any arguments to `ensure_tainted` are not tainted, their annotation is marked with `MISSING`.
>
> The functionality of this module is tested in `ql/test/experimental/meta/inline-taint-test-demo`.
2021-04-15 18:00:33 +02:00
Chris Smowton
c37994089c
Revert changes to unrelated query
2021-04-15 16:24:29 +01:00
Chris Smowton
254de76078
Remove unnecessary stubs
2021-04-15 16:20:27 +01:00
haby0
dedf765542
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-15 22:59:22 +08:00
Rasmus Lerchedahl Petersen
42ae5f4f7d
Python: support / from the right
...
Will also support both operands being paths
2021-04-15 16:07:35 +02:00
Rasmus Wriedt Larsen
b359205d17
Python: Add taint tests for .get() in flask
2021-04-15 14:53:44 +02:00
CodeQL CI
578ce1e512
Merge pull request #5683 from asgerf/js/typescript-template-literal-type-crash
...
Approved by erik-krogh
2021-04-15 05:11:11 -07:00
Mathias Vorreiter Pedersen
7fbc62358e
C++: Accept test changes after making the exprMightOverFlow predicates more sound.
2021-04-15 13:57:44 +02:00
haby0
0e183ab4a4
Finish comment
2021-04-15 19:49:06 +08:00
Chris Smowton
fa36ba901a
Merge pull request #5471 from artem-smotrakov/el-injection
...
Java: Query for detecting Jakarta Expression Language injections
2021-04-15 12:39:34 +01:00
haby0
d269a7e717
CWE-598 reduction
2021-04-15 19:33:15 +08:00
haby0
216f204438
delete FilterClass
2021-04-15 19:28:25 +08:00
haby0
583d0889e2
delete tomcat-embed-core stub, update the ServletGetMethod class
2021-04-15 17:40:51 +08:00
haby0
5d05e4d224
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-15 17:28:53 +08:00
Tom Hvitved
0f24db8759
C#: Improve performance of SsaImpl::CallGraph::SimpleDelegateAnalysis
2021-04-15 11:25:27 +02:00
Asger Feldthaus
f8570bb293
JS: Update TRAP
2021-04-15 10:16:46 +01:00
Rasmus Lerchedahl Petersen
d361d999b7
Python: add some path returning functions
...
that were only listed as file sytem accesses.
2021-04-15 10:55:09 +02:00
Rasmus Lerchedahl Petersen
02e41d8018
Python: update annotations
...
This because `resolve` accesses the file system,
I am open to not include that fact in the modelling.
2021-04-15 10:49:22 +02:00
Rasmus Lerchedahl Petersen
3eb1813584
Python: update test expectations
2021-04-15 10:47:49 +02:00
Asger Feldthaus
cb736c8c82
JS: Change note
2021-04-15 09:37:57 +01:00
Tom Hvitved
972cc47f67
Merge pull request #5673 from hvitved/csharp/customizations
...
C#: Add `Customizations.qll`
2021-04-15 10:24:29 +02:00
Asger Feldthaus
b4a2a9db25
JS: Fix extraction of non-substitution template literal types
2021-04-15 09:23:45 +01:00
Chris Smowton
bd3b3178ba
Fix documentation of Modifier.qll
2021-04-15 09:16:51 +01:00
Rasmus Lerchedahl Petersen
c9b2c7885e
Python: add changenote
2021-04-15 10:14:35 +02:00
Rasmus Lerchedahl Petersen
52a9040d73
Python update tests
2021-04-15 09:46:53 +02:00
Rasmus Lerchedahl Petersen
2387dc640c
Python: Attempts at modelling pathlib-Paths
2021-04-15 09:40:23 +02:00
Rasmus Lerchedahl Petersen
8489403051
Python: Add some tests for pathlib
2021-04-15 09:40:23 +02:00
haby0
b3bdf89fc2
rm VerificationMethodFlowConfig, use springframework-5.2.3 stub
2021-04-15 10:25:40 +08:00
CodeQL CI
4be183c7f6
Merge pull request #5675 from erik-krogh/libXss
...
Approved by esbena
2021-04-14 14:34:23 -07:00
ihsinme
b30ae3980c
Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql
2021-04-14 20:48:20 +03:00
Robert Marsh
fe57876fd8
Merge pull request #5643 from dbartol/smart-pointers/side-effect-refactor
...
C++: Refactor some side effect generation code
2021-04-14 09:59:41 -07:00
Taus
897d12420b
Python: Prevent bad join in isinstanceEvaluatesTo
...
In some cases, we were joining the result of `val.getClass()` against
the first argument of `Types::improperSubclass` before filtering out the
vast majority of tuples by the call to `isinstance_call`.
To fix this, we let `isinstance_call` take care of figuring out the
class of the value being tested. As a bonus, this cleans up the only
other place where `isinstance_call` is used, where we _also_ want to
know the class of the value being tested in the `isinstance` call.
2021-04-14 16:49:12 +00:00
Artem Smotrakov
97186b3d30
Added comments for tests
2021-04-14 19:30:58 +03:00
Andrew Eisenberg
56ba0f080a
Merge pull request #5659 from github/aeisenberg/mark-as-stale
...
Actions: Add workflow for marking stale questions
2021-04-14 08:37:55 -07:00
Taus
a7fcf52267
Python: Fix bad join in total_cost
...
The recent change to `appliesTo` lead to a perturbation in the join
order of this predicate, which resulted in a cartesian product between
`call` and `ctx` being created (before being filtered by `appliesTo`).
By splitting the intermediate result into its own helper predicate,
suitably marked to prevent inlining/magic, we prevent this from
happening again.
2021-04-14 15:36:01 +00:00
Andrew Eisenberg
392adf2a25
Workflows: Remove dry-run flag for labeller
2021-04-14 08:25:34 -07:00
Dave Bartolomeo
b29f35f564
Fix formatting
2021-04-14 11:15:16 -04:00
Geoffrey White
64fed4cb10
Merge pull request #5677 from MathiasVP/fix-duplicate-ids-in-experimental
...
C++: Fix duplicate names in experimental queries
2021-04-14 15:58:49 +01:00
Mathias Vorreiter Pedersen
ed64ed3d8d
C++: Make exprMightOverflowPositively/exprMightOverFlowNegatively hold for unanalyzable expressions. This hopefully means that expressions that do not satisfy these predicates will never overflow/underflow.
2021-04-14 16:45:27 +02:00
Jonas Jensen
b4f01c9afa
Merge pull request #5578 from MathiasVP/ast-flow-smart-pointers
...
C++: AST dataflow through smart pointers
2021-04-14 16:39:05 +02:00
Mathias Vorreiter Pedersen
53a320a810
C++: Fix duplicate names.
2021-04-14 16:33:18 +02:00
Mathias Vorreiter Pedersen
bb447d7174
C++: Make sure missingGuardAgainstOverflow (and underflow) holds when range analysis fails to deduce a bound.
2021-04-14 16:30:43 +02:00
yoff
447f339857
Merge pull request #5641 from tausbn/python-use-localsourcenode-in-typetrackers
...
Python: Use API graphs in PEP249 support
2021-04-14 15:39:49 +02:00
Mathias Vorreiter Pedersen
92508beb82
Merge pull request #5600 from ihsinme/ihsinme-patch-258
...
CPP: Add query for CWE-691 Insufficient Control Flow Management When Using Bit Operations
2021-04-14 14:55:30 +02:00
Anders Schack-Mulligen
f43d427875
Merge pull request #5645 from Marcono1234/marcono1234/primary-ql-class
...
Java: Override getAPrimaryQlClass() for more classes
2021-04-14 14:51:29 +02:00
Mathias Vorreiter Pedersen
bc7cc2f7ce
C++: Remove rule that wasn't needed.
2021-04-14 14:50:27 +02:00
Mathias Vorreiter Pedersen
da36508714
Revert "C++: As response to the review comments this commit adds a reference-to-pointer state to AddressFlow. A call to an unwrapper function now adds a pointer -> reference-to-pointer transition, and a ReferenceDereference adds a reference-to-pointer -> pointer transition."
...
This reverts commit 5aeaab7c6d .
2021-04-14 14:41:22 +02:00
Chris Smowton
591ac38c31
Merge pull request #5591 from Marcono1234/marcono1234/member-nested-type
...
Java: Add MemberType
2021-04-14 12:29:54 +01:00
Taus
54c79bff74
Merge pull request #5666 from RasmusWL/django-refactor
...
Python: Refactoring and exposing of Django views/fields/forms
2021-04-14 13:07:20 +02:00
Mathias Vorreiter Pedersen
2e40d01397
Update cpp/ql/src/semmle/code/cpp/security/Overflow.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-04-14 13:01:31 +02:00
Rasmus Wriedt Larsen
44d2bf42d7
Merge pull request #5671 from tausbn/python-use-api-graphs-in-werkzeug
...
Python: Use API graphs in Werkzeug
2021-04-14 12:57:58 +02:00
Erik Krogh Kristensen
fd23e0bdda
use more API nodes in XmlParsers, and recognize more results from parsing XML
2021-04-14 11:48:31 +02:00
Anders Schack-Mulligen
3b6cd0f681
Merge pull request #5661 from smowton/smowton/cleanup/call-is-exprparent
...
Make Call a subclass of ExprParent.
2021-04-14 10:49:33 +02:00
Rasmus Wriedt Larsen
9de8085571
Merge pull request #5665 from tausbn/python-use-api-graphs-in-tornado
...
Python: Tornado cleanup using API graphs
2021-04-14 10:22:21 +02:00
Rasmus Wriedt Larsen
2d0c9b6bf2
Merge pull request #5670 from tausbn/python-use-api-graphs-in-dill
...
Python: Use API graphs in Dill model
2021-04-14 10:08:02 +02:00
Rasmus Wriedt Larsen
55723618a9
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-04-14 10:05:50 +02:00
Chris Smowton
2965a1f204
Use Thread$State as an inner-class example
...
Map<>$Entry currently has odd generic notation that may be about to change.
2021-04-14 08:43:05 +01:00
Chris Smowton
5158e7964e
Add change note
2021-04-14 08:25:12 +01:00
Tom Hvitved
36fe72246b
C#: Add change note
2021-04-14 09:22:16 +02:00
Tom Hvitved
4810308b16
C#: Add Customizations.qll
2021-04-14 09:16:31 +02:00
haby0
77208bcc91
Fix the error that there is no VerificationMethodToIfFlowConfig
2021-04-14 13:14:43 +08:00
haby0
e2ed0d02b0
Delete existsFilterVerificationMethod and existsServletVerificationMethod, add from get handler to filter
2021-04-14 12:34:52 +08:00
haby0
37dae67a0d
Fix RequestResponseFlowConfig.isSink error
2021-04-14 09:55:24 +08:00
Robert Marsh
419d25cbcf
Merge pull request #5325 from ihsinme/ihsinme-patch-245
...
CPP: Add query for CWE-783 Operator Precedence Logic Error When Use Bool Type
2021-04-13 13:24:39 -07:00
Taus
981c5deb57
Merge pull request #5639 from tausbn/python-api-graphs-missing-builtins
...
Python: Add missing builtins to `API::builtin`
2021-04-13 21:27:52 +02:00
Marcono1234
d853f0c400
Java: Add MemberType
2021-04-13 18:55:20 +02:00
Taus
a6bb9ebb9f
Python: Re-introduce abstract toString
...
This seems like the easier solution in the short run.
2021-04-13 16:08:41 +00:00
Taus
079c7e089d
Python: Autoformat
2021-04-13 16:05:45 +00:00
Taus
273e8ce4ef
Python: Add change note
2021-04-13 16:04:07 +00:00
haby0
00235ed3b3
Update java/ql/src/semmle/code/java/frameworks/Servlets.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-13 23:58:52 +08:00
haby0
25b012db48
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-13 23:58:28 +08:00
Taus
5f7d3d0d36
Python: Use API graphs in Werkzeug
2021-04-13 15:57:21 +00:00
haby0
7be45e7c5e
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-13 23:56:17 +08:00
haby0
6e73d13670
Update java/ql/src/semmle/code/java/frameworks/Servlets.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-13 23:48:45 +08:00
Taus
2890fe6d61
Python: Use API graphs in Dill model
...
If only all rewrites were this smooth...
2021-04-13 15:26:54 +00:00
Taus
7ed09904b4
Python: Use API graphs for Invoke
...
A few stragglers remain, as they are modelling the use of decorators.
They will be dealt with at a later date.
2021-04-13 15:21:19 +00:00
Mathias Vorreiter Pedersen
aa52585120
C++: Add change-note.
2021-04-13 17:17:05 +02:00
Marcono1234
89a5acf6e8
Java: Revert overriding XMLFile.getAPrimaryQlClass()
...
Library file has to be kept in sync with the other languages, however except
cpp none of them have the getAPrimaryQlClass() predicate declared in a
superclass. Therefore for simplicity revert the change for Java.
2021-04-13 17:09:15 +02:00
Taus
7f131c1f35
Python: Get rid of _attr predicates
2021-04-13 14:55:44 +00:00
Taus
1008411594
Python: Use API graphs in Fabric model
2021-04-13 14:49:44 +00:00
Mathias Vorreiter Pedersen
d1457995dd
C++: Use range analysis in Overflow.qll
2021-04-13 16:39:28 +02:00
Geoffrey White
8daca01c87
C++: Cleaner use of DataFlow::Node in exprIsSubLeftOrLess.
2021-04-13 15:13:11 +01:00
Geoffrey White
4879104568
C++: Add more dataflow cases to replace the loss.
2021-04-13 15:09:12 +01:00
Geoffrey White
b0ad927fdd
C++: Remove useUsePair.
2021-04-13 15:03:06 +01:00
Taus
a404faa302
Python: Use American English in change note
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-04-13 15:05:44 +02:00
Taus
7825a2cdfc
Python: Add change note
2021-04-13 12:48:45 +00:00
Taus
1a4845f417
Python: Restrict types a bit
...
The `CallCfgNode` restrictions are familiar and useful.
Restricting `InstanceSource` to extend `LocalSourceNode` is novel, but I
think it makes sense. It will act as a good reminder to anyone extending
`InstanceSource` that the node in question is a `LocalSourceNode`, which
will be enforced by the return type of the internal type tracker anyway.
2021-04-13 12:28:38 +00:00
Taus
f93b68d4dc
Python: Get rid of _attr methods
2021-04-13 12:25:38 +00:00
Taus
98d936d8b3
Python: Tornado cleanup using API graphs
...
I wasn't able to roll out API graphs as widely in Tornado as I had
hoped, since we're lacking the "def" part. This means most of the
`InstanceSource` machinery will have to stay.
2021-04-13 12:25:38 +00:00
CodeQL CI
f341d5010d
Merge pull request #5662 from asgerf/js/simpler-json-api
...
Approved by erik-krogh
2021-04-13 04:37:56 -07:00
Tom Hvitved
9b0ef2fe21
Merge pull request #5654 from hvitved/csharp/autobuilder/pwsh
...
C#: First try `pwsh` and then `powershell` when calling `dotnet-install.ps1`
2021-04-13 13:15:01 +02:00
Chris Smowton
58d198261e
Merge pull request #5663 from smowton/luchua/java/sensitive-cookie-not-httponly
...
Java: CWE-1004 Query to check sensitive cookies without the HttpOnly flag set w/minor corrections
2021-04-13 12:08:53 +01:00
CodeQL CI
646639bc73
Merge pull request #5460 from erik-krogh/forgery-2
...
Approved by asgerf
2021-04-13 03:57:04 -07:00
Chris Smowton
f22b11881e
Minimise stubs
...
By removing all business logic from the stubs, we better test that our analysis treats them as opaque and does not rely on their internal structure
2021-04-13 10:36:28 +01:00
Chris Smowton
45e1a61d7b
Mark test as bad-but-missed
...
This test ought ideally to be caught, but isn't by the current version of the query.
2021-04-13 10:36:27 +01:00
Rasmus Lerchedahl Petersen
30fbb8f1e7
Python: clean up interface
2021-04-13 11:34:47 +02:00
Asger Feldthaus
e77117f902
JS: Autoformat
2021-04-13 10:29:14 +01:00
Asger Feldthaus
929d9da4b4
JS: Migrate to new JSON API
2021-04-13 10:29:13 +01:00
Asger Feldthaus
7c13163413
JS: Lift JSON accessors to JSONValue
2021-04-13 10:29:13 +01:00
Rasmus Lerchedahl Petersen
178cb6c90f
Python: Bit too eager with the modernisation...
...
Lift type restrictions to recover results.
2021-04-13 11:26:05 +02:00
Rasmus Lerchedahl Petersen
7c0b0642c8
Python: Add imports to make code compile
2021-04-13 11:09:27 +02:00
Tom Hvitved
15c103e42d
C#: Remove code duplication in BuildScripts.cs
2021-04-13 10:57:15 +02:00
Chris Smowton
dee974ff2d
Make Call a subclass of ExprParent. All of its subclasses are in any case (via Expr or Stmt)
2021-04-13 09:13:47 +01:00
Marcono1234
c37dbb2e68
Java: Override getAPrimaryQlClass() for more classes
2021-04-13 08:46:01 +01:00
Mathias Vorreiter Pedersen
3cfd30ef6f
Merge pull request #5629 from hvitved/cpp/remove-unique
...
C++: Remove `unique` wrapper from `DataFlow::Node::getEnclosingCallable`
2021-04-13 09:42:34 +02:00
haby0
be39883166
Change the class name and comment,Use .(CompileTimeConstantExpr).getStringValue()
2021-04-13 14:10:10 +08:00
Dave Bartolomeo
afd2f58f9f
C++: Fix PR feedback
2021-04-12 18:21:05 -04:00
Dave Bartolomeo
697b2dcde8
C++: Add missing store step for single-field struct use
...
We have special code to handle field flow for single-field structs, but that special case was too specific. Some `Store`s to single-field structs have no `Chi` instruction, which is the case that we handled already. However, it is possible for the `Store` to have a `Chi` instruction (e.g. for `{AllAliased}`), but still have a use of the result of the `Store` directly. We now add a `PostUpdateNode` for the result of the `Store` itself in those cases, just like we already did if the `Store` had no `Chi`.
2021-04-12 18:11:41 -04:00
Rasmus Lerchedahl Petersen
b6bd782746
Python: Modernize via CallCfgNode
2021-04-12 23:55:59 +02:00
yoff
e4d74cf098
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-12 23:47:54 +02:00
Robert Marsh
0102d68f38
Merge pull request #5658 from MathiasVP/fix-partial-def-diff-test
...
C++: Fix performance in test
2021-04-12 13:08:30 -07:00
Andrew Eisenberg
e0fcb15739
Actions: Add workflow for marking stale questions
...
This PR adds a workflow for marking and closing issues as stale. Issues must be labeled as _question_. PRs are never marked as stale.
2021-04-12 13:05:53 -07:00
Artem Smotrakov
b96b665262
Renaming in java/ql/src/experimental/Security/CWE/CWE-094
2021-04-12 21:40:49 +03:00
Mathias Vorreiter Pedersen
037e6369ce
C++: Ensure all values are bound in both disjunctions.
2021-04-12 18:27:21 +02:00
luchua-bc
d7f26dfc18
Update stub classes and qldoc
2021-04-12 16:19:23 +00:00
Taus
fda750ef26
Merge pull request #5642 from tausbn/python-use-api-graphs-in-stdlib
...
Python: Use API graphs in `Stdlib.qll`
2021-04-12 18:05:38 +02:00
Chris Smowton
423ff32d04
Merge pull request #5384 from luchua-bc/java/insecure-spring-actuator-config
...
Java: CWE-016 Query to detect insecure configuration of Spring Boot Actuator
2021-04-12 17:04:47 +01:00
Taus
6d4ddc0329
Merge pull request #5614 from tausbn/python-allow-absolute-imports-from-source-directory
...
Python: Allow absolute imports from source directory
2021-04-12 18:02:00 +02:00
CodeQL CI
bc56d16c18
Merge pull request #5485 from RasmusWL/django-queryset-chains
...
Approved by tausbn
2021-04-12 08:49:31 -07:00
Tom Hvitved
dfc91b8331
C#: Simplify dotnet-install.ps1 invocation
...
Using the pattern from https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script .
2021-04-12 17:33:33 +02:00
Chris Smowton
bb23866cec
Add missing doc comments
2021-04-12 16:33:01 +01:00
Tom Hvitved
d35a501121
Merge pull request #5583 from lcartey/cs/restrict-jump-to-def
...
C#: Exclude jump-to-def information for elements with too many locations
2021-04-12 16:52:20 +02:00
ihsinme
a43698802f
Update InsufficientControlFlowManagementWhenUsingBitOperations.ql
2021-04-12 17:36:50 +03:00
CodeQL CI
310a2c8bb3
Merge pull request #5655 from erik-krogh/cert
...
Approved by esbena
2021-04-12 07:31:04 -07:00
Chris Smowton
2656a52880
Merge pull request #5538 from luchua-bc/java/credentials-in-properties
...
Java: CWE-555 Query to detect plaintext credentials in Java properties files
2021-04-12 15:22:21 +01:00
Chris Smowton
abeefcaced
Merge pull request #4947 from porcupineyhairs/DexLoading
...
Java : add query to detect insecure loading of Dex File
2021-04-12 15:22:12 +01:00
Asger Feldthaus
d2fad180f8
JS: Add test
2021-04-12 15:07:45 +01:00
Mathias Vorreiter Pedersen
5aeaab7c6d
C++: As response to the review comments this commit adds a reference-to-pointer state to AddressFlow. A call to an unwrapper function now adds a pointer -> reference-to-pointer transition, and a ReferenceDereference adds a reference-to-pointer -> pointer transition.
2021-04-12 16:01:01 +02:00
ihsinme
58d5ad48d5
Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql
2021-04-12 17:00:34 +03:00
ihsinme
d7c14775bf
Update InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp
2021-04-12 16:56:48 +03:00
Chris Smowton
11bf982728
Remove superfluous linebreaks in qhelp file
2021-04-12 14:36:42 +01:00
Asger Feldthaus
24de826133
JS: Add file diagnostics errors
2021-04-12 14:11:38 +01:00
Erik Krogh Kristensen
32737a17fb
add change note
2021-04-12 15:09:13 +02:00
Erik Krogh Kristensen
172d6139e2
support all ClientRequests in js/disabling-certificate-validation
2021-04-12 15:06:10 +02:00
luchua-bc
c281e54d22
Remove unused files and update qldoc
2021-04-12 13:05:01 +00:00
Tom Hvitved
57016ddbde
C++: Remove unique wrapper from DataFlow::Node::getEnclosingCallable()
2021-04-12 14:41:52 +02:00
Tom Hvitved
7d2a60e910
Merge pull request #5640 from hvitved/dataflow/path-step-perf
...
Data flow: Prevent bad join-order in `pathStep`
2021-04-12 14:40:46 +02:00
Tamas Vajk
b4d35b52c3
C#: Add Console.Read* to local flow sources
2021-04-12 14:19:17 +02:00
Tom Hvitved
5446532e1d
C#: Update auto-builder tests
2021-04-12 14:01:55 +02:00
Anders Schack-Mulligen
acd4cf2878
Merge pull request #5636 from aschackmull/java/shared-flow-summaries
...
Java: Adopt shared flow summaries
2021-04-12 13:35:31 +02:00
CodeQL CI
e8d835b422
Merge pull request #5638 from erik-krogh/smartInliner
...
Approved by esbena
2021-04-12 04:17:25 -07:00
Tom Hvitved
c7686b1838
C#: First try pwsh and then powershell when calling dotnet-install.ps1
2021-04-12 13:01:14 +02:00
Tom Hvitved
cf5f838b13
Data flow: Remove recommendation to use unique in Node::getEnclosingCallable()
2021-04-12 12:04:23 +02:00
Anders Schack-Mulligen
e003b04061
Merge pull request #5637 from Marcono1234/marcono1234/toString-method
...
Java: Add ToStringMethod
2021-04-12 11:43:55 +02:00
Max Schaefer
cd57e61f65
Rename MkHasUnderlyingType to MkTypeUse.
2021-04-12 11:30:15 +02:00
Erik Krogh Kristensen
91d28fb8b0
cleanup in API-graphs
2021-04-12 11:30:15 +02:00
CodeQL CI
63f087a8e9
Merge pull request #5653 from erik-krogh/givenCommand
...
Approved by asgerf
2021-04-12 02:01:32 -07:00
Rasmus Wriedt Larsen
364d48948f
Merge pull request #3810 from dilanbhalla/syntaxpython
...
Python: Function/Class Naming Convention (Syntax)
2021-04-12 10:42:17 +02:00
Rasmus Lerchedahl Petersen
3ff8e010b2
Python: Refactor based on review
...
- more natural handling of default arguments
- do not assume default construction gives a family
- simplifies `UnspecificSSLContextCreation`
2021-04-12 10:00:07 +02:00
Rasmus Lerchedahl Petersen
9f91dde76f
Python: Update test expectation after comment
2021-04-12 09:58:06 +02:00
Erik Krogh Kristensen
17c4bbbc4e
allow parameters that end with "Command" in js/shell-command-constructed-from-input
2021-04-12 09:57:40 +02:00
haby0
1b948ac2e2
Combine two Configurations into one
2021-04-12 15:44:39 +08:00
Rasmus Lerchedahl Petersen
036fddfdb5
Python: Namable -> Nameable
2021-04-12 08:18:24 +02:00
yoff
02d6de81a7
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-04-12 08:16:36 +02:00
ihsinme
feb3a8deb1
Update InsufficientControlFlowManagementAfterRefactoringTheCode.expected
2021-04-12 08:23:41 +03:00
ihsinme
6924c6c51c
Update test.c
2021-04-12 08:23:06 +03:00
ihsinme
3da88f2103
Update InsufficientControlFlowManagementAfterRefactoringTheCode.c
2021-04-12 08:15:36 +03:00
ihsinme
17d1c77a14
Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql
2021-04-12 08:14:17 +03:00
yo-h
4f2060f96b
Merge commit '2d618d6b928d8b76ac8033b3b63d9bde71caa325' into yo-h/java16
2021-04-11 23:55:33 -04:00
Taus
10be2735ec
Python: Get rid of _attr predicates
...
Also changes all `CfgNode`s representing calls to `CallCfgNode`s.
2021-04-10 12:12:18 +00:00
intrigus
8d11bc97ca
[Java] Add "missing jwt signature check" qhelp.
2021-04-10 13:36:22 +02:00
haby0
d90527bead
JsonpInjectionExpr updated to JsonpBuilderExpr
2021-04-10 10:33:21 +08:00
Marcono1234
9349e6922d
Java: Add ToStringMethod
2021-04-10 04:00:44 +02:00
haby0
eeae91e620
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 09:48:55 +08:00
haby0
046aeaa38c
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 09:37:29 +08:00
haby0
8b756d7f1b
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 09:27:03 +08:00
haby0
650446f761
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 09:26:32 +08:00
haby0
a5ebe8c600
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 09:26:08 +08:00
porcupineyhairs
8687c5c145
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:18:35 +05:30
haby0
8a7d28a2ed
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:29:49 +08:00
haby0
4c21980d4f
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:29:30 +08:00
haby0
9635a36044
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:29:06 +08:00
haby0
760231c004
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:28:17 +08:00
haby0
c77c7b0a98
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:27:16 +08:00
haby0
837f20108d
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:25:43 +08:00
haby0
157e4670fd
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:25:11 +08:00
haby0
79c1374925
Update java/ql/src/semmle/code/java/frameworks/Servlets.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:24:49 +08:00
haby0
1510048f7a
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:23:13 +08:00
haby0
d8165145c7
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:22:44 +08:00
haby0
ebd38eaf3b
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:22:08 +08:00
haby0
b8c11503f0
Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-10 04:21:49 +08:00
Dave Bartolomeo
0a86642056
C++: Refactor some side effect generation code
...
This change was necessary for my upcoming changes to introduce side effect instructions for indirections of smart pointers. The code to decide which parameters have which side effects appeared in both the IPA constructor for `TTranslatedSideEffect` and in `TranslatedCall`. These two versions didn't quite agree, especially once the `SideEffectFunction` model provides its own side effects instead of the defaults.
The relevant code has now been factored out into `SideEffects.qll`. This queries the model if one exists, and provides default side effects if no model exists. This fixes at least one existing issue, where we were emitting a buffer read side effect for `*this` instead of an indirect read side effect. This accounts for all of the IR diffs in the tests.
2021-04-09 16:14:03 -04:00
luchua-bc
4e3791dc0d
Remove LoadCredentialsConfiguration and update qldoc
2021-04-09 19:36:35 +00:00
Taus
720fbaf301
Python: Fix test error.
...
Somehow, having to type "Node" all day long made me turn "json" into
"node"...
Also removes some bits that weren't needed after all.
2021-04-09 19:04:49 +00:00
Mathias Vorreiter Pedersen
1510fe370d
C++: Add cases for const pointer wrapper references to AddressFlow and FlowVar.
2021-04-09 20:58:05 +02:00
Mathias Vorreiter Pedersen
2329b31601
C++: Replace the new SmartPointerPartialDefinition with additional steps in AddressFlow.qll
2021-04-09 20:49:45 +02:00
Mathias Vorreiter Pedersen
a460e3ad3d
Merge branch 'main' into ast-flow-smart-pointers
2021-04-09 19:41:10 +02:00
Geoffrey White
40637c18ce
C++: Add change note.
2021-04-09 18:14:12 +01:00
Geoffrey White
0818c1d703
C++: Update QLDoc.
2021-04-09 18:11:48 +01:00
Taus
cc4827600b
Python: Use API graphs in Stdlib.qll
...
Eliminates _almost_ all of the bespoke type trackers found here. The
ones that remain do not fit easily inside the framework of API graphs
(at least, not yet), and I did not see any easy ways to clean them up.
They have, however, been rewritten to use `LocalSourceNode` internally,
which was the primary goal of this exercise.
I'm sure we could also clean up many of the inner modules given the more
lean presentation we have now, but this can wait for a different PR.
2021-04-09 17:11:47 +00:00
luchua-bc
04b0682bbf
Use isAdditionalTaintStep and make the query more readable
2021-04-09 16:14:51 +00:00
Tom Hvitved
fd8f745468
Java: Adopt shared flow summary library and refactor data-flow nodes.
2021-04-09 16:57:03 +02:00
Tom Hvitved
f130616369
Data flow: Make getLocalCc private again
2021-04-09 16:22:58 +02:00
Geoffrey White
3b437fe6cf
C++: Replace GVN with some other libraries.
2021-04-09 15:21:42 +01:00
Taus
d2b874f217
Python: Use API graphs in PEP249 support
...
Because the replacement extension point now extends `API::Node`, I
modified the `toString` method of the latter to have an empty body.
The alternative would be to require everyone to provide a `toString`
predicate for their extensions, but seeing as these will usually be
pointing to already existing API graph nodes, this seems silly.
(This may be the reason why the equivalent method in the JS libs has
such an implementation.)
2021-04-09 14:19:00 +00:00
Tom Hvitved
6874b8d4b3
Data flow: Prevent bad join-order in pathStep
2021-04-09 14:24:47 +02:00
Taus
affdedd840
Python: Add missing builtins to API::builtin
...
We were missing out on `None`, `True`, and `False` as these do not
appear as actual attributes of the `builtins` module in Python 3
(because they are elevated to the status of keywords there)
The simple solution, then, is to just always include them directly.
2021-04-09 12:02:07 +00:00
Tamas Vajk
351f35d9bc
Revert "Java: Convert other sinks"
...
This reverts commit 87d42b02c0 .
2021-04-09 13:13:49 +02:00
Tamas Vajk
87d42b02c0
Java: Convert other sinks
2021-04-09 13:13:39 +02:00
Tamas Vajk
3e53484bb3
Java: Convert Google HTTP client API parseAs sink to CSV format
2021-04-09 13:10:44 +02:00
Tamas Vajk
e544faed6d
Java: Convert unsafe hostname verification sinks to CSV format
2021-04-09 13:10:44 +02:00
Tamas Vajk
17fd758df1
Java: Convert XSS sinks to CSV format
2021-04-09 13:10:44 +02:00
Tamas Vajk
0b7a6671dd
Java: Convert header splitting sinks to CSV format
2021-04-09 13:06:05 +02:00
Tamas Vajk
f329c3fdab
Java: Convert insecure bean validation sink to CSV format
2021-04-09 13:06:04 +02:00
Mathias Vorreiter Pedersen
0a6aef71a2
C++: Respond to review comments.
2021-04-09 12:29:13 +02:00
Tamas Vajk
9e2832a82d
Java: Convert zipslip sinks to CSV format
2021-04-09 11:43:29 +02:00
Tamas Vajk
b9ce1aefc0
Java: Convert unsafe URL opening sinks to CSV format
2021-04-09 11:43:29 +02:00
Tamas Vajk
53daa7c436
Java: Migrate LDAP injection sinks to CSV format
2021-04-09 09:15:47 +02:00
luchua-bc
11304b2ae1
Update qldoc and change the wrapper method implementation
2021-04-09 02:21:59 +00:00
jorgectf
1c34230efb
Fix documentation typo
2021-04-09 01:58:18 +02:00
jorgectf
b020ea6e3a
Polish documentation
2021-04-09 01:50:23 +02:00
jorgectf
a2e8d88a07
Write documentation
2021-04-09 01:47:44 +02:00
Erik Krogh Kristensen
7f01586bf1
fix bad join order in getDocumentedParameter
2021-04-09 01:15:46 +02:00
jorgectf
cd75433e39
Fix qhelp examples extension
2021-04-09 00:52:50 +02:00
Erik Krogh Kristensen
e5bce548de
add nomagic on mayHaveStringValue
2021-04-09 00:08:51 +02:00
jorgectf
82f47f8571
Polish metadata
2021-04-08 23:55:34 +02:00
jorgectf
b405c675c2
Add qhelp last newline
2021-04-08 23:49:33 +02:00
jorgectf
7819d1a30b
Generate .expected
2021-04-08 23:45:26 +02:00
jorgectf
4f85de87de
Add qlref
2021-04-08 23:45:12 +02:00
jorgectf
95bfdc4955
Move tests to /test
2021-04-08 23:45:03 +02:00
jorgectf
1554f4f48d
Create qhelp examples
2021-04-08 23:44:46 +02:00
jorgectf
3c1ca72324
Improve qhelp
2021-04-08 23:44:30 +02:00
jorgectf
7296879bc9
Polish tests
2021-04-08 23:11:20 +02:00
jorgectf
8661cb0719
Polish LDAP3Query
2021-04-08 22:56:12 +02:00
jorgectf
a1850ddad4
Change LDAP config (qll) filename
2021-04-08 22:55:48 +02:00
Erik Krogh Kristensen
956311457d
fixed bad SourceNode X SourceNode join in HTTP model
2021-04-08 21:15:50 +02:00
ihsinme
9b3ccade43
Update test.c
2021-04-08 22:06:35 +03:00
ihsinme
3d117243e4
Update test.c
2021-04-08 22:05:31 +03:00
ihsinme
02eb447a35
Update InsufficientControlFlowManagementWhenUsingBitOperations.expected
2021-04-08 22:04:08 +03:00
ihsinme
a6b486a448
Update InsufficientControlFlowManagementWhenUsingBitOperations.ql
2021-04-08 22:01:43 +03:00
Dilan
d73ba13b28
autoformat fix
2021-04-08 11:41:58 -07:00
Artem Smotrakov
b39a3ab12c
Added setVariable() sink
2021-04-08 20:41:43 +03:00
haby0
1da48ed4d1
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-08 19:22:14 +08:00
haby0
bfbfe7af13
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-08 19:21:58 +08:00
haby0
21004006d6
Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-08 19:17:04 +08:00
Rasmus Wriedt Larsen
83477439a1
Python: Make django views/fields/forms class modeling extensible
...
This also requires that we make this part of the modeling public, which I guess
is step we want to take eventually anyway!
I'm not quite sure whether the modules `Django::Views` and `Django::Forms` are
actually helpful, or whether we should just have their modules available as
`Django::View`, `Django::Form`, and `Django::Field`...
2021-04-08 12:45:37 +02:00
Rasmus Wriedt Larsen
b7483a5394
Python: Add modeledSubclassRef for Django views/fields/forms
2021-04-08 12:45:36 +02:00
Rasmus Wriedt Larsen
322bdcb703
Python: Port Django view modeling to API graphs
2021-04-08 12:45:35 +02:00
Rasmus Wriedt Larsen
8ce5c46e05
Python: Minor refactor
...
modName/clsName _is_ shorter, but also looks way worse :D
2021-04-08 12:45:34 +02:00
haby0
86ef2588f1
Restore @Component annotation
2021-04-08 17:55:29 +08:00
haby0
3f0a3266aa
[Java] CWE-348: Use of less trusted source
2021-04-08 17:14:03 +08:00
Geoffrey White
517fd23ca5
C++: Correct and add to test cases.
2021-04-08 09:48:38 +01:00
jorgectf
33423eaef3
Optimize calls
2021-04-08 00:31:53 +02:00
Dilan
675de07c3e
autoformat ql
2021-04-07 15:04:18 -07:00
ihsinme
ed34c96357
Update InsufficientControlFlowManagementWhenUsingBitOperations.ql
2021-04-07 21:40:49 +03:00
ihsinme
eb9b41acab
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2021-04-07 21:31:12 +03:00
Artem Smotrakov
a764a79090
Always bind arguments in TaintPropagatingCall
2021-04-07 21:12:21 +03:00
Artem Smotrakov
c13ee0859a
LambdaExpression should extend JakartaType
2021-04-07 21:02:21 +03:00
Artem Smotrakov
3d8e173c57
Removed a reference to Apache Commons EL
2021-04-07 20:59:07 +03:00
Artem Smotrakov
80ac2aff26
Fixed typos
...
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-04-07 20:55:03 +03:00
yoff
38daeb4df2
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-07 15:50:51 +02:00
Taus
6c69c1aeeb
Python: Minor cleanup
2021-04-07 10:47:21 +00:00
ihsinme
cbf158ea6b
Add files via upload
2021-04-07 13:12:30 +03:00
ihsinme
36de496d47
Add files via upload
2021-04-07 13:12:29 +03:00
ihsinme
ed2a8db8c9
Add files via upload
2021-04-07 13:10:01 +03:00
ihsinme
9c3b7e81c7
Add files via upload
2021-04-07 13:10:00 +03:00
Rasmus Lerchedahl Petersen
a006a92f8d
Python: Expand commentary
2021-04-07 08:32:40 +02:00
Rasmus Lerchedahl Petersen
f22db2a30b
Python: One family to rule them all...
2021-04-07 08:32:21 +02:00
Rasmus Lerchedahl Petersen
a0e3e3afaf
Python: adjust test expectations
2021-04-07 08:22:36 +02:00
Rasmus Lerchedahl Petersen
fb95c488e8
Python: format
2021-04-07 08:20:52 +02:00
Geoffrey White
a8193dac08
C++: Reintroduce the exprMightOverflowNegatively bit.
2021-04-06 22:36:59 +01:00
Geoffrey White
60e4faba4c
C++: Add linear expression logic.
2021-04-06 22:28:36 +01:00
Geoffrey White
48ff8e237c
C++: Rewrite the range analysis exclusion to be recursive and more robust.
2021-04-06 22:26:55 +01:00
Geoffrey White
3ecd13531f
C++: Improve isGuarded.
2021-04-06 22:21:59 +01:00
Geoffrey White
59ff3f315b
C++: Add test cases exploring issues and potential issues with the query (especially related to simple range analysis).
2021-04-06 22:21:25 +01:00
Rasmus Lerchedahl Petersen
094d2f3b7d
Python: clean up tests
2021-04-06 22:59:58 +02:00
Rasmus Lerchedahl Petersen
a44490b470
Python: remove unused file
2021-04-06 22:56:07 +02:00
Rasmus Lerchedahl Petersen
0626684442
Python: small cleanups enabled by review
2021-04-06 22:55:32 +02:00
yoff
acf8fd0f03
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-04-06 22:45:03 +02:00
Taus
a93132daae
Merge branch 'python-allow-absolute-imports-from-source-directory' of https://github.com/tausbn/codeql into python-allow-absolute-imports-from-source-directory
2021-04-06 19:58:57 +00:00
Taus
43ae7462b4
Python: Only track modules that are imported
...
This greatly restricts the set of modules that have a new name under
this scheme.
One change to the tests was needed, which reflects the fact that the
two `main.py` files no longer have the name `main` (which makes sense,
since they're never imported under this name).
2021-04-06 21:56:12 +02:00
Taus
b44db460f6
Python: Only track modules that are imported
2021-04-06 19:55:43 +00:00
yo-h
cc63563a88
Merge remote-tracking branch 'upstream-public/main' into yo-h/java16
2021-04-06 13:16:02 -04:00
Taus Brock-Nannestad
8e11abca40
Revert "Merge pull request #5552 from RasmusWL/revert-import-change"
...
This reverts commit 49d1937dc4 , reversing
changes made to d4877a9038 .
2021-04-06 17:39:41 +02:00
jorgectf
1bcb9cd7c0
Simplify query
2021-04-06 15:42:56 +02:00
Mathias Vorreiter Pedersen
32a8b9a857
C++: Move copy constructor to its own line and accept test changes.
2021-04-06 08:56:14 +02:00
intrigus
885044e331
[Java] Add tests for jwt signature check query.
2021-04-06 01:01:57 +02:00
intrigus
b7e49c78fe
[Java] Add stubs for jwtk-jjwt-0.11.2
2021-04-06 01:01:23 +02:00
intrigus
d1462eda1c
[Java] Add "missing jwt signature check" query.
2021-04-06 00:59:31 +02:00
Luke Cartey
480ce39618
C#: Exclude jump-to-def information for elements with too many locations
...
In databases which include multiple duplicated files, we can get an
explosion of definition locations that can cause this query to produce
too many results for the CodeQL toolchain. This commit restricts the
definitions.ql query to producing definition/uses for definitions with
fewer than 10 locations. This replicates the logic used in the C++
definitions.qll library which faces similar problems.
2021-04-01 11:23:31 +01:00
jorgectf
9b430310b4
Improve Sanitizer calls
2021-03-31 23:19:56 +02:00
jorgectf
4328ff3981
Remove attrs feature
2021-03-31 22:26:08 +02:00
Mathias Vorreiter Pedersen
ecbce88ec7
C++: Fix comment.
2021-03-31 22:23:50 +02:00
Mathias Vorreiter Pedersen
9ff894bf83
C++: Add support for AST dataflow out of functions that take a smart pointer by value.
2021-03-31 13:54:32 +02:00
Mathias Vorreiter Pedersen
8159098dc0
C++: Add test from issue #5190 .
2021-03-31 11:32:01 +02:00
jorgectf
8faafb6961
Update Sink
2021-03-30 16:58:02 +02:00
luchua-bc
1349bf7b0b
Create a .qll file to reuse the code and add check of Spring properties
2021-03-30 11:25:29 +00:00
jorgectf
3cda2e5207
Polish up ldap3 tests
2021-03-29 23:39:49 +02:00
jorgectf
8223539f0c
Add a test without attributes
2021-03-29 23:28:28 +02:00
jorgectf
ad36bea9d4
Refactor LDAP3 stuff (untested)
2021-03-29 09:14:35 +02:00
haby0
0775d35591
update VerificationMethodFlowConfig, add if test
2021-03-29 12:02:37 +08:00
ihsinme
3f215d0954
Update OperatorPrecedenceLogicErrorWhenUseBoolType.ql
2021-03-28 23:43:22 +03:00
ihsinme
093c63ea3b
Update OperatorPrecedenceLogicErrorWhenUseBoolType.expected
2021-03-28 23:42:36 +03:00
jorgectf
85ec82a389
Refactor in progress
2021-03-28 21:07:08 +02:00
jorgectf
95a1dae315
Precision warn and Remove CWE reference
2021-03-28 18:33:17 +02:00
jorgectf
719b48cbaf
Move to experimental folder
2021-03-28 18:33:17 +02:00
jorgectf
799d509f26
Upload LDAP Injection query, qhelp and tests
2021-03-28 18:33:16 +02:00
luchua-bc
5ce3f9d6ff
Update qldoc and enhance the query
2021-03-28 16:10:35 +00:00
Rasmus Lerchedahl Petersen
6d72b4fd39
Python: Limit pretty printing to relevant nodes
2021-03-27 03:10:43 +01:00
Rasmus Lerchedahl Petersen
16902c2f56
Python: handle default argument
2021-03-27 02:40:13 +01:00
Rasmus Lerchedahl Petersen
7a511c5682
Python: update naming
2021-03-27 02:20:59 +01:00
luchua-bc
a53cbc1631
Update qldoc and make the query more readable
2021-03-27 00:11:01 +00:00
Rasmus Lerchedahl Petersen
bd86388447
Python: Add typetracker to constrain attribute.
2021-03-27 01:07:15 +01:00
Rasmus Lerchedahl Petersen
bf81122fc6
Python: fix typo and add linebreaks
2021-03-26 23:37:19 +01:00
Rasmus Lerchedahl Petersen
e0352fe763
Python: remove deprecated section of qhelp file
2021-03-26 23:26:24 +01:00
luchua-bc
a72b1340eb
Add a comment on how to run the query
2021-03-26 16:51:43 +00:00
Rasmus Lerchedahl Petersen
44d62df3f7
Python: Fix model of TLS and add reference
2021-03-26 17:51:18 +01:00
Rasmus Lerchedahl Petersen
470b4d8658
Python: Add missing qldoc
2021-03-26 17:35:36 +01:00
Rasmus Lerchedahl Petersen
98dfe1a00a
Python: Elaborate qldoc and renames to match
2021-03-26 17:27:43 +01:00
Rasmus Lerchedahl Petersen
8155334fa7
Python: More elaborate qldoc
...
also refactor code to match
2021-03-26 15:57:07 +01:00
Chris Smowton
42b63a61ae
Add change note
2021-03-26 14:31:36 +00:00
Chris Smowton
3a274424ab
Convert fluent method models to csv and generalise to the three different variants of StrBuilder.
2021-03-26 14:31:36 +00:00
Chris Smowton
851317e34f
Add models for StrBuilder's fluent methods
2021-03-26 14:31:36 +00:00
Rasmus Lerchedahl Petersen
7d7cbc49db
Fix comments.
...
This induced fixing the code, since things were wired up wrongly.
Currently the only implementation of `insecure_connection_creation`
is `ssl.wrap_socket`,
which is also the sole target of py/insecure-default-protocol`,
so perhaps this part should be turned off?
2021-03-26 14:20:38 +01:00
Rasmus Lerchedahl Petersen
2e948da3b4
Python: suggested refactor
2021-03-26 13:08:45 +01:00
Rasmus Lerchedahl Petersen
1be2be843d
Python: update test expectations
2021-03-26 13:08:23 +01:00
Alexander Eyers-Taylor
b21672c81c
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com >
2021-03-26 11:15:46 +00:00
Rasmus Lerchedahl Petersen
e936540863
Python: remove internal import
2021-03-26 08:22:09 +01:00
Rasmus Lerchedahl Petersen
f1619f1ee8
Python: "source" -> "contextOrigin"
2021-03-26 08:18:11 +01:00
Rasmus Lerchedahl Petersen
f14fb3bf9e
Merge branch 'python-port-insecure-protocol' of github.com:yoff/codeql into python-port-insecure-protocol
2021-03-26 08:06:51 +01:00
yoff
936757b4bf
Update python/ql/src/Security/CWE-327/FluentApiModel.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-26 08:05:51 +01:00
luchua-bc
d33b04cd96
Query to detect plaintext credentials in Java properties files
2021-03-26 02:33:40 +00:00
Rasmus Lerchedahl Petersen
9488b8bb18
Python: actually rename
2021-03-26 00:31:56 +01:00
Rasmus Lerchedahl Petersen
554404575d
Python: fix typo and name.
2021-03-26 00:29:40 +01:00
Rasmus Lerchedahl Petersen
c93e0c08fd
Merge branch 'python-port-insecure-protocol' of github.com:yoff/codeql into python-port-insecure-protocol
2021-03-26 00:26:33 +01:00
yoff
54dad57cf4
Update python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-26 00:25:40 +01:00
Rasmus Lerchedahl Petersen
2b257318f1
Python: more precise comment
2021-03-25 23:22:24 +01:00
yoff
62a0775cf6
Update python/ql/src/Security/CWE-327/examples/secure_protocol.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-25 23:09:11 +01:00
Porcuiney Hairs
2ca95166d9
Java : add query to detect insecure loading of Dex File
2021-03-26 01:59:11 +05:30
alexet
2576c86ebf
Docs: Update the language specification for changes to super.
2021-03-25 18:16:13 +00:00
luchua-bc
57bd3f3c14
Optimize the taint flow source
2021-03-25 10:44:26 +00:00
luchua-bc
fe0e7f5eac
Change method check to taint flow
2021-03-25 01:45:13 +00:00
luchua-bc
08c3bf26d5
Update the query to accommodate more cases
2021-03-24 23:32:27 +00:00
haby0
3df23eecb6
Merge remote-tracking branch 'upstream/main' into JsonHijacking
2021-03-24 15:52:01 +08:00
Taus Brock-Nannestad
7cdf439b83
Python: Clean up basicStoreStep
...
Moves the `flowsTo` logic into the shared implementation, so that
`TypeTrackingPrivate` only has to define the shape of immediate store
steps.
Also cleans up the documentation to talk a bit more about what
`content` can represent, and what caveats there are.
2021-03-22 18:42:24 +01:00
Taus Brock-Nannestad
0e81fd2624
Python: Move Boolean into TypeTrackerPrivate
...
In general, this may be defined already for other languages, so moving
it in here will avoid potential clashes.
2021-03-22 18:41:22 +01:00
Rasmus Wriedt Larsen
c8a6e837b5
Python: Model QuerySet chains in django
2021-03-22 14:38:54 +01:00
Rasmus Wriedt Larsen
701b935564
Python: Add example of QuerySet chain (django)
2021-03-22 00:57:43 +01:00
Artem Smotrakov
6c24699403
Cover both javax.el and jakarta.el packages
2021-03-21 21:19:39 +03:00
Artem Smotrakov
adb1ed380a
Added tests for Jakarta expression injection
2021-03-21 21:19:39 +03:00
Artem Smotrakov
73e940de74
Added query for Jakarta EL injections
...
- Added JakartaExpressionInjection.ql
- Added a qhelp file with examples
2021-03-21 21:19:39 +03:00
yo-h
0200aedc2e
Java 16: adjust test options
2021-03-21 12:55:25 -04:00
ihsinme
26bac9f425
Apply suggestions from code review
...
Co-authored-by: Robert Marsh <rdmarsh2@gmail.com >
2021-03-21 15:25:29 +03:00
Dilan
1385b22642
pr fixes, typo in qhelp file and helper method for queries
2021-03-19 16:43:29 -07:00
yoff
164b383fda
Update python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-03-19 19:12:13 +01:00
Rasmus Lerchedahl Petersen
e0e6d5724e
Merge branch 'main' of github.com:github/codeql into python-port-insecure-protocol
2021-03-18 23:34:53 +01:00
haby0
15206fd2ce
JsonpInjection.ql autoformatted
2021-03-17 15:52:05 +08:00
haby0
98204a15a6
Fix the problem
2021-03-17 15:28:04 +08:00
Rasmus Lerchedahl Petersen
6fff746b16
Merge branch 'main' of github.com:github/codeql into python-port-insecure-protocol
2021-03-15 17:37:28 +01:00
Rasmus Lerchedahl Petersen
9a96230523
Python: Add changenote
2021-03-15 17:35:30 +01:00
Rasmus Lerchedahl Petersen
514a69c47a
Python: Support ssl.PROTOCOL_TLS_SERVER
...
and `ssl.PROTOCOL_TLS_CLIENT`
2021-03-15 17:30:01 +01:00
Rasmus Lerchedahl Petersen
87f3ba2684
Python: add tests for ssl.PROTOCOL_TLS_SERVER
...
and `ssl.PROTOCOL_TLS_CLIENT`
2021-03-15 17:24:39 +01:00
Rasmus Lerchedahl Petersen
731f4559b4
Python: update test expectations
2021-03-15 17:23:58 +01:00
Rasmus Lerchedahl Petersen
4094b18407
Python: Clean up tests
2021-03-15 16:28:08 +01:00
Rasmus Lerchedahl Petersen
41c9394b4b
Python: update qhelp and example
2021-03-14 09:22:47 +01:00
Taus Brock-Nannestad
f05313435d
Python: Move typePreservingStep into Private
2021-03-12 14:06:39 +01:00
Taus Brock-Nannestad
9b8056371f
Python: Make the type tracking implementation shareable
2021-03-12 13:51:24 +01:00
luchua-bc
1a2e341b7c
Refactor the business logic of the query into a separate predicate
2021-03-12 12:19:37 +00:00
luchua-bc
c8b1bc3a89
Enhance the query
2021-03-11 21:41:34 +00:00
luchua-bc
0a35feef76
Exclude CSRF cookies to reduce FPs
2021-03-11 17:28:07 +00:00
luchua-bc
eeac7e322a
Query to detect insecure configuration of Spring Boot Actuator
2021-03-11 13:46:32 +00:00
luchua-bc
a0a1ddee86
Update class name
2021-03-10 17:07:31 +00:00
luchua-bc
f0ddfc9283
Minor qldoc changes
2021-03-10 12:18:55 +00:00
luchua-bc
72f28513eb
Move test check to the sink
2021-03-10 12:12:27 +00:00
luchua-bc
48975fa7d2
Replace sanitizers
2021-03-10 00:17:26 +00:00
luchua-bc
31eaa80f5b
Revamp the source
2021-03-06 00:56:15 +00:00
Rasmus Lerchedahl Petersen
7d556b354d
Python: Update test annotation and expectation
2021-03-05 09:16:35 +01:00
luchua-bc
a93aabab40
Add the toString() method
2021-03-05 03:05:49 +00:00
luchua-bc
919c6b4b0a
Optimize flow steps
2021-03-05 02:50:54 +00:00
ihsinme
10cc574289
Add files via upload
2021-03-04 16:15:26 +03:00
ihsinme
01c13c4703
Add files via upload
2021-03-04 16:14:11 +03:00
haby0
c5577cb09a
Fix the problem
2021-03-04 19:54:49 +08:00
Rasmus Lerchedahl Petersen
d02c529872
Python: Update annotation
2021-03-04 00:06:36 +01:00
Rasmus Lerchedahl Petersen
de9469bbfc
Python: complete ssl.create_default_context
2021-03-04 00:01:44 +01:00
Rasmus Lerchedahl Petersen
ee03837357
Python: small refactor
2021-03-03 23:46:18 +01:00
Rasmus Lerchedahl Petersen
cbbc7b2bcd
Python: support unrestrictions
...
Also pyOpenSSL allows SSL 2 and SSL 3 on `SSLv23`
2021-03-03 23:42:48 +01:00
Rasmus Lerchedahl Petersen
97d26687fe
Python: Improve logic of bit fields
2021-03-03 17:50:47 +01:00
Rasmus Lerchedahl Petersen
7a1d953fca
Python: More tests
2021-03-03 17:50:47 +01:00
Rasmus Lerchedahl Petersen
60525ec301
Python: Also track offending call
...
update test expectations at this point
2021-03-03 17:50:47 +01:00
Rasmus Lerchedahl Petersen
9e696ff0fb
Python: Add false negative to test
2021-03-03 17:50:47 +01:00
Rasmus Lerchedahl Petersen
d5171fc043
Python: Comment everything
2021-03-03 17:50:47 +01:00
Rasmus Lerchedahl Petersen
3b856010f2
Python: add TODO comment
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
ea8c6f04e2
Python: Update old test and qlhelp
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
87e1a062ea
Python: fluent api tests
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
186db7f43e
Python: factor into modules and files
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
7ed018aff6
Python: refactor into modules
...
and turn on the pyOpenSSL module
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
72b37a5b1b
Python: factor out barrier
2021-03-03 17:50:46 +01:00
Rasmus Lerchedahl Petersen
86dde6eab1
Python: start of port
2021-03-03 17:50:46 +01:00
luchua-bc
502cf38fcc
Use concise API
2021-03-03 14:07:43 +00:00
luchua-bc
1b1c3f953b
Remove localflow from the source
2021-03-03 13:54:26 +00:00
luchua-bc
b366ffa69e
Revamp source of the query
2021-03-03 13:38:18 +00:00
luchua-bc
95d1994196
Query to check sensitive cookies without the HttpOnly flag set
2021-03-01 22:06:52 +00:00
haby0
f795d5e0d3
update JSONP Injection ql
2021-02-27 16:25:17 +08:00
haby0
0521ef87da
Merge remote-tracking branch 'upstream/main' into JsonHijacking
2021-02-25 16:31:14 +08:00
haby0
6fe8bafc7d
*)update
2021-02-24 20:59:51 +08:00
haby0
872a000a33
*)update to JSONP injection
2021-02-24 20:36:12 +08:00
haby0
8119fd2ad1
*)add JsonHijacking ql query
2021-02-18 18:11:10 +08:00
dilanbhalla
26b030f8cc
fixed pr suggestions
2020-07-07 10:52:26 -07:00
dilanbhalla
dc73fcc4e8
moved to experimental
2020-07-01 09:54:58 -07:00
dilanbhalla
dc58f6fa87
function/class synatax
2020-06-25 11:39:09 -07:00