Felicity Chapman
e96377572e
Merge pull request #10553 from github/8032-python-2-deprecation
...
Minor updates to reflect recommendations for Python support
2022-09-23 19:09:01 +01:00
Felicity Chapman
8920d73f38
Fix typo in footnote reference
2022-09-23 18:40:01 +01:00
Felicity Chapman
a7f23b9cc7
Minor updates to reflect recommendations for Python support
2022-09-23 18:40:01 +01:00
Dave Bartolomeo
87cc0481a0
Merge pull request #10543 from github/release-prep/2.11.0
...
Release preparation for version 2.11.0
2022-09-23 09:38:18 -04:00
Dave Bartolomeo
55b1d89fd3
More relevant change note
2022-09-23 09:29:09 -04:00
Dave Bartolomeo
e695630822
More relevant change note
2022-09-23 09:28:50 -04:00
Dave Bartolomeo
85bfc1d79e
More relevant change note
2022-09-23 09:27:47 -04:00
Dave Bartolomeo
a792a7005b
More relevant change note
2022-09-23 09:27:19 -04:00
github-actions[bot]
f5cf8cffa3
Release preparation for version 2.11.0
2022-09-22 20:14:12 +00:00
Dave Bartolomeo
cee0e8e137
Merge pull request #10532 from github/henrymercer/3.7-mergeback
...
Final mergeback from `rc/3.7`
2022-09-22 13:42:59 -04:00
Andrew Eisenberg
b58653eadc
Merge pull request #10458 from github/aeisenberg/qlpack-properties
...
Update qlpack properties descriptions
2022-09-22 07:54:17 -07:00
Mathias Vorreiter Pedersen
7272ca79fd
Merge pull request #10529 from erik-krogh/even-more-alerts
...
QL: A few more improvements to `ql/alert-message-style-violation`
2022-09-22 15:16:30 +01:00
Asger F
718649d505
Merge pull request #10490 from asgerf/js/remove-old-docs
...
JS: Remove old Portal-based flow summary implementation
2022-09-22 16:01:30 +02:00
Erik Krogh Kristensen
2fe6d1f562
Merge pull request #10470 from erik-krogh/flowParse
...
JS: Try to parse files without using our parser extensions before enabling the extensions
2022-09-22 14:58:43 +02:00
Alex Ford
140458b7cc
Merge pull request #9932 from alexrford/ruby/rbi-typegraph-fixes
...
Ruby: RBI library changes to support models-as-data model generation
2022-09-22 13:55:33 +01:00
erik-krogh
609ed709e2
use GVN to find detect when the alert-location is used as a link
2022-09-22 14:42:08 +02:00
erik-krogh
afdd7b0994
don't compute GVN for string constants of length more than 50, as this results in a infinite loop 😕
2022-09-22 14:41:21 +02:00
Erik Krogh Kristensen
6e6880bbe4
Merge pull request #10486 from erik-krogh/java-unqueryable
...
Java: Delete some unused code
2022-09-22 14:21:39 +02:00
erik-krogh
a8929b6400
deprecate RegExpFlags::getFlags instead of deleting it
2022-09-22 13:43:42 +02:00
erik-krogh
b61bd56d70
un-deprecate guardControls_v2
2022-09-22 13:42:50 +02:00
Tom Hvitved
f0f4fe7286
Merge pull request #10444 from hvitved/ruby/stmt-sequence-post-update
...
Ruby: Add post-update nodes for compound arguments
2022-09-22 13:18:51 +02:00
Henry Mercer
f8f99af8b7
Bump the minor version of packs we regularly release
2022-09-22 12:14:19 +01:00
erik-krogh
f404f1ddce
add change-note
2022-09-22 13:11:49 +02:00
Nick Rolfe
7d0bfe8f98
Merge pull request #10531 from github/nickrolfe/title-case
...
Ruby: use consistent capitalization with `import ... as`
2022-09-22 12:05:44 +01:00
Tom Hvitved
ad489155c4
Merge pull request #10469 from hvitved/csharp/dotnet-run-tracer-fix
...
C#: Prepend `-p:UseSharedCompilation=false` instead of append for `dotnet run`
2022-09-22 12:59:33 +02:00
Chris Smowton
adf5f18c03
Merge pull request #10530 from github/smowton/admin/kotlin-tolerate-beta-versions
...
Kotlin: Tolerate kotlinc versions like 1.7.20-Beta
2022-09-22 11:55:02 +01:00
Nick Rolfe
df8a182ac2
Ruby: use consistent capitalization with import ... as
2022-09-22 11:13:41 +01:00
Nick Rolfe
ee34ac5394
Merge pull request #10512 from github/nickrolfe/hash_from_trusted_xml
...
Ruby: add Hash.from_trusted_xml as an unsafe deserialization sink
2022-09-22 10:59:49 +01:00
Tom Hvitved
ac594842c8
Merge pull request #10504 from hvitved/ruby/private-methods
...
Ruby: Two fixes for `private` methods
2022-09-22 11:54:28 +02:00
AlexDenisov
26cf2b3bb1
Merge pull request #10522 from github/alexdenisov/switch-to-swift-5.7
...
Swift: update Swift frontend to 5.7
2022-09-22 11:53:04 +02:00
Tom Hvitved
10a584ffb9
Merge pull request #10517 from hvitved/ruby/regexp-debug
...
Ruby: Add query for debugging regexp flow
2022-09-22 11:50:50 +02:00
Henry Mercer
da272efe2d
Merge pull request #10527 from github/dependabot/github_actions/actions/stale-6
...
Bump actions/stale from 5 to 6
2022-09-22 10:31:17 +01:00
Asger F
df44076435
JS: Remove Portal-based flow summary implementation
2022-09-22 11:28:31 +02:00
Chris Smowton
c2656dd55f
Kotlin: Tolerate kotlinc versions like 1.7.20-Beta
2022-09-22 10:23:29 +01:00
Alex Denisov
b3ea537553
Swift: switch to python db schema
2022-09-22 11:17:14 +02:00
Alex Denisov
e4731fd41f
Swift: redirect more artfacts
2022-09-22 11:17:07 +02:00
Alex Denisov
d9cfd06a88
Swift: do not skip newly supported CLI args
2022-09-22 11:17:07 +02:00
Alex Denisov
44f4ff18dd
Swift: accept regression
2022-09-22 11:17:07 +02:00
Alex Denisov
ecb5708b66
Swift: fix static assert?
2022-09-22 11:17:07 +02:00
Alex Denisov
6a08b8dcfb
Swift: getSequence was renamed
2022-09-22 11:17:07 +02:00
Alex Denisov
b364647d76
Swift: add stubs for new exprs
2022-09-22 11:17:07 +02:00
Alex Denisov
d937234f83
Swift: add stubs for new types
2022-09-22 11:17:07 +02:00
Alex Denisov
13fe02edfa
Swift: NestedArchetypeType was removed
2022-09-22 11:17:04 +02:00
Alex Denisov
61d5cdc421
Swift: update Swift package to 5.7
2022-09-22 11:16:56 +02:00
Paolo Tranquilli
f3cc6ae5df
Merge pull request #10516 from github/redsun82/swift-python-schema
...
Swift: express the schema in Python
2022-09-22 11:12:27 +02:00
erik-krogh
1fbfcc1e91
add TODOs in the ql/alert-message-style-violation query
2022-09-22 07:02:38 +02:00
erik-krogh
76fef28c32
don't repeat the alert-location as a link
2022-09-22 07:02:36 +02:00
erik-krogh
88439fc61c
only report alert-message style-violations on problem/path-problem queries
2022-09-22 07:02:33 +02:00
dependabot[bot]
f63381b98a
Bump actions/stale from 5 to 6
...
Bumps [actions/stale](https://github.com/actions/stale ) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases )
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/stale/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-22 03:58:17 +00:00
Andrew Eisenberg
48f938ef26
Merge pull request #10500 from github/aeisenberg/query-spec-path
...
Update section on query specifiers
2022-09-21 13:02:30 -07:00
Andrew Eisenberg
6fb3574c5c
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2022-09-21 12:48:17 -07:00
Tom Hvitved
659f1cc6c7
C#: Add integration tests for dotnet run
2022-09-21 19:43:04 +02:00
Tom Hvitved
cc09a79cfa
C#: Prepend -p:UseSharedCompilation=false instead of append for dotnet run
2022-09-21 19:42:58 +02:00
Tom Hvitved
47411e3548
Ruby: Add query for debugging regexp flow
2022-09-21 19:22:10 +02:00
Erik Krogh Kristensen
0cae6deb27
Merge pull request #10513 from erik-krogh/more-alert-style
...
QL: improve the `ql/alert-message-style-violation` query.
2022-09-21 19:08:19 +02:00
Erik Krogh Kristensen
1bdb6b45f8
fix typo
...
Co-authored-by: Taus <tausbn@github.com >
2022-09-21 18:14:00 +02:00
Paolo Tranquilli
3983c36cb2
Swift: avoid inheriting annotations
2022-09-21 18:02:09 +02:00
Paolo Tranquilli
a67341c53b
Revert "Swift: make unknown entity type check more solid"
...
This reverts commit b52a4e19c1 .
2022-09-21 18:01:59 +02:00
erik-krogh
41c1e1a4c6
get the message, and not just the second select expression
2022-09-21 17:23:59 +02:00
erik-krogh
b61e094a86
recognize @kinds with a dash
2022-09-21 17:23:25 +02:00
Andrew Eisenberg
99e8cb78b0
Merge pull request #10496 from aeisenberg/aeisenberg/merge-rc3.7-into-main
...
Aeisenberg/merge rc3.7 into main
2022-09-21 08:09:47 -07:00
Paolo Tranquilli
b52a4e19c1
Swift: make unknown entity type check more solid
2022-09-21 16:44:34 +02:00
Paolo Tranquilli
fd63bab054
Swift: autopep8 test_schema.py
2022-09-21 16:15:52 +02:00
Paolo Tranquilli
163d1717d7
Swift: autopep8
2022-09-21 16:11:40 +02:00
Paolo Tranquilli
28a2aade21
Swift: undo double newlines in schema.py
2022-09-21 16:03:37 +02:00
Paolo Tranquilli
96897a0cdc
Swift: implement python schema
...
The information that was contained in `schema.yml` is now in
`swift/schema.py`, which allows a more integrated IDE experience
for writing and navigating it.
Another minor change is that `schema.Class` now has a `str` `group`
field instead of a `pathlib.Path` `dir` one.
2022-09-21 15:53:09 +02:00
Paolo Tranquilli
caaf9e7ff3
Swift: reorganize schema lib files
2022-09-21 15:50:26 +02:00
Paolo Tranquilli
b0e7dfcbdf
Swift: python schema mock-up
2022-09-21 15:39:18 +02:00
Alex Ford
260db1aea2
Ruby: drop getAQualifiedName predicate from ConstantAccess
2022-09-21 14:28:43 +01:00
Alex Ford
3bbb166642
Ruby: handle block param types more neatly
2022-09-21 13:52:19 +01:00
Tamás Vajk
82c3e53694
Merge pull request #10473 from tamasvajk/kotlin-suspend
...
Kotlin: Extract `suspend` functions
2022-09-21 14:22:44 +02:00
Mathias Vorreiter Pedersen
25d1098b4d
Merge pull request #10511 from github/redsun82/swift-ifconfigdecl-ql
...
Swift: fix `IfConfigDecl` in QL libraries
2022-09-21 13:15:27 +01:00
Ian Lynagh
46a23e107b
Merge pull request #10495 from igfoo/igfoo/traplocker
...
Kotlin: Tidy up TrapLocker
2022-09-21 13:05:58 +01:00
Ian Lynagh
aaa3fc0b5c
Merge pull request #10353 from tamasvajk/kotlin-fix-not-implemented
...
Kotlin: Catch exception thrown by kotlinc
2022-09-21 13:05:41 +01:00
erik-krogh
362ee71f6a
recognize alert messages defined in the where clause
2022-09-21 14:03:16 +02:00
erik-krogh
84aee871fe
find more cases of alert messages starting with a lower-case letter, or not ending with a full stop
2022-09-21 14:03:14 +02:00
erik-krogh
b87befcc36
add check for double-whitespace in alert-messages
2022-09-21 14:03:10 +02:00
Nick Rolfe
2edbc16829
Ruby: add Hash.from_trusted_xml as an unsafe deserialization sink
2022-09-21 13:01:21 +01:00
Tom Hvitved
61e9c6f658
Ruby: Fix call graph for overridden private methods
2022-09-21 14:00:17 +02:00
Tom Hvitved
e7649fc61a
Ruby: Fix ModuleBase::get(A)Method for private methods
2022-09-21 14:00:17 +02:00
Tom Hvitved
37a2b7d0b3
Ruby: Add more call graph tests for private methods
2022-09-21 14:00:17 +02:00
Paolo Tranquilli
935d5d9619
Merge branch 'main' into redsun82/swift-ifconfigdecl-ql
2022-09-21 13:21:08 +02:00
Paolo Tranquilli
86895393e0
Merge pull request #10488 from github/alexdenisov/skip-another-cli-arg
...
Swift: skip one more unsupported CLI arg
2022-09-21 13:20:03 +02:00
Tom Hvitved
a9f2e5272f
Merge pull request #10376 from hvitved/ruby/no-ast-by-default
...
Ruby: Do not expose AST layer through `ruby.qll`
2022-09-21 13:15:30 +02:00
Michael Nebel
e53382cffa
Merge pull request #10465 from michaelnebel/csharp/integration-tests
...
C#: Integration test(s)
2022-09-21 12:24:54 +02:00
Paolo Tranquilli
76dfcad26e
Merge pull request #10508 from github/redsun82/swift-early-toposort
...
Swift: move toposort in `schema.py`
2022-09-21 12:17:53 +02:00
Paolo Tranquilli
239ec74c3a
Revert accidental file change
2022-09-21 12:16:57 +02:00
Paolo Tranquilli
69dfdf5a34
Swift: fix IfConfigDecl in QL libraries
...
This fixes `IfConfigDecl` for both the AST printer and control flow
libraries.
It turns out that the active lements of an `IfConfigDecl` are already
listed in the enclosing scope (like a `BraceStmt`), so they should not
be listed as children, and `IfConfigDecl` can be jsut a leaf in the
control flow.
2022-09-21 12:12:55 +02:00
Geoffrey White
ce979d82d9
Merge pull request #10300 from geoffw0/cleartext-perf
...
C++: Multiple minor improvements to the cpp/cleartext-* queries
2022-09-21 11:07:51 +01:00
Tom Hvitved
0064451ff0
Merge pull request #10491 from hvitved/ruby/fix-bad-join
...
Ruby: Fix bad join-order
2022-09-21 11:13:09 +02:00
Michael Nebel
d29bc683dc
C#: Integration test for 'dotnet test'.
2022-09-21 11:03:45 +02:00
Michael Nebel
a5034c5109
C#: Integration test for 'dotnet pack'.
2022-09-21 11:03:45 +02:00
Michael Nebel
5572a039b1
C#: Integration test for 'dotnet publish'.
2022-09-21 11:03:45 +02:00
Tom Hvitved
07f8b35af0
Data flow: Update documentation
2022-09-21 11:02:24 +02:00
Tom Hvitved
db8b6ac69a
Data flow: Sync files
2022-09-21 11:02:24 +02:00
Tom Hvitved
59caa977d0
Ruby: Add post-update nodes for compound arguments
2022-09-21 11:02:24 +02:00
Paolo Tranquilli
a50f3f752b
Swift: move toposort in schema.py
...
This makes the result of code generation independent of the order
in which classes are defined in the schema, and makes additional
topological sorting not required.
Being independent from schema order will be important for reviewing the
move to a pure python schema, as generated code will be left untouched.
2022-09-21 10:49:12 +02:00
Erik Krogh Kristensen
5af739d920
Merge pull request #10413 from erik-krogh/go-followMsg
...
GO: make the alert messages of taint-tracking queries more consistent
2022-09-21 10:39:27 +02:00
Tom Hvitved
1f4573cf25
Ruby: Add more field flow tests
2022-09-21 10:32:38 +02:00
Tony Torralba
9979fa3f36
Merge pull request #10501 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-21 09:10:09 +02:00
github-actions[bot]
84159317ee
Add changed framework coverage reports
2022-09-21 00:22:14 +00:00
Andrew Eisenberg
4faf71a966
Update section on query specifiers
2022-09-20 15:55:06 -07:00
Erik Krogh Kristensen
7e17a919ae
Merge pull request #10304 from erik-krogh/rb-followMsg
...
RB: make the alert messages of taint-tracking queries more consistent
2022-09-20 22:58:31 +02:00
erik-krogh
175d3acf4d
reword alert-message go/user-controlled-bypass to avoid using "here"
2022-09-20 22:51:35 +02:00
erik-krogh
83bedc0320
be more specific about what the source is in go/suspicious-character-in-regex, which also avoids using "here" in the alert-message
2022-09-20 22:51:35 +02:00
erik-krogh
1be14962a0
use "depends to" for a taint-tracking query
2022-09-20 22:51:35 +02:00
erik-krogh
c241185c21
avoid more instances of "this location" and "here" in alert-messages
2022-09-20 22:51:35 +02:00
erik-krogh
2602a38d94
update expected test output
2022-09-20 22:51:35 +02:00
erik-krogh
3cf5516df6
make the alert messages of taint-tracking queries more consistent
2022-09-20 22:51:35 +02:00
erik-krogh
e2a41cf49f
fix most ql/alert-message-style-violation
2022-09-20 22:51:35 +02:00
Andrew Eisenberg
58e4861b45
Merge branch 'main' into rc/3.7
2022-09-20 12:43:20 -07:00
yoff
18a8a3332d
Merge pull request #10494 from RasmusWL/tarslip-test-imports
...
Python: Fix imports for tarslip tests
2022-09-20 20:04:14 +02:00
yoff
6b589c5d5d
Merge pull request #10387 from RasmusWL/getStarArg-always-first
...
Python: `getStarArg` gives first `*args` argument
2022-09-20 20:01:07 +02:00
Geoffrey White
9ddb485405
Merge branch 'main' into cleartext-perf
2022-09-20 17:56:18 +01:00
Rasmus Wriedt Larsen
253d9cf39f
Python: Fix imports for tarslip tests
...
This doesn't change results, but makes the test-code more valid
2022-09-20 17:25:46 +02:00
Mathias Vorreiter Pedersen
b49487cf42
Merge pull request #10386 from github/redsun82/swift-do-not-extract-inactive-ifconfig-clauses
...
Swift: do not extract unresolved things from `IfConfigDecl`
2022-09-20 15:57:47 +01:00
Paolo Tranquilli
0f74674319
Merge pull request #10492 from github/redsun82/bazel-codeowners
...
Bazel: add some bazel files to `CODEOWNERS`
2022-09-20 16:50:37 +02:00
Mathias Vorreiter Pedersen
9d50fc6aa3
Merge pull request #10487 from MathiasVP/fix-identical-files-for-cpp
...
C++: Add shared files in `experimental` to `identical-files.json`.
2022-09-20 15:43:43 +01:00
Paolo Tranquilli
5df4ca808f
Bazel: add some bazel files to CODEOWNERS
2022-09-20 16:31:05 +02:00
Tom Hvitved
2677ab6b19
Ruby: Fix bad join-order
...
Before
```
Evaluated relational algebra for predicate Module#fe82a56b::lookupMethodOrConst0#2#fff#antijoin_rhs@e23c32nf with tuple counts:
118006 ~0% {3} r1 = SCAN Module#fe82a56b::getMethodOrConst#2#fff OUTPUT In.1, In.0, In.2
35267848 ~3% {4} r2 = JOIN r1 WITH project#Module#fe82a56b::getMethodOrConst#2#fff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Rhs.1
21883 ~0% {5} r3 = JOIN r2 WITH Module#fe82a56b::Cached::getAPrependedModule#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.0, Lhs.1, Lhs.2
7 ~16% {3} r4 = JOIN r3 WITH Module#fe82a56b::getAncestors#1#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4
return r4
```
After
```
Evaluated relational algebra for predicate Module#fe82a56b::lookupMethodOrConst0#2#fff#antijoin_rhs@839f6a1k with tuple counts:
118006 ~1% {3} r1 = SCAN Module#fe82a56b::getMethodOrConst#2#fff OUTPUT In.0, In.2, In.1
151 ~0% {4} r2 = JOIN r1 WITH Module#fe82a56b::Cached::getAPrependedModule#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
155 ~1% {4} r3 = JOIN r2 WITH Module#fe82a56b::getAncestors#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.1, Lhs.2
7 ~0% {3} r4 = JOIN r3 WITH project#Module#fe82a56b::getMethodOrConst#2#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.1
return r4
```
2022-09-20 16:24:39 +02:00
Ian Lynagh
6e249dad7f
Kotlin: TrapLocker: Pass the TRAP file to be opened
...
We already know what it is, as we've just locked it.
2022-09-20 15:12:58 +01:00
Erik Krogh Kristensen
0720fa75df
Merge pull request #10286 from erik-krogh/js-followMsg
...
JS: change alert messages of path queries to use the same template
2022-09-20 16:12:45 +02:00
Tony Torralba
cbb64cc8c1
Merge pull request #10352 from atorralba/atorralba/promote-template-injection
...
Java: Promote Server-side template injection from experimental
2022-09-20 16:11:58 +02:00
Ian Lynagh
2731740c67
Kotlin: TrapLocker: Remove unused isNonSourceTrapFile
2022-09-20 15:07:35 +01:00
Paolo Tranquilli
b4df557c5a
Merge branch 'main' into redsun82/swift-do-not-extract-inactive-ifconfig-clauses
2022-09-20 15:41:34 +02:00
Paolo Tranquilli
3fd8136dc7
Swift: accept test results
2022-09-20 15:37:09 +02:00
AlexDenisov
4614074d01
Merge pull request #10452 from github/alexdenisov/remove-swift-vfs
...
Swift: remove (dead) VFS related code
2022-09-20 15:36:58 +02:00
Paolo Tranquilli
d0e3edf7ad
Merge pull request #10482 from github/redsun82/swift-action-triggers
...
Swift: trigger workflows on bazel changes
2022-09-20 15:33:33 +02:00
Tom Hvitved
647397759e
Merge pull request #10336 from hvitved/ruby/call-graph-rework
...
Ruby: Rework call graph implementation
2022-09-20 15:29:40 +02:00
Paolo Tranquilli
250965b140
Swift: update extractor for TypeRepr changes
2022-09-20 15:24:51 +02:00
Mathias Vorreiter Pedersen
90f24d3e82
Merge pull request #10430 from geoffw0/cleartextmissing
...
Swift: Fix missing results in swift/cleartext-storage-database
2022-09-20 14:23:29 +01:00
Paolo Tranquilli
dfc91bb0f0
Swift: make type non optional in TypeRepr
2022-09-20 15:23:27 +02:00
Paolo Tranquilli
72a4bd3f1e
Swift: group unresolved elements and remove their tests
2022-09-20 15:22:20 +02:00
Nick Rolfe
30b54b2abe
Merge pull request #10450 from github/nickrolfe/filesystemresolver
...
Ruby: model ActionView::FileSystemResolver as a FileSystemAccess
2022-09-20 14:21:28 +01:00
Paolo Tranquilli
0e62d6f123
Swift: update extractor to new IfConfigDecl
2022-09-20 15:12:37 +02:00
Paolo Tranquilli
7ae68fcc03
Swift: rework IfConfigDecl schema
2022-09-20 15:11:58 +02:00
Alex Denisov
c020bee529
Swift: remove VFS related code
2022-09-20 15:06:25 +02:00
Alex Denisov
dafa9d24f1
Swift: skip one more unsupported CLI arg
2022-09-20 15:04:54 +02:00
Mathias Vorreiter Pedersen
74ccec75c8
C++: Sync identical files.
2022-09-20 13:37:54 +01:00
Mathias Vorreiter Pedersen
351e517786
Update config/identical-files.json
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-09-20 13:34:31 +01:00
Paolo Tranquilli
9fb4ff70b4
Merge branch 'main' into redsun82/swift-action-triggers
2022-09-20 14:23:22 +02:00
Asger F
0294444054
JS: Remove docs for the old portal-based flow summaries
2022-09-20 14:20:46 +02:00
yoff
ea743173d5
Merge pull request #8781 from yoff/python-dataflow/flow-summaries-from-scratch
...
Python dataflow: flow summaries restart
2022-09-20 14:08:31 +02:00
Mathias Vorreiter Pedersen
79654d978d
C++: Sync identical files.
2022-09-20 12:57:21 +01:00
Mathias Vorreiter Pedersen
e661c981e4
C++: Add shared files in experimental to 'identical-files.json'.
2022-09-20 12:53:43 +01:00
AlexDenisov
805aa94799
Merge pull request #10485 from github/redsun82/swift-fix-version-in-integration-tests
...
Swift: fix version in integration tests
2022-09-20 13:44:50 +02:00
Rasmus Lerchedahl Petersen
318e3290f2
Python: use "extracted" instead of "source"
...
The precedence for the use of "source" to denote elements of source code
is found in `EssaVariable::getSourceVariable` as well as in the Ruby
code base. But it clashes with the many uses of source to mean
"source of flow" found in the data flow library.
2022-09-20 13:26:04 +02:00
Erik Krogh Kristensen
38b23f1bc1
Merge pull request #10471 from erik-krogh/tooRacy
...
JS: filter out "file read after existence check" from js/file-system-race
2022-09-20 13:22:06 +02:00
Erik Krogh Kristensen
72d326126a
Merge pull request #10476 from erik-krogh/ruby-unqueryable
...
ruby: remove unused predicate from NfaUtilsSpecific
2022-09-20 13:21:44 +02:00
Geoffrey White
3573dd6728
Swift: Address review comments.
2022-09-20 12:17:21 +01:00
Paolo Tranquilli
45fc1d5cdf
Swift: fix version in integration tests
2022-09-20 12:51:48 +02:00
Chris Smowton
f826342112
Merge pull request #6246 from Marcono1234/marcono1234/annotation-improvements
...
Java: Improve and add predicates and classes for annotations
2022-09-20 11:48:29 +01:00
Rasmus Lerchedahl Petersen
9a7afa9d8d
Python: more idiomatic cartesian product
2022-09-20 12:47:56 +02:00
erik-krogh
70eced62b6
delete unused predicate that couldn't be imported from outside the folder
2022-09-20 12:40:39 +02:00
erik-krogh
8eefa4c1b0
deprecate internal predicate that was never used
2022-09-20 12:39:41 +02:00
erik-krogh
bec381a1dc
remove unused predicate from NfaUtilsSpecific.qll
2022-09-20 12:38:34 +02:00
Erik Krogh Kristensen
91f9e89e95
Merge pull request #10405 from erik-krogh/styleGuide
...
update the style guide on alert-messages
2022-09-20 12:13:32 +02:00
Erik Krogh Kristensen
cd71546915
Merge pull request #10475 from erik-krogh/go-unqueryable
...
Go: Fix source/sanitizer class that were never used
2022-09-20 12:12:33 +02:00
Erik Krogh Kristensen
d1e662dff4
Merge pull request #10472 from erik-krogh/rename
...
JS: don't mention classes that don't exist in TaintTracking.qll
2022-09-20 12:08:15 +02:00
Tony Torralba
4af29e6abf
Update java/ql/src/Security/CWE/CWE-094/TemplateInjection.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-09-20 11:48:40 +02:00
Tony Torralba
4997f36f05
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-09-20 11:48:18 +02:00
Chris Smowton
6b9d546eaf
Merge pull request #10457 from github/smowton/fix/java-really-unique-fixedHasLocation
...
Java: really return a unique location for non-source entities
2022-09-20 10:46:45 +01:00
Mathias Vorreiter Pedersen
7c41219376
Merge pull request #10438 from MathiasVP/invalid-pointer-deref-query
...
C++: Add a `cpp/invalid-pointer-deref` query to experimental
2022-09-20 10:41:31 +01:00
Chris Smowton
14fa6d4487
Avoid deprecated Annotation.getAValue
2022-09-20 10:15:23 +01:00
AlexDenisov
addab0964f
Merge pull request #10447 from github/alexdenisov/open-interception
...
Swift: open(2) interception
2022-09-20 10:47:58 +02:00
Paolo Tranquilli
9d3039f2b1
Swift: trigger workflows on bazel changes
...
The `*.bazel*` trigger currently matches
* `.bazelrc`
* `.bazelversion`
* `WORKSPACE.bazel`
* `BUILD.bazel`
It will match `MODULE.bazel` as well when we add that.
2022-09-20 10:44:16 +02:00
Michael Nebel
eefe457c4b
Merge pull request #10238 from michaelnebel/csharp/theoremsforfree
...
C#: Theorems for Free - Model generation
2022-09-20 09:30:10 +02:00
Alex Denisov
9401eda8da
Swift: use http_archive instead of new_git_repository since it's faster
2022-09-20 08:38:27 +02:00
Alex Ford
52305da5a3
Ruby: move string getAQualifiedName() up to ConstantAccess
2022-09-19 21:03:05 +01:00
Alex Ford
d00c9ea2c8
Ruby: RBI library improvements, mostly for parameter types
2022-09-19 21:03:05 +01:00
Alex Ford
8d264e7e65
Ruby: add ConstanReadAcess#getAQualifiedName() predicate
2022-09-19 21:03:05 +01:00
Andrew Eisenberg
714e95ea57
Merge pull request #10468 from github/aeisenberg/docs-redirect
2022-09-19 12:27:04 -07:00
Tom Hvitved
01a043ddbd
Merge pull request #10464 from michaelnebel/csharp/remove-dotnet-run-support
...
C#: Remove `dotnet run` support in LUA tracer.
2022-09-19 20:25:54 +02:00
Michael Nebel
6e3bc38acf
C#: Fix minor issues in QL doc.
2022-09-19 16:03:50 +02:00
erik-krogh
0645b11cb1
ruby: remove unused predicate from NfaUtilsSpecific
2022-09-19 15:25:00 +02:00
erik-krogh
49d1e584a8
deprecate a source class that wasn't used anywhere
2022-09-19 15:07:18 +02:00
erik-krogh
f6ada6e022
use sanitizer class in the insecure-randomness query
2022-09-19 15:07:00 +02:00
Rasmus Wriedt Larsen
556e93ae68
Merge pull request #10384 from RasmusWL/callnode-getargbyname
...
Python: Allow `CallNode.getArgByName` for keyword args after `**kwargs`
2022-09-19 15:05:59 +02:00
yoff
f7cbcb2fef
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-19 14:52:18 +02:00
Rasmus Lerchedahl Petersen
6377e6c575
Python: move summary to Stdlib.qll
2022-09-19 14:36:36 +02:00
Rasmus Lerchedahl Petersen
f560719a88
Python: expand comment on flow summaries
2022-09-19 14:30:53 +02:00
Tom Hvitved
bb08e6f0fd
Ruby: Three call graph fixes for singleton methods
2022-09-19 14:20:12 +02:00
Tom Hvitved
d13332cff1
Ruby: Add more call graph tests
2022-09-19 14:19:25 +02:00
Rasmus Lerchedahl Petersen
da39c14e46
Python: comment out SummarizedCallableFromModel
2022-09-19 14:06:21 +02:00
Rasmus Lerchedahl Petersen
37fb27fa1c
Python: change type of LibraryCallable::getACall
...
The other callables return control flow nodes,
so it is slightly inconsistent for this to return a
data flow node, but it does make models based
on API graphs nicer.
2022-09-19 14:02:52 +02:00
Tamas Vajk
9a6b17df0e
Kotlin: Add async-await dataflow test case
2022-09-19 13:38:48 +02:00
Tamas Vajk
85d883c647
Kotlin: add test to show suspend function inconsistency between source and bytecode extraction
2022-09-19 13:38:43 +02:00
erik-krogh
58851aefd6
don't mention classes that don't exist in TaintTracking.qll
2022-09-19 13:37:06 +02:00
Tamas Vajk
a6e44ed1cf
Kotlin: extract suspend modifier and handle suspend SAM conversions
2022-09-19 13:36:28 +02:00
Tamas Vajk
3e58605e8e
Kotlin: Add tests with suspend functions
2022-09-19 13:28:20 +02:00
erik-krogh
fb5a04a71d
filter out "file read after existence check" from js/file-system-race
2022-09-19 13:26:10 +02:00
Tamas Vajk
aae8f393fe
Kotlin: Adjust test to reduce overhead of listing modifiers of lambdas
2022-09-19 13:22:00 +02:00
erik-krogh
ccae0933c7
try to parse JS files without using the supported extensions
2022-09-19 12:20:20 +02:00
erik-krogh
a16233aa7d
add failing parse test
2022-09-19 12:16:45 +02:00
Michael Nebel
d0c6837a79
C#: Do not recognize 'run' as supported dotnet command for tracing.
2022-09-19 11:37:46 +02:00
Erik Krogh Kristensen
a4cd913aea
Merge pull request #10312 from erik-krogh/fix-caseDiff
...
ensure consistent casing of names
2022-09-19 10:43:12 +02:00
Alex Denisov
3c12644ab1
Swift: add a guard around hashing to aboid use-after-destructor
2022-09-19 10:37:26 +02:00
CodeQL CI
b48808778f
Merge pull request #10264 from yoff/python/port-RaisesTuple
...
Approved by tausbn
2022-09-19 00:51:29 -07:00
CodeQL CI
ed4b64b1c4
Merge pull request #10265 from yoff/python/port-UnguardedNextInGenerator
...
Approved by tausbn
2022-09-19 00:50:52 -07:00
CodeQL CI
36f8b0554d
Merge pull request #10266 from yoff/python/port-CatchingBaseException
...
Approved by tausbn
2022-09-19 00:50:05 -07:00
Asger F
ab296d4d62
Merge pull request #10396 from asgerf/js/regexp-always-matches-fp
...
JS: Fix FP in js/regexp/always-matches
2022-09-19 09:32:00 +02:00
Andrew Eisenberg
e6eaf37e22
Add redirect for removed 'About QL packs' article
...
Note that sphinx gives an error if you have a document to build that
is not part of a toctree. In order to avoid this error and not show
the document in any toctree that users will see, I added a hidden
toctree to the redirect article.
2022-09-18 10:45:59 -07:00
Tom Hvitved
a8cc669251
Ruby: Address review comments
2022-09-18 19:34:54 +02:00
Tom Hvitved
9004e82820
Ruby: Add another call graph test
2022-09-18 19:34:00 +02:00
Mathias Vorreiter Pedersen
02076074ff
C++: Add more comments.
2022-09-18 12:48:13 +01:00
Mathias Vorreiter Pedersen
3e6576bfaf
C++: Add example of missing result.
2022-09-18 12:18:04 +01:00
Mathias Vorreiter Pedersen
d1cf688abf
C++: Fix test function naming.
2022-09-18 12:17:46 +01:00
Mathias Vorreiter Pedersen
78535dc70b
C++: Autoformat.
2022-09-18 12:02:32 +01:00
Michael Nebel
a464e5be72
C#: Address review comments.
2022-09-17 13:51:03 +02:00
Andrew Eisenberg
13d4c4a5b9
Merge pull request #10460 from github/aeisenberg/lang-spec-packs
...
Updates the library path section of the CodeQL spec
2022-09-16 15:01:43 -07:00
Andrew Eisenberg
867e31693d
Updates the library path section of the CodeQL spec
...
- Remove references to `queries.xml`. It is still supported, but we
don't want people using it.
- Add reference to `codeql-pack.yml`. It is just an alias for
`qlpack.yml` and not being used.
- Remove reference to `libraryPathDependencies` and use `dependencies`
instead.
Note that this section does not give a complete description of library
paths. That will be a part of the "Developing a codeql pack" article
that is forthcoming.
2022-09-16 14:31:17 -07:00
Andrew Eisenberg
bbf09c8f8a
Update qlpack properties descriptions
...
Makes table easier to read.
2022-09-16 12:53:27 -07:00
Tom Hvitved
29bfb4d185
Ruby: Revert changes to isLocalSourceNode and localFlowStepTypeTracker
...
Instead, use small-step type tracking, as suggested by @rasmuswl offline.
2022-09-16 19:38:26 +02:00
Chris Smowton
3fa1f17b83
Java: really return a unique location for non-source entities
...
This was always supposed to pick one of several candidate non-source locations (usually for a generic type instantiation), but since `getFile().toString()` just produces the basename of the class file actually the results would almost always tie and all of the candidate locations would be returned. Use the full class file path as a tiebreaker instead.
2022-09-16 18:23:31 +01:00
Ian Lynagh
4a4cd8a770
Merge pull request #10456 from github/post-release-prep/codeql-cli-2.10.5
...
Post-release preparation for codeql-cli-2.10.5
2022-09-16 17:18:05 +01:00
Mathias Vorreiter Pedersen
dc00643ad1
C++: More QLDoc.
2022-09-16 17:14:29 +01:00
Mathias Vorreiter Pedersen
031f20a0eb
C++: Respond to review comments.
2022-09-16 16:19:06 +01:00
Chris Smowton
0ab5d466f6
Update test expectations now that the Java extractor's nested annotation handling has been fixed
2022-09-16 15:50:54 +01:00
Anders Schack-Mulligen
1945f185ed
Apply suggestions from code review
...
Autoformat
2022-09-16 15:49:16 +01:00
Marcono1234
c8b922937b
Java: Extend AnnotationType.isATargetType documentation
2022-09-16 15:49:16 +01:00
Marcono1234
37b18914ac
Java: Add annotation tests
2022-09-16 15:49:16 +01:00
Marcono1234
8c9bdeb3be
Java: Address Annotation review comments and add change note
2022-09-16 15:49:16 +01:00
Marcono1234
659a3a7925
Java: Deprecate RetentionAnnotation.getRetentionPolicyExpression()
2022-09-16 15:49:16 +01:00
Marcono1234
90a9364b00
Java: Rename Annotation.getAnArrayValue with index
...
As mentioned by smowton during review, the predicate only has a single result
due to being restricted by the index and therefore its name should not start
with "getA...".
Also remove deprecated `getAValue(string, int)` because it never existed on
the `main` branch.
2022-09-16 15:49:16 +01:00
Marcono1234
4ef2d156c4
Java: Deprecate error-prone and rarely used annotation predicates
2022-09-16 15:49:16 +01:00
Marcono1234
e3c1b96830
Java: Fix incorrect annotation handling for SpringControllerRequestMappingGetMethod
2022-09-16 15:49:16 +01:00
Marcono1234
998aa95eae
Java: Add convenience array value Annotation predicates
2022-09-16 15:49:16 +01:00
Marcono1234
47e38952d1
Java: Improve Annotation.getAnAssociatedAnnotation
...
As suggested by smowton during review.
2022-09-16 15:49:16 +01:00
Marcono1234
fd5fdd89d9
Java: Rename Annotation.getAValue predicates for array values
...
Predicate name could lead to confusion with non-array predicate getAValue()
2022-09-16 15:49:16 +01:00
Marcono1234
b96061aa7e
Java: Rename Annotation value predicates
2022-09-16 15:49:16 +01:00
Marcono1234
c226758889
Java: Add classes and predicates for @Repeatable
2022-09-16 15:49:16 +01:00
Marcono1234
02c8fe9346
Java: Add convenience predicates for AnnotationType
2022-09-16 15:49:16 +01:00
Marcono1234
f69b6eef7a
Java: Clarify that Annotatable predicates consider inherited annotations
...
Additionally changes `hasAnnotation()` to consider inherited annotations
for consistency.
2022-09-16 15:49:16 +01:00
Marcono1234
afb7462052
Java: Clarify that Annotation value predicates have default value as result
2022-09-16 15:49:15 +01:00
Marcono1234
536f5c7f89
Java: Add Annotation value convenience predicates
2022-09-16 15:49:15 +01:00
Chris Smowton
3165babc88
Merge pull request #10445 from smowton/smowton/fix/annotaton-array-trap-label
...
Java: Add test for annotations with annotation-array-typed fields
2022-09-16 15:45:36 +01:00
github-actions[bot]
67ce442674
Post-release preparation for codeql-cli-2.10.5
2022-09-16 14:23:44 +00:00
Mathias Vorreiter Pedersen
f14df6426e
Merge pull request #10455 from geoffw0/cleartexttest
...
Swift: Update test for swift/cleartext-transmission
2022-09-16 14:59:30 +01:00
yoff
0703b88f92
Merge pull request #10404 from RasmusWL/update-range-pattern
...
Docs: Use `instanceof` in `::Range` pattern description
2022-09-16 15:18:35 +02:00
Tony Torralba
e140f04881
Merge pull request #10393 from zbazztian/uri-constructor-flow
...
Java: Model taint flow for java.net.URI constructors in tainted path queries
2022-09-16 15:10:40 +02:00
Tony Torralba
3141fdae72
Address review comments re: flow states
2022-09-16 14:48:30 +02:00
Geoffrey White
213cd94047
Swift: Update the test.
2022-09-16 13:24:37 +01:00
Anders Schack-Mulligen
e6d4e87458
Merge pull request #10416 from aschackmull/java/dispatch-confidence
...
Java: Remove low confidence dispatch for which we have a manual summary.
2022-09-16 13:36:04 +02:00
Alex Denisov
d6d8480b2a
Swift: fix internal builds
2022-09-16 12:59:43 +02:00
Chris Smowton
80968eef47
Add test for annotations with annotation-array-typed fields
2022-09-16 11:30:16 +01:00
James Fletcher
bc93a22e7d
Merge pull request #10449 from github/jf205-patch-1
...
Correct link to API docs for 'Get a CodeQL database for a repository'
2022-09-16 11:13:20 +01:00
Alex Denisov
c638789f3e
Swift: open(2) interception
2022-09-16 12:02:16 +02:00
erik-krogh
abb5c38bcd
move the guides on link-texts into a new subsection
2022-09-16 11:56:52 +02:00
erik-krogh
e3990e824d
add a line about link texts
2022-09-16 11:52:27 +02:00
Erik Krogh Kristensen
9e56128498
apply suggestions from doc review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-16 11:46:06 +02:00
Anders Schack-Mulligen
9714497268
Java: Add change note.
2022-09-16 11:14:44 +02:00
Sebastian Bauersfeld
8c35803749
Add more details to change note.
2022-09-16 16:11:34 +07:00
Anders Schack-Mulligen
726772220c
Merge pull request #10191 from smowton/smowton/admin/java-implicit-this-type-tests
...
Java: Add test regarding the type of an implicit `this` expression
2022-09-16 10:58:48 +02:00
Tony Torralba
fdc8453a59
Introduce TaintedPathAdditionalTaintStep
...
Use separate configurations for tainted path and tainted path local again.
2022-09-16 10:42:15 +02:00
Nick Rolfe
b5d648a6b0
Ruby: model ActionView::FileSystemResolver as a FileSystemAccess
2022-09-16 09:24:14 +01:00
James Fletcher
8e30754356
Update download-github-database.rst
2022-09-16 09:22:32 +01:00
Tom Hvitved
ac4d4ff613
Ruby: Rework call graph implementation
2022-09-16 10:22:26 +02:00
Tom Hvitved
41c45c26bc
Ruby: Add more call graph tests, and make calls.rb interpretable by irb
2022-09-16 10:22:20 +02:00
AlexDenisov
d8b000fae3
Merge pull request #10448 from github/alexdenisov/swift-xcode-14
...
Swift: skip more unsupported CLI args (new in Xcode 14)
2022-09-16 10:08:21 +02:00
Sebastian Bauersfeld
95478f1af6
Address review comments.
2022-09-16 14:35:30 +07:00
Alex Denisov
2b12aece63
Swift: skip more unsupported CLI args (new in Xcode 14)
2022-09-16 09:24:20 +02:00
Anders Schack-Mulligen
142d9eb6ef
Merge pull request #10446 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-16 09:00:33 +02:00
github-actions[bot]
0e1aca547b
Add changed framework coverage reports
2022-09-16 00:23:05 +00:00
Erik Krogh Kristensen
f648dd4a2e
Merge pull request #10443 from erik-krogh/moreNames
...
QL: recognize the names from all VarDefs
2022-09-15 22:34:17 +02:00
erik-krogh
af045a025d
Merge branch 'main' into moreNames
2022-09-15 21:04:49 +02:00
Philip Ginsbach
87e782560c
Merge pull request #10439 from github/ginsbach/JavascriptUpperCaseVariables
...
JavaScript: remove upper-case variable names
2022-09-15 20:03:20 +01:00
erik-krogh
ac91b30ed0
recognize the names from all VarDefs
2022-09-15 20:48:12 +02:00
Tamás Vajk
d958c04a79
Merge pull request #9693 from raulgarciamsft/Token_validation
...
Token validation
2022-09-15 20:18:33 +02:00
Tony Torralba
c0762dfdb0
Merge pull request #10437 from github/atorralba/fix-0.3.4-changenote
...
Java: Fix wrong packages in minor analysis change note
2022-09-15 19:12:57 +02:00
Philip Ginsbach
d1df2aa457
remove upper-case variable names
2022-09-15 18:08:50 +01:00
Philip Ginsbach
0a2d0f7f68
Merge pull request #10440 from github/ginsbach/JavaUpperCaseVariables
...
Java: remove upper-case variable name
2022-09-15 18:07:51 +01:00
Mathias Vorreiter Pedersen
4482669d7e
C++: Add a new 'InvalidPointerDeref' query to experimental.
2022-09-15 17:47:15 +01:00
Mathias Vorreiter Pedersen
b8a5aa5d85
C++: Fix a couple of range analysis issues:
...
1. The new query is expecting pointer arithmetic operations to generate
range-analysis bounds, but this wasn't true on main.
2. The bounds generated by `boundFlowCond` was incorrectly inferred as
non-strict when comparing a pointers (unlike when comparing values of
integral types). This gave FPs in the new query.
This also fixes a couple of missing results in existing queries that
use the new range-analysis library.
2022-09-15 17:46:52 +01:00
Philip Ginsbach
c2bdb69476
remove upper-case variable name
2022-09-15 16:32:16 +01:00
Mathias Vorreiter Pedersen
d981f898e4
C++: Add flow states to the product dataflow library.
2022-09-15 15:54:09 +01:00
Jeroen Ketema
8b292351b7
Merge pull request #10435 from github/ginsbach/RemoveEvenMoreUpperCaseVariables
...
C++: remove more upper-case variable names
2022-09-15 16:43:50 +02:00
Chris Smowton
88644b6e76
Add change note
2022-09-15 15:35:52 +01:00
Tony Torralba
62b1091c17
Fix wrong packages in minor analysis change
2022-09-15 16:30:12 +02:00
Philip Ginsbach
26099d6ab7
remove more upper-case variable names
2022-09-15 14:36:02 +01:00
Rasmus Wriedt Larsen
0e3821d3e3
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-09-15 15:13:08 +02:00
Tony Torralba
df5178d7ee
Merge pull request #10330 from atorralba/atorralba/implicit-pendingintents-compat-sinks
...
Java: Add Implicit PendingIntents sinks for Compat classes
2022-09-15 14:39:19 +02:00
Tony Torralba
714b37e77b
Merge pull request #10318 from atorralba/atorralba/notificationcompat-steps
...
Java: Add summaries for NotificationCompat and its inner classes
2022-09-15 14:38:39 +02:00
Geoffrey White
6b21563018
C++: Update change note.
2022-09-15 13:37:20 +01:00
Anders Schack-Mulligen
a4ae9a09f9
Java: Use MaD summaries for java.util.Hashtable.
2022-09-15 13:55:44 +02:00
Chris Smowton
5a56bb97fc
deprecated-call query: notice calls to methods of specialised generic classes
2022-09-15 12:49:12 +01:00
AlexDenisov
b8bc7fb926
Merge pull request #10434 from github/redsun82/fix-c-compilation
...
Bazel: only pass `-std=c++17` for C++ compilation
2022-09-15 13:00:07 +02:00
Paolo Tranquilli
ce6109547b
Bazel: only pass -std=c++17 for C++ compilation
2022-09-15 12:30:30 +02:00
Tom Hvitved
40241acbfc
Merge pull request #10425 from hvitved/ruby/bad-join-fix
...
Ruby: Fix bad join-order in DB upgrade script
2022-09-15 12:09:14 +02:00
Ian Lynagh
a939156ade
Merge pull request #10419 from igfoo/igfoo/unused
...
Kotlin: Remove an unused method
2022-09-15 10:57:58 +01:00
Ian Lynagh
618a5b9b8c
Merge pull request #10427 from igfoo/igfoo/werror
...
Kotlin: Compile with -Werror, and fix warnings
2022-09-15 10:57:45 +01:00
Jeroen Ketema
a20b41685e
Merge pull request #10420 from github/ginsbach/RemoveMoreUpperCaseVariables
...
remove several upper-case `NamedExpression` variable names
2022-09-15 11:50:02 +02:00
Sebastian Bauersfeld
20d78972f5
Address review comments.
2022-09-15 16:44:36 +07:00
Chris Smowton
b926bc9efa
Fix and add test for java/subtle-inherited-call involving inheritence from generic types
2022-09-14 22:17:19 +01:00
Chris Smowton
da04673cb0
Fix query java/internal-representation-exposure regarding generic callees, and add a test
2022-09-14 22:17:19 +01:00
Chris Smowton
c149754c6b
Fix java/iterator-remove-failure to handle calls to specialised generic functions
2022-09-14 22:17:19 +01:00
Chris Smowton
3bdccb38b6
Adapt inner-class-could-be-static query now that specialised methods are callable via an implicit this qualifier.
...
Previously such a call always targeted the unbound method, so we checked for an inherited method that could be a specialisation thereof; now we expect it should be directly inherited.
2022-09-14 22:17:19 +01:00
Chris Smowton
25b4d485b4
Java: Add test regarding the type of an implicit this expression
2022-09-14 22:17:19 +01:00
Geoffrey White
c3c86a79ee
Swift: Update comment.
2022-09-14 21:08:52 +01:00
James Fletcher
2503a13ddd
Merge pull request #10428 from jf205/download-db-vs-code-release
...
Cherry-pick changes from #10270 onto rc/3.7
2022-09-14 21:06:57 +01:00
James Fletcher
cdbc839f40
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-09-14 20:52:01 +01:00
james
c383701677
add link and remove todo
2022-09-14 20:52:01 +01:00
James Fletcher
625e18aa05
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 20:52:01 +01:00
james
8f29c5b8b6
fix broken anchor
2022-09-14 20:52:01 +01:00
james
d18bc13f02
fix indentation
2022-09-14 20:52:01 +01:00
james
c7ec6fc2c3
mention compatibility with CLI used by GHES
2022-09-14 20:52:01 +01:00
james
72bc7ae20d
address review comments
2022-09-14 20:52:01 +01:00
James Fletcher
efd4853532
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 20:52:00 +01:00
james
ff98805832
delete unused reusable note
2022-09-14 20:52:00 +01:00
james
60dbfd2b2d
delete old note that refers to lgtm
2022-09-14 20:52:00 +01:00
james
9b74b8f8b9
remove link to deleted file
2022-09-14 20:52:00 +01:00
james
3321c52b6c
Add section about using the API to download dbs
2022-09-14 20:52:00 +01:00
james
c3b2d2bb5e
new screenshot
2022-09-14 20:51:53 +01:00
james
8ce4ed587e
update info about downloading dbs in vs code
2022-09-14 20:51:15 +01:00
james
64ea959c59
new screenshot
2022-09-14 20:51:03 +01:00
james
c17af8c354
update info about downloading dbs in vs code
2022-09-14 20:51:03 +01:00
Geoffrey White
dc47771937
Swift: Fix locationless results.
2022-09-14 20:43:24 +01:00
Geoffrey White
25840996f6
Swift: Use a slightly different approach to fix false positive.
2022-09-14 20:43:23 +01:00
Geoffrey White
7b96cb071a
Swift: Remove the original sink cases as they are no longer required.
2022-09-14 20:43:22 +01:00
Geoffrey White
e0100d7b98
Swift: Expand sinks and fix issue with post-update notes to catch the missing test results.
2022-09-14 20:43:22 +01:00
Geoffrey White
eb2a0af4cc
Swift: Additional test case.
2022-09-14 20:43:21 +01:00
James Fletcher
8e0a006665
Merge pull request #10270 from jf205/download-db-vs-code
...
Update documentation about downloading CodeQL databases using the VS Code extension
2022-09-14 20:35:18 +01:00
James Fletcher
b427e8aba6
Merge branch 'main' into download-db-vs-code
2022-09-14 20:22:03 +01:00
Raul Garcia
0125ecf2a8
Merge branch 'main' into Token_validation
2022-09-14 11:04:52 -07:00
Tom Hvitved
c6cd2d66f8
Update ruby/ql/lib/change-notes/2022-09-14-ruby-qll.md
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-09-14 20:00:34 +02:00
Tom Hvitved
5cfed75e4c
Ruby: Fix bad join-order in DB upgrade script
...
Before
```
Evaluated relational algebra for predicate #select#query#ffffff@3e1dedi5 with tuple counts:
30411461 ~0% {6} r1 = locations_default AND NOT #select#query#ffffff#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5)
30840645 ~4% {2} r2 = SCAN #select#query#ffff OUTPUT In.0, In.3
515559 ~1% {3} r3 = JOIN r2 WITH #select#query#ffffff#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
515559 ~0% {5} r4 = JOIN r3 WITH locations_default ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Rhs.4, Rhs.5
2397708060 ~0% {9} r5 = JOIN r4 WITH locations_default_1023#join_rhs ON FIRST 1 OUTPUT Lhs.1, 0, Rhs.1, Lhs.2, Lhs.0, Lhs.3, Lhs.4, Rhs.2, Rhs.3
515559 ~4% {6} r6 = JOIN r5 WITH query#f0820431::body_statement#3#bff ON FIRST 3 OUTPUT Lhs.3, Lhs.4, Lhs.7, Lhs.8, Lhs.5, Lhs.6
30927020 ~0% {6} r7 = r1 UNION r6
return
```
After
```
Evaluated relational algebra for predicate #select#query#ffffff@8810e071 with tuple counts:
30411461 ~0% {6} r1 = #select#query#ffffff#shared AND NOT #select#query#ffffff#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5)
30840645 ~4% {2} r2 = SCAN #select#query#ffff OUTPUT In.0, In.3
515559 ~1% {3} r3 = JOIN r2 WITH #select#query#ffffff#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
515559 ~0% {6} r4 = JOIN r3 WITH locations_default ON FIRST 1 OUTPUT Lhs.1, 0, Lhs.2, Rhs.1, Rhs.4, Rhs.5
515559 ~0% {5} r5 = JOIN r4 WITH query#f0820431::body_statement#3#bff ON FIRST 2 OUTPUT Rhs.2, Lhs.3, Lhs.2, Lhs.4, Lhs.5
515559 ~0% {6} r6 = JOIN r5 WITH locations_default ON FIRST 2 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.2, Rhs.3
515559 ~4% {6} r7 = JOIN r6 WITH files ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.4, Lhs.5, Lhs.2, Lhs.3
30927020 ~0% {6} r8 = r1 UNION r7
return r8
```
2022-09-14 19:27:49 +02:00
Ian Lynagh
8a5bc3b635
Kotlin: Don't use hasQuestionMark
...
1.7.0 warns:
'hasQuestionMark: Boolean' is deprecated. hasQuestionMark has
ambiguous meaning. Use isNullable() or isMarkedNullable() instead
2022-09-14 17:56:27 +01:00
Dave Bartolomeo
6a0e4805dc
Merge pull request #10418 from dbartol/dbartol/swift-fail/work
...
Add lock files for Swift packs
2022-09-14 12:01:05 -04:00
Ian Lynagh
fce111bebe
Kotlin: Compile with -Werror, and fix warnings
2022-09-14 16:42:57 +01:00
Philip Ginsbach
c5703898b0
remove upper-case NamedExpression variable names
2022-09-14 16:35:24 +01:00
Ian Lynagh
8f2a718787
Kotlin: Remove an unused method
2022-09-14 16:31:11 +01:00
James Fletcher
f3a4ba39a8
Update docs/codeql/codeql-cli/getting-started-with-the-codeql-cli.rst
...
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-09-14 16:20:07 +01:00
Andrew Eisenberg
3102a444bb
Merge pull request #10389 from github/aeisenberg/suites-docs
...
Tweak the query suites documentation
2022-09-14 08:15:28 -07:00
Jeroen Ketema
6e74c32dc6
Merge pull request #10417 from github/ginsbach/RemoveUpperCaseVariable
...
remove upper-case variable name from `HubClasses`
2022-09-14 16:50:43 +02:00
Dave Bartolomeo
c5622135a6
Add lock files for Swift packs
2022-09-14 10:21:40 -04:00
Andrew Eisenberg
3c1f67d7de
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-14 07:15:23 -07:00
Chris Smowton
1478f61897
Merge pull request #10407 from RasmusWL/go-instanceof
...
Go: Rewrite `::Range` patterns to use `instanceof`
2022-09-14 15:06:30 +01:00
Philip Ginsbach
8f7f631211
upper-case variable names are deprecated
2022-09-14 14:50:26 +01:00
Rasmus Wriedt Larsen
3d0f786247
docs: grammar fix
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-09-14 15:39:48 +02:00
Tom Hvitved
7ecfe8daba
Address review comments
2022-09-14 15:30:51 +02:00
Tamás Vajk
e4a712c9d6
Merge pull request #10402 from tamasvajk/kotlin-comp-args
...
Kotlin: Add integration test for compiler argument extraction
2022-09-14 15:27:18 +02:00
Tamas Vajk
16836de02b
Code quality improvment to simplify test QL
2022-09-14 15:15:06 +02:00
Tom Hvitved
40e77a0c67
Merge pull request #10415 from hvitved/code-block-fix
...
Change two ```codeql to ```ql
2022-09-14 15:07:55 +02:00
Ian Lynagh
b3b1efb1a1
Merge pull request #10414 from igfoo/igfoo/getQualifiedName
...
Java: Tweak Member.getQualifiedName()
2022-09-14 13:30:22 +01:00
Tom Hvitved
4ea1c0050b
Change two ``codeql to ``ql
2022-09-14 13:53:34 +02:00
Anders Schack-Mulligen
ba3ebeec2c
Java: Remove low confidence dispatch for which we have a manual summary.
2022-09-14 13:39:31 +02:00
Anders Schack-Mulligen
d713910714
Merge pull request #10334 from aschackmull/java/uniontypeflow
...
Java: Implement union type flow and replace ad-hoc variable tracking in dispatch
2022-09-14 13:34:28 +02:00
Tamas Vajk
a68b61f50a
Kotlin: adjust expected test results after fixing compiler argument interception
2022-09-14 13:15:29 +02:00
Tamas Vajk
6eccb5e99c
Kotlin: Add integration test to show missing compiler arguments
2022-09-14 13:15:29 +02:00
Ian Lynagh
4ac0ecbc61
Java: Mark the getQualifiedName change as breaking
2022-09-14 12:10:50 +01:00
Ian Lynagh
d735b9e6f2
Java: Format QL
2022-09-14 11:56:13 +01:00
Rasmus Lerchedahl Petersen
33b508d6e6
Python: undo change to --max-import-depth
...
This is not necessary as long as `LibraryCall` only
includes unresolved calls.
2022-09-14 12:52:27 +02:00
Ian Lynagh
fec6c35f21
Java: Accept test output for getQualifiedName change
2022-09-14 10:52:43 +01:00
Erik Krogh Kristensen
2ece9773be
Merge pull request #10410 from erik-krogh/nonAsciiRange
...
JS: don't report every non-ascii range in js/overly-large-range
2022-09-14 11:51:22 +02:00
erik-krogh
8b3ba38887
changes based on review
2022-09-14 11:49:26 +02:00
Rasmus Lerchedahl Petersen
245baa51a3
Python: rename summary map -> list_map,
...
since map resolves to a class call
also fix test expectation
2022-09-14 11:21:16 +02:00
Michael Nebel
b05a1f4f39
C#: Support for type based model generation via python script.
2022-09-14 11:16:22 +02:00
Paolo Tranquilli
d7cdeb8ac0
Merge pull request #10412 from github/revert-10399-redsun82/swift-macos-arm
...
Revert "Swift: print a helpful message on macOS ARM"
2022-09-14 11:08:24 +02:00
Michael Nebel
4e57b40c2a
C#: Update test expected output.
2022-09-14 11:06:24 +02:00
Michael Nebel
0f22828cb6
C#: Add test cases corresponding to the System.Linq.Enumerable extensions methods.
2022-09-14 11:06:23 +02:00
Michael Nebel
cdb892da43
C#: Update test expected output.
2022-09-14 11:06:23 +02:00
Michael Nebel
20cb5daeb1
C#: Add testcase for implicit set.
2022-09-14 11:06:23 +02:00
Michael Nebel
262c28b77a
C#: Update expected test output.
2022-09-14 11:06:23 +02:00
Michael Nebel
001d3571ec
C#: Restructure test cases.
2022-09-14 11:06:23 +02:00
Michael Nebel
c5949fad75
C#/Java: Rename to Typed based summary model generation.
2022-09-14 11:06:23 +02:00
Michael Nebel
5f161dfaad
C#: Update expected test output with further models.
2022-09-14 11:06:23 +02:00
Michael Nebel
055072b1c0
C#: Add more test examples.
2022-09-14 11:06:23 +02:00
Michael Nebel
1b7339aa1e
C#: Rewrite the typed based model generator.
2022-09-14 11:06:23 +02:00
Michael Nebel
2d57b7d56a
Java: Sync files.
2022-09-14 11:06:23 +02:00
Michael Nebel
d580a8a078
C#: Update expected test output.
2022-09-14 11:06:23 +02:00
Michael Nebel
372a6107d6
C#: Use typeparameter index to generate synthetic field names in summaries.
2022-09-14 11:06:23 +02:00
Michael Nebel
f6e9013435
C#: Update expected output of tests.
2022-09-14 11:06:23 +02:00
Michael Nebel
e66dce1524
C#: Update test relevant test cases.
2022-09-14 11:06:23 +02:00
Michael Nebel
bb65485497
C#: Address some review comments.
2022-09-14 11:06:23 +02:00
Michael Nebel
13a802e260
Java: Sync files and make adjusting changes.
2022-09-14 11:06:23 +02:00
Michael Nebel
dd44d71757
C#: Add Type based summary test cases and move dataflow model generation test cases.
2022-09-14 11:06:22 +02:00
Michael Nebel
c2da2a8b16
C#: Initial implementation of Type based summarymodel generation.
2022-09-14 11:06:22 +02:00
Anders Schack-Mulligen
64e2f4164d
Java: Add test for disjunctive type in call context.
2022-09-14 10:38:10 +02:00
Paolo Tranquilli
dad0e4decc
Revert "Swift: print a helpful message on macOS ARM"
2022-09-14 10:34:46 +02:00
Rasmus Lerchedahl Petersen
f83158ff8b
Python: do not stake out too much territory
2022-09-14 10:28:11 +02:00
Anders Schack-Mulligen
9f200633ca
Java: convert test to inline expectation
2022-09-14 10:17:31 +02:00
Anders Schack-Mulligen
83e7bf71d7
Java: Adjust qldoc.
2022-09-14 10:16:09 +02:00
James Fletcher
572ecf0944
Merge branch 'main' into download-db-vs-code
2022-09-14 08:58:35 +01:00
james
22eb23e95a
add link and remove todo
2022-09-14 08:48:20 +01:00
Mathias Vorreiter Pedersen
6074f22d3f
Merge pull request #10335 from github/redsun82/swift-weak-hashing-phase-1
...
Swift: first version of query targeting weak hashing
2022-09-14 08:29:47 +01:00
Tom Hvitved
5472210a92
Ruby: Add change note
2022-09-14 09:14:41 +02:00
Paolo Tranquilli
c3320a3afe
Apply suggestions from code review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-14 08:21:58 +02:00
erik-krogh
88f1d2ae38
add qldocs to the ql/alert-message-style-violation query
2022-09-13 22:28:50 +02:00
Erik Krogh Kristensen
59c1ac2e8d
Apply suggestions from code review
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-09-13 22:17:33 +02:00
erik-krogh
252394666c
sync files
2022-09-13 20:44:05 +02:00
erik-krogh
e7aef17d30
don't report every non-ascii range in js/overly-large-range
2022-09-13 20:43:52 +02:00
James Fletcher
6debbc0d3e
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-13 19:22:15 +01:00
Tom Hvitved
74eb6b2b98
Merge pull request #10400 from hvitved/ruby/singleton-class-object-scope
...
Ruby: Adjust the scope of singleton class targets
2022-09-13 20:01:21 +02:00
Tom Hvitved
fe7d01ecbe
Ruby: Update docs to reflect that import ruby is no longer used
2022-09-13 20:00:22 +02:00
Tom Hvitved
b477a4cc81
Ruby: Add missing QL docs
2022-09-13 20:00:22 +02:00
Tom Hvitved
007ab2b7ce
Ruby: Do not expose AST layer through ruby.qll
2022-09-13 19:59:56 +02:00
Raul Garcia
7572414623
Merge branch 'main' into Token_validation
2022-09-13 10:47:26 -07:00
Ian Lynagh
f807b801ce
Merge pull request #10401 from igfoo/igfoo/throw
...
Kotlin: Remove a throw statement
2022-09-13 17:41:31 +01:00
Raul Garcia
a27c427a4e
Merge branch 'main' into Token_validation
2022-09-13 09:16:32 -07:00
Andrew Eisenberg
dbd5195fec
Merge pull request #10344 from github/aeisenberg/registries-in-workspace
...
Add information about the `registries` block in `codeql-workspace.yml`
2022-09-13 08:54:30 -07:00
Tony Torralba
4708052741
Merge pull request #10408 from giper45/patch-1
...
Updated vulnerable XSS.java version
2022-09-13 17:50:47 +02:00
Raul Garcia
c63240d62c
D:\Code\tokenv2\csharp\ql\src\experimental\Security Features\JsonWebTokenHandler\JsonWebTokenHandlerLib.qll
2022-09-13 08:48:53 -07:00
Raul Garcia
1c10456e65
Merge branch 'main' into Token_validation
2022-09-13 08:44:19 -07:00
Henry Mercer
af25cf8be2
Merge pull request #10409 from github/codeql-ci/js/ml-powered-pack-release-0.3.3
...
JS: Bump version numbers of ML-powered packs after 0.3.3 release
2022-09-13 16:23:37 +01:00
Tamás Vajk
84bd8f179b
Merge pull request #10403 from tamasvajk/kotlin-rework-cast
...
Kotlin: Code quality improvements: refactor a cast
2022-09-13 17:09:13 +02:00
Andrew Eisenberg
996695dc6f
Merge pull request #10367 from github/aeisenberg/packs-docs-changes-3.7
...
Port Pack Docs changes to 3.7
2022-09-13 08:06:34 -07:00
Ian Lynagh
6a63b86f8a
Java: Member.getQualifiedName() tweaked
...
It now includes the qualified name of the declaring type.
2022-09-13 16:05:51 +01:00
Ian Lynagh
fc445736b2
Java: Use hasQualifiedName rather than getQualifiedName in ExternalAPIs
...
It's more efficient, as it doesn't require building intermediate
strings.
2022-09-13 15:58:00 +01:00
Rasmus Wriedt Larsen
2e95e25afb
Merge pull request #10406 from RasmusWL/ruby-instanceof
...
Ruby: Rewrite a few `::Range` uses to `instanceof`
2022-09-13 16:57:13 +02:00
Tony Torralba
ac46a38b9d
Update java/ql/src/Security/CWE/CWE-079/XSS.java
2022-09-13 16:49:20 +02:00
Tony Torralba
2b027709e4
Update XSS qhelp
2022-09-13 16:39:48 +02:00
AlexDenisov
aacc368228
Merge pull request #10399 from github/redsun82/swift-macos-arm
...
Swift: print a helpful message on macOS ARM
2022-09-13 16:24:38 +02:00
Henry Mercer
bc2de7ed4b
Merge branch 'main' into codeql-ci/js/ml-powered-pack-release-0.3.3
2022-09-13 15:15:56 +01:00
github-actions[bot]
b40def71b9
JS: Bump version of ML-powered library and query packs to 0.3.4
2022-09-13 14:11:16 +00:00
github-actions[bot]
e08e22ac32
JS: Bump patch version of ML-powered library and query packs
2022-09-13 14:06:57 +00:00
james
d782e6c37c
fix broken anchor
2022-09-13 15:01:16 +01:00
gx1
1c4488e7c8
Updated vulnerable XSS.java version
2022-09-13 15:58:25 +02:00
Rasmus Wriedt Larsen
ca66a29b18
Go: Rewrite ::Range patterns to use instanceof
2022-09-13 15:48:17 +02:00
Tamas Vajk
2c757c714d
Kotlin: Code quality improvements: refactor a cast
2022-09-13 15:44:54 +02:00
Rasmus Wriedt Larsen
511030df48
Ruby: Rewrite a few ::Range uses to instanceof
2022-09-13 15:44:29 +02:00
Rasmus Wriedt Larsen
6f5701f9c7
Go: Rewrite concepts to use extends ... instanceof ...
2022-09-13 15:36:16 +02:00
james
ff4b1ce913
fix indentation
2022-09-13 14:34:06 +01:00
erik-krogh
93a67101e7
add a QL-for-QL query highlighting some issues with alert-texts
2022-09-13 15:24:15 +02:00
erik-krogh
338aead8cc
add more guidance to the style-guide about alert messages
2022-09-13 15:22:43 +02:00
james
4e582debfc
mention compatibility with CLI used by GHES
2022-09-13 14:21:41 +01:00
Rasmus Wriedt Larsen
24d28e0482
Docs: Use instanceof in ::Range pattern description
...
Had to change the example away from Go, since their libs have not been
updated to use `instanceof` yet (but I'll make a PR from them shortly)
2022-09-13 15:21:15 +02:00
james
1fceeed32c
address review comments
2022-09-13 13:53:05 +01:00
Ian Lynagh
2f8151d8d2
Kotlin: Remove a throw statement
...
We have a way to carry on here, so we may as well do so
2022-09-13 13:51:00 +01:00
Erik Krogh Kristensen
46751e515c
Merge pull request #10388 from erik-krogh/exportNew
...
JS: recognize returning an instance of a class as exporting that class
2022-09-13 13:45:16 +02:00
Anders Schack-Mulligen
b8a1818422
Java: Fix test expectation.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
0e376b32d2
Java: extend typeflow tests to cover union types.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
d0f7052de2
Java: Support instanceof disjunction in union type flow.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
686e03e1cc
Java: Fix perf issue.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
c8b93e0910
Java: Replace uses of deprecated variableTrack.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
a8eedce8ab
Java: Replace ad-hoc variable tracking with union type flow in dispatch.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
6f06267892
Java: Implement union type flow.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
7692a9e2e7
Java: Minor TypeFlow tweaks.
2022-09-13 13:30:40 +02:00
Anders Schack-Mulligen
85d4742a01
Java: Add dispatch test showing lack of union types.
2022-09-13 13:30:40 +02:00
Asger F
d3d47a261c
JS: Accept test output again
2022-09-13 11:56:51 +02:00
Tom Hvitved
4247843a27
Ruby: Adjust the scope of singleton class targets
...
In
```rb
class << x
...
end
```
the scope of `x` is not the singleton class itself, but rather the outer scope.
2022-09-13 11:39:38 +02:00
Tom Hvitved
87db5fc6b1
Ruby: Add tests for getEnclosing{Method,Module}
2022-09-13 11:39:15 +02:00
Erik Krogh Kristensen
2739b9cfd8
Merge pull request #10390 from erik-krogh/unmentionedGuard
...
QL: add unmentioned guard class query
2022-09-13 11:04:13 +02:00
Paolo Tranquilli
9227203336
Swift: print a helpful message on macOS ARM
...
Also remove the tentative way compilation was expected to be fixed on
macOS ARM without really working.
In the future we will create universal binaries (which requires
compiling our prebuilt package for ARM as well), but until then we must
require the developer to pass `--cpu=darwin_x86_64` to the build
command when building on an ARM macOS platform like the M1. This will be
printed out explicitly now if it's not the case.
2022-09-13 11:00:47 +02:00
Erik Krogh Kristensen
86417cec34
Merge pull request #10381 from erik-krogh/protoList
...
JS: recognize a list of bad strings as a sanitizer for `js/prototype-polluting-assignment`
2022-09-13 11:00:29 +02:00
Asger F
87ab16a7af
JS: Update test expectations
2022-09-13 10:59:12 +02:00
erik-krogh
063c76b6d1
apply suggestions from review
2022-09-13 10:52:23 +02:00
Mathias Vorreiter Pedersen
7f6b400b78
Merge pull request #10366 from MathiasVP/use-use-flow-in-experimental
...
C++: Use-use flow in `experimental`
2022-09-13 09:30:48 +01:00
Asger F
eca2632a3e
JS: Add change note
2022-09-13 10:17:34 +02:00
Asger F
f411798101
JS: Fix typo in alert message
2022-09-13 10:13:34 +02:00
Asger F
b4e6fb781a
JS: Consider empty regexp to be obviously empty
2022-09-13 10:13:03 +02:00
Rasmus Lerchedahl Petersen
58cfac27d2
Python: adjust expectations to new spelling
2022-09-13 10:10:17 +02:00
erik-krogh
03a325ca31
autoformat
2022-09-13 10:06:35 +02:00
Erik Krogh Kristensen
dd5da79e46
recognize setters and getters of a class as exported
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-13 10:04:02 +02:00
Rasmus Lerchedahl Petersen
c1ab66181b
Python: format
2022-09-13 08:08:04 +02:00
erik-krogh
dd5db2e6d7
add to isSanitizerGuard
2022-09-13 07:27:51 +02:00
erik-krogh
3eb7675292
rename to DenyListInclusionGuard
2022-09-13 07:27:31 +02:00
Sebastian Bauersfeld
f95663cdfb
Java: Added change note.
2022-09-13 11:38:15 +07:00
Sebastian Bauersfeld
0468b3a361
Java: Track taint through constructor arguments of java.net.URI.
2022-09-13 11:35:04 +07:00
Raul Garcia
0df2b64355
Merge branch 'main' into Token_validation
2022-09-12 18:31:00 -07:00
Raul Garcia
9e63a3d30b
Fixing a couple of bug from PR comments
2022-09-12 18:22:13 -07:00
Rasmus Lerchedahl Petersen
03c243175b
Python: fix QL alerts
2022-09-12 23:53:42 +02:00
Andrew Eisenberg
68f0505c39
Apply suggestions from code review
2022-09-12 14:49:41 -07:00
Rasmus Lerchedahl Petersen
2e9c60de6c
Python: remove ressurected file
2022-09-12 23:38:44 +02:00
Rasmus Lerchedahl Petersen
56dcfc2161
Python: --max-import-depth=0
...
to avoid nodes in the extracted stdlib
Was there a reason for this depth to be 1?
2022-09-12 23:25:48 +02:00
Rasmus Lerchedahl Petersen
bf16e220a0
Python: adjust expectations
2022-09-12 22:43:03 +02:00
erik-krogh
a567c132c1
fix all ql/unmentioned-guard
2022-09-12 22:42:46 +02:00
erik-krogh
9446cad32e
add ql/unmentioned-guard class
2022-09-12 22:39:20 +02:00
Andrew Eisenberg
a9202b5c37
Tweak the query suites documentation
...
- Add examples to filter on `@id`
- Add examples that include regexes
- Add examples that include both lists and single elements
- Add some `import` examples
- Remove mention of `eval` since it is not a user-facing instruction
2022-09-12 13:07:32 -07:00
Rasmus Lerchedahl Petersen
e3280c8a3e
Python: handle TODO
...
although this is not actually tested,
so we may have to adjust once we use it.
But the _very_ generic implementation is modeled on the Ruby code.
2022-09-12 21:03:56 +02:00
Rasmus Lerchedahl Petersen
78d4dc3123
Python: sync files
2022-09-12 21:01:57 +02:00
Rasmus Lerchedahl Petersen
203481ad3e
Python: rearrange to minimize diff
...
also fix typo
2022-09-12 20:07:32 +02:00
Rasmus Lerchedahl Petersen
efc5cfb852
Merge branch 'main' of github.com:github/codeql into python-dataflow/flow-summaries-from-scratch
2022-09-12 19:56:16 +02:00
Arthur Baars
e07e6c9053
Merge pull request #10382 from RasmusWL/ruby-typo-fix
...
Ruby: Fix typo in QLDoc
2022-09-12 19:04:37 +02:00
Tony Torralba
f412f433bf
Add thymeleaf steps
2022-09-12 17:52:38 +02:00
Erik Krogh Kristensen
bb3753a682
Merge pull request #10317 from erik-krogh/py-unqueryable
...
PY: deprecate a bunch of unused code
2022-09-12 17:44:59 +02:00
erik-krogh
ceda5f69fc
recognize returning an instanceof of a class as exporting that class
2022-09-12 17:31:51 +02:00
Mathias Vorreiter Pedersen
6e4b3c242f
Merge pull request #10377 from geoffw0/deprecate-pointsto
...
C++: Put a warning on the PointsTo library.
2022-09-12 16:25:40 +01:00
Andrew Eisenberg
abdc79b009
Update the example codeql-workspace.yml
...
Add a better example for `registries`.
2022-09-12 08:22:51 -07:00
Andrew Eisenberg
361dba17de
Add information about the registries block in codeql-workspace.yml
2022-09-12 08:22:51 -07:00
Edward Minnix III
eadb8a3988
Merge pull request #10106 from egregius313/egregius313/android-backup-allowed
...
Java: Query to detect Android backup allowed
2022-09-12 11:14:03 -04:00
Rasmus Wriedt Larsen
41ce1c2016
Python: getStarArg gives first *args argument
...
I couldn't see any reason that we should give up altogether if there are
multiple `*args` arguments. Including the first one looks like a win to
me!
2022-09-12 17:02:31 +02:00
Mathias Vorreiter Pedersen
d2b150eaf5
C++: Fix QLDoc on the model predicates used by the new experimental use-use code.
2022-09-12 16:00:49 +01:00
Mathias Vorreiter Pedersen
bb1c088fe0
C++: Undo changes to iterator models.
2022-09-12 15:58:49 +01:00
James Fletcher
47480acba5
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-12 15:53:54 +01:00
Paolo Tranquilli
43e5abac39
Swift: do not extract unresolved things from IfConfigDecl
...
This avoids extracting things that are unresolved within an
`IfConfigDecl` instance:
* all conditions
* all inactive code blocks
This is meant to test out the hypothesis that this should solve some
extractor issues. If going through with it we should definitely change
the schema model for this.
Also, tests have not been updated and are expected to fail.
2022-09-12 16:34:28 +02:00
Cornelius Riemenschneider
a8a7909d33
Merge pull request #10364 from github/criemen/remove-legacy-tracing-specs
...
Go: Remove the legacy tracer configuration files.
2022-09-12 15:55:12 +02:00
Tamás Vajk
4569b9585f
Merge pull request #10313 from tamasvajk/kotlin-fix-vararg
...
Kotlin: Fix `vararg` extraction outside of method call
2022-09-12 15:54:50 +02:00
Tamás Vajk
ed772e54d1
Merge pull request #10328 from tamasvajk/kotlin-kfunction-fix
...
Kotlin: fix `KFunctionX.invoke` extraction
2022-09-12 15:54:33 +02:00
erik-krogh
05ef76cbca
add change-note
2022-09-12 15:41:28 +02:00
erik-krogh
87fb01d55b
apply another suggestion from doc review
2022-09-12 15:36:02 +02:00
Geoffrey White
842af4bf74
C++: Specifically suggest DataFlow as an alternative.
2022-09-12 14:25:45 +01:00
AlexDenisov
be21b26d46
Merge pull request #10045 from github/alexdenisov/swift-cwe-757
...
Swift: CWE-757: insecure TLS configuration
2022-09-12 15:25:15 +02:00
Erik Krogh Kristensen
818601b612
Merge pull request #10285 from erik-krogh/paramClass
...
ReDoS: convert RelevantState to a class in the PrefixConstruction module
2022-09-12 15:23:19 +02:00
Rasmus Lerchedahl Petersen
0f95992b2f
Python: remove NonLibraryDataFlowCallable
...
this required managing parameters and their pre-update nodes a bit
2022-09-12 15:17:29 +02:00
Rasmus Wriedt Larsen
4296ac1ac0
Python: Allow CallNode.getArgByName for keyword args after **kwargs
2022-09-12 15:03:13 +02:00
Rasmus Wriedt Larsen
03cc4a2f7a
Ruby: Fix typo in QLDoc
2022-09-12 14:35:20 +02:00
Tony Torralba
79a32f1a3e
Tainting the freemarker dataModel isn't exploitable
2022-09-12 14:22:06 +02:00
AlexDenisov
568eb3a118
Update swift/ql/src/queries/Security/CWE-757/InsecureTLS.qhelp
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-09-12 14:00:29 +02:00
erik-krogh
98243118b2
recognize a list of bad strings as a sanitizer for js/prototype-polluting-assignment
2022-09-12 13:41:07 +02:00
erik-krogh
afcb767f8d
Merge branch 'main' into js-followMsg
2022-09-12 13:21:16 +02:00
erik-krogh
6ec03d4738
apply suggestions from doc review
2022-09-12 13:16:39 +02:00
erik-krogh
bae4490620
add change-note
2022-09-12 12:12:18 +02:00
erik-krogh
80158f8035
fix some python uses of renamed features
2022-09-12 12:08:30 +02:00
Erik Krogh Kristensen
c9ea10b1ef
revise some Python names
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-12 12:00:57 +02:00
Tony Torralba
dd6257c757
Add security-severity
2022-09-12 11:59:01 +02:00
Tony Torralba
409a123490
Tainting the velocity context isn't exploitable
2022-09-12 11:38:29 +02:00
Erik Krogh Kristensen
3384521fb6
Merge pull request #10357 from erik-krogh/typos
...
make a shared library of the typo database
2022-09-12 11:24:03 +02:00
Erik Krogh Kristensen
cb95e8f263
Merge pull request #10351 from erik-krogh/moreMains
...
JS: find a main module in more cases
2022-09-12 11:01:17 +02:00
Arthur Baars
7ca2e4c51f
Merge pull request #9953 from aibaars/update-grammar
...
Update tree-sitter-ruby
2022-09-12 10:51:37 +02:00
Paolo Tranquilli
776df33f55
Swift: fix typos and comments in testCrypto.swift
2022-09-12 08:47:43 +02:00
Rasmus Lerchedahl Petersen
fa2da2f3ec
Python: remove NonLibraryNormalCall
...
it is not necessary to distinguish these calls,
so we remove the class from the hierarchy.
2022-09-11 22:25:29 +02:00
Mathias Vorreiter Pedersen
c988547e9c
C++: Accept test changes.
2022-09-11 18:31:53 +01:00
Rasmus Lerchedahl Petersen
895f5480c2
Python: Added recursion guard
...
to ensure that the call graph seen by type tracking
does not include summary calls resolved by type tracking.
(I tried inserting a similar test into the Ruby codebase,
and it still compiled)
To get this to compile, I had to move the resolution of summary calls
out of the data flow nodes and into the `viableCallable` predicate.
This means that we now have a potential summary call for each
cfg call node. (I tried using the base class, `DataFlowCall`, for this
but calls to `map` got identified as class calls and would no longer
be associated with a summary.)
It is possible that the "NonLIbrary"-layers the were inserted into the
hierarchy can be removed again.
2022-09-09 22:47:47 +02:00
Geoffrey White
8ac3e10896
C++: Put a warning on the PointsTo library.
2022-09-09 18:03:23 +01:00
Andrew Eisenberg
ed66388551
Port Pack Docs changes to 3.7
...
This moves the following three PRs to the 3.7 branch:
- https://github.com/github/codeql/pull/10182
- https://github.com/github/codeql/pull/10146
- https://github.com/github/codeql/pull/10105
2022-09-09 09:33:25 -07:00
Mathias Vorreiter Pedersen
6dcfe0348b
C++: Copy over the required changes to non-experimental libraries.
2022-09-09 17:26:58 +01:00
james
0e5df6c08a
delete unused reusable note
2022-09-09 17:14:26 +01:00
james
869833a95a
delete old note that refers to lgtm
2022-09-09 17:11:54 +01:00
Mathias Vorreiter Pedersen
5509562fe6
C++: Repair a few broken models that were incorrectly a pointer
...
as tainted (instead of the pointee), or vice versa. Because of
existing dataflow pointer/pointee conflation we never noticed that,
but since this PR removes those imprecisions we now need to update
these models.
2022-09-09 17:04:36 +01:00
Ed Minnix
817f12cae6
Updated expectations file with new message
...
The warning message for the `android:allowBackup` query was updated.
This updates the message in the expectations file.
2022-09-09 11:35:48 -04:00
james
f717dd6c0f
remove link to deleted file
2022-09-09 16:10:35 +01:00
james
b3a97f742d
Merge branch 'main' into download-db-vs-code
2022-09-09 16:08:08 +01:00
Ian Lynagh
c7e3051edd
Merge pull request #10239 from tamasvajk/kotlin-fix-declaration-stack
...
Kotlin: Fix declaration stack
2022-09-09 16:03:31 +01:00
james
356ca78032
Merge branch 'download-db-vs-code' of github.com:jf205/ql into download-db-vs-code
2022-09-09 15:48:22 +01:00
james
fc86347b0f
Add section about using the API to download dbs
2022-09-09 15:46:35 +01:00
james
faf1d0a5d9
new screenshot
2022-09-09 15:46:06 +01:00
james
49220a4f19
update info about downloading dbs in vs code
2022-09-09 15:46:06 +01:00
James Fletcher
f17f48d2b3
Merge branch 'main' into download-db-vs-code
2022-09-09 15:44:59 +01:00
Tamás Vajk
05fcbdd9e3
Merge pull request #10365 from tamasvajk/kotlin-fix-isUnspecialised-2
...
Kotlin: Fix `isUnspecialised` to handle generic classes inside generic methods
2022-09-09 16:27:19 +02:00
Edward Minnix III
08a17b355e
allowBackup documentation updates
...
Make error messages and descriptions clearer about application backups not being disabled, rather than focusing on `android:allowBackup` specifically.
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-09 09:30:49 -04:00
Mathias Vorreiter Pedersen
6d313ace2d
C++: Copy the new use-use flow code to experimental.
2022-09-09 14:20:10 +01:00
Rasmus Wriedt Larsen
89a331f186
Merge pull request #10359 from tausbn/python-clean-up-import-resolution
...
Python: Clean up module resolution
2022-09-09 15:09:43 +02:00
Tamas Vajk
b8b0fd8a74
Kotlin: Fix isUnspecialised to handle generic classes inside generic methods
2022-09-09 14:32:38 +02:00
Tony Torralba
569fad667a
Merge pull request #10360 from atorralba/atorralba/fix-taint-implicit-reads
...
Dataflow: Fix implicit reads in taint tracking when FlowStates are used
2022-09-09 14:28:39 +02:00
erik-krogh
5010f89683
move resolveMainPath into a separate helper predicate
2022-09-09 14:26:07 +02:00
Geoffrey White
6011ae9ecc
Merge branch 'main' into cleartext-perf
2022-09-09 11:40:47 +01:00
erik-krogh
6a2fa2e37d
add -dev to the codeql/typos version
2022-09-09 12:33:43 +02:00
Geoffrey White
edefda9213
C++: Make QL-for-QL happy.
2022-09-09 11:26:42 +01:00
Geoffrey White
813d166ad7
C++: Restore results in cpp/cleartext-storage-database using .
2022-09-09 11:03:29 +01:00
Cornelius Riemenschneider
bc7fcaa06f
Go: Remove the legacy tracer configuration files.
2022-09-09 11:13:01 +02:00
Tamas Vajk
3267d7c96e
Kotlin: Add test case with various nested generics
2022-09-09 11:09:50 +02:00
Paolo Tranquilli
a8a34addde
Merge branch 'main' into redsun82/swift-weak-hashing-phase-1
2022-09-09 11:07:41 +02:00
Michael Nebel
15db520a58
Merge pull request #10362 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-09 11:06:09 +02:00
Paolo Tranquilli
6223103bbd
Swift: add more testing to WeakSensitiveDataHashing
2022-09-09 11:02:08 +02:00
Paolo Tranquilli
fccf07c5bc
Swift: tweak qhelp file for WeakSensitiveDataHashing
2022-09-09 11:01:24 +02:00
Paolo Tranquilli
c739bbb051
Swift: bake in isProbablySafe in SensitiveExpr
...
Also restructured the code a bit in the weak hashing query.
2022-09-09 11:00:02 +02:00
erik-krogh
26d8553f6e
ensure consistent casing of names
2022-09-09 10:34:14 +02:00
Tony Torralba
1078cf091e
Add change notes for all languages
2022-09-09 10:28:36 +02:00
Tony Torralba
d748fb5648
Fix bad models, add tests for those
2022-09-09 10:08:52 +02:00
Erik Krogh Kristensen
9893650f7c
Merge pull request #8604 from erik-krogh/httpNode
...
JS: refactor most library models away from AST nodes
2022-09-09 10:04:17 +02:00
Erik Krogh Kristensen
25b988d179
Merge pull request #10356 from erik-krogh/selRandom
...
JS: add taint-step in js/insecure-randomness for selecting a random element
2022-09-09 09:59:25 +02:00
erik-krogh
1ec77136ec
depend on an explicit version of the typo database
2022-09-09 08:37:38 +02:00
github-actions[bot]
ea1cdf90a1
Add changed framework coverage reports
2022-09-09 00:21:07 +00:00
Taus
5ce60d028d
Python: Remove ImportStar import.
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-09-08 22:01:58 +02:00
Edward Minnix III
83c8e22225
Apply suggestions from documentation review
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-09-08 15:55:00 -04:00
erik-krogh
aee72357b8
find a main module in more cases
2022-09-08 20:21:31 +02:00
Tony Torralba
6413de6c20
Add change note
2022-09-08 17:38:26 +02:00
Tony Torralba
fb13e7f307
Docs changes
2022-09-08 17:38:25 +02:00
Tony Torralba
e311155acd
Use InlineExpectationsTest
2022-09-08 17:38:25 +02:00
Tony Torralba
b68e6669b8
Refactor TemplateInjection libraries
2022-09-08 17:38:25 +02:00
Tony Torralba
c9728098ef
Generate stubs, adapt tests
2022-09-08 17:38:21 +02:00
Tony Torralba
7db1eb98f5
Sync files
2022-09-08 17:32:03 +02:00
Tony Torralba
1b87167d96
Add implicit reads for FlowState sinks and steps
2022-09-08 17:26:59 +02:00
Tony Torralba
d5f101d7e6
Add implicit read FlowState test
2022-09-08 17:19:39 +02:00
Robert Marsh
0feeafd0ac
Merge pull request #10339 from MathiasVP/dont-use-get-unique-id-in-range-analysis
...
C++: Don't use `getUniqueId` in range analysis
2022-09-08 11:13:43 -04:00
Taus
366c574308
Python: Move import logic into its own module
2022-09-08 14:52:08 +00:00
Ed Minnix
59909751ae
Change allowBackup tests to use qlref test format
...
Due to some limitations of comments in XML, it is simpler to implement
the `android:allowBackup` tests using the qlref/expectations test format.
2022-09-08 10:34:17 -04:00
Ed Minnix
e69a8269ad
Move CleartextStorage test files into separate dir
...
Move the files for the CleartextStorage tests into their own directory
to avoid issues with extraction
2022-09-08 10:33:05 -04:00
Mathias Vorreiter Pedersen
594c40a375
Merge pull request #10355 from MathiasVP/fix-unequalIntegralSsa-standard-order
...
C++: Avoid bad standard order in range analysis
2022-09-08 14:58:44 +01:00
erik-krogh
88f295fbb1
make a shared library of the typo database
2022-09-08 15:49:43 +02:00
Tom Hvitved
b3653cc3d0
Merge pull request #10216 from hvitved/ssa/shared-lib
...
SSA: Create a new `codeql/shared-ssa` library pack and move implementation there
2022-09-08 15:39:29 +02:00
Tom Hvitved
e3948e6683
Merge pull request #10354 from hvitved/ruby/convert-flow-test
...
Ruby: Convert data-flow test to use inline test expectations
2022-09-08 15:20:58 +02:00
erik-krogh
a21a4275f3
add taint-step in js/insecure-randomness for selecting a random element
2022-09-08 15:00:00 +02:00
Mathias Vorreiter Pedersen
f119b50c2f
C++: Predicate factoring to prevent a bad standard order.
2022-09-08 13:55:27 +01:00
Ian Lynagh
12ca801ecf
Merge pull request #10350 from github/release-prep/2.10.5
...
Release preparation for version 2.10.5
2022-09-08 13:38:47 +01:00
Tom Hvitved
46127f9f59
Ruby: Convert data-flow test to use inline test expectations
2022-09-08 14:32:21 +02:00
Tamas Vajk
824ba6ed2a
Kotlin: Catch exception thrown by kotlinc
2022-09-08 14:09:18 +02:00
github-actions[bot]
a9d80a5a48
Release preparation for version 2.10.5
2022-09-08 11:35:54 +00:00
erik-krogh
a35fe1ffab
Merge branch 'main' into js-followMsg
2022-09-08 13:09:15 +02:00
Taus
8b8e74cc9a
Merge pull request #10314 from RasmusWL/revert-alert-msgs-change
2022-09-08 13:00:47 +02:00
Asger F
df90b99b67
Merge pull request #10348 from RasmusWL/ruby-fix
...
Ruby: Fix ActiveResource HTTP client request modeling
2022-09-08 12:59:27 +02:00
Erik Krogh Kristensen
57bf92a70c
Merge pull request #10347 from erik-krogh/mermaid
...
JS: add a markdown step through the `mermaid` library
2022-09-08 12:41:58 +02:00
Rasmus Wriedt Larsen
978c165cf4
Ruby: Fix ActiveResource HTTP client request modeling
...
This was a conflict between the merge of
https://github.com/github/codeql/pull/9974 and
https://github.com/github/codeql/pull/10114
2022-09-08 12:14:18 +02:00
Rasmus Wriedt Larsen
1d834799a2
Merge pull request #10114 from RasmusWL/shared-http-client-request
...
Ruby/Python: Shared HTTP client request concept
2022-09-08 11:58:06 +02:00
Jeroen Ketema
9a923d8239
Merge pull request #10311 from jketema/more-builtins
...
C++: Support more builtin operations
2022-09-08 11:55:22 +02:00
Ian Lynagh
b62193d4bf
Merge pull request #10333 from igfoo/igfoo/extractStaticInitializer2
...
Kotlin: Remove a cast from extractStaticInitializer
2022-09-08 10:51:36 +01:00
Tamas Vajk
56ef1739a3
Kotlin: fix KFunctionX.invoke extraction
2022-09-08 10:49:10 +02:00
Tamas Vajk
fdf3488500
Kotlin: Add test with extraction error due to missing base class of KFunctionX
2022-09-08 10:49:01 +02:00
Alex Denisov
a8a2c9e212
Swift: CWE-757: update severity
2022-09-08 10:40:16 +02:00
Alex Denisov
d455a557be
Swift: CWE-757: update docs and user facing text
2022-09-08 10:31:23 +02:00
Tom Hvitved
ac307137ad
Merge pull request #10341 from hvitved/ruby/inline-getavaluereachablefromsource
...
Ruby: Inline `getAValueReachableFromSource`
2022-09-08 10:20:43 +02:00
Jeroen Ketema
6330be3902
C++: Update DB scheme stats file
2022-09-08 10:06:57 +02:00
Jeroen Ketema
04000be050
C++: Add DB scheme upgrade and downgrade scripts
2022-09-08 10:06:57 +02:00
Jeroen Ketema
1140d27bda
C++: Add tests for newly supported builtin operations
2022-09-08 10:06:57 +02:00
Jeroen Ketema
2410321acf
C++: Add change note for newly supported builtin operations
2022-09-08 10:06:57 +02:00
Jeroen Ketema
23b9b07f28
C++: Support more builtin operations
2022-09-08 10:06:57 +02:00
Alex Denisov
d18ad665b6
Swift: CWE-757: Insecure TLS configuration
2022-09-08 09:34:04 +02:00
Michael Nebel
e265b07a93
Merge pull request #10127 from michaelnebel/csharp/clearscontent
...
C#: Replace clears content with CSV summaries.
2022-09-08 09:26:08 +02:00
Erik Krogh Kristensen
9534f31eac
Merge pull request #10343 from erik-krogh/spreadFunction
...
JS: recognize calls to `Function` when spread arguments are used
2022-09-08 09:25:10 +02:00
erik-krogh
0407198dd2
add a markdown step through the mermaid library
2022-09-08 09:23:45 +02:00
Tony Torralba
2681b3d032
Merge pull request #10345 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-08 09:15:21 +02:00
Asger F
ada72b865f
Merge pull request #10332 from asgerf/js/type-confusion-bugfix
...
JS: bugfixes in TypeThroughThroughParameterTampering
2022-09-08 09:02:16 +02:00
Harry Maclean
30c9bea8b3
Merge pull request #9974 from hmac/hmac/active-resource
...
Ruby: Model ActiveResource
2022-09-08 07:44:59 +01:00
github-actions[bot]
7e72f53631
Add changed framework coverage reports
2022-09-08 00:21:30 +00:00
Mathias Vorreiter Pedersen
417b2152d8
Merge pull request #10319 from geoffw0/cleartextbarrier
2022-09-08 00:30:57 +01:00
erik-krogh
6447234428
recognize calls to Function where spread arguments are used
2022-09-07 22:55:51 +02:00
erik-krogh
e829387cdb
add failing test for call the Function with a spread argument
2022-09-07 22:54:21 +02:00
Mathias Vorreiter Pedersen
7062263885
C++: Accept test changes.
2022-09-07 21:11:52 +01:00
Tom Hvitved
0070662072
Ruby: Inline getAValueReachableFromSource
2022-09-07 20:28:38 +02:00
Mathias Vorreiter Pedersen
a052614dbf
C++: Two fixes to ensure we don't use getUniqueId in the new range analysis library. (1) don't use it to rank basic blocks, and (2) don't use it in 'toString' on bounds.
2022-09-07 18:45:43 +01:00
Ed Minnix
09b723fc6d
Formatting fixes for allowBackup tests
2022-09-07 13:30:19 -04:00
Andrew Eisenberg
144a0455d8
Merge pull request #10146 from github/aeisenberg/remove-db-upgrades-doc
...
Remove upgrade database docs
2022-09-07 09:49:26 -07:00
Mathias Vorreiter Pedersen
76d433d4ee
Merge pull request #9997 from rdmarsh2/rdmarsh2/cpp/product-flow
...
C++: Experimental product flow library
2022-09-07 17:34:39 +01:00
Ed Minnix
c69a2be976
Moved allowBackup query logic to allowsBackup pred
2022-09-07 12:08:25 -04:00
Ed Minnix
5206c792b0
Additional Unit tests for the allowBackup query
2022-09-07 12:07:48 -04:00
Andrew Eisenberg
fb8a0fc36f
Merge pull request #10182 from github/aeisenberg/codeql-workspace-docs
...
Add docs for codeql workspaces
2022-09-07 08:46:56 -07:00
Mathias Vorreiter Pedersen
e37848ec6d
C++: Remove 'IRConfiguration' since we no longer generate bad IR for range analysis.
2022-09-07 16:39:45 +01:00
Mathias Vorreiter Pedersen
86259ced97
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 16:38:42 +01:00
Robert Marsh
55a10d99b4
Merge pull request #10305 from MathiasVP/ql-workaround-for-missing-decl-entries
...
C++: Synthesize `DeclarationEntry`s for IR construction
2022-09-07 11:34:28 -04:00
Tamás Vajk
b129c4098d
Merge pull request #10278 from tamasvajk/kotlin-reified-enum
...
Kotlin: Extract error expression for `enumValues<T>` calls
2022-09-07 17:33:08 +02:00
Andrew Eisenberg
a065974fb8
Merge branch 'aeisenberg/remove-db-upgrades-doc' into aeisenberg/codeql-workspace-docs
2022-09-07 08:10:14 -07:00
Andrew Eisenberg
059d32089e
Merge branch 'main' into aeisenberg/remove-db-upgrades-doc
2022-09-07 08:07:39 -07:00
Andrew Eisenberg
bc17d061e7
Merge pull request #10105 from github/aeisenberg/about-codeql-packs
...
Merge and update `about-ql-packs` with `about-codeql-packs`
2022-09-07 08:05:09 -07:00
Mathias Vorreiter Pedersen
7833de19b5
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 16:00:43 +01:00
Robert Marsh
e174123c43
Merge pull request #10337 from MathiasVP/fix-cartesian-product-in-range-analysis
...
C++: Remove CP in `getAPhiInput`
2022-09-07 10:59:27 -04:00
Paolo Tranquilli
a5233c0d01
Swift: fix @id
2022-09-07 16:17:45 +02:00
Mathias Vorreiter Pedersen
ddeae090a3
C++: Remove CP.
2022-09-07 15:11:16 +01:00
Paolo Tranquilli
19b13ee4e3
Swift: first draft of query targeting weak hashing
2022-09-07 15:58:35 +02:00
Mathias Vorreiter Pedersen
011d15aca3
C++: Accept test changes.
2022-09-07 14:56:08 +01:00
Edward Minnix III
f6c8144eed
Update java/ql/src/Security/CWE/CWE-312/AllowBackupAttributeEnabled.ql
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-07 09:46:36 -04:00
Edward Minnix III
9ddfcf935b
Update java/ql/src/change-notes/2022-08-18-android-allowbackup-query.md
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-09-07 09:46:16 -04:00
Dave Bartolomeo
950445500a
Merge pull request #10321 from MathiasVP/speedup-using-expired-stack-address-2
...
C++: Speedup 'cpp/using-expired-stack-address' by avoiding a large ne…
2022-09-07 09:33:20 -04:00
Tamas Vajk
2728517c7f
Improve error handling
2022-09-07 15:31:23 +02:00
Tamas Vajk
0f967060e5
Fix merge conflict
2022-09-07 15:24:25 +02:00
Tamas Vajk
acac5fe4fd
Improve code quality
2022-09-07 15:21:12 +02:00
Tamas Vajk
7f7cb2c579
Kotlin: refactor declaration stack to handle file as declaration parent
2022-09-07 15:21:11 +02:00
Tamas Vajk
25977778a2
Kotlin: Fix duplicate field entry in declaration stack
2022-09-07 15:21:11 +02:00
Tamas Vajk
0c257a1b78
Kotlin: add test for incorrect declaration stack
2022-09-07 15:21:10 +02:00
Ian Lynagh
bf6e988fcd
Merge pull request #10331 from igfoo/igfoo/extractConstructorCall3
...
Kotlin: Remove a cast from extractConstructorCall
2022-09-07 14:01:40 +01:00
Asger F
6806bc1da4
JS: Expand test case
2022-09-07 14:18:01 +02:00
Asger F
6b2ebcce3a
Merge pull request #10276 from asgerf/mad-typedef-entry-points
...
Add TypeModel hook for adding MaD type-defs from CodeQL
2022-09-07 14:14:48 +02:00
Tamas Vajk
f84e62e16b
Add todo comment based on PR review
2022-09-07 13:47:28 +02:00
Ian Lynagh
b2c83ae69b
Kotlin: Remove a cast from extractStaticInitializer
2022-09-07 12:46:26 +01:00
Asger F
5c12780b1c
JS: Change note
2022-09-07 13:45:38 +02:00
Asger F
d31b59e61d
JS: Call super in isBarrier() override
2022-09-07 13:40:30 +02:00
Asger F
e3c84eefc1
JS: Correctly recognize Array.isArray calls
2022-09-07 13:39:52 +02:00
Asger F
3184ddb38a
JS: Fix test case
2022-09-07 13:39:51 +02:00
Ian Lynagh
159ee99b6d
Kotlin: Remove a cast from extractConstructorCall
2022-09-07 12:29:24 +01:00
Tony Torralba
cd61bd0606
Move files from experimental
2022-09-07 13:13:40 +02:00
Tamás Vajk
3410dd589d
Merge pull request #9783 from tamasvajk/feature/kotlin-stdlib-mad
...
Kotlin: Add MaD for stdlib
2022-09-07 12:57:23 +02:00
Tamás Vajk
5c37430031
Merge pull request #10329 from tamasvajk/kotlin-type-access-todo
...
Kotlin: Add todo comment describing type access extraction inconsistency
2022-09-07 12:56:54 +02:00
erik-krogh
79a048968e
make the alert messages of taint-tracking queries more consistent
2022-09-07 12:22:50 +02:00
Rasmus Lerchedahl Petersen
1649ec7cd7
Python: Describe current naming scheme
...
In the hope that this will enable a better one.
It looks like
- type tracking should currently be mutually recursive with data flow
(this needs investigation)
- type tracking already supports special methods
(we should probably have a test for this)
2022-09-07 12:18:42 +02:00
Mathias Vorreiter Pedersen
e0a5d18d7d
C++: Respond to Schack feedback.
2022-09-07 11:16:35 +01:00
Mathias Vorreiter Pedersen
5ce47d97b2
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 11:14:42 +01:00
Ian Lynagh
89fc84d29a
Merge pull request #10322 from igfoo/igfoo/arrays2
...
Kotlin: Rewrite array type extraction
2022-09-07 10:45:33 +01:00
Ian Lynagh
6bee9d8dee
Merge pull request #10323 from igfoo/igfoo/extractPropertyReference
...
Kotlin: Remove a cast from extractPropertyReference
2022-09-07 10:44:17 +01:00
Ian Lynagh
67f8c8215c
Merge pull request #10325 from igfoo/igfoo/getDeclaringTypeArguments2
...
Kotlin: Remove a cast from getDeclaringTypeArguments
2022-09-07 10:44:02 +01:00
Ian Lynagh
b4b52b9074
Merge pull request #10324 from igfoo/igfoo/extractConstructorCall2
...
Kotlin: Remove a cast from extractConstructorCall
2022-09-07 10:43:54 +01:00
Ian Lynagh
4a8d08e21f
Merge pull request #10326 from igfoo/igfoo/useClassSource
...
Kotlin: Remove some redundant code
2022-09-07 10:43:42 +01:00
Tony Torralba
8e0b4892ee
Add Implicit PendingIntents sinks for Compat classes
2022-09-07 11:04:22 +02:00
Tamas Vajk
07038d0b3a
Fix QL formatting
2022-09-07 10:48:22 +02:00
Tamas Vajk
2a529cf385
Kotlin: Add todo comment describing type access extraction inconsistency
2022-09-07 10:31:41 +02:00
Rasmus Lerchedahl Petersen
565378031d
Python: remember to import the new framework
...
I think it should perhaps not be mentioned in `frameworks.rst`
2022-09-07 10:24:58 +02:00
Rasmus Lerchedahl Petersen
0cfb49102b
Python: fix non-US spelling
2022-09-07 09:30:42 +02:00
Anders Schack-Mulligen
95a9faf1f9
Merge pull request #10327 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-07 09:27:32 +02:00
Tamás Vajk
b1e0d73de8
Merge pull request #10297 from tamasvajk/kotlin-fix-kotlin-to-java-fn-names
...
Kotlin: Lookup getter methods based on special JVM method mapping
2022-09-07 08:56:19 +02:00
Tom Hvitved
987870bb62
Merge pull request #10315 from hvitved/ruby/parameter-match-join
...
Ruby: Fix bad join in `parameterMatch`
2022-09-07 08:43:15 +02:00
erik-krogh
283c711de9
deprecate unused predicate inside the essa module
2022-09-07 07:40:04 +02:00
erik-krogh
1cbf28358c
deprecate unused code inside the points-to library
2022-09-07 07:39:16 +02:00
erik-krogh
46b7aa92ae
deprecate predicates in protocols.qll that were only retained for backwards compatibility
2022-09-07 07:37:51 +02:00
github-actions[bot]
6f4806361b
Add changed framework coverage reports
2022-09-07 00:18:47 +00:00
Rasmus Lerchedahl Petersen
b2fbbc6ac5
Python: add a flow summary
...
we could consider adding non-value-preserving flow from input to output
2022-09-06 21:29:58 +02:00
Andrew Eisenberg
65c2477409
Add reference to Source Dependencies section
2022-09-06 11:53:17 -07:00
Andrew Eisenberg
3f7a34de94
Merge branch 'aeisenberg/about-codeql-packs' into aeisenberg/codeql-workspace-docs
2022-09-06 11:48:11 -07:00
Andrew Eisenberg
137b068e4c
Move Source Dependencies description to its own section
2022-09-06 11:46:47 -07:00
Ed Minnix
dca4cd221a
Documentation cleanup for allowBackup query
2022-09-06 14:35:11 -04:00
Andrew Eisenberg
9e6e37a223
Add reference to codeql-pack.lock.yml in test packs
2022-09-06 11:33:19 -07:00
Ed Minnix
0a83cedeb7
Unit tests for android:allowBackup query
2022-09-06 13:52:43 -04:00
Asger F
0cc3b8a9ec
JS: Update test output
2022-09-06 18:48:14 +02:00
Rasmus Lerchedahl Petersen
f6d807aec0
Python: Add summary test append_to_list
2022-09-06 18:42:32 +02:00
Ian Lynagh
8a5cb11014
Kotlin: Remove some redundant code
...
useClassSource already checks to see if it is given an anonymous object,
and behaves accordingly.
2022-09-06 17:30:04 +01:00
Ian Lynagh
4a8960607d
Kotlin: Remove a cast from getDeclaringTypeArguments
2022-09-06 17:26:15 +01:00
Ian Lynagh
bd5eb1f0ac
Kotlin: Remove a cast from extractConstructorCall
2022-09-06 17:23:33 +01:00
Ian Lynagh
d18d5b5cf4
Kotlin: Remove a cast from extractPropertyReference
2022-09-06 17:19:28 +01:00
Taus
3bb7e28712
Merge pull request #10176 from RasmusWL/import-problem
...
Python: Add testcase for import problem
2022-09-06 18:12:37 +02:00
Ian Lynagh
5c3d6cedfa
Kotlin: Rewrite array type extraction
...
It's now simpler, and doesn't require we ask the Kotlin compiler to
build as many types for us.
2022-09-06 17:02:43 +01:00
Rasmus Lerchedahl Petersen
744fbf0c1b
Python: qldoc for inject
2022-09-06 17:46:14 +02:00
Rasmus Lerchedahl Petersen
67710eaed7
Python: Comment to highlight convention
2022-09-06 17:43:34 +02:00
Rasmus Lerchedahl Petersen
a496d10126
Python: qldoc to highlight source code aspect
2022-09-06 17:39:20 +02:00
Rasmus Lerchedahl Petersen
e7400e90e5
Python: add qldoc
2022-09-06 17:29:27 +02:00
Rasmus Lerchedahl Petersen
4cd41c24c7
Python: remove comments and start design document
2022-09-06 17:23:40 +02:00
Rasmus Lerchedahl Petersen
67c3a9b2f4
Python: resolve library calls in the CFG
...
rather than in the AST
2022-09-06 17:00:28 +02:00
Tony Torralba
ff731f1d83
Merge pull request #10138 from atorralba/atorralba/contentresolver-summaries
...
Java: Add summaries for ContentResolver and adjacent classes
2022-09-06 16:28:28 +02:00
Mathias Vorreiter Pedersen
d6b8f25312
C++: Add more tests.
2022-09-06 15:22:10 +01:00
Tony Torralba
c0dd9dd5d5
Merge pull request #10249 from atorralba/atorralba/regex-dot-bypass-docs
...
Java: Documentation fixes in the "Permissive dot regex" experimental query
2022-09-06 16:18:35 +02:00
Anders Schack-Mulligen
b84dca92cf
Merge pull request #10240 from aschackmull/java/scc-typeflow
...
Java: Support SCCs in TypeFlow.
2022-09-06 15:43:20 +02:00
Mathias Vorreiter Pedersen
9745073024
C++: Speedup 'cpp/using-expired-stack-address' by avoiding a large negation.
2022-09-06 14:33:33 +01:00
Geoffrey White
d1867b9716
Merge pull request #10284 from geoffw0/stringlengthcleanup
...
Swift: Improve swift/string-length-conflation
2022-09-06 14:07:02 +01:00
Asger F
e8864d072d
JS: Remove stray module DF export
2022-09-06 15:06:33 +02:00
Asger F
95c60858d4
Export as DataFlow instead of DF
2022-09-06 15:02:48 +02:00
Geoffrey White
d0cda04909
Swift: Clearer, possibly more efficient implementation.
2022-09-06 13:48:04 +01:00
Tony Torralba
b745b5ab71
Add models for androidx.core.app.NotificationCompat
2022-09-06 14:43:13 +02:00
Geoffrey White
0741266cea
Swift: Switch from isSanitizerIn to isSanitizer.
2022-09-06 13:37:49 +01:00
Geoffrey White
8281d92e71
Swift: Add barriers for encryption.
2022-09-06 13:37:49 +01:00
Geoffrey White
9683a95162
Swift: Add a few more test cases.
2022-09-06 13:37:48 +01:00
Tom Hvitved
f448965953
Merge pull request #10294 from hvitved/csharp/integration-tests
...
C#: Add `dotnet build` integration test
2022-09-06 14:35:17 +02:00
Rasmus Lerchedahl Petersen
e5f087518e
Python: stay in control flow layer
2022-09-06 14:16:48 +02:00
Anders Schack-Mulligen
6ffaa6918a
Apply suggestions from code review
2022-09-06 14:11:48 +02:00
Anders Schack-Mulligen
bc57d87303
Java: Address comments.
2022-09-06 13:59:54 +02:00
Tom Hvitved
0353b3ebfc
Merge pull request #10308 from github/rc/3.7
...
Merge `rc/3.7` into `main`
2022-09-06 13:32:00 +02:00
Tamas Vajk
57f50725ba
Revert formatting change
2022-09-06 13:28:38 +02:00
Tamas Vajk
bbf4563cfe
Apply review findings
2022-09-06 13:25:12 +02:00
Tom Hvitved
b2c38b37de
Merge pull request #10296 from hvitved/ruby/call-graph-missing-singletons
...
Ruby: Add missing edges to the call graph for singleton methods
2022-09-06 13:23:24 +02:00
Tom Hvitved
66df44f8c9
Merge pull request #10310 from hvitved/csharp/docs/shared-compilation
...
Docs: No longer mention required `/p:UseSharedCompilation=false`
2022-09-06 13:20:59 +02:00
Tom Hvitved
8b8a662c76
Ruby: Fix bad join in parameterMatch
...
Before
```
Evaluated relational algebra for predicate DataFlowDispatch#36b84300::parameterMatch#2#ff@281bdfu5 with tuple counts:
23338949 ~0% {2} r1 = JOIN DataFlowDispatch#36b84300::Cached::TParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::TArgumentPosition#f CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.0
65011 ~0% {2} r2 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TAnyParameterPosition#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1
65010 ~0% {2} r3 = r2 AND NOT DataFlowDispatch#36b84300::Cached::TSelfArgumentPosition#f(Lhs.1)
23338949 ~0% {2} r4 = JOIN DataFlowDispatch#36b84300::Cached::TParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::TArgumentPosition#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0
359 ~3% {2} r5 = JOIN r4 WITH DataFlowDispatch#36b84300::Cached::TAnyArgumentPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
358 ~3% {2} r6 = r5 AND NOT DataFlowDispatch#36b84300::Cached::TSelfParameterPosition#f(Lhs.0)
65368 ~0% {2} r7 = r3 UNION r6
65011 ~0% {2} r8 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TSelfParameterPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
1 ~0% {2} r9 = JOIN r8 WITH DataFlowDispatch#36b84300::Cached::TSelfArgumentPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
65011 ~0% {2} r10 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TBlockParameterPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
1 ~0% {2} r11 = JOIN r10 WITH DataFlowDispatch#36b84300::Cached::TBlockArgumentPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
65011 ~3% {2} r12 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::THashSplatParameterPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
1 ~0% {2} r13 = JOIN r12 WITH DataFlowDispatch#36b84300::Cached::THashSplatArgumentPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
2 ~0% {2} r14 = r11 UNION r13
3 ~0% {2} r15 = r9 UNION r14
65371 ~0% {2} r16 = r7 UNION r15
65011 ~0% {2} r17 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TAnyKeywordParameterPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
1645 ~1% {2} r18 = JOIN r17 WITH DataFlowDispatch#36b84300::Cached::TKeywordArgumentPosition#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0
359 ~0% {2} r19 = JOIN r4 WITH DataFlowDispatch#36b84300::Cached::TAnyKeywordArgumentPosition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
320 ~0% {2} r20 = JOIN r19 WITH DataFlowDispatch#36b84300::Cached::TKeywordParameterPosition#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1
1965 ~1% {2} r21 = r18 UNION r20
20803520 ~1% {3} r22 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TKeywordParameterPosition#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
320 ~0% {2} r23 = JOIN r22 WITH DataFlowDispatch#36b84300::Cached::TKeywordArgumentPosition#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.1
2145363 ~0% {3} r24 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TPositionalParameterPosition#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
33 ~0% {2} r25 = JOIN r24 WITH DataFlowDispatch#36b84300::Cached::TPositionalArgumentPosition#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.1
65011 ~0% {3} r26 = JOIN r1 WITH DataFlowDispatch#36b84300::Cached::TPositionalParameterLowerBoundPosition#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
63361 ~0% {4} r27 = JOIN r26 WITH DataFlowDispatch#36b84300::Cached::TPositionalArgumentPosition#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Rhs.1
63360 ~0% {4} r28 = SELECT r27 ON In.3 >= In.2
63360 ~0% {2} r29 = SCAN r28 OUTPUT In.0, In.1
63393 ~0% {2} r30 = r25 UNION r29
63713 ~0% {2} r31 = r23 UNION r30
65678 ~0% {2} r32 = r21 UNION r31
131049 ~0% {2} r33 = r16 UNION r32
return r33
```
After
```
Evaluated relational algebra for predicate DataFlowDispatch#36b84300::parameterMatch#2#ff@698b99ci with tuple counts:
1 ~0% {2} r1 = JOIN DataFlowDispatch#36b84300::Cached::TSelfParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::TSelfArgumentPosition#f CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.0
1 ~0% {2} r2 = JOIN DataFlowDispatch#36b84300::Cached::TBlockParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::TBlockArgumentPosition#f CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.0
2 ~0% {2} r3 = r1 UNION r2
1 ~0% {2} r4 = JOIN DataFlowDispatch#36b84300::Cached::THashSplatParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::THashSplatArgumentPosition#f CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.0
65010 ~0% {2} r5 = JOIN DataFlowDispatch#36b84300::Cached::TAnyParameterPosition#f WITH DataFlowDispatch#36b84300::argumentPositionIsNotSelf#1#f CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.0
358 ~3% {2} r6 = JOIN DataFlowDispatch#36b84300::Cached::TAnyArgumentPosition#f WITH DataFlowDispatch#36b84300::parameterPositionIsNotSelf#1#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0
65368 ~0% {2} r7 = r5 UNION r6
65369 ~0% {2} r8 = r4 UNION r7
65371 ~0% {2} r9 = r3 UNION r8
1645 ~1% {2} r10 = JOIN DataFlowDispatch#36b84300::Cached::TAnyKeywordParameterPosition#f WITH DataFlowDispatch#36b84300::Cached::TKeywordArgumentPosition#ff CARTESIAN PRODUCT OUTPUT Lhs.0, Rhs.1
320 ~0% {2} r11 = JOIN DataFlowDispatch#36b84300::Cached::TAnyKeywordArgumentPosition#f WITH DataFlowDispatch#36b84300::Cached::TKeywordParameterPosition#ff CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0
1965 ~1% {2} r12 = r10 UNION r11
33 ~0% {2} r13 = JOIN DataFlowDispatch#36b84300::Cached::TPositionalParameterPosition#ff WITH DataFlowDispatch#36b84300::Cached::TPositionalArgumentPosition#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
320 ~0% {2} r14 = JOIN DataFlowDispatch#36b84300::Cached::TKeywordParameterPosition#ff WITH DataFlowDispatch#36b84300::Cached::TKeywordArgumentPosition#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
63361 ~1% {4} r15 = JOIN DataFlowDispatch#36b84300::Cached::TPositionalParameterLowerBoundPosition#ff WITH DataFlowDispatch#36b84300::Cached::TPositionalArgumentPosition#ff CARTESIAN PRODUCT OUTPUT Lhs.0, Lhs.1, Rhs.0, Rhs.1
63360 ~1% {4} r16 = SELECT r15 ON In.2 >= In.0
63360 ~0% {2} r17 = SCAN r16 OUTPUT In.1, In.3
63680 ~0% {2} r18 = r14 UNION r17
63713 ~0% {2} r19 = r13 UNION r18
65678 ~0% {2} r20 = r12 UNION r19
131049 ~0% {2} r21 = r9 UNION r20
return r21
```
2022-09-06 13:02:36 +02:00
Erik Krogh Kristensen
c76b6d1782
Merge pull request #10309 from erik-krogh/leftoverTodo
...
JS: fix leftover todo in js/insecure-temporary-file
2022-09-06 12:31:29 +02:00
erik-krogh
24f2e3cc07
update alert-messages of the sensitive data queries to match #10314
2022-09-06 12:25:36 +02:00
Taus
810568cf02
Merge pull request #10171 from RasmusWL/variable-accesss
...
Python: Fixes for variable access
2022-09-06 12:18:37 +02:00
Rasmus Wriedt Larsen
5f6e3dcc2e
Python: Revert changes to sensitive data query alert messages
...
This partly reverts the changes from https://github.com/github/codeql/pull/10252
Although consistency is nice, the new messages didn't sound as natural.
New alert message would read
> Insecure hashing algorithm (md5) depends on sensitive data (password). (...)
I'm not sure what it means that a hashing algorithm depends on data. So
for me, the original text below is much easier to understand.
> Sensitive data (password) is used in a hashing algorithm (md5) that is insecure (...)
Same goes for the other sensitive data queries.
2022-09-06 12:01:24 +02:00
Mathias Vorreiter Pedersen
02c18e714b
C++: Mention 'range-based for-loops' in the QLDoc for 'IRDeclarationEntry'.
2022-09-06 10:40:13 +01:00
Mathias Vorreiter Pedersen
10f962f341
C++: Rename 'PseudoDeclarationEntry' to 'IRDeclarationEntry'.
2022-09-06 10:36:38 +01:00
Tamas Vajk
826bbdf834
Kotlin: Fix vararg extraction outside of method call
2022-09-06 11:32:32 +02:00
Tamas Vajk
cb3c53dee7
Kotlin: Add test case for unexpected vararg extraction error
2022-09-06 11:32:24 +02:00
Mathias Vorreiter Pedersen
ed3fff0eba
Update cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-09-06 10:32:16 +01:00
Tony Torralba
b94e0d3e69
Merge pull request #10251 from atorralba/atorralba/implicit-pendingintent-sinks
...
Java: Add new AlarmManager sinks to Use of implicit PendingIntents
2022-09-06 11:31:27 +02:00
Rasmus Wriedt Larsen
7895a5859d
Ruby: Autoformat
2022-09-06 11:01:06 +02:00
Rasmus Wriedt Larsen
a9e1e72196
Merge branch 'main' into shared-http-client-request
2022-09-06 10:52:27 +02:00
Rasmus Wriedt Larsen
528ef0eeaa
Ruby: Use separate dataflow copy for HTTP client libs
...
As discussed with @hvitved offline. This helps out to ensrue we don't
needlessly evaluate dataflow for configurations that are not needed
anyway. That is, if other library modeling also used the same dataflow
configuration, which ends up being used in query A, then dataflow for
all the `DataFlowImplForLibraries` configurations would be computeted at
once. When we get to evaluate the query `RequestWithoutValidation.ql`
these results mgith have been forgotten since the predicates are not
cached, and everything will have to be computeted again.
In principle we could be added a dataflow copy for each framework.
However, since we know that the `disablesCertificateValidation`
member-predicates for all the HTTP client libraries will all be used at
the same time, and only for the one query, we only add ONE additional
copy.
Note that the only use of `DataFlowImplForLibraries` before this PR is
using `tainttrackingforlibraries.TaintTrackingImpl` (based on
DataFlowImplForLibraries) for regex computation.
c904ba1d16/ruby/ql/lib/codeql/ruby/Regexp.qll (L153)
Since this is currently transitively imported from Frameworks.qll
(through Core.qll, and core/String.qll), the previous approach didn't
actually violate the assumption about all configurations always being in
scope, but it might have been more by accident, than by purpose.
2022-09-06 10:43:36 +02:00
Rasmus Wriedt Larsen
25d09cd6d6
Ruby: Simplify getKeywordArgumentIncludeHashArgument
...
As suggested by @hvitved in review
2022-09-06 10:24:22 +02:00
Tom Hvitved
eff3747eb9
Docs: No longer mention required /p:UseSharedCompilation=false
2022-09-06 10:13:29 +02:00
Rasmus Wriedt Larsen
07457b2b5f
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
d708abfc80
Python: Accept more .expected changes
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
c9cd809ef2
Python: Add change-note
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
e979dffc08
Python: Fix variable access from extractor-change
...
These changes are from internal PR.
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
985e87ccde
Python: Add variable scope example with subclass
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
0e3d520712
Python: Add variables regression test
...
As illustrated when running the python file, the non qualified reads in
the `use` method all refer to the global variables, whereas `ex =
func(baz)` are to the things defined on the class.
The important part of the .expected changes is that the _global_
variable `bar` is used inside the function, whereas it's the local
variable for `foo` (on class scope) that is used inside the function
(which is wrong).
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
98db1af898
Python: Also show variable access
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
fd4f60dd1b
Python: Adjust variables tests
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
ebd97f4496
Python: Add type-tracking regession example
2022-09-06 10:11:36 +02:00
erik-krogh
0776687991
fix leftover todo in js/insecure-temporary-file
2022-09-06 10:05:50 +02:00
Philip Ginsbach
6674e07eaa
Merge pull request #10088 from github/parameterisedModules
...
parameterised modules in the QL language reference
2022-09-06 08:59:31 +01:00
Tom Hvitved
12015928c1
Merge pull request #10295 from hvitved/csharp/code-analysis-shared-compilation
...
C#: No longer manually disable shared compilation in `codeql-analysis.yml`
2022-09-06 09:45:31 +02:00
Asger F
5ef69628b3
Ruby: remove exists that ql4ql is unhappy about
2022-09-06 09:36:06 +02:00
Michael Nebel
0e52d2c9d3
C#: Add missing bi-directional imports.
2022-09-06 09:34:13 +02:00
Asger F
f07e0592d0
JS: Drive-by fix for accidental recursion
2022-09-06 09:30:02 +02:00
Asger F
c7c3ad29cd
Python: sync with Python
2022-09-06 09:30:02 +02:00
Asger F
2cbba65617
JS: Sync with JS
...
fixup JS
2022-09-06 09:30:02 +02:00
Tom Hvitved
62986a23f3
C#: Add dotnet build integration test
2022-09-06 09:24:54 +02:00
Asger F
afd00161e8
Ruby: introduce getExtraNodeFromType
...
Using getExtraNodeFromPath with n=0 was a bit of a hack. In principle, the CodeQL libraries might care about the type, even though there are no relevant paths starting at that type.
2022-09-06 09:17:34 +02:00
Asger F
b99e9a58e7
Update ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModels.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-09-06 09:10:24 +02:00
Tom Hvitved
9fd9a04c2f
Merge pull request #10277 from hvitved/csharp/dotnet-publish-inject
...
C#: Also inject `/p:UseSharedCompilation=false` into `dotnet publish`
2022-09-06 09:02:00 +02:00
Tamás Vajk
5f841f71db
Merge pull request #10291 from tamasvajk/kotlin-fix-array-set
...
Kotlin: Fix array `set` operator extraction
2022-09-06 09:01:05 +02:00
Arthur Baars
604af4f7b3
Merge pull request #10302 from github/rc/3.7
...
Merge 3.7 into main
2022-09-06 08:42:44 +02:00
Mathias Vorreiter Pedersen
885bf427bd
C++: Accept test changes.
2022-09-05 23:26:03 +01:00
Mathias Vorreiter Pedersen
f6654e3d69
C++: As a bonus we now no longer need the 'TTranslatedRangeBasedForVariableDeclaration' IPA branch. This previously existed only to account for the missing 'DeclarationEntry's happening in range-based for loops. But these are now also handled by 'PseudoDeclarationEntry's.
2022-09-05 22:18:41 +01:00
Mathias Vorreiter Pedersen
fc85ef76ed
C++: Introduce 'PseudoDeclarationEntry's to handle missing 'DeclarationEntry's during IR construction.
2022-09-05 22:17:14 +01:00
Arthur Baars
e8d13d156d
Merge pull request #10298 from aibaars/suppress-require
...
Ruby: exclude 'require' and 'require_relative' definitions from call graph
2022-09-05 20:58:38 +02:00
Rasmus Lerchedahl Petersen
af08c6eb08
Python: remove repeated test file
2022-09-05 20:44:55 +02:00
Philip Ginsbach
cec63e4522
Update docs/codeql/ql-language-reference/modules.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-05 19:17:11 +01:00
Philip Ginsbach
aa539454b5
Update docs/codeql/ql-language-reference/index.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-05 19:17:06 +01:00
Mathias Vorreiter Pedersen
2da46ad691
C++: Add two testcases demonstrating malformed IR from missing declaration entries from decl stmts.
2022-09-05 17:49:20 +01:00
Geoffrey White
b6d5b6731a
C++: Make QLDoc meet style guide.
2022-09-05 17:17:57 +01:00
Geoffrey White
234da636a4
C++: Change note.
2022-09-05 17:01:25 +01:00
Geoffrey White
008d583da8
C++: Modernize cpp/cleartext-storage-database.
2022-09-05 16:47:14 +01:00
Arthur Baars
b2431d0b50
Ruby: exclude 'require' and 'require_relative' definitions from call graph
...
The syntax_suggest library redefines Kernel.require/require_relative.
Somehow this causes performance issues on ruby/ruby. As a workaround
we exclude 'require' and 'require_relative'.
2022-09-05 16:52:52 +02:00
Rasmus Lerchedahl Petersen
d31d763328
Python: adjust test expectations
...
We now locate a `DataFlow::Node` rather than an 'AstNode`.
2022-09-05 16:45:43 +02:00
Tamás Vajk
1178dcb507
Merge pull request #10293 from tamasvajk/fix/ql4ql-pr-trigger
...
Workflow: Add paths filter to QL for QL workflow
2022-09-05 16:22:05 +02:00
Erik Krogh Kristensen
4e14177614
fix typo in change-note
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
54eb0414cb
rename an upper-cased acronym
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
90bc8a5038
run the explicit-this patch on javascript/
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
b398f968e2
expand change-note to mention classes that have a changed basetype
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
e64f96c1ce
rewrite the change-note to emphasise that the change is potentially breaking
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
26f5643f3e
update the deprecation notice of RouteExpr such that it points to public APIs
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
e387ebaedd
add domNode.innerHTML += sink as a DOM sink
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
74a79f8622
simplify int check
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
73a936104a
fix typo in qldoc
...
Co-authored-by: Asger F <asgerf@github.com >
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
833480d5c5
add change note
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
5b61db9fd3
refactor miscellaneous expression uses to dataflow nodes
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
6697dd1396
rewrite some expression based predicates in TaintTracking.qll
2022-09-05 16:11:55 +02:00
Erik Krogh Kristensen
b4968eb645
refactor the SensitiveExpr to be a dataflow node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
0c4f08c841
refactor the CredentialsExpr to be a dataflow node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
c5b1588096
update the SQL/NoSQL models to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
4d0534352e
refactor a use of MethodCallExpr in ClientSideUrlRedirectCustomizations.qll
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
e0e8085b95
update the cryptoLibraries to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
5ebea8c75a
fix express in the POI test
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
aa9261f1b1
convert the AngularJS model to use DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
9bea110d24
convert the DOM model to use DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
2f429e7d29
convert some leftovers to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
136124fbaa
convert the remaining Koa models to DataFlow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
fc54ba823b
update the existing expression based Express models
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
8266b083d7
update the predicates on Express::RouteHandler to use dataflow nodes
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
4cfbf15d18
deprecate RouteHandlerExpr and make RouteHandlerNode instead
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
3da34ca7a0
update Express::RouteExpr to a DataFlow::Node
2022-09-05 16:11:54 +02:00
Erik Krogh Kristensen
3eb486610b
update Express::RouterDefinition to a DataFlow::InvokeNode
2022-09-05 16:11:51 +02:00
Erik Krogh Kristensen
b77d77d8eb
Merge pull request #10209 from erik-krogh/caseConsistency
...
QL: add query detecting consistent casing of names
2022-09-05 16:07:59 +02:00
Tamas Vajk
1c21ce0ec4
Kotlin: Lookup getter methods based on special JVM method mapping
2022-09-05 16:02:25 +02:00
Tamas Vajk
6a90db9b30
Kotlin: List diagnostics for special getter method extraction
2022-09-05 16:00:40 +02:00
Erik Krogh Kristensen
92240384a9
update the tests to reflect the extra DataFlow::Nodes
2022-09-05 15:47:38 +02:00
Erik Krogh Kristensen
dfb7782be0
replace getA?RouteHandlerExpr with getA?RouteHandlerNode
2022-09-05 15:46:27 +02:00
Erik Krogh Kristensen
288230d7cf
update tests to reflect the extra DataFlow::Nodes from ResponseNode and RequestNode
2022-09-05 15:46:27 +02:00
Erik Krogh Kristensen
30d929909c
deprecate RequestExpr and ResponseExpr and use ResponseNode and RequestNode instead
2022-09-05 15:46:25 +02:00
Erik Krogh Kristensen
9cb7522bc1
change RouteSetup to a DataFlow::Node
2022-09-05 15:45:31 +02:00
Erik Krogh Kristensen
d98028be1a
change ServerDefinition to a DataFlow::Node
2022-09-05 15:44:56 +02:00
Geoffrey White
946456acc2
C++: Apply the sanitizer improvement from cpp/cleartext-storage-buffer in cpp/cleartext-storage-file and cpp/cleartext-transmission.
2022-09-05 14:44:33 +01:00
Erik Krogh Kristensen
ced4843dd7
change CookieDefinition to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
24b845589d
change ResponseBody to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
19e808186d
refactor definesExplicitly to use DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
ce0175a046
don't use astNode in StandardHeaderDefinition
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
d4ccc75ce1
refactor RedirectInvocation to a DataFlow::Node
2022-09-05 15:44:13 +02:00
Erik Krogh Kristensen
a03e6a800d
deprecate the HTTP flowsTo predicates to avoid confusion with SourceNode::flowsTo
2022-09-05 15:44:12 +02:00
James Fletcher
d787d94fbd
Merge branch 'main' into download-db-vs-code
2022-09-05 13:55:17 +01:00
Ian Lynagh
b38ad13f82
Merge pull request #10268 from tamasvajk/kotlin-local-function-comments
...
Kotlin: fix doc comment extraction for local functions
2022-09-05 13:35:01 +01:00
Taus
c19574b9a4
Merge pull request #10267 from yoff/python/port-EmptyExcept
...
python: Rewrite EmptyExcept from `points-to` to API graph
2022-09-05 14:11:34 +02:00
Tom Hvitved
b197eff23e
Ruby: Add missing edges to the call graph for singleton methods
2022-09-05 14:11:04 +02:00
Tom Hvitved
ab22f932a5
Ruby: Add more tests for singleton methods
2022-09-05 14:09:59 +02:00
erik-krogh
aa56ca37ae
make the alert messages of taint-tracking queries more consistent
2022-09-05 14:04:52 +02:00
Erik Krogh Kristensen
1fe9b3f4bd
Merge pull request #10252 from erik-krogh/py-followMsg
...
PY: change alert messages of path queries to use the same template
2022-09-05 14:03:36 +02:00
Tom Hvitved
e680d1a6ec
C#: No longer manually disable shared compilation in codeql-analysis.yml
...
Instead, rely on the tracer to inject the flag.
2022-09-05 13:55:58 +02:00
Rasmus Lerchedahl Petersen
5fc1bbc8c5
Python: Only alert on Python 2 code
...
since
- Python 3 is ok from 3.7 onwards
- support for Python 3.6 was just dropped
- we do not actually know the minor version of the analysed code
(only of the extractor)
2022-09-05 13:38:14 +02:00
erik-krogh
0de0325c8e
change the alert-message for py/modification-of-default-value
2022-09-05 13:30:56 +02:00
erik-krogh
a86a940df7
add getRepr() and toString() on RelevantState
2022-09-05 13:27:34 +02:00
Ian Lynagh
38ba516687
Merge pull request #10281 from igfoo/igfoo/extractFunctionReference
...
Kotlin: Remove cast in extractFunctionReference
2022-09-05 11:49:09 +01:00
Ian Lynagh
824ac9eb73
Merge pull request #10283 from igfoo/igfoo/IrTypeParameter
...
Kotlin: Remove a redundant cast
2022-09-05 11:49:00 +01:00
Ian Lynagh
e1a153a7f3
Merge pull request #10282 from igfoo/igfoo/extendsAdditionAllowed
...
Kotlin: Remove a cast in extendsAdditionAllowed
2022-09-05 11:48:50 +01:00
Ian Lynagh
43a553dffb
Merge pull request #10279 from igfoo/igfoo/extractGeneratedClass
...
Kotlin: Remove cast in extractGeneratedClass
2022-09-05 11:48:38 +01:00
Tamás Vajk
674305195a
Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-09-05 12:19:54 +02:00
Tamas Vajk
d50e3c77e5
Workflow: Add paths filter to QL for QL workflow
2022-09-05 11:55:03 +02:00
Edoardo Pirovano
c239871f3a
Merge pull request #10292 from github/edoardo/add-search-path
...
QL4QL: Add `--search-path` to `codeql resolve languages` calls
2022-09-05 10:40:00 +01:00
James Fletcher
45182c2f46
Merge branch 'main' into download-db-vs-code
2022-09-05 10:24:55 +01:00
Edoardo Pirovano
14dafefb79
QL4QL: Add --search-path to codeql resolve languages calls
2022-09-05 10:23:23 +01:00
erik-krogh
3f1cb04f3e
sync files
2022-09-05 11:22:34 +02:00
Erik Krogh Kristensen
0162bc3c77
use RelevantState inside the lastStartState predicate
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-09-05 11:22:12 +02:00
Tom Hvitved
9ebabd1e1f
SSA: Strip shared from namespace and qlpack name
2022-09-05 11:17:30 +02:00
Felicity Chapman
2cacba5f66
Apply suggestions to fix typos and formatting glitches
2022-09-05 09:59:20 +01:00
Rasmus Lerchedahl Petersen
afb50212a0
Python: update version check
...
doc said 3.5 experience says 3.7
2022-09-05 10:50:53 +02:00
Tom Hvitved
d8b352c2e6
C#: Use -p: instead of /p: with dotnet
...
Makes a difference for `dotnet run` where the option will otherwise be considered
an argument to the program that is run.
2022-09-05 10:40:00 +02:00
Tamas Vajk
6f7f760682
Kotlin: Fix array set operator extraction
2022-09-05 10:20:07 +02:00
Tamas Vajk
608f99bd0d
Kotlin: Add test case for various array set operator overloads
2022-09-05 10:19:57 +02:00
Felicity Chapman
634e883221
Update docs/codeql/codeql-cli/about-codeql-workspaces.rst
2022-09-05 09:14:33 +01:00
Tamas Vajk
bb5f0d4afb
Improve code quality
2022-09-05 09:17:18 +02:00
Tamas Vajk
81cf4c39f4
Only get existing local function labels
2022-09-05 09:16:23 +02:00
Tamas Vajk
37500d274a
Accept failing consistency test
2022-09-05 08:58:38 +02:00
Tom Hvitved
623ba7926f
C#: Fix /p:UseSharedCompilation=false tracer injection for dotnet run
2022-09-04 09:54:21 +02:00
Rasmus Lerchedahl Petersen
a8a042db57
python: remove illegal option
2022-09-03 20:33:48 +02:00
Asger F
f22de8a3b7
Python: Sync with Python
2022-09-03 13:51:02 +02:00
Asger F
56bbba2241
JS: Sync with JS
2022-09-03 13:51:02 +02:00
Asger F
62383fb3c9
Ruby: add TypeModel hook for adding type-defs from CodeQL
2022-09-03 13:51:02 +02:00
Asger F
296aa52ef0
Python: Add API::EntryPoint
...
Python: add EntryPoint test
2022-09-03 13:24:46 +02:00
Asger F
55fdf84d15
Ruby+JS: change LabelEntryPoint.toString()
...
fixup Ruby entry point tests
2022-09-03 13:24:45 +02:00
Asger F
c9ba6f171b
Ruby: rename EntryPoint.getAUse,getARhs -> getASource,getASink
2022-09-03 13:13:32 +02:00
Andrew Eisenberg
9a7d74f2ba
Reorder table of contents
2022-09-02 14:30:47 -07:00
Andrew Eisenberg
94a6506cbb
Clarify section on source resolution
2022-09-02 14:05:31 -07:00
Andrew Eisenberg
93ade495c2
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-02 13:19:45 -07:00
Andrew Eisenberg
353b50b0d3
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-09-02 13:07:44 -07:00
Andrew Eisenberg
98436ce36a
Fix syntax error in rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-09-02 12:43:49 -07:00
erik-krogh
c38062ce93
convert RelevantState to a class in the PrefixConstruction module
2022-09-02 20:26:31 +02:00
Geoffrey White
a14efcfb69
Merge branch 'main' into stringlengthcleanup
2022-09-02 19:26:28 +01:00
Geoffrey White
e96e965bf9
Swift: Rename 'member' -> 'memberRef' for readability.
2022-09-02 19:21:58 +01:00
Geoffrey White
361ddb844e
Swift: Simplify isSource (behaviour preserving).
2022-09-02 19:21:52 +01:00
Geoffrey White
5b528573ce
Swift: Update similar cases.
2022-09-02 19:21:51 +01:00
Geoffrey White
c3a8da4570
Swift: Use getABaseTypeDecl() to improve StringLengthConflation.ql.
2022-09-02 19:21:50 +01:00
Mathias Vorreiter Pedersen
b471b51535
Swift: Add convenience member predicates to 'TypeDecl'.
2022-09-02 18:23:07 +01:00
Ian Lynagh
a4d1b33993
Kotlin: Remove a redundant cast
2022-09-02 17:17:39 +01:00
Raul Garcia
1bfe335d93
Merge branch 'main' into Token_validation
2022-09-02 09:00:55 -07:00
Ian Lynagh
0ee72a580a
Kotlin: Remove a cast in extendsAdditionAllowed
2022-09-02 16:58:05 +01:00
Ian Lynagh
a35c7ab5b3
Kotlin: Remove cast in extractFunctionReference
2022-09-02 15:40:45 +01:00
Tamas Vajk
7daf53fd99
Add regenerated models after rebase
2022-09-02 16:32:42 +02:00
Ian Lynagh
2ecd9c93d1
Kotlin: Remove cast in extractGeneratedClass
...
It turns out that this was really behaving as a nullness check.
2022-09-02 15:26:49 +01:00
Paolo Tranquilli
48761b8667
Merge pull request #10233 from github/redsun82/swift-conversions-in-print-ast
...
Swift: show conversions in `PrintAst`
2022-09-02 16:13:21 +02:00
Tamas Vajk
2138e491a5
Add change note
2022-09-02 16:12:22 +02:00
Tamas Vajk
8c5d220dc0
Add optional friendly name parameter to MaD generator
2022-09-02 16:12:22 +02:00
Tamas Vajk
5004a5fb60
Fix failing external model tests
2022-09-02 16:12:22 +02:00
Tamas Vajk
09e62058ae
Generate negative summaries
2022-09-02 16:12:22 +02:00
Tamas Vajk
9fad42b25d
Kotlin: Add manual model for Array.withIndex
2022-09-02 16:12:21 +02:00
Tamas Vajk
bb82bcabbe
Kotlin: move and rename KotlinStdLib.qll to kotlin/StdLib.qll
2022-09-02 16:12:21 +02:00
Tamas Vajk
8c7fdb969d
Kotlin: Regenerating StdLib models with already existing models
2022-09-02 16:12:21 +02:00
Tamas Vajk
a144fa06dc
Kotlin: Add generated MaD for stdlib
2022-09-02 16:12:21 +02:00
Tamas Vajk
57d861337b
Kotlin: Add dataflow tests for stdlib calls
2022-09-02 16:12:21 +02:00
Tamas Vajk
71cce9cf28
Kotlin: Extract error expression for enumValues<T> calls
2022-09-02 15:42:05 +02:00
Tamas Vajk
fd0d2ad767
Kotlin: Add test for enumValues call with type parameter
2022-09-02 15:40:03 +02:00
Paolo Tranquilli
2234070bfe
Swift: ...and accept the test
2022-09-02 15:36:46 +02:00
Paolo Tranquilli
3d0d3ecfca
Swift: fix stupid typo
2022-09-02 15:35:22 +02:00
Ian Lynagh
6d5d78e975
Merge pull request #10275 from igfoo/igfoo/TypeResults
...
Kotlin: Fix the type of TypeResultGeneric.cast
2022-09-02 14:34:22 +01:00
Paolo Tranquilli
c842ae40f6
Swift: make node properties consistent with other languages
2022-09-02 15:31:37 +02:00
Paolo Tranquilli
e3e9774956
Swift: print conversions similarly to C++
2022-09-02 15:31:37 +02:00
Michael Nebel
9c5a6dd031
C#: Add WithElement summary for Reverse and update expected test output.
2022-09-02 15:17:24 +02:00
Michael Nebel
e7e78dcab3
C#: Add with element example and update existing line numbers in testcase.
2022-09-02 15:17:24 +02:00
Michael Nebel
022cbfa009
C#: Support 'WithElement'.
2022-09-02 15:17:24 +02:00
Michael Nebel
5511bc8e28
Java/Ruby/Swift: Sync files.
2022-09-02 15:17:24 +02:00
Michael Nebel
ecce30ed5a
C#: Remove clearsContent predicate from the framework code.
2022-09-02 15:17:24 +02:00
Michael Nebel
19da00a51a
C#: Delete clears content test case.
2022-09-02 15:17:23 +02:00
Michael Nebel
2ae2008453
C#: Update flow summaries test expected output.
2022-09-02 15:17:23 +02:00
Michael Nebel
f43feac324
C#: Add models as data models for Clear.
2022-09-02 15:17:23 +02:00
Michael Nebel
80f89282b7
C#: Add summary for System.Text.StringBuilder.Clear.
2022-09-02 15:17:23 +02:00
Michael Nebel
e3bfc4bd82
C#: CSV Printing of WithoutElement content.
2022-09-02 15:17:23 +02:00
Michael Nebel
8234a508b3
C#: Parsing of WithoutElement.
2022-09-02 15:17:23 +02:00
erik-krogh
089ce5a8a4
change alert messages of path queries to use the same template
2022-09-02 14:45:40 +02:00
Ian Lynagh
c339a2d4a7
Merge pull request #10273 from igfoo/igfoo/extractRawMethodAccess
...
Kotlin: Remove cast from extractRawMethodAccess
2022-09-02 13:26:33 +01:00
Ian Lynagh
ed04bec34e
Merge pull request #10274 from igfoo/igfoo/extractCall
...
Kotlin: Remove a cast in array iterator call extraction
2022-09-02 13:26:10 +01:00
Tom Hvitved
99d9fe14c8
C#: Also inject dotnet (pack|test|run)
2022-09-02 14:17:23 +02:00
Ian Lynagh
3195404b63
Merge pull request #10272 from igfoo/igfoo/getDeclaringTypeArguments
...
Kotlin: Remove some casts from getDeclaringTypeArguments
2022-09-02 13:13:40 +01:00
Tom Hvitved
7c12139c9e
C#: Also inject /p:UseSharedCompilation=false into dotnet publish
2022-09-02 13:51:22 +02:00
Ian Lynagh
3646d1d294
Kotlin: Fix the type of TypeResultGeneric.cast
2022-09-02 12:39:46 +01:00
Ian Lynagh
a56876533f
Kotlin: Remove a cast in array iterator call extraction
2022-09-02 12:25:14 +01:00
Ian Lynagh
db1661fb13
Kotlin: Remove cast from extractRawMethodAccess
...
I'm not entirely happy with this, but it at least meets the goal of
removing the cast.
2022-09-02 12:14:09 +01:00
Tom Hvitved
ba62b9e822
Address review comments
2022-09-02 13:07:27 +02:00
Ian Lynagh
3eab35d78b
Kotlin: Small simplification
2022-09-02 12:04:21 +01:00
Ian Lynagh
07b3b15528
Merge pull request #10221 from tamasvajk/kotlin-internal
...
Kotlin: Change `Modifiable::isPublic` to not cover Kotlin `internal` members
2022-09-02 11:51:56 +01:00
Ian Lynagh
6a4b748958
Kotlin: Remove some casts from getDeclaringTypeArguments
2022-09-02 11:50:00 +01:00
james
c0b9be0ecb
new screenshot
2022-09-02 10:43:36 +01:00
james
0c971bcc8c
update info about downloading dbs in vs code
2022-09-02 10:36:02 +01:00
Ian Lynagh
4f7eb7be83
Merge pull request #10262 from igfoo/igfoo/useArrayType
...
Kotlin: Avoid unsafe casts in useArrayType
2022-09-02 10:25:34 +01:00
Ian Lynagh
b05d8a61ba
Merge pull request #10263 from igfoo/igfoo/useSimpleType3
...
Kotlin: Remove some casts in useSimpleType
2022-09-02 10:25:23 +01:00
Tamas Vajk
c77f573a8e
Kotlin: fix doc comment extraction for local functions
2022-09-02 10:47:08 +02:00
Tamas Vajk
46c52aeaae
Kotlin: Add test for doc comment on local functions
2022-09-02 10:45:08 +02:00
Tom Hvitved
2c584d8f35
Merge pull request #10235 from hvitved/csharp/remove-legacy-tracer
...
C#: Remove legacy tracer support
2022-09-02 09:25:10 +02:00
Tamas Vajk
bea0ce9ff9
Fix review findings
2022-09-02 09:20:20 +02:00
Erik Krogh Kristensen
6cee635cb5
Merge pull request #10180 from erik-krogh/fixTags
...
Add missing security tags
2022-09-02 08:04:57 +02:00
Harry Maclean
637e92d990
Ruby: Fix typos
2022-09-02 13:16:14 +12:00
Harry Maclean
6fff02817d
Ruby: Fix bug in disablesCertificateValidation
2022-09-02 13:15:02 +12:00
Harry Maclean
570a03a08f
Ruby: Test disablesCertificateValidation
2022-09-02 13:00:29 +12:00
Rasmus Lerchedahl Petersen
0599e8ac35
python: add version check
...
and attempt to set version for tests
2022-09-01 23:47:07 +02:00
Nora Dimitrijević
7584434b80
Merge pull request #10163 from d10c/missing-check-scanf-squashed
...
C++: New Query: missing return-value check for scanf-like functions
2022-09-01 23:43:21 +02:00
Robert Marsh
ca2694ae1d
C++: exclude end pointers in iterator-style loops
2022-09-01 17:42:19 -04:00
Rasmus Lerchedahl Petersen
1d2d28be76
python: replace points-to with API graph
2022-09-01 23:24:10 +02:00
Rasmus Lerchedahl Petersen
d102a84e02
python: replace points-to with API graph
2022-09-01 22:58:46 +02:00
Rasmus Lerchedahl Petersen
163bfc4f71
python: replace points-to with API graph
...
- values are identified via `API::builtin`
- `points-to` is approximated by `getAValueReachableFromSource`
2022-09-01 22:47:32 +02:00
Rasmus Lerchedahl Petersen
93fcaf24c1
python: RaisingTuple.ql to not use poins-to
...
Use local dataflow instead and simply check for tuple literals.
2022-09-01 21:45:57 +02:00
Tom Hvitved
6b728acd9e
Use specific codeql/shared-ssa pack for the SSA library
2022-09-01 21:23:33 +02:00
Raul Garcia
0b0777addf
Fixing the @id fields
2022-09-01 09:45:11 -07:00
Ian Lynagh
9d3bc47a4d
Kotlin: Remove some casts in useSimpleType
2022-09-01 17:36:31 +01:00
Ian Lynagh
ddb7bb11fd
Kotlin: Avoid unsafe casts in useArrayType
2022-09-01 17:15:15 +01:00
Mathias Vorreiter Pedersen
2223bc3d1f
Merge pull request #10261 from MathiasVP/fix-join-in-sign-analysis
...
C++: Fix join in sign analysis
2022-09-01 16:49:05 +01:00
Ian Lynagh
ae9ba80c40
Merge pull request #10242 from igfoo/igfoo/kotlinFunctionToJavaEquivalent
...
Kotlin: Refactor kotlinFunctionToJavaEquivalent
2022-09-01 16:23:08 +01:00
Tom Hvitved
3c3390728a
Merge pull request #10245 from hvitved/ruby/simplify-track-instance
...
Ruby: Exclude top-level `self` accesses from `trackModule`
2022-09-01 16:50:14 +02:00
Robert Marsh
35701373ee
C++: more semantic range analysis perf tweaks
2022-09-01 10:49:54 -04:00
Robert Marsh
b1de54e9aa
C++: rewrite ProductFlow recursion for performance
2022-09-01 10:49:12 -04:00
Ian Lynagh
710ba3cb14
Merge pull request #10257 from igfoo/igfoo/hasModifier
...
Java: Correct hasModifier documentation
2022-09-01 15:49:06 +01:00
Edoardo Pirovano
8f332714f4
Merge pull request #10260 from github/edoardo/3.7-mergeback
...
Merge `rc/3.7` into `main`
2022-09-01 15:44:17 +01:00
Mathias Vorreiter Pedersen
a65e585db1
C++: 'nomagic' on 'binaryExprOperands'.
2022-09-01 15:34:59 +01:00
Henry Mercer
e4d22a2a5a
Merge pull request #10258 from github/codeql-ci/js/ml-powered-pack-release-0.3.2
...
JS: Bump version numbers of ML-powered packs after 0.3.2 release
2022-09-01 13:49:16 +01:00
Tamas Vajk
e66d2dddb6
Fix review findings
2022-09-01 14:07:27 +02:00
Henry Mercer
c65ae88c6d
Merge branch 'main' into codeql-ci/js/ml-powered-pack-release-0.3.2
2022-09-01 12:41:45 +01:00
github-actions[bot]
8d0ca9c772
JS: Bump version of ML-powered library and query packs to 0.3.3
2022-09-01 11:39:32 +00:00
github-actions[bot]
d577392dee
JS: Bump patch version of ML-powered library and query packs
2022-09-01 11:28:25 +00:00
Tamás Vajk
6576f19873
Merge pull request #10255 from tamasvajk/kotlin-array-get-fix
...
Kotlin: Fix array indexer extraction
2022-09-01 13:28:18 +02:00
Mathias Vorreiter Pedersen
00c55092ee
Merge pull request #10256 from geoffw0/cleartextcleanup
2022-09-01 12:15:57 +01:00
Ian Lynagh
4f63317369
Kotlin: Remove a redundant ?
2022-09-01 11:55:43 +01:00
Ian Lynagh
7ed18f1b32
Java: Correct hasModifier documentation
2022-09-01 11:52:07 +01:00
Ian Lynagh
cc1a5d82b8
Merge pull request #10243 from igfoo/igfoo/extractExpression
...
Kotlin: Removed a couple of casts from extractExpression
2022-09-01 11:11:58 +01:00
Ian Lynagh
70cabf188e
Merge pull request #10246 from igfoo/igfoo/extractConstructorCall
...
Kotlin: Refactor extractConstructorCall
2022-09-01 11:11:48 +01:00
Ian Lynagh
c30f39df33
Merge pull request #10247 from igfoo/igfoo/useSimpleType2
...
Kotlin: Remove another cast
2022-09-01 11:11:37 +01:00
Nora Dimitrijević
f956999891
Merge branch 'main' into missing-check-scanf-squashed
2022-09-01 12:08:50 +02:00
Geoffrey White
aad77c2388
Swift: Use TypeDecl.getABaseTypeDecl().
2022-09-01 10:42:09 +01:00
Geoffrey White
8ff0a191be
Merge pull request #10254 from MathiasVP/swift-base-and-derived-on-decls
...
Swift: Add `getBaseTypeDecl` to `TypeDecl`
2022-09-01 10:35:29 +01:00
Tamas Vajk
a5415c9c8a
Kotlin: Fix array indexer extraction
2022-09-01 11:12:14 +02:00
Taus
623ad6bab0
Python: Add getADefiningWrite
2022-09-01 09:10:06 +00:00
Tamas Vajk
afeea64078
Kotlin: Add test case for overloaded array get
2022-09-01 11:09:44 +02:00
Tom Hvitved
4d485163a6
Ruby: Exclude top-level self accesses from trackModule
2022-09-01 11:05:53 +02:00
Mathias Vorreiter Pedersen
96752f0fc4
Merge pull request #10061 from geoffw0/cleartext
...
Swift: Queries for CWE-311 (originally CWE-200)
2022-09-01 09:39:58 +01:00
Mathias Vorreiter Pedersen
e294b8f74a
Swift: Add convenience member predicates to 'TypeDecl'.
2022-09-01 09:28:37 +01:00
Geoffrey White
d3250a7e16
Swift: Fix finding base classes.
2022-09-01 09:01:56 +01:00
Tony Torralba
04c230b128
Docs fixes
2022-09-01 09:57:32 +02:00
Geoffrey White
92a927efa7
Swift: Remove special case (no longer required).
2022-09-01 08:53:51 +01:00
Tony Torralba
5d9f366ac5
Add change note
2022-09-01 09:53:46 +02:00
Tony Torralba
bee4e4b40a
Add new AlarmManager sinks
2022-09-01 09:47:58 +02:00
Tom Hvitved
c6807f5c05
Update two Actions workflows
2022-09-01 09:36:50 +02:00
Tom Hvitved
5f30d4ca21
SSA: Add missing QL doc
2022-09-01 09:36:50 +02:00
Tom Hvitved
8e5d6ba4f9
SSA: Create a new shared library pack and move implementation there
2022-09-01 09:36:49 +02:00
Tom Hvitved
d5200efef3
Merge pull request #10203 from hvitved/ssa/param-module
...
SSA: Make shared library a parameterized module
2022-09-01 09:27:05 +02:00
Anders Schack-Mulligen
efcd47f114
Merge pull request #10248 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-09-01 09:17:46 +02:00
github-actions[bot]
c8441abaac
Add changed framework coverage reports
2022-09-01 00:18:02 +00:00
Raul Garcia
476562ec62
Fixes based on the PR comments
2022-08-31 12:32:47 -07:00
Andrew Eisenberg
9d456e0436
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-08-31 11:29:23 -07:00
Andrew Eisenberg
6240b6e699
Update docs/codeql/codeql-cli/about-codeql-workspaces.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-08-31 11:05:26 -07:00
Ian Lynagh
e4ff25099b
Kotlin: Be more permissive
...
I think we'll end up giving a warning/error later, but that's better
than having a cast throw now.
2022-08-31 18:09:36 +01:00
Andrew Eisenberg
d98d1b7455
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-08-31 10:07:28 -07:00
Ian Lynagh
86034dc602
Kotlin: Add a type signature
2022-08-31 18:05:30 +01:00
Geoffrey White
129ed426a0
Swift: Use allowImplicitRead as a better solution replacing one of the special flow cases.
2022-08-31 17:58:18 +01:00
Geoffrey White
c0bc0d78cc
Swift: Accept test changes after merging main (again).
2022-08-31 17:58:10 +01:00
Ian Lynagh
7dc5bdafe3
Merge pull request #10186 from github/post-release-prep/codeql-cli-2.10.4
...
Post-release preparation for codeql-cli-2.10.4
2022-08-31 17:29:57 +01:00
Ian Lynagh
c8deb72ede
Kotlin: Refactor extractConstructorCall
...
Avoids some casts.
2022-08-31 16:53:59 +01:00
Paolo Tranquilli
74cd532adc
Merge pull request #10244 from geoffw0/swiftcleanup
...
Swift: Clean up the URL.init model.
2022-08-31 17:37:35 +02:00
Geoffrey White
60fad4d652
Merge remote-tracking branch 'upstream/main' into swiftcleanup
2022-08-31 16:04:39 +01:00
Nora Dimitrijević
f5a30c7bbe
C++: Add correctness tag
...
As that seems to be appropriate for this query.
2022-08-31 16:59:57 +02:00
Nora Dimitrijević
38f185bee4
C++: Correct CWE tags in metadata
2022-08-31 16:58:05 +02:00
Tom Hvitved
18b5ab0862
C#: Remove legacy tracer support
2022-08-31 16:57:59 +02:00
Tom Hvitved
c75c489707
C#: Inject /p:MvcBuildViews=true using tracer instead of auto-builder
2022-08-31 16:57:59 +02:00
Tom Hvitved
914b9680c0
C#: Also inject /p:UseSharedCompilation=false to (x|ms)build.exe (Windows)
2022-08-31 16:57:59 +02:00
Ian Lynagh
eca28af883
Kotlin: Removed a couple of casts from extractExpression
2022-08-31 15:34:18 +01:00
Geoffrey White
be88c4f171
Swift: Clean up the URL.init model.
2022-08-31 15:25:24 +01:00
Ian Lynagh
6d00860cc1
Kotlin: Refactor kotlinFunctionToJavaEquivalent
...
Avoids a cast.
2022-08-31 15:03:30 +01:00
Nora Dimitrijević
0729e42536
C++: Update metadata based on cwe-scores
...
Though the codeql/cwe-scores update-queries.py script did not make any changes on its own,
I looked up the score of the CWEs that @geoffw0 suggested using the explain.py script.
As discussed elsewhere, this should be more of a warning than a recommendation.
2022-08-31 15:50:37 +02:00
Tamás Vajk
bf7437fd2e
Merge pull request #10224 from tamasvajk/kotlin-comment-fixes
...
Kotlin: Fix issues in comment extraction
2022-08-31 14:22:09 +02:00
Paolo Tranquilli
122433096d
Swift: fix wrong class name
2022-08-31 14:19:21 +02:00
Anders Schack-Mulligen
784eef3f2c
Java: Support SCCs in TypeFlow.
2022-08-31 13:20:00 +02:00
Ian Lynagh
b5f9fbe247
Merge pull request #10228 from igfoo/igfoo/useSimpleType
...
Kotlin: Refactor useSimpleType to avoid some casts
2022-08-31 11:32:35 +01:00
Ian Lynagh
da7d2709d9
Merge pull request #10227 from igfoo/igfoo/extractStaticTypeAccessQualifier
...
Kotlin: Refactor extractStaticTypeAccessQualifier
2022-08-31 11:32:26 +01:00
Ian Lynagh
49ba391923
Merge pull request #10229 from igfoo/igfoo/singleOrNullSubType
...
Kotlin: Implement and use singleOrNullSubType
2022-08-31 11:32:11 +01:00
Tom Hvitved
7a2d43432e
C++: Adapt to parameterized SSA implementation
2022-08-31 11:56:24 +02:00
Tom Hvitved
643efb3d6b
Swift: Adapt to parameterized SSA implementation
2022-08-31 11:56:24 +02:00
Asger F
99bd6f1872
Merge pull request #10234 from asgerf/js/def-nodes-for-class-members
...
JS: Make API graph more sparse for escaping class instance members
2022-08-31 11:51:11 +02:00
Tom Hvitved
61b67640f4
Ruby: Adapt to parameterized SSA implementation
2022-08-31 11:45:15 +02:00
Tom Hvitved
760c7beb94
SSA: Sync files
2022-08-31 11:45:15 +02:00
Tom Hvitved
2681b88035
C#: Update Pre SSA library to use parameterized module
2022-08-31 11:45:15 +02:00
Tom Hvitved
8725bf0620
C#: Update Base SSA library to use parameterized module
2022-08-31 11:45:15 +02:00
Tom Hvitved
f553001217
C#: Update CIL SSA library to use parameterized module
2022-08-31 11:45:14 +02:00
Tom Hvitved
0d81a6409d
SSA: Make shared library a parameterized module
2022-08-31 11:45:14 +02:00
Mathias Vorreiter Pedersen
f846c262dc
Merge pull request #10157 from MathiasVP/swift-field-flow-2
...
Swift: Add field flow
2022-08-31 10:42:00 +01:00
Paolo Tranquilli
30049f622d
Swift: move new code down in tests
2022-08-31 11:38:32 +02:00
Paolo Tranquilli
aa54e4bb46
Swift: add some typing information to PrintAst
2022-08-31 11:31:15 +02:00
Paolo Tranquilli
a237f691b5
Swift: show conversions in PrintAst
...
This also showcases the customizability of the `PrintAst` infrastructure
resting on generated code.
2022-08-31 11:28:17 +02:00
Paolo Tranquilli
1f0ca6b02a
Merge pull request #10237 from github/redsun82/swift-generate-printast
...
Swift: add generic type parameters to AST children
2022-08-31 11:23:29 +02:00
Paolo Tranquilli
281cd79b48
Swift: add generics to ast tests
2022-08-31 11:09:35 +02:00
Michael Nebel
1cb6d78d35
Merge pull request #10170 from michaelnebel/java/models-io
...
Java: Update models for commons-io and add negative models.
2022-08-31 11:05:09 +02:00
Paolo Tranquilli
c0f477e5c1
Swift: reorder generic type param children in nominal types
2022-08-31 10:57:34 +02:00
Paolo Tranquilli
66e6c7bb13
Swift: make GenericTypeParamDecls children
2022-08-31 10:47:36 +02:00
Paolo Tranquilli
3ce76e6c08
Swift: preserve base order in code generation
2022-08-31 10:45:22 +02:00
Mathias Vorreiter Pedersen
9545598daf
Merge pull request #10226 from github/redsun82/swift-generate-printast
...
Swift: add `PrintAst`
2022-08-31 09:26:46 +01:00
Tony Torralba
2ec53bf78c
Merge pull request #9873 from luchua-bc/java/permissive-dot-regex
...
Java: CWE-625 Query to detect regex dot bypass
2022-08-31 10:24:18 +02:00
Tamas Vajk
0cbb73a47e
Improve code quality
2022-08-31 09:02:35 +02:00
Paolo Tranquilli
bb845c6d7f
Swift: rename printast.ql->printAst.ql
2022-08-31 08:55:40 +02:00
Paolo Tranquilli
742cf0a593
Swift: hide orphaned DeclRefExpr nodes
2022-08-31 08:35:00 +02:00
Tom Hvitved
e4853d0e71
Merge pull request #10086 from michaelnebel/csharp/cil
...
C#: CIL Extractor option.
2022-08-31 08:22:18 +02:00
Tom Hvitved
787234cf5c
Merge pull request #10232 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-31 08:18:50 +02:00
Paolo Tranquilli
8f09485414
Swift: enhance PrintAst testing
...
The `ParentChild` tests have been generalized to test all `PrintAst`
by factoring out `PrintAstNode` into a separate file.
The `child.ql` and `parent.ql` tests have been removed as they are
subsumed by `PrintAst.ql`. Also, a new `no_parent_child_loops` is
added to detect back edges to a root node (back edges to a non-root
node are already detected by `no_double_parents.ql`).
2022-08-31 06:54:30 +02:00
Paolo Tranquilli
cd632dcfee
Swift: minor tweaks
...
Replace string singleton with a newtype-based one, and fix some doc
comment cosmetics.
2022-08-31 06:39:35 +02:00
github-actions[bot]
6c3c41e710
Add changed framework coverage reports
2022-08-31 00:21:31 +00:00
luchua-bc
e2e87980cc
Move pattern check to MatchRegexConfiguration::isSink
2022-08-30 22:48:12 +00:00
Asger F
32c8688805
JS: Make API graph more sparse for escaping class instance members
2022-08-30 20:24:55 +02:00
Mathias Vorreiter Pedersen
a4209df239
Merge branch 'main' into swift-field-flow-2
2022-08-30 18:52:23 +01:00
Ian Lynagh
6f82b06bd7
Kotlin: Implement and use singleOrNullSubType
...
Pulls another cast out into a utility function.
2022-08-30 18:31:01 +01:00
Geoffrey White
3e4a6be53f
Swift: Add missing test annotations.
2022-08-30 18:12:26 +01:00
Geoffrey White
430a8e141d
Swift: Fix issues.
2022-08-30 18:04:12 +01:00
Ed Minnix
6485e73cd3
Added documentation for providesMainIntent pred
2022-08-30 13:00:44 -04:00
Ian Lynagh
a07be192fa
Kotlin: Refactor useSimpleType to avoid some casts
2022-08-30 17:55:57 +01:00
Ed Minnix
500a6f3b86
Add check for files which provide the app launcher
...
Adds support for filtering which applications include the
`android.intent.action.MAIN` intent.
2022-08-30 12:54:26 -04:00
Ed Minnix
b5c54f5a3b
Add check for android:allowBackup explicitly set
...
`android:allowBackup` has a default value of `true`. So we want to flag
any file which explicitly sets it.
2022-08-30 12:53:12 -04:00
Asger F
5ad6c05a9c
Merge pull request #10205 from asgerf/mad-generics
...
Support type variables in MaD typings
2022-08-30 18:07:39 +02:00
Ian Lynagh
3459e5e432
Kotlin: Refactor extractStaticTypeAccessQualifier
...
Avoids a cast
2022-08-30 17:06:13 +01:00
Paolo Tranquilli
47b905bfaf
Swift: add PrintAst
2022-08-30 18:04:55 +02:00
Paolo Tranquilli
6914c4469c
Swift: accept tests after children changes
2022-08-30 17:36:39 +02:00
Paolo Tranquilli
4825e6b8ba
Swift: change some children
...
* made `members` children of an `IterableDeclContext`
* removed `elements` from the children of `EnumCaseDecl`, as they are
already children of the enclosing `EnumDecl`
* removed `base` from the children of `SelfApplyExpr`, as they currently
are already descendants via `getArgument(0).getExpr()`. We should
maybe consider either removing `base` from the schema and add it as
a shortcut on QL, or finish up replacing all `SelfApplyExpr` instances
with synthesized types.
2022-08-30 17:30:39 +02:00
Aditya Sharad
65095e0c5f
Merge pull request #10013 from adityasharad/docs/codeql-tools-changelog-links
...
Docs: Add CodeQL standard packs and bundle to CodeQL tools page
2022-08-30 07:54:42 -07:00
Asger F
0d88d20b56
JS: Actually update test output this time
2022-08-30 16:44:01 +02:00
Tamas Vajk
1bc105aff6
Kotlin: adjust log messages and severities in comment extraction
2022-08-30 15:45:25 +02:00
Tamas Vajk
5418c95a01
Kotlin: minor refactoring in comment extraction
2022-08-30 15:43:48 +02:00
Erik Krogh Kristensen
72942afe3e
Merge pull request #10220 from erik-krogh/overlapsWithNothing
...
print a correct range for ranges that doesn't contain any alpha-numeric chars
2022-08-30 15:38:34 +02:00
Tamas Vajk
9ced14672d
Kotlin: Assign container class as the owner of init block comments
2022-08-30 15:37:55 +02:00
Tamas Vajk
d9b3726ee8
Kotlin: Add test case for doc comment on init block
2022-08-30 15:37:00 +02:00
Anders Schack-Mulligen
4070860d2b
Merge pull request #10208 from aschackmull/java/dispatch-fixes
...
Java: A couple of small virtual dispatch fixes
2022-08-30 15:03:48 +02:00
Tamas Vajk
3513bb8eed
Kotlin: Change Modifiable::isPublic to not cover Kotlin internal members
2022-08-30 14:37:27 +02:00
Michael Nebel
a726aec362
C#: Update change note based on review comment.
2022-08-30 14:34:55 +02:00
Michael Nebel
944a9e6130
C#: Provide change-note.
2022-08-30 14:34:54 +02:00
Michael Nebel
b85db2cc35
C#: Remove '--cil' flag from the dbscheme comments and add dummy upgrade and downgrade scripts.
2022-08-30 14:34:54 +02:00
Michael Nebel
27d1008171
C#: Update tracer arguments.
2022-08-30 14:34:54 +02:00
Michael Nebel
da214c89d6
C#: Update unit tests.
2022-08-30 14:34:54 +02:00
Michael Nebel
ea40e7b29d
C#: Use the extractor option to decide, whether CIL should be enabled.
2022-08-30 14:34:54 +02:00
Michael Nebel
cc898e9b82
C#: Add extractor option parameter for enabling CIL.
2022-08-30 14:34:54 +02:00
Tamas Vajk
d9086e6328
Kotlin: Add test case for internal member accessed from java
2022-08-30 14:26:12 +02:00
Michael Nebel
e020ae77e0
Merge pull request #10158 from michaelnebel/csharp/narrowcollectiontypes
...
C#: Narrow collection like types in model generation.
2022-08-30 14:20:57 +02:00
Asger F
dd44187aed
Sync files again
2022-08-30 14:08:33 +02:00
Asger F
b107dd6855
Fix typo: receiver step -> type step
2022-08-30 14:08:33 +02:00
Asger F
f8b1aa7e7e
Also apply type step in getNodeFromSubPath
2022-08-30 14:08:33 +02:00
Asger F
51d6f752ab
JS: Add partially failing test
2022-08-30 14:08:31 +02:00
Asger F
d5d1365104
Synchronize ApiGraphModels.qll
2022-08-30 14:07:37 +02:00
Asger F
654c4eea0f
Add support for type steps
2022-08-30 14:07:37 +02:00
Asger F
ef627b4872
Add support for TypeVar[x] and typeVariable rows
2022-08-30 14:07:35 +02:00
Asger F
b414192dcc
Bugfix pruning in package-pruning API graph models
2022-08-30 14:05:41 +02:00
Asger F
623531a719
Merge pull request #10206 from asgerf/js/js-mad-changes
...
JS: Some JS-specific MaD changes
2022-08-30 14:03:14 +02:00
erik-krogh
7fd426e748
print a correct range for ranges that doesn't contain any alpha-numeric chars
2022-08-30 13:57:11 +02:00
Asger F
f589520917
JS: Add tests
2022-08-30 13:38:08 +02:00
Geoffrey White
4984d8f6f2
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-08-30 12:26:06 +01:00
Geoffrey White
645364e8b8
Update swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.qhelp
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-08-30 12:24:49 +01:00
Ian Lynagh
f5d43b80ed
Merge pull request #10193 from igfoo/igfoo/extractClassSupertypes
...
Kotlin: Small simplification
2022-08-30 11:52:02 +01:00
Ian Lynagh
f118b39844
Merge pull request #10192 from igfoo/igfoo/array
...
Kotlin: Remove another cast
2022-08-30 11:51:48 +01:00
Ian Lynagh
a5893f38c5
Merge pull request #10189 from igfoo/igfoo/substituteTypeAndArguments
...
Kotlin: Remove a cast from substituteTypeAndArguments
2022-08-30 11:51:39 +01:00
Ian Lynagh
d6bdc8c711
Merge pull request #10178 from igfoo/igfoo/AnyDbType
...
Kotlin: Add AnyDbType
2022-08-30 11:51:25 +01:00
Tony Torralba
1f83c5833b
Merge pull request #10092 from zbazztian/zbazztian/string.replace-taint
...
Java: Add additional taint steps for java.lang.String methods
2022-08-30 12:24:37 +02:00
Paolo Tranquilli
55e5fa29cb
Merge pull request #10219 from github/redsun82/swift-add-params-to-init-name
...
Swift: fix integration tests
2022-08-30 12:06:09 +02:00
Paolo Tranquilli
57b8830972
Swift: fix integration tests
2022-08-30 11:46:27 +02:00
Paolo Tranquilli
fc919841ed
Merge pull request #10218 from github/redsun82/swift-add-params-to-init-name
...
Swift: make `ConstructorDecl`'s name include params
2022-08-30 11:34:56 +02:00
Nora Dimitrijević
ce1e4ad422
Merge branch 'main' into missing-check-scanf-squashed
2022-08-30 11:34:00 +02:00
Paolo Tranquilli
00755ecede
Merge pull request #10217 from github/redsun82/swift-add-qlgen-docstring
...
Swift: add missing `qlgen.py` docstring
2022-08-30 11:19:09 +02:00
Nora Dimitrijević
e10042be7d
C++: Improve docs based on doc-review
...
Thanks to @mchammer01 and @geoffw0 for the suggestions latest.
2022-08-30 11:14:57 +02:00
Paolo Tranquilli
38d65d3fae
Swift: make ConstructorDecl's name include params
...
In order to distinguish overloads of the constructor and for consistency
with other function calls, `ConstructorDecl` string representation uses
the name which includes parentheses and parameter labels.
For consistency also the destructor got the same change, which means
all `DestructorDecl`s will now show as `deinit()` rather than `deinit`.
2022-08-30 11:11:50 +02:00
Paolo Tranquilli
75a7bcd3b1
Swift: add missing qlgen.py docstring
2022-08-30 11:03:23 +02:00
Mathias Vorreiter Pedersen
f5471e4e1a
Merge pull request #10211 from github/redsun82/swift-generate-printast-first-step
...
Swift: generate indexed parent/child relationship
2022-08-30 09:55:05 +01:00
Erik Krogh Kristensen
2aec53b7fb
Merge pull request #10215 from erik-krogh/wayToLargeRangeAgainstRC
...
put a limit on the length of the equivalent range
2022-08-30 10:37:07 +02:00
Paolo Tranquilli
9102cb5d0d
Swift: make some ParentChild predicates private
2022-08-30 10:35:08 +02:00
Erik Krogh Kristensen
8f0b999c31
Merge pull request #10207 from erik-krogh/fixRank
...
fix performance issue in the ReDoS query
2022-08-30 10:17:11 +02:00
Paolo Tranquilli
beb0472811
Swift: fix ParentChild generation
...
There was an issue in case multiple inheritance from classes with
children was involved, where indexes would overlap.
The generated code structure has been reshuffled a bit, with
`Impl::getImmediateChildOf<Class>` predicates giving 0-based children
for a given class, including those coming from bases, and the final
`Impl::getImmediateChild` disjuncting the above on final classes only.
This removes the need of `getMaximumChildrenIndex<Class>`, and also
removes the code scanning alerts.
Also, comments were fixed addressing the review.
2022-08-30 10:15:11 +02:00
Erik Krogh Kristensen
25ee5545e6
Merge pull request #9751 from erik-krogh/dynCall
...
JS: add call-edge for dynamic dispatch to unknown property from an object literal
2022-08-30 10:07:08 +02:00
erik-krogh
e2caf3e8c0
put a limit on the length of the equivalent range
2022-08-30 09:29:22 +02:00
Erik Krogh Kristensen
c2679d8632
Merge pull request #10213 from erik-krogh/wayToLargeRange
...
put a limit on the length of the equivalent range in overly-large-range
2022-08-30 09:28:16 +02:00
erik-krogh
9963def300
update expected output of test that was failing on main. semantic merge conflict between #10202 and #10184
2022-08-30 09:15:36 +02:00
Anders Schack-Mulligen
4a2209752e
Merge pull request #10214 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-30 09:13:30 +02:00
github-actions[bot]
f2e37d25b3
Add changed framework coverage reports
2022-08-30 00:21:28 +00:00
Andrew Eisenberg
e14b803125
Add paragraph about lock files in library packs with tests
2022-08-29 14:08:12 -07:00
Andrew Eisenberg
f737e07e2b
Apply suggestions from code review
...
Co-authored-by: Dave Bartolomeo <dbartol@github.com >
2022-08-29 14:00:46 -07:00
Andrew Eisenberg
6ff006ce67
Add sentence about not needing to upgrade on CLI >= v2.3.4
2022-08-29 13:56:07 -07:00
Aditya Sharad
f175c60069
Apply suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-08-29 12:26:35 -07:00
erik-krogh
f47b097d7c
put a limit on the length of the equivalent range
2022-08-29 21:03:52 +02:00
Paolo Tranquilli
3f4a330658
Swift: make ParentChild::Impl module private
2022-08-29 17:35:16 +02:00
Paolo Tranquilli
f14f9375e0
Merge pull request #10210 from github/redsun82/swift-fix-double-parent
...
Swift: fix double parent
2022-08-29 17:27:57 +02:00
Paolo Tranquilli
20e94b8a38
Swift: add more tests for the generated parent-child relationship
2022-08-29 17:10:46 +02:00
Paolo Tranquilli
105c0d0dce
Swift: update after generated parent-child changes
2022-08-29 17:10:46 +02:00
Paolo Tranquilli
b5aad04f65
Swift: add indexes to generated parent-child library
2022-08-29 17:10:46 +02:00
Paolo Tranquilli
7b50c958f7
Swift: fix Cfg.expected
2022-08-29 17:09:42 +02:00
erik-krogh
52b9ff81c5
Merge branch 'main' into dynCall
2022-08-29 15:30:01 +02:00
Erik Krogh Kristensen
27bc69883c
Merge pull request #10184 from erik-krogh/ts48
...
JavaScript: Update to TypeScript 4.8
2022-08-29 15:03:32 +02:00
Anders Schack-Mulligen
e26a7fc4f3
Merge pull request #10173 from zbazztian/spring-crudrepository
...
Java: Add data flow model for Spring's CrudRepository.save() method
2022-08-29 15:00:07 +02:00
Paolo Tranquilli
4e453b1ac5
Swift: accept test changes
2022-08-29 14:57:03 +02:00
Paolo Tranquilli
0aecbc2a01
Swift: reorganize some children in schema.yml
2022-08-29 14:52:14 +02:00
Michael Nebel
e8d726606b
C#/Java: Add descriptive comment on negative summaries in ExternalFlow.
2022-08-29 14:29:32 +02:00
Michael Nebel
91abf79404
Java: Update negative summaries where static initializers has been excluded.
2022-08-29 14:29:32 +02:00
Michael Nebel
2b1423dd74
Java: Exclude static initializers from model generation.
2022-08-29 14:29:32 +02:00
Michael Nebel
37aa6b2c5f
C#: Add file level QL Doc.
2022-08-29 14:29:32 +02:00
Michael Nebel
dbfd16647b
Java: Add negative model CSV validation test.
2022-08-29 14:29:32 +02:00
Michael Nebel
290c35e7c6
Java: Use negative summary models in unsupported external api telemetry query.
2022-08-29 14:28:55 +02:00
Michael Nebel
23e0ee66e0
Java: Add negative models for commons-io.
2022-08-29 14:28:55 +02:00
Michael Nebel
beb85c20f2
Java: Update commons-io generated positive models based on main.
2022-08-29 14:28:55 +02:00
erik-krogh
196dfd9385
update expected output of the misspelling test
2022-08-29 14:26:59 +02:00
Asger F
d6ee54eb09
Merge pull request #10202 from asgerf/js/typescript-conditional-types
...
JS: Enable type extraction inside conditional types again
2022-08-29 14:26:06 +02:00
erik-krogh
8d162fac52
add query detecting consistent casing of names
2022-08-29 14:16:41 +02:00
Anders Schack-Mulligen
bd6acc0d75
Java: Refactor upcastCand, and track type flow for upcasts to unbound generics.
2022-08-29 13:57:39 +02:00
Anders Schack-Mulligen
fc415b32c2
Java: Bugfix in TypeFlow.
2022-08-29 13:50:13 +02:00
Anders Schack-Mulligen
e89b42fc11
Java: Allow dispatch to methods on abstract classes without subtypes.
2022-08-29 13:48:55 +02:00
erik-krogh
77949cbeb3
add context to the rankState predicate in ExponentialBackTracking.qll
2022-08-29 13:42:05 +02:00
Anders Schack-Mulligen
6e7dcfcc6e
Merge pull request #10097 from aschackmull/java/unification
...
Java: Improve virtual dispatch via better unification check and deduplicate code with parameterised module
2022-08-29 13:28:04 +02:00
erik-krogh
b1e53280a6
fix that the wrong line got deleted
2022-08-29 13:26:02 +02:00
Erik Krogh Kristensen
bd5fd7d963
fix typo in change-note
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-08-29 13:25:54 +02:00
erik-krogh
56292cad26
don't modify the TypeScript nodes, instead forward illegalDecorators to the java extractor
2022-08-29 13:22:04 +02:00
erik-krogh
d0814aa37c
Go: add change-note for go
2022-08-29 13:10:23 +02:00
erik-krogh
33ba01927f
Go: add CWE tag and @security-severity tag to go/insecure-hostkeycallback
2022-08-29 13:10:23 +02:00
erik-krogh
f09fc7b0fc
Java: add java change-note
2022-08-29 13:10:21 +02:00
erik-krogh
8b37168223
Java: remove security tag from queries not in the security folder and with missing security-severity tags
2022-08-29 13:08:56 +02:00
erik-krogh
f678c8a967
PY: add python change-note
2022-08-29 13:08:52 +02:00
erik-krogh
4353937bcf
PY: add missing security tags on Python queries
2022-08-29 13:08:47 +02:00
Asger F
ea0ae98e58
JS: Use explicit this
2022-08-29 12:39:53 +02:00
erik-krogh
6aca9b9f49
fix support for illegal decorators in the TypeScript extractor
2022-08-29 12:14:58 +02:00
erik-krogh
50734c7c6a
bump the TypeScript version in the list of supported languages
2022-08-29 12:14:58 +02:00
erik-krogh
e0ff27331f
bump extractor version
2022-08-29 12:14:58 +02:00
erik-krogh
97ffd2d4d9
add change-note
2022-08-29 12:14:58 +02:00
erik-krogh
b7367ca649
update to TypeScript 4.8RC
2022-08-29 12:14:55 +02:00
Asger F
45d64c48e3
JS: Update test output
2022-08-29 12:01:47 +02:00
Philip Ginsbach
0634b9b9f7
rename example module and parameters
2022-08-29 10:55:07 +01:00
Anders Schack-Mulligen
adfd474fee
Java: Move file.
2022-08-29 11:50:54 +02:00
Philip Ginsbach
b74886a920
better explain the relevance of applicative instantiation
2022-08-29 10:49:09 +01:00
Philip Ginsbach
61b8cee84b
reference module expression documentation
2022-08-29 09:39:33 +01:00
Philip Ginsbach
c21ca8f312
better description of example code
2022-08-29 09:19:46 +01:00
Philip Ginsbach
5c69b42efa
better explanation of nominal typing
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:15:39 +01:00
Asger F
99f03a0d61
JS: Make API graphs take types from models into account
2022-08-29 10:14:56 +02:00
Asger F
d166727db9
JS: Add WithStringArgument[arg=const] filter
2022-08-29 10:14:56 +02:00
Asger F
4f3c8ec770
JS: Add AnyMember MaD token
2022-08-29 10:14:53 +02:00
Asger F
9887025af2
JS: Some minor fixes in Classes.qll
2022-08-29 10:14:53 +02:00
Philip Ginsbach
89de63ad1d
better explanation of what type signatures are used for
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:13:59 +01:00
Philip Ginsbach
7ea0f8d96b
better explanation of structural typing
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:12:31 +01:00
Philip Ginsbach
c5110e5d68
better description for predicate signatures
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:11:19 +01:00
Philip Ginsbach
cca5dfbbde
better description for type signatures
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:10:23 +01:00
Philip Ginsbach
16973c9a80
better formulation for module parameters
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:07:59 +01:00
Philip Ginsbach
7806308d5f
better formulation for module signatures
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:07:19 +01:00
Philip Ginsbach
5957494583
better explanation of structural typing
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:06:45 +01:00
Philip Ginsbach
c9ecb32318
better description of parameterized module instantiation
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-08-29 09:05:26 +01:00
Philip Ginsbach
56f51ee1ff
use parameterized rather than parameterised
2022-08-29 09:02:37 +01:00
Erik Krogh Kristensen
68bf9f39b9
Merge pull request #10181 from erik-krogh/fixCons
...
QL: remove consistency errors related to resolving multiple predicates from parameterized modules
2022-08-29 09:40:07 +02:00
erik-krogh
dda16a0a30
add a isSignature() predicate to ClasslessPredicate
2022-08-29 09:17:40 +02:00
Harry Maclean
5d356df300
QLDoc fixes
2022-08-29 14:24:37 +12:00
Harry Maclean
9651fa1573
Ruby: Add ActiveResource change note
2022-08-29 14:24:37 +12:00
Harry Maclean
ec58107439
QlDoc fix
2022-08-29 14:24:37 +12:00
Harry Maclean
dcc0123023
Fix QL4QL alert
2022-08-29 14:24:37 +12:00
Harry Maclean
06c95ba457
Ruby: QLDoc
2022-08-29 14:24:37 +12:00
Harry Maclean
75e1497fbf
Ruby: Import ActiveResource by default
2022-08-29 14:24:37 +12:00
Harry Maclean
aa6edb0edb
Ruby: Model ActiveResource
2022-08-29 14:24:37 +12:00
Harry Maclean
09ad1c29bd
Ruby: Add SelfVariableAccessCfgNode
2022-08-29 14:24:37 +12:00
Andrew Eisenberg
68c2c16928
Address changes from PR
2022-08-26 14:35:59 -07:00
Ian Lynagh
4cd7bf2ebb
Kotlin: Small simplification
...
Also removes a cast
2022-08-26 16:28:10 +01:00
Ian Lynagh
d2a5281d94
Kotlin: Remove another cast
2022-08-26 15:59:26 +01:00
Nick Rolfe
898689f550
Merge pull request #9896 from github/nickrolfe/hardcoded_code
...
Ruby: port js/hardcoded-data-interpreted-as-code
2022-08-26 13:49:25 +01:00
Paolo Tranquilli
7887f669c1
Merge pull request #10175 from github/redsun82/swift-missing-extractions
...
Swift: fix missing extractions
2022-08-26 14:09:09 +02:00
Ian Lynagh
131632e7c1
Kotlin: Remove a cast from substituteTypeAndArguments
...
It looks like it was safe, but it was hard to see why, and may
become unsafe following future kotlinc changes.
2022-08-26 13:06:05 +01:00
Paolo Tranquilli
b5d18b05e2
Swift: accept new module type in tests
2022-08-26 13:52:24 +02:00
AlexDenisov
bb167a3d77
Merge pull request #10187 from github/redsun82/swift-port-frontend-invocations-test-to-linux
...
Swift: port frontend-invocations test to linux
2022-08-26 12:53:19 +02:00
Paolo Tranquilli
c9b14b4459
Swift: address review comments
2022-08-26 12:49:19 +02:00
Paolo Tranquilli
ced36ffc61
Swift: run swift instead of swift-frontend on Linux
2022-08-26 12:12:21 +02:00
Paolo Tranquilli
c7c42acbf5
Swift: port frontend-invocations test to linux
...
`swift-frontend` will be in `$PATH` on Linux, and apparently it does
not require the `-sdk` option.
2022-08-26 12:03:18 +02:00
Anders Schack-Mulligen
3e5155d1a1
Java: Address review comments.
2022-08-26 11:45:01 +02:00
Paolo Tranquilli
ebc7432f46
Swift: implement imported_ and exported_modules
...
This has expanded the required builtin symbols.
2022-08-26 11:37:14 +02:00
github-actions[bot]
3b4ad3c4f1
Post-release preparation for codeql-cli-2.10.4
2022-08-26 09:32:11 +00:00
Paolo Tranquilli
2e9d9cfb20
Swift: add imported modules properties to ModuleDecl
2022-08-26 11:23:02 +02:00
Paolo Tranquilli
a5a58d3dc5
Swift: start with loaded modules for extraction
2022-08-26 11:23:02 +02:00
Nick Rolfe
52d46552af
Ruby: fix 'inefficient string comparison' alert
2022-08-26 09:58:22 +01:00
Erik Krogh Kristensen
c02387a25a
Merge pull request #10153 from erik-krogh/more-acronyms
...
more renamings of acronyms to camelCase
2022-08-26 10:52:17 +02:00
Nick Rolfe
95bf18fdc9
Ruby: make hex-escaped strings ("\xCD\xEF" etc.) sources of hardcoded data
2022-08-26 09:33:03 +01:00
Paolo Tranquilli
0971ca6a82
Swift: emit <Builtin>.trap instead of .trap
2022-08-26 09:35:19 +02:00
Michael Nebel
f4835e3960
C#: Update flow summaries test cases based on the latest models.
2022-08-26 09:30:08 +02:00
Michael Nebel
e71ab59c9a
C#: Update the generated models.
2022-08-26 09:30:07 +02:00
Michael Nebel
be4c2231d1
C#: Avoid generating new source models on 'file' kind sources.
2022-08-26 09:30:07 +02:00
Michael Nebel
a83ab79d31
C#: Update models based on relevant collection changes.
2022-08-26 09:30:07 +02:00
Michael Nebel
41274d9e5a
C#: Update expected test output.
2022-08-26 09:30:07 +02:00
Michael Nebel
4bf41d0b81
C#: Update model generator to exclude models for some collection like types.
2022-08-26 09:30:07 +02:00
Michael Nebel
31dddef94e
C#: Update all models prior to model generator change.
2022-08-26 09:30:07 +02:00
Michael Nebel
83b3125dea
C#: Some test examples of collection like types that should be excluded.
2022-08-26 09:30:07 +02:00
Paolo Tranquilli
2c153f68e1
Swift: replace processed with seen in module visiting
2022-08-26 09:28:38 +02:00
Paolo Tranquilli
d5af30d28d
Swift: add comment to getBuiltinDecls
2022-08-26 09:28:02 +02:00
Asger F
1a0abfa7a5
JS: Enable type extraction inside conditional types again
2022-08-26 09:27:53 +02:00
Tamás Vajk
4f5c06fed7
Merge pull request #10169 from tamasvajk/kotlin-array-iterator
...
Kotlin: fix array iterator extraction
2022-08-26 08:33:52 +02:00
Raul Garcia
b51c6d6651
Fixes based on PR feedback
2022-08-25 16:40:50 -07:00
Geoffrey White
2d57786dae
Merge branch 'main' into cleartext
2022-08-25 23:10:36 +01:00
Geoffrey White
7fd64f1d9c
Swift: Make QL-for-QL happy.
2022-08-25 23:06:03 +01:00
Geoffrey White
926da4bedc
Swift: Query descriptions and metadata.
2022-08-25 22:52:19 +01:00
Geoffrey White
9a53a40ac6
Swift: Qhelp and examples for both queries.
2022-08-25 22:52:18 +01:00
Geoffrey White
2690732c75
Swift: Special cases to get taint flow working.
2022-08-25 22:15:19 +01:00
Geoffrey White
698a9e2e2e
Swift: Realm database support.
2022-08-25 22:15:18 +01:00
Geoffrey White
3126fb930d
Swift: Core Data support.
2022-08-25 22:15:18 +01:00
Geoffrey White
456ab980a5
Swift: Fix duplicate results.
2022-08-25 22:15:17 +01:00
Geoffrey White
0cd2efc1b1
Swift: CleartextTransmission query.
2022-08-25 22:15:16 +01:00
Geoffrey White
dacb7f5f25
Swift: Add a SensitiveExprs lib (and test it).
2022-08-25 22:15:15 +01:00
Geoffrey White
2aa6dd20ff
Swift: Make tests more accurate and don't use 'pwd' as a variable name (it has alternative meanings so is not a good test).
2022-08-25 22:15:14 +01:00
Geoffrey White
1c5283628b
Swift: Additional test cases.
2022-08-25 22:15:13 +01:00
Andrew Eisenberg
53d8bf27ff
Add docs for codeql workspaces
...
See https://github.com/github/codeql-core/issues/2687
2022-08-25 13:07:31 -07:00
Andrew Eisenberg
2ad0b2819a
Fix typos in docs
2022-08-25 12:54:38 -07:00
erik-krogh
c225605ed7
QL: remove consistency errors related to resolving multiple predicates from parameterized modules
2022-08-25 21:43:30 +02:00
erik-krogh
1d1aa7c8b4
update some expected output
2022-08-25 20:52:30 +02:00
erik-krogh
4b06bca770
fixup getAPrimaryQlClass
2022-08-25 20:52:30 +02:00
erik-krogh
ebb1106d9d
add missing qldoc
2022-08-25 20:52:30 +02:00
erik-krogh
cc7a9ef97a
rename more acronyms
2022-08-25 20:52:27 +02:00
Andrew Eisenberg
7f8fcef62c
Add a message about upgrading old databases
2022-08-25 11:51:42 -07:00
Andrew Eisenberg
b78faa4b71
Remove upgrade database docs
...
Database upgrades happens implicitly now as part of analysis. There
is no need to call this out in separate steps.
2022-08-25 11:39:28 -07:00
Andrew Eisenberg
5fe06abc24
Apply suggestions from code review
2022-08-25 11:35:36 -07:00
Arthur Baars
24526108d3
Ruby: update dbscheme stats
2022-08-25 17:48:28 +02:00
Arthur Baars
f77c2ac3d0
Update tests
2022-08-25 17:40:52 +02:00
Arthur Baars
ed005077fa
Ruby: upgrade/downgrade scripts
2022-08-25 17:40:52 +02:00
Ian Lynagh
5be8e45d09
Kotlin: Add AnyDbType
...
All DbType* types extend it, and `Label`s require their argument to be a
subtype of it.
2022-08-25 16:40:27 +01:00
Ian Lynagh
f318dd5e0e
Merge pull request #10174 from github/release-prep/2.10.4
...
Release preparation for version 2.10.4
2022-08-25 16:30:33 +01:00
Arthur Baars
59773eb743
Ruby: update tree-sitter grammar
2022-08-25 17:21:29 +02:00
Nora Dimitrijević
7d24d96d80
C++: Optimize MissingCheckScanf/bigStep()
2022-08-25 17:12:25 +02:00
Nora Dimitrijević
02772ed20c
Revert changes to .gitignore and .clang-format
...
because they are potentially too global, belong in a separate PR.
2022-08-25 16:37:39 +02:00
Philip Ginsbach
deecf76fd8
define -> declare
2022-08-25 15:06:38 +01:00
Nora Dimitrijević
2bd866cc82
C++: improve change note and move to right place
2022-08-25 16:00:25 +02:00
Rasmus Wriedt Larsen
0728ecebbb
Python: Highlight that import problem is not just a relative problem
2022-08-25 15:54:21 +02:00
Rasmus Wriedt Larsen
1ca19533e0
Python: Add import problem test from the wild
2022-08-25 15:50:55 +02:00
Ian Lynagh
ef98ce16f8
Update javascript/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:25:38 +01:00
Ian Lynagh
711e769382
Update go/ql/lib/change-notes/released/0.2.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:25:30 +01:00
Ian Lynagh
b951e94d85
Update go/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:25:20 +01:00
Ian Lynagh
f20825ae55
Update python/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:25:10 +01:00
Ian Lynagh
b21883292d
Update python/ql/lib/change-notes/released/0.5.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:58 +01:00
Ian Lynagh
a904438828
Update ruby/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:44 +01:00
Ian Lynagh
5cd4e0d3b1
Update ruby/ql/lib/change-notes/released/0.3.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:38 +01:00
Ian Lynagh
40b1825ef1
Update javascript/ql/lib/change-notes/released/0.2.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:20 +01:00
Ian Lynagh
9a3b540551
Update csharp/ql/src/change-notes/released/0.3.3.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:11 +01:00
Ian Lynagh
fb12d85d3c
Update csharp/ql/src/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:24:00 +01:00
Ian Lynagh
0479a59640
Update csharp/ql/lib/change-notes/released/0.3.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:23:44 +01:00
Ian Lynagh
5e06277b38
Update cpp/ql/lib/change-notes/released/0.3.4.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:23:38 +01:00
Ian Lynagh
d0ecb9f54b
Update csharp/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:23:32 +01:00
Ian Lynagh
badb2b7f13
Update cpp/ql/lib/CHANGELOG.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-08-25 14:23:25 +01:00
Nora Dimitrijević
ad56274a73
C++: Small improvements to query qldoc and message
2022-08-25 15:22:41 +02:00
Erik Krogh Kristensen
06afe9c0f4
Merge pull request #9816 from erik-krogh/msgConsis
...
Make alert messages consistent across languages
2022-08-25 15:20:01 +02:00
Paolo Tranquilli
df3dc9677f
Swift: fix missing extractions from Builtin
...
There were missing extractions from the Builtin (and other) modules.
This was actually caused by two issues:
* we did not visit all required modules, as for example the `Builtin`
module does not appear as being imported by anybody (together with
another mysterious `__Objc` module)
* moreover the `Builtin` module works internally by only creating
declarations on demand, and does not provide a list of its top level
declarations.
The first problem was solved by moving module collection to the actual
visiting. This may mean we extract less modules, as we only extract the
modules we actually use something from (recursively). This change can
be reverted if we feel we need it.
The second one was solved by explicitly listing the builtin symbols
encountered during a normal extraction. This does mean this list needs
to be kept up to date.
2022-08-25 15:18:24 +02:00
Nora Dimitrijević
a6a30b3725
C++: clarify ScanfOutput.getMinimumGuardConstant()
2022-08-25 15:07:39 +02:00
github-actions[bot]
0f63bc077f
Release preparation for version 2.10.4
2022-08-25 12:52:26 +00:00
yoff
9aa8b46cbf
Python: remove redundant code
2022-08-25 12:48:08 +00:00
Nora Dimitrijević
e39229d59e
C++: Remove unique-Instruction kludge in ScanfOutput
...
Passes tests.
2022-08-25 14:38:58 +02:00
Nora Dimitrijević
d8800c03b6
C++: new helper predicates in ScanfFunctionCall
...
Extract some of the logic from the `cpp/missing-check-scanf` query into
the more generally useful `getOutputArgument(int index)`, `getAnOutputArgument()`,
and `getNumberOfOutputArguments()` predicates.
2022-08-25 14:32:15 +02:00
yoff
6b4716485b
Python: rename file
2022-08-25 12:23:09 +00:00
yoff
54dde41329
Python: remove example code
2022-08-25 12:19:12 +00:00
Ian Lynagh
2e2621adad
Merge pull request #10154 from igfoo/igfoo/findSubType
...
Kotlin: Implement and use fun <T,reified S: T> Iterable<T>.findSubType
2022-08-25 12:57:46 +01:00
Sebastian Bauersfeld
130e1892f4
Address review comments.
2022-08-25 18:49:38 +07:00
Sebastian Bauersfeld
207aebc581
Change wording of change note.
2022-08-25 18:47:36 +07:00
Sebastian Bauersfeld
36b5e5f61a
Java: Add change notes.
2022-08-25 17:58:24 +07:00
Sebastian Bauersfeld
a486a89cee
Java: Taint flow through org.springframework.data.repository.CrudRepository.save().
2022-08-25 17:58:24 +07:00
Erik Krogh Kristensen
ba1ad00d2a
Merge pull request #10062 from erik-krogh/redosPrefix
...
JS: use the shared regular expression libraries in `js/case-sensitive-middleware-path`
2022-08-25 12:57:16 +02:00
Nick Rolfe
acf5b11139
Merge remote-tracking branch 'origin/main' into nickrolfe/hardcoded_code
2022-08-25 11:44:55 +01:00
erik-krogh
c7aa58252a
change "does not seem to check" to "does not check" in unchecked-cast-in-equals queries
2022-08-25 12:31:58 +02:00
yoff
800165d63c
python: udate deprecated call
2022-08-25 09:49:46 +00:00
yoff
d9444d8b08
Python: update synced file FlowSummaryImpl.qll
2022-08-25 09:31:45 +00:00
yoff
0b5d4c59dd
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
...
synced files have changed
2022-08-25 09:24:05 +00:00
Ian Lynagh
12eab3d7f0
Kotlin: Specialise findSubType to IrDeclaration
...
We only use it on that type, and this makes the uses a bit quieter.
2022-08-25 10:11:19 +01:00
Ian Lynagh
b0ae12850d
Merge pull request #10160 from igfoo/igfoo/more-not-null-exprs
...
Kotlin: Remove the last not-null-expressions
2022-08-25 10:05:53 +01:00
Ian Lynagh
bf6d9f8c23
Merge pull request #10161 from igfoo/igfoo/exec
...
Make a load of files non-executable
2022-08-25 10:05:39 +01:00
Tamas Vajk
15305fd9bb
Kotlin: Fix iterator extraction of IntArray, BooleanArray, ...
2022-08-25 11:05:17 +02:00
yoff
4a5fa5993d
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-08-25 10:47:16 +02:00
Anders Schack-Mulligen
c6f89aac0a
Merge pull request #10141 from aschackmull/ruby/perf-apigraph
...
Ruby: Perf fix for trackUseNode.
2022-08-25 10:22:07 +02:00
Tamas Vajk
7196fdd475
Kotlin: fix array iterator extraction to work outside of for loops
2022-08-25 09:23:34 +02:00
Tamas Vajk
af2614be84
Kotlin: Add array iterator tests
2022-08-25 09:17:50 +02:00
Paolo Tranquilli
606b9e6e38
Revert "Swift: rollback removal of std::variant"
...
This reverts commit 50d9a2e9cd .
2022-08-25 09:12:35 +02:00
Edward Minnix III
e6a1b1fab9
Rename allowBackup query id
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-08-24 15:54:13 -04:00
Ed Minnix
de36372d1c
Refactor android:backupAllowed query
...
Refactor the query to check for the nonexistence of the
`android:allowBackup` attribute being set to false.
The default value is true, so we need to check for it being explicitly
marked false.
2022-08-24 15:54:13 -04:00
Ed Minnix
a036639ecd
Added change notes
2022-08-24 15:54:13 -04:00
Ed Minnix
dad4a403db
Add support for android:allowBackup default value
...
The default value of `android:allowBackup` is `true`. Added support for
detecting if the default value is used.
2022-08-24 15:54:13 -04:00
Ed Minnix
6509426fb3
android:allowBackup query documentation
2022-08-24 15:54:13 -04:00
Ed Minnix
44b0a2b8af
Android allowBackup query
2022-08-24 15:54:13 -04:00
Ed Minnix
7d15af6caa
Add allowBackup check to AndroidManifest
2022-08-24 15:54:13 -04:00
Ed Minnix
dac64eeca7
Query test files
2022-08-24 15:54:13 -04:00
Nora Dimitrijević
5c894ae40b
Merge branch 'main' into missing-check-scanf-squashed
2022-08-24 21:14:57 +02:00
Nora Dimitrijević
6158ee1133
Change note
2022-08-24 21:09:24 +02:00
Nora Dimitrijević
170d12bf5a
Write MissingCheckScanf.qhelp
2022-08-24 19:58:19 +02:00
Mathias Vorreiter Pedersen
f2d9393928
Swift: Only test local-flow step relations for nodes with proper location information.
2022-08-24 17:14:11 +01:00
Ian Lynagh
3fcfd32eb1
Make *.ql non-executable
2022-08-24 16:55:11 +01:00
Ian Lynagh
5d97bb35d0
Make *.cs non-executable
2022-08-24 16:54:34 +01:00
Ian Lynagh
237b3670b4
Make *.xml non-executable
2022-08-24 16:53:48 +01:00
Ian Lynagh
b9a4b5ab9a
Make *.qlref non-executable
2022-08-24 16:53:16 +01:00
Ian Lynagh
4cd618f81c
Make *.expected non-executable
2022-08-24 16:51:50 +01:00
Henry Mercer
d9c078060a
Merge pull request #10159 from github/codeql-ci/js-atm-new-release
...
JS: Bump version numbers of ML-powered packs after 0.3.1 release
2022-08-24 16:50:41 +01:00
Ian Lynagh
344863d896
Make *.qhelp non-executable
2022-08-24 16:38:15 +01:00
Ian Lynagh
bb73767042
Make *.java non-executable
2022-08-24 16:38:03 +01:00
Ian Lynagh
5f8d8cdf40
Make *.dbscheme non-executable
2022-08-24 16:37:26 +01:00
Ian Lynagh
501a9b3c6b
Make *.qll non-executable
2022-08-24 16:36:15 +01:00
Jami
b3e88f8234
Merge pull request #9983 from jcogs33/android-implicit-export
...
Java: query to detect implicitly exported Android components
2022-08-24 10:52:50 -04:00
erik-krogh
014dcd1454
fixup a Python query, it didn't select something with a location
2022-08-24 16:23:20 +02:00
erik-krogh
5d9b25c75d
Merge branch 'main' into msgConsis
2022-08-24 16:19:32 +02:00
Mathias Vorreiter Pedersen
80bf22cf6f
Swift: Accept test changes in query tests.
2022-08-24 14:52:36 +01:00
Mathias Vorreiter Pedersen
2d90940111
Swift: Add field flow.
2022-08-24 14:52:36 +01:00
Ian Lynagh
b485706fde
Kotlin: Remove the last not-null-expressions
2022-08-24 14:39:03 +01:00
Henry Mercer
eb7091a6d3
Merge branch 'main' into codeql-ci/js-atm-new-release
2022-08-24 14:37:44 +01:00
Ian Lynagh
e4f66b8aa7
Kotlin: Refactor writeUpdateInPlaceExpr
...
In tryExtractArrayUpdate we need to know if writeUpdateInPlaceExpr will
succeed before we start writing any TRAP.
2022-08-24 14:31:10 +01:00
Paolo Tranquilli
610c788e34
Merge pull request #10156 from github/redsun82/swift-import-optional-module
...
Swift: make `ImportDecl:imported_module` optional
2022-08-24 15:18:04 +02:00
github-actions[bot]
3af330dce9
JS: Bump version of ML-powered library and query packs to 0.3.2
2022-08-24 13:12:12 +00:00
github-actions[bot]
613c13c2bf
JS: Bump patch version of ML-powered library and query packs
2022-08-24 13:03:14 +00:00
Mathias Vorreiter Pedersen
436fe65c7b
Merge pull request #10155 from MathiasVP/swift-properties-as-callables
...
Swift: Model property getters, setters and observers as callables
2022-08-24 13:57:12 +01:00
erik-krogh
1c0f2251e2
Merge branch 'main' into msgConsis
2022-08-24 14:38:57 +02:00
Paolo Tranquilli
2ee8d1a9d3
Swift: implement optional ImportDecl:imported_module
2022-08-24 14:31:55 +02:00
Mathias Vorreiter Pedersen
06a39d2b93
Swift: Accept test change.
2022-08-24 13:29:17 +01:00
Paolo Tranquilli
7873f07fac
Swift: define ImportDecl:imported_module optional
2022-08-24 14:26:29 +02:00
Mathias Vorreiter Pedersen
edb29b498d
Swift: Teach 'DataFlowDispatch' about property getters, observers and setters.
2022-08-24 13:08:26 +01:00
Ian Lynagh
31e1230c64
Kotlin: Remove another not-null-expr
2022-08-24 12:51:15 +01:00
Ian Lynagh
20ac15d549
Merge pull request #10152 from igfoo/igfoo/not-null-exprs
...
Kotlin: Remove more not-null expressions
2022-08-24 12:18:45 +01:00
Ian Lynagh
4cd90a15d0
Kotlin: Use findSubType in KotlinUsesExtractor too
2022-08-24 12:16:16 +01:00
Ian Lynagh
28d95f4d99
Kotlin: Implement and use fun <T,reified S: T> Iterable<T>.findSubType
...
We had a lot of uses of find which looked for a subtype, but then had to
cast (seemingly unsafely) the result to that subtype. This pulls all the
casts out into a utility function.
2022-08-24 12:10:53 +01:00
erik-krogh
f1799ae3d2
print the endpointExample in the alert-messsage, and only report one working example
2022-08-24 13:09:48 +02:00
Erik Krogh Kristensen
28d58be1b6
Merge pull request #10126 from erik-krogh/myApply
...
JS: precise flow through calls to `.apply()`
2022-08-24 12:55:36 +02:00
Mathias Vorreiter Pedersen
cee15277ce
Merge pull request #10144 from MathiasVP/swift-extract-this-param-decl
...
Swift: Extract `self` parameter declarations
2022-08-24 11:17:51 +01:00
Ian Lynagh
b5f20e40fc
Kotlin: Remove some more not-null-expressions
2022-08-24 11:13:27 +01:00
Ian Lynagh
8fe59e7ebc
Kotlin: Remove another not-null-expr
2022-08-24 11:09:31 +01:00
Ian Lynagh
01f27ea331
Kotlin: Remove another not-null-expr
2022-08-24 11:07:10 +01:00
Michael Nebel
c514c8838d
Merge pull request #9867 from michaelnebel/csharp/nosummary
...
C#: Negative summaries (ie. no flow through)
2022-08-24 12:06:05 +02:00
Ian Lynagh
940f18f5ae
Kotlin: Remove another not-null-expr
2022-08-24 10:59:15 +01:00
Ian Lynagh
44501f5318
Kotlin: Remove another not-null-expr
2022-08-24 10:57:36 +01:00
Ian Lynagh
da7b7ce9f5
Kotlin: Remove some not-null-exprs
2022-08-24 10:55:31 +01:00
Ian Lynagh
623d87aaca
Merge pull request #10142 from igfoo/igfoo/not-null-expr
...
Kotlin: Remove some more non-null-expressions
2022-08-24 10:37:37 +01:00
Ian Lynagh
8b4cf295bc
Merge pull request #10110 from igfoo/igfoo/compression
...
Kotlin: Add support for TRAP compression
2022-08-24 10:37:20 +01:00
Nora Dimitrijević
ca162a4365
C++: complete initial implementation of cpp/missing-check-scanf
...
There are still some remaining FPs (haven't fully tested them)
that should be ironed out in a follow-up to increase the precision, e.g.:
* if scanf(&i) != 1 return
if maybe() && scanf(&i) != 1 return
use(i) // should be OK on both counts
* The minimum guard constant for the *_s variants may not be right.
* int i[2]
scanf(i, i+1) // second i is flagged as a use of the first
* Maybe loosen the "unguarded or badly guarded use() = bad" policy to
"unguarded but already-initialized = good" and "badly guarded = bad",
since a lot of FPs in MRVA fall into the "unguarded but already-
initialized" bucket.
2022-08-24 11:25:06 +02:00
Nora Dimitrijević
69911d4f36
.clang-format: do not autoformat test.cpp
2022-08-24 11:25:05 +02:00
Arthur Baars
acff279e8d
Merge pull request #10147 from github/aibaars-fix-go
...
Go: fix tracing spec for windows
2022-08-24 11:17:34 +02:00
Mathias Vorreiter Pedersen
1d50dd54ce
Merge branch 'main' into swift-extract-this-param-decl
2022-08-24 10:14:18 +01:00
Paolo Tranquilli
f570cc1916
Merge pull request #10143 from github/redsun82/swift-add-module-to-decl
...
Swift: add module to `Decl`
2022-08-24 11:05:06 +02:00
Mathias Vorreiter Pedersen
de03fbdc49
Swift: Accept test changes.
2022-08-24 10:03:21 +01:00
Mathias Vorreiter Pedersen
997d9e8559
Swift: Include 'self' parameter declaration in the CFG.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
09427af2a2
Swift: Accept test changes.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
ca31984040
Swift: Autogenerate files.
2022-08-24 10:01:25 +01:00
Mathias Vorreiter Pedersen
273053c92a
Swift: Extract self parameter declarations.
2022-08-24 10:01:25 +01:00
Michael Nebel
a412c955e7
Java: One implementation of the interface has no flow (which seems unsound and contradicting our assumptions on interface 'contracts') - this now yields a negative summary.
2022-08-24 09:58:54 +02:00
Michael Nebel
e446eaba68
C#: Update C# Flowsummaries test expected out (Negative models has been updated due to rebase and changes in the model generator).
2022-08-24 09:58:54 +02:00
Michael Nebel
51e7b0880a
C#: Update negative models.
2022-08-24 09:58:54 +02:00
Michael Nebel
761ed283b6
C#/Java/Ruby/Swift: Address review comments.
2022-08-24 09:58:54 +02:00
Michael Nebel
f728ddf823
C#: Update negative summaries (there has been a rebase since last update).
2022-08-24 09:58:54 +02:00
Michael Nebel
fbc36800aa
C#: Fix merge issues after re-base.
2022-08-24 09:58:54 +02:00
Michael Nebel
2e273f2273
C#: Re-arange the import order, such that CsvValidation follows ExternalFlow directly.
2022-08-24 09:58:54 +02:00
Michael Nebel
30d554503a
C#/Java: Fix some QL doc spelling typos.
2022-08-24 09:58:53 +02:00
Michael Nebel
592b60d6ab
C#: Fix rebase error merge (validation on encryption kind was un-intentionally deleted).
2022-08-24 09:58:53 +02:00
Michael Nebel
160ae934af
C#/Java/Ruby/Swift: Fix typo in QL doc.
2022-08-24 09:58:53 +02:00
Michael Nebel
c3e21e8555
C#: Move NegativeSummary.qll to the internal folder.
2022-08-24 09:58:53 +02:00
Michael Nebel
37976d56bc
C#/Java/Go/Swift: Move CsvValidation back into ExternalFlow.
2022-08-24 09:58:53 +02:00
Michael Nebel
d2087ec748
C#: Update negative summaries reported by FlowSummaries test after rebase (stubs for .NET has been updated in the meantime).
2022-08-24 09:58:53 +02:00
Michael Nebel
581824a9b4
C#/Java/Ruby/Swift: Fix various typos.
2022-08-24 09:58:53 +02:00
Michael Nebel
8949f71250
C#: Fixup CSV validation refactor.
2022-08-24 09:58:53 +02:00
Michael Nebel
ad671f7fb4
C#: Update test expected output after addition of negative summaries.
2022-08-24 09:58:53 +02:00
Michael Nebel
00d1b8665d
C#: Add negative generated .NET Runtime models.
2022-08-24 09:58:52 +02:00
Michael Nebel
9b16192a7f
Swift: Re-factor CsvValidation into a separate file.
2022-08-24 09:58:52 +02:00
Michael Nebel
54e85ff903
Swift: Remove some of the copied (and dead) language specific (to C#) code from swift.
2022-08-24 09:58:52 +02:00
Michael Nebel
2c2e09b20b
Go: Add summary model validation on the kind column.
2022-08-24 09:58:52 +02:00
Michael Nebel
37f01fe10e
Go: Re-factor CSV validation into separate file.
2022-08-24 09:58:52 +02:00
Michael Nebel
9f9129d3c9
Java: Introduce column validation for negative summaries.
2022-08-24 09:58:52 +02:00
Michael Nebel
4939439982
Java: Re-factor CSV Validation into standalone module.
2022-08-24 09:58:52 +02:00
Michael Nebel
053460ffeb
C#: Introduce validation of negative summaries.
2022-08-24 09:58:52 +02:00
Michael Nebel
3315d768f8
C#: Introduce negative summary column count validation.
2022-08-24 09:58:52 +02:00
Michael Nebel
4c59cfb296
C#: Re-factor the invalidModelRow predicate.
2022-08-24 09:58:52 +02:00
Michael Nebel
19469a26d7
C#: Re-factor CSV validation into a separate file.
2022-08-24 09:58:52 +02:00
Michael Nebel
8db454aa15
Swift: Sync files and make dummy negative summary implementation.
2022-08-24 09:58:52 +02:00
Michael Nebel
fbc0e6a1ec
Ruby: Sync files and make dummy negative summary implementation.
2022-08-24 09:58:52 +02:00
Michael Nebel
120fb25702
Java: Sync files and model generator and tests.
2022-08-24 09:58:52 +02:00
Michael Nebel
5255e16816
Java: Sync files and make framework specific code.
2022-08-24 09:58:51 +02:00
Michael Nebel
15c05e201d
Java: Re-factor specialized CSV predicates into overrides of the row predicate.
2022-08-24 09:58:46 +02:00
Anders Schack-Mulligen
92f2976399
Java: Improve unification check for wildcards with lower bounds.
2022-08-24 09:50:13 +02:00
Anders Schack-Mulligen
f248c6a11e
Java: Improve unification check for bounded types.
2022-08-24 09:50:13 +02:00
Anders Schack-Mulligen
6b01f02df6
Java: Deduplicate unification code as a parameterised module.
2022-08-24 09:50:13 +02:00
Michael Nebel
0578d3e6c4
C#: Improve python script to allow generation of Negative summary models.
2022-08-24 09:46:54 +02:00
Michael Nebel
929f1b324b
C#: Prepare for .NET negative summaries and use in UnsupportedExternalAPIs query.
2022-08-24 09:46:54 +02:00
Michael Nebel
7d46d15f2b
C#: Update summary model generation test output.
2022-08-24 09:46:54 +02:00
Michael Nebel
136bdeb8e6
C#: Add test for Negative summary generation.
2022-08-24 09:46:54 +02:00
Michael Nebel
9c6bcec500
C#: Add model generator testcase for Negative summaries for abstract members.
2022-08-24 09:46:54 +02:00
Michael Nebel
87c7dd90c0
C#: Disregard destructors in model generation.
2022-08-24 09:46:54 +02:00
Michael Nebel
0cf4e64655
C#: Update test cases with new empty query predicate.
2022-08-24 09:46:54 +02:00
Michael Nebel
cc44e89065
C#: Introduce support for Negative summary models.
2022-08-24 09:46:54 +02:00
Paolo Tranquilli
50d9a2e9cd
Swift: rollback removal of std::variant
...
It turns out we are still missing some extractions. This will be fixed
with future work.
2022-08-24 09:44:37 +02:00
Erik Krogh Kristensen
4df2e5d937
Merge pull request #10096 from erik-krogh/acronyms-part1
...
make acronyms camelcase
2022-08-24 09:33:53 +02:00
erik-krogh
27fcc90a97
Merge branch 'main' into msgConsis
2022-08-24 09:21:43 +02:00
Mathias Vorreiter Pedersen
18ed9ed2ee
Merge pull request #10145 from MathiasVP/swift-inline-expect-for-dataflow
...
Swift: Use `InlineExpectationsTest` for dataflow tests
2022-08-24 08:15:45 +01:00
Tony Torralba
f0e5ef68c2
Merge pull request #10149 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-24 09:13:49 +02:00
Tamás Vajk
ecde0abc04
Merge pull request #10091 from tamasvajk/kotlin-data-class
...
Kotlin: Identify data classes during extraction
2022-08-24 08:45:41 +02:00
github-actions[bot]
03faddd7eb
Add changed framework coverage reports
2022-08-24 00:18:31 +00:00
Arthur Baars
8996c54b8e
Go: fix tracing spec for windows
2022-08-23 20:00:10 +02:00
Andrew Eisenberg
a40b7ef81c
Apply suggestions from code review
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-08-23 08:57:33 -07:00
Mathias Vorreiter Pedersen
6e148a4c3f
Swift: Use the inline testing framework for dataflow tests.
2022-08-23 16:31:05 +01:00
Paolo Tranquilli
2fc88d5f8e
Swift: add module to Decl and remove forward traps
...
Add module context to all declarations. As keeping the `std::variant`s
required slightly more work for this, and we intended to remove them
any way, this is done in this change.
For background, we put those in as we were not extracting all modules at
the time, so we were missing some DB ids that we put back in by adding
the "defining" traps not only in the trap file related to the defining
module but also to the one where the declaration was used. Since then
we fixed module extraction, so this should not be needed any more.
2022-08-23 16:53:07 +02:00
Ian Lynagh
910372bfb7
Kotlin: Refactor CallableReferenceHelper
...
This removes some non-null-expressions, and also makes the code more
robust and easier to understand.
2022-08-23 15:24:13 +01:00
Anders Schack-Mulligen
b83e851ac6
Ruby: one more pragma
2022-08-23 16:04:29 +02:00
Anders Schack-Mulligen
0ea55a9581
Ruby: autoformat
2022-08-23 15:58:29 +02:00
Anders Schack-Mulligen
844e0129b6
Ruby: Perf fix for trackUseNode.
2022-08-23 15:50:54 +02:00
Rasmus Wriedt Larsen
eccc7d6d6f
Ruby: Remove redundant .getExpr()
2022-08-23 15:42:21 +02:00
erik-krogh
a50234adb0
apply suggestion from review
2022-08-23 15:41:37 +02:00
Rasmus Wriedt Larsen
717a355913
Ruby: Accept grammar fix
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-08-23 15:36:45 +02:00
Rasmus Wriedt Larsen
d832298e40
Ruby: Accept grammar fix
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-08-23 15:36:37 +02:00
Erik Krogh Kristensen
dbefe73b62
Merge pull request #10134 from erik-krogh/simplifyAction
...
QL: simplify QL-for-QL action
2022-08-23 15:02:17 +02:00
Tony Torralba
22558e573d
Add change note
2022-08-23 14:19:00 +02:00
Tony Torralba
7070c4a2d2
Add summaries for ContentResolver and adjacent classes
2022-08-23 14:12:35 +02:00
erik-krogh
cddcea5d56
cache entire pack
2022-08-23 13:51:03 +02:00
Ian Lynagh
d3a8060e34
Kotlin: Remove another not-null-expr in the extractor
2022-08-23 12:05:14 +01:00
Ian Lynagh
98dd2448ff
Kotlin: Remove a not-null-expr from the extractor
2022-08-23 11:49:55 +01:00
erik-krogh
5e3cb08ed2
rename stateInPumpableRegexp to stateInRelevantRegexp
2022-08-23 12:40:45 +02:00
erik-krogh
1a7d3ee831
update expected output after changing queries
2022-08-23 12:35:32 +02:00
Chris Smowton
0a7350f3bf
Merge pull request #10041 from smowton/AddSensitiveApiCalls
...
Java: support more libraries in hardcoded-credentials queries
2022-08-23 10:51:04 +01:00
Ian Lynagh
51ada5c2af
Merge pull request #10130 from igfoo/igfoo/non-null-exprs
...
Kotlin: Fix some more not-null-exprs in the extractor
2022-08-23 10:49:45 +01:00
Tony Torralba
085c12a51f
Merge pull request #10116 from atorralba/atorralba/static-init-vector-fix
...
Java: Improve Static Initialization Vector query
2022-08-23 11:38:41 +02:00
erik-krogh
afadcd9b45
use a more detailed alert message in bitwise-sign-check
2022-08-23 11:18:45 +02:00
erik-krogh
d96d6721ba
change the alert message of unused-local-variable
2022-08-23 11:15:11 +02:00
erik-krogh
de8384d904
revert alert message change to java/unused-local-variable
2022-08-23 11:14:58 +02:00
Tony Torralba
e3c1101b79
Merge pull request #10136 from atorralba/atorralba/redos-cwe-tag
...
Java: Add CWE-1333 tag to Java ReDoS queries
2022-08-23 11:07:51 +02:00
erik-krogh
305a23b952
apply suggestion from review
2022-08-23 11:05:32 +02:00
Chris Smowton
131d6043c1
Add java imports
2022-08-23 09:41:00 +01:00
erik-krogh
82a5b7838c
don't add deprecated alias in experimental folder
2022-08-23 10:38:23 +02:00
erik-krogh
82d9180892
only have one deprecated alias for XmlDtd
2022-08-23 10:38:23 +02:00
Erik Krogh Kristensen
7704a9eeac
apply suggestions from Python review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-08-23 10:38:10 +02:00
erik-krogh
a57981ea69
apply suggestions from review
2022-08-23 10:18:14 +02:00
Joe Farebrother
ac79866799
Merge pull request #9982 from joefarebrother/rsa-without-oaep
...
Java: Add query for RSA without OAEP
2022-08-23 09:14:46 +01:00
erik-krogh
45e78a355f
ensure call-apply.js is seen as a module
2022-08-23 10:11:46 +02:00
Tony Torralba
6b4cfbbacd
Add change note
2022-08-23 10:00:10 +02:00
Tony Torralba
cd10f559ca
Add CWE-1333 tag to Java ReDoS queries
2022-08-23 09:56:59 +02:00
Tony Torralba
a3f27d4abe
Merge pull request #10131 from atorralba/atorralba/path-steps
...
Java: Add new java.nio.Path{,s} summary models
2022-08-23 09:47:34 +02:00
Tony Torralba
da3288fced
Move change note to src
2022-08-23 09:40:34 +02:00
Erik Krogh Kristensen
5fb3119fea
Merge pull request #10135 from erik-krogh/atmDep
...
ATM: fix deprecation warnings in ATM tests
2022-08-23 09:32:07 +02:00
erik-krogh
b5f9012033
fix deprecation warnings in ATM tests
2022-08-23 08:08:39 +02:00
erik-krogh
f7846a598e
add change-notes
2022-08-23 07:54:01 +02:00
erik-krogh
78ba7650b3
change the change-notes
2022-08-23 07:28:46 +02:00
erik-krogh
94ec0b8a52
update expected output of tests
2022-08-23 07:19:37 +02:00
Andrew Eisenberg
d892304c14
Address comments from PR
2022-08-22 16:06:26 -07:00
erik-krogh
e88d7d5027
simplify QL-for-QL action
2022-08-22 22:39:16 +02:00
erik-krogh
7e0bd5bde4
update expected output of tests
2022-08-22 21:41:47 +02:00
erik-krogh
df9a9f4a56
update rb/stored-css to match javascript
2022-08-22 21:41:47 +02:00
erik-krogh
9b257bfa9e
update rb/reflected-xss to match javascript
2022-08-22 21:41:47 +02:00
erik-krogh
ca299b9dc1
update py/unreachable-statement to match javascript/go
2022-08-22 21:41:47 +02:00
erik-krogh
31e15e27fc
update py/unsafe-deserialization to match ruby/javascript/java
2022-08-22 21:41:47 +02:00
erik-krogh
778879908e
update rb/code-injection to match python
2022-08-22 21:41:46 +02:00
erik-krogh
60908de089
update js/nested-loops-with-same-variable to match cpp
2022-08-22 21:41:46 +02:00
erik-krogh
20625ae60d
update {js/go/py}/xpath-injection to match csharp/java
2022-08-22 21:41:46 +02:00
erik-krogh
b5458b2125
update js/insecure-randomness to match csharp
2022-08-22 21:41:46 +02:00
erik-krogh
9cdd8cc8f5
update js/tainted-format-string to match ruby/java
2022-08-22 21:41:46 +02:00
erik-krogh
9395f156de
update {js/py}/command-line-injection to match csharp/java
2022-08-22 21:41:46 +02:00
erik-krogh
684a987abf
update java/unused-import to match python
2022-08-22 21:41:46 +02:00
erik-krogh
54268f4424
update java/static-array to match csharp
2022-08-22 21:41:46 +02:00
erik-krogh
8899c1be04
update java/unassigned-field to match csharp
2022-08-22 21:41:46 +02:00
erik-krogh
280b101caa
update java/useless-assignment-to-local to match go
2022-08-22 21:41:46 +02:00
erik-krogh
034d197e01
update {java/rb}/xxe to match python/javascript
2022-08-22 21:41:46 +02:00
erik-krogh
2d0a4c3d83
update {go/py}/stack-trace-exposure to match javascript
2022-08-22 21:41:46 +02:00
erik-krogh
5a0183f1e2
update java/password-in-configuration to match csharp
2022-08-22 21:41:46 +02:00
erik-krogh
151529d08f
correct the query-id of the experimental go/pam-auth-bypass query
2022-08-22 21:41:46 +02:00
erik-krogh
b5f3cd7a55
update cs/useless-tostring-call to match java
2022-08-22 21:41:46 +02:00
erik-krogh
49a3e208d7
update cs/index-out-of-bounds to match javascript/go
2022-08-22 21:41:46 +02:00
erik-krogh
52171d6733
update cs/unchecked-cast-in-equals to match java
2022-08-22 21:41:46 +02:00
erik-krogh
ea11f744e1
update cs/confusing-override-name to match java
2022-08-22 21:41:46 +02:00
erik-krogh
064c9a6938
update {cs/java}/todo-comment to match javascript
2022-08-22 21:41:46 +02:00
erik-krogh
678e433013
update cpp/missing-case-in-switch to match java
2022-08-22 21:41:45 +02:00
erik-krogh
ea2777fa3e
update {cs/cpp}/equality-on-floats to use the same alert-message/description
2022-08-22 21:41:45 +02:00
erik-krogh
55c8863e92
update java/sql-injection to match go/javascript/python/ruby
2022-08-22 21:41:45 +02:00
erik-krogh
3553f3d9b8
update {rb/py/js/go}/path-injection to match java/csharp
2022-08-22 21:41:45 +02:00
erik-krogh
39c1832995
update {cpp/js}/bitwise-sign-check to match java
2022-08-22 21:41:45 +02:00
erik-krogh
cc41a83a8d
update {py/cpp}/commented-out-code to match csharp/java/javascript
2022-08-22 21:41:45 +02:00
erik-krogh
b471a401cc
update {rb/js/java}/unused-parameter to match python
2022-08-22 21:41:45 +02:00
erik-krogh
698ccd8850
update {cpp/java}/unused-local to match python
2022-08-22 21:41:45 +02:00
erik-krogh
5a312cd0da
update cpp/complex-block to match java/csharp
2022-08-22 21:41:45 +02:00
erik-krogh
b1c9843d15
update {cs/cpp}/empty-block so they have the same alert message
2022-08-22 21:41:45 +02:00
erik-krogh
594fbc678e
update js/zip-slip to match java/go/csharp
2022-08-22 21:41:45 +02:00
erik-krogh
e52fa9a469
update {cs/java}/regex-injection to match javascript
2022-08-22 21:41:45 +02:00
erik-krogh
28083ebe09
run the implicit-this patch
2022-08-22 21:23:31 +02:00
erik-krogh
a593a52b5e
add missing qldoc (that was already missing?)
2022-08-22 21:22:39 +02:00
erik-krogh
e89e0eb7fb
make some acronyms camelCase
2022-08-22 21:22:35 +02:00
luchua-bc
3e382fd47c
Optimize the query
2022-08-22 17:04:03 +00:00
Jami Cogswell
0136c7542b
update XML to Xml due to recent deprecation
2022-08-22 12:41:22 -04:00
Jami Cogswell
733078183e
update query description
2022-08-22 12:41:22 -04:00
Jami Cogswell
f34e23bdba
adjusted comments and precision level
2022-08-22 12:41:22 -04:00
Jami Cogswell
ac07544d70
group negated expressions together
2022-08-22 12:41:22 -04:00
Jami Cogswell
efac4b197d
removed another comment
2022-08-22 12:41:22 -04:00
Jami Cogswell
e003e2c809
lib change note updates
2022-08-22 12:41:22 -04:00
Jami Cogswell
eee12264c3
excluded action main from query results, added unit test
2022-08-22 12:41:22 -04:00
Jami Cogswell
c5526ffef8
update class QLDoc to start with 'An'
2022-08-22 12:41:22 -04:00
Jami Cogswell
fba9ffd49a
update lib change note
2022-08-22 12:41:22 -04:00
Jami Cogswell
eacce03073
resolved merge conflict in AndroidManifest lib
2022-08-22 12:41:22 -04:00
Jami Cogswell
0934c1d184
resolved merge conflict in AndroidManifest lib
2022-08-22 12:41:22 -04:00
Jami Cogswell
9968d5d816
updated predicates
2022-08-22 12:41:22 -04:00
Jami Cogswell
115f76ac5a
fixed typo in unit tests; added a couple more tests
2022-08-22 12:41:22 -04:00
Jami Cogswell
b88d545c49
added unit tests
2022-08-22 12:41:22 -04:00
Jami Cogswell
58d3d89b2e
resolved merge conflict in AndroidManifest
2022-08-22 12:41:22 -04:00
Jami Cogswell
825df218a3
adding library change note
2022-08-22 12:41:22 -04:00
Jami Cogswell
084b9830bc
resolved merge conflict in AndroidManifest
2022-08-22 12:41:22 -04:00
Jami Cogswell
55bd9f943f
minor wording updates in help file
2022-08-22 12:41:22 -04:00
Jami Cogswell
a99d7ffaaf
minor wording update in change note
2022-08-22 12:41:22 -04:00
Jami Cogswell
33c48ec685
updated change note
2022-08-22 12:41:22 -04:00
Jami Cogswell
10fa687e26
updated help file and unit tests
2022-08-22 12:41:22 -04:00
Jami Cogswell
eea1089ee0
resolved merge conflict in AndroidManifest
2022-08-22 12:41:22 -04:00
Jami Cogswell
60921a0355
switched to checking for permission attr in application elem instead of in manifest elem
2022-08-22 12:41:22 -04:00
Jami Cogswell
a6ecac6e00
third draft with category launcher and permission element excluded
2022-08-22 12:41:22 -04:00
Jami Cogswell
8d5bbc458f
first draft of query and tests
2022-08-22 12:41:22 -04:00
Jami Cogswell
3e09d86a4f
adding starter files
2022-08-22 12:41:22 -04:00
Mathias Vorreiter Pedersen
0ac8b7ce65
Merge pull request #10128 from MathiasVP/add-cleartext-sanitizer
...
C++: Add a sanitizer to `cpp/cleartext-storage-buffer`
2022-08-22 17:13:22 +01:00
Chris Smowton
25195bb0ba
Merge pull request #10103 from smowton/smowton/feature/golang-1.19-support
...
Go: support go 1.19
2022-08-22 16:49:11 +01:00
Tony Torralba
422abc1a18
Add change note
2022-08-22 16:22:19 +02:00
Erik Krogh Kristensen
eadd85bce9
Merge pull request #10073 from erik-krogh/XMLXml
...
rename all occurrences of XML to Xml
2022-08-22 16:18:27 +02:00
Tamás Vajk
aa0ff2b53f
Merge pull request #10129 from tamasvajk/kotlin-fix-comment-type-alias
...
Kotlin: Extract type alias doc comments
2022-08-22 16:10:50 +02:00
Tony Torralba
ee6ac744c5
Add new Path steps and tests
2022-08-22 15:54:20 +02:00
Ian Lynagh
d5b414f163
Kotlin: Fix some more not-null-exprs in the extractor
2022-08-22 14:16:58 +01:00
Erik Krogh Kristensen
cede617840
Merge pull request #10012 from erik-krogh/update-ql-for-ql-action
...
QL: update codeql-action in QL-for-QL
2022-08-22 15:11:29 +02:00
erik-krogh
9c95dcc126
add change-note
2022-08-22 14:09:19 +02:00
erik-krogh
2ac5441aec
rename the XMLDTD class to XmlDTD
2022-08-22 14:09:19 +02:00
erik-krogh
1a89ddae5d
update some comments from XML to Xml
2022-08-22 14:09:19 +02:00
erik-krogh
ce9f69a639
rename all occurrences of XML to Xml
2022-08-22 14:08:31 +02:00
Mathias Vorreiter Pedersen
831f143fe6
C++: Add change note.
2022-08-22 12:40:08 +01:00
Tony Torralba
5e815fb359
Merge branch 'main' into atorralba/static-init-vector-fix
2022-08-22 13:31:00 +02:00
Tony Torralba
c35fbf9abc
Add more sanitizers
2022-08-22 13:20:02 +02:00
Tony Torralba
72c204063d
Merge pull request #10115 from atorralba/atorralba/fragment-fix
...
Java: Add support for androidx.fragment.app.Fragment
2022-08-22 12:53:19 +02:00
Tamas Vajk
25098ef2d8
Kotlin: Extract type alias doc comments
2022-08-22 12:31:13 +02:00
Jeroen Ketema
4c8926d880
Merge pull request #9720 from jketema/linkage
...
C++: Support link targets for global and namespace variables
2022-08-22 12:12:44 +02:00
Rasmus Wriedt Larsen
61bf2154cd
Merge branch 'main' into shared-http-client-request
2022-08-22 12:05:37 +02:00
Mathias Vorreiter Pedersen
65abb54a73
C++: Add a sanitizer to 'cpp/cleartext-storage-buffer' to improve the performance of the query.
2022-08-22 11:01:31 +01:00
Ian Lynagh
584037737e
Merge pull request #10113 from igfoo/igfoo/nullexpr
...
Kotlin: Remove another instance of a not-null-expression
2022-08-22 10:52:04 +01:00
Jeroen Ketema
284c8dd448
C++: Add change note
2022-08-22 11:25:40 +02:00
Tony Torralba
3314b56ffe
Fix Fragment tests after androidx stubs update
2022-08-22 11:13:19 +02:00
Taus
c904ba1d16
Merge pull request #9852 from tausbn/python-add-str-class
...
Python: Add `Str` class
2022-08-22 10:55:01 +02:00
Jeroen Ketema
f00a9ac8fc
Merge pull request #10112 from jketema/orphaned
...
C++: Handle orphaned local variables
2022-08-22 10:45:10 +02:00
Chris Smowton
f3ef8510d3
Merge pull request #10093 from smowton/smowton/feature/java-singular-locations
...
Java: pick an arbitrary representative location when an entity has many candidate locations.
2022-08-22 09:32:43 +01:00
Jeroen Ketema
04564b4323
Merge pull request #10123 from MathiasVP/optimize-exec-tainted
...
C++: Remove CP in `cpp/command-line-injection`
2022-08-22 10:20:03 +02:00
Michael Nebel
642c9929e6
Merge pull request #10050 from michaelnebel/csharp/asproutingendpoints
...
C#: ASP.NET MapGet Routing endpoints (Remote Flow Sources)
2022-08-22 09:05:12 +02:00
erik-krogh
2fd09d34de
improve performance of global dataflow by inlining a step predicate
2022-08-22 08:35:19 +02:00
erik-krogh
2f11f3760e
simplify getALibraryInputParameter by adding more general dataflow for the arguments object
2022-08-22 08:32:43 +02:00
Erik Krogh Kristensen
11b039c1f1
add tests
2022-08-22 08:29:28 +02:00
Erik Krogh Kristensen
31c09ba678
implement flow for .apply() by adding a ReflectiveParametersNode data-flow node
2022-08-22 08:29:28 +02:00
Erik Krogh Kristensen
d86b7f6c54
recognize an access to the arguments object as library-input
2022-08-22 08:29:24 +02:00
Erik Krogh Kristensen
7b1ef7473e
change ArrayCreationStep to a PreCallGraphStep and unrestrict the storeStep
2022-08-22 08:15:54 +02:00
erik-krogh
049af68bc2
restrict suffix-construction to relevant regexps
2022-08-21 20:35:39 +02:00
erik-krogh
0aebc90b61
don't lowercase the endpointExample, and correctly handle root states
2022-08-21 18:38:47 +02:00
Mathias Vorreiter Pedersen
d209231ff9
C++: Remove cartesian product in 'ExecTainted'.
2022-08-21 16:45:36 +01:00
Mathias Vorreiter Pedersen
b944005046
Merge pull request #10095 from MathiasVP/fix-joins-in-using-expired-stack-address
...
C++: Fix joins in `cpp/using-expired-stack-address`
2022-08-20 12:18:34 +01:00
Jeroen Ketema
2adf5662a2
C++: Add DB scheme upgrade and downgrade scripts
2022-08-20 08:55:33 +02:00
Jeroen Ketema
02c8e316d3
C++: Update DB scheme stats file
2022-08-20 08:46:50 +02:00
Jeroen Ketema
4a7ad84d02
C++: Add __func__ and __PRETTY_FUNCTION__ IR tests
2022-08-20 01:09:52 +02:00
Chris Smowton
e5370a0caa
Set MacOS and Windows Go versions to 1.19
2022-08-19 21:19:13 +01:00
Andrew Eisenberg
38909076ea
Update other articles to with details about packaging
...
In this commit:
- Replace _QL pack_ with _CodeQL pack_
- Replace `about-ql-pack` references with `about-codeql-packs`
- Replace examples using `libraryPathDependencies with
`dependencies`
- Update some examples to specify the optional `version` field
- Update description of query specifiers to note that a path
within a pack is valid.
2022-08-19 13:14:43 -07:00
Jeroen Ketema
584a0189a8
C++: Update test results after changes
2022-08-19 21:50:45 +02:00
Chris Smowton
259b942fac
Indent blocks that gofmt would mistake for markdown
...
As of go 1.19 it will try to format markdown nicely, but in both these cases the formatting isn't supposed to be interpreted this way, so indent it to make it a preformatted block.
2022-08-19 19:06:21 +01:00
Chris Smowton
8d20b9cf52
Use hasLocationInfo to match several Location fields at once
2022-08-19 19:03:17 +01:00
Chris Smowton
3266f1f35f
Create 2022-08-19-signular-locations.md
2022-08-19 18:42:41 +01:00
Chris Smowton
6ac6a81bfa
Update test action to use go 1.19
2022-08-19 18:37:39 +01:00
Chris Smowton
678ecffea8
Accept test changes
2022-08-19 18:34:05 +01:00
erik-krogh
bcf4c57060
Merge branch 'main' into redosPrefix
2022-08-19 19:22:49 +02:00
erik-krogh
d052b1e3c9
also support regular expressions without repetitions
2022-08-19 19:21:44 +02:00
Chris Smowton
1ea7caf559
Fix join ordering in inline-expectations test
2022-08-19 18:17:22 +01:00
Chris Smowton
e39475d778
Merge pull request #10100 from github/smowton/admin/note-java-19-support
...
Note support for Java 19
2022-08-19 17:20:23 +01:00
Chris Smowton
6f4fbac412
Create 2022-08-19-go-119-support.md
2022-08-19 17:20:03 +01:00
Tony Torralba
90aa7d8be5
Add change note
2022-08-19 17:01:37 +02:00
Tom Hvitved
a0a3dfb93d
Merge pull request #10108 from hvitved/remove-redundant-overrides
...
Remove redundant overrides
2022-08-19 16:43:23 +02:00
Tony Torralba
3c6c09b0f8
No longer require a mode in Cipher.init
2022-08-19 16:40:59 +02:00
Tony Torralba
794fd976a9
Add androidx Fragment support
2022-08-19 16:32:06 +02:00
Paolo Tranquilli
75f62098e0
Merge pull request #10111 from github/redsun82/swift-add-methodrefexpr
...
Swift: synthesize `MethodRefExpr`
2022-08-19 16:27:16 +02:00
Rasmus Wriedt Larsen
9790594984
Ruby: Bugfix after HTTP::Client::Request change
...
I guess this is not 100% accurate any longer since the base class is
only a `DataFlow::Node` now... I guess we could make it a
`DataFlow::CallNode` in the Concept definition.
2022-08-19 16:25:47 +02:00
Paolo Tranquilli
631d234026
Swift: expand tests
2022-08-19 16:15:17 +02:00
Rasmus Wriedt Larsen
9eda630965
Ruby: Add CallNode.getKeywordArgumentIncludeHashArgument
2022-08-19 15:54:15 +02:00
Rasmus Wriedt Larsen
10968bf115
Ruby: Fix alert-msg logic for RequestWithoutValidation.ql
...
This really surprised me, but as shown on the results, it does actually
make a difference in the alert-message.
2022-08-19 15:50:09 +02:00
Ian Lynagh
5d670c6186
Kotlin: Remove another instance of a not-null-expression
2022-08-19 14:50:06 +01:00
Rasmus Wriedt Larsen
0ac3624342
Ruby: Implement new disablesCertificateValidation for all HTTP client models
...
Sadly most alert text changed, but the two important changes are:
1. The request on RestClient.rb:19 now has an expanded alert text,
highlighting where the origin of the value that disables certificate
validation comes from. (in this case, it's trivial since it's the
line right above)
2. We handle passing `false`/`OpenSSL::SSL::VERIFY_NONE` the same in the
argument passing examples in Faraday.rb
2022-08-19 15:46:22 +02:00
Erik Krogh Kristensen
812b6bddcf
Merge pull request #10053 from erik-krogh/msgConsis-ql-query
...
QL: add ql/consistent-alert-message
2022-08-19 15:45:35 +02:00
Rasmus Wriedt Larsen
1f028ac206
Ruby: Implement new disablesCertificateValidation for RestClient
2022-08-19 15:43:19 +02:00
Rasmus Wriedt Larsen
07d95918f2
Ruby: Add more RequestWithoutValidation.ql tests
...
Added:
- one where the value is not directly used when disabling certificate
validation.
- one with argument passing, Faraday, where it is only the passing of
`OpenSSL::SSL::VERIFY_NONE` that is recognized.
2022-08-19 15:42:50 +02:00
Paolo Tranquilli
f0ec43b04c
Swift: remove getMethodDeclaration
...
`getStaticTarget` gives the same result.
2022-08-19 15:37:49 +02:00
Paolo Tranquilli
66459b81da
Swift: use field in MethodApplyExpr
...
Also rename `getMethod` to `getMethodDeclaration` to clear up possible
confusion with `getFunction`.
2022-08-19 15:31:00 +02:00
Tom Hvitved
99c049c09e
Merge pull request #10102 from hvitved/ql/redundant-override-refined
...
QL: Refine 'redundant override' query
2022-08-19 15:25:11 +02:00
Jeroen Ketema
309fecac92
C++: Extend getFunction to handle orphaned local variables
2022-08-19 15:22:30 +02:00
Paolo Tranquilli
6706ba6ded
Swift: accept toString changes in tests
2022-08-19 15:22:02 +02:00
Jeroen Ketema
3b81f4860e
C++: Add orphaned local variable relation to DB scheme
2022-08-19 15:21:56 +02:00
Paolo Tranquilli
e3f86a9eb0
Swift: fix QL warning
2022-08-19 15:03:18 +02:00
Tamas Vajk
e23d36909d
Add DB stats file
2022-08-19 14:51:37 +02:00
Tamas Vajk
e30a488dab
Fix downgrade folder SHA and file directions
2022-08-19 14:51:36 +02:00
Tamas Vajk
e668bf631a
Add DB downgrade folder
2022-08-19 14:51:36 +02:00
Tamas Vajk
b34cae6bdd
Add DB upgrade folder
2022-08-19 14:51:36 +02:00
Tamas Vajk
1c08ac1d7a
Kotlin: Identify data classes during extraction
2022-08-19 14:51:36 +02:00
Paolo Tranquilli
9b50336e47
Swift: synthesize MethodRefExpr
...
This introduces a `MethodRefExpr` node synthesized out of
`DotSyntaxCallExpr` under the `LookupExpr` hierarchy. This means that
much like
```free_function(1, 2)```
is a `CallExpr` with `getFunction` giving a `DeclRefExpr`,
```foo.method(1, 2)```
is now a `CallExpr` with `getFunction` giving a `MethodRefExpr`.
`ApplyExpr::getStaticTarget` has been made work with it (as well as
`ConstructorRefCallExpr` which for the moment has been left where it
is), a new `MethodApplyExpr` has been introduced deriving from it,
and control and data flow libraries have adapted.
A small but was fixed in `qlgen` where the default constructor for DB
types was not correctly subtracting derived IPA types depending on the
order of definitions in `schema.yml`.
There are still some occurrences of `DotSyntaxCallExpr`, and as already
mentioned the other `SelfApply` class (`ConstructorRefCallExpr`) was
left alone. Their treatment is left for a future PR.
2022-08-19 14:48:36 +02:00
Tom Hvitved
18fb4a87af
Revert change to QL test
2022-08-19 14:37:25 +02:00
Ian Lynagh
a6cee9edf9
Kotlin: Add an integration test for TRAP compression
2022-08-19 13:34:43 +01:00
Tom Hvitved
1b29bddb73
Python: Revert change to AnyNode
2022-08-19 14:08:21 +02:00
Tom Hvitved
663096fe3a
Remove redundant overrides
2022-08-19 13:57:41 +02:00
Ian Lynagh
62779944e8
Kotlin: Compress TRAP files
...
The Kotlin extractor can now be told to write TRAP with no compression,
gzip compression or Brotli compression - although Brotli is not yet
supported and it will fall back to gzip.
The invocation TRAP file is a bit more complicated, as it's already been
started before the extractor starts. For now that continues to always be
uncompressed.
2022-08-19 12:47:10 +01:00
Sebastian Bauersfeld
da79ad854c
Added change notes.
2022-08-19 17:46:02 +07:00
Sebastian Bauersfeld
2ec3746861
Address PR comments.
2022-08-19 17:33:35 +07:00
Sebastian Bauersfeld
f6d42bd3c6
Allow blacklist sanitizers.
2022-08-19 17:33:35 +07:00
Sebastian Bauersfeld
11f527ea5b
Fix up query tests.
2022-08-19 17:33:35 +07:00
Sebastian Bauersfeld
354a7fd252
Make taint flow through java.lang.String.(replace|replaceFirst|replaceAll) more permissive.
2022-08-19 17:33:35 +07:00
Sebastian Bauersfeld
5cf320d553
Add corresponding taint steps.
2022-08-19 17:33:35 +07:00
Sebastian Bauersfeld
b0fbe3658d
Add java.lang.String taint tests.
2022-08-19 17:33:35 +07:00
Chris Smowton
949de2a8dd
Create 2022-08-19-java-19-support.md
2022-08-19 11:15:23 +01:00
Chris Smowton
e2afc80aff
Autoformat go
2022-08-19 10:29:45 +01:00
Chris Smowton
45f922b3f2
Add models for Go 1.19's new url.JoinPath and URL.JoinPath functions
2022-08-19 10:29:45 +01:00
Chris Smowton
6068f63e9e
Add taint models for go 1.19's new fmt.Append functions
2022-08-19 10:29:45 +01:00
Tom Hvitved
c86c9ec2c3
QL: Move query logic into library
2022-08-19 10:35:47 +02:00
Tom Hvitved
93fc952ef1
Merge pull request #10099 from hvitved/csharp/html-raw-tests
...
C#: Add a cshtml-based XSS test
2022-08-19 10:24:52 +02:00
Tom Hvitved
50a53008cd
QL: Refine 'redundant override' query
2022-08-19 10:15:47 +02:00
Michael Nebel
c3e0388a75
C#: Add testcase for complex models.
2022-08-19 08:51:39 +02:00
Michael Nebel
058541c0d6
C#: Added change note.
2022-08-19 08:10:23 +02:00
Michael Nebel
bbb6ba088b
C#: Add more Map like remote flow source testcases.
2022-08-19 08:10:23 +02:00
Michael Nebel
424d909201
C#: Add more Map like method delegate parameter as flow sources.
2022-08-19 08:10:23 +02:00
Michael Nebel
d2c5266139
C#: Add more test examples.
2022-08-19 08:10:23 +02:00
Michael Nebel
aaf14b0184
C#: Improve solution (pair programming with @hvitved).
2022-08-19 08:10:23 +02:00
Michael Nebel
6e5a412150
C#: Make one more ASP.NET routing example.
2022-08-19 08:10:23 +02:00
Michael Nebel
bd6d3c7347
C#: Consider parameters passed to lambdas in MapGet remote flow sources.
2022-08-19 08:10:23 +02:00
Michael Nebel
c8afb1bb94
C#: Update expected test case with new line numbers.
2022-08-19 08:10:23 +02:00
Michael Nebel
328e47834e
C#: Add ASP.NET Core MapGet routing end point example.
2022-08-19 08:10:23 +02:00
Andrew Eisenberg
d737b5715f
Merge and update about-ql-packs with about-codeql-packs
...
This is the first of a series of commits around updating packaging docs.
`about-ql-packs.rst` is outdated. All relevant information has been
moved to about-codeql-packs.rst`.
2022-08-18 15:31:35 -07:00
Chris Smowton
d2055283de
Add models for go 1.19's new atomic pointer typex
2022-08-18 17:47:13 +01:00
Chris Smowton
8eb5d001f7
Upgrade Go extractor to latest golang and x-packages
2022-08-18 16:22:04 +01:00
Jeroen Ketema
38b4c02508
C++: Support link targets for global and namespace variables
2022-08-18 17:01:02 +02:00
Mathias Vorreiter Pedersen
c953b05cc2
Merge branch 'main' into fix-joins-in-using-expired-stack-address
2022-08-18 15:13:05 +01:00
Chris Smowton
ec1cc72669
Note support for Java 19
2022-08-18 15:02:16 +01:00
Erik Krogh Kristensen
4f93f2b9ba
Merge pull request #10076 from erik-krogh/ql-for-ql-fixes
...
various QL-for-QL fixes
2022-08-18 15:46:48 +02:00
Chris Smowton
17dd1f64ec
Java: pick an arbitrary representative location when an entity has many candidate locations.
2022-08-18 14:29:16 +01:00
Tom Hvitved
f275885258
C#: Add a cshtml-based XSS test
2022-08-18 15:24:04 +02:00
Anders Schack-Mulligen
61a2c0dab5
Merge pull request #10084 from aschackmull/java/numericcasttainted-barrier
...
Java: Move sink-constraints into the configuration in NumericCastTainted.ql.
2022-08-18 15:22:00 +02:00
Joe Farebrother
e8f027dab2
Apply docs suggestions from code review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-08-18 14:21:40 +01:00
Tom Hvitved
2afb4abaa2
Merge pull request #10094 from hvitved/csharp/redundant-override
...
C#: Remove redundant override
2022-08-18 15:17:20 +02:00
Tom Hvitved
d68f817e53
Merge pull request #10098 from hvitved/ql/redundant-override
...
QL: Add redundant overrides query
2022-08-18 15:13:35 +02:00
erik-krogh
26fcf6b25b
apply suggestions from review
2022-08-18 15:00:57 +02:00
Tom Hvitved
e5911df697
QL: Add redundant overrides query
2022-08-18 14:59:04 +02:00
Rasmus Wriedt Larsen
47c9c5bddd
Ruby: Update RequestWithoutValidation.ql to match Python version
...
No library modeling currently has support for the new disablesCertificateValidation/2, so only the alert text has changed
(removed an import from Python so the queries would ACTUALLY match)
2022-08-18 14:32:41 +02:00
Mathias Vorreiter Pedersen
5704995b62
C++: Fix joins in 'cpp/using-expired-stack-address'.
2022-08-18 13:23:39 +01:00
Chris Smowton
72009f8614
Merge pull request #10085 from smowton/smowton/fix/dont-use-write-instruction-for-channel-flow
...
Go: don't use WriteNode for channel writes
2022-08-18 12:47:55 +01:00
Rasmus Wriedt Larsen
4a82025087
Ruby: Base HTTP::Client::Request on shared concept
...
Fixing up deprecation errors in next commit
2022-08-18 13:42:53 +02:00
Rasmus Wriedt Larsen
e2b78df5ad
Ruby: Change HTTP::Client::Request to have DataFlow::Node as base class
...
Although this is a breaking change, as explained in the change-note, it
should onyl affect peopel that have created their own HTTP client
request modeling, which I assume is none.
The alternative would have been to keep the old class/module as
deprecated, and introduce a `HTTP::Client::Requestv2` class/module that
is based on `DataFlow::Node` instead. The old class could then be
deprecated in 1 year, and we could do a rename from
`HTTP::Client::Requestv2` -> `HTTP::Client::Request` at the same time.
(and then wait 1 more year before being able to delete
`HTTP::Client::Requestv2`)
All in all, I think this is the right tradeoff, given that CodeQL Ruby
is still in beta.
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
e6b4d12f94
Sync ConceptsShared
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
635fd1902d
Python: Move HTTP::Client::Request to shared concepts
...
New shared concepts uses correct casing of HTTP according to our
style-guide.
2022-08-18 13:42:52 +02:00
Rasmus Wriedt Larsen
9d96b73b8b
Ruby: Fixup test annotation
2022-08-18 13:42:49 +02:00
Tom Hvitved
ece37d80f0
C#: Remove redundant override
2022-08-18 13:13:06 +02:00
Tamás Vajk
ad1cb8f8c7
Merge pull request #10065 from tamasvajk/kotlin-1.7.20-Beta
...
Kotlin: Add support for version 1.7.20-Beta
2022-08-18 12:17:10 +02:00
Tom Hvitved
08a5b5dc73
Merge pull request #10089 from hvitved/ruby/local-source-nodes
...
Ruby: Reduce size of `isLocalSourceNode`
2022-08-18 12:02:35 +02:00
Tom Hvitved
e949458add
Merge pull request #10066 from hvitved/csharp/underlying-as-callable
...
C#: Include both source code and hand-written summaries in data flow
2022-08-18 12:01:49 +02:00
Asger F
349331d6ca
Merge pull request #10082 from asgerf/js/exports-handling2
...
JS: Handle nested conditions in "exports" section
2022-08-18 11:10:59 +02:00
Nick Rolfe
a46e2b3f2f
Merge pull request #10056 from hmac/hmac/action-controller-response-body
...
Ruby: Recognise Rails render calls as HTTP responses
2022-08-18 10:02:17 +01:00
Tom Hvitved
682986c0a2
Merge pull request #10087 from hvitved/ruby/unknown-member-warning
...
Ruby: Get rid of warning in `getUnknownMember`
2022-08-18 10:50:24 +02:00
erik-krogh
9e7c0c6ab9
revert changing imports in java/
2022-08-18 10:19:12 +02:00
Anders Schack-Mulligen
07e0bd3ce1
Merge pull request #10083 from aschackmull/java/sensitivelog-barrier
...
Java: Add some type-based sanitizers to SensitiveInfoLog.ql.
2022-08-18 10:18:33 +02:00
erik-krogh
de3e1c39e4
use the shared regular expression libraries in js/case-sensitive-middleware-path
2022-08-18 10:07:55 +02:00
erik-krogh
473bc92e2d
move the PrefixConstruction module out of the ReDoSPruning module
2022-08-18 10:07:48 +02:00
Tom Hvitved
93830f43cc
Address review comment
2022-08-18 10:06:26 +02:00
Tom Hvitved
baa646e102
Ruby: Remove unused UnknownMember from API graphs
2022-08-18 09:40:02 +02:00
Anders Schack-Mulligen
37e5f0438c
Java: Add change note.
2022-08-18 09:19:32 +02:00
Tamas Vajk
fb9a34851a
Apply code review changes
2022-08-18 09:01:10 +02:00
erik-krogh
4bc10f9b5c
explicitly import required frameworks that were previously implicitly imported
2022-08-18 08:40:46 +02:00
Harry Maclean
8f370b2457
Update ruby/ql/lib/change-notes/2022-08-16-action-controller-response-body.md
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-08-18 10:03:52 +12:00
Harry Maclean
70ec70940a
Merge pull request #8142 from github/hmac/incomplete-multi-char-sanitization
2022-08-18 10:02:39 +12:00
erik-krogh
d96dca4f5e
fix typo
2022-08-17 22:59:16 +02:00
erik-krogh
7850ab2dcc
rename badlangs to otherlangs
2022-08-17 22:58:58 +02:00
erik-krogh
cb110ba266
this is an odd commit
2022-08-17 22:57:27 +02:00
erik-krogh
f738567f96
refactor some code out into a helper class QueryDoc
2022-08-17 22:56:46 +02:00
Philip Ginsbach
e8a1925e9c
add reference file for signatures
2022-08-17 20:44:00 +01:00
Philip Ginsbach
6c08542278
add "Parameterised modules" section to documentation of modules
2022-08-17 20:43:59 +01:00
Erik Krogh Kristensen
e93ff8672c
Merge pull request #10075 from erik-krogh/depOld
...
delete old deprecations
2022-08-17 21:21:57 +02:00
yoff
78756bdc6a
Merge pull request #9859 from tausbn/python-fix-another-bad-value-transfer-join
2022-08-17 20:47:00 +02:00
Chris Smowton
3802deab70
Adjust test expectations re: reformatting
2022-08-17 17:31:27 +01:00
Chris Smowton
e33ddbdcfd
Format go
2022-08-17 16:42:06 +01:00
Tom Hvitved
ed2ec1acc0
Ruby: Reduce size of isLocalSourceNode
2022-08-17 17:19:30 +02:00
Tom Hvitved
c307a12c20
Ruby: Get rid of warning in getUnknownMember
2022-08-17 16:22:11 +02:00
Alex Ford
d4d6657cb7
Merge pull request #10008 from alexrford/rb/log-injection
...
Ruby: Add `rb/log-injection` query
2022-08-17 15:01:22 +01:00
Taus
1c15fc5600
Python: Define Str as an alias of StrConst
2022-08-17 13:36:32 +00:00
erik-krogh
6b9f01535b
change All to Most in the change-notes
2022-08-17 15:34:57 +02:00
Chris Smowton
077bae55fe
Go: don't use WriteNode for channel writes
...
I overlooked the fact that this has a WriteInstruction, which wasn't bound in the channel-write case, but somehow the evaluator discarded the implied cartesian product until last night's performance evaluation.
Rather than try to cram channel writes into WriteInstruction, just handle them as their own beast.
2022-08-17 14:27:16 +01:00
Anders Schack-Mulligen
f6eccd390e
Java: Move sink-constraints into the configuration.
2022-08-17 15:06:55 +02:00
Tamas Vajk
5d01653371
Fix gradle exclude list after the version number changes
2022-08-17 15:03:37 +02:00
Mathias Vorreiter Pedersen
1eb0f6a12e
Merge pull request #10081 from erik-krogh/desugar
...
add desugered to the typo database
2022-08-17 13:56:59 +01:00
Anders Schack-Mulligen
c3ba632a32
Java: Add some type-based sanitizers to SensitiveInfoLog.ql.
2022-08-17 14:54:28 +02:00
Erik Krogh Kristensen
bd4947fdbd
Merge pull request #10046 from erik-krogh/protoFunc
...
JS: generalize `BarrierGuardFunction`to work on function that have multiple parameters
2022-08-17 14:50:54 +02:00
Anders Schack-Mulligen
6e495ba6e5
Merge pull request #10068 from aschackmull/java/summarizedcallable-split
...
Java: Make synthesized method bodies disjoint from source code.
2022-08-17 14:13:56 +02:00
erik-krogh
2622c78766
add change-notes
2022-08-17 13:55:16 +02:00
erik-krogh
14d83ab1b5
make the framework imports in FlowSources.qll private
2022-08-17 13:50:08 +02:00
erik-krogh
8066e39d07
delete some redundant imports
2022-08-17 13:50:04 +02:00
Tom Hvitved
355c1f5959
Merge pull request #10035 from hvitved/ssa/phi-reads
...
SSA: Improve use-use calculation using "phi read nodes"
2022-08-17 13:43:00 +02:00
erik-krogh
dbbba32579
revert change to generated swift code
2022-08-17 13:34:22 +02:00
erik-krogh
b7b80fe176
reintroduce redundant cast in synced file
2022-08-17 13:34:22 +02:00
erik-krogh
ffb65d054e
delete redundant inline casts
2022-08-17 13:34:22 +02:00
erik-krogh
2e44fba67d
add explicit this
2022-08-17 13:33:31 +02:00
erik-krogh
b9823cf335
fix ql/could-be-cast
2022-08-17 13:33:31 +02:00
erik-krogh
b2e3d8bb86
remove some more legacy code that existed to support deprecated code
2022-08-17 13:32:39 +02:00
erik-krogh
6ac898bad4
add desugered to the typo database
2022-08-17 13:13:43 +02:00
Ian Lynagh
0d4419dd8c
Merge pull request #10071 from igfoo/igfoo/refactor
...
Kotlin: Refactor TypeResults
2022-08-17 11:58:33 +01:00
Joe Farebrother
5d00b871d4
Correct node type
2022-08-17 11:58:11 +01:00
Joe Farebrother
2bc2649204
Merge pull request #9853 from joefarebrother/static-init-vec
...
Java: Promote Static Initialization Vector query
2022-08-17 11:56:00 +01:00
Nick Rolfe
61db581512
Merge pull request #10080 from github/nickrolfe/desugared-typo
...
Ruby: fix typo: s/Desugered/Desugared
2022-08-17 11:54:15 +01:00
Anders Schack-Mulligen
c034a1e268
Java: Fix test.
2022-08-17 12:46:35 +02:00
Anders Schack-Mulligen
27f76330be
Java: Fix models.
2022-08-17 12:46:09 +02:00
Anders Schack-Mulligen
857b473503
Java: Delete duplicate tests.
2022-08-17 12:44:42 +02:00
Nick Rolfe
94a51142d0
Ruby: fix typo in internal predicate name
2022-08-17 11:05:39 +01:00
Tamas Vajk
abc4405221
Kotlin: Change version numbers
2022-08-17 11:57:33 +02:00
Tamas Vajk
f12c73f472
Kotlin: Add support for version 1.7.20-Beta
2022-08-17 11:57:33 +02:00
Tom Hvitved
d8f7861ab1
C#: Include both source code and hand-written summaries in data flow
...
Still, generated summaries are only included when there is no source code.
2022-08-17 11:57:24 +02:00
Erik Krogh Kristensen
47353f6c28
Merge pull request #10067 from erik-krogh/paramSig
...
QL: support signature parameters in QL-for-QL
2022-08-17 11:50:39 +02:00
Joe Farebrother
de69827711
Use a full dataflow config rather than local flow
2022-08-17 10:35:48 +01:00
Joe Farebrother
fe5a61bdde
Fix typos in docs and comments
2022-08-17 10:35:48 +01:00
Joe Farebrother
c77b17574a
Use CryptoAlgoSpec rather than hadcoding Cipher.getInstance
2022-08-17 10:35:47 +01:00
Joe Farebrother
08b77493d2
Add security severity and change note
2022-08-17 10:35:47 +01:00
Joe Farebrother
9ae652dd6a
Add tests
2022-08-17 10:35:47 +01:00
Joe Farebrother
41bdd6d4cc
Add RSA without OEAP query and qhelp
2022-08-17 10:35:46 +01:00
Joe Farebrother
7c188a6b96
Apply doc suggestions
2022-08-17 10:35:16 +01:00
Joe Farebrother
7989ba3391
Replace a tainttracking instance with local flow
2022-08-17 10:35:16 +01:00
Joe Farebrother
5afc0b0c15
Add security severity
2022-08-17 10:35:15 +01:00
Joe Farebrother
bf32b5a8fd
Reiview suggestions - add doc comment, reword description, simplify a part
2022-08-17 10:35:15 +01:00
Joe Farebrother
a62bb8e115
Add additional test case
2022-08-17 10:35:15 +01:00
Joe Farebrother
960a4e58a0
Add change note
2022-08-17 10:35:14 +01:00
Joe Farebrother
c152a27a68
Reword docs
2022-08-17 10:35:14 +01:00
Joe Farebrother
4d0957711b
Reduce FPs from empty arrays
2022-08-17 10:35:14 +01:00
Joe Farebrother
c0a1300955
Improve initializedWthConstants to no longer need a workaround
2022-08-17 10:35:13 +01:00
Joe Farebrother
f8f21c7ee6
Move static init vector query and tests from experimental to main
2022-08-17 10:35:13 +01:00
Tom Hvitved
44e1ecdf94
Merge pull request #10060 from hvitved/ruby/pos-args-missing-flow-tests
...
Ruby: Add tests that demonstrate missing flow through positional arguments
2022-08-17 10:45:25 +02:00
Tony Torralba
1d12bd1521
Share SpringUrlRedirect library
2022-08-17 10:43:43 +02:00
Paolo Tranquilli
979706903a
Merge pull request #10070 from github/redsun82/swift-self-apply-tests
...
Swift: add more `SelfApplyExpr` testing
2022-08-17 09:34:20 +02:00
Harry Maclean
1f4dad4167
Update for rename of ReDoSUtil to NfaUtils
2022-08-17 16:03:49 +12:00
Harry Maclean
f1a546c4d6
Rename IncompleteMultiCharacterSanitization[Query]
2022-08-17 16:03:49 +12:00
Harry Maclean
e48158b9ad
JS: Share more code with Ruby
2022-08-17 16:03:49 +12:00
Harry Maclean
f2384a6a8f
Ruby: Share more code with JS
2022-08-17 16:03:49 +12:00
Harry Maclean
025e34d8e1
Ruby: Simplify imports
2022-08-17 16:03:48 +12:00
Harry Maclean
ab6287aebd
Ruby: Fix import
2022-08-17 16:03:48 +12:00
Harry Maclean
b7d9bf4066
Share IncompleteMultiCharacterSanitization JS/Ruby
...
Most of the classes and predicates in this query can be shared between
the two languages. There's just a few language-specific things that we
place in IncompleteMultiCharacterSanitizationSpecific.
2022-08-17 16:03:46 +12:00
Harry Maclean
3179c60a1e
Ruby: Remove RegExpLiteral.getAMatch
...
This predicate is a duplicate of getAMatchedString, which matches the
naming in the JS version.
2022-08-17 16:02:48 +12:00
Harry Maclean
6bb24f9d7c
Ruby: matchesEmptyString -> isNullable
...
Rename RegExpLiteral.matchesEmptyString to isNullable, to match the JS
version.
2022-08-17 16:02:48 +12:00
Harry Maclean
3fba4a5fa7
Ruby: Add change note for new query
2022-08-17 16:02:48 +12:00
Harry Maclean
c234bd94d1
Ruby: IncompleteMultiCharacterSanitization Query
...
This query is similar to IncompleteSanitization but for multi-character
sequences.
2022-08-17 16:02:48 +12:00
Harry Maclean
6e289a9db3
Ruby: Improvements to StringSubstitutionCall
...
- Handle block arguments
- Recognise patterns passed via constants
2022-08-17 16:02:48 +12:00
Harry Maclean
17dfb4e7b8
Ruby: Add RegExpTerm.getAMatch
2022-08-17 16:02:48 +12:00
Harry Maclean
c9fc43a4ba
Ruby: Add matchesEmptyString to RegExpTerm
2022-08-17 16:02:47 +12:00
Robert Marsh
56eacce320
C++: restrict to end-of-allocation pointers
2022-08-16 17:52:06 -04:00
Robert Marsh
93de8e2308
C++: fix missing bounds in exp range analysis
2022-08-16 17:44:51 -04:00
Robert Marsh
c306ba4d77
C++: one more PR comment
2022-08-16 17:44:50 -04:00
Robert Marsh
66ce9158a3
C++: respond to easy comments on ProducFlow.qll
2022-08-16 17:44:48 -04:00
Robert Marsh
0ebd7d0de5
C++: respond to PR comments
2022-08-16 17:44:47 -04:00
Robert Marsh
e4d0e7431c
C++: some experimental product flow queries
2022-08-16 17:44:46 -04:00
Robert Marsh
d0f4c2f823
C++: product flow prototype
2022-08-16 17:44:45 -04:00
erik-krogh
478e0bf5a3
delete old code that only existed to support a deleted deprecated feature
2022-08-16 23:35:48 +02:00
erik-krogh
04173b7e93
fix test that was using old code
2022-08-16 23:35:29 +02:00
erik-krogh
2c71c46282
drive-by fix a QL-for-QL warning that showed up in code-scanning
2022-08-16 22:43:10 +02:00
erik-krogh
e69f4cd1b3
delete another dead file (thanks to the dead-code query)
2022-08-16 22:42:48 +02:00
erik-krogh
42049b1c0e
delete dead code (thanks QL-for-QL)
2022-08-16 22:35:42 +02:00
erik-krogh
507e0aa164
delete import to deprecated file
2022-08-16 22:35:03 +02:00
erik-krogh
1568763eec
delete two dead predicates
2022-08-16 22:34:55 +02:00
erik-krogh
4b7f63a0f3
sync SensitiveDataHeuristics.qll to the other languages
2022-08-16 22:31:26 +02:00
erik-krogh
514f98cd44
delete entire file that was deprecated
2022-08-16 22:29:52 +02:00
erik-krogh
5586c9a17e
delete old deprecations
2022-08-16 22:27:15 +02:00
Ian Lynagh
7406915616
Kotlin: Remove some dead code
2022-08-16 17:47:12 +01:00
Ian Lynagh
7b33aebe1f
Kotlin: Refactor TypeResults
...
We statically know when we expect to have no signature, so now we tell
the type system what we know, rather than having signature always be
nullable.
2022-08-16 17:42:47 +01:00
Robert Marsh
9e0c82eabb
Merge pull request #10039 from rdmarsh2/rdmarsh2/cpp/sem-range-analysis-perf
...
C++: Fix missing bounds and performance issues in semantic range analysis
2022-08-16 12:27:02 -04:00
Paolo Tranquilli
9232b282d8
Merge pull request #9891 from github/redsun82/swift-first-prototype-of-generated-ipa-layer
...
Swift: first prototype of a generated IPA layer
2022-08-16 18:08:03 +02:00
Jeroen Ketema
8fb57149fb
Merge pull request #10069 from jketema/ir-present
...
C++: Expose `PresentIRFunction` and override in `cpp/count-ir-inconsistencies`
2022-08-16 17:59:26 +02:00
Paolo Tranquilli
f17fed7c9a
Swift: add more SelfApplyExpr testing
2022-08-16 17:46:22 +02:00
Robert Marsh
818bdcf3ab
C++: autoformat a test
2022-08-16 11:31:28 -04:00
Paolo Tranquilli
9cd2ae2fd1
Swift: rename Synth conversion functions
2022-08-16 16:54:33 +02:00
Jeroen Ketema
31aa6692cb
Sync files
2022-08-16 16:38:37 +02:00
Jeroen Ketema
243dda79d2
C++: Expose PresentIRFunction and override in cpp/count-ir-inconsistencies
...
The `toString` implementtion that `PresentIRFunction` uses may result in very
long strings that may crash the evaluator. Overriding allows is to limit the
string size and still suffices when just counting the number of inconsistencies.
2022-08-16 16:30:38 +02:00
Jami
dd23d48ad2
Merge pull request #9939 from jcogs33/android-debug-query-inline-tests
...
Java: query to detect android:debuggable attribute enabled
2022-08-16 10:07:13 -04:00
Tom Hvitved
4901deb796
Merge pull request #10004 from hvitved/csharp/mad-this-rename
...
C#: Rename `Argument[Qualifier]` to `Argument[this]` in MaD
2022-08-16 15:09:51 +02:00
Ian Lynagh
0e4066b6a8
Kotlin: Typo in comment
2022-08-16 14:09:07 +01:00
Sid Shankar
1e1e2318b7
Merge pull request #10052 from github/task/fix-broken-links
...
Docs: Replace HTTP broken links to equivalent HTTPS resources
2022-08-16 08:45:08 -04:00
yoff
e7c6c04076
Merge pull request #9858 from tausbn/python-fix-bad-getOuterVariable-join
...
Python: Fix bad join in `getOuterVariable`
2022-08-16 14:40:42 +02:00
yoff
3006fa60c6
Merge pull request #9856 from tausbn/python-fix-bad-ScopeEntryDefinition-charpred-join
...
Python: Fix bad join in `ScopeEntryDefinition`
2022-08-16 14:37:53 +02:00
Tom Hvitved
7395587244
Sync files
2022-08-16 14:07:39 +02:00
Tom Hvitved
611a6807bc
SSA: Improve use-use calculation using "phi read nodes"
2022-08-16 14:07:38 +02:00
Tom Hvitved
9a61f24e16
C#: Add SSA use-use stress test
2022-08-16 14:06:15 +02:00
Tom Hvitved
6be6d26cb5
C#: Add new SSA test
2022-08-16 14:06:15 +02:00
Paolo Tranquilli
98819f64da
Merge branch 'main' into redsun82/swift-first-prototype-of-generated-ipa-layer
2022-08-16 14:05:44 +02:00
Taus
1f5176d623
Python: Simplify class_var_scope
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-08-16 14:02:47 +02:00
erik-krogh
37f6fecf51
don't check the formatting on the test files
2022-08-16 13:49:56 +02:00
erik-krogh
3a373c508d
fix the type of the getImplements() predicate, to fix the parent-child relation in the AST
2022-08-16 13:44:43 +02:00
Taus
b17e74dfe8
Python: Simplify binding fix
...
Co-authored-by: yoff <yoff@github.com >
2022-08-16 11:41:43 +00:00
Anders Schack-Mulligen
df40ccd129
Java: Make synthesized method bodies disjoint from source code.
2022-08-16 13:36:39 +02:00
erik-krogh
232952519a
support signature parameters in QL-for-QL
2022-08-16 13:36:05 +02:00
Erik Krogh Kristensen
fd5b8896df
Merge pull request #10063 from erik-krogh/fixRbDep
...
re-deprecate ReDoSUtil in ruby
2022-08-16 13:27:52 +02:00
Tom Hvitved
e4c257db74
C#: Rename Argument[Qualifier] to Argument[this] in MaD
2022-08-16 13:24:41 +02:00
Mathias Vorreiter Pedersen
367752222f
Merge pull request #10064 from MathiasVP/fix-ssa-for-getters
...
Swift: Fix SSA for calls to getter functions
2022-08-16 12:08:08 +01:00
Alex Ford
d02ad51d74
Merge pull request #10032 from github/post-release-prep/codeql-cli-2.10.3
...
Post-release preparation for codeql-cli-2.10.3
2022-08-16 12:04:07 +01:00
Mathias Vorreiter Pedersen
cbb1108f6e
Swift: Fix SSA for calls to getter functions.
2022-08-16 11:48:46 +01:00
Ian Lynagh
c927ac9b33
Merge pull request #10048 from igfoo/igfoo/NotNullExpr
...
Kotlin: Remove not-null-expressions from KotlinUsesExtractor
2022-08-16 10:59:43 +01:00
Ian Lynagh
19c2ca8d40
Merge pull request #10049 from igfoo/igfoo/NotNullExpr2
...
Kotlin: Remove a non-null-expr
2022-08-16 10:59:33 +01:00
Asger F
449e697761
JS: Handle nested conditions in "exports" section
2022-08-16 11:45:48 +02:00
Tom Hvitved
9f5b215d49
Merge pull request #10055 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-16 11:39:04 +02:00
erik-krogh
2fbae81356
re-deprecate ReDoSUtil in ruby
2022-08-16 11:22:00 +02:00
erik-krogh
8e6a36256c
import the non-deprecated NfaUtils in the overly-large-range query
2022-08-16 11:21:43 +02:00
Geoffrey White
dd51b7f356
Swift: Add many tests.
2022-08-16 10:04:00 +01:00
Nick Rolfe
7a47551027
Merge pull request #10059 from hvitved/ruby/fix-deprecation-warning
...
Ruby: Fix deprecation warning
2022-08-16 09:50:55 +01:00
Tom Hvitved
aa93986d1a
Ruby: Add tests that demonstrate missing flow through positional arguments
2022-08-16 10:36:40 +02:00
Tom Hvitved
007d98e3b4
Ruby: Fix deprecation warning
2022-08-16 10:23:06 +02:00
Anders Schack-Mulligen
28e4224ab1
Merge pull request #10023 from aschackmull/java/numbertype-perf
...
Java: Minor perf improvement.
2022-08-16 09:52:55 +02:00
Tamás Vajk
6e57e45309
Merge pull request #10034 from tamasvajk/kotlin-build-versions-2
...
Kotlin: Change handling of version variants in build script
2022-08-16 09:38:19 +02:00
Erik Krogh Kristensen
f106e064fa
Merge pull request #9422 from erik-krogh/refacReDoS
...
Refactorizations of the ReDoS libraries
2022-08-16 09:32:08 +02:00
erik-krogh
14cfe2e250
improve the join-order of BarrierGuardFunction::isBarrierCall
2022-08-16 09:28:48 +02:00
erik-krogh
3355a7a046
generalize BarrierGuardFunctionto work on function that have multiple parameters
2022-08-16 09:13:15 +02:00
Paolo Tranquilli
5bad696b41
Swift: remove unused no-parameter constructors
2022-08-16 09:09:00 +02:00
Harry Maclean
7ef6ffbc54
Ruby: Recognise Rails render calls as HTTP responses
2022-08-16 14:03:26 +12:00
github-actions[bot]
ab9079a838
Add changed framework coverage reports
2022-08-16 00:20:20 +00:00
erik-krogh
b3adb62adb
move the pack cache to where it's read
2022-08-15 22:47:08 +02:00
erik-krogh
d38d810677
include the workflow in the cache key
2022-08-15 22:47:08 +02:00
erik-krogh
ae08130451
more threads
2022-08-15 22:47:05 +02:00
erik-krogh
427a607843
point codeql-action to the local QL-for-QL queries
2022-08-15 22:46:57 +02:00
erik-krogh
847934078c
update the version of codeql-action used by QL-for-QL
2022-08-15 22:28:05 +02:00
erik-krogh
5e53124217
don't report warning for deprecated classes/predicates
2022-08-15 21:52:34 +02:00
erik-krogh
d816f7f390
add ql/consistent-alert-message
2022-08-15 21:52:10 +02:00
Jami Cogswell
07e141c5be
added commas to help file
2022-08-15 15:50:00 -04:00
Jami Cogswell
4986cc8458
update isDebuggable predicate
2022-08-15 15:50:00 -04:00
Jami Cogswell
f529cc43bc
updated lib change note name
2022-08-15 15:50:00 -04:00
Jami Cogswell
29acce1e93
remove extraneous unit test
2022-08-15 15:50:00 -04:00
Jami Cogswell
4c2b05ce8c
adding change-note for android manifest library
2022-08-15 15:50:00 -04:00
Jami Cogswell
b779f9f935
added casting
2022-08-15 15:50:00 -04:00
Jami Cogswell
c010f92811
simplified predicates, removed overridden getFile predicate
2022-08-15 15:50:00 -04:00
Jami Cogswell
6e10fcf519
added predicates in the AndroidManifest library and adjusted tests
2022-08-15 15:50:00 -04:00
Jami Cogswell
229324fde0
updated overview section of help file; also added 'App Manifest Overview' to references
2022-08-15 15:50:00 -04:00
Jami Cogswell
3714a98403
add reference to help file
2022-08-15 15:50:00 -04:00
Jami Cogswell
ead36822be
update change note based on review comment
2022-08-15 15:50:00 -04:00
Jami Cogswell
f961540979
added change note
2022-08-15 15:50:00 -04:00
Jami Cogswell
af0a663ee8
remove commented-out code in Test.java file
2022-08-15 15:50:00 -04:00
Jami Cogswell
d1a23ad78c
updated to getRelativePath with %build%
2022-08-15 15:50:00 -04:00
Jami Cogswell
15df392fd8
updates to InlineExpectationsTest
2022-08-15 15:50:00 -04:00
Jami Cogswell
d8dbdfcd70
rename expected file, add ql file, delete qlref file
2022-08-15 15:50:00 -04:00
Jami Cogswell
8c4b98c04f
rename files
2022-08-15 15:50:00 -04:00
Jami Cogswell
475d67a4df
minor updates, removed comments
2022-08-15 15:50:00 -04:00
Jami Cogswell
e2374f816a
test commit for new branch
2022-08-15 15:50:00 -04:00
Jami Cogswell
54470c794d
updated location part of query to use abs path and /build
2022-08-15 15:49:59 -04:00
Jami Cogswell
54acd0e330
add numeric value for security-severity
2022-08-15 15:49:59 -04:00
Jami Cogswell
fdb437552c
clean up android query and tests
2022-08-15 15:49:59 -04:00
Jami Cogswell
cf39cc0909
updates to android debug query
2022-08-15 15:49:59 -04:00
Jami Cogswell
6720dba8e7
draft android debug query
2022-08-15 15:49:59 -04:00
Sid Shankar
639af0a9a3
Use Wayback Machine 🔗 for IE Conditional Comments
2022-08-15 14:45:34 -04:00
Sid Shankar
79a4ddd2ee
Fix invalid link to Ecmascript 2015 specification
2022-08-15 14:44:18 -04:00
Sid Shankar
68d1c2d3e8
Fix link to python requests documentation
...
docs.python-requests.org seems to be a suspended domain. The replacement link is to the same Python requests library on readthedocs.io, and points to the ssl-cert-verification section.
2022-08-15 14:43:28 -04:00
Sid Shankar
02cd7bc7d2
Remove reference to infosecwriters.com
...
infosecwriters.com now redirects to a completely unrelated page. The broken link was replaced with a mailing list post from Diabolical Crab (DCrab) diving into HTTP response splitting.
2022-08-15 14:41:50 -04:00
Sid Shankar
ffbb158570
Update invalid link to devx.com
2022-08-15 14:40:12 -04:00
Sid Shankar
69de832f76
Replace invalid link to blogs.msdn.com
...
Replace with link to the same article on devblogs.microsoft.com. Unfortunately, blogs.msdn.com does not automatically redirect to the new location, making this replacement necessary.
2022-08-15 14:39:26 -04:00
Paolo Tranquilli
9de5985218
Swift: fix subtracted constructors
2022-08-15 17:00:36 +02:00
Chris Smowton
79bae0caeb
Merge pull request #9999 from github/smowton/feature/golang-channel-flow
...
Go: implement conservative cross-thread dataflow
2022-08-15 15:38:15 +01:00
Paolo Tranquilli
1365d0911d
Swift: generalize synth constructors
...
Now all types get a default synth constructor.
2022-08-15 16:12:19 +02:00
Ian Lynagh
d06b3a17bb
Kotlin: Remove a non-null-expr
2022-08-15 15:01:48 +01:00
Ian Lynagh
48e6b4c01b
Kotlin: Remove another not-null-expression
2022-08-15 14:43:59 +01:00
Ian Lynagh
10463e12a7
Kotlin: Add List<T?>.requireNoNullsOrNull(): List<T>? utility
2022-08-15 14:38:09 +01:00
Asger F
eaf3aa7075
Merge pull request #10036 from asgerf/js/exports-handling
...
JS: More precise handling of "exports"
2022-08-15 15:32:00 +02:00
Ian Lynagh
d4517f1266
Kotlin: Refactor away a NotNullExpr in the extractor
2022-08-15 14:17:53 +01:00
Taus
16451654db
Merge pull request #9884 from tausbn/ql-untangle-parsers
...
QL: Untangle the various parsers
2022-08-15 15:12:30 +02:00
Paolo Tranquilli
8ba330a886
Swift: rename conversion predicates
2022-08-15 15:04:39 +02:00
Paolo Tranquilli
ace92d0958
Swift: rename Db to Raw
2022-08-15 14:54:21 +02:00
Paolo Tranquilli
9347030611
Swift: rename Ipa to Synth
2022-08-15 14:31:17 +02:00
erik-krogh
459c2a21b4
Merge branch 'main' into ql-untangle-parsers
2022-08-15 14:11:32 +02:00
erik-krogh
c652f3e3dd
update grammar after https://github.com/tree-sitter/tree-sitter-ql/pull/17 has been merged
2022-08-15 14:10:10 +02:00
Jeroen Ketema
6b94cdbd8d
Merge pull request #10047 from jketema/fix-ir-comment
...
C++: Fix block assignment evaluation order comment in IR translation
2022-08-15 14:01:48 +02:00
Chris Smowton
774e379eb1
Merge pull request #9742 from smehta23/feat/SM/java_partial_path_traversal_vulnerability
...
[JAVA] Partial Path Traversal Vuln Query
2022-08-15 12:56:16 +01:00
Erik Krogh Kristensen
0adb588fe8
Merge pull request #9712 from erik-krogh/badRange
...
JS/RB/PY/Java: add suspicious range query
2022-08-15 13:55:44 +02:00
Michael Nebel
15906338dc
Merge pull request #9923 from michaelnebel/csharp/webgoat
...
C#: SQL Injection improvements for SQLite.
2022-08-15 13:22:25 +02:00
Chris Smowton
e27d62b0b4
Fix qldoc wording
2022-08-15 12:08:14 +01:00
Chris Smowton
c40ec728c6
Remove non-ascii char
2022-08-15 12:08:14 +01:00
Chris Smowton
38c0557d90
Adjust test to moved and expanded stubs
2022-08-15 12:08:14 +01:00
Asger F
3c41f28519
JS: Use explicit this
2022-08-15 12:49:23 +02:00
Asger F
671573633b
JS: Simplify getMain()
2022-08-15 12:48:41 +02:00
Chris Smowton
9f82088f5d
Remove unnecessary casts
2022-08-15 11:47:58 +01:00
Chris Smowton
1a3dc1d6eb
Remove extra closing tag
2022-08-15 11:31:53 +01:00
Michael Nebel
79a716488b
Merge pull request #10003 from michaelnebel/csharp/stubsenum
...
C#: Stub generator improvements.
2022-08-15 12:14:06 +02:00
Asger F
80a37c5863
JS: More precise handling of "exports"
2022-08-15 11:59:40 +02:00
Jeroen Ketema
6c4685e538
C++: Fix block assignment evaluation order comment in IR translation
2022-08-15 11:58:57 +02:00
Erik Krogh Kristensen
51a724315f
Merge pull request #10017 from erik-krogh/forAwait
...
JS: support top-level for await statements
2022-08-15 11:58:56 +02:00
Ian Lynagh
09d249e5d8
Merge pull request #10038 from igfoo/igfoo/java-downgrades
...
Java: Add initial downgrades directory
2022-08-15 10:57:52 +01:00
Paolo Tranquilli
6dc90bc46c
Swift: accept test change
2022-08-15 11:53:18 +02:00
Chris Smowton
5677e38994
Style edit
2022-08-15 10:37:55 +01:00
Chris Smowton
3cf871e9e5
Apply docs suggestions
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-08-15 10:34:55 +01:00
Mathias Vorreiter Pedersen
dfde5712a3
Merge pull request #10031 from jketema/block-assign
...
C++: Handle block assignments
2022-08-15 10:29:23 +01:00
erik-krogh
a28948e836
add change note
2022-08-15 10:53:33 +02:00
Anders Schack-Mulligen
a3fb54c9de
Merge pull request #10007 from aschackmull/dataflow/source-node-identity
...
Dataflow: Fix identification of source PathNodes in the presence of source-to-source flow
2022-08-15 10:39:17 +02:00
Paolo Tranquilli
176009ca88
Merge branch 'main' into redsun82/swift-first-prototype-of-generated-ipa-layer
2022-08-15 10:18:41 +02:00
Chris Smowton
ca4ef6578d
Spelling
2022-08-13 14:37:08 +01:00
Chris Smowton
c5e46f78ec
Add change note
2022-08-13 14:29:17 +01:00
Chris Smowton
8bea2a5f6c
Add missing qldoc
2022-08-13 14:20:48 +01:00
Jeroen Ketema
40334a21ce
C++: add upgrade and downgrade scripts
2022-08-13 15:09:06 +02:00
Chris Smowton
b62e9dc92c
Convert tests to inline expectations and fix one bug revealed doing so
...
Specifically Apache sshd defines its sensitive api calls on an inherited interface, and they need to be described that way for us to pick them up.
2022-08-13 14:02:05 +01:00
Chris Smowton
ddb0846e06
Split up hardcoded creds queries, ready for conversion to inline expectations
2022-08-13 12:39:16 +01:00
Chris Smowton
0a6ccbca45
Add stubs and tests for new hardcoded-credential sinks
2022-08-13 12:39:15 +01:00
Daniel Santos
60e0f09586
Additional hardcoded credentials candidates 3rd-party api calls
2022-08-13 12:39:15 +01:00
Jeroen Ketema
cac6bd57ab
C++: Update DB scheme stats file
2022-08-13 01:01:30 +02:00
erik-krogh
3a4a3437b5
fix some QL-for-QL warnings
2022-08-12 20:38:50 +02:00
erik-krogh
b54f037424
Merge branch 'main' into refacReDoS
2022-08-12 20:28:30 +02:00
erik-krogh
b9e96fb078
sync changes to other languages
2022-08-12 20:28:12 +02:00
erik-krogh
97681ea219
simplify code after review
2022-08-12 20:27:50 +02:00
erik-krogh
3403e2f325
apply suggestions from code review
2022-08-12 20:25:55 +02:00
Robert Marsh
5450681ade
C++: Autoformat and fix a test
2022-08-12 13:49:16 -04:00
Raul Garcia
e5f5d461f4
addressing feedback from PR review
2022-08-12 10:16:10 -07:00
Jeroen Ketema
0449d914c4
C++: Add change note
2022-08-12 18:43:24 +02:00
Jeroen Ketema
4d76fd198e
C++: Handle block assignments in the IR
2022-08-12 18:43:23 +02:00
Jeroen Ketema
5c905b76b4
C++: Expose block assignment operations in the QL library
2022-08-12 18:43:23 +02:00
Jeroen Ketema
ebf8161f1b
C++: Add block assignment expression to the database schema
...
These can under some circumstances be generated by the frontend as part
of compiler generated copy constructors and assignment operators.
2022-08-12 18:43:23 +02:00
Jeroen Ketema
e1b1657cdd
C++: Remove unused abstract predicate
2022-08-12 18:43:23 +02:00
Jeroen Ketema
de142b276d
C++: Add IR test that exposes a gap in the extractor output
2022-08-12 18:43:23 +02:00
Robert Marsh
65643515ba
C++: inexact memory operands as SSA variables
...
This makes inexact memory operands into their own SSA variables in the
Semantic interface, which resolves an issue with phi nodes losing
inexact operands (e.g. the unknown-size variable for parameter
indirections).
2022-08-12 12:35:54 -04:00
Robert Marsh
3bbd333336
C++: fix missing bounds in exp range analysis
2022-08-12 12:33:45 -04:00
Robert Marsh
e6aa2de977
C++: semantic range analysis perf fixes
2022-08-12 12:28:04 -04:00
Ian Lynagh
254c166f93
Java: Add initial downgrades directory
2022-08-12 16:19:31 +01:00
Tamas Vajk
ccef2f7646
Address review comments
2022-08-12 15:25:46 +02:00
Michael Nebel
af473db067
C#: Add function pointer test case in stub generation.
2022-08-12 14:56:52 +02:00
Tamás Vajk
1d56330baa
Merge pull request #9782 from tamasvajk/cs/newtonsoft-deserialization
...
C#: Fix unsafe deserialization with `JsonConvert.DeserializeObject`
2022-08-12 14:46:41 +02:00
Tamas Vajk
451be6c32c
Kotlin: Add explicit CI version number to build script
2022-08-12 14:27:06 +02:00
Michael Nebel
e9b184fa4c
C#: Avoid multiple explicit casts in stub generator.
2022-08-12 13:34:50 +02:00
Michael Nebel
eb9057918c
C#: Manual updates to .NET Core stubs to make it compile.
2022-08-12 13:12:33 +02:00
Tamas Vajk
0bd00ce1db
Kotlin: Change handling of version variants in build script
2022-08-12 13:11:33 +02:00
Michael Nebel
b4f7e07cc1
C#: Update .NET Core stubs.
2022-08-12 13:10:08 +02:00
Michael Nebel
0c58764643
C#: Update FunctionPointer expected output with specific CallingConvention printing.
2022-08-12 13:01:15 +02:00
Michael Nebel
d3047f6293
C#: Update calling convetion QL doc to comply with standard.
2022-08-12 13:01:15 +02:00
Michael Nebel
9ae17f93da
C#: Stub generator support for function pointer types.
2022-08-12 13:01:15 +02:00
Michael Nebel
e2882f0706
C#: Re-generate stubs for the ASP.NET Core framework.
2022-08-12 13:01:15 +02:00
Michael Nebel
7c7c335b0e
C#: Update stub generator expected output.
2022-08-12 13:01:15 +02:00
Michael Nebel
b052fbf41c
C#: Add enum long type testcase.
2022-08-12 12:51:31 +02:00
Michael Nebel
f71d684a08
C#: Use explicit typing for enums in the stub generator.
2022-08-12 12:48:50 +02:00
Michael Nebel
9ff94120d8
C#: Update stub generator test(s) expected output.
2022-08-12 12:48:24 +02:00
Michael Nebel
284d88d906
C#: Update stub generator query to explicit include enum constants.
2022-08-12 12:48:24 +02:00
Michael Nebel
d023f840de
C#: Add Enum examples in stub generator test code.
2022-08-12 12:48:24 +02:00
Chris Smowton
50fb6621a9
Create 2022-08-12-cross-thread-flow.md
2022-08-12 09:00:16 +01:00
Raul Garcia
39e53a2932
Updates based on PR feedback. 1 pending change
2022-08-11 17:59:57 -07:00
Raul Garcia
0805b49914
Update csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-11 17:35:10 -07:00
Raul Garcia
6070e4f312
Update csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-11 17:31:12 -07:00
github-actions[bot]
21d0c78376
Post-release preparation for codeql-cli-2.10.3
2022-08-11 23:20:39 +00:00
Geoffrey White
c1be060ef8
Swift: Create query + test stubs.
2022-08-11 16:10:18 +01:00
Alex Ford
f30b735443
Merge pull request #10022 from github/release-prep/2.10.3
...
Release preparation for version 2.10.3
2022-08-11 13:52:43 +01:00
Anders Schack-Mulligen
a3fc463d0a
Java: Minor perf improvement.
2022-08-11 14:21:10 +02:00
Tamas Vajk
740265dc38
Add change note
2022-08-11 13:32:49 +02:00
github-actions[bot]
57c4f9145b
Release preparation for version 2.10.3
2022-08-11 11:12:15 +00:00
Erik Krogh Kristensen
73df8e4c7d
Merge pull request #9832 from erik-krogh/misspellings
...
Fix lots of misspellings
2022-08-11 12:43:26 +02:00
Jeroen Ketema
2a9af11727
Merge pull request #10021 from jketema/consistency
...
C++: Add internal metrics query for IR consistency
2022-08-11 12:39:22 +02:00
erik-krogh
2feb9db96c
re-enable consistency checks for swift
2022-08-11 12:33:03 +02:00
Erik Krogh Kristensen
9b1842b18e
use an exclusion filter in the ModConsistency predicates (consistency query is now empty)
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
160208188e
remove redundant cast
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
77277a9e1b
rename YAMLValue to YamlValue
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
ad09386c5e
add explicit this
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
79a8f96139
disable the ModConsistency::noResolve predicate for qltests
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
fcdba7ce57
speed up resolving fields
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
3005b4bfcc
cleanup the query pack after compilation, to avoid including that in the following analysis
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
c97001ede7
add support for module instantiations in import statements. Rework the import resolution logic to reuse the logic from ModuleExpr
2022-08-11 12:31:53 +02:00
Erik Krogh Kristensen
641c6b0300
re-generate bindings in the other grammars
2022-08-11 12:31:52 +02:00
Erik Krogh Kristensen
82beca6787
change the tree-sitter version constaint to ">= 0.20, < 0.21" throughout the grammars
2022-08-11 12:31:52 +02:00
Erik Krogh Kristensen
98f49e08b6
re-generate bindings in tree-sitter-ql
2022-08-11 12:31:52 +02:00
Erik Krogh Kristensen
774ae0e5da
pin the version of tree-sitter-ql-dbscheme / tree-sitter-ql
2022-08-11 12:31:52 +02:00
Erik Krogh Kristensen
1e3306d341
synchronize the version of tree-sitter-ql-yaml across the Cargo.toml files
2022-08-11 12:31:52 +02:00
Taus
41003231b0
QL: Actually match qlpack.yml files
2022-08-11 12:31:52 +02:00
Taus
a83bd4292a
QL: Update tree-sitter dependency
2022-08-11 12:31:52 +02:00
Taus
66a191e4b5
QL: Update extractor
2022-08-11 12:31:52 +02:00
Taus
395414c3cf
Update generator
2022-08-11 12:31:52 +02:00
Taus
495576c438
Use upstream tree-sitter-ql
...
This gets rid of all of the `dbscheme` and YAML bits. These will be
added in later commits. (Doing it all in one go made for an unreadable
diff.)
Also modifies `create-extractor-path.sh` to automatically install
`gh codeql` if there is no CodeQL CLI available for autoformatting.
2022-08-11 12:31:52 +02:00
erik-krogh
4cbfbfe170
add call-edge for dynamic dispatch to unknown property from an object literal
2022-08-11 12:29:50 +02:00
Geoffrey White
c62ae3b350
C++: First working. We now prefer flagging the cases where the variable was initialized, as in real world cases we haven't seen it done safely.
2022-08-11 12:27:48 +02:00
Geoffrey White
76ef779f60
C++: Add test and placeholder query.
2022-08-11 12:27:39 +02:00
Nora Dimitrijević
94c43c07c7
Update .gitignore for .vscode/*.log temporaries
...
These keep getting added, by the Makefile extension I believe.
2022-08-11 12:18:37 +02:00
Geoffrey White
2ee1979546
Merge pull request #10014 from geoffw0/inlinetaint
...
Swift: Add an inline expectations test for taint flow
2022-08-11 11:18:18 +01:00
Geoffrey White
1dcc44ff2f
Swift: taintedFromLine -> tainted.
2022-08-11 11:01:05 +01:00
Rasmus Wriedt Larsen
ff23f8ef86
Merge pull request #9855 from tausbn/python-fix-bad-scope_entry_transfer-join
...
Python: Fix bad join in scope entry transfer
2022-08-11 11:55:51 +02:00
Jeroen Ketema
5259025c67
Merge pull request #10020 from jketema/jketema/minor
...
C++: Improve QLDoc based on earlier review
2022-08-11 11:45:59 +02:00
Jeroen Ketema
c89592cda7
C++: Add internal metrics query for IR consistency
2022-08-11 11:39:52 +02:00
Jeroen Ketema
faaf1ec30d
C++: Improve QLDoc based on earlier review
2022-08-11 11:31:21 +02:00
Jeroen Ketema
a5c0fa24d7
Merge pull request #9971 from jketema/attribute-arg
...
C++: Handle all forms of constant attribute arguments
2022-08-11 11:30:18 +02:00
Jeroen Ketema
18094fb1d8
Merge pull request #10019 from erik-krogh/deleteDeadSwift
...
delete the dead TypeRepr files
2022-08-11 11:13:54 +02:00
Chris Smowton
3d4e9061a4
Merge pull request #10016 from aschackmull/java/kotlin-test-fix
...
Kotlin: Reflection test should not refer to DataFlowPrivate.
2022-08-11 10:08:38 +01:00
Tamas Vajk
7a406d8e41
C#: Fix unsafe deserialization with JsonConvert.DeserializeObject
...
Remove false positives when `JsonConvert.DeserializeObject` is called with not necessarily unsafe settings.
2022-08-11 11:00:46 +02:00
Tamas Vajk
6e6bd208b1
C#: Add test case for JsonConvert.DeserializeObject in unsafe deserialization tests
2022-08-11 11:00:23 +02:00
erik-krogh
c778b38a77
delete the dead TypeRepr files
2022-08-11 10:56:58 +02:00
Chris Smowton
e9df675f88
Autoformat ql
2022-08-11 09:55:46 +01:00
Tamas Vajk
548d7ac37d
C#: Regenerate Newtonsoft.Json test stub
...
The newly generated stubs contain the actual values of enum constants.
2022-08-11 10:52:48 +02:00
erik-krogh
a5239bc1e8
fix one more misspelling in swift
2022-08-11 10:27:20 +02:00
erik-krogh
eb6c2882f9
cleanup pack in QL-for-QL
2022-08-11 10:22:32 +02:00
erik-krogh
e7f009e879
support top-level for await statements
2022-08-11 09:53:32 +02:00
Anders Schack-Mulligen
74b05d2aa4
Kotlin: Reflection test should not refer to DataFlowPrivate.
2022-08-11 09:48:10 +02:00
Anders Schack-Mulligen
87461fece4
Merge pull request #10006 from aschackmull/java/sensitive-log-dedup
...
Java: Remove SensitiveLoggingQuery results that flow through a source.
2022-08-11 09:26:33 +02:00
Anders Schack-Mulligen
ced083be61
Merge pull request #10015 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-11 09:20:12 +02:00
Michael Nebel
b817bd43ca
Merge pull request #10005 from michaelnebel/csharp/constructorsummaries
...
C#: Constructor summaries
2022-08-11 09:16:05 +02:00
Michael Nebel
9cb4e4a61c
C#: Update release note.
2022-08-11 08:57:10 +02:00
Tom Hvitved
e106edc04e
Merge pull request #9989 from hvitved/csharp/lua-tracer-improvements2
...
C#: Handle `dotnet exec csc.dll` and the likes in the Lua tracer
2022-08-11 08:55:46 +02:00
github-actions[bot]
33ce9552cb
Add changed framework coverage reports
2022-08-11 00:17:52 +00:00
Erik Krogh Kristensen
803e079dab
fix accidental typo
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-10 23:23:32 +02:00
Erik Krogh Kristensen
a66229ee9d
update the expected output of the misspelling test
2022-08-10 23:21:41 +02:00
Erik Krogh Kristensen
887f6557ed
fix common misspellings throughout github/codeql
2022-08-10 23:21:41 +02:00
Erik Krogh Kristensen
db614bda29
generalize the ql/misspelling query to work on all kinds of comments
2022-08-10 23:21:41 +02:00
Jeroen Ketema
32a2363f85
C++: Add change note
2022-08-10 21:11:59 +02:00
Jeroen Ketema
32db845af8
C++: Add DB scheme upgrade and downgrade scripts
2022-08-10 21:11:58 +02:00
Jeroen Ketema
bdd8f2bbe9
C++: Update DB scheme stats file
2022-08-10 21:11:58 +02:00
Jeroen Ketema
8528e6b8e1
C++: Update test results for exposing attribute arguments as proper constants
2022-08-10 21:11:58 +02:00
Jeroen Ketema
b20961a065
C++: Expose constant expressions as attribute arguments
2022-08-10 21:11:58 +02:00
Jeroen Ketema
553f1c496e
C++: Update DB scheme to allow for constant expression as attribute arguments
2022-08-10 21:11:58 +02:00
Jeroen Ketema
9ae9b89529
C++: Improve accuracy of AttributeArgument.getValueText QLDoc
2022-08-10 21:11:58 +02:00
Jeroen Ketema
0e12c9d8b1
C++: Simplify this suppression for specifiers
2022-08-10 21:11:58 +02:00
Aditya Sharad
c0da29b204
Docs: Add spacing to fix list formatting
2022-08-10 11:16:41 -07:00
Geoffrey White
d16a7754e1
Swift: Take out common code.
2022-08-10 19:04:01 +01:00
Geoffrey White
d7f50eafae
Swift: Minor fixes.
2022-08-10 19:03:52 +01:00
Geoffrey White
11f45cf20c
Swift: Add expectation annotations.
2022-08-10 18:53:45 +01:00
Aditya Sharad
231178d858
Docs: Add CodeQL standard packs and bundle to CodeQL tools page
...
Include links to changelogs, releases, and source code.
2022-08-10 10:49:19 -07:00
Geoffrey White
c2ee5fe258
Swift: Add inlineExpectations test.
2022-08-10 18:47:46 +01:00
Chris Smowton
cc8e9806c4
Merge pull request #10009 from smowton/smowton/java17-options
...
Java: Adapt tests as required by JDK17 extractor upgrade
2022-08-10 18:46:06 +01:00
Chris Smowton
bf24d7886a
Accept test changes
2022-08-10 18:10:02 +01:00
Chris Smowton
341241cf43
Use SrcFloatingPointLiteral
2022-08-10 17:28:14 +01:00
Mathias Vorreiter Pedersen
56fddd75bb
Merge pull request #10000 from geoffw0/defaulttaint
...
Swift: Taint flow improvements
2022-08-10 16:30:09 +01:00
Alex Ford
7a61f59b1e
Ruby: add change note for new rb/log-injeciton query
2022-08-10 16:17:55 +01:00
Alex Ford
44c4b9ba5c
Ruby: add rb/log-injection test cases
2022-08-10 16:17:37 +01:00
Alex Ford
00e290e1f1
Ruby: document rb/log-injection
2022-08-10 16:17:18 +01:00
Alex Ford
c31995764b
Ruby: add rb/log-inection query
2022-08-10 16:16:54 +01:00
Geoffrey White
6ffe5fcaed
Swift: Comment some other cases.
2022-08-10 15:46:32 +01:00
Geoffrey White
537caf85f2
Swift: Fix cartesian product.
2022-08-10 15:46:30 +01:00
Geoffrey White
e09e64ee85
Swift: Restrict taint flow through + to strings.
2022-08-10 15:46:28 +01:00
Geoffrey White
f3499e98a4
Swift: Move try, ! to dataflow.
2022-08-10 15:13:04 +01:00
Nora Dimitrijević
cce39fb2ce
Merge pull request #9998 from d10c/use-strcpyfunction-in-bad-strncpy-size
...
Use StrcpyFunction in `cpp/bad-strncpy-size`
This PR:
- Uses the [StrcpyFunction](https://github.com/github/codeql/blob/main/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcpy.qll#L14 ) class in the [StrncpyFlippedArgs](https://github.com/github/codeql/blob/main/cpp/ql/src/Likely%20Bugs/Memory%20Management/StrncpyFlippedArgs.ql ) query instead of an ad-hoc predicate for finding strcpy-like functions.
- Tests this by adding one previously unsupported strcpy-like function (`wcsxfrm_l`) to StrncpyFlippedArgs's test.cpp.
2022-08-10 15:11:20 +02:00
Tamás Vajk
b2c22dacc2
Merge pull request #9769 from tamasvajk/fix/ctor-field-flow
...
C#: Fix dataflow for default constructors
2022-08-10 15:06:25 +02:00
Anders Schack-Mulligen
abad133ab5
Dataflow: Fix identification of source PathNodes in the presence of source-to-source flow.
2022-08-10 15:02:56 +02:00
Michael Nebel
0d83b7cbd0
C#: Add release note.
2022-08-10 14:58:22 +02:00
Anders Schack-Mulligen
cbd6d24b9c
Merge pull request #9963 from intrigus-lgtm/java/model-set-properties
...
Model `java.util.Properties.setProperty`
2022-08-10 14:51:00 +02:00
Michael Nebel
da30436c44
C#: Update flow summaries test case with new summaries.
2022-08-10 14:49:20 +02:00
Michael Nebel
c3adb990a3
C#: Update SQL Injection with testcase with found vulnerability.
2022-08-10 14:49:20 +02:00
Michael Nebel
36a713510c
C#: Add summary models for the FileStream constructor.
2022-08-10 14:49:20 +02:00
Michael Nebel
504160fee4
C#: Update expected file for Sql injection and Second Order sql injection (note that this is already a second order sql injection).
2022-08-10 14:49:20 +02:00
Michael Nebel
5c47ae3f98
C#: Add testcase for unsanitized filename used in Filestream.
2022-08-10 14:49:20 +02:00
Michael Nebel
1355931b50
C#: Update SecondOrder SQL Injection test case expected output with vulnerability from test case.
2022-08-10 14:49:19 +02:00
Michael Nebel
ced9ee5f5d
C#: Update FlowSummaries test expected output after addition of new summaries.
2022-08-10 14:49:19 +02:00
Anders Schack-Mulligen
ecc15a1f95
Java: Remove SensitiveLoggingQuery results that flow through a source.
2022-08-10 14:28:07 +02:00
Michael Nebel
736ae4f7d6
C#: Update FlowSummaries expected output.
2022-08-10 14:23:54 +02:00
Michael Nebel
5659db73d3
C#: Update alle manually written summaries for constructors to use Argument[Qualifier] instead of ReturnValue.
2022-08-10 14:17:16 +02:00
Nora Dimitrijević
60f4049388
Re-autoformat StrncpyFlippedArgs.ql
2022-08-10 14:14:42 +02:00
Chris Smowton
2abd1f77f4
Go: implement conservative cross-thread dataflow
...
Steps into captured variables are moved into jumpStep where they always should have been, and the store/load step implementation for channels is completed.
For the time being this takes a very conservative approach to identify channels that are likely connected: if there is exactly one receive site and one send site for a field, the two are presumed connected.
2022-08-10 12:44:12 +01:00
Nora Dimitrijević
05f4f98aa0
Add change note
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
8e60a4a478
Update StrncpyFlippedArgs.expected
...
Add output lines for the newly implemented test case, test.cpp/test9().
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
df419003ad
Use Strcpy.qll in StrncpyFlippedArgs.ql
...
As a result, the query gets access to more types of strncpy-like
functions, as demonstrated by test.cpp, which now "fails" (i.e. works) for the new test
cases instroduced
in the previous commit.
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
554aea1bb8
New strcpy-variant in StrncpyFlippedArgs test
...
Added wcsxfrm_l, which is not currently caught by the query,
meaning that in this case a successful
test implies missing functionality.
2022-08-10 13:42:21 +02:00
Chris Smowton
8c32758ae5
Merge pull request #9829 from smowton/smowton/fix/kotlin-underscore-parameter-names
...
Kotlin: Don't extract a name for a '_' parameter
2022-08-10 12:28:26 +01:00
yoff
b8931d36ca
python: give InterpretNode empty charpred
...
InterpreNode is going away, but we need a dummy implementation.
However, we do not need any instances, and some tests get confused.
2022-08-10 10:57:30 +00:00
Tom Hvitved
2bb9e4859f
C#: Handle dotnet exec csc.dll and the likes in the Lua tracer
2022-08-10 12:52:18 +02:00
Rasmus Wriedt Larsen
40d25cb34c
Merge pull request #9849 from tausbn/python-fix-bad-essa-getInput-join
...
Python: Fix bad join in ESSA `getInput`
2022-08-10 11:45:23 +02:00
Chris Smowton
09e4c6b66b
Add dataflow path-graph
2022-08-10 10:37:55 +01:00
Chris Smowton
2ca0b0c6b5
Inline qhelp overview
...
A <p> at the top isn't allowed, and for some reason the inclusion is required to be a valid qhelp file.
2022-08-10 10:37:48 +01:00
Michael Nebel
f1cc7bb60c
C#: Consider FileStreams StoredFlowSources and propagate taint via StreamReader.
2022-08-10 11:08:27 +02:00
Michael Nebel
2b51e03223
C#: Add SecondOrder SQL injection example, where reading from a file.
2022-08-10 11:08:27 +02:00
Michael Nebel
1e7e49a528
C#: Add relevant stubs.
2022-08-10 11:08:27 +02:00
Michael Nebel
344770f06a
C#: Update Sqlinjection test query output with new results.
2022-08-10 11:08:27 +02:00
Michael Nebel
fd67c34ee4
C#: Add sinks and summaries for adapters with tainted commands.
2022-08-10 11:08:27 +02:00
Michael Nebel
78cfb226a3
C#: Add some examples where adapter is used in conjunction with a tainted command.
2022-08-10 11:08:27 +02:00
Michael Nebel
86000f32e7
C#: Update SqlInjection query tests with new results.
2022-08-10 11:08:27 +02:00
Michael Nebel
aa13ab31e1
C#: Add SQLiteDataAdapter sinks.
2022-08-10 11:08:27 +02:00
Michael Nebel
1fb209990e
C#: Add SQLiteDataAdapter examples.
2022-08-10 11:08:27 +02:00
Michael Nebel
ce9baaa1f3
C#: Update SQLInjection query test output.
2022-08-10 11:08:27 +02:00
Michael Nebel
6f9f771f58
C#: Add SQLiteCommand sinks.
2022-08-10 11:08:27 +02:00
Michael Nebel
d42752714c
C#: Add SQLCommand examples.
2022-08-10 11:08:21 +02:00
Michael Nebel
7fc95fb49b
Merge pull request #9988 from michaelnebel/csharp/updatestubs
...
C#: Update .NET Core and ASP.NET Core Stubs.
2022-08-10 11:02:35 +02:00
yoff
75ac24a847
Merge branch 'main' into python-dataflow/flow-summaries-from-scratch
2022-08-10 10:57:59 +02:00
Rasmus Wriedt Larsen
b541103b7f
Merge pull request #9846 from tausbn/python-fix-bad-syntactic_call_count-join
...
Python: Fix bad join in `syntactic_call_count`
2022-08-10 10:09:51 +02:00
Michael Nebel
0aa64b3a8f
Merge pull request #10001 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-10 10:09:19 +02:00
Tom Hvitved
19043bdf38
Merge pull request #9976 from hvitved/ruby/hash-literal-summary-simplification
...
Ruby: Simplify flow summaries for hash literals
2022-08-10 08:57:33 +02:00
Erik Krogh Kristensen
d008975ff4
Merge pull request #9825 from erik-krogh/repeatedWord
...
QL: add ql/repeated-word query
2022-08-10 07:25:26 +02:00
github-actions[bot]
cb19ae2638
Add changed framework coverage reports
2022-08-10 00:16:31 +00:00
Harry Maclean
30ff18aec8
Merge pull request #9919 from hmac/hmac/ar-associations
...
Ruby: ActiveRecord associations
2022-08-10 11:13:39 +12:00
Esben Sparre Andreasen
0c6f28014c
Merge pull request #9821 from erik-krogh/jsQlFix
...
JS: fix some QL-for-QL warnings in JS
2022-08-09 22:06:29 +02:00
Erik Krogh Kristensen
559ec7ba56
Merge branch 'main' into repeatedWord
2022-08-09 21:22:47 +02:00
smehta23
cf68a11267
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-09 11:59:28 -07:00
smehta23
4d80fd0b00
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-09 11:59:14 -07:00
smehta23
7da07400ea
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalFromRemote.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-09 11:59:03 -07:00
smehta23
c2b670eff8
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalFromRemote.qhelp
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-09 11:58:55 -07:00
Geoffrey White
6f696ccc3c
Swift: Effect of merging with main to get the AnyTryExpr fix.
2022-08-09 19:02:59 +01:00
Geoffrey White
efcc696e6e
Merge branch 'main' into defaulttaint
2022-08-09 18:59:36 +01:00
Geoffrey White
f2fead7ec7
Merge pull request #9995 from MathiasVP/swift-cfg-for-anytry
...
Swift: CFG for `any!`
2022-08-09 18:00:28 +01:00
Geoffrey White
36f410b9f7
Swift: Move taint logic from isAdditionalTaintStep to defaultAdditionalTaintStep.
2022-08-09 17:42:28 +01:00
Geoffrey White
242dc80907
Swift: Add taint test of try.
2022-08-09 17:42:25 +01:00
Geoffrey White
3bda9af97a
Swift: Add taint test of Data.
2022-08-09 17:42:24 +01:00
Geoffrey White
42c3e29a29
Swift: Add taint test of URL.
2022-08-09 17:42:23 +01:00
Geoffrey White
068ec8ea20
Swift: More tests of taint flow through Strings.
2022-08-09 16:43:07 +01:00
Geoffrey White
0141609703
Swift: Rename test.
2022-08-09 16:41:26 +01:00
Tony Torralba
7f5fe85e2e
Merge pull request #9975 from atorralba/atorralba/asynctask-improvs
...
Java: Improve AsyncTask data flow support
2022-08-09 17:10:09 +02:00
Erik Krogh Kristensen
da4da229b1
move tests to new test location
2022-08-09 16:25:00 +02:00
Erik Krogh Kristensen
49276b1f38
Merge branch 'main' into refacReDoS
2022-08-09 16:18:46 +02:00
Mathias Vorreiter Pedersen
5ee11c3d7b
Swift: Accept test changes.
2022-08-09 15:12:42 +01:00
Mathias Vorreiter Pedersen
06fecf3869
Swift: Include 'any!' in the the CFG tree for 'any' expressions.
2022-08-09 15:12:31 +01:00
Michael Nebel
eb19090746
C#: Remove unused hand written stubs.
2022-08-09 15:23:43 +02:00
Michael Nebel
cdd1172cee
C#: Use generated stubs in the RequireSSLAspNetCore like tests and update test results with new line numbers.
2022-08-09 15:18:34 +02:00
Michael Nebel
a23be5ca3b
C#: Manually re-order the values in the CookieSecurePolicy enum.
2022-08-09 15:17:14 +02:00
Michael Nebel
98f8bed037
C#: Update CookieWithoutHttpOnlyAspNetCore tests to use generated stubs and update line numbers in test output.
2022-08-09 14:54:19 +02:00
Michael Nebel
77a321ee9a
C#: Manually re-order the values in the HttpOnlyPolicy enum.
2022-08-09 14:52:54 +02:00
Michael Nebel
d6880f059d
C#: Use generated stubs for CookieHttpOnlyFalseAspNetCore testcases and update test output with new line numbers.
2022-08-09 14:32:19 +02:00
Tom Hvitved
28c8d9b885
Ruby: Add two more hash flow tests
2022-08-09 14:17:07 +02:00
Michael Nebel
3a908ac4b8
C#: Cleanup stub project references.
2022-08-09 14:15:00 +02:00
Michael Nebel
1a2fc2b565
C#: Remove unused stubs.
2022-08-09 14:14:00 +02:00
Erik Krogh Kristensen
0abbd50ca1
apply changes based on docs review
2022-08-09 13:51:40 +02:00
Michael Nebel
3ba893dfa8
C#: Remove System.Data.SqlClient 4.8.2 stub.
2022-08-09 13:15:44 +02:00
Michael Nebel
7c68947035
C#: Update flow summaries expected out as we now include ASP.NET Core as stubs for these tests.
2022-08-09 13:08:34 +02:00
Michael Nebel
6d96da1838
C#: Use ASP.NET Core stub instead of Microsoft.Extensions.Primitives and manual written ASP.NET Core stubs.
2022-08-09 13:08:34 +02:00
Michael Nebel
63b06d50b0
C#: Delete ServiceStack 5.11.0 and related projects.
2022-08-09 13:08:34 +02:00
Michael Nebel
094dcf989e
C#: Update FlowSummaries test expected file (this is required since the .NET Runtime stubs have been updated).
2022-08-09 13:08:34 +02:00
Michael Nebel
d76b069bc5
C#: Manual changes to stubs to ensure compilation.
2022-08-09 13:08:34 +02:00
Michael Nebel
73b6697ea6
C#: Add ServiceStack 6.2.0 and friends.
2022-08-09 13:08:17 +02:00
Chris Smowton
1c6642f3fb
Format QL
2022-08-09 11:50:54 +01:00
Chris Smowton
80f5b977d6
Use sealed classes released version
2022-08-09 11:50:54 +01:00
yo-h
c46b54b9c2
Java 17: exclude non-source locations in some tests
2022-08-09 11:50:54 +01:00
yo-h
0bf7e075e5
Java 17: adjust expected test output
2022-08-09 11:50:54 +01:00
yo-h
27b699df33
Java: adjust test options for JDK 17 upgrade
2022-08-09 11:50:54 +01:00
Erik Krogh Kristensen
add9e9dac4
Merge pull request #9548 from erik-krogh/exports
...
JS: support the "exports" property in a package.json
2022-08-09 12:16:12 +02:00
Tamás Vajk
82a56608ef
Merge pull request #9992 from tamasvajk/fix/fetch-codeql-path
...
Fix path of `fetch-codeql`
2022-08-09 10:57:11 +02:00
Geoffrey White
db8a3107b3
Merge pull request #9089 from ihsinme/ihsinme-patch-87
...
CPP: Add query for CWE-125 Out-of-bounds Read with different interpretation of the string when use mbtowc
2022-08-09 09:31:32 +01:00
Tom Hvitved
975edac34e
Merge pull request #9969 from hvitved/ruby/kwargs-missing-flow
...
Ruby: Support more flow through keyword arguments
2022-08-09 09:59:57 +02:00
Michael Nebel
b90a404658
Merge pull request #9636 from michaelnebel/csharp/sinkmodelcsv
...
C#: Convert Sinks to CSV format for SymmetricAlgorithm.
2022-08-09 09:05:12 +02:00
Tamas Vajk
2cab1ed076
Fix path of fetch-codeql
2022-08-09 07:59:25 +02:00
Tom Hvitved
dd465e739b
Code review suggestion
2022-08-09 07:46:27 +02:00
Tamas Vajk
36c913061c
C#: Fix dataflow for default constructors
2022-08-09 07:46:27 +02:00
Tamas Vajk
1a92fc90e0
C#: Add test to demonstrate missing dataflow for default constructors
2022-08-09 07:46:27 +02:00
Harry Maclean
22d7b046ab
Ruby: Fix <<
2022-08-09 15:08:17 +12:00
Harry Maclean
e3115b5ed7
Ruby: Add test for other=
2022-08-09 15:08:17 +12:00
Harry Maclean
831f722402
Ruby: Make room for new test
2022-08-09 15:08:17 +12:00
Harry Maclean
58b628b6d1
Ruby: Add change note
2022-08-09 15:08:17 +12:00
Harry Maclean
dc853d9728
Ruby: Model ActiveRecord associations
2022-08-09 15:08:17 +12:00
Shyam Mehta
af92fc389b
Update PartialPathTraversalFromRemote.qhelp
2022-08-08 17:37:57 -04:00
Shyam Mehta
50b4df52f0
Fixed precision labels
2022-08-08 17:36:04 -04:00
Shyam Mehta
9d3e8ec475
Update PartialPathTraversalFromRemote.qhelp
2022-08-08 17:35:36 -04:00
smehta23
4f1bc3022c
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalFromRemote.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-08-08 17:09:43 -04:00
ihsinme
4fdf4b23bd
Update DangerousWorksWithMultibyteOrWideCharacters.ql
2022-08-08 18:46:39 +03:00
ihsinme
212b1031b2
Update DangerousWorksWithMultibyteOrWideCharacters.qhelp
2022-08-08 18:42:54 +03:00
ihsinme
7cbf79b144
Rename DangerousUseMbtowc.ql to DangerousWorksWithMultibyteOrWideCharacters.ql
2022-08-08 18:39:41 +03:00
ihsinme
9b5154f878
Update and rename DangerousUseMbtowc.qlref to DangerousWorksWithMultibyteOrWideCharacters.qlref
2022-08-08 18:39:10 +03:00
ihsinme
bce395f201
Rename DangerousUseMbtowc.expected to DangerousWorksWithMultibyteOrWideCharacters.expected
2022-08-08 18:38:24 +03:00
ihsinme
ef04b8f5b3
Rename DangerousUseMbtowc.qhelp to DangerousWorksWithMultibyteOrWideCharacters.qhelp
2022-08-08 18:37:15 +03:00
ihsinme
5ee499389e
Rename DangerousUseMbtowc.cpp to DangerousWorksWithMultibyteOrWideCharacters.cpp
2022-08-08 18:36:53 +03:00
ihsinme
02bea35da2
Update DangerousUseMbtowc.qhelp
2022-08-08 18:35:25 +03:00
Asger F
fdcb1fa115
Merge pull request #9928 from asgerf/js/source-node-type
...
JS: Simplify type hierarchy for SourceNode
2022-08-08 16:53:20 +02:00
Esben Sparre Andreasen
ab3d365ddb
Merge pull request #9535 from github/js-array-filter-taint-step
...
Tests for rebased 7010
2022-08-08 14:31:22 +02:00
Tom Hvitved
9268437a58
Ruby: Generalize SynthHashSplatParameterNode to also work for synthesized methods
2022-08-08 14:05:06 +02:00
Michael Nebel
6febbc5966
C#: Update .NET Core and ASP.NET Core.
2022-08-08 13:29:20 +02:00
Ian Lynagh
b5d6258e54
Merge pull request #9809 from igfoo/igfoo/fakeLabel
...
Kotlin: Remove the last uses of fakeLabel
2022-08-08 11:54:53 +01:00
yoff
20febb6edd
Merge pull request #9567 from RasmusWL/typetracker-decorators
...
Python: allow class decorators in `.getASubclass()`
2022-08-08 12:42:27 +02:00
Esben Sparre Andreasen
da44340334
formatting
2022-08-08 12:22:41 +02:00
Edoardo Pirovano
d3ec8a8ec3
Merge pull request #9949 from github/edoardo/trap-cache-config
...
JS: Change how TRAP cache is configured
2022-08-08 11:19:31 +01:00
Rasmus Wriedt Larsen
f89b32183f
Merge branch 'main' into typetracker-decorators
2022-08-08 11:52:09 +02:00
Edoardo Pirovano
5c3d39579a
JS: Change how TRAP cache is configured
2022-08-08 10:25:50 +01:00
Esben Sparre Andreasen
a3cf81d419
js: add filter taint test (post rebase conflicts)
2022-08-08 11:00:11 +02:00
Evgenii Protsenko
50264547bf
make array taint-step better
2022-08-08 11:00:11 +02:00
Anders Schack-Mulligen
aa3655678e
Merge pull request #9823 from aschackmull/dataflow/stage-module
...
Dataflow: Replace stage duplication with parameterised modules.
2022-08-08 10:56:32 +02:00
Tom Hvitved
d16a154f9e
Address review comment
2022-08-08 10:45:55 +02:00
Michael Nebel
cebd49af9d
Merge pull request #9968 from michaelnebel/csharp/aspreviewcomment
...
C#: Simplification of AspNetCoreRemoteFlowSourceMember.
2022-08-08 09:44:02 +02:00
Tony Torralba
98b930cd67
Accept test changes in experimental query after AsyncTask improvements
2022-08-08 09:23:12 +02:00
Tom Hvitved
27e89cbbb1
Merge pull request #9980 from hvitved/csharp/lua-tracer-improvements
...
C#: Also disable shared compilation in the tracer for `dotnet msbuild`
2022-08-08 08:57:52 +02:00
Joe Farebrother
d2007bcd6e
Merge pull request #9663 from joefarebrother/android-certificate-validation
...
Java: Add query for improper webview certificate validation
2022-08-05 20:49:15 +01:00
Mathias Vorreiter Pedersen
f2767eb03a
Merge pull request #9972 from MathiasVP/swift-taint-through-interpolated-strings
...
Swift: Taint through interpolated strings
2022-08-05 15:55:35 +01:00
Robert Marsh
10710e27df
Merge pull request #9978 from MathiasVP/swift-fix-mad
...
Swift: Fix flow summaries for methods
2022-08-05 09:53:16 -04:00
Tony Torralba
03b854a1ed
Add test for initializer method
2022-08-05 15:29:17 +02:00
Mathias Vorreiter Pedersen
6cfeb24d94
Swift: More comments.
2022-08-05 13:30:45 +01:00
Tom Hvitved
400071091c
C#: Also disable shared compilation in the tracer for dotnet msbuild
2022-08-05 14:17:16 +02:00
AlexDenisov
d3e5449e3b
Merge pull request #9979 from MathiasVP/add-inline-expectations-framework-to-Swift
...
Swift: Add InlineExpectationsTest framework
2022-08-05 14:10:41 +02:00
Joe Farebrother
dd83c17144
Use more precise control flow logic
2022-08-05 12:56:21 +01:00
Joe Farebrother
e9f9e681ef
Change man-in-the-middle back to machine-in-the-middle
...
(gender-neutral language)
This reverts commit d5ab330450d3f5c1d36d0d9b6a8f1dc32bc908e3.
2022-08-05 12:56:21 +01:00
Joe Farebrother
79b1f24133
Change machine-in-the-middle to man-in-the-middle
2022-08-05 12:56:20 +01:00
Joe Farebrother
04df556861
Add suggested reference
2022-08-05 12:56:20 +01:00
Joe Farebrother
abf894a64c
Fix typos
2022-08-05 12:56:20 +01:00
Joe Farebrother
03c2a0e818
Add missing qldoc
2022-08-05 12:56:20 +01:00
Joe Farebrother
0d09484efc
Add change note
2022-08-05 12:56:19 +01:00
Joe Farebrother
f8ccbcba70
Add qhelp
2022-08-05 12:56:19 +01:00
Joe Farebrother
a2245bb858
Fix test
2022-08-05 12:56:19 +01:00
Joe Farebrother
498ad230c2
Update stubs
2022-08-05 12:56:19 +01:00
Joe Farebrother
c4de158e0d
Add tests
2022-08-05 12:56:18 +01:00
Joe Farebrother
16e16f08dc
Add webview cert validation query
2022-08-05 12:56:18 +01:00
Mathias Vorreiter Pedersen
b20b0a091d
Update identical-files.
2022-08-05 11:49:36 +01:00
Mathias Vorreiter Pedersen
46ec7a9b82
Swift: Add the InlineExpectationsTest framework.
2022-08-05 11:49:15 +01:00
Mathias Vorreiter Pedersen
69564d2192
Swift: Add a couple of standard Comment subclasses.
2022-08-05 11:48:29 +01:00
Tony Torralba
b75b073dae
Remove unused class member
2022-08-05 12:21:22 +02:00
Mathias Vorreiter Pedersen
946b8c68a6
Swift: Accept test changes.
2022-08-05 11:19:00 +01:00
Mathias Vorreiter Pedersen
a302570349
Merge branch 'main' into swift-taint-through-interpolated-strings
2022-08-05 11:17:54 +01:00
AlexDenisov
a779f0e376
Merge pull request #9977 from github/alexdenisov/extract-swift-comments
...
Swift: extract comments
2022-08-05 12:15:56 +02:00
Mathias Vorreiter Pedersen
24c9ab8015
Swift: Fix MaD for methods
2022-08-05 10:52:28 +01:00
Alex Denisov
5e69adb0a9
Swift: extract comments
2022-08-05 11:50:48 +02:00
Mathias Vorreiter Pedersen
1c8090fa04
Merge pull request #9964 from geoffw0/cwe95
...
Swift: Query for CWE-79 / CWE-95
2022-08-05 10:38:33 +01:00
Geoffrey White
1ce06accbd
Swift: Fix capitalization issue?
2022-08-05 10:20:51 +01:00
Mathias Vorreiter Pedersen
ac26371de0
Merge pull request #9909 from geoffw0/stringlengthconflation6
...
Swift: Understand String.utf8.count etc in the string length conflation CVE query
2022-08-05 10:13:25 +01:00
Tony Torralba
9ee90f8022
Remove unnecessary import from test
2022-08-05 11:11:13 +02:00
Tony Torralba
792d34c3a1
Add change note
2022-08-05 11:10:09 +02:00
Anders Schack-Mulligen
3d47875b60
Dataflow: Generate shorter RA/DIL names.
2022-08-05 11:00:56 +02:00
Anders Schack-Mulligen
d3dcc3ce3a
Dataflow: Sync.
2022-08-05 11:00:56 +02:00
Anders Schack-Mulligen
09d0f8e0ce
Dataflow: Replace stage duplication with parameterised modules.
2022-08-05 11:00:56 +02:00
Tom Hvitved
56ee07e24c
Merge pull request #9936 from aibaars/gh-codeql-nightly
...
Use 'gh codeql' with the nightly release for CI jobs
2022-08-05 10:34:39 +02:00
Tony Torralba
5ebce6ee4f
Improve AsyncTask data flow support
...
Model the life-cycle described here: https://developer.android.com/reference/android/os/AsyncTask\#the-4-steps
2022-08-05 10:29:49 +02:00
Tom Hvitved
e0dadb4df6
Ruby: Simplify flow summaries for hash literals
2022-08-05 10:20:07 +02:00
Jeroen Ketema
ba2cee07a9
Merge pull request #8596 from rdmarsh2/rdmarsh2/dataflow-global-vars
...
C++: IR data flow through global variables
2022-08-05 10:07:00 +02:00
Anders Schack-Mulligen
1fde06c0a8
Merge pull request #9970 from aschackmull/java/confusingoverload-perf
...
Java: Improve performance of ConfusingOverloading.
2022-08-05 09:38:22 +02:00
Harry Maclean
74d529d3e3
Merge pull request #9918 from hmac/hmac/mime-type-match
...
Ruby: Model Mime::Type
2022-08-05 11:51:45 +12:00
Harry Maclean
157bbccf62
Merge pull request #9851 from hmac/hmac/active-record-improvements
...
Ruby: Recognise more AR write accesses
2022-08-05 11:49:50 +12:00
Mathias Vorreiter Pedersen
2f13c65ad7
Update swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-08-04 22:45:45 +01:00
Mathias Vorreiter Pedersen
05e6dd85d4
Swift: Add taint tests for flow through interpolated strings.
2022-08-04 21:57:05 +01:00
Mathias Vorreiter Pedersen
9c48ce1bf2
Swift: Flow (1) through the internal function calls generated by the compiler during string interpolation, and (2) out of the internal 'TapExpr' and into the interpolated string result.
2022-08-04 21:57:05 +01:00
Mathias Vorreiter Pedersen
52b78b6e68
Swift: Don't assume we know the call target statically in 'TInOutUpdateNode'.
2022-08-04 21:57:04 +01:00
Mathias Vorreiter Pedersen
ff6b8c5c9c
Swift: Replace 'CallExpr' with 'ApplyExpr'. This is needed because not all the calls inside the interpolated string computations are 'CallExpr's.
2022-08-04 21:57:04 +01:00
Mathias Vorreiter Pedersen
3028b80e46
Swift: Control-flow through interpolated strings.
2022-08-04 21:57:04 +01:00
Tom Hvitved
6fa1e06afb
Merge pull request #9966 from hvitved/csharp/no-clr-tracer
...
C#: Disable CLR tracer
2022-08-04 20:50:19 +02:00
intrigus
b7d94906bf
Add change note
2022-08-04 16:21:55 +02:00
intrigus
88ded4679a
Accept test changes
2022-08-04 16:21:53 +02:00
intrigus
c867a1a146
Test setProperty/put with taint stored earlier
2022-08-04 16:21:51 +02:00
intrigus
0b7f0fbe54
Accept test changes
2022-08-04 16:21:50 +02:00
intrigus
55618adf6a
Model java.util.Properties.setProperty
2022-08-04 16:21:48 +02:00
Tom Hvitved
01c0d4b59f
Ruby: Support more flow through keyword arguments
2022-08-04 16:20:08 +02:00
Anders Schack-Mulligen
43d4324f65
Java: Improve performance of ConfusingOverloading.
2022-08-04 16:05:30 +02:00
Tom Hvitved
38ede25385
Ruby: Add test that illustrates missing flow for keyword arguments
2022-08-04 14:39:22 +02:00
Michael Nebel
64e8660904
C#: Simplification of AspNetCoreRemoteFlowSourceMember.
2022-08-04 14:18:25 +02:00
Tom Hvitved
bc6a74b4dd
C#: Disable CLR tracer
...
Also remove old tracer configs, as we now use the Lua tracer.
2022-08-04 13:11:07 +02:00
mc
935def739c
Merge pull request #9955 from securingdev/patch-1
...
Update Other section with example exit code details
2022-08-04 10:26:45 +01:00
mc
df1633a838
Merge branch 'main' into patch-1
2022-08-04 10:13:23 +01:00
Anders Schack-Mulligen
a5a58f46eb
Merge pull request #9945 from aschackmull/java/wrappedinvocation-joinorder
...
Java: Improve join-order.
2022-08-04 11:12:23 +02:00
mc
360cff9c24
Merge branch 'main' into patch-1
2022-08-04 10:08:55 +01:00
Anders Schack-Mulligen
c2b99747d4
Merge pull request #9951 from aschackmull/java/notintersect-perf
...
Java: Improve join-order for `not haveIntersection`.
2022-08-04 11:08:02 +02:00
mc
8905df9abb
Merge branch 'main' into patch-1
2022-08-04 10:06:01 +01:00
mc
e4c9f8a9a2
Update docs/codeql/codeql-cli/exit-codes.rst
2022-08-04 10:05:52 +01:00
Chris Smowton
96091e4fa0
Merge pull request #9947 from github/smowton/fix/golang-path-injection-numeric-sanitizer
...
Go: note that numeric-typed nodes can't cause path traversal
2022-08-04 09:00:34 +01:00
Chris Smowton
af274354a0
Merge pull request #9956 from github/smowton/feature/tainted-path-query-mad
...
Make java/path-injection recognise create-file MaD sinks
2022-08-04 08:59:59 +01:00
Harry Maclean
ee9e6b1f2e
Ruby: Add change note
2022-08-04 17:27:34 +12:00
Harry Maclean
452811dbf2
Ruby: move change note
2022-08-04 17:25:55 +12:00
Harry Maclean
83393dc195
Ruby: Recognise more AR write accesses
...
This change means we recognise calls like
```rb
User.create(params)
User.update(id, params)
```
as instances of `PersistentWriteAccess`.
2022-08-04 17:22:46 +12:00
Harry Maclean
21b4918904
Ruby: Add getPositionalArgument
...
This gets positional arguments from a call. These are arguments which
are not keyword arguments.
2022-08-04 17:22:46 +12:00
Harry Maclean
d4f7f2b75e
Ruby: Add test for AR PersistentWriteAccesses
2022-08-04 17:22:46 +12:00
Harry Maclean
7ed81db32d
Ruby: Move ActiveRecord tests to new directory
2022-08-04 17:22:46 +12:00
Harry Maclean
def1b3c3b3
Ruby: QLDoc fix
2022-08-04 17:21:29 +12:00
Harry Maclean
fdbe16945f
Ruby: Add change note
2022-08-04 17:19:05 +12:00
Shyam Mehta
76cecc170e
Fix documentation
2022-08-03 14:30:17 -04:00
Geoffrey White
997068a9cb
Swift: Fix a suggestion merge conflict.
2022-08-03 18:16:31 +01:00
Geoffrey White
873c62ef78
Swift: Apply another code review suggestion.
2022-08-03 18:16:01 +01:00
Geoffrey White
e4dab17318
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-08-03 18:14:14 +01:00
Geoffrey White
9d49986345
Swift: Make QL-for-QL happy.
2022-08-03 17:18:57 +01:00
Mathias Vorreiter Pedersen
9355f9132e
Merge pull request #9961 from MathiasVP/swift-cache-lastRefRedef
...
Swift: Cache `lastRefRedef`
2022-08-03 15:43:35 +01:00
Alex Ford
33fbec1174
Merge pull request #9917 from github/post-release-prep/codeql-cli-2.10.2
...
Post-release preparation for codeql-cli-2.10.2
2022-08-03 15:17:00 +01:00
Mathias Vorreiter Pedersen
97bd007592
Merge pull request #9962 from intrigus-lgtm/patch-7
...
C: Add additional reference to CERT C coding standard
2022-08-03 15:00:33 +01:00
Geoffrey White
39f1352847
Swift: Complete the rename.
2022-08-03 14:45:20 +01:00
Geoffrey White
81bd61288c
Swift: I think CWE-079 is the more accurate CWE for this query.
2022-08-03 14:45:19 +01:00
Geoffrey White
c635895644
Swift: Documentation.
2022-08-03 14:45:18 +01:00
Alex Ford
440547c958
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-03 13:44:37 +01:00
Arthur Baars
912dce3ea7
Merge branch 'main' into gh-codeql-nightly
2022-08-03 14:43:07 +02:00
Arthur Baars
e23a45d02c
Merge pull request #9959 from aibaars/order-order
...
Ruby: PrintAST: more stable order for synthesized nodes
2022-08-03 14:42:42 +02:00
intrigus-lgtm
c59e6586f7
Add additional reference to CERT C coding standard
2022-08-03 14:19:53 +02:00
Mathias Vorreiter Pedersen
be7ba925f9
Swift: Cache 'lastRefRedef'.
2022-08-03 11:14:55 +01:00
Arthur Baars
35f7fdf24b
Update ruby/ql/lib/codeql/ruby/printAst.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-03 12:06:47 +02:00
Chris Smowton
977823bd76
Create 2022-08-03-tainted-path-mad.md
2022-08-03 10:54:35 +01:00
Chris Smowton
84a4b6a866
Make reporting locations consistent with PathCreation; add test
2022-08-03 10:42:09 +01:00
Geoffrey White
8d9653a999
Swift: Generated security-severity tag.
2022-08-03 09:54:54 +01:00
Geoffrey White
ea17b852b4
Swift: Explain ExternalRemoteFlowSource.
2022-08-03 09:42:51 +01:00
Geoffrey White
651b73e21e
Swift: Check for tainted baseURL.
2022-08-03 09:42:48 +01:00
Rasmus Wriedt Larsen
8fb85a98d8
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-03 10:42:02 +02:00
Mathias Vorreiter Pedersen
c582d17350
Merge pull request #9952 from MathiasVP/speedup-return-stack-allocated-memory
...
C++: Speedup `cpp/return-stack-allocated-memory`
2022-08-03 09:41:38 +01:00
Geoffrey White
53ea65b045
Swift: Implement query.
2022-08-03 09:41:28 +01:00
Chris Smowton
e04c77ce15
Rename sanitizer
2022-08-03 09:37:20 +01:00
Geoffrey White
2d76d6d51a
Swift: Tests for CWE-95.
2022-08-03 09:36:22 +01:00
Chris Smowton
03fa5d8ed0
Merge pull request #9960 from RasmusWL/fix-qltest
...
Python: Accept `.expected` for TarSlip
2022-08-03 09:28:47 +01:00
Chris Smowton
83498f58db
Add missing import
2022-08-03 08:53:43 +01:00
Rasmus Wriedt Larsen
3d0c23e441
Python: Accept .expected for TarSlip
...
Changed after merging https://github.com/github/codeql/pull/9579 ,
which improved our handling of `not` for guards.
2022-08-03 09:52:11 +02:00
Arthur Baars
d8592a2b05
Ruby: PrintAST: more stable order for synthesized nodes
2022-08-03 09:02:38 +02:00
Anders Schack-Mulligen
d9ae4605c1
Merge pull request #9948 from aschackmull/java/samenameassuper-perf
...
Java: Fix join-order in SameNameAsSuper.
2022-08-03 08:04:30 +02:00
Chris Smowton
81f3bcd802
Don't require a PathCreation for every tainted-path sink
2022-08-02 21:30:06 +01:00
Chris Smowton
c95f17fdf2
Make java/path-injection recognise create-file MaD sinks
2022-08-02 21:28:00 +01:00
Alex Ford
8e3548efb3
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-02 20:29:26 +01:00
Arthur Baars
759fd6cc0b
Use 'gh codeql' with the nightly release for CI jobs
2022-08-02 17:01:20 +02:00
Arthur Baars
0be625f396
Merge pull request #9954 from aibaars/fix-triggers
...
CI: fix path triggers
2022-08-02 17:00:23 +02:00
Jeroen Ketema
a63df8fee9
Merge pull request #9930 from jketema/templ-var
...
C++: Update test for indexing of static template variable template arguments
2022-08-02 16:59:56 +02:00
Keith Hoodlet
b21fa0e2b0
Update Other section with example exit code
...
Add troubleshooting steps to remediate issues with the kernel killing a process.
2022-08-02 10:49:45 -04:00
Arthur Baars
64704057cb
CI: fix path triggers
2022-08-02 16:33:21 +02:00
Arthur Baars
55e15540f6
Merge pull request #9943 from aibaars/gh-codeql-follow-up
...
CI: remove unneeded PATH definitions
2022-08-02 16:22:18 +02:00
Mathias Vorreiter Pedersen
f385041ab3
C++: Add change note.
2022-08-02 14:07:22 +01:00
Mathias Vorreiter Pedersen
5181cc1295
C++: Add a 'allowInterproceduralFlow' predicate to the 'MustFlow' library to and use it instead of checking the enclosing callables after computing the dataflow graph.
2022-08-02 13:43:01 +01:00
Anders Schack-Mulligen
aabdf84300
Java: Improve join-order for not haveIntersection.
2022-08-02 14:29:03 +02:00
Anders Schack-Mulligen
80bba605e3
Java: Fix join-order in SameNameAsSuper.
2022-08-02 12:49:21 +02:00
Chris Smowton
e04a9b5805
Add change note
2022-08-02 11:37:27 +01:00
Chris Smowton
13b2b7674d
Go: note that numeric-typed nodes can't cause path traversal
2022-08-02 11:28:28 +01:00
Geoffrey White
bada5bf7c1
Swift: Placeholder query + docs for CWE-95.
2022-08-02 10:47:06 +01:00
Jeroen Ketema
34de4000ac
Merge pull request #9941 from MathiasVP/swift-taint-tracking
...
Swift: Add 'TaintTracking.qll'
2022-08-02 10:15:21 +02:00
Anders Schack-Mulligen
cd356a5ac1
Java: Improve join-order.
2022-08-02 08:49:58 +02:00
Robert Marsh
3007c96c72
C++: fix a nit
2022-08-01 15:34:03 -04:00
Robert Marsh
f0697ff28b
C++: fix QL4QL warnings
2022-08-01 15:23:59 -04:00
Robert Marsh
6dbaae6bfc
Merge branch 'main' into rdmarsh2/dataflow-global-vars
2022-08-01 14:56:24 -04:00
Robert Marsh
4f8373f577
Merge branch 'main' into rdmarsh2/dataflow-global-vars
2022-08-01 14:55:45 -04:00
Jeroen Ketema
b906c1a6b7
Merge pull request #9942 from MathiasVP/remove-microsoft-tags
...
C++: Remove internal `microsoft` tags from queries
2022-08-01 19:25:35 +02:00
Arthur Baars
c63afbf7be
CI: remove left-over 'env' commands
2022-08-01 18:49:37 +02:00
Arthur Baars
a63c168822
Merge pull request #9938 from aibaars/gh-codeql-ci
...
CI: make all jobs that fetch a CodeQL CLI use the fetch-codeql action
2022-08-01 18:36:50 +02:00
Mathias Vorreiter Pedersen
e3cb7cf9fe
C++: Remove internal 'microsoft' tags from queries.
2022-08-01 17:30:23 +01:00
Arthur Baars
7dc3d7d47e
CI: remove unneeded PATH definitions
2022-08-01 18:17:04 +02:00
Mathias Vorreiter Pedersen
e29676af72
Swift: Add 'TaintTracking.qll'.
2022-08-01 16:48:02 +01:00
Michael Nebel
02165e8ee1
Merge pull request #9327 from michaelnebel/csharp/dotnetruntimerefresh
...
C#: Re-create summary models and include source and sink models as well.
2022-08-01 16:15:54 +02:00
Arthur Baars
4d35d8da48
CI: fix Ruby build job
2022-08-01 16:15:04 +02:00
Arthur Baars
29381dc264
Use fetch-codeql in more places
2022-08-01 15:43:22 +02:00
Arthur Baars
2bbd2f36c9
Fix .github/workflows/query-list.yml
2022-08-01 12:56:07 +02:00
Arthur Baars
3b8eeb09bf
Add fetch-codeql path to Actions triggers
2022-08-01 12:56:06 +02:00
Arthur Baars
bc05cdaa4d
Implement fetch-codeql using 'gh codeql'
2022-08-01 12:55:35 +02:00
Rasmus Wriedt Larsen
1737d08145
Merge pull request #9579 from yoff/python/more-logic-tests
...
Python: Improve `BarrierGuard`
2022-08-01 11:36:11 +02:00
AlexDenisov
b5d4a2d462
Merge pull request #9926 from github/redsun82/swift-extract-module-type
...
Swift: extract `ModuleType`
2022-08-01 10:33:33 +02:00
AlexDenisov
ed67fb0933
Merge pull request #9927 from github/redsun82/swift-pcm-inconsistencies-workaround
...
Swift: append clang module names in trap keys
2022-08-01 10:33:18 +02:00
ihsinme
96e220588e
Update DangerousUseMbtowc.ql
2022-07-31 13:44:50 +03:00
Jeroen Ketema
c02e7a4896
C++: Update test for indexing of static template variable template arguments
2022-07-31 09:58:29 +02:00
Raul Garcia
5a7b6532a9
Updated to handle lambda statements (previously false negatives) + a couple of bug fixes.
2022-07-29 13:47:53 -07:00
Asger F
98a9cb0b55
JS: Simplify type hierarchy for SourceNode
...
The charpred caused spurious type to appear
2022-07-29 19:44:10 +02:00
Jeroen Ketema
b50f4bc1a8
Merge pull request #9903 from jketema/builtin
...
C++: Support additional compiler builtin operations
2022-07-29 17:20:19 +02:00
Paolo Tranquilli
4ce100f9a3
Swift: append clang module names in trap keys
...
We have found out there can be separate declarations (`VarDecl` or
`AccessorDecl`) which are effectively the same (with equal mangled name)
but come from different clang modules. This is the case for example
for glibc constants like `L_SET` that appear in both `SwiftGlibc` and
`CDispatch`.
In this patch, we simply avoid full deduplication in that case by
appending the module name to the trap key for non-swift modules.
A more solid solution should be found in the future.
2022-07-29 16:56:51 +02:00
Paolo Tranquilli
45e14c96f2
Swift: extract ModuleType
2022-07-29 16:48:45 +02:00
Paolo Tranquilli
13f2cf9003
Merge pull request #9922 from github/redsun82/swift-precompiled-modules-are-not-extracted
...
Swift: extract precompiled swiftmodule files
2022-07-29 16:43:34 +02:00
Paolo Tranquilli
daf1fa3c31
Swift: lock built swiftmodule traps in main
...
This should cover `-merge-modules` mode.
Dumping of the configuration to the target files was moved to a
separate pair of header/source files, as now it is also done in
`SwiftOutputRewrite.cpp`.
2022-07-29 16:27:55 +02:00
Paolo Tranquilli
405d0fcd54
Merge branch 'main' into redsun82/swift-precompiled-modules-are-not-extracted
2022-07-29 15:57:52 +02:00
Tony Torralba
593ce01362
Merge pull request #9908 from atorralba/atorralba/xml-inline-exp-test
...
Java: Add support for XML InlineExpectationsTest
2022-07-29 14:49:19 +02:00
AlexDenisov
48e93b3654
Merge pull request #9925 from github/alexdenisov/pcm-var-dedup
...
Swift: do not deduplicate PCM variables (as the mangler crashes there sometimes)
2022-07-29 14:30:41 +02:00
AlexDenisov
22c5b7af4f
Merge pull request #9921 from github/alexdenisov/type-alias-mangling
...
Swift: mangle TypeAliasDecls differently
2022-07-29 14:30:28 +02:00
Alex Denisov
34edb2537f
Swift: mangle TypeAliasDecls differently
2022-07-29 14:12:02 +02:00
Alex Denisov
5b1fe56d5f
Swift: do not deduplicate PCM variables (as the mangler crashes there sometimes)
2022-07-29 14:06:18 +02:00
Tony Torralba
ec03ebbbfc
Add spurious and missing test cases
2022-07-29 13:44:25 +02:00
Tony Torralba
6091f0dbce
Use camelCase for XML acronym
2022-07-29 13:44:11 +02:00
Paolo Tranquilli
099ab0e0c2
Swift: readd .trap suffix to swiftmodule trap files
2022-07-29 12:26:33 +02:00
Paolo Tranquilli
604328ea5f
Swift: strip suffix from swiftmodule trap files
2022-07-29 12:25:11 +02:00
Paolo Tranquilli
652230d021
Merge branch 'main' into redsun82/swift-precompiled-modules-are-not-extracted
2022-07-29 12:21:15 +02:00
Paolo Tranquilli
69633948ce
Merge pull request #9920 from github/alexdenisov/colocate-pcms
...
Swift: put all the PCM traps into the same place
2022-07-29 12:20:58 +02:00
Paolo Tranquilli
065fecc57e
Swift: extract precompiled swiftmodule files
...
Previously we were not extracting any `swiftmodule` file that was not
a system or a built-in one. This was done to avoid re-extracting
`swiftmodule` files that were built previously in the same build, but it
turned out to be too eager, as there are legitimate cases where a
non-system, non-built-in precompiled swift module can be used. An
example of that is the `PackageDescription` module used in Swift
Package Manager manifest files (`Package.swift`).
We now relax the test and trigger module extraction on all loaded
modules that do not have source files (we trigger source file extraction
for those). The catch, is that we also create empty trap files for
current output `swiftmodule` files (including possible alias locations
set up by XCode).
This means that if a following extractor run loads a previously built
`swiftmodule` file, although it will trigger module extraction, this
will however be skipped as it will find its target file already present
(this is done via the `TargetFile` semantics).
2022-07-29 11:10:03 +02:00
Alex Denisov
50e1ffda64
Swift: put all the PCM traps into the same place
2022-07-29 10:19:13 +02:00
Jeroen Ketema
a27b1ee33a
C++: Improve ErrorExpr documentation to match current practise
2022-07-29 09:08:56 +02:00
Jeroen Ketema
5a59354d73
C++: Minor clean up of the builtin operations qldoc
2022-07-29 09:08:56 +02:00
Jeroen Ketema
bce253920c
C++: Fix __builtin_shuffle qldoc
2022-07-29 09:08:56 +02:00
Jeroen Ketema
afdd21eab7
C++: Update DB scheme stats file
2022-07-29 09:08:56 +02:00
Jeroen Ketema
295ecbb401
C++: Add upgrade and downgrade scripts for new builtins
2022-07-29 09:08:56 +02:00
Jeroen Ketema
1806b8933f
C++: Add change note for newly added builtins
2022-07-29 09:08:56 +02:00
Jeroen Ketema
20b66eaf34
C++: Support __builtin_shuffle builtin
...
While here write gcc instead of GNU, which is more accurate.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
81e687ea98
C++: Support __builtin_bit_cast builtin
2022-07-29 09:08:56 +02:00
Jeroen Ketema
a85d3f9b7f
C++: Support __has_unique_object_representations builtin
2022-07-29 09:08:56 +02:00
Jeroen Ketema
0c03935437
C++: Support __is_aggregate builtin
...
Fix some whitespace issues while here.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
c4283dd23f
C++: Support __is_assignable builtin
...
While here fix the documentation of `__is_trivially_assignable` and
`__is_nothrow_assignable`.
2022-07-29 09:08:56 +02:00
AlexDenisov
9876c391fa
Merge pull request #9915 from github/redsun82/swift-fixes
...
Swift: small dispatcher fixes
2022-07-29 08:22:54 +02:00
luchua-bc
b69eba9238
Add check for Spring redirect
2022-07-29 01:59:47 +00:00
Harry Maclean
2034498690
Ruby: Fix QLDoc warnings
2022-07-29 12:20:32 +12:00
Harry Maclean
f42d33312f
Ruby: Model Mime::Type
...
Add type summaries to recognise instances of Mime::Type, and recognise
arguments to Mime::Type.match? and Mime::Type.=~ as regular expression
interpretations.
2022-07-29 11:41:48 +12:00
Harry Maclean
b7be25e18f
Ruby: Make isInterpretedAsRegExp extensible
...
This allows frameworks to add new instances where a node is interpreted
as a regular expression. We introduce a class
RegExpInterpretation::Range that represents these nodes. In the future
we may want to make this a full Concept, but it's not necessary at the
moment.
2022-07-29 11:39:41 +12:00
Harry Maclean
c29eb814b2
Ruby: Reorganise ActionDispatch framework
...
Put routing modelling inside a Routing module.
2022-07-29 10:44:36 +12:00
github-actions[bot]
e8747d3176
Post-release preparation for codeql-cli-2.10.2
2022-07-28 20:00:09 +00:00
Chris Smowton
e140d2ab4f
Merge pull request #9824 from smowton/smowton/admin/wildcard-substitution-test
...
Add test for Java wildcard substitution
2022-07-28 17:07:41 +01:00
Alex Ford
2a8567960e
Merge pull request #9913 from github/release-prep/2.10.2
...
Release preparation for version 2.10.2
2022-07-28 16:56:11 +01:00
Paolo Tranquilli
985237ab2d
Swift: small dispatcher fixes
...
File extraction was not using named trap keys, and `emitDebugInfo` was
using `std::forward` when it should not.
2022-07-28 17:05:52 +02:00
Chris Smowton
1737ed50ba
Add test cases for wildcard lowering of array types
2022-07-28 15:52:00 +01:00
Chris Smowton
8cd2aeb65d
Accept test changes
2022-07-28 15:52:00 +01:00
Chris Smowton
7475f84ea5
Fix type-parameter-out-of-scope test
2022-07-28 15:51:59 +01:00
Chris Smowton
e7f275382e
Add test for Java wildcard substitution
2022-07-28 15:51:59 +01:00
Alex Ford
a8345e00fc
Update java/ql/lib/change-notes/released/0.3.2.md
2022-07-28 14:58:38 +01:00
Alex Ford
258b58cd37
Update java/ql/lib/CHANGELOG.md
2022-07-28 14:58:34 +01:00
Jeroen Ketema
15a979cfc6
Update ruby/ql/lib/change-notes/released/0.3.2.md
2022-07-28 15:45:01 +02:00
Jeroen Ketema
3137addfc1
Update ruby/ql/lib/CHANGELOG.md
2022-07-28 15:44:53 +02:00
github-actions[bot]
212786ed91
Release preparation for version 2.10.2
2022-07-28 13:38:35 +00:00
Paolo Tranquilli
8a36a2b563
Merge pull request #9912 from github/redsun82/swift-human-readable-trap-prefixes
...
Swift: make trap key prefixes readable
2022-07-28 14:34:57 +02:00
Paolo Tranquilli
ddf715e6a9
Merge pull request #9911 from github/redsun82/swift-deduplicate-vardecls
...
Swift: deduplicate `VarDecl`
2022-07-28 14:31:59 +02:00
Paolo Tranquilli
d547a417c9
Swift: accept new test results
2022-07-28 12:57:12 +02:00
Paolo Tranquilli
cb006900cd
Merge branch 'main' into redsun82/swift-deduplicate-vardecls
2022-07-28 12:55:31 +02:00
Paolo Tranquilli
7d7966e711
Swift: make trap key prefixes readable
...
This replaces numeric tag-based prefixes with the actual tag name.
While this means in general slightly larger trap files, it aids
debugging them for a human.
In the future we can make this conditional on some kind of trap debug
option, but for the moment it does not seem detrimental.
2022-07-28 12:43:30 +02:00
Paolo Tranquilli
b491884996
Merge pull request #9910 from github/redsun82/swift-no-cleanup-on-integration-tests
...
Swift: add `--no-cleanup` to integration tests
2022-07-28 12:41:53 +02:00
Paolo Tranquilli
76ea63ffbe
Swift: deduplicate VarDecl
...
Deduplication of `ConcreteVarDecl` is triggered only if its
`DeclContext` is not local. This avoids a mangled name conflict.
Also added more thourough tests for `ConcreteVarDecl` and `ParamDecl`.
2022-07-28 12:28:52 +02:00
Paolo Tranquilli
ab1370cc8f
Swift: add --no-cleanup to integration tests
2022-07-28 11:19:45 +02:00
Geoffrey White
6cd6f74be9
Swift: Repair predicate lost in merge.
2022-07-28 10:13:04 +01:00
Geoffrey White
72fd7179f6
Merge branch 'main' into stringlengthconflation6
2022-07-28 10:01:28 +01:00
Geoffrey White
e5342867c6
Swift: Add a note to the qhelp.
2022-07-28 09:52:33 +01:00
Paolo Tranquilli
457ce3d884
Swift: fix derived IPA type properties
...
Also rename `IpaTypes.qll` to `Ipa.qll`
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
f81abe40c4
Swift: disambuigate Cfg test order
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
18b9a2fa6e
Swift: accept tests
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
95df751425
Swift: new toString for ExprPattern
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
954047c6ab
Swift: accept test changes
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
60795fc652
Swift: fix codescanning warnings
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
8b13adbb93
Swift: IPA layer tweaks
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
6abd4a6a29
Swift: fix QL libraries
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
c578505ae0
Swift: specialize Ipa <-> Db conversions
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
a16d5f72d1
Swift: cache equivalent of asDbInstance
...
Which is now a predicate in the `IpaTypes.qll` file (where `Cached`
was also renamed to `Ipa`).
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
ef09031cf9
Swift: fix autopep8 and codegen
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
47f26e6029
Swift: fix codegen unit tests
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
10976bbbab
Swift: use IPA layer in generated classes
2022-07-28 10:26:10 +02:00
Paolo Tranquilli
ea0725525b
Swift: first IPA layer
2022-07-28 10:26:10 +02:00
Paolo Tranquilli
e43755b34f
Merge pull request #9905 from github/redsun82/cfg-order
...
Control Flow: extend ordering
2022-07-28 10:25:49 +02:00
Paolo Tranquilli
9b26921cb6
Control flow: add order disambuigation customization
2022-07-28 09:11:42 +02:00
Geoffrey White
fe69bbf17c
Swift: It turns out NSString.length always exactly matches String.utf16.count.
2022-07-27 17:54:57 +01:00
Geoffrey White
70ca37a3d0
Swift: Model utf8, utf16 a\nd unicodeScalars sources.
2022-07-27 17:39:04 +01:00
Geoffrey White
89d5bbb8e0
Swift: Generalize the flow states in this query.
2022-07-27 17:39:01 +01:00
Geoffrey White
9e773302ed
Swift: Extend test cases.
2022-07-27 17:39:01 +01:00
Tony Torralba
7ca955a0e6
Add support for XML InlineExpectationsTest
2022-07-27 17:23:10 +02:00
Paolo Tranquilli
ebf650c0c0
Control Flow: add more ordering for edges
2022-07-27 15:01:17 +02:00
Anders Schack-Mulligen
70e6db3ce1
Merge pull request #9902 from aschackmull/java/junit5-assertnotnull
...
Java: Add support for JUnit5 assertions in the nullness queries.
2022-07-27 13:52:01 +02:00
Chris Smowton
9e7fc1731f
Merge pull request #9898 from smowton/smowton/fix/kotlin-super-calls
...
Kotlin: implement super-method calls
2022-07-27 11:31:36 +01:00
Tony Torralba
e179126abb
Merge pull request #9129 from atorralba/atorralba/get-underlying-expr
...
Java: Add Expr::getUnderlyingExpr predicate
2022-07-27 11:42:28 +02:00
Anders Schack-Mulligen
cc423af8f1
Java: Add support for JUnit5 assertions in the nullness queries.
2022-07-27 10:20:47 +02:00
Anders Schack-Mulligen
f2670bcd61
Merge pull request #9900 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-07-27 09:14:28 +02:00
AlexDenisov
f9bdca3079
Merge pull request #9818 from github/redsun82/swift-file-label-caching
...
Swift: cache file labels
2022-07-27 09:12:20 +02:00
github-actions[bot]
30accecd8a
Add changed framework coverage reports
2022-07-27 00:19:16 +00:00
luchua-bc
1ce31ec32c
Add sinks of servlet dispatcher and filter
2022-07-26 23:05:25 +00:00
Chris Smowton
5086841b46
Kotlin: implement super-method calls
...
If we only look at the dispatch receiver, these show up like `this` references rather than `super` references, preventing flow through super-calls. The super-interface case requires properly noting that interface methods with a body get a `default` modifier in order to avoid QL discarding the method as a possible callee.
2022-07-26 17:03:46 +01:00
Nick Rolfe
6356b20928
Ruby: port js/hardcoded-data-interpreted-as-code
2022-07-26 16:05:22 +01:00
Paolo Tranquilli
42f462504e
Merge branch 'main' into redsun82/swift-file-label-caching
2022-07-26 15:20:27 +02:00
Tony Torralba
edc8f6f0f2
Merge pull request #9894 from atorralba/atorralba/scanner_models
...
Java: Add CSV models for java.util.Scanner
2022-07-26 12:00:08 +02:00
Tony Torralba
33f5620782
Add more models
2022-07-26 11:06:11 +02:00
Tony Torralba
c56e0f7c0d
Add change note
2022-07-26 10:50:34 +02:00
Tony Torralba
95db81658b
Add CSV models for java.util.Scanner
2022-07-26 10:42:24 +02:00
Andrew Eisenberg
43ae5d4285
Merge pull request #9838 from github/aeisenberg/python-local-ref-def
...
Move python contextual queries to lib folders
2022-07-25 09:00:32 -07:00
Chris Smowton
3f6925e7be
Merge pull request #9875 from smowton/smowton/fix/charat-naming
...
Kotlin: Special-case String.charAt naming
2022-07-25 16:10:13 +01:00
Chris Smowton
715b0b3fb8
Accept test changes
2022-07-25 15:17:14 +01:00
Chris Smowton
3af2e71932
Merge pull request #9874 from smowton/smowton/fix/kotlin-for-loop-iterators
...
Kotlin: fix for-loop iterators over primitive or wildcard types
2022-07-25 15:02:49 +01:00
Jeroen Ketema
8cd0a9d245
Merge pull request #9735 from jketema/inline-yolo
...
C++: Remove `pragma[noinline]` from `ResolveGlobalVariable.ql`
2022-07-25 11:25:26 +02:00
Nick Rolfe
a61ec78f03
Merge pull request #9883 from github/nickrolfe/trap-buffering
...
Ruby/QL: speed up trap writing by putting BufWriter in front of GzEncoder
2022-07-25 08:48:54 +01:00
Paolo Tranquilli
fe73601a4e
Merge pull request #9805 from github/redsun82/swift-type-repr-collapse
...
Swift: collapse `TypeRepr` hierarchy
2022-07-25 09:31:41 +02:00
Harry Maclean
681e58c8e0
Merge pull request #9850 from hmac/hmac/arel
...
Ruby: Model Arel.sql
2022-07-25 12:09:18 +12:00
Harry Maclean
cb3ebeedf9
Merge pull request #9696 from thiggy1342/experimental-strong-params
...
RB: Experimental strong params query
2022-07-25 12:08:55 +12:00
Harry Maclean
db41ce5f76
Merge pull request #9605 from thiggy1342/experimental-manually-check-request-verb
...
RB: Experimental query to manually check request verb
2022-07-25 12:08:11 +12:00
thiggy1342
6cfde70898
Merge branch 'main' into experimental-strong-params
2022-07-22 20:41:33 -04:00
thiggy1342
b4d762fb21
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-22 20:41:23 -04:00
luchua-bc
962069ccff
Add path check in a security context (redirect)
2022-07-22 23:10:52 +00:00
thiggy1342
0c0ba925a7
this one should have no tag
2022-07-22 18:44:03 +00:00
thiggy1342
f39ca1aad2
correct cwe tagged
2022-07-22 18:36:25 +00:00
Robert Marsh
0a35f97074
Merge pull request #9872 from jketema/return-join
...
C++: Fix join-order problem in `cpp/return-stack-allocated-memory`
2022-07-22 14:32:10 -04:00
thiggy1342
c2710fb038
Update ruby/ql/src/change-notes/2022-07-21-check-http-verb.md
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-22 13:52:00 -04:00
thiggy1342
2c095cf166
Update ruby/ql/src/change-notes/2022-07-21-weak-params.md
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-22 13:51:38 -04:00
Jeroen Ketema
a9d95a9418
C++: Remove pragma[noinline] from ResolveGlobalVariable.ql
2022-07-22 17:59:27 +02:00
Jeroen Ketema
23c19311fb
Merge pull request #9700 from jketema/resolve-global-variable
...
C++: Ensure only one `Variable` exists for every global variable
2022-07-22 17:57:21 +02:00
Nick Rolfe
4767d5a1ba
Ruby/QL: speed up trap writing by putting BufWriter in front of GzEncoder
2022-07-22 15:37:53 +01:00
Arthur Baars
43266b75a1
Merge pull request #9866 from aibaars/encoding
...
Ruby: handle magic coding: comments
2022-07-22 14:33:46 +02:00
Taus
5f9a03f103
Merge pull request #9880 from github/nickrolfe/ql-ql-extractor-cleanup
...
QL: sync Ruby extractor changes
2022-07-22 14:15:04 +02:00
Paolo Tranquilli
77401ded4e
Swift: reflow comment
2022-07-22 13:54:32 +02:00
Arthur Baars
d44bf326f0
Update ruby/extractor/src/main.rs
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-07-22 13:36:22 +02:00
Paolo Tranquilli
7e67338fb5
Update swift/extractor/infra/SwiftDispatcher.h
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-07-22 13:34:11 +02:00
thiggy1342
871b6515d5
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-21 18:47:07 -04:00
thiggy1342
1842bde879
add change note
2022-07-21 22:13:53 +00:00
thiggy1342
c1a6ca5f94
add change note
2022-07-21 22:11:14 +00:00
thiggy1342
486a394a7f
Update ruby/ql/src/experimental/weak-params/WeakParams.ql
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-21 17:26:09 -04:00
thiggy1342
8fabc06d37
fix test assertion
2022-07-21 21:25:44 +00:00
thiggy1342
cc958dc171
Update ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-21 17:19:33 -04:00
Arthur Baars
1399610bd4
Merge branch 'main' into encoding
2022-07-21 21:21:17 +02:00
Nick Rolfe
5f96c92fac
QL: sync Ruby extractor changes
2022-07-21 17:38:33 +01:00
Nick Rolfe
ed0325f162
Merge pull request #9878 from github/nickrolfe/extractor-cleanup
...
Ruby: some extractor refactoring
2022-07-21 17:18:24 +01:00
Arthur Baars
7be106d7bb
Ruby: handle magic coding: comments
2022-07-21 16:33:18 +02:00
Arthur Baars
27be3dff54
Merge pull request #9868 from aibaars/update-tree-sitter-ruby-3
...
Ruby: update tree-sitter-ruby
2022-07-21 16:08:32 +02:00
Nick Rolfe
8dae85e1b1
Ruby: avoid repeated construction of table name strings
2022-07-21 12:21:06 +01:00
Nick Rolfe
0a8ecd3cf7
Ruby: compute path string only once
2022-07-21 10:44:30 +01:00
Nick Rolfe
388c9ffb74
Ruby: separate trap-writer into its own module
2022-07-21 10:44:00 +01:00
Jeroen Ketema
ad8335d6f3
C++: Fix join-order problem in cpp/return-stack-allocated-memory
...
Before on Abseil:
```
Evaluated relational algebra for predicate #select#cpe#12356#fffff@3ffb21o1 with tuple counts:
1235939 ~0% {2} r1 = SCAN functions OUTPUT In.0, In.0
1235939 ~0% {2} r2 = JOIN r1 WITH functions ON FIRST 1 OUTPUT Lhs.1, Lhs.0
33500841 ~0% {2} r3 = JOIN r2 WITH DataFlowUtil::Node::getEnclosingCallable#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
280683 ~3% {3} r4 = JOIN r3 WITH MustFlow::MkLocalPathNode#0227f5a1#fff ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.0
40970 ~2% {4} r5 = JOIN r4 WITH MustFlow::MustFlowConfiguration::hasFlowPath#dispred#f0820431#fff#cpe#23_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
40970 ~0% {5} r6 = JOIN r5 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.0
40970 ~1% {5} r7 = JOIN r6 WITH DataFlowUtil::Cached::TInstructionNode#47741e1f#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
40970 ~1% {5} r8 = JOIN r7 WITH project#Instruction::VariableAddressInstruction#class#577b6a83#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
40970 ~0% {6} r9 = JOIN r8 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
40970 ~2% {7} r10 = JOIN r9 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Rhs.1
0 ~0% {6} r11 = JOIN r10 WITH Instruction::Instruction::getEnclosingFunction#dispred#f0820431#3#ff ON FIRST 2 OUTPUT Rhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6
0 ~0% {5} r12 = JOIN r11 WITH functions ON FIRST 1 OUTPUT Lhs.5, Lhs.1, Lhs.2, Lhs.3, Lhs.4
0 ~0% {5} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.3, Lhs.2, Lhs.4, Rhs.1
return r13
```
After:
```
Evaluated relational algebra for predicate #select#cpe#12356#fffff@1dbc97kv with tuple counts:
40970 ~0% {2} r1 = SCAN MustFlow::MustFlowConfiguration::hasFlowPath#dispred#f0820431#fff#cpe#23 OUTPUT In.1, In.0
40970 ~0% {3} r2 = JOIN r1 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
40970 ~7% {4} r3 = JOIN r2 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
40970 ~2% {4} r4 = JOIN r3 WITH DataFlowUtil::Cached::TInstructionNode#47741e1f#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
40970 ~2% {4} r5 = JOIN r4 WITH project#Instruction::VariableAddressInstruction#class#577b6a83#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3
40970 ~0% {5} r6 = JOIN r5 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.1
40970 ~1% {6} r7 = JOIN r6 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
40970 ~0% {6} r8 = JOIN r7 WITH Instruction::Instruction::getEnclosingFunction#dispred#f0820431#3#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2, Lhs.4, Lhs.5
0 ~0% {5} r9 = JOIN r8 WITH DataFlowUtil::Node::getEnclosingCallable#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.5, Lhs.2, Lhs.3, Lhs.0, Lhs.4
0 ~0% {5} r10 = JOIN r9 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.1
return r10
```
2022-07-21 11:27:02 +02:00
Jeroen Ketema
466eb4a845
Merge pull request #9870 from jketema/exec-tainted-join
...
C++: Fix join-order problem in `cpp/command-line-injection`
2022-07-21 11:22:02 +02:00
Cornelius Riemenschneider
a437fcbbcc
Merge pull request #9705 from github/criemen/csharp-lua-tracing
...
C#: Implement correct behavior for `dotnet build` tracing
2022-07-21 11:01:33 +02:00
Chris Smowton
9593ceeda5
Kotlin: Special-case String.charAt naming
...
In the Kotlin universe this is called `get` so that Kotlin programmers can use the `[]` operator on `String`s.
2022-07-21 09:17:08 +01:00
Chris Smowton
0a351b73cb
Underscore query: tolerate synthetic functions
2022-07-21 09:15:27 +01:00
Chris Smowton
1cbe26a54f
Kotlin: fix for-loop iterators over primitive or wildcard types
...
Array<*> can't be queried for an argument type, and IntArray doesn't have an argument at all; both were previously causing the extractor to fail to extract the whole file due to throwing an exception.
2022-07-21 09:13:55 +01:00
Harry Maclean
4d0f6a0b96
Merge pull request #9788 from thiggy1342/add-activerecord-annotate
...
RB: Add ActiveRecord::Relation#annotate to sqlFragmentArgument()
2022-07-21 15:37:03 +12:00
luchua-bc
48f143e7d4
Query to detect regex dot bypass
2022-07-20 22:39:24 +00:00
Shyam Mehta
09ec37943c
Partial Path Traversal split into 2 queries
2022-07-20 17:53:26 -04:00
thiggy1342
a10370f813
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-20 16:33:36 -04:00
thiggy1342
b3f2159a7e
Merge branch 'main' into experimental-strong-params
2022-07-20 16:33:32 -04:00
thiggy1342
17c80336f5
Merge branch 'main' into add-activerecord-annotate
2022-07-20 16:33:30 -04:00
smehta23
b7e522749f
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-07-20 15:32:59 -04:00
Raul Garcia
9b79668ed2
Addressing some of the feedback. Work still pending
2022-07-20 10:58:01 -07:00
Raul Garcia
7f725137e5
Addressing some of the feedback. Work pending.
2022-07-20 10:56:44 -07:00
Arthur Baars
8d80e0332e
Ruby: update tree-sitter-ruby
2022-07-20 18:16:30 +02:00
Aditya Sharad
a1d9228a66
Merge pull request #9831 from adityasharad/docs/supported-frameworks-changelog-links
...
Docs: Update supported languages page with links to CLI and pack information
2022-07-20 07:36:37 -07:00
Jeroen Ketema
694d6395d5
C++: Fix join-order problem in cpp/command-line-injection
...
Before on Abseil Linux:
```
Evaluated relational algebra for predicate ExecTainted::ExecState#class#91000ffb#fff@41084cm7 with tuple counts:
40879811 ~0% {2} r1 = SCAN DataFlowUtil::Node::getLocation#dispred#f0820431#ff OUTPUT In.1, In.0
40879811 ~0% {2} r2 = JOIN r1 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
7527 ~3% {3} r3 = JOIN r2 WITH ExecTainted::interestingConcatenation#91000ffb#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
7527 ~0% {4} r4 = JOIN r3 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Rhs.1
7527 ~0% {5} r5 = JOIN r4 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Lhs.3, Rhs.1
7527 ~0% {6} r6 = JOIN r5 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0, Lhs.3, Lhs.4
7527 ~0% {3} r7 = JOIN r6 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT ((((((("ExecState (" ++ Rhs.1) ++ " | ") ++ Lhs.4) ++ ", ") ++ Lhs.1) ++ " | ") ++ Lhs.5 ++ ")"), Lhs.3, Lhs.2
return r7
```
After:
```
Evaluated relational algebra for predicate ExecTainted::ExecState#class#91000ffb#fff@1ffe61ps with tuple counts:
7527 ~0% {3} r1 = JOIN ExecTainted::interestingConcatenation#91000ffb#ff WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
7527 ~0% {4} r2 = JOIN r1 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.1
7527 ~1% {5} r3 = JOIN r2 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2, Lhs.3
7527 ~0% {5} r4 = JOIN r3 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
7527 ~4% {6} r5 = JOIN r4 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
7527 ~0% {3} r6 = JOIN r5 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT ((((((("ExecState (" ++ Rhs.1) ++ " | ") ++ Lhs.3) ++ ", ") ++ Lhs.5) ++ " | ") ++ Lhs.4 ++ ")"), Lhs.1, Lhs.2
return r6
```
2022-07-20 16:27:47 +02:00
thiggy1342
8c55a15fa6
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-20 10:27:40 -04:00
thiggy1342
6f74a2609c
Merge branch 'main' into experimental-strong-params
2022-07-20 10:26:49 -04:00
thiggy1342
f54fc1a88d
Merge branch 'main' into add-activerecord-annotate
2022-07-20 10:26:44 -04:00
Jeroen Ketema
c2b7300709
Merge pull request #9848 from geoffw0/stringlengthconflation5
...
Swift: More improvements for the string length conflation query
2022-07-20 14:05:05 +02:00
Cornelius Riemenschneider
e9e5d948b3
C#: Implement proper dotnet build handling in the Lua tracing config.
...
For proper C# tracing, `dotnet build` needs the parameter
/p:UseSharedCompilation=false. However, we can't pass that to the other
subcommands of `dotnet`, therefore we need to figure out which subcommand
of `dotnet` is being invoked.
2022-07-20 10:11:36 +00:00
Cornelius Riemenschneider
ca819573f5
Merge pull request #9862 from github/adityasharad/codeql-cli-2.10.1-mergeback
...
Merge codeql-cli-2.10.1 into main
2022-07-20 10:42:34 +02:00
Paolo Tranquilli
3527897eff
Swift: make type optional in TypeRepr
...
A type representation may not have a type in unresolved things, which
for example pop up in inactive `#if` clauses.
2022-07-20 09:13:34 +02:00
Aditya Sharad
7620a6f653
Docs: Update supported languages page with links to CLI and pack information
...
Include links to the CLI changelog, CLI releases, bundle releases,
pack changelogs, and pack source.
Clarify that this support information applies to the current version of
the CLI, bundle, query packs, and library packs.
2022-07-19 14:58:27 -07:00
Asger F
aa53841466
Merge pull request #9828 from github/post-release-prep/codeql-cli-2.10.1
...
Post-release preparation for codeql-cli-2.10.1
2022-07-19 19:49:50 +02:00
Taus
2436b060f1
Python: Fix another bad "value transfer" join
...
The culprit:
```
Tuple counts for PointsTo::InterProceduralPointsTo::scope_entry_value_transfer_from_earlier#741b54e2#ffff#join_rhs/5@eb1340iv after 12.6s:
72973 ~3% {2} r1 = JOIN PointsToContext::TImportContext#cf3039a0#f WITH Definitions::NonEscapingGlobalVariable#class#486534ab#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'arg1'
537932 ~0% {3} r2 = JOIN r1 WITH Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'arg2', Lhs.1 'arg1', Lhs.0
982333 ~0% {4} r3 = JOIN r2 WITH Essa::EssaVariable::getAUse#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'arg1', Lhs.0 'arg2', Rhs.1 'arg0'
37029774 ~0% {4} r4 = JOIN r3 WITH Essa::TEssaNodeDefinition#24e22a14#ffff ON FIRST 1 OUTPUT Rhs.3 'arg3', Lhs.1 'arg1', Lhs.2 'arg2', Lhs.3 'arg0'
35956211 ~0% {5} r5 = JOIN r4 WITH Essa::ScopeEntryDefinition::getScope#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.3 'arg0', Lhs.1 'arg1', Lhs.2 'arg2', Lhs.0 'arg3', Rhs.1 'arg4'
return r5
```
You may notice that this is a predicate that's _materialised_, but it's
never actually used anywhere. It's the old "standard order" bringing
much sadness.
The problem here is that in the standard order (which we never actually
use here), we end up with a join between the bits above, `getRootCall`,
and `appliesToScope`. The `join_rhs` bit is joined twice, once with
`getRootCall#prev` and `appliesToScope#prev_delta` (in that order), and
once with `prev` and `prev_delta` swapped.
So to fix this, I used the unbinding pragma to force `appliesToScope` to
appear first in the join order. This was enough to make the compiler
_not_ push the common context into its own `join_rhs` predicate (and
the join-order is still decent.)
2022-07-19 17:18:07 +00:00
Taus
b5cac9285e
Python: Fix bad join in getOuterVariable
...
Much sadness:
```
Tuple counts for ImportTime::ImportTimeScope::getOuterVariable#dispred#f0820431#fff/3@64d04d33 after 7.6s:
19624 ~1% {1} r1 = SCAN py_Classes OUTPUT In.0 'this'
19531 ~1% {1} r2 = JOIN r1 WITH ImportTime::ImportTimeScope#class#7851b601#f ON FIRST 1 OUTPUT Lhs.0 'this'
19531 ~0% {2} r3 = JOIN r2 WITH Scope::Scope::getEnclosingModule#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0 'this', Rhs.1
296389 ~0% {3} r4 = JOIN r3 WITH Variables::Variable::getScope#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'var', Lhs.0 'this', Lhs.1
296389 ~0% {3} r5 = JOIN r4 WITH Variables::LocalVariable#3aa06bbf#f ON FIRST 1 OUTPUT Lhs.0 'var', Lhs.1 'this', Lhs.2
296389 ~1% {4} r6 = JOIN r5 WITH Variables::Variable::getId#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'this', Lhs.0 'var', Rhs.1
62294919 ~0% {4} r7 = JOIN r6 WITH Variables::Variable::getScope#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'var', Lhs.1 'this', Lhs.2 'var', Lhs.3
62294919 ~0% {4} r8 = JOIN r7 WITH Variables::GlobalVariable#class#3aa06bbf#f ON FIRST 1 OUTPUT Lhs.0 'result', Lhs.3, Lhs.1 'this', Lhs.2 'var'
639 ~0% {3} r9 = JOIN r8 WITH Variables::Variable::getId#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'var', Lhs.0 'result'
return r9
```
Clearly we _shouldn't_ be joining on `getId` as the last thing, as this
means we're building tuples of completely unrelated variables (not even
with the same name!) which obviously blows up.
A standard way of fixing this is to correlate as much information about
these variables as possible in a `nomagic`ked helper predicate. This is
what we do here, grouping together the variable with its scope and name
(both of which are uniquely determined by the variable). This results
in a much nicer join order:
```
Tuple counts for ImportTime::ImportTimeScope::getOuterVariable#dispred#f0820431#fff/3@82866b6p after 42ms:
23867 ~4% {2} r1 = JOIN Scope::Scope::getEnclosingModule#dispred#f0820431#ff WITH ImportTime::ImportTimeScope#class#7851b601#f ON FIRST 1 OUTPUT Lhs.0 'this', Lhs.1
296389 ~0% {4} r2 = JOIN r1 WITH ImportTime::class_var_scope#7851b601#fff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'this', Rhs.2 'var'
639 ~0% {3} r3 = JOIN r2 WITH ImportTime::global_var_scope#7851b601#fff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.3 'var', Rhs.2 'result'
return r3
```
```
Tuple counts for ImportTime::class_var_scope#7851b601#fff/3@366258vr after 47ms:
19624 ~1% {1} r1 = SCAN py_Classes OUTPUT In.0 'scope'
296743 ~0% {2} r2 = JOIN r1 WITH Variables::Variable::getScope#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'var', Lhs.0 'scope'
296743 ~0% {2} r3 = JOIN r2 WITH Variables::LocalVariable#3aa06bbf#f ON FIRST 1 OUTPUT Lhs.0 'var', Lhs.1 'scope'
296743 ~2% {3} r4 = JOIN r3 WITH Variables::Variable::getId#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'scope', Rhs.1 'name', Lhs.0 'var'
return r4
```
```
Tuple counts for ImportTime::global_var_scope#7851b601#fff/3@718e4bpm after 18ms:
108173 ~0% {2} r1 = JOIN Variables::GlobalVariable#class#3aa06bbf#f WITH Variables::Variable::getId#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0 'var', Rhs.1 'name'
108173 ~0% {3} r2 = JOIN r1 WITH Variables::Variable::getScope#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'name', Rhs.1 'scope', Lhs.0 'var'
return r2
```
(You may be wondering what's up with the order of arguments for the two
helper predicates. By ordering the arguments this way, there's no need
to reorder the resulting relations when used in `getOuterVariable.)
2022-07-19 17:14:37 +00:00
Henti Smith
018a76bb17
Merge pull request #9857 from github/henti/new_actions_predicates
...
Added Workflow.getName and Step.GetId
2022-07-19 16:12:54 +01:00
Henti Smith
dcc76ddf36
Apply suggestions from code review
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-07-19 15:53:12 +01:00
Henti Smith
0828474192
Added Workflow::getName and Step::GetId
2022-07-19 15:34:10 +01:00
thiggy1342
43a9b8960e
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-19 10:29:48 -04:00
thiggy1342
cf23d338f3
Merge branch 'main' into experimental-strong-params
2022-07-19 10:29:36 -04:00
thiggy1342
6bc2fe513d
Merge branch 'main' into add-activerecord-annotate
2022-07-19 10:29:24 -04:00
Taus
cfacd015b9
Python: Fix bad join in ScopeEntryDefinition
...
Before:
```
Tuple counts for Essa::ScopeEntryDefinition#class#24e22a14#f/1@45e0d8dh after 10.5s:
2133368 ~1% {2} r1 = Essa::TEssaNodeDefinition#24e22a14#ffff_03#join_rhs AND NOT Essa::ImplicitSubModuleDefinition#class#24e22a14#f(Lhs.1 'this')
534478950 ~0% {2} r2 = JOIN r1 WITH Definitions::SsaSourceVariable::getScopeEntryDefinition#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'this', Rhs.1
581249 ~4% {1} r3 = JOIN r2 WITH Essa::EssaNodeDefinition::getDefiningNode#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.0 'this'
return r3
```
Let's see if pushing the `getDefiningNode` join further up improves the
number of intermediary tuples. (Intuitively it should, since there
should only be one defining node for any given `EssaNodeDefinition`.)
To do this, we unbind the `this.getSourceVariable()` part, which
encourages the compiler to put this join later.
After:
```
Tuple counts for Essa::ScopeEntryDefinition#class#24e22a14#f/1@30758cv4 after 300ms:
2133569 ~1% {2} r1 = SCAN Essa::TEssaNodeDefinition#24e22a14#ffff OUTPUT In.0, In.3 'this'
2133368 ~1% {2} r2 = r1 AND NOT Essa::ImplicitSubModuleDefinition#class#24e22a14#f(Lhs.1 'this')
2133368 ~0% {2} r3 = JOIN r2 WITH Definitions::SsaSourceVariable#class#486534ab#f ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.0
2133368 ~0% {3} r4 = JOIN r3 WITH Essa::EssaNodeDefinition::getDefiningNode#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0 'this'
581249 ~4% {1} r5 = JOIN r4 WITH Definitions::SsaSourceVariable::getScopeEntryDefinition#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this'
return r5
```
Much better (and our intuition is confirmed -- joining with
`getDefiningNode` did not increase the number of tuples).
2022-07-19 14:28:25 +00:00
Asger F
b9bdee6651
Merge branch 'main' into post-release-prep/codeql-cli-2.10.1
2022-07-19 16:24:35 +02:00
Taus
87960b6e42
Python: Fix bad join in scope entry transfer
...
How it started:
```
Tuple counts for Base::BaseFlow::scope_entry_value_transfer_from_earlier#f76ef5bb#ffff/4@f2af49f5 after 18s:
1526390 ~0% {3} r1 = JOIN Base::BaseFlow::scope_entry_value_transfer_from_earlier#f76ef5bb#ffff#shared WITH Essa::EssaVariable::getScope#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1 'pred_scope', Lhs.0 'pred_var', Lhs.1
7798319 ~0% {4} r2 = JOIN r1 WITH Scope::Scope::precedes#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1 'succ_scope', Lhs.1 'pred_var', Lhs.2, Lhs.0 'pred_scope'
5427334 ~0% {4} r3 = JOIN Base::BaseFlow::scope_entry_value_transfer_from_earlier#f76ef5bb#ffff#shared#1 WITH Scope::Scope::precedes#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'pred_var', Lhs.2, Lhs.0 'pred_scope', Rhs.1 'succ_scope'
5426883 ~0% {4} r4 = r3 AND NOT Base::BaseFlow::scope_entry_value_transfer_from_earlier#f76ef5bb#ffff#antijoin_rhs(Lhs.0 'pred_var', Lhs.1, Lhs.2 'pred_scope', Lhs.3)
5426883 ~0% {5} r5 = SCAN r4 OUTPUT In.3, "__init__", In.0 'pred_var', In.1, In.2 'pred_scope'
2002084 ~0% {4} r6 = JOIN r5 WITH Scope::Scope::getName#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.0, Lhs.2 'pred_var', Lhs.3, Lhs.4 'pred_scope'
39293988 ~2% {4} r7 = JOIN r6 WITH Scope::Scope::precedes#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1 'succ_scope', Lhs.1 'pred_var', Lhs.2, Lhs.3 'pred_scope'
47092307 ~0% {4} r8 = r2 UNION r7
94173236 ~7% {5} r9 = JOIN r8 WITH Essa::ScopeEntryDefinition::getScope#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Rhs.1 'succ_def', Lhs.1 'pred_var', Lhs.3 'pred_scope', Lhs.0 'succ_scope'
599441 ~1% {4} r10 = JOIN r9 WITH Essa::TEssaNodeDefinition#24e22a14#ffff_03#join_rhs ON FIRST 2 OUTPUT Lhs.2 'pred_var', Lhs.3 'pred_scope', Lhs.1 'succ_def', Lhs.4 'succ_scope'
return r10
```
How it ended:
```
Tuple counts for Base::essa_var_scope#f76ef5bb#fff/3@20fd243c after 153ms:
1526390 ~0% {2} r1 = JOIN Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff WITH Base::BaseFlow::reaches_exit#f76ef5bb#f ON FIRST 1 OUTPUT Lhs.0 'pred_var', Lhs.1 'var'
1526390 ~5% {3} r2 = JOIN r1 WITH Essa::EssaVariable::getScope#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'var', Rhs.1 'pred_scope', Lhs.0 'pred_var'
return r2
```
```
Tuple counts for Base::scope_entry_def_scope#f76ef5bb#fff/3@34224fid after 40ms:
581249 ~1% {3} r1 = JOIN Essa::TEssaNodeDefinition#24e22a14#ffff_30#join_rhs WITH Essa::ScopeEntryDefinition::getScope#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1 'var', Rhs.1 'succ_scope', Lhs.0 'succ_def'
return r1
```
```
Tuple counts for Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff#shared/5@cb3c45lu after 76ms:
471230 ~0% {3} r1 = JOIN Variables::GlobalVariable#class#3aa06bbf#f WITH Base::scope_entry_def_scope#f76ef5bb#fff ON FIRST 1 OUTPUT Rhs.1 'arg1', Lhs.0 'arg0', Rhs.2 'arg2'
313791 ~2% {5} r2 = JOIN r1 WITH Base::step_through_init#f76ef5bb#fff ON FIRST 1 OUTPUT Lhs.1 'arg0', Lhs.0 'arg1', Lhs.2 'arg2', Rhs.1 'arg3', Rhs.2 'arg4'
return r2
```
```
Tuple counts for Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff#antijoin_rhs/5@886d8bvr after 67ms:
508926 ~0% {6} r1 = JOIN Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff#shared WITH Exprs::Name::defines#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.4 'arg4', Lhs.0 'arg0', Lhs.1 'arg1', Lhs.2 'arg2', Lhs.3 'arg3'
25 ~46% {5} r2 = JOIN r1 WITH Exprs::Expr::getScope#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'arg0', Lhs.3 'arg1', Lhs.4 'arg2', Lhs.5 'arg3', Lhs.1 'arg4'
return r2
```
```
Tuple counts for Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff/4@87ec703f after 80ms:
313774 ~2% {5} r1 = Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff#shared AND NOT Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff#antijoin_rhs(Lhs.0, Lhs.1 'succ_scope', Lhs.2 'succ_def', Lhs.3 'pred_scope', Lhs.4)
313774 ~0% {4} r2 = SCAN r1 OUTPUT In.3 'pred_scope', In.0, In.1 'succ_scope', In.2 'succ_def'
313774 ~4% {4} r3 = JOIN r2 WITH @py_scope#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'pred_scope', Lhs.2 'succ_scope', Lhs.3 'succ_def'
313778 ~0% {4} r4 = JOIN r3 WITH Base::essa_var_scope#f76ef5bb#fff ON FIRST 2 OUTPUT Rhs.2 'pred_var', Lhs.1 'pred_scope', Lhs.3 'succ_def', Lhs.2 'succ_scope'
return r4
```
```
Tuple counts for Base::step_through_init#f76ef5bb#fff/3@7ba1ee1c after 17ms:
11763 ~0% {1} r1 = JOIN Scope::Scope::precedes#dispred#f0820431#ff#join_rhs WITH Scope::Scope::getName#dispred#f0820431#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'init'
196671 ~4% {2} r2 = JOIN r1 WITH Scope::Scope::precedes#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0 'init', Rhs.1 'succ_scope'
196671 ~6% {3} r3 = JOIN r2 WITH Scope::Scope::precedes#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'succ_scope', Rhs.1 'pred_scope', Lhs.0 'init'
return r3
```
```
Tuple counts for Base::BaseFlow::scope_entry_value_transfer_from_earlier#f76ef5bb#ffff/4@4892f93f after 426ms:
1526390 ~0% {3} r1 = SCAN Base::essa_var_scope#f76ef5bb#fff OUTPUT In.1, In.0, In.2 'pred_var'
7798319 ~0% {4} r2 = JOIN r1 WITH Scope::Scope::precedes#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1 'succ_scope', Rhs.0, Lhs.2 'pred_var'
285663 ~3% {4} r3 = JOIN r2 WITH Base::scope_entry_def_scope#f76ef5bb#fff ON FIRST 2 OUTPUT Lhs.3 'pred_var', Lhs.2 'pred_scope', Rhs.2 'succ_def', Lhs.1 'succ_scope'
599441 ~1% {4} r4 = Base::scope_entry_value_transfer_through_init#f76ef5bb#ffff UNION r3
return r4
```
It's possible this could be improved even further, but I think this is
good enough. (I'm not entirely happy with how many helper predicates I
ended up needing, but it was the only way I could get the joins to
happen in a semi-sensible order.)
2022-07-19 13:46:55 +00:00
Cornelius Riemenschneider
03bf9eb166
Merge pull request #9837 from github/aeisenberg/definitions.ql
...
Move definitions.ql back to src
2022-07-19 14:43:10 +02:00
Taus
bde47836d0
Python: Add Str class
...
This makes the AST viewer (which annotates string constant nodes as
`Str`) a bit more consistent.
2022-07-19 12:25:10 +00:00
Taus
bfe90413e2
Merge pull request #9847 from alexet/alexet/fix-predicate-binding
...
Python: Fix binding incorrect predicate.
2022-07-19 13:59:13 +02:00
Arthur Baars
dcbd82907f
Merge pull request #9845 from aibaars/skip-dotgit
...
Ruby: skip .git folder
2022-07-19 11:58:43 +02:00
Harry Maclean
ec1d1eb547
Ruby: Add change note
2022-07-19 14:33:51 +12:00
thiggy1342
962155fd61
fix changenotes
2022-07-19 00:33:04 +00:00
thiggy1342
9586259706
style tweak for checking multiple method names
2022-07-19 00:29:30 +00:00
thiggy1342
304203ad2f
fix path problem output
2022-07-19 00:25:50 +00:00
Harry Maclean
7b8603c89b
Ruby: Model Arel.sql
2022-07-19 11:27:15 +12:00
Taus
8c0725e8c6
Python: Fix bad join in ESSA getInput
...
Before:
```
Tuple counts for Essa::EssaEdgeRefinement::getInput#dispred#f0820431#ff/2@b84afc77 after 20.3s:
873421 ~0% {3} r1 = JOIN Essa::TEssaEdgeDefinition#24e22a14#ffff_31#join_rhs WITH Essa::TEssaEdgeDefinition#24e22a14#ffff_30#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'this'
181627951 ~0% {3} r2 = JOIN r1 WITH Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1, Lhs.2 'this'
873418 ~0% {2} r3 = JOIN r2 WITH Essa::EssaDefinition::reachesEndOfBlock#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
return r3
```
It's perhaps not immediately obvious what's going on here (because of
the `...join_rhs` indirection), but basically we're joining together
`this` and `def` and their `getSourceVariable`, and only then actually
relating `this` and `def` through `reachesEndOfBlock`.
By unbinding `var`, we prevent this early join, which now encourages the
`reachesEndOfBlock` join to happen earlier:
```
Tuple counts for Essa::EssaEdgeRefinement::getInput#dispred#f0820431#ff/2@2d63e5lb after 2s
873421 ~0% {2} r1 = SCAN Essa::TEssaEdgeDefinition#24e22a14#ffff OUTPUT In.3 'this', In.1
873421 ~0% {3} r2 = JOIN r1 WITH Essa::TEssaEdgeDefinition#24e22a14#ffff_30#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'this'
873421 ~0% {3} r3 = JOIN r2 WITH Definitions::SsaSourceVariable#class#486534ab#f ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'this', Lhs.0
8758877 ~0% {3} r4 = JOIN r3 WITH Essa::EssaDefinition::reachesEndOfBlock#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.2, Lhs.1 'this'
873418 ~0% {2} r5 = JOIN r4 WITH Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
return r5
```
2022-07-18 20:21:39 +00:00
alexet
f9b6ca76e5
Python: Fix binding incorrect predicate.
2022-07-18 16:28:19 +01:00
thiggy1342
fc00e56058
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-18 10:58:13 -04:00
Taus
bdd771989f
Python: Fix bad join in syntactic_call_count
...
On certain databases, the evaluation of this predicate was running out
of memory due to the way the `count` aggregate was being used. Here's
an example of the tuple counts involved:
```
Tuple counts for PointsToContext::syntactic_call_count#cf3039a0#ff#antijoin_rhs/1@d2199bb8 after 1m27s:
595518502 ~521250% {1} r1 = JOIN PointsToContext::syntactic_call_count#cf3039a0#ff#shared#3 WITH Flow::CallNode::getFunction#dispred#f0820431#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1 'arg0'
26518709 ~111513% {1} r2 = JOIN PointsToContext::syntactic_call_count#cf3039a0#ff#shared#2 WITH Flow::CallNode::getFunction#dispred#f0820431#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1 'arg0'
622037211 ~498045% {1} r3 = r1 UNION r2
return r3
```
and a timing report that looked like this:
```
time | evals | max @ iter | predicate
------|-------|--------------|----------
5m8s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#shared#2@6d98d1nd
4m38s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#count_range@f5df1do4
3m51s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#shared#3@da3b4abf
1m58s | 7613 | 37ms @ 4609 | MRO::ClassListList::removedClassParts#f0820431#fffff#reorder_2_3_4_0_1@8155axyi
1m37s | 7613 | 33ms @ 3904 | MRO::ClassListList::bestMergeCandidate#f0820431#2#fff@8155a83w
1m27s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#antijoin_rhs@d2199bb8
1m8s | 1825 | 63ms @ 404 | PointsTo::Expressions::equalityEvaluatesTo#741b54e2#fffff@8155aw7w
37.6s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs@e348fc1p
...
```
To make optimising this easier for the compiler, I moved the bodies of
the `count` aggregate into their own helper predicates (with size
linear in the number of `CallNode`s), and also factored out the many
calls to `f.getName()`.
The astute reader will notice that in writing this as a sum of `count`s
rather than a count of a disjunction, the intersection (if it exists)
will be counted twice, and so the semantics may be different. However,
since `method_call` and `function_call` require `AttrNode` and
`NameNode` functions respectively, and as these two types are disjoint,
there is no intersection, and so the semantics should be preserved.
After the change, the evaluation of `syntactic_call_count` now looks as
follows:
```
Tuple counts for PointsToContext::syntactic_call_count#cf3039a0#ff/2@662dd8s0 after 216ms:
23960 ~0% {1} r1 = @py_scope#f AND NOT py_Functions_0#antijoin_rhs(Lhs.0 's')
23960 ~0% {2} r2 = SCAN r1 OUTPUT In.0 's', 0
276309 ~7% {2} r3 = SCAN @py_scope#f OUTPUT In.0 's', "__init__"
11763 ~0% {2} r4 = JOIN r3 WITH Scope::Scope::getName#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.0 's', 1
35723 ~0% {2} r5 = r2 UNION r4
252349 ~0% {2} r6 = JOIN @py_scope#f WITH Function::Function::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0 's', Rhs.1
240586 ~0% {2} r7 = SELECT r6 ON In.1 != "__init__"
131727 ~4% {2} r8 = r7 AND NOT project#PointsToContext::method_call#cf3039a0#ff(Lhs.1)
131727 ~0% {3} r9 = SCAN r8 OUTPUT In.1, In.0 's', 0
240586 ~0% {2} r10 = SCAN r7 OUTPUT In.1, In.0 's'
108859 ~0% {3} r11 = JOIN r10 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1 's', Rhs.1
240586 ~0% {3} r12 = r9 UNION r11
24100 ~0% {2} r13 = JOIN r12 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs#1 ON FIRST 1 OUTPUT Lhs.1 's', (Rhs.1 + Lhs.2)
240586 ~0% {2} r14 = SELECT r6 ON In.1 != "__init__"
131727 ~4% {2} r15 = r14 AND NOT project#PointsToContext::method_call#cf3039a0#ff(Lhs.1)
131727 ~0% {3} r16 = SCAN r15 OUTPUT In.0 's', In.1, 0
108859 ~4% {3} r17 = JOIN r10 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs ON FIRST 1 OUTPUT Lhs.1 's', Lhs.0, Rhs.1
240586 ~4% {3} r18 = r16 UNION r17
216486 ~2% {3} r19 = r18 AND NOT project#PointsToContext::function_call#cf3039a0#ff(Lhs.1)
216486 ~0% {2} r20 = SCAN r19 OUTPUT In.0 's', (0 + In.2)
240586 ~0% {2} r21 = r13 UNION r20
276309 ~0% {2} r22 = r5 UNION r21
return r22
```
2022-07-18 13:58:00 +00:00
Arthur Baars
c9e5206396
Ruby: skip .git folder
2022-07-18 15:26:38 +02:00
Geoffrey White
541df9b550
Swift: Remove TODO comment. We have a test for this problem now.
2022-07-18 14:26:12 +01:00
Geoffrey White
336548f746
Swift: Improve comments.
2022-07-18 14:24:16 +01:00
Geoffrey White
9474e63faf
Swift: Clean up isSink (4 - move common code out).
2022-07-18 14:24:15 +01:00
Geoffrey White
b136790efd
Swift: Clean up isSink (3 - rename f -> funcDecl and move that out as well; in the other two cases this variable didn't exist, now it does).
2022-07-18 14:24:14 +01:00
Geoffrey White
0bd94a6307
Swift: Clean up isSink (2 - rename methodName -> funcName and move that out as well).
2022-07-18 14:24:13 +01:00
Geoffrey White
4854679a40
Swift: Clean up isSink (1 - move common variables to an outer exists).
2022-07-18 14:24:13 +01:00
Geoffrey White
39fb714ad1
Swift: Add test with substring declared differently.
2022-07-18 14:24:12 +01:00
Michael Nebel
6603024488
C#: Allow encryption- prefix for sinks in CsvValidation.
2022-07-18 14:32:31 +02:00
Michael Nebel
57ba0c4e5d
C#: Move sinks into System.Security.Cryptography framework code.
2022-07-18 14:28:49 +02:00
Michael Nebel
c91d49a0fe
C#: Add provenance column to CSV format for SymmetricAlgorithm.
2022-07-18 14:28:49 +02:00
Michael Nebel
66232a8054
C#: Fix typo.
2022-07-18 14:28:49 +02:00
Michael Nebel
a5b7e2a2e1
C#: Convert set Key of SymmetricAlgorithm to Csv sink.
2022-07-18 14:28:49 +02:00
Michael Nebel
032448041d
C#: Convert CreateSymmetricKey to CSV sink.
2022-07-18 14:28:49 +02:00
Michael Nebel
1d405dba14
C#: Collapse Sink classes.
2022-07-18 14:28:49 +02:00
Michael Nebel
383ad51682
C#: Use CSV format for CreateEncryptor and CreateDecryptor sinks.
2022-07-18 14:28:49 +02:00
Michael Nebel
e6e82ef56d
C#: Update test with Decrypt example.
2022-07-18 14:28:49 +02:00
Michael Nebel
52a9fb0de7
C#: Add test for decrypt.
2022-07-18 14:28:49 +02:00
Paolo Tranquilli
e1bd4a78ff
Merge branch 'main' into redsun82/swift-type-repr-collapse
2022-07-18 14:05:43 +02:00
Paolo Tranquilli
10b7b1f183
Merge branch 'main' into redsun82/swift-file-label-caching
2022-07-18 14:02:57 +02:00
Paolo Tranquilli
410167671f
Merge pull request #9795 from github/redsun82/swift-extraction
...
Swift: extract more entities
2022-07-18 13:37:43 +02:00
Nick Rolfe
eebba36b18
Merge pull request #9708 from github/nickrolfe/pathname
...
Ruby: model the standard library's `Pathname` class
2022-07-18 11:29:30 +01:00
Paolo Tranquilli
98fc8812fc
Merge 'main' into redsun82/swift-extraction
2022-07-18 11:55:21 +02:00
Paolo Tranquilli
c779936ee8
Swift: commit forgotten files
2022-07-18 11:19:40 +02:00
Paolo Tranquilli
c08c3955d6
Swift: add UnresolvedPatternExpr test
2022-07-18 10:37:54 +02:00
Paolo Tranquilli
78fc356feb
Swift: address review comments
2022-07-18 10:29:20 +02:00
Nick Rolfe
dbd6607875
Ruby: use ASCII dash in comment
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-18 08:54:58 +01:00
Harry Maclean
cc5f59f313
Merge pull request #9138 from hmac/hmac/array-inclusion-guard-local-flow
...
Ruby: Make StringArrayInclusion more sensitive
2022-07-18 10:11:49 +12:00
yo-h
d4443592eb
Merge pull request #9776 from raulgarciamsft/azure-sdk-client-encryption-version
...
New queries to detect unsafe client side encryption in Azure Storage
2022-07-16 14:59:51 -04:00
Raul Garcia
6b17890e4f
Fixing warning on usage of a deprecated feature.
2022-07-16 08:30:06 -07:00
Raul Garcia
eefa659503
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-07-16 08:23:59 -07:00
Raul Garcia
fe789c8aa9
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-07-16 08:22:18 -07:00
Andrew Eisenberg
b897a40228
Move python contextual queries to lib folders
...
This will ensure that python projects can use jump to ref/def in
vscode when the core libraries are not installed.
2022-07-15 13:12:17 -07:00
Andrew Eisenberg
2f50549184
Move definitions.ql back to src
2022-07-15 11:48:15 -07:00
thiggy1342
a1df1d1119
Merge branch 'main' into experimental-strong-params
2022-07-15 11:17:57 -04:00
thiggy1342
ee1c09329f
Merge branch 'main' into add-activerecord-annotate
2022-07-15 11:17:48 -04:00
Chris Smowton
41ca791966
Implement is-underscore-parameter for old versions of Kotlin
2022-07-15 12:36:37 +01:00
Erik Krogh Kristensen
625e37a0da
fix typo
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-14 21:53:21 +02:00
Aditya Sharad
d50816a284
Merge pull request #9802 from adityasharad/docs/language-pack-changelogs
...
Docs: Add links from query help to query pack changelog for each language
2022-07-14 08:52:50 -07:00
Chris Smowton
d4b0163c4c
Kotlin: Don't extract a name for a '_' parameter
...
I can't reproduce the exact circumstances, but these sometimes get "<anonymous parameter X>" names and sometimes get "$noName_X" names. Whichever way, avoiding extracting a synthetic name seems safest; anyone finding the .class file and not reading the metadata indicating it came from a `_` will extract the binary name selected, or else QL will
invent a name.
2022-07-14 16:36:26 +01:00
github-actions[bot]
0ee476129a
Post-release preparation for codeql-cli-2.10.1
2022-07-14 14:38:49 +00:00
Paolo Tranquilli
5e74df3882
Swift: cache file paths
...
This required a bit of a generalization of `TrapLabelStore` to not
work only with pointers.
2022-07-14 16:32:33 +02:00
Aditya Sharad
d13f9d5d71
Update docs/codeql/query-help/javascript.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-07-14 07:29:29 -07:00
Paolo Tranquilli
7fbe4f8547
Merge pull request #9815 from github/redsun82/swift-exclusive-file
...
Swift: trap output rework
2022-07-14 16:23:44 +02:00
thiggy1342
592ce3ec58
Merge branch 'main' into add-activerecord-annotate
2022-07-14 09:55:25 -04:00
Paolo Tranquilli
22ff8c2c7e
Swift: remove redundant braces
2022-07-14 15:40:48 +02:00
Paolo Tranquilli
3e06455ac1
Swift: delete TargetFile's move assignment
2022-07-14 15:39:36 +02:00
Anders Schack-Mulligen
21066d277f
Merge pull request #9819 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-07-14 15:13:37 +02:00
Erik Krogh Kristensen
5ba4f6dae8
Merge pull request #9826 from erik-krogh/combineWork
...
QL: rewrite the QL-for-QL workflow to just do everything in one go
2022-07-14 14:24:31 +02:00
Asger F
fd7561cf27
Merge pull request #9822 from github/release-prep/2.10.1
...
Release preparation for version 2.10.1
2022-07-14 14:02:41 +02:00
Erik Krogh Kristensen
1037c2b182
all comments are alive
2022-07-14 13:30:12 +02:00
Erik Krogh Kristensen
a7a9428dc1
split the sarif file into languages
2022-07-14 13:20:52 +02:00
Erik Krogh Kristensen
47c9b446f0
exclude upgrade scripts from QL-for-QL
2022-07-14 13:01:40 +02:00
Erik Krogh Kristensen
380070f2e4
rewrite the QL-for-QL workflow to just do everything in one go
2022-07-14 12:54:27 +02:00
Erik Krogh Kristensen
85a652f3d1
remove a bunch of repeated words
2022-07-14 12:42:48 +02:00
Erik Krogh Kristensen
2ea2bd8966
refine the repeated-word query
2022-07-14 12:35:09 +02:00
Erik Krogh Kristensen
cb3a0fb5de
make a Comment superclass
2022-07-14 12:25:01 +02:00
Erik Krogh Kristensen
f20c186277
add ql/repeated-word query
2022-07-14 12:20:30 +02:00
Asger F
dbff20a3d8
Update cpp/ql/lib/CHANGELOG.md
2022-07-14 12:10:03 +02:00
Asger F
9f184ec122
Update cpp/ql/lib/change-notes/released/0.3.1.md
2022-07-14 12:09:58 +02:00
Jeroen Ketema
fe1f1bb79d
Fix issues with change notes
2022-07-14 11:06:14 +02:00
Erik Krogh Kristensen
33fdcf1e4f
Merge pull request #9794 from erik-krogh/unusedVue
...
JS: exclude variables in .vue files form js/unused-local-variable
2022-07-14 10:57:06 +02:00
github-actions[bot]
d1aa0d7dd3
Release preparation for version 2.10.1
2022-07-14 08:56:03 +00:00
Asger F
855d4c2ea1
Merge pull request #9718 from asgerf/js/case-sensitive-middleware
...
JS: Add 'case sensitive middleware' query
2022-07-14 10:47:58 +02:00
Erik Krogh Kristensen
43a82004b2
Merge pull request #9798 from erik-krogh/backtrackers
...
JS: use small steps in TypeBackTracker correctly
2022-07-14 10:28:07 +02:00
Erik Krogh Kristensen
ed80089d7c
fix some QL-for-QL warnings in JS
2022-07-14 09:45:44 +02:00
Asger F
18c5a8c8da
Merge branch 'main' into js/case-sensitive-middleware
2022-07-14 09:38:35 +02:00
Asger F
da8123072d
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-07-14 09:38:10 +02:00
Paolo Tranquilli
f1144b9672
Swift: small TypeRepr visit rewording
2022-07-14 06:18:51 +02:00
Paolo Tranquilli
d748cb483d
Swift: include cleanup
...
Fix a problem with `sstream` not being transitively included on macOS.
2022-07-14 06:10:12 +02:00
Paolo Tranquilli
4c53c341f6
Swift: make TargetFile::good() a class invariant
...
Fallible initialization has been moved to a factory function, and
`commit` has been moved to the destructor.
2022-07-14 06:02:35 +02:00
thiggy1342
62a10e20b2
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-13 20:28:09 -04:00
thiggy1342
8ca7d7d775
update change note
2022-07-14 00:22:38 +00:00
thiggy1342
9d277027a3
Merge branch 'main' into experimental-strong-params
2022-07-13 20:19:50 -04:00
thiggy1342
3dd61cadf4
formatting query
2022-07-14 00:19:36 +00:00
github-actions[bot]
9a186ba5d2
Add changed framework coverage reports
2022-07-14 00:18:56 +00:00
thiggy1342
ee79834cc8
formatting in qhelp
2022-07-14 00:15:39 +00:00
thiggy1342
ae634367c9
add qhelp file
2022-07-14 00:11:52 +00:00
thiggy1342
2cc703387b
use taint config for data flow
2022-07-14 00:11:52 +00:00
Chris Smowton
a6970638cb
Improve description
2022-07-13 20:27:10 +01:00
Chris Smowton
01cec0490b
Abbreviate qhelp
2022-07-13 20:24:44 +01:00
thiggy1342
f5301aa478
Merge branch 'main' into add-activerecord-annotate
2022-07-13 14:35:44 -04:00
Chris Smowton
80cbddf626
Merge pull request #9817 from smowton/smowton/feature/model-java-util-properties
...
Java: Model `java.util.Properties.getProperty`
2022-07-13 17:12:11 +01:00
Raul Garcia
f7c47b6c75
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.py
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-13 08:34:48 -07:00
Chris Smowton
f9da4a0456
Add change note
2022-07-13 14:11:31 +01:00
Chris Smowton
b1dd3c2d84
Model java.util.Properties.getProperty
2022-07-13 13:59:28 +01:00
Erik Krogh Kristensen
9e2e32f037
Merge pull request #9322 from erik-krogh/fixAutoBuild
...
QL/RB: fix the QL-for-QL and ruby autobuilders
2022-07-13 14:39:59 +02:00
Paolo Tranquilli
6dd09c1815
Merge pull request #9796 from github/redsun82/swift-codegen-skip-cpp-pragma
...
Swift: allow skipping fields in cppgen
2022-07-13 13:20:47 +02:00
Erik Krogh Kristensen
3e4a182ee8
Merge pull request #7450 from erik-krogh/missDocParam
...
QL: Add query detecting suspiciously missing parameters from the QLDoc of a predicate
2022-07-13 12:45:15 +02:00
Erik Krogh Kristensen
595875ff98
remove redundant not-equals check
2022-07-13 12:06:12 +02:00
Paolo Tranquilli
5773a734c3
Swift: slightly simplify a cppgen change
2022-07-13 11:27:50 +02:00
Erik Krogh Kristensen
a4262f8d91
add some more references to the overly-large-range qhelp
2022-07-13 11:20:24 +02:00
Paolo Tranquilli
f7dca4d70f
Swift: trap output rework
...
Firstly, this change reworks how inter-process races are resolved.
Moreover some responsability reorganization has led to merging
`TrapArena` and `TrapOutput` again into a `TrapDomain` class.
A `TargetFile` class is introduced, that is successfully created
only for the first process that starts processing a given trap output
file. From then on `TargetFile` simply wraps around `<<` stream
operations, dumping them to a temporary file. When `TargetFile::commit`
is called, the temporary file is moved on to the actual target trap
file.
Processes that lose the race can now just ignore the unneeded
extraction and go on, while previously all processes would carry out
all extractions overwriting each other at the end.
Some of the file system logic contained in `SwiftExtractor.cpp` has been
moved to this class, and two TODOs are solved:
* introducing a better inter process file collision avoidance strategy
* better error handling for trap output operations: if unable to write
to the trap file (or carry out other basic file operations), we just
abort.
The changes to `ExprVisitor` and `StmtVisitor` are due to wanting to
hide the raw `TrapDomain::createLabel` from them, and bring more
funcionality under the generic caching/dispatching mechanism.
2022-07-13 11:19:57 +02:00
Harry Maclean
1fa2144716
Ruby: Update test fixtures
2022-07-13 21:02:08 +12:00
Erik Krogh Kristensen
fd10947ca0
use small steps in TypeBackTracker correctly
2022-07-13 10:29:57 +02:00
Erik Krogh Kristensen
cd5fbe633f
update locations in test after merging in the focus-location-pr
2022-07-13 10:12:52 +02:00
Erik Krogh Kristensen
c4f44bb67f
sync files
2022-07-13 10:01:26 +02:00
Erik Krogh Kristensen
a49d34cf0f
Merge branch 'main' into missDocParam
2022-07-13 09:58:04 +02:00
Erik Krogh Kristensen
dded3af3d8
remove more false positives from the ql/missing-parameter-qldoc query
2022-07-13 09:57:17 +02:00
Erik Krogh Kristensen
047b14e310
get the autobuilders to work after introducing test-cases
2022-07-13 09:50:55 +02:00
Erik Krogh Kristensen
eb0340dcb6
get excludes to work properly
2022-07-13 09:50:55 +02:00
Erik Krogh Kristensen
878168384e
remove tools:latest from codeql-action in QL-for-QL
2022-07-13 09:50:54 +02:00
Erik Krogh Kristensen
2850b35a04
update, and fix, the autobuilders by using the new --also-match option
2022-07-13 09:48:29 +02:00
Harry Maclean
49aab51893
Ruby: Make helper predicate private
2022-07-13 18:20:27 +12:00
Harry Maclean
ea95e2e1d0
Ruby: Use InclusionTests library in barrier guards
2022-07-13 18:20:27 +12:00
Harry Maclean
b9fc82a741
Ruby: Test both old and new-style barrier guards
2022-07-13 18:20:25 +12:00
Harry Maclean
4cfaa86d5d
Ruby: Update new-style barrier-guard
2022-07-13 18:20:14 +12:00
Harry Maclean
5f17d8370c
Ruby: Small change to isArrayExpr
2022-07-13 18:20:14 +12:00
Harry Maclean
63dcce9a31
Ruby: Refactor isArrayConstant
2022-07-13 18:20:14 +12:00
Harry Maclean
b5a3d3c488
Ruby: Extract isArrayConstant
...
This predicate might be useful elsewhere.
2022-07-13 18:20:14 +12:00
Harry Maclean
301914d80c
Ruby: Add an extra barrier guard test
2022-07-13 18:20:14 +12:00
Harry Maclean
706d1d2eee
Ruby: Make StringArrayInclusion more sensitive
...
We now recognise the following pattern as a barrier guard for `x`:
values = ["foo", "bar"]
if values.include? x
sink x
end
2022-07-13 18:20:12 +12:00
Raul Garcia
0dbb03f732
Adding CVE information.
2022-07-12 21:49:19 -07:00
thiggy1342
7df7b92d86
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-12 20:36:34 -04:00
thiggy1342
7129002573
tweak tests more
2022-07-13 00:33:58 +00:00
thiggy1342
b3f1a513d1
Update tests
2022-07-13 00:25:43 +00:00
thiggy1342
9a0a9491da
Merge branch 'main' into add-activerecord-annotate
2022-07-12 20:13:56 -04:00
thiggy1342
2566ae9889
Merge branch 'main' into experimental-strong-params
2022-07-12 20:12:51 -04:00
thiggy1342
db5f63b208
add tests
2022-07-12 23:14:16 +00:00
thiggy1342
7facc63699
remove predicate
2022-07-12 22:59:48 +00:00
Erik Krogh Kristensen
2aaedacd5d
Merge pull request #9593 from erik-krogh/param2
...
QL: followup fixes to parameterized modules
2022-07-13 00:23:11 +02:00
Erik Krogh Kristensen
89043ec4ef
Merge branch 'main' into param2
2022-07-12 23:21:11 +02:00
thiggy1342
74d6061082
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-12 17:15:54 -04:00
Erik Krogh Kristensen
5cbe01d8dc
Merge pull request #8351 from erik-krogh/inconsistentDep
...
QL: add query detecting inconsistent deprecations
2022-07-12 23:12:24 +02:00
Erik Krogh Kristensen
e092cb02cd
Merge pull request #8937 from erik-krogh/qlFocusedLocations
...
QL: more precise alert locations
2022-07-12 23:11:22 +02:00
Raul Garcia
a4adf06713
Addressing feedback for the qhelp file.
2022-07-12 13:51:12 -07:00
Jeroen Ketema
c18428f1a9
Merge pull request #9785 from bdrodes/main
...
C++: Nullness.qll bug fixes
2022-07-12 21:43:44 +02:00
Raul Garcia
d929b1338b
Addressing API::Node feedback for all predicates
2022-07-12 11:55:06 -07:00
ihsinme
e77a989133
Update DangerousUseMbtowc.expected
2022-07-12 20:22:31 +03:00
ihsinme
98af52fba5
Update DangerousUseMbtowc.ql
2022-07-12 20:19:59 +03:00
ihsinme
1291f33c39
Merge pull request #1 from geoffw0/test123
...
C++: Accept test results.
2022-07-12 20:18:59 +03:00
Ian Lynagh
83edb3b5e9
Kotlin: Remove the last uses of fakeLabel
2022-07-12 17:43:50 +01:00
Geoffrey White
f29104ccce
C++: Accept test results.
2022-07-12 16:49:04 +01:00
Raul Garcia
64343e00f4
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:14:25 -07:00
Raul Garcia
8a48708014
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:14:13 -07:00
Raul Garcia
2bac181094
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:53 -07:00
Raul Garcia
a4e35a97ea
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:38 -07:00
Raul Garcia
a51d713925
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:12 -07:00
Jeroen Ketema
f7c4fa691d
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-07-12 16:59:15 +02:00
Erik Krogh Kristensen
8e52fc97fc
changes based on review by Shack
2022-07-12 16:02:50 +02:00
Erik Krogh Kristensen
220ff3cb2e
convert tabs to spaces in qhelp
2022-07-12 16:02:50 +02:00
Erik Krogh Kristensen
712805f3bf
add a!=b to the overlap predicate
2022-07-12 16:02:50 +02:00
Erik Krogh Kristensen
592464d98b
simplify the overlap computation
2022-07-12 16:02:50 +02:00
Erik Krogh Kristensen
aae3e2ddde
other changes based on Esbens review
2022-07-12 16:02:50 +02:00
Erik Krogh Kristensen
ff25451699
rename query to overly-large-range, and rewrite the @description
2022-07-12 16:02:46 +02:00
Ian Lynagh
a0636ff843
Merge pull request #9545 from igfoo/igfoo/type_cycles
...
Java: Fix RefType.getAStrictAncestor() in the presence of type hierarchy cycles
2022-07-12 14:28:54 +01:00
Jeroen Ketema
8f9d419441
C++: Add change note
2022-07-12 15:24:09 +02:00
Jeroen Ketema
e5eabc4e47
C++: Slightly tweak nullness test and update test results
2022-07-12 15:23:33 +02:00
Jeroen Ketema
d63b0946d9
C++: Use ConditionDeclExpr in AnalysedExpr::isDef
2022-07-12 15:22:13 +02:00
Jeroen Ketema
2ceb25dc9a
C++: Order left and right operands in the logical left to right order
2022-07-12 15:21:37 +02:00
Ian Lynagh
d0bf424b19
Merge pull request #9806 from igfoo/igfoo/useType
...
Kotlin: Extract an ErrorType if we fail to correctly extract a type
2022-07-12 13:45:04 +01:00
Ian Lynagh
1bcb17b760
Update java/ql/lib/change-notes/2022-07-12-errortype.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-07-12 12:16:24 +01:00
Paolo Tranquilli
48c71c9407
Swift: add comment about TypeRepr in ASTNode fetching
2022-07-12 12:10:22 +02:00
Jeroen Ketema
de6a9375ba
Merge pull request #9804 from jketema/get-target
...
C++: Clarify the "most-specific" part of `FunctionCall:getTarget`
2022-07-12 12:06:50 +02:00
Ian Lynagh
2edeeaac0e
Merge pull request #9801 from igfoo/igfoo/psi
...
Kotlin: We can't extract comments for < 1.5.20
2022-07-12 11:01:30 +01:00
Ian Lynagh
965f5a980a
Java/Kotlin: Add changenote for ErrorType
2022-07-12 10:58:16 +01:00
Henry Mercer
2ddcf8364c
Merge pull request #9585 from github/henrymercer/packaging-on-ghes
...
Docs: Document packaging support for CodeQL CLI 2.9.4+ on GHES 3.6+
2022-07-12 10:36:03 +01:00
Paolo Tranquilli
033b239b22
Swift: collapse TypeRepr hierarchy
...
Now `TypeRepr` is a final class in the AST, which is more or less just
a type with a location in code.
As the frontend does not provide a direct way to get a type from a
type representation, this information must be provided when fetching
the label of a type repr.
This meant:
* removing the type repr field from `EnumIsCaseExpr`: this is a virtual
AST node introduced in place of some kinds of `IsEpxr`. The type
repr is still available from the `ConditionalCheckedCastExpr` wrapped
by this virtual node, and we will rebuild the original `IsExpr` with
the IPA layer.
* some logic to get the type of keypath roots has been added to
`KeyPathExpr`. This was done to keep the `TypeRepr` to `Type` relation
total in the DB, but goes against the design of a dumb extractor. The
logic could be moved to QL in the future
* in the control flow library, `TypeRepr` children are now ignored. As
far as I can tell, there is no runtime evaluation going on in
`TypeRepr`s, so it does not make much sense to have control flow
through them.
2022-07-12 10:49:14 +02:00
Nick Rolfe
685389d219
Merge pull request #9797 from github/nickrolfe/railties_fix
...
Ruby: fix defining every dataflow node as a command execution sink
2022-07-12 09:30:55 +01:00
Jeroen Ketema
c75599c3da
C++: Clarify the "most-specific" part of FunctionCall:getTarget
2022-07-12 10:28:19 +02:00
Nick Rolfe
217c9a8aaf
Fix typo in changenote
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-12 08:50:58 +01:00
Paolo Tranquilli
47a4cac8ee
Merge branch 'main' into redsun82/swift-extraction
2022-07-12 09:29:10 +02:00
Paolo Tranquilli
70838fe57f
Merge pull request #9774 from github/redsun82/swift-disable-change-note-check
...
Swift: disable change note checking for now
2022-07-12 09:28:37 +02:00
Shyam Mehta
65b9947428
Incorporate jksco's feedback
2022-07-12 02:02:31 -04:00
smehta23
781a2a73d3
Merge branch 'main' into feat/SM/java_partial_path_traversal_vulnerability
2022-07-12 01:48:12 -04:00
Raul Garcia
d5791e2d56
Addressing feedback from the PR
2022-07-11 15:45:15 -07:00
Aditya Sharad
02e11b7ee9
Docs: Add links from query help to query pack changelog for each language
2022-07-11 13:59:38 -07:00
Raul Garcia
ac05577966
Making various changes based on the feedback. Pending: 2 non-trivial fixes for Java & Python.
2022-07-11 13:25:35 -07:00
Raul Garcia
e5702d0e15
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 13:07:37 -07:00
Raul Garcia
7fc9ae6c49
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 13:07:20 -07:00
Andrew Eisenberg
022acf2de0
Merge pull request #9570 from github/aeisenberg/docs/packs-with-paths
...
Update docs to include how to run a pack with path
2022-07-11 11:40:11 -07:00
Ian Lynagh
960d1dba8a
Kotlin: We can't etract comments for < 1.5.20
...
We were making our own PsiSourceManager, but that didn't know about any
IrFile -> PsiFile mappings.
2022-07-11 19:36:43 +01:00
Ian Lynagh
4c68624b00
Kotlin: Pass a FileLogger to Psi2Ir
2022-07-11 19:17:21 +01:00
Ian Lynagh
b9072a3594
Kotlin: Share a Psi2Ir instance
2022-07-11 18:57:43 +01:00
Henry Mercer
4704269086
Add example registry authentication string
2022-07-11 18:36:03 +01:00
Nick Rolfe
a3628b06f1
Ruby: fix markup in changenote
2022-07-11 17:23:45 +01:00
Nick Rolfe
032aa56dc3
Ruby: add change note for system command execution sink bug
2022-07-11 17:00:07 +01:00
Nick Rolfe
6632dfaf88
Ruby: fix another SystemCommandExecution::isShellInterpreted implementation
2022-07-11 16:53:30 +01:00
Raul Garcia
5d89a5d164
Update csharp/ql/src/experimental/Security Features/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 08:42:50 -07:00
Raul Garcia
156bc34cda
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-11 08:41:05 -07:00
thiggy1342
ad7c3e7217
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-11 10:20:07 -04:00
thiggy1342
539fbbc126
Merge branch 'main' into experimental-strong-params
2022-07-11 10:20:00 -04:00
Nick Rolfe
348ad95fc0
Ruby: fix defining every dataflow node as a command execution sink
2022-07-11 15:06:27 +01:00
Paolo Tranquilli
93d06daf67
Swift: allow skipping fields in cppgen
...
Some fields of base classes pose some problems with diamond hierarchies,
and we don't use them any way as we are emitting them using directly
trap entries instead of structured C++ classes.
This introduces a `cpp_skip` pragma to skip generation of those fields
in structured generated C++ classes, and applies it to `is_unknown` and
`location`.
2022-07-11 15:59:21 +02:00
Paolo Tranquilli
39406436bf
Swift: extract IfConfigDecl
...
This also adds `UnresolvedDeclRefExpr` tests, as `IfConfigDecl`
consistently introduces those.
2022-07-11 15:11:13 +02:00
Ben Rodes
a6048dd594
Merge branch 'github:main' into main
2022-07-11 08:49:13 -04:00
Jeroen Ketema
93a4a32527
Merge pull request #9786 from jketema/lossy
...
C++: LossyFunctionResultCast updates
2022-07-11 14:14:33 +02:00
Robert Marsh
bbd7e62341
Merge pull request #9793 from jketema/nullness
...
C++: Add tests for `AnalysedExpr::isNullCheck` and `AnalysedExpr::isValidCheck`
2022-07-11 08:07:24 -04:00
Ian Lynagh
28a8999b74
Java: Add an upgrade script
2022-07-11 12:09:48 +01:00
Ian Lynagh
aa07600f5a
Java: Update stats
2022-07-11 12:09:48 +01:00
Erik Krogh Kristensen
9ed7aa9fae
exclude variables in .vue files form js/unused-local-variable
2022-07-11 12:52:23 +02:00
Chris Smowton
74641ccfee
Simplify test for no-arg constructor
2022-07-11 11:01:19 +01:00
Jeroen Ketema
6b2154eb8b
C++: Add tests for AnalysedExpr::isNullCheck and AnalysedExpr::isValidCheck
2022-07-11 11:54:48 +02:00
Paolo Tranquilli
7d5dd384c3
Swift: extract UnresolvedPatternExpr
2022-07-11 10:59:00 +02:00
Paolo Tranquilli
7c3cadc9b6
Swift: extract OpenedArchetypeType
2022-07-11 10:48:21 +02:00
thiggy1342
e8e8da1b31
fix lib test expect for ActionController
2022-07-08 19:01:01 +00:00
thiggy1342
5d3232c614
refactor to use data flow
2022-07-08 18:53:24 +00:00
thiggy1342
96e66c4a50
move tests
2022-07-08 18:39:04 +00:00
thiggy1342
0435105d16
Merge remote-tracking branch 'upstream/main' into experimental-strong-params
2022-07-08 18:36:09 +00:00
thiggy1342
6aab970a9e
refactor query to use cfg and dataflow
2022-07-08 18:32:54 +00:00
thiggy1342
bd50fd7f1e
format fix
2022-07-08 17:20:41 +00:00
thiggy1342
11e39aa030
Add changelog
2022-07-07 21:40:16 +00:00
thiggy1342
940254d251
update framework tests
2022-07-07 19:39:59 +00:00
thiggy1342
b4869158f2
expand query tests for cwe-089
2022-07-07 19:23:57 +00:00
thiggy1342
2f1cfa816f
Add annotate arguments as sqli sink
2022-07-07 19:23:06 +00:00
Raul Garcia
f8994d04d6
Clean up
2022-07-07 11:49:05 -07:00
REDMOND\brodes
4379aa4398
Adding Initializer in condition as an occurance of isDef
2022-07-07 10:32:36 -04:00
Raul Garcia
01da877d0e
Moving the new query to experimental. It was added to the wrong folder initially.
2022-07-06 14:07:14 -07:00
Jeroen Ketema
0b471c2007
C++: Improve LossyFunctionResultCast join order
...
Before on wireshark:
```
Tuple counts for #select#ff@eca61bf2:
180100 ~2% {2} r1 = SCAN Type::Type::getUnderlyingType#dispred#f0820431#ff OUTPUT In.1, In.0
84 ~2% {2} r2 = JOIN r1 WITH project#Type::FloatingPointType#class#2e8eb3ef#fffff ON FIRST 1 OUTPUT Lhs.1, Rhs.0
2021 ~0% {2} r3 = JOIN r2 WITH Function::Function::getType#dispred#f0820431#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2437 ~0% {2} r4 = JOIN r3 WITH Call::FunctionCall::getTarget#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
2150 ~0% {2} r5 = r4 AND NOT LossyFunctionResultCast::whiteListWrapped#377b528a#f(Lhs.1)
2150 ~0% {2} r6 = SCAN r5 OUTPUT In.1, In.0
313 ~0% {3} r7 = JOIN r6 WITH exprconv ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
313 ~0% {3} r8 = JOIN r7 WITH Cast::Conversion#class#1f33e835#b ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2
148 ~3% {2} r9 = JOIN r8 WITH Expr::Expr::isCompilerGenerated#f0820431#b ON FIRST 1 OUTPUT Lhs.2, Lhs.1
148 ~1% {3} r10 = JOIN r9 WITH Expr::Expr::getActualType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
21 ~0% {3} r11 = JOIN r10 WITH Type::IntegralType#class#2e8eb3ef#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0
21 ~0% {3} r12 = JOIN r11 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
21 ~0% {2} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, ("Return value of type " ++ Lhs.2 ++ " is implicitly converted to " ++ Rhs.1 ++ " here.")
return r13
```
After:
```
Tuple counts for #select#ff@a5a185eg:
20 ~0% {2} r1 = SCAN project#Type::FloatingPointType#class#2e8eb3ef#fffff OUTPUT In.0, In.0
20 ~0% {2} r2 = JOIN r1 WITH project#Type::FloatingPointType#class#2e8eb3ef#fffff ON FIRST 1 OUTPUT Lhs.1, Lhs.0
84 ~2% {2} r3 = JOIN r2 WITH Type::Type::getUnderlyingType#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2021 ~0% {2} r4 = JOIN r3 WITH Function::Function::getType#dispred#f0820431#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2437 ~0% {2} r5 = JOIN r4 WITH Call::FunctionCall::getTarget#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
2150 ~0% {2} r6 = r5 AND NOT LossyFunctionResultCast::whiteListWrapped#377b528a#f(Lhs.1)
2150 ~0% {2} r7 = SCAN r6 OUTPUT In.1, In.0
313 ~0% {3} r8 = JOIN r7 WITH exprconv ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
313 ~0% {3} r9 = JOIN r8 WITH Cast::Conversion#class#1f33e835#b ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2
148 ~3% {2} r10 = JOIN r9 WITH Expr::Expr::isCompilerGenerated#f0820431#b ON FIRST 1 OUTPUT Lhs.2, Lhs.1
148 ~1% {3} r11 = JOIN r10 WITH Expr::Expr::getActualType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
21 ~0% {3} r12 = JOIN r11 WITH Type::IntegralType#class#2e8eb3ef#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0
21 ~0% {3} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
21 ~0% {2} r14 = JOIN r13 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, ("Return value of type " ++ Lhs.2 ++ " is implicitly converted to " ++ Rhs.1 ++ " here.")
return r14
```
2022-07-06 21:53:12 +02:00
Jeroen Ketema
7d6fb7f91a
C++: Rename LossyFunctionResultCast tests to be correctly named
2022-07-06 21:52:13 +02:00
REDMOND\brodes
74ff579dbc
Fixing logic bug with LogicalAndExpr
2022-07-06 15:19:36 -04:00
Raul Garcia
97d9fd9846
Update security-validation-disabled.ql
2022-07-05 15:18:56 -07:00
Raul Garcia
dd1a9a22e3
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-05 13:58:38 -07:00
Raul Garcia
f5c6b45014
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-05 13:58:11 -07:00
Raul Garcia
56060e0610
Update csharp/ql/src/experimental/Security Features/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-05 13:57:28 -07:00
ihsinme
8967f57bbc
Update DangerousUseMbtowc.ql
2022-07-04 11:17:12 +03:00
ihsinme
4e28887689
Create test3.cpp
2022-07-04 11:13:07 +03:00
ihsinme
1ce42dcd30
Create test2.cpp
2022-07-04 11:12:34 +03:00
ihsinme
6d800de377
Create test1.cpp
2022-07-04 11:11:49 +03:00
ihsinme
f53adca108
Update DangerousUseMbtowc.ql
2022-07-04 11:10:02 +03:00
Mathias Vorreiter Pedersen
3bacb18315
Merge pull request #9770 from MathiasVP/nomagic-use-in-own-init
...
C++: Add `nomagic` to `VariableAccessInInitializer`
2022-07-02 16:35:45 +01:00
Chris Smowton
4d45a2ca87
Merge pull request #9775 from smowton/smowton/fix/accessors-respect-private-member-exclusion
...
Kotlin: don't extract private setters of external classes
2022-07-02 10:27:06 +01:00
Raul Garcia
fcb01ef28d
Merge branch 'github:main' into Token_validation
2022-07-01 17:37:05 -07:00
Raul Garcia
62c28571c6
making changes based on feedback during PR
2022-07-01 17:35:02 -07:00
Raul Garcia
e43e5810cf
New queries to detect unsafe client side encryption in Azure Storage
2022-07-01 17:08:35 -07:00
Mathias Vorreiter Pedersen
e98bdbf73f
Merge pull request #9773 from geoffw0/stringlengthconflation4
...
Swift: More improvements to swift/string-length-conflation
2022-07-01 17:46:04 +01:00
Geoffrey White
e38254c05e
Swift: Fix typo.
2022-07-01 17:00:36 +01:00
Shyam Mehta
39f885413f
Change log
2022-07-01 11:34:56 -04:00
Ian Lynagh
1730ec22d9
Kotlin: Extract an ErrorType if we fail to correctly extract a type
2022-07-01 16:33:43 +01:00
smehta23
391dd5b38d
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalGood.java
...
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com >
2022-07-01 10:55:58 -04:00
smehta23
ebe48ec30a
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.qhelp
...
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com >
2022-07-01 10:53:43 -04:00
smehta23
48e16e52b5
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.qhelp
...
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com >
2022-07-01 10:52:41 -04:00
Shyam Mehta
1a41d4c379
Add CVE number
2022-07-01 10:51:33 -04:00
Chris Smowton
b499ba5aa8
Kotlin: don't extract private setters of external classes
...
Previously these would get extracted unlike other private methods even if the class was a standard library or other external class. This could cause inconsistencies because if we also compiled the class from source we could end up deciding different names for the property's setter: setXyz$private when seen from source, and setXyz without a
suffix when seen as an external .class file. Avoiding extracting these functions from the external perspective both restores consistency with other kinds of method and avoids these consistency problems.
2022-07-01 15:44:17 +01:00
Shyam Mehta
300a14c35c
Add ESAPI reference
2022-07-01 10:43:59 -04:00
Paolo Tranquilli
c393c9b03e
Revert "Fix change note check to accept changes to itself"
...
This reverts commit 2dca78295d .
2022-07-01 16:41:09 +02:00
smehta23
209a21655a
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalGood.java
...
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com >
2022-07-01 10:40:38 -04:00
smehta23
c6f2f61bfb
Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalBad.java
...
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com >
2022-07-01 10:39:46 -04:00
Paolo Tranquilli
2dca78295d
Fix change note check to accept changes to itself
...
The file is not removed from the triggers, as we still want to check
that the workflow file itself is correct.
2022-07-01 16:35:30 +02:00
Paolo Tranquilli
e88cc31468
Swift: disable change note checking for now
2022-07-01 16:16:21 +02:00
Paolo Tranquilli
563d27333a
Merge pull request #9772 from github/redsun82/swift-extraction
...
Swift: extract ImportDecl and ModuleDecl
2022-07-01 16:14:23 +02:00
Geoffrey White
34ffd1aac5
Swift: Support String.Index and flow through * /.
2022-07-01 14:59:50 +01:00
Geoffrey White
d60d2457c2
Swift: Add String.Index.init as a source as as well.
2022-07-01 14:59:50 +01:00
Geoffrey White
bc03f6959c
Swift: Detect String -> NSString results.
2022-07-01 14:59:50 +01:00
Geoffrey White
a306f312cd
Swift: Add a test of converting Range to NSRange.
2022-07-01 14:59:50 +01:00
Geoffrey White
416977dc50
Swift: Add test cases for removeFirst, removeLast.
2022-07-01 14:59:50 +01:00
Paolo Tranquilli
8addc06799
Swift: add integration test for multiple modules
2022-07-01 15:59:36 +02:00
Paolo Tranquilli
227dad8bf5
Merge main into redsun82/swift-extraction
2022-07-01 15:56:23 +02:00
Paolo Tranquilli
7a1c3800e6
Merge pull request #9771 from github/redsun82/swift-integration-test-runner
...
Swift: locally run integration tests
2022-07-01 15:54:27 +02:00
Paolo Tranquilli
e575bab9d6
Revert unwanted committed files
2022-07-01 15:45:28 +02:00
Paolo Tranquilli
f9143f7855
Swift: fix extraction of empty files
2022-07-01 15:43:16 +02:00
Chris Smowton
4c6a9772af
Merge pull request #9768 from smowton/smowton/fix/internal-method-name-mangling
...
Kotlin: Mangle names of internal functions to match JVM symbols
2022-07-01 14:33:32 +01:00
Paolo Tranquilli
3a975174c3
Swift: extract ImportDecl and ModuleDecl
...
As `ASTMangler` crashes when called on `ModuleDecl`, we simply use
its name.
This might probably not work reliably in a scenario where multiple
modules are compiled with the same name (like `main`), but this is left
for future work. At the moment this cannot create DB inconsistencies.
2022-07-01 15:29:30 +02:00
Paolo Tranquilli
7a7440a115
Swift: move createEntry to SwiftDispatcher
2022-07-01 15:22:44 +02:00
Paolo Tranquilli
24da81fdb0
Swift: disable integration tests on macOS for now
...
Also, add swift workflow to code owned by the C team
2022-07-01 15:00:05 +02:00
Paolo Tranquilli
901e066355
Swift: locally run integration tests
...
Minimal recreations of internal `integration-tests-runner.py` and
`create_database_utils.py` are provided to be able to run the
integration tests on the codeql repository with a released codeql CLI.
For the moment we skip the database checks by default, as we are still
producing inconsistent results.
2022-07-01 15:00:05 +02:00
yoff
f52d792b36
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
2022-07-01 12:01:07 +00:00
CodeQL CI
5b5a52fa25
Merge pull request #9551 from yoff/python/port-tarslip
...
Approved by RasmusWL
2022-07-01 12:58:25 +01:00
yoff
61523bd330
python: better names
...
- "Normal" instead of "NonSpecial"
- "NonLibrary" instead of "2"
I could not find a good replacement for "NonLibrary", nor for "Source",
but I added QLDocs in a few places to help the reading.
2022-07-01 11:55:20 +00:00
yoff
a0db438799
python: rename getACall2 -> getANonLibraryCall
2022-07-01 10:29:03 +00:00
Erik Krogh Kristensen
7dd095c0d2
Merge pull request #9756 from erik-krogh/greyMatter
...
JS: add model for the gray-matter library to js/code-injection
2022-07-01 12:19:12 +02:00
Mathias Vorreiter Pedersen
e4636be8db
C++: Add 'nomagic' to the charpred of 'VariableAccessInInitializer'.
2022-07-01 11:07:18 +01:00
yoff
f6af24894d
python: recover isPackageUsed
...
- add `unknownAttribute` to pre-compute negation
- add `Node`-less formulation of "is imported"
2022-07-01 09:39:07 +00:00
Chris Smowton
14aef792e0
Accept test changes
2022-07-01 10:35:17 +01:00
Chris Smowton
df78b7e54b
Merge pull request #9755 from smowton/smowton/feature/implement-jvmstatic-annotation
...
Kotlin: support JvmStatic annotation
2022-07-01 10:14:08 +01:00
yoff
71583bf6be
python: fix import of AccessPathSyntax
2022-07-01 08:48:55 +00:00
yoff
3a80baf39c
python: concession to get the code to compile
...
`isPackageUsed` now does no filtering
2022-07-01 07:06:09 +00:00
yoff
e54ada175d
python: rewrite not away
...
A `LocalSourceNode` is either a `ModuleVariableNode`
or an `ExprNode`.
2022-07-01 07:03:14 +00:00
Paolo Tranquilli
8336c67edb
Merge pull request #9762 from github/alexdenisov/vfs-followup
...
Swift: cleanup
2022-07-01 09:00:54 +02:00
Chris Smowton
b9eec13466
Accept integration test changes
2022-06-30 22:21:04 +01:00
Chris Smowton
dd93062101
Kotlin: Mangle names of internal functions to match JVM symbols
2022-06-30 21:56:25 +01:00
Ian Lynagh
144c0d63b1
Merge pull request #9766 from igfoo/igfoo/extension
...
Kotlin: Fix a label
2022-06-30 21:16:26 +01:00
Erik Krogh Kristensen
ef0ec396c4
Merge pull request #9754 from erik-krogh/chownr
...
JS: add model for chownr
2022-06-30 22:02:45 +02:00
Jeroen Ketema
08b1c5495a
Merge pull request #9767 from igfoo/igfoo/typo
...
C++: Typo: intrepret
2022-06-30 20:00:03 +02:00
Ian Lynagh
57e026d617
C++: Typo: intrepret
2022-06-30 18:22:17 +01:00
Henry Mercer
9b424ac8b2
Docs: Update guidance to install the _latest_ version of the bundle
2022-06-30 17:38:18 +01:00
Henry Mercer
92a9738bd5
Docs: Fix precedence of registries list
2022-06-30 17:32:00 +01:00
Henry Mercer
3bb51c2643
Fix rst header
2022-06-30 17:07:42 +01:00
Ian Lynagh
b373af47d1
Kotlin: Fix a label
...
We want the .javaResult.id of a TypeResults.
2022-06-30 16:59:18 +01:00
Chris Smowton
570e418b22
Fix ordering PrintAst nodes
2022-06-30 16:07:32 +01:00
Chris Smowton
ec95cbace4
PrintAst: Tie-break multiple class members created at the same source location
...
Otherwise Kotlin introducing a getter, setter and field declaration based on the same property tied in the sort order, and so could be output in different orders on different machines.
2022-06-30 15:29:56 +01:00
Chris Smowton
0d0d240fd4
Accept test changes re: new compiler-generated nodes
2022-06-30 15:29:20 +01:00
Ian Lynagh
83fd9c3b3e
Merge pull request #9763 from igfoo/igfoo/foreach
...
Kotlin: Replace a map call with forEach
2022-06-30 15:02:57 +01:00
Mathias Vorreiter Pedersen
6b5785bffa
Merge pull request #9765 from geoffw0/stringlengthconflation3
...
Swift: Improvements to the string length conflation query
2022-06-30 14:49:12 +01:00
Erik Krogh Kristensen
eaec1ac561
add change-note
2022-06-30 15:11:49 +02:00
yoff
cf9b69b5f2
python: More helpful comment
2022-06-30 13:07:13 +00:00
yoff
b0a29b146a
Update python/ql/lib/semmle/python/security/dataflow/TarSlipQuery.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-30 14:54:01 +02:00
yoff
df7ffb2880
Update python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-30 14:53:49 +02:00
Ian Lynagh
0e56e50d18
Kotlin: Replace a map call with forEach
2022-06-30 13:50:22 +01:00
Chris Smowton
8214c3b78e
Add AST dump for JvmStatic annotation test
2022-06-30 13:11:43 +01:00
Chris Smowton
98761041f1
Prevent labelling proxies of default getters and setters as themselves default getters and setters
2022-06-30 13:11:00 +01:00
Chris Smowton
bf581b971c
Rename willExtract properties to shouldExtract
2022-06-30 12:51:09 +01:00
Chris Smowton
5a47e1dd95
Annotate generated static proxy methods as compiler-generated
2022-06-30 12:48:11 +01:00
Chris Smowton
466cf7573b
Autoformat
2022-06-30 12:42:39 +01:00
Chris Smowton
b4124ac553
Add test
2022-06-30 12:42:39 +01:00
Chris Smowton
bfdb21d551
Kotlin: support JvmStatic annotation
...
This makes non-companion object methods into static methods, and for companion objects introduces static proxy methods that call the companion instance method.
Note this doesn't quite implement what kotlinc does, since it will also eliminate getters and setters by promoting an object field into a static field, but our translation is simpler and only differs in private members' details.
2022-06-30 12:42:38 +01:00
Chris Smowton
28c05e7a56
Merge pull request #9704 from smowton/smowton/fix/generic-inner-class
...
Kotlin: note that raw inner classes nest within a raw outer
2022-06-30 12:10:36 +01:00
Geoffrey White
68c76006bd
Swift: Allow trivial taint-like flow.
2022-06-30 11:52:57 +01:00
Geoffrey White
0251fb2d35
Swift: Add result annotations to test.
2022-06-30 11:52:44 +01:00
Geoffrey White
2bd25fc589
Swift: Add QLDoc.
2022-06-30 11:52:17 +01:00
Mathias Vorreiter Pedersen
51e3ff9d09
Merge pull request #9736 from github/redsun82/swift-fix-warnings
...
Swift: fix QL warnings about overriding methods
2022-06-30 11:44:44 +01:00
Alex Denisov
5a04d62969
Swift: cleanup extraction
2022-06-30 12:32:03 +02:00
Alex Denisov
133a6caaa3
Swift: cleanup output rewriting code
2022-06-30 12:03:53 +02:00
AlexDenisov
4367044a8b
Merge pull request #9702 from github/alexdenisov/swift-multiple-modules
...
Swift: emit intermediate build artifacts for own consumption later
2022-06-30 11:24:48 +02:00
Chris Smowton
ab52a020fa
Add test
2022-06-30 10:22:56 +01:00
Chris Smowton
8e5bbea9f9
Use map...firstOrNull not firstNotNullOfOrNull
...
The latter was introduced in Kotlin 1.5, so we can't use it in all supported versions.
2022-06-30 10:15:44 +01:00
Chris Smowton
2d98eb591e
Kotlin: note that raw inner classes nest within a raw outer.
...
Previously the Java extractor did this but the Kotlin extractor nested them within an unbound outer type.
2022-06-30 10:15:44 +01:00
AlexDenisov
d42b752c6d
Apply suggestions from code review
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:10:43 +02:00
Nick Rolfe
02dd933e5f
Ruby: move Pathname from core to stdlib
2022-06-30 10:08:25 +01:00
AlexDenisov
b5c1ec8958
Update swift/extractor/SwiftOutputRewrite.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:08:23 +02:00
AlexDenisov
6b0e734c47
Update swift/extractor/SwiftOutputRewrite.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:06:03 +02:00
AlexDenisov
b9f4a09f19
Merge branch 'main' into alexdenisov/swift-multiple-modules
2022-06-30 10:13:34 +02:00
AlexDenisov
de9e8855a8
Merge pull request #9759 from github/alexdenisov/fix-test-file
...
Swift: fix test case
2022-06-30 09:33:19 +02:00
Tony Torralba
48d85407ad
Merge pull request #9757 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-06-30 09:21:04 +02:00
Erik Krogh Kristensen
11be15aab1
inline field into the charpred
2022-06-30 09:00:10 +02:00
Erik Krogh Kristensen
f71a64b99d
recognize when the js engine in gray-matter is set to something safe
2022-06-30 09:00:10 +02:00
Erik Krogh Kristensen
22d285f777
add model for the gray-matter libary to js/code-injection
2022-06-30 09:00:10 +02:00
Alex Denisov
1dd3141e2d
Swift: address more code review comments
2022-06-30 08:57:22 +02:00
Alex Denisov
35da75f685
Swift: rename method
2022-06-30 08:48:36 +02:00
AlexDenisov
522d48aa33
Apply suggestions from code review
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-06-30 08:47:17 +02:00
Alex Denisov
5d5f3f82b1
Swift: fix test case
2022-06-30 07:41:28 +02:00
AlexDenisov
7ee11056d7
Merge pull request #9750 from github/alexdenisov/extract-imported-modules
...
Swift: also extract imported modules
2022-06-30 07:15:51 +02:00
github-actions[bot]
e9d3f658a3
Add changed framework coverage reports
2022-06-30 00:18:31 +00:00
Shyam Mehta
16814071df
Fix typo in .qhelp
2022-06-29 18:03:57 -04:00
Shyam Mehta
7ab8f0262c
Fix duplicate class header and better fix using toPath()
2022-06-29 18:01:12 -04:00
Shyam Mehta
955e614563
Add documentation of the Partial Path Traversal vuln
2022-06-29 17:31:04 -04:00
Erik Krogh Kristensen
7cef4322e7
add model for chownr
2022-06-29 22:09:23 +02:00
Andrew Eisenberg
fbeecd6c08
Merge pull request #9744 from github/aeisenberg/move-contextual-queries
2022-06-29 11:44:33 -07:00
Andrew Eisenberg
06c68661ed
Merge pull request #9753 from github/aeisenberg/pack-pull-quote
...
Recommend installing the latest version of the CLI to use packaging
2022-06-29 10:46:24 -07:00
Erik Krogh Kristensen
399fd85fd8
Merge pull request #9748 from erik-krogh/navigation
...
JS: add navigation.navigate as an XSS / URL sink
2022-06-29 19:34:59 +02:00
Andrew Eisenberg
3c8f415f69
Recommend installing the latest version of the CLI to use packaging
2022-06-29 10:33:27 -07:00
Andrew Eisenberg
7864a7580e
Fix import statements
2022-06-29 10:22:45 -07:00
Andrew Eisenberg
41244180b3
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-06-29 10:18:13 -07:00
Andrew Eisenberg
ddf06f8617
Add change notes and qldoc for moved files
2022-06-29 10:03:12 -07:00
Henry Mercer
4dcec2b98c
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-06-29 17:49:59 +01:00
Alex Denisov
5233a5e17b
Swift: also extract imported modules
2022-06-29 17:27:57 +02:00
Andrew Eisenberg
a3f4d1bf66
Move contextual queries from src to lib
...
With this change, users are now able to run View AST command in
vscode within vscode workspaces that do not include the core libraries.
The relevant core library only needs to be installed in the package
cache.
2022-06-29 07:51:26 -07:00
Alex Ford
578a967160
Merge pull request #9641 from boveus/patch-1
...
Make ActiveRecordInstanceMethodCall Public
2022-06-29 14:39:36 +01:00
Paolo Tranquilli
d00fec34c3
Merge pull request #9336 from MathiasVP/swift-decls-in-cfg
...
Swift: CFG for local declarations
2022-06-29 15:10:45 +02:00
Erik Krogh Kristensen
0e4954a68c
add navigation.navigate as an XSS / URL sink
2022-06-29 14:56:20 +02:00
Brandon Stewart
5888325549
Merge branch 'main' into patch-1
2022-06-29 08:42:24 -04:00
Mathias Vorreiter Pedersen
e03646aba4
Merge pull request #9737 from geoffw0/arithmetic
...
Swift: Add ArithmeticOperation.qll library
2022-06-29 13:40:20 +01:00
Nick Rolfe
5db2f9a768
Merge remote-tracking branch 'origin/main' into nickrolfe/pathname
2022-06-29 13:16:49 +01:00
Nick Rolfe
c1302a90e0
Ruby: use MaD for more precise Pathname flow summaries
2022-06-29 13:16:18 +01:00
yoff
8988a02806
Merge pull request #9733 from tausbn/python-fix-bad-mro-flatten-list-join
...
Python: Fix bad join in MRO `flatten_list`
2022-06-29 13:29:48 +02:00
yoff
f122af81ea
Merge pull request #9741 from tausbn/python-fix-bad-join-in-regexpbackref-getgroup
...
Python: Fix bad join in `RegExpBackRef::getGroup`
2022-06-29 13:23:07 +02:00
Mathias Vorreiter Pedersen
f35ab7c292
Swift: Accept test changes to the cfg. These happen due to the fixes in 9e0cf62cda.
2022-06-29 12:20:07 +01:00
Erik Krogh Kristensen
9ecc3a2671
filter out potential misparses from java/suspicious-regexp-range
2022-06-29 13:16:40 +02:00
Erik Krogh Kristensen
2e295e4a04
filter out potential misparses from rb/suspicious-regexp-range
2022-06-29 13:16:28 +02:00
yoff
731f866242
Merge pull request #9717 from tausbn/python-fix-bad-mro-linearization-of-bases-join
...
Python: Fix bad join in MRO
2022-06-29 13:08:18 +02:00
Mathias Vorreiter Pedersen
15dc08351e
Merge pull request #9747 from MathiasVP/fix-joins-in-swift-cwe-135
...
Swift: Don't join on index in `swift/string-length-conflation`
2022-06-29 11:58:36 +01:00
Geoffrey White
8b7535af81
Swift: Don't use abstract classes.
2022-06-29 11:49:22 +01:00
Geoffrey White
2cf65c7d35
Swift: Autoformat tests.
2022-06-29 11:49:21 +01:00
Geoffrey White
822002d37d
Swift: Missing qldoc.
2022-06-29 11:49:20 +01:00
Mathias Vorreiter Pedersen
cc25e2644f
Swift: Don't join on index in 'swift/string-length-conflation'.
2022-06-29 11:40:46 +01:00
Ian Lynagh
d285e19e77
Merge pull request #9731 from igfoo/igfoo/private
...
Kotlin: Make more methods private
2022-06-29 11:24:33 +01:00
Mathias Vorreiter Pedersen
4356155eeb
Merge branch 'main' into swift-decls-in-cfg
2022-06-29 10:03:34 +01:00
Alex Denisov
4d81206a87
Swift: teach extractor to emit build artifacts for later consumption
2022-06-29 10:58:24 +02:00
AlexDenisov
1997d6b18c
Merge pull request #9745 from github/alexdenisov/put-traps-into-a-temp-folder
...
Swift: store TRAP files in a temporary folder until the extraction is complete
2022-06-29 10:55:27 +02:00
Jeroen Ketema
55e052af26
Merge pull request #9686 from aschackmull/dataflow/no-node-scan
...
Dataflow performance: Avoid node scans
2022-06-29 10:38:56 +02:00
AlexDenisov
e1ef637c54
Update swift/extractor/SwiftExtractorConfiguration.h
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-06-29 10:16:14 +02:00
AlexDenisov
968ede3d4a
Merge pull request #9746 from github/alexdenisov/add-test-case-showing-modules-loading-issue
...
Swift: add a test case showing module loading problem
2022-06-29 10:07:56 +02:00
Paolo Tranquilli
296b8cb630
Merge pull request #9719 from github/redsun82/swift-enum-is-case
...
Swift: add EnumIsCase test
2022-06-29 09:55:20 +02:00
Tony Torralba
12fa6967dc
Merge pull request #8669 from joefarebrother/intent-verification
...
Java: Add query for Improper Verification of Intent by Broadcast Receiver (CWE-925)
2022-06-29 09:43:07 +02:00
Jeroen Ketema
8b13d1fab8
Merge pull request #9726 from github/rdmarsh2/stack-address-join-order
...
C++: fix join order in UsingExpiredStackAddress
2022-06-29 09:35:47 +02:00
Tony Torralba
741b2a923a
Merge pull request #9207 from joefarebrother/android-external-storage
...
Java: Add sources for Android external storage
2022-06-29 09:34:51 +02:00
Alex Denisov
57811a4efc
Swift: add a test case showing module loading problem
...
Extractor fails to load separate modules that were built by another
version of an actual compiler.
2022-06-29 07:38:18 +02:00
Alex Denisov
488befb577
Swift: store TRAP files in a temporary folder until the extraction is complete
...
Currently, we have a number of assertions in the codebase and certain
assumptions about the AST. These don't always hold, sometimes leading to
a crash in the extractor.
The crashes leave incomplete TRAP files that cannot be imported into the
database.
With this change, we still get those incomplete TRAP files, but we also
get a database in the end (even thoough it is also incomplete as we
cannot import everything).
2022-06-29 07:17:06 +02:00
AlexDenisov
6c68872163
Merge pull request #9743 from MathiasVP/fix-path-problem
...
Swift: Fix `kind` in `swift/string-length-conflation`
2022-06-29 06:58:36 +02:00
Mathias Vorreiter Pedersen
c2e57c3c9b
Swift: Fix 'kind' in 'swift/string-length-conflation'.
2022-06-28 22:33:28 +01:00
Shyam Mehta
b5ca2c3d9d
Add additional tests from real world query run
2022-06-28 17:32:20 -04:00
Brandon Stewart
13fae22756
Merge branch 'main' into patch-1
2022-06-28 17:27:07 -04:00
yoff
1105cd569b
Merge branch 'main' into python/port-tarslip
2022-06-28 22:17:28 +02:00
yoff
6087bc6888
Merge branch 'main' into python/more-logic-tests
2022-06-28 22:16:38 +02:00
yoff
ac0c8d238f
python: only clear taint on false-edge
2022-06-28 20:14:52 +00:00
Shyam Mehta
7122f29296
Finish Partial Path Traversal Query
2022-06-28 15:02:06 -04:00
Shyam Mehta
4c7d476280
[JAVA] Partial Path Traversal Vuln Query
2022-06-28 13:52:41 -04:00
Taus
38b8640582
Python: Fix bad join in RegExpBackRef::getGroup
...
Although this wasn't (as far as I know) causing any performance issues,
it was making the join-order badness report quite noisy, and so I
figured it was worth fixing.
Before:
```
Tuple counts for RegexTreeView::RegExpBackRef::getGroup#dispred#f0820431#ff/2@d3441d0b after 84ms:
1501195 ~3% {2} r1 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1 'result'
149 ~0% {5} r2 = JOIN r1 WITH RegexTreeView::RegExpBackRef#class#31aac2a7#ffff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Rhs.3, Lhs.1 'result', Lhs.0 'this'
149 ~1% {3} r3 = JOIN r2 WITH regex::RegexString::numbered_backreference#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.3 'result', Rhs.3, Lhs.4 'this'
4 ~0% {2} r4 = JOIN r3 WITH RegexTreeView::RegExpGroup::getNumber#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
1501195 ~3% {2} r5 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'result', Rhs.1 'result'
42526 ~0% {5} r6 = JOIN r5 WITH RegexTreeView::RegExpGroup#31aac2a7#ffff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.0 'result', Rhs.1, Rhs.2, Rhs.3
22 ~0% {8} r7 = JOIN r6 WITH RegexTreeView::RegExpBackRef#class#31aac2a7#ffff ON FIRST 1 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.1 'result', Lhs.0 'this', Rhs.1, Rhs.2, Rhs.3
0 ~0% {6} r8 = JOIN r7 WITH regex::RegexString::getGroupName#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.5, Lhs.6, Lhs.7, Rhs.3, Lhs.3 'result', Lhs.4 'this'
0 ~0% {2} r9 = JOIN r8 WITH regex::RegexString::named_backreference#dispred#f0820431#ffff ON FIRST 4 OUTPUT Lhs.5 'this', Lhs.4 'result'
4 ~0% {2} r10 = r4 UNION r9
return r10
```
In this case I opted for a classical solution: tying together the
literal and number (or name) part of the backreference in order to
encourage a two-column join.
After:
```
Tuple counts for RegexTreeView::RegExpBackRef::getGroup#dispred#f0820431#ff/2@b0cc4d5n after 0ms:
898 ~1% {3} r1 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff WITH RegexTreeView::RegExpGroup::getNumber#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0 'result'
4 ~0% {2} r2 = JOIN r1 WITH RegexTreeView::RegExpBackRef::hasLiteralAndNumber#f0820431#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'this', Lhs.2 'result'
1110 ~0% {5} r3 = JOIN RegexTreeView::RegExpGroup#31aac2a7#ffff WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.0 'result', Rhs.1
146 ~0% {3} r4 = JOIN r3 WITH regex::RegexString::getGroupName#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.4, Rhs.3, Lhs.3 'result'
0 ~0% {2} r5 = JOIN r4 WITH RegexTreeView::RegExpBackRef::hasLiteralAndName#f0820431#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'this', Lhs.2 'result'
4 ~0% {2} r6 = r2 UNION r5
return r6
```
2022-06-28 16:51:09 +00:00
Andrew Eisenberg
0f8ffb12e6
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2022-06-28 09:45:54 -07:00
Mathias Vorreiter Pedersen
f97cc9e37c
Merge pull request #9739 from MathiasVP/swift-conflation-query-high-precision
...
Swift: Set 'swift/string-length-conflation' to precision `high`
2022-06-28 17:26:23 +01:00
Mathias Vorreiter Pedersen
1a7f5db8e2
Swift: Set 'swift/string-length-conflation' to precision high and delete the placeholder query.
2022-06-28 17:01:06 +01:00
Mathias Vorreiter Pedersen
f2ae73b6be
Merge pull request #9738 from geoffw0/misc
...
Swift: Add a Locatable.getFile() shortcut similar to the one in CPP.
2022-06-28 16:44:02 +01:00
Erik Krogh Kristensen
b81251865f
Merge pull request #9716 from erik-krogh/htmlTypeSan
...
JS: sanitize non-strings from html-constructed-from-input
2022-06-28 17:31:00 +02:00
Mathias Vorreiter Pedersen
677f6dafcd
Merge pull request #9732 from github/redsun82/swift-dot-syntax-call-expr
...
Swift: add DotSyntaxCallExpr tests
2022-06-28 16:09:10 +01:00
Geoffrey White
ff06e3cb6b
Swift: Add a Locatable.getFile() shortcut similar to the one in CPP.
2022-06-28 15:49:49 +01:00
Geoffrey White
8a8a7ead9b
Swift: Add tests for ArithmeticOperation.qll.
2022-06-28 15:34:23 +01:00
Geoffrey White
a5fff9af5d
Swift: Create ArithmeticOperation.qll.
2022-06-28 15:34:15 +01:00
Geoffrey White
9e0cf62cda
Swift: Fix + simplify LogicalOperation.qll.
2022-06-28 15:33:03 +01:00
Paolo Tranquilli
363f7a88a9
Swift: fix QL warnings about overriding methods
...
The `getName` in `Type.qll` was issuing a warning in other generated
classes having a `getName` from a `name` property in `schema.yml`.
To fix the possible inconsistency, `diagnostic_name` is being renamed to
`name` in the schema. Despite the scary doc comment on
`swift::Type::getString` (namely `for use in diagnostics only`), that
seems to be the right generic naming mechanism for types, and it
coincides with the name we were extracting on types with an explicit
`name` property.
In case we find a case where `Type::getString` gives something wrong,
we can probably just patch it on that specific type class.
2022-06-28 16:30:25 +02:00
Taus
b98c482c47
Python: Fix bad join in MRO flatten_list
...
This bad join was identified by the join-order-badness report, which
showed that:
py/use-of-input:MRO::flatten_list#f4eaf05f#fff#9c5fe54whnlqffdgu65vhb8uhpg# (order_500000)
calculated a whopping 212,820,108 tuples in order to produce an output of
size 55516, roughly 3833 times more effort than needed.
Here's a snippet of the slowest iteration of that predicate:
```
Tuple counts for MRO::flatten_list#f4eaf05f#fff/3@i1839#0265eb3w after 14ms:
0 ~0% {3} r1 = JOIN MRO::need_flattening#f4eaf05f#f#prev_delta WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'list', Rhs.2
0 ~0% {3} r2 = JOIN r1 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r3 = JOIN r2 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
0 ~0% {3} r4 = SCAN MRO::ConsList#f4eaf05f#fff#prev_delta OUTPUT In.2 'list', In.0, In.1
0 ~0% {3} r5 = JOIN r4 WITH MRO::need_flattening#f4eaf05f#f#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0 'list'
0 ~0% {3} r6 = JOIN r5 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'list', Rhs.1 'n'
0 ~0% {3} r7 = JOIN r6 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
0 ~0% {3} r8 = r3 UNION r7
26355 ~2% {3} r9 = SCAN MRO::ConsList#f4eaf05f#fff#prev OUTPUT In.2 'list', In.0, In.1
0 ~0% {3} r10 = JOIN r9 WITH MRO::need_flattening#f4eaf05f#f#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0 'list'
0 ~0% {3} r11 = JOIN r10 WITH MRO::ClassList::length#f0820431#ff#prev_delta ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'list', Rhs.1 'n'
0 ~0% {3} r12 = JOIN r11 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
...
```
(... and a bunch more lines. The same construction appears several times,
but the join order is the same each time.)
Clearly it would be better to start with whatever is in `need_flattening`,
and then do the other joins. This is what the present fix does (by
unbinding `list` in all but the `needs_flattening` call).
After the fix, the slowest iteration is as follows:
```
Tuple counts for MRO::flatten_list#f4eaf05f#fff/3@i2617#8155ab3w after 9ms:
0 ~0% {2} r1 = SCAN MRO::need_flattening#f4eaf05f#f#prev_delta OUTPUT In.0 'list', In.0 'list'
0 ~0% {3} r2 = JOIN r1 WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'list', Rhs.2
0 ~0% {3} r3 = JOIN r2 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r4 = JOIN r3 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
1 ~0% {2} r5 = SCAN MRO::need_flattening#f4eaf05f#f#prev OUTPUT In.0 'list', In.0 'list'
0 ~0% {3} r6 = JOIN r5 WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev_delta ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'list', Rhs.2
0 ~0% {3} r7 = JOIN r6 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r8 = JOIN r7 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
...
```
(... and so on. The remainder is 0 tuples all the way.)
In total, we went from
```
40.6s | 7614 | 15ms @ 1839 | MRO::flatten_list#f4eaf05f#fff@0265eb3w
```
to
```
7.8s | 7614 | 11ms @ 2617 | MRO::flatten_list#f4eaf05f#fff@8155ab3w
```
2022-06-28 14:17:47 +00:00
Paolo Tranquilli
5c6ac2a5f2
Swift: accept test results
2022-06-28 16:15:05 +02:00
Geoffrey White
63376da90f
Swift: Add tests for LogicalOperaion.qll.
2022-06-28 15:04:47 +01:00
Paolo Tranquilli
6ff45d3dbe
Merge main into redsun82/swift-enum-is-case
2022-06-28 16:03:38 +02:00
Brandon Stewart
c7b4133fbe
Merge branch 'main' into patch-1
2022-06-28 09:46:46 -04:00
Paolo Tranquilli
364085a596
Swift: add DotSyntaxCallExpr tests
2022-06-28 15:44:42 +02:00
AlexDenisov
c4c3a52804
Merge pull request #9730 from github/redsun82/swift-trap-newlines
...
Swift: add missing newlines in trap
2022-06-28 15:41:05 +02:00
Ian Lynagh
3026456a39
Kotlin: Make more methods private
2022-06-28 14:38:13 +01:00
Jeroen Ketema
a7956ad422
C++: Add change note
2022-06-28 15:32:43 +02:00
Jeroen Ketema
82c9b8b494
C++: Ensure only one Variable exists for every global variable
...
Depending on the extraction order, before this change there might be multiple
`GlobalVariable`s per declared global variable. See the tests in
`cpp/ql/test/library-tests/variables/global`. This change ensures that only one
of those `GlobalVariable`s is visible to the user if we can locate a unique
definition. If not, the old situation persists.
Note that an exception needs to be made for templated variables. Here, the
definition refers to the non-instantiated template, while a declaration that
is not a definition refers to an instantiation. In case the instantiation refers
to a template parameter, the mangled names of the template and the instantiation
will be identical. This happens for example in the following case:
```
template <typename T>
T x = T(42); // Uninstantiated templated variable
template <typename T>
class C {
T y = x<T>; // Instantiation using a template parameter
};
```
Since the uninstantiated template and the instantiation are two different
entities, we do not unify them as described above.
2022-06-28 15:32:43 +02:00
Paolo Tranquilli
7175869518
Swift: add missing newlines in trap
...
This is mostly cosmetic and for debugging, as the trap importer is
perfectly happy with trap entries on the same line without spaces
between them.
2022-06-28 15:17:18 +02:00
Henry Mercer
a7bd2030b6
Address review comments
2022-06-28 13:52:26 +01:00
Brandon Stewart
33d1aae92a
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-06-28 08:51:01 -04:00
Brandon Stewart
1dc26a0ca3
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-06-28 08:50:54 -04:00
Asger F
a522562f93
Merge pull request #9369 from asgerf/python/api-graph-api
...
Python: API graph renaming and documentation
2022-06-28 14:48:12 +02:00
Arthur Baars
6e836c7eb8
Merge pull request #9706 from aibaars/update-tree-sitter-ruby-2
...
Ruby: update tree-sitter-ruby
2022-06-28 14:14:15 +02:00
Erik Krogh Kristensen
112caa3f5d
rewrite qldoc based on review
2022-06-28 13:23:44 +02:00
yoff
834d2603a2
python: update use of barrier guard
2022-06-28 11:15:37 +00:00
Paolo Tranquilli
7f8bff571d
Merge pull request #9729 from github/redsun82/swift-extraction
...
Swift: extract `ProtocolCompositionType` and all `BuiltinType`s
2022-06-28 12:30:47 +02:00
Paolo Tranquilli
131524d867
Swift: accept test changes
...
These are due to the changes on `toBeTested` that include canonical
types.
2022-06-28 12:16:08 +02:00
Asger F
b3b53360ae
Python: change category to deprecated because library is apparently supported anymore
2022-06-28 12:14:28 +02:00
Asger F
5dfc3c6537
Python: rename change note again
2022-06-28 12:10:26 +02:00
Paolo Tranquilli
68a341d72c
Swift: use createEntry in the whole type visitor
2022-06-28 12:06:19 +02:00
Paolo Tranquilli
57981384df
Swift: extract ProtocolComposition- and BuiltinType
2022-06-28 12:01:36 +02:00
Paolo Tranquilli
b41cbaec33
Swift: add possibility to add flags in tests
2022-06-28 12:01:36 +02:00
Paolo Tranquilli
f2b589743a
Swift: add possibility to collapse class hierarchy in tests
2022-06-28 12:01:36 +02:00
Asger F
d9f57e6d23
Python: rename change note file
2022-06-28 11:41:07 +02:00
Asger F
6d25fb6988
Python: add change note
2022-06-28 11:28:30 +02:00
Ian Lynagh
780f5abc67
Merge pull request #9724 from igfoo/igfoo/private
...
Kotlin: Make more methods private
2022-06-28 10:21:55 +01:00
Ian Lynagh
b6790ef735
Merge pull request #9725 from igfoo/igfoo/inline
...
Kotlin: Extract inlineability of functions
2022-06-28 10:21:30 +01:00
Asger F
c33690381e
JS: Add explicit 'this'
2022-06-28 10:21:44 +02:00
Asger F
c1a2e2abe0
JS: Rename to isLikelyCaseSensitiveRegExp
2022-06-28 10:21:33 +02:00
Tony Torralba
e0b4c63a53
Add new source kind to CsvValidation
2022-06-28 10:16:40 +02:00
Joe Farebrother
49b419c52e
Update models to include manual tag
2022-06-28 10:10:28 +02:00
Joe Farebrother
55e78e3e25
Minor doc fixes + making directFileRead private
2022-06-28 10:10:28 +02:00
Joe Farebrother
a41f28ebe5
Use more file openning methods
2022-06-28 10:10:28 +02:00
Joe Farebrother
58fba20689
Add change note
2022-06-28 10:10:28 +02:00
Joe Farebrother
cb717a22bf
Fix failing test cases
2022-06-28 10:10:27 +02:00
Joe Farebrother
810854d6b5
Add tests
2022-06-28 10:10:27 +02:00
Joe Farebrother
0e04f2b2e8
Add external storage souces
2022-06-28 10:10:27 +02:00
Asger F
fd28397056
JS: Fix typo
2022-06-28 10:10:23 +02:00
Asger F
9cf48fc804
JS: Clarify that strings are case insensitive by default
2022-06-28 10:09:56 +02:00
Asger F
b1251f0c63
JS: invertCase -> toOtherCase
2022-06-28 10:07:57 +02:00
Erik Krogh Kristensen
a343ceaf8b
add suspicious-regexp-range query
2022-06-28 09:49:27 +02:00
Asger F
4c73ab2679
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-06-28 09:48:53 +02:00
Asger F
a033338d20
Python: Explicitly mention lack of transitive flow in asSource/asSink
2022-06-28 09:46:26 +02:00
Asger F
9b27a7cbcd
Python: Dont claim that external libraries are excluded from the database
2022-06-28 09:28:26 +02:00
Asger F
0346b6b67a
Merge pull request #9698 from github/post-release-prep/codeql-cli-2.10.0
...
Post-release preparation for codeql-cli-2.10.0
2022-06-28 09:05:13 +02:00
yoff
67b6f215dc
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-28 08:05:53 +02:00
yoff
1788507571
python: add qldoc
2022-06-27 21:00:12 +00:00
Rasmus Lerchedahl Petersen
a1fe8a5b2b
python: handle not in BarrierGuard
...
in the program
```python
if not is_safe(path):
return
```
the last node in the `ConditionBlock` is `not is_safe(path)`,
so it would never match "a call to is_safe".
Thus, guards inside `not` would not be part of `GuardNode`
(nor `BarrierGuard`). Now they can.
2022-06-27 20:10:47 +00:00
Rasmus Lerchedahl Petersen
882000afb3
python: not is confusing our logic
...
- added `is_unsafe`
- added "negated version" of two tests.
These versions do not use `not` and the analysis gets the taint right.
2022-06-27 20:10:47 +00:00
Brandon Stewart
4fb0264ec8
Merge branch 'main' into patch-1
2022-06-27 16:07:15 -04:00
Taus
dc0f50d49a
Python: Clean up variable names
...
Makes it more consistent with the names used in
`legalMergeCandidateNonEmpty`.
2022-06-27 19:54:09 +00:00
Taus
8fc9ce9699
Python: Fix bad join in MRO
...
Fixes a bad join in `list_of_linearization_of_bases_plus_bases`.
Previvously, we joined together `ConsList` and `getBase` before filtering
these out using the recursive call. Now we do the recursion first.
Co-authored-by: yoff <yoff@github.com >
2022-06-27 19:54:09 +00:00
Robert Marsh
829fdd1ff6
C++: fix join order in UsingExpiredStackAddress
2022-06-27 15:28:14 -04:00
Andrew Eisenberg
43bb439b82
Add version info for running subset of queries
2022-06-27 12:03:23 -07:00
Ian Lynagh
3543864e0b
Merge pull request #9723 from igfoo/igfoo/delegates
...
Kotlin: Mark DELEGATED_PROPERTY_ACCESSORs as compiler-generated
2022-06-27 19:48:53 +01:00
Asger F
cc57cb8af5
Merge branch 'main' into post-release-prep/codeql-cli-2.10.0
2022-06-27 20:37:25 +02:00
Ian Lynagh
44e69e1c09
Kotlin: Add Modifier.isInline()
2022-06-27 19:33:08 +01:00
Ian Lynagh
af672b4899
Kotlin: Add a changenote for Modifier.isInline()
2022-06-27 19:31:01 +01:00
Ian Lynagh
4a404aee76
Kotlin: Add inline info to methods test
2022-06-27 19:27:26 +01:00
Ian Lynagh
06060954ec
Kotlin: Extract inlineability of functions
2022-06-27 19:25:56 +01:00
Ian Lynagh
4e4b34290b
Kotlin: Make more methods private
2022-06-27 18:20:33 +01:00
Ian Lynagh
7dc490ff7c
Kotlin: Enhance methods test
2022-06-27 17:59:52 +01:00
Ian Lynagh
7430a413ad
Kotlin: Mark DELEGATED_PROPERTY_ACCESSORs as compiler-generated
2022-06-27 17:57:40 +01:00
Paolo Tranquilli
9d97fe7f30
Swift: generalize EnumIsCaseExpr test
2022-06-27 17:22:48 +02:00
Paolo Tranquilli
7f694f3b90
Swift: add EnumIsCase test
2022-06-27 16:25:46 +02:00
Asger F
3c9e743495
JS: Add change note
2022-06-27 16:16:38 +02:00
Asger F
17d139c87d
JS: Add qhelp
2022-06-27 16:14:30 +02:00
Brandon Stewart
99ae1b3f0d
Merge branch 'main' into patch-1
2022-06-27 10:12:26 -04:00
Brandon Stewart
52290fd4ae
run codeql query format
2022-06-27 10:01:40 -04:00
Asger F
dfe276aa18
Merge pull request #9715 from asgerf/js/always-check-file-header
...
JS: always sniff file header of TypeScript files
2022-06-27 14:58:57 +02:00
Rasmus Wriedt Larsen
9e154ff4bd
Merge branch 'main' into python/port-tarslip
2022-06-27 14:36:15 +02:00
Erik Krogh Kristensen
34e7589844
sanitize non-strings from unsafe-html-construction
2022-06-27 13:53:44 +02:00
Asger F
c8b2be616f
JS: Bump extractor version string
2022-06-27 13:52:44 +02:00
Asger F
c082578688
JS: Always sniff file type of TypeScript files
2022-06-27 13:48:00 +02:00
Arthur Baars
051b865230
Ruby: update tree-sitter-ruby
2022-06-27 13:03:04 +02:00
Nick Rolfe
280c959dc8
Merge branch 'main' into nickrolfe/pathname
2022-06-27 11:11:17 +01:00
Ian Lynagh
c72377cf2c
Merge pull request #9711 from igfoo/igfoo/integ
...
Kotlin: Add integration tests
2022-06-27 11:08:12 +01:00
Mathias Vorreiter Pedersen
41b23572f0
Merge pull request #9673 from geoffw0/stringlengthconflation2
...
Swift: String length conflation query
2022-06-27 10:29:09 +01:00
Asger F
5991e9b83c
Merge pull request #9714 from asgerf/ruby/fix-api-graphdeprecation
...
Ruby: fix deprecation warning
2022-06-27 11:09:11 +02:00
Asger F
09476d1c13
Ruby: fix deprecation warning
2022-06-27 10:01:37 +02:00
Harry Maclean
101111bd2f
Merge pull request #9574 from hmac/hmac/action-cable-logger
...
Ruby: More Rails modeling
2022-06-27 19:56:54 +12:00
Asger F
d92430b0e7
JS: Fix FP from char class
2022-06-27 09:08:37 +02:00
Asger F
9e4116618a
JS: Add CaseSensitiveMiddlewarePath query
2022-06-27 09:08:37 +02:00
Asger F
d6fd43fe12
Merge pull request #9364 from asgerf/ruby/api-graph-api
...
Ruby: API graph renaming an documentation
2022-06-27 08:54:24 +02:00
Brandon Stewart
29e73e1a04
Update ActiveRecord.qll
2022-06-24 15:35:36 -04:00
Brandon Stewart
463c096d4c
Update ActiveRecord.qll
2022-06-24 15:33:02 -04:00
Brandon Stewart
2047954013
Merge branch 'main' into patch-1
2022-06-24 15:30:11 -04:00
Brandon Stewart
ff9a7244c2
Update ActiveRecord.qll
2022-06-24 15:28:09 -04:00
Ian Lynagh
861a368734
Merge pull request #9703 from igfoo/igfoo/generated
...
Kotlin: Record more kinds of elements as compiler-generated
2022-06-24 19:46:56 +01:00
Ian Lynagh
0ddd5bb162
Merge pull request #9709 from igfoo/igfoo/isLocalFunction
...
Kotlin: Let useFunction worry about isLocalFunction for us
2022-06-24 19:22:43 +01:00
Mathias Vorreiter Pedersen
9f58ba1a1a
Merge pull request #9707 from github/redsun82/swift-extraction
...
Swift: extract more types
2022-06-24 18:38:28 +01:00
Ian Lynagh
0b312b61e4
Kotlin: qlformat some test queries
2022-06-24 18:35:58 +01:00
Ian Lynagh
31b3c1fff8
Kotlin: Add integration tests
2022-06-24 17:33:58 +01:00
Paolo Tranquilli
41fb55a7a8
Swift: extract all ReferenceStorageTypes
2022-06-24 18:10:31 +02:00
Geoffrey White
9013d56f37
Swift: Strengthen claim about severity in the qhelp.
2022-06-24 17:09:37 +01:00
Paolo Tranquilli
fd209e57cd
Swift: extract InoutType
2022-06-24 17:29:46 +02:00
Ian Lynagh
73a79e064c
Kotlin: Accept test output
2022-06-24 16:24:41 +01:00
Geoffrey White
ef283d9b7a
Swift: Metadata.
2022-06-24 16:20:16 +01:00
Asger F
3a44584de5
Merge pull request #9695 from asgerf/js/unused-var-template-placeholder
...
JS: Fix unused variable FP in template placeholders
2022-06-24 17:19:35 +02:00
Paolo Tranquilli
189a47e30d
Swift: extract VariadicSequenceType
2022-06-24 17:15:45 +02:00
Paolo Tranquilli
346110e8dd
Swift: extract DynamicSelfType
2022-06-24 16:49:58 +02:00
Paolo Tranquilli
4281605ba7
Swift: extract existential types
2022-06-24 16:28:18 +02:00
Paolo Tranquilli
631156dbc6
Swift: extract Nested- and PrimaryArchetypeType
2022-06-24 16:28:17 +02:00
Ian Lynagh
4791aaae52
Kotlin: Use an enum for compiler-generated-kinds
...
For now this is in KotlinFileExtractor, but we can move it out later if
we have generated things elsewhere.
2022-06-24 15:19:50 +01:00
Ian Lynagh
c0b6d1d093
Kotlin: Let useFunction worry about isLocalFunction for us
2022-06-24 14:24:02 +01:00
Ian Lynagh
46446f9dfa
Kotlin: Move the isLocalFunction check deeper into useFunction
2022-06-24 14:22:45 +01:00
Nick Rolfe
c1515db09c
Ruby: modeling of some file-related concepts for the Pathname class
2022-06-24 14:14:07 +01:00
Nick Rolfe
03d0f66247
Ruby: add flow summaries for Pathname class
2022-06-24 14:14:06 +01:00
Ian Lynagh
27b83a0b33
Java: Add an upgrade script
2022-06-24 14:01:07 +01:00
Ian Lynagh
008a8f0bba
Kotlin: Add an enum class to the methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
20817a54da
Kotlin: Mark enum class special members as cmopiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
c5d6ca7afc
Kotlin: Accept method test changes
2022-06-24 14:00:47 +01:00
Ian Lynagh
50eeb47244
Kotlin: Mark <clinit> as compiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
c0600820ac
Kotlin: Update methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
c06eb09100
Kotlin: Record that DEFAULT_PROPERTY_ACCESSOR are compiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
aefd89ed49
Kotlin: Add compiler-generated info to methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
5fc294d49e
Kotlin: Record that generated data class members are compiler-generated
2022-06-24 14:00:47 +01:00
Tamás Vajk
381bcf7dad
Merge pull request #9153 from tamasvajk/kotlin-simplify-loop-breaks-1
...
Kotlin: Unify loop `break`/`continue` statement handling between java and kotlin
2022-06-24 14:45:57 +02:00
Geoffrey White
f2ae2dbe1f
Swift: Consistency.
2022-06-24 12:28:10 +01:00
Geoffrey White
ef3d4f3242
Swift: Add qhelp and example.
2022-06-24 12:27:10 +01:00
Paolo Tranquilli
6230a3a3c5
Merge pull request #9685 from github/redsun82/swift-code-reorg
...
Swift: split up generated C++ code
2022-06-24 13:24:42 +02:00
Erik Krogh Kristensen
9bc12ed8fd
sync review changes to other languages
2022-06-24 13:12:15 +02:00
Erik Krogh Kristensen
28ac47689f
changes based on reviews
2022-06-24 13:11:46 +02:00
Paolo Tranquilli
299e1af22e
Merge main into redsun82/swift-code-reorg
2022-06-24 13:06:14 +02:00
Paolo Tranquilli
80ffd81b2c
Merge pull request #9614 from github/alexdenisov/swift-extract-all-inputs-with-outputs
...
Swift: extract all output-producing source files, not only primary files
2022-06-24 12:23:36 +02:00
Chris Smowton
d0e521ef4a
Merge pull request #9681 from smowton/smowton/fix/reintroduce-obinit
...
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
2022-06-24 10:25:24 +01:00
Chris Smowton
fcc8691394
Merge pull request #9625 from smowton/smowton/test/kotlin-1-7-support
...
Switch to using Kotlin 1.7 by default
2022-06-24 10:24:54 +01:00
Ian Lynagh
ae16a874c8
Merge pull request #9694 from igfoo/igfoo/useFunction
...
Kotlin: Some useFunction simplification
2022-06-24 09:31:14 +01:00
Paolo Tranquilli
b708e627ad
Merge pull request #9701 from github/redsun82/swift-final-resolve
...
Swift: make `Element::resolve` final
2022-06-24 10:30:33 +02:00
Paolo Tranquilli
8ca529e8d9
Swift: make Element::resolve final
...
One should only override `getResolveStep` (or `convertsFrom` for `Expr`
classes), as otherwise the resolution/conversion becomes inconsitent.
2022-06-24 10:05:58 +02:00
Paolo Tranquilli
d14eab84fa
Merge pull request #9699 from github/redsun82/swift-stop-stub-reverts
...
Swift: yet another fix to stub revert prevention
2022-06-24 10:04:55 +02:00
Paolo Tranquilli
bc44007e18
Swift: yet another fix to stub revert prevention
2022-06-24 09:40:03 +02:00
github-actions[bot]
d506f448ef
Post-release preparation for codeql-cli-2.10.0
2022-06-24 07:36:33 +00:00
Paolo Tranquilli
f539be33d5
Merge pull request #9697 from github/redsun82/swift-stop-stub-reverts
...
Swift: fix stub revert prevention
2022-06-24 09:32:29 +02:00
Paolo Tranquilli
a9bd784ba2
Swift: fix stub revert prevention
...
It turns out the threshold of 5 lines for stub modification detection
was too strict: in case of a long class name the QL formatter will put
the closing brace of the empty class definition on a new line, leading
to codegen fail with an error thinking the stub was modified.
On the other side of things, also adding a base to a stub class was not
being detected as a modification.
Now the modification test is slightly smarter. If the stub still marked
as generated and
* has more than 6 lines, or
* the contents does not match a regexp aproximation of a plain stub
then codegen will abort. The test will still avoid reading the whole
contents of all the stubs.
2022-06-24 09:02:40 +02:00
thiggy1342
6ea1aad5fc
more style fixes
2022-06-23 22:57:51 -04:00
thiggy1342
ce2edd4b28
style tweaks
2022-06-24 02:46:48 +00:00
thiggy1342
ca074e2275
add qhelp file
2022-06-24 02:19:06 +00:00
thiggy1342
cf36333082
forgot to finish this test
2022-06-24 02:18:48 +00:00
thiggy1342
45dd38df6e
polish up dataflow query
2022-06-24 01:50:20 +00:00
Ian Lynagh
eb1b3f801d
Merge pull request #9689 from igfoo/igfoo/makeprivate
...
Kotlin: Make some more methods private
2022-06-23 21:28:07 +01:00
Ian Lynagh
bee703a870
Kotlin: Inline away useFunctionCommon
2022-06-23 21:23:21 +01:00
Chris Smowton
a124d83265
Autoformat
2022-06-23 20:13:27 +01:00
Robert Marsh
4a522831c4
C++: update change note for IR global var flow
2022-06-23 14:39:13 -04:00
Robert Marsh
e45c982dd1
C++: change note for global variables in dataflow
2022-06-23 14:32:52 -04:00
Ian Lynagh
3934491dcc
Kotlin: Refactor useFunction*
...
They now work in a way more similar to other families of functions we
have.
2022-06-23 19:19:47 +01:00
Asger F
f5a19a1013
JS: Fix unused variable FP in template placeholders
2022-06-23 19:26:32 +02:00
Geoffrey White
1a980c94a0
Swift: Query description.
2022-06-23 18:13:48 +01:00
Ian Lynagh
ab19d8c3c3
Kotlin: Move useFunctionCommon
2022-06-23 17:59:28 +01:00
Brandon Stewart
caeef68bde
Update ActiveRecord.qll
2022-06-23 12:31:05 -04:00
Brandon Stewart
173bea2579
Update ActiveRecord.qll
2022-06-23 12:18:26 -04:00
Brandon Stewart
fa622f551a
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2022-06-23 12:16:50 -04:00
Mathias Vorreiter Pedersen
71efffd79b
Merge pull request #9691 from rdmarsh2/rdmarsh2/swift/ssa-perf-1
...
Swift: remove check for inout params in SSA gen
2022-06-23 17:16:38 +01:00
Mathias Vorreiter Pedersen
998a75e768
Merge pull request #9690 from github/redsun82/swift-stop-stub-reverts
...
Swift: prevent accidental revert of modified stub
2022-06-23 17:13:52 +01:00
Geoffrey White
911d30bd9a
Swift: Proper query message.
2022-06-23 17:12:02 +01:00
Raul Garcia
13464e8015
Changing @Severity tag to error
2022-06-23 09:07:28 -07:00
Raul Garcia
202a0916a3
IdentityModel_tokenvalidation
2022-06-23 09:03:16 -07:00
Robert Marsh
946d0358c9
Swift: remove check for inout params in SSA gen
...
This check is unnecessary since it's enforced by the compiler, and is
causing a bad join order.
2022-06-23 15:59:34 +00:00
Paolo Tranquilli
ad38cf2026
Swift: prevent accidental revert of modified stub
...
If one modifies a QL stub but forgets to remove the `// generated`
header comment, codegen will now abort with an error rather than
silently reverting the change.
This is based on the rough heuristic of just counting the lines. If any
change is done to the stub class, the number of lines is bound to be
5 or more.
2022-06-23 17:49:21 +02:00
Paolo Tranquilli
a6ae6cfad0
Merge pull request #9688 from github/redsun82/swift-autopep8
...
Swift: autopep8 codegen
2022-06-23 17:49:09 +02:00
Ian Lynagh
bd8a8d00aa
Kotlin: Make some more methods private
2022-06-23 16:44:06 +01:00
Chris Smowton
b5010337a4
Avoid extracting needless obinit methods where we're only extracting a class' outline.
2022-06-23 16:26:54 +01:00
Chris Smowton
3cf7f96298
Ensure <obinit>'s return type is void not Unit
2022-06-23 16:26:54 +01:00
Chris Smowton
af5230349b
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
...
This avoids DB inconsistencies because complex initialisers are extracted to more than one function.
2022-06-23 16:26:54 +01:00
Paolo Tranquilli
7334b4e03a
Swift: autopep8 all python files
...
Additionally set up a pre-commit hook and a CI check for that.
2022-06-23 17:13:56 +02:00
Geoffrey White
64d7296847
Swift: Remove redundant cast.
2022-06-23 16:04:26 +01:00
Geoffrey White
3291029e6d
Swift: Address further review comments.
2022-06-23 16:00:56 +01:00
yoff
5042c804dd
python: sync files and fix many small things
...
- but now we have non-monotonic recursion again...
2022-06-23 14:57:06 +00:00
Geoffrey White
ebcb1e9448
Swift: Clean up other uses of toString.
2022-06-23 15:53:55 +01:00
Chris Smowton
1aae3c5f5e
Fix whenexpr test
...
Prior to Kotlin 1.7 the gratuitous `?` was ignored for typing purposes; now it yields a `String?`. We should make the test work everywhere by using a real nullable type.
2022-06-23 15:34:40 +01:00
Chris Smowton
e64a8bc79a
Use binary names not fqnames for uniquing IrDeclarations
...
Otherwise we fall into the trap of confusing the two overloads of `MapsKt.iterator` which have differing jvmnames.
2022-06-23 15:34:40 +01:00
Chris Smowton
57ea34d3ff
Unique external classes/functions by fqname
...
Previously we used the IrDeclaration itself, but in Kotlin 1.7 this can be ambiguous because we can get more than one copy of a class in different modules.
2022-06-23 15:34:40 +01:00
Chris Smowton
8c57308661
Prevent extracting hidden functions
...
I'm not sure how these looked in 1.6 and below yet, but in 1.7 they appear with visibility = public, but a descriptor field set to indicate they have a name clash with a 'real' function.
2022-06-23 15:34:40 +01:00
Chris Smowton
2b2c384933
Kotlin: Move from 1.7.0-RC to 1.7.0
2022-06-23 15:34:40 +01:00
Chris Smowton
4899aabb05
Switch to using Kotlin 1.7 by default
2022-06-23 15:34:40 +01:00
Chris Smowton
45c85228bd
Implement Kotlin 1.7 support
...
- Implement getIrStubFromDescriptor for Kotlin 1.7
- Stop using ClassSymbol.signature, which is now only populated for classes built from Kotlin, and noteworthily is null for primitive and other internally-synthesised types.
2022-06-23 15:34:40 +01:00
Mathias Vorreiter Pedersen
43d449f1f7
Merge pull request #9687 from github/redsun82/swift-codegen-tag-to-pragma
...
Swift: tag -> pragma in codegen
2022-06-23 15:21:58 +01:00
Asger F
56786790fc
Merge pull request #9682 from github/release-prep/2.10.0
...
Release preparation for version 2.10.0
2022-06-23 16:09:48 +02:00
Ian Lynagh
3b2b884f09
Merge pull request #9683 from igfoo/igfoo/getDiagnosticLocation
...
Kotlin: Remove unused function getDiagnosticLocation
2022-06-23 14:09:00 +01:00
Paolo Tranquilli
8d4637ddfd
Swift: tag -> pragma in codegen
...
For the use the former tags are meant for, pragma is a more
meaningful name. It now also accepts both strings and lists of strings.
2022-06-23 14:52:21 +02:00
Anders Schack-Mulligen
dc517a758e
Autoformat
2022-06-23 14:44:40 +02:00
Erik Krogh Kristensen
554888b884
update expected output for QL-for-QL now that I've renabled the queries
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
724721c5c8
fix typo
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
22871138c6
simplify the recursion between TTrace and isReachableFromStartTuple
...
similar to the fix made by Shack in `ExponentialBackTracking.qll`
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
be37763125
improve performance of process() by pruning accept states early
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
bf20b7dfc5
add change note for the ReDoS renamings
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
14204be2f9
add missing qldoc
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
3bea7df45d
add deprecated aliases in the old locations, and use the Query.qll pattern for js/polynomial-redos
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
2e4c2df67e
move the JS ReDoS test to a more appropriate folder
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
13482fc97b
rename ReDoSUtil to NfaUtils, and rename the "performance" folder to "regexp"
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
bbc8cb32be
update expected output from disabling the dead-code query
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
6b0df9bdfb
refactor the concretize algorithm
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
dbeae9aefb
make a parameterized module out of the RegexpMatching implementation
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
7fb3d81d2f
add further normalization of char classses
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
3be4a86acd
make ReDoSPruning into a parameterized module
2022-06-23 14:36:25 +02:00
Erik Krogh Kristensen
dc06e9df02
move predicates that depend on isReDoSCandidate into a ReDoSPruning module
2022-06-23 14:36:24 +02:00
Anders Schack-Mulligen
4a317a25d3
Dataflow: Sync.
2022-06-23 14:34:52 +02:00
Anders Schack-Mulligen
c27290563a
Dataflow: Perf fix, avoid node scans.
2022-06-23 14:34:05 +02:00
Paolo Tranquilli
0957f63cc7
Swift: update codegen workflow to include all files
2022-06-23 14:31:48 +02:00
Paolo Tranquilli
a9877ed2fd
Swift: split generated C++ files by directory
2022-06-23 14:24:03 +02:00
Paolo Tranquilli
b2ebf63d2e
Swift: split generated C++ code into .h and .cpp
2022-06-23 14:22:58 +02:00
Asger F
d94010c244
Grammar: report -> reports
2022-06-23 14:17:52 +02:00
Asger F
d3df2033f0
Update cpp/ql/lib/change-notes/released/0.3.0.md
2022-06-23 14:11:11 +02:00
Asger F
bef38a64c3
Update cpp/ql/lib/CHANGELOG.md
2022-06-23 14:10:09 +02:00
Ian Lynagh
1713c416c0
Kotlin: Remove unused function getDiagnosticLocation
2022-06-23 13:07:09 +01:00
yoff
a2851baa9f
python: fix import of "merge moved" file
2022-06-23 12:05:55 +00:00
Geoffrey White
3b48cb02bc
Swift: Add Type.getName().
2022-06-23 12:54:56 +01:00
github-actions[bot]
a74051c658
Release preparation for version 2.10.0
2022-06-23 11:17:46 +00:00
Geoffrey White
01f697abe9
Swift: Rename argName -> paramName.
2022-06-23 12:16:04 +01:00
Geoffrey White
5222ba9073
Swift: Suggestions from review.
2022-06-23 12:02:32 +01:00
Rasmus Wriedt Larsen
3248f7b423
Merge pull request #9649 from RasmusWL/certificate-modeling
...
Python/JS/Ruby: Ignore common words (like certain) as sensitive data source
2022-06-23 12:04:58 +02:00
Mathias Vorreiter Pedersen
9b587843ff
Merge pull request #9669 from rdmarsh2/rdmarsh2/swift/dataflow-lambda-flow
...
Swift: implement LambdaCall in dataflow library
2022-06-23 10:38:45 +01:00
yoff
1e20cca913
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
2022-06-23 09:14:02 +00:00
Asger F
298f4ab899
Merge pull request #9679 from asgerf/js/fix-downgrade-script
...
JS: Downgrade ast_node_symbol relation
2022-06-23 11:08:06 +02:00
yoff
140dc1a61e
merge in main
2022-06-23 09:05:32 +00:00
yoff
8bf60301da
python: we have hidden isParameterOf
...
but now allow a clear alternative
2022-06-23 08:57:50 +00:00
yoff
fe0c5d8ee5
python: make ArgumentNode publicly usable
...
- add `getCall`
2022-06-23 08:48:55 +00:00
yoff
b22de69ab2
python: update qldoc now predicates may be empty
2022-06-23 08:41:28 +00:00
yoff
cedf9ef538
python: make DataFlowCall "publicly usable"
...
- add `getCallable`, `getArg` and `getNode`
- these are `none` for summary calls
- revert "external" uses (they had been changed to `DataFlowSourceCall`)
2022-06-23 08:32:23 +00:00
Tamas Vajk
cf18a9a04b
Fix bad join order in Shadowing::shadows
...
Fixes the bad join order in `Shadowing::shadows`:
Tuple counts for Shadowing::shadows#f4fb89a3#ffff@c4b8a90j:
182915 ~0% {2} r1 = Variable::LocalVariableDecl::getCallable#dispred#f0820431#ff AND NOT Shadowing::shadows#f4fb89a3#ffff#antijoin_rhs(Lhs.0, Lhs.1)
182915 ~0% {3} r2 = JOIN r1 WITH localvars ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.2
182915 ~3% {4} r3 = JOIN r2 WITH Member::Member::getDeclaringType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2
182833 ~0% {4} r4 = JOIN r3 WITH classes ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.0
182833 ~3% {5} r5 = JOIN r4 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.0, Lhs.1, Lhs.3, Rhs.1
183352620 ~5% {5} r6 = JOIN r5 WITH Member::Field::getType#dispred#f0820431#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.1, Lhs.2, Lhs.4
40529 ~0% {5} r7 = JOIN r6 WITH Member::Field::getDeclaringType#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.0, Lhs.4, Lhs.2, Lhs.3, Lhs.1
678 ~4% {4} r8 = JOIN r7 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.0
670 ~4% {4} r9 = r8 AND NOT Member::Field::isStatic#dispred#f0820431#b(Lhs.3)
670 ~3% {4} r10 = SCAN r9 OUTPUT In.0, In.2, In.3, In.1
return r10
After the fix:
Tuple counts for Shadowing::shadows#f4fb89a3#ffff@95ca976v:
182915 ~0% {2} r1 = Variable::LocalVariableDecl::getCallable#dispred#f0820431#ff AND NOT Shadowing::shadows#f4fb89a3#ffff#antijoin_rhs(Lhs.0, Lhs.1)
182915 ~0% {3} r2 = JOIN r1 WITH localvars ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.2
182915 ~0% {4} r3 = JOIN r2 WITH Member::Member::getDeclaringType#dispred#f0820431#bf ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Rhs.1
182915 ~7% {5} r4 = JOIN r3 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.2, Lhs.0, Lhs.1
678 ~4% {4} r5 = JOIN r4 WITH Shadowing::getField#f4fb89a3#ffff ON FIRST 3 OUTPUT Lhs.3, Lhs.4, Lhs.0, Rhs.3
670 ~4% {4} r6 = r5 AND NOT Member::Field::isStatic#dispred#f0820431#b(Lhs.3)
670 ~3% {4} r7 = SCAN r6 OUTPUT In.0, In.2, In.3, In.1
return r7
2022-06-23 10:30:39 +02:00
Asger F
90c2b6e47f
JS: Downgrade ast_node_symbol relation
2022-06-23 10:17:28 +02:00
Geoffrey White
20c3182437
Merge pull request #9087 from ihsinme/ihsinme-patch-88
...
CPP: Add query for CWE-670: Always-Incorrect Control Flow Implementation when use SSL_shutdown
2022-06-23 09:16:55 +01:00
Tamas Vajk
e65a046235
Fix test file after rebase
2022-06-23 09:51:48 +02:00
Mathias Vorreiter Pedersen
5dfa5fb877
Merge pull request #9678 from jketema/ql-fixes
...
C++: Two small QL fixes
2022-06-23 08:23:54 +01:00
Erik Krogh Kristensen
08e4c8b195
Merge pull request #9634 from erik-krogh/jqueryParam
...
JS: add all jquery plugin parameters as source to js/html-constructed-from-input
2022-06-23 08:57:20 +02:00
Tamas Vajk
579bfc22f3
Fix performance change in SecurityFlag
2022-06-23 08:46:33 +02:00
Tamas Vajk
79ec998636
Fix DB change compatibility to backwards
2022-06-23 08:45:11 +02:00
Tamas Vajk
7dad2f7fcb
Fix DB upgrade properties
2022-06-23 08:45:11 +02:00
Tamas Vajk
074b90ea1a
Add change note
2022-06-23 08:45:11 +02:00
Tamas Vajk
053ca2e940
Update DB stats file
2022-06-23 08:45:11 +02:00
Tamas Vajk
e03b48f293
Add DB upgrade folder
2022-06-23 08:45:11 +02:00
Tamas Vajk
dabc956dbf
Unify loop break/continue statement handling between java and kotlin
2022-06-23 08:45:11 +02:00
Jeroen Ketema
b3ac7bda35
C++: Remove redundant parentheses
2022-06-23 07:25:53 +02:00
Jeroen Ketema
9cfd1a84b6
C++: Remove out-of-date comment, as we use mangled names in ResolveClass.qll
2022-06-23 07:24:04 +02:00
AlexDenisov
decb136471
Update swift/extractor/SwiftExtractor.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-23 07:23:17 +02:00
thiggy1342
e838b83f5f
attempt to introduce dataflow tracking
2022-06-23 02:21:47 +00:00
Robert Marsh
813a8548d7
C++: accept test changes for globals in data flow
2022-06-22 16:42:42 -04:00
Geoffrey White
07b89b89d7
Swift: Clean up a bit.
2022-06-22 19:35:37 +01:00
Geoffrey White
19026e9ed5
Swift: Work around toString change.
2022-06-22 19:16:09 +01:00
Geoffrey White
da7f49155d
Swift: Use dataflow.
2022-06-22 19:16:09 +01:00
Geoffrey White
28d801fde3
Swift: CWE-135 query sources and sinks.
2022-06-22 19:16:08 +01:00
Robert Marsh
b609f1ea52
Merge pull request #9668 from MathiasVP/expr-nodes-for-properties
...
Swift: Make sure property setters and getters also have `ExprNodes`
2022-06-22 14:09:46 -04:00
Robert Marsh
42929a70e8
Swift: implement LambdaCall in dataflow library
2022-06-22 17:30:54 +00:00
Andrew Eisenberg
5432be7b3a
Merge pull request #9667 from github/nickrolfe/js_downgrades
...
JS: create downgrades pack
2022-06-22 10:30:41 -07:00
Mathias Vorreiter Pedersen
77b8ceb976
Swift: Make sure property setters and getters also have ExprNodes.
2022-06-22 17:53:41 +01:00
Nick Rolfe
d91e8a6309
JS: create downgrades pack
2022-06-22 17:31:49 +01:00
AlexDenisov
19bc9cf301
Merge pull request #9666 from github/redsun82/swift-code-reorg
...
Swift: reorganize code
2022-06-22 18:28:08 +02:00
Paolo Tranquilli
cfde68023d
Swift: fix includes jumbled by IDE
2022-06-22 18:17:40 +02:00
Paolo Tranquilli
22321aa124
Swift: reorganize code
...
Visitor code has been split between header and sources to speed up
incremental build. Moreover the code was reorganized using a new `infra`
bazel package (and `visitors` got promoted to a bazel package as well).
2022-06-22 18:11:58 +02:00
Paolo Tranquilli
7c958dfbb9
Merge pull request #9639 from github/redsun82/swift-extraction
...
Swift: some expression extractions
2022-06-22 17:19:20 +02:00
Paolo Tranquilli
e25f22da26
Merge main into redsun82/swift-extraction
2022-06-22 16:54:52 +02:00
Chris Smowton
46e6203493
Merge pull request #9626 from smowton/smowton/fix/dont-emit-synthetic-parameter-names
...
Kotlin: don't emit synthetic parameter names
2022-06-22 15:30:54 +01:00
Paolo Tranquilli
1fc2bc4938
Swift: really fix tests
2022-06-22 16:15:02 +02:00
Jeroen Ketema
f9e09da604
Merge pull request #9643 from jketema/namespace-variable-test
...
C++: Add variable in namespace test
2022-06-22 15:58:26 +02:00
Mathias Vorreiter Pedersen
43bfa2af55
Merge pull request #9635 from MathiasVP/swift-add-remote-flow-sources
...
Swift: Add `RemoteFlowSource`
2022-06-22 14:41:19 +01:00
Mathias Vorreiter Pedersen
a293fd1f3e
Merge pull request #9638 from geoffw0/stringlengthconflation
...
Swift: String length conflation tests (for CVE-2022-23625)
2022-06-22 14:39:34 +01:00
Chris Smowton
00b4070866
Merge pull request #9659 from smowton/smowton/admin/invert-java-log-injection-query
...
Java: Report log-injection at the source rather than the sink
2022-06-22 14:27:50 +01:00
Mathias Vorreiter Pedersen
07c4308a32
Merge branch 'main' into swift-add-remote-flow-sources
2022-06-22 14:27:44 +01:00
Robert Marsh
d13d4c6cd1
Merge pull request #9623 from MathiasVP/swift-interpretElement0
...
Swift: Interpret MaD strings
2022-06-22 09:27:13 -04:00
Geoffrey White
e07df0d0c8
Swift: make setters private in test.
2022-06-22 14:13:30 +01:00
Mathias Vorreiter Pedersen
1febe87356
Merge pull request #9644 from jketema/class-entry-fix
...
C++: Ensure we can round trip between (forward) class declarations
2022-06-22 14:12:11 +01:00
Chris Smowton
44cf260762
Merge pull request #9571 from smowton/smowton/fix/array-variance-lowering
...
Kotlin: Implement array type variance lowering
2022-06-22 13:38:21 +01:00
Chris Smowton
1f9f6d7c33
Java: Report log-injection at the source rather than the sink
...
This should remove the problem of excessive grouping of different alerts that share a sink location, often due to wrapper functions that form the ultimate sink of all logging calls in a given codebase.
2022-06-22 13:05:20 +01:00
Tony Torralba
cc354caa1f
Merge pull request #9319 from atorralba/atorralba/add-editable-valueof-step
...
Kotlin: Add taint step for String.valueOf(Editable)
2022-06-22 13:50:30 +02:00
Geoffrey White
f9e1e630f7
Swift: more accurate NSObject / NSString hierarchy in test.
2022-06-22 12:36:40 +01:00
Tamás Vajk
c0e115700d
Merge pull request #9647 from tamasvajk/kotlin-when-branch-encl-stmt
...
Kotlin: Fix enclosing statement of `when` branches
2022-06-22 13:18:56 +02:00
Michael Nebel
8899bf7f05
C#: Update tests.
2022-06-22 13:03:23 +02:00
Michael Nebel
0ef97b41c8
C#: Update .NET Runtime models and add sources and sinks.
2022-06-22 13:03:10 +02:00
Jeroen Ketema
b1dd8da587
C++: Fix query formatting
2022-06-22 12:59:49 +02:00
Ian Lynagh
c7a6b1e9a7
Merge pull request #9640 from igfoo/igfoo/vis
...
Kotlin/Java: Add the beginnings of a "visibility" consistency query
2022-06-22 11:34:15 +01:00
Paolo Tranquilli
3ed783df7f
Swift: fix tests
2022-06-22 12:14:47 +02:00
Paolo Tranquilli
aea4910be4
Merge pull request #9620 from github/redsun82/swift-codespace
...
Swift: add devcontainer setup
2022-06-22 11:52:08 +02:00
Rasmus Wriedt Larsen
876ba71d9b
Python/JS/Ruby: Add change-note
2022-06-22 11:14:05 +02:00
Paolo Tranquilli
ee5c30ebda
Merge main into redsun82/swift-extraction
2022-06-22 11:11:20 +02:00
Paolo Tranquilli
e0784e0680
Swift: fix update-codeql
...
Also require sudo at the start of the script if updating.
2022-06-22 11:05:30 +02:00
Rasmus Wriedt Larsen
2ce4b7b9fc
SensitiveDataHeuristics: sync
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
4be375521f
Python: Handle _ in sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
4a844312f4
Python: _ in var name not handled by sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
5dc2bb717a
Python: ignore common words (certain/concert) as sensitive source
2022-06-22 11:05:05 +02:00
Paolo Tranquilli
4377fb0552
Swift: auto-install codeql on codespace
2022-06-22 10:51:30 +02:00
Anders Schack-Mulligen
df6d68b215
Merge pull request #9618 from aschackmull/dataflow/deprecate-barrierguard-class
...
Dataflow: Deprecate BarrierGuard class
2022-06-22 10:44:08 +02:00
Michael Nebel
24ba5cc06e
Merge pull request #9025 from michaelnebel/csharp/generatedrefactor
...
C#: Provenance column in Models as Data CSV format.
2022-06-22 10:34:31 +02:00
Rasmus Wriedt Larsen
abdcfd55c3
Python: uncertainty is treated as a certificate :O
2022-06-22 10:16:28 +02:00
Paolo Tranquilli
400d7afc94
Swift: tweaks to codespace setup
2022-06-22 09:59:12 +02:00
Tamas Vajk
a50e062b3c
Kotlin: Fix enclosing statement of when branches
2022-06-22 09:10:27 +02:00
Tamas Vajk
640026d387
Kotlin: add enclosing statement test
2022-06-22 09:09:57 +02:00
Jeroen Ketema
4a78c9b06d
C++: Add change note
2022-06-22 08:11:24 +02:00
Jeroen Ketema
880c785efe
C++: Ensure we can round trip between (forward) class declarations
...
This was already possible when the forward class declaration and the class
definition occurred in the same scope. However, there is a common C++ usage
pattern in which this is not the case (when only a pointer to the class is
needed). In this latter scenario we could not round trip between the (forward)
`DeclarationEntry` and the `Declaration`.
Effectively this changes the code to:
```
if exists(TypeDeclarationEntry e | e.getType() = this)
then result.getType() = this
else ...
```
We use `type_decls` instead to stay close to the original code.
2022-06-22 07:58:45 +02:00
Jeroen Ketema
0f37e4e7b2
C++: Add variable in namespace test
2022-06-22 07:56:27 +02:00
Jeroen Ketema
a8833a0c70
C++: Test showing going from a forward class declaration to a class but not back
2022-06-22 07:53:50 +02:00
Jeroen Ketema
40e0356177
C++: Test that we can go from a DeclarationEntry to a Declaration and back
2022-06-22 07:53:50 +02:00
Michael Nebel
2b892bc000
Merge pull request #9553 from michaelnebel/csharp/narrowtelemetry
...
C#/Java: Only display 1k most relevant results for ExternalApi telemetry queries.
2022-06-22 07:35:56 +02:00
thiggy1342
995f365568
just check string literal
2022-06-22 02:17:01 +00:00
thiggy1342
c767f241ad
narrow query scope
2022-06-22 02:12:23 +00:00
thiggy1342
f6c4b5c44b
Merge branch 'experimental-manually-check-request-verb' of https://github.com/thiggy1342/codeql into experimental-manually-check-request-verb
2022-06-21 21:27:39 +00:00
thiggy1342
990747cd22
Limit findings to just those called in Controllers
2022-06-21 21:27:18 +00:00
thiggy1342
53729f99c5
restrict findings to just controller classes
2022-06-21 20:28:29 +00:00
thiggy1342
bbe17b3667
Merge branch 'experimental-strong-params' of https://github.com/thiggy1342/codeql into experimental-strong-params
2022-06-21 19:31:18 +00:00
thiggy1342
83b720d730
first draft of weak params query
2022-06-21 19:28:53 +00:00
Brandon Stewart
a2e2dcdfd5
Make ActiveRecordInstanceMethodCall Public
2022-06-21 14:44:52 -04:00
Ian Lynagh
52b229052d
Kotlin/Java: Add the beginnings of a "visibility" consistency query
2022-06-21 17:24:37 +01:00
Andrew Eisenberg
1ec838e671
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-21 09:14:23 -07:00
Paolo Tranquilli
1e4ac44362
Swift: some expression extractions
2022-06-21 17:31:40 +02:00
Mathias Vorreiter Pedersen
9fe238f20c
Merge pull request #9637 from github/redsun82/swift-callable-extractor
...
Swift: Callable abstraction
2022-06-21 16:04:23 +01:00
Dave Bartolomeo
39d77d8f20
Merge pull request #9633 from github/edoardo/rc3.6-mergeback
...
Merge `rc/3.6` into `main`
2022-06-21 10:44:05 -04:00
Paolo Tranquilli
c77fc26c69
Swift: Callable abstraction
...
This new class encompasses both `AbstractFunctionDecl` and
`AbstractClosureExpr`, together with their common parts (namely
parameters and the body).
`ClosureExpr` and `AutoClosureExpr` got ported to structured C++
generated translation in the process.
2022-06-21 15:50:35 +02:00
Geoffrey White
8989210995
Swift: Fix some details so that the test works.
2022-06-21 14:22:35 +01:00
Mathias Vorreiter Pedersen
415e9742a7
Swift: Add a 'RemoteFlowSource' class.
2022-06-21 14:09:56 +01:00
yoff
dd69100dcd
python: ParameterNode -> SourceParameterNode
2022-06-21 12:55:22 +00:00
yoff
2c2395ffd7
python: ParameterNode is the one used publicly
...
- it contains also synthesized nodes, but getParameter returns none for these.
- hide isParameterOf
2022-06-21 12:38:40 +00:00
Anders Schack-Mulligen
f8f9b7d3b4
Apply suggestions from code review
2022-06-21 14:11:36 +02:00
Erik Krogh Kristensen
e1c34c11ed
add all jquery plugin parameters as source to js/html-constructed-from-input
2022-06-21 13:22:56 +02:00
Erik Krogh Kristensen
dde7e9e2e8
add test for jquery plugin parameters in js/html-constructed-from-input
2022-06-21 13:21:57 +02:00
Chris Smowton
7bb0d62863
Update comparisonBarrierGuard qldoc
2022-06-21 12:12:17 +01:00
Chris Smowton
8ae4c21a3e
Update doc for divideByZeroSanitizerGuard
2022-06-21 12:11:19 +01:00
Asger F
a1af9c3d7d
Ruby: update predicate docs
2022-06-21 12:44:16 +02:00
Asger F
d15b90e21a
Ruby: Add deprecation
2022-06-21 12:44:16 +02:00
Asger F
9838e2e101
Ruby: Rename getAValueReachingRhs -> getAValueReachingSink
2022-06-21 12:44:16 +02:00
Asger F
7c877c7861
Ruby: Rename getARhs -> asSink
2022-06-21 12:44:16 +02:00
Asger F
2f8086bb57
Ruby: Rename getAUse -> getAValueReachableFromSource
2022-06-21 12:44:16 +02:00
Asger F
573c5c5efe
Ruby: Rename getAnImmediateUse -> asSource
2022-06-21 12:44:16 +02:00
Asger F
f2403e2610
Ruby: port API graph doc comment
2022-06-21 12:44:16 +02:00
Asger F
092a6a01ac
Python: Update member documentation
2022-06-21 12:44:06 +02:00
Asger F
fecbfa6ca3
Python: add deprecation
2022-06-21 12:44:06 +02:00
Asger F
3a669a8d21
Python: getAValueReachingRhs -> getAValueReachingSink
2022-06-21 12:44:06 +02:00
Asger F
b096f9ec72
Python: Rename getAUse -> getAValueReachableFromSource
2022-06-21 12:44:06 +02:00
Asger F
181a53bd03
Python: Rename getAnImmediateUse -> asSource
2022-06-21 12:44:06 +02:00
Asger F
60fde3c031
Python: Rename getARhs -> asSink
2022-06-21 12:44:06 +02:00
Asger F
8f259d4bb6
Python: port API graph doc comment
2022-06-21 12:44:06 +02:00
Erik Krogh Kristensen
73b657ce25
QL: focus alert locations
2022-06-21 12:26:18 +02:00
Edoardo Pirovano
70dbd92e25
Bump minor version of all regularly released packs
2022-06-21 11:22:58 +01:00
Edoardo Pirovano
ad02b85efa
Merge branch main into rc/3.6
2022-06-21 11:15:25 +01:00
Anders Schack-Mulligen
d7d409f125
Merge pull request #9565 from github/post-release-prep/codeql-cli-2.9.4
...
Post-release preparation for codeql-cli-2.9.4
2022-06-21 11:51:29 +02:00
Cornelius Riemenschneider
091299668a
Merge pull request #9617 from github/criemen/fix-go-pattern-lua-config
...
Go: Properly escape dash in tracing-config.lua
2022-06-21 11:45:14 +02:00
Mathias Vorreiter Pedersen
916cf6eb41
Merge pull request #9631 from jketema/global-variable-test
...
C++: Add global variable tests
2022-06-21 10:44:47 +01:00
Mathias Vorreiter Pedersen
f9c8926fcc
Swift: Fill in some easy TODOs in 'FlowSummaryImplSpecific' and implement a source model for 'String(contentsOf:)'.
2022-06-21 10:27:46 +01:00
Mathias Vorreiter Pedersen
184371f3ce
Swift: Implement 'interpretElement0'.
2022-06-21 10:22:02 +01:00
Anders Schack-Mulligen
736372ffd6
Ruby: Remove test.
2022-06-21 11:18:36 +02:00
Anders Schack-Mulligen
a4796e1542
Add change notes.
2022-06-21 11:17:47 +02:00
Mathias Vorreiter Pedersen
ace00c3d09
Swift: Add a 'getName' predicate to types that forwards to the 'getName' from the declaration.
2022-06-21 10:06:01 +01:00
Mathias Vorreiter Pedersen
cf08644b92
Swift: Add an AST class for possible method declarations.
2022-06-21 10:06:01 +01:00
Jeroen Ketema
1f97f1d931
C++: Add global variable tests
2022-06-21 10:43:40 +02:00
Mathias Vorreiter Pedersen
e2478d1106
Swift: 'getStaticCallTarget' should also return things like 'ConstructorDecl's.
2022-06-21 09:35:56 +01:00
Anders Schack-Mulligen
a6c0a9e480
Python: one more fix
2022-06-21 09:19:45 +02:00
Asger F
b46ba896dd
Merge pull request #9616 from asgerf/js/without-prop-step-await
...
JS: Add withoutPropStep and model raw 'await' step with it
2022-06-21 09:06:01 +02:00
Erik Krogh Kristensen
79696c6c5f
Merge pull request #9572 from erik-krogh/heuristicSteps
...
JS: add heuristic taint-step for potentially unmodelled libraries
2022-06-21 09:00:58 +02:00
Michael Nebel
dc02a6e1a7
C#: Apply autoformatting.
2022-06-21 08:34:43 +02:00
AlexDenisov
7010dffed7
Merge pull request #9622 from github/redsun82/swift-quiet-codegen
...
Swift: add --quiet to codegen
2022-06-21 07:43:33 +02:00
AlexDenisov
687b9aff92
Merge pull request #9230 from github/redsun82/swift-use-generated-classes
...
Swift: use structured generated C++ classes in `DeclVisitor`
2022-06-21 07:43:10 +02:00
Robert Marsh
d28c39cd73
C++: update test expectations
2022-06-20 15:56:00 -04:00
Robert Marsh
8b47b838ca
C++: autoformat
2022-06-20 15:56:00 -04:00
Robert Marsh
5a3e546bfe
C++: update test expectations
2022-06-20 15:55:50 -04:00
Robert Marsh
33910a85b9
C++: restrict global variable IR generation
2022-06-20 15:51:44 -04:00
Robert Marsh
7818dafecc
C++: cleanup some implicit this usage
2022-06-20 15:48:30 -04:00
Robert Marsh
54488eb49b
C++: fix global vars accesses in global vars
2022-06-20 15:46:49 -04:00
Robert Marsh
a3f1d61913
C++: test for global var access in a global var
2022-06-20 15:26:28 -04:00
Robert Marsh
048e5d8474
C++: IR data flow through global variables
2022-06-20 15:15:45 -04:00
Robert Marsh
c216176de1
C++: sync and accept new consistency test
2022-06-20 15:15:40 -04:00
Andrew Eisenberg
3547c338ef
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-20 12:00:43 -07:00
Arthur Baars
adc1a3076c
Merge pull request #9432 from thiggy1342/experimental-decompression-api
...
RB: Adding decompression-api to experimental ruleset
2022-06-20 20:54:09 +02:00
Robert Marsh
f0634140b6
C++: fix inconsistencies from IR global vars
2022-06-20 14:41:10 -04:00
Jeroen Ketema
89d4f84731
C++: Update tests for frontend update
2022-06-20 14:41:09 -04:00
Robert Marsh
e0878d7d3c
C++: Fix IR variable reuse for global var inits
2022-06-20 14:41:02 -04:00
Robert Marsh
767b0cfdfb
Revert "Merge pull request #8933 from MathiasVP/revert-globals"
...
This reverts commit 2517371a37 , reversing
changes made to db856798b9 .
2022-06-20 14:26:10 -04:00
Chris Smowton
4b825df60c
Kotlin: don't emit synthetic parameter names
...
The QL library already expects these to be missing in some cases and generates its own names when they are absent. Writing synthetic names to the database can produce inconsistencies if the true name is seen later.
2022-06-20 19:19:35 +01:00
Asger F
835c9bb0b9
JS: Add test
2022-06-20 20:16:07 +02:00
Asger F
a0d3a6b5b1
JS: Add withoutPropStep and model 'await' steps with it
2022-06-20 20:16:07 +02:00
thiggy1342
c5bf1b8aab
update test expectation
2022-06-20 17:27:33 +00:00
Andrew Eisenberg
9d6b1bf142
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-20 10:24:56 -07:00
Ian Lynagh
875776d91d
Merge pull request #9581 from igfoo/igfoo/redundant_cast
...
Kotlin: Remove a redundant cast
2022-06-20 17:28:49 +01:00
Ian Lynagh
f22de1ac81
Merge pull request #9583 from igfoo/igfoo/locationdocs
...
Fix broken links to information about Locations
2022-06-20 17:28:24 +01:00
Paolo Tranquilli
c9f48da569
Swift: add --quiet to codegen
2022-06-20 18:03:59 +02:00
Paolo Tranquilli
3d222a7377
Merge main into redsun82/swift-use-generated-classes
2022-06-20 18:02:13 +02:00
Paolo Tranquilli
48584a6c2e
Merge main into redsun82/swift-use-generated-classes
2022-06-20 17:53:21 +02:00
Mathias Vorreiter Pedersen
35c8ca15f5
Merge pull request #8912 from rdmarsh2/rdmarsh2/fix-ir-globals
...
C++: Fix IR variable reuse for global var inits
2022-06-20 16:45:39 +01:00
thiggy1342
973013ff9c
Merge branch 'main' into experimental-decompression-api
2022-06-20 11:37:38 -04:00
Arthur Baars
a87ea4a75a
Merge pull request #9589 from aibaars/update-tree-sitter-embeded-template
...
Update tree-sitter-embeded-template
2022-06-20 17:34:43 +02:00
Paolo Tranquilli
7223fedb58
Swift: fix user.sh pre-commit insallation
2022-06-20 15:28:54 +00:00
thiggy1342
a298029dff
Merge branch 'main' into experimental-decompression-api
2022-06-20 11:06:24 -04:00
thiggy1342
7932d3e4ab
Update ruby/ql/test/query-tests/security/decompression-api/DecompressionApi.expected
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 11:05:56 -04:00
thiggy1342
db46a1d807
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 11:05:16 -04:00
Paolo Tranquilli
15c4ac248d
Swift: add pip to codespace
2022-06-20 15:05:11 +00:00
Arthur Baars
c5d3df087d
Update tree-sitter-embeded-template
2022-06-20 17:04:27 +02:00
Mathias Vorreiter Pedersen
f4363e3aba
Merge pull request #9619 from MathiasVP/swift-better-function-names
...
Swift: Generate better declaration names
2022-06-20 16:01:18 +01:00
Paolo Tranquilli
81ce511071
Swift: add pre-commit to codespace
2022-06-20 15:00:24 +00:00
Michael Nebel
b4cb1e58d3
Swift: Sync FlowSummaryImpl to swift.
2022-06-20 16:30:12 +02:00
Mathias Vorreiter Pedersen
a1bf448e56
Swift: Accept more test changes.
2022-06-20 15:28:06 +01:00
Michael Nebel
b4457de58c
C#/Java: Fix typo in the QL doc comment.
2022-06-20 16:26:07 +02:00
Michael Nebel
c9c981d03a
C#: Add release note for the CSV DSL change.
2022-06-20 16:20:02 +02:00
Michael Nebel
b6ccaf14f6
Java: Update Log4J models with provenance information.
2022-06-20 16:20:02 +02:00
Michael Nebel
733fc16902
Java: Update ThreadResourceAbuse specific models with provenance information.
2022-06-20 16:20:02 +02:00
Michael Nebel
0d4321666a
Java: Update fragment injection sinkmodels.
2022-06-20 16:20:02 +02:00
Michael Nebel
2cfeffcc17
Java: Update model generator tests with provenance column.
2022-06-20 16:20:02 +02:00
Michael Nebel
e851b03c6f
Java: Add source and sink kind model validation.
2022-06-20 16:20:02 +02:00
Michael Nebel
8e7e6c4c6f
Java: Update FlowTestCase generator with provenance wildcard.
2022-06-20 16:20:02 +02:00
Michael Nebel
2e46e93f36
Java: Update java models with provenance column information.
2022-06-20 16:20:02 +02:00
Michael Nebel
4622b69c5d
Java: Update flow summary impl and external flow to support provenance and include testing in Csv model validation.
2022-06-20 16:20:02 +02:00
Michael Nebel
649757c27f
Java/Ruby: Sync files.
2022-06-20 16:20:01 +02:00
Michael Nebel
38c6bf55b9
C#: Make CSV model validation of the provenance column.
2022-06-20 16:20:01 +02:00
Michael Nebel
5e3bb8297a
C#: Make the model predicates emmit the provenance directly to enable testing.
2022-06-20 16:20:01 +02:00
Michael Nebel
cf3cb292b7
C#: Update the model generator to use provenance column printing.
2022-06-20 16:20:01 +02:00
Michael Nebel
e0a96e16c3
C#: Update entity framework flow summaries test.
2022-06-20 16:20:01 +02:00
Michael Nebel
da0b9db57f
C#: Update flow summary printing in test cases to reflect provenance.
2022-06-20 16:20:01 +02:00
Michael Nebel
2975e51652
C#: Update existing production models with provenance information.
2022-06-20 16:20:01 +02:00
Michael Nebel
32b69d3e0c
C#: Update external models tests.
2022-06-20 16:20:01 +02:00
Michael Nebel
d6fa7db9f2
C#: Update CSV validation to the new format and improve test failure printing.
2022-06-20 16:20:01 +02:00
Michael Nebel
e3a5f7b8a3
C#: Introduce provenance column in CSV format for Models as data summaries, sources and sinks.
2022-06-20 16:20:01 +02:00
Michael Nebel
d219ac385b
Update java/ql/src/Telemetry/ExternalLibraryUsage.ql
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-06-20 16:15:06 +02:00
Michael Nebel
169ef55890
Update csharp/ql/src/Telemetry/ExternalLibraryUsage.ql
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-06-20 16:14:44 +02:00
Paolo Tranquilli
52ee4d4057
Swift: add devcontainer setup
2022-06-20 14:11:28 +00:00
Mathias Vorreiter Pedersen
c049988116
Swift: Accept test changes.
2022-06-20 14:57:16 +01:00
Mathias Vorreiter Pedersen
850a90d9a8
Swift: Change the declaration names generated by the extractor to match the output of the Swift compiler.
2022-06-20 14:57:16 +01:00
thiggy1342
633ddf46fb
fix comments
2022-06-20 13:53:56 +00:00
thiggy1342
b4c893d857
Update ruby/ql/test/query-tests/security/decompression-api/decompression_api.rb
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:50:12 -04:00
thiggy1342
9c9ac919b7
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:49:52 -04:00
thiggy1342
3949e04797
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:49:11 -04:00
thiggy1342
2f505c527b
Merge branch 'main' into experimental-decompression-api
2022-06-20 09:48:21 -04:00
Anders Schack-Mulligen
730871cc74
Swift: Deprecate BarrierGuard.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
a7c268f804
Python: adjust test.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
1b13790a36
Ruby: Deprecate and replace BarrierGuard class.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
f473a0a961
Python: Deprecate and replace BarrierGuard class.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
87d5305f5b
Go: Ad-hoc patch the shared libs.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
406f5b525b
Go: Deprecate and replace BarrierGuard class
2022-06-20 15:46:27 +02:00
Geoffrey White
30557ebe55
Swift: Test for string length conflation query.
2022-06-20 14:38:52 +01:00
Cornelius Riemenschneider
d3c7395fa2
Go: Properly escape dash in tracing-config.lua
...
Previously, the pattern didn't match what it was intended to match.
2022-06-20 14:29:50 +02:00
Alex Denisov
42dc6814f0
Swift: extract all output-producing source files, not only primary files
2022-06-20 14:06:54 +02:00
AlexDenisov
fc7e0ec193
Merge pull request #9615 from github/redsun82/swift-fix-synthesized-entities
...
Swift: fix emission of synthesized entities
2022-06-20 13:29:32 +02:00
Asger F
2936e1ada8
Merge pull request #9457 from asgerf/js/madman-prep2
...
JS: Some more improvements to d.ts file analysis
2022-06-20 13:25:07 +02:00
Tony Torralba
b373c435f6
Fix test expectations
2022-06-20 13:16:45 +02:00
Paolo Tranquilli
90f0e3ee72
Swift: remove forgotten resolved TODO
2022-06-20 13:08:28 +02:00
Tamás Vajk
b16fcb72eb
Merge pull request #9559 from tamasvajk/kotlin-fix-parcelize-symbols-3
...
Kotlin: substitute fake Parcelize functions with their real equivalent ones
2022-06-20 13:05:23 +02:00
Paolo Tranquilli
95a6c5d4e5
Swift: fix emission of synthesized entities
...
This was temporarily broken as we were skipping full emission of all
entities without any valid location.
We now rely on `decl->getDeclContext()->getParentSourceFile()` which is
more robust.
2022-06-20 13:00:05 +02:00
Tamás Vajk
f737804035
Merge pull request #9610 from tamasvajk/fix/global-statements
...
C#: Fix global statement extraction
2022-06-20 12:54:36 +02:00
Paolo Tranquilli
c9eef0c6f1
Merge pull request #9592 from github/alexdenisov/extend-lua-tracer-config
...
Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args
2022-06-20 12:53:17 +02:00
Erik Krogh Kristensen
7d62b9e131
move the pruning for module resolution of TypeExprs
2022-06-20 12:12:57 +02:00
Michael Nebel
70203633a1
Merge pull request #9393 from michaelnebel/csharp/asptaintedmember
...
C#: ASP.NET Core like members are tainted
2022-06-20 12:11:16 +02:00
Tony Torralba
78fcdd22db
Change test class name
2022-06-20 12:07:32 +02:00
Tony Torralba
3b60a1c3bc
Add change note
2022-06-20 12:07:31 +02:00
Tony Torralba
2b2fa6e15b
Add taint step for String.valueOf(Editable)
...
Kotlin inlines expr.toString() as String.valueOf(expr) when expr is nullable
2022-06-20 12:07:31 +02:00
Mathias Vorreiter Pedersen
edf0be0854
Merge pull request #9611 from MathiasVP/swift-nomagic-get-location
...
Swift: Add `nomagic` to `getLocation`
2022-06-20 10:42:45 +01:00
AlexDenisov
304f58b12c
Update swift/tools/tracing-config.lua
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-20 11:22:13 +02:00
Mathias Vorreiter Pedersen
57abd4af89
Merge pull request #9612 from MathiasVP/fix-other-constructor-decl-ref-expr-to-string
...
Swift: Fix 'toString' on 'OtherConstructorDeclRefExpr'
2022-06-20 10:17:15 +01:00
Mathias Vorreiter Pedersen
12d27ec580
Swift: Modify 'toString' in 'OtherConstructorDeclRefExpr' to properly reflect that it's a reference and not a call.
2022-06-20 09:59:23 +01:00
yoff
8a2125353d
Python: fix definition of LocalSourceNode
...
and typo
2022-06-20 08:48:33 +00:00
AlexDenisov
af379da7e6
Merge pull request #9321 from github/alexdenisov/xref-decls
...
Swift: do not duplicate 'external' declarations
2022-06-20 10:43:05 +02:00
Mathias Vorreiter Pedersen
068ac2b80e
Swift: Add 'nomagic' to 'getLocation'.
2022-06-20 09:41:06 +01:00
Paolo Tranquilli
a91c94c38b
Swift: temporarily disable failing test
2022-06-20 10:32:19 +02:00
Paolo Tranquilli
1f53b7fbe8
Merge main into alexdenisov/xref-decls
2022-06-20 10:25:29 +02:00
yoff
94145e9e74
Update python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll
2022-06-20 10:14:52 +02:00
Tamas Vajk
51f0a928dc
C#: Fix global statement extraction by extracting statements inside the implicit main method context
2022-06-20 10:09:11 +02:00
Rasmus Wriedt Larsen
ae44a941f9
Merge pull request #9421 from RasmusWL/inline-brackets
...
Inline Expectation Tests: Allow `tag[foo bar]`
2022-06-20 10:01:19 +02:00
Tamas Vajk
c460e5757b
C#: Add extractor error test for global statement extraction
2022-06-20 09:42:18 +02:00
Tamás Vajk
be2dfffb76
Merge pull request #9564 from tamasvajk/fix/diagnostic-query-metadata
...
C#: Change `kind` query metadata to `diagnostic` for compiler/extractor errors and messages
2022-06-20 09:02:35 +02:00
Jeroen Ketema
a4ecb7b4e9
Merge pull request #9473 from ton31337/fix/missing_closing
...
doc: Add missing closing bracket in basic-query-for-cpp-code
2022-06-20 08:38:35 +02:00
AlexDenisov
f1786f4d6b
Apply suggestions from code review
...
Co-authored-by: Cornelius Riemenschneider <cornelius@github.com >
2022-06-20 07:29:10 +02:00
Harry Maclean
e1dcc207b4
Ruby: Model methods in Rails::Generators::Actions
...
These methods are sinks for command injection.
2022-06-20 13:36:09 +12:00
Harry Maclean
20ff4c4299
Ruby: Model ActiveRecord::Relation#touch_all
2022-06-20 13:36:02 +12:00
Harry Maclean
7dfab371f6
Ruby: Model redirect_back and redirect_back_or_to
...
These are ActionController methods that redirect to the HTTP Referer,
falling back to the given location if there is no Referer.
2022-06-20 13:36:02 +12:00
Harry Maclean
a298f5eb5e
Ruby: Recognise File.atomic_write as a file writer
...
This method is an ActiveSupport extension, but there's no harm in
recognising it universally as any identically-named method is likely to
also be a file writer.
2022-06-20 13:36:02 +12:00
Harry Maclean
0ce14fc4e5
Ruby: Recognise ActionCable logger class
2022-06-20 13:36:02 +12:00
Harry Maclean
4ecd595b73
Remove duplicate import
2022-06-20 13:36:02 +12:00
Erik Krogh Kristensen
6d3808bd89
remove redundant cast
2022-06-19 23:19:01 +02:00
Erik Krogh Kristensen
15f9e084d5
fix spurious resolved predicate expressions
2022-06-19 22:49:02 +02:00
Erik Krogh Kristensen
f8b451a514
get all calls to resolve to a unique predicate (within reason)
2022-06-19 22:38:09 +02:00
Erik Krogh Kristensen
f08f02ed66
use the explicit super type to resolve calls
2022-06-19 20:38:16 +02:00
Erik Krogh Kristensen
115110475d
fix getName() on module instantiations
2022-06-19 20:09:32 +02:00
Erik Krogh Kristensen
26df367a8a
fix some instances of spuriously resolving to multiple predicates
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
1856e2b389
fixup the $schema in all .sarif files
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
6e2f3e2fcb
merge all .sarif files at the end of the QL-for-QL workflow
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
638a886dfe
move create-extractor-pack to a scripts folder
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
0391db6787
simplify some code based on review
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
7e93416e97
only resolve module types if we know that the TypeExpr could possibly resolve to a module
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
a59f0d36f5
run the implicit-this patch on QL-for-QL
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
3a4f0299c7
fix typo
2022-06-19 20:09:31 +02:00
thiggy1342
3478e7e910
first draft of weak params query
2022-06-18 20:43:58 +00:00
thiggy1342
0456870136
Merge branch 'main' into experimental-manually-check-request-verb
2022-06-18 15:21:53 -04:00
thiggy1342
ecb2114b7b
replace duplicate post with put
2022-06-18 19:21:17 +00:00
thiggy1342
8b36191023
drop precision to low for now
2022-06-18 18:38:58 +00:00
thiggy1342
059c4d38ad
refine query to use appropriate types
2022-06-18 18:26:45 +00:00
Erik Krogh Kristensen
a5e789c72b
Merge pull request #9537 from github/dependabot/cargo/ql/crossbeam-utils-0.8.8
...
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ql
2022-06-18 15:44:34 +02:00
Erik Krogh Kristensen
02b9745eb6
Merge pull request #9538 from github/dependabot/cargo/ql/regex-1.5.5
...
Bump regex from 1.5.4 to 1.5.5 in /ql
2022-06-18 15:44:10 +02:00
thiggy1342
8aa2602d9e
trying to hone in on eq comparison and include?
2022-06-18 03:09:04 +00:00
thiggy1342
78f5186e6a
remove barrierguards import
2022-06-18 00:43:01 +00:00
thiggy1342
ba1818fc60
Merge branch 'main' into experimental-decompression-api
2022-06-17 20:21:23 -04:00
Taus
3a328f6a3f
Merge pull request #6570 from yoff/python/broaden-noqa-regex
...
Python: Broaden noqa regex to allow comments
2022-06-17 23:56:39 +02:00
Geoffrey White
ca3d7220e7
Swift: placeholder query for string length conflation.
2022-06-17 21:32:52 +01:00
thiggy1342
b171883cd0
Merge branch 'main' into experimental-decompression-api
2022-06-17 12:30:38 -04:00
thiggy1342
4163ae1ca3
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.qhelp
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-17 12:30:22 -04:00
thiggy1342
3b87c1d040
add qlhelp file and example
2022-06-17 16:03:40 +00:00
Rasmus Wriedt Larsen
b65a10d1ef
Inline Expectation Tests: sync
2022-06-17 17:38:19 +02:00
Rasmus Wriedt Larsen
5fb41e4894
Inline Expectation Tests: Disallow tag[[[foo bar]
2022-06-17 17:36:04 +02:00
Paolo Tranquilli
be210aa3af
Merge alexdenisov/xref-decls into redsun82/swift-use-generated-classes
2022-06-17 17:03:30 +02:00
Chris Smowton
a7993fb455
Merge pull request #9577 from smowton/smowton/fix/go-mod-tidy-vendoring
...
Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
2022-06-17 15:26:59 +01:00
Chris Smowton
91ec8a3447
Merge pull request #9591 from smowton/smowton/admin/cherry-pick-kotlin-1.7-ci-fixes
...
Cherry-pick: Fix Kotlin single-version build when the best candidate has trailing version info
2022-06-17 14:14:28 +01:00
Erik Krogh Kristensen
84556fb93b
Merge pull request #9575 from erik-krogh/paramModules
...
QL: support for parameterized modules
2022-06-17 15:07:48 +02:00
Rasmus Wriedt Larsen
f1b0a814e0
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-06-17 15:04:57 +02:00
Asger F
15278fe94f
JS: Remove debug println
2022-06-17 14:57:03 +02:00
Asger F
6a4b3a190d
JS: Bump extractor version
2022-06-17 14:40:22 +02:00
Asger F
ed4c39bbb4
JS: Upgrade script
2022-06-17 14:40:22 +02:00
Asger F
5610f654e9
JS: Add PackageJson.getTypingsModule
2022-06-17 14:40:22 +02:00
Asger F
a3204f6d74
JS: Trim whitespace in dbscheme
2022-06-17 14:40:22 +02:00
Asger F
608de70568
JS: Associate symbols with external module decls
2022-06-17 14:40:22 +02:00
Asger F
5faff5609d
JS: Map symbol base types to their actual type
2022-06-17 14:40:22 +02:00
Asger F
fb40d9bc78
Ignore .model-temp
2022-06-17 14:40:22 +02:00
Anders Schack-Mulligen
bbb8d29442
C/C++: Deprecate BarrierGuard class.
2022-06-17 14:29:05 +02:00
Alex Denisov
97c38d9d2d
Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args
2022-06-17 14:19:12 +02:00
Chris Smowton
95982d2587
Fix Kotlin single-version build when the best candidate has trailing version info
...
For example, 1.7.0-RC would previously be truncated to 1.7.0 resulting in failure to build the single-version distro as all candidate alternate-version kotlin files would be ignored.
2022-06-17 12:36:26 +01:00
Chris Smowton
92b8c0f864
Merge pull request #9563 from smowton/smowton/fix/name-trap-files-after-jvmnames
...
Kotlin: Name trap files after jvmnames
2022-06-17 12:32:28 +01:00
Erik Krogh Kristensen
80f66779fb
fixup Definitions.qll
2022-06-17 11:27:07 +02:00
Erik Krogh Kristensen
13b743643e
everything is a TypeRef, some TypeRefs just resolve to a module
2022-06-17 11:22:04 +02:00
Alex Ford
5923eb4962
Merge pull request #9566 from alexrford/ruby/activerecord-findby-dynamic
...
Ruby: recognize ActiveRecord `find_by_x` methods
2022-06-17 09:39:46 +01:00
Nick Rolfe
cac53b5163
Merge pull request #9588 from github/dependabot/cargo/ruby/thread_local-1.1.4
...
Bump thread_local from 1.1.3 to 1.1.4 in /ruby
2022-06-17 09:28:24 +01:00
Nick Rolfe
5f61c0c0b3
Merge pull request #9587 from github/dependabot/cargo/ql/thread_local-1.1.4
...
Bump thread_local from 1.1.3 to 1.1.4 in /ql
2022-06-17 09:27:51 +01:00
Erik Krogh Kristensen
2b5af15d80
comments about what we resolve, and remove a debug comment
2022-06-17 09:09:58 +02:00
Anders Schack-Mulligen
99343c4606
Merge pull request #9582 from igfoo/igfoo/tidy
...
Java: Remove some redundant string concatenations, and a double space
2022-06-17 09:02:05 +02:00
Harry Maclean
230192df3b
Merge pull request #9267 from hmac/hmac/improper-memoization
...
Ruby: Add Improper Memoization query
2022-06-17 16:31:55 +12:00
thiggy1342
7c2b19baad
tweaks and add Zip::File.open_buffer to query
2022-06-17 02:43:54 +00:00
dependabot[bot]
583ab492f9
Bump thread_local from 1.1.3 to 1.1.4 in /ruby
...
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs ) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases )
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.1.3...1.1.4 )
---
updated-dependencies:
- dependency-name: thread_local
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-17 01:44:43 +00:00
dependabot[bot]
e456cdb5dc
Bump thread_local from 1.1.3 to 1.1.4 in /ql
...
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs ) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases )
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.1.3...1.1.4 )
---
updated-dependencies:
- dependency-name: thread_local
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-17 01:42:18 +00:00
Henry Mercer
4733653939
Add a note on how to install dependencies from GHES
2022-06-16 15:08:16 -07:00
Henry Mercer
e4462b7aac
Add a section on authenticating to Container registries
2022-06-16 14:39:37 -07:00
Henry Mercer
5931ea4ab8
Add section on managing packs on GHES
2022-06-16 14:37:34 -07:00
thiggy1342
01cb408393
Merge branch 'main' into experimental-decompression-api
2022-06-16 17:23:55 -04:00
Erik Krogh Kristensen
96eacd0ea6
disable consistency checks in QL tests that does not hold with the current parameterized modules implementation
2022-06-16 23:10:09 +02:00
Erik Krogh Kristensen
e557f233d7
mark the implements of a module as being alive
2022-06-16 23:03:06 +02:00
Erik Krogh Kristensen
cf89faead0
just use TypeExpr to resolve modules
2022-06-16 22:55:11 +02:00
Erik Krogh Kristensen
dce817ec4b
resolve calls to all instantiations of a signature predicate
2022-06-16 22:55:11 +02:00
Erik Krogh Kristensen
2a7a0f398a
add support for signature modules (warning: ugly commit)
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
98690c8a2e
add support for class signatures in parameterized modules
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
e5d3a8fe90
add callgraph test for signature predicates
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
20c9222e23
use explicit this
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
744e2db152
fix the parser to allow lower-case module names
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
55b6f073c2
resolve calls to signature predicates
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
f25c4c5fdf
add consistency test that parents are unique (and fix non-unique parents)
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
14b5f8410f
move the consistency predicates where they should be
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
4be969ca3b
a bit of cleanup on SignatureExpr
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
6e7db2d37c
hook up the pretty AST of a parameterized module
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
1caafb87f7
add type arguments of ModuleInstation to the pretty AST
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
adc1466cab
save the name of an instantiated module
2022-06-16 22:55:10 +02:00
Ian Lynagh
5ba672f035
NonSerializableField: Accept test output changes
2022-06-16 17:34:56 +01:00
Ian Lynagh
b80e6421b6
Fix broken links to information about Locations
2022-06-16 16:57:59 +01:00
Arthur Baars
e95194ce67
Merge pull request #9477 from thiggy1342/experimental-archive-api
...
RB: Adding experimental query for detecting path traversal in Archive libraries
2022-06-16 17:45:18 +02:00
Rasmus Wriedt Larsen
45af148f05
Merge pull request #9215 from RasmusWL/ruby-mad-argument-self
...
Ruby: Fixes for `Argument[any,any-named]` in MaD
2022-06-16 17:38:32 +02:00
Ian Lynagh
e7bc2ca423
Java: Remove some redundant string concatenations
2022-06-16 16:38:17 +01:00
Ian Lynagh
13ddc4a988
Java: Remove a double space from an alert message
2022-06-16 16:35:09 +01:00
thiggy1342
6416b8ddb9
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-16 10:20:17 -04:00
Chris Smowton
0ba2a670bd
Merge pull request #9580 from smowton/smowton/fix/kotlin-build-single-trailing-version-info
...
Fix Kotlin single-version build when the best candidate has trailing version info
2022-06-16 15:11:14 +01:00
thiggy1342
84fce278f1
Merge branch 'main' into experimental-archive-api
2022-06-16 09:30:22 -04:00
Ian Lynagh
9a7ff4bcdf
Kotlin: Remove a redundant cast
2022-06-16 14:08:12 +01:00
Chris Smowton
a2c0fe4edb
Fix Kotlin single-version build when the best candidate has trailing version info
...
For example, 1.7.0-RC would previously be truncated to 1.7.0 resulting in failure to build the single-version distro as all candidate alternate-version kotlin files would be ignored.
2022-06-16 13:25:59 +01:00
Asger F
4941143c3c
Merge pull request #9578 from asgerf/js/library-input-meta-query
...
JS: Add meta query for measuring library inputs
2022-06-16 13:14:40 +02:00
Alex Ford
c44a68613a
Ruby: add a test case for ActiveRecord dynamic finder methods
2022-06-16 11:29:56 +01:00
Alex Ford
56bf977498
Ruby: trim some SQLi related comments from ActiveRecord.rb
2022-06-16 11:29:56 +01:00
Alex Ford
de486baf4a
Ruby: rename ActiveRecord.rb test case file
2022-06-16 11:29:56 +01:00
Asger F
3b4b56be28
JS: Add meta query for measuring library inputs
2022-06-16 11:57:33 +02:00
Anders Schack-Mulligen
1b374e262f
C#: Replace deprecated barrier guards.
2022-06-16 11:25:29 +02:00
Anders Schack-Mulligen
456f02fd82
C#: Add BarrierGuard parameterised module.
2022-06-16 11:25:29 +02:00
Anders Schack-Mulligen
6518a01ded
Dataflow: Sync.
2022-06-16 11:25:28 +02:00
Anders Schack-Mulligen
33deff9bae
Java: Deprecate BarrierGuard class.
2022-06-16 11:25:28 +02:00
Taus
9bf2eb55ca
Python: Allow whitespace before colon
...
As suggested by @DimitriPapadopolous.
Also fixes the test output to account for the `noqa` annotation (with
added comment) that we're now detecting.
2022-06-16 11:16:58 +02:00
Rasmus Lerchedahl Petersen
98301332bd
Python: Broaden noqa regex
2022-06-16 11:16:58 +02:00
Chris Smowton
16a2107f89
Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
...
This is likely to spuriously remove dependencies leading to a later build failure due to missing requirements.
2022-06-16 10:12:39 +01:00
Rasmus Wriedt Larsen
24750dcc17
Ruby: Sync comment for self API graph label
2022-06-16 11:03:07 +02:00
Rasmus Wriedt Larsen
2ad4921a76
Ruby: Apply suggestions from code review
...
Co-authored-by: Asger F <asgerf@github.com >
2022-06-16 11:01:14 +02:00
Mathias Vorreiter Pedersen
cdf343c5ee
Merge pull request #9576 from erik-krogh/swift-fix
...
Swift: add empty implementation of `defaultImplicitTaintRead`
2022-06-16 09:51:44 +01:00
Mathias Vorreiter Pedersen
2ed3f5cafe
Merge pull request #9560 from MathiasVP/swift-non-empty-query-directory
...
Swift: Add a placeholder query
2022-06-16 09:29:25 +01:00
Ian Lynagh
0d97753cf8
Merge pull request #9573 from igfoo/igfoo/typo
...
CaptureSinkModels.ql: Fix typo
2022-06-16 09:24:45 +01:00
Erik Krogh Kristensen
c5e412db01
add empty implementation of defaultImplicitTaintRead
2022-06-16 10:17:59 +02:00
Michael Nebel
9211d75b3d
C#: Add change note.
2022-06-16 08:43:06 +02:00
Michael Nebel
1f2f2fff7f
C#: Update testcases with examples.
2022-06-16 08:43:06 +02:00
Michael Nebel
e1c7003cde
C#: Only consider directly public auto implemented properties with public getters and setters as being tainted.
2022-06-16 08:43:06 +02:00
Michael Nebel
ef0a3d0a79
C#: Add testcase for controller parameter types tainted members.
2022-06-16 08:38:31 +02:00
Michael Nebel
93007f89c8
C#: Move ASP Net Core stubs into stubs folder.
2022-06-16 08:38:31 +02:00
thiggy1342
ef9442d377
Merge branch 'main' into experimental-archive-api
2022-06-15 21:46:23 -04:00
thiggy1342
056fa71f3e
add change notes
2022-06-16 01:04:50 +00:00
thiggy1342
b078430faf
add Zip::File.new query to tests
2022-06-16 00:51:50 +00:00
Harry Maclean
311296469d
Minor improvements to ImproperMemoizationQuery
2022-06-16 12:44:33 +12:00
Harry Maclean
ff0422c12d
Ruby: Add rb/improper-memoization change note
2022-06-16 12:44:33 +12:00
Harry Maclean
1ac604f769
Ruby: Private import in ImproperMemoizationQuery
2022-06-16 12:44:33 +12:00
Harry Maclean
457a84006c
Ruby: Narrow memo method candidates earlier
2022-06-16 12:44:33 +12:00
Harry Maclean
ef6f0e5b30
Ruby: Add Improper Memoization query
...
This query finds cases where a method memoizes its result but fails to
include one or more of its parameters in the memoization key (or doesn't
use memoization keys at all). This can lead to the method returning
incorrect results when subsequently called with different arguments.
2022-06-16 12:44:33 +12:00
thiggy1342
e317392336
add Zip::File.new to framework
2022-06-16 00:22:15 +00:00
thiggy1342
0281dbd532
remove Zip::Entry.extract from query
2022-06-16 00:04:31 +00:00
Harry Maclean
7c5a83833b
Merge pull request #8737 from hmac/hmac/posix-spawn
...
Ruby: Model the posix-spawn gem
2022-06-16 00:50:10 +01:00
Harry Maclean
a38e59a681
Merge pull request #9030 from hmac/hmac/activesupport
...
Ruby: Model various bits of ActiveSupport
2022-06-16 00:49:38 +01:00
Ian Lynagh
5280cf4e91
CaptureSinkModels.ql: Fix typo
2022-06-15 20:19:15 +01:00
Erik Krogh Kristensen
ce323e215b
add heuristic taint-step for potentially unmodelled libraries, and meta query for counting potential unmodelled steps
2022-06-15 20:27:49 +02:00
thiggy1342
540c51022d
Merge branch 'main' into experimental-decompression-api
2022-06-15 13:40:27 -04:00
thiggy1342
c67c25d4a5
Merge branch 'main' into experimental-archive-api
2022-06-15 13:40:13 -04:00
Chris Smowton
2d57d3aa78
Implement array type variance lowering
...
Kotlin permits introducing a `? extends ...` wildcard against an Array even though the class is final, so long as its argument itself can be extended (i.e. isn't final or is another array type satisfying this condition).
Contravariant arrays get lowered to Object[], and are subject to automatic `extends` wildcard introduction, unless their element type was already Any.
2022-06-15 18:36:56 +01:00
Andrew Eisenberg
b993558987
Update docs to include how to run a pack with path
...
`scope/name@range:path` is a valid way to specify a set of queries.
2022-06-15 10:14:51 -07:00
Erik Krogh Kristensen
b16124d522
Merge pull request #9568 from tausbn/ql-add-parser-support-for-parameterised-modules
...
QL: Allow module applications to the right of `::`
2022-06-15 19:14:07 +02:00
Taus
73a807c7e8
QL: Allow module applications to the right of ::
2022-06-15 16:18:30 +00:00
Robert Marsh
478c2773fe
Merge pull request #9555 from MathiasVP/swift-mad
...
Swift: Add MaD skeleton
2022-06-15 11:58:04 -04:00
Rasmus Wriedt Larsen
d6e68258a4
Python: API-graphs: allow class decorators in .getASubclass()
2022-06-15 17:30:34 +02:00
Rasmus Wriedt Larsen
5f32f898d5
Python: API-graphs: test class decorators and subclass
...
A class decorator could change the class definition in any way.
In this specific case, it would be better if we allowed the subclass to
be found with API graphs still.
inspired by
c2250cfb80/tests/auth_tests/test_views.py (L40-L46)
2022-06-15 16:16:34 +02:00
Rasmus Wriedt Larsen
b2c8e0fe8d
Python: Add comment to test
2022-06-15 15:59:54 +02:00
Rasmus Wriedt Larsen
24c9aff2fc
Python: Fix a type-tracking test
2022-06-15 15:58:17 +02:00
Paolo Tranquilli
0957801588
Merge pull request #9521 from github/redsun82/swift-qltestgen
...
Swift: generated extractor tests
2022-06-15 15:39:35 +02:00
Alex Ford
34065f9e93
Ruby: recognize ActiveRecord find_by_x methods
2022-06-15 14:33:09 +01:00
github-actions[bot]
1ed70d51d7
Post-release preparation for codeql-cli-2.9.4
2022-06-15 13:25:20 +00:00
Michael Nebel
9639dca33f
C#: Consider all properties of ASP.NET Core like objects to also be sources of tainted data.
2022-06-15 15:13:37 +02:00
Paolo Tranquilli
78deff68a3
Swift: add generated enum tests
2022-06-15 14:50:33 +02:00
yoff
f14a90ff09
Merge pull request #9200 from tausbn/python-modernise-weak-file-permissions-query
...
Python: Modernise weak file permissions query
2022-06-15 14:37:17 +02:00
Erik Krogh Kristensen
b24b275b94
Merge pull request #7669 from erik-krogh/fieldUnusedInDisjunct
...
QL: field unused in disjunct
2022-06-15 14:32:37 +02:00
Alex Denisov
08ad95b769
Swift: switch to references instead of pointers
2022-06-15 14:19:31 +02:00
Rasmus Lerchedahl Petersen
0608d4d2f9
python: fix alerts
...
Also, remove the `toLowerCase` again,
as I do not know what effect it will have.
2022-06-15 14:18:29 +02:00
AlexDenisov
343ba5ffa8
Update swift/extractor/SwiftDispatcher.h
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-15 14:13:50 +02:00
Rasmus Lerchedahl Petersen
40b61fa85f
python: fix qldocs and clean-up dead code
2022-06-15 14:07:35 +02:00
Mathias Vorreiter Pedersen
eff046e2f7
Swift: Respond to review comments.
2022-06-15 13:01:27 +01:00
Mathias Vorreiter Pedersen
693575a7e5
Update sync-identical-files.
2022-06-15 13:00:57 +01:00
Mathias Vorreiter Pedersen
55d551c99c
Swift: Add 'MaD' skeleton.
2022-06-15 13:00:56 +01:00
Tamas Vajk
aedf43f14a
C#: Change kind query metadata to diagnostic for compiler/extractor errors and messages
2022-06-15 13:50:27 +02:00
Jeroen Ketema
77b2f07eff
Merge pull request #9561 from jketema/frontend-patches
...
Revert "C++: Fix test failures where location of reference dereference in lambda changed"
2022-06-15 13:29:53 +02:00
Robert Marsh
a59335d0e2
Merge pull request #9557 from MathiasVP/closure-expr-as-cfg-callable
...
Swift: Mark closures as callables in the CFG library
2022-06-15 07:21:33 -04:00
yoff
9dbb451f41
Merge pull request #9463 from RasmusWL/req-wo-cert-validation
...
Python: Rewrite `py/request-without-cert-validation`
2022-06-15 13:00:57 +02:00
Chris Smowton
90e8d4e1de
Name trap files after jvmnames
...
This should lead to better Java/Kotlin correspondence since the Java extractor will naturally name trap files for JVM names, and avoids a specific bug (tested) where MapsKt.iterator's two overloads (one taking `Map` and one `MutableMap`) are JvmName'd differently since their Java-lowered signatures would be identical. Without this change only
one of the iterator overloads would get extracted leaving the other one a dangling reference.
2022-06-15 11:55:58 +01:00
Rasmus Lerchedahl Petersen
f4ce382b7d
python: update test expectations
2022-06-15 12:40:14 +02:00
Anders Schack-Mulligen
28fe7a7660
Merge pull request #9558 from github/release-prep/2.9.4
...
Release preparation for version 2.9.4
2022-06-15 12:27:34 +02:00
Jeroen Ketema
a7d095e063
Revert "C++: Fix test failures where location of reference dereference in lambda changed"
...
This reverts commit 8e7066600a .
2022-06-15 11:58:31 +02:00
Paolo Tranquilli
a928633c59
Merge main into redsun82/swift-qltestgen
2022-06-15 11:46:34 +02:00
Chris Smowton
483281e00f
Merge pull request #9554 from smowton/smowton/fix/rename-removeat
...
Kotlin: Add more Kotlin <-> Java special method name mappings
2022-06-15 10:44:26 +01:00
Michael Nebel
9175421fa2
C#/Java: Update some QL Doc comments to comply with the standard and remove some redundant imports.
2022-06-15 11:32:54 +02:00
Michael Nebel
f810858ae4
Java: Manual rewrite of the ExternalLibraryUsage query to limit the number of returned results.
2022-06-15 11:10:05 +02:00
Michael Nebel
b9b4aedd03
Java: Rewrite most telemetry queries to restrict the number of produced results.
2022-06-15 10:59:12 +02:00
Anders Schack-Mulligen
c4782871d4
Merge pull request #9294 from aschackmull/java/barrierguard-parammod
...
Java: Add support for BarrierGuards as parameterised modules.
2022-06-15 10:56:48 +02:00
Michael Nebel
e6e2427154
Java: Add parameterized module for restricting the number of returned results in telemetry queries.
2022-06-15 10:48:44 +02:00
Michael Nebel
e3ecc5a66b
C#: Add qlDoc to the restrict predicate.
2022-06-15 10:45:32 +02:00
Tamas Vajk
c722921276
Kotlin: substitute fake Parcelize functions with their real equivalent ones
2022-06-15 10:35:48 +02:00
Mathias Vorreiter Pedersen
d3b45729fa
Swift: Add a placeholder query to the 'queries' directory.
2022-06-15 09:34:05 +01:00
github-actions[bot]
104ac05f49
Release preparation for version 2.9.4
2022-06-15 08:22:38 +00:00
Paolo Tranquilli
4a3a10bb6e
Swift: fix ignored codegen unit test
2022-06-15 09:36:55 +02:00
Paolo Tranquilli
8c60aee16d
Swift: fix GetImmediateParent.qll
2022-06-15 09:33:39 +02:00
Paolo Tranquilli
fec15fb60a
Merge main into redsun82/swift-qltestgen
2022-06-15 09:32:39 +02:00
Paolo Tranquilli
1cb8e6130a
Swift: show full diff in codegen check
2022-06-15 09:28:25 +02:00
Alex Denisov
1c9a684ac6
Swift: Introduce SwiftExtractionMode
2022-06-15 09:25:01 +02:00
Paolo Tranquilli
5a2d4faf11
Swift: remove unneeded import list sorting
2022-06-15 09:19:58 +02:00
Mathias Vorreiter Pedersen
2fdb3d638b
Merge branch 'main' into closure-expr-as-cfg-callable
2022-06-15 08:16:56 +01:00
Paolo Tranquilli
86ebb0bb68
Swift: fix qltest skipping and skip isUnknown
...
Also remove obsolete accessor and function hand-written tests.
2022-06-15 09:16:55 +02:00
Mathias Vorreiter Pedersen
b0c66dda3a
Merge pull request #9556 from MathiasVP/swift-extract-closure-params
...
Swift: Extract closure parameters
2022-06-15 08:07:08 +01:00
Paolo Tranquilli
234e05cb1c
Swift: revert accidental commit to docs
2022-06-15 08:46:17 +02:00
Alex Denisov
6d67ea267c
Swift: add cross-referencing test
2022-06-15 08:44:38 +02:00
Paolo Tranquilli
babf62b41c
Merge pull request #9411 from github/alexdenisov/extract-system-modules
...
Swift: extract system and builtin modules separately
2022-06-15 08:42:00 +02:00
thiggy1342
0fce620536
Merge branch 'main' into experimental-decompression-api
2022-06-14 21:54:08 -04:00
thiggy1342
ae86e0daea
spelling fix
2022-06-15 01:51:40 +00:00
thiggy1342
1bdaf529d9
fix qlformat errors
2022-06-15 01:49:48 +00:00
thiggy1342
df226ee610
remove standalone archive api query
2022-06-15 01:39:47 +00:00
thiggy1342
0832e299f2
move archive api path traversal tests to cwe-022
2022-06-15 01:39:47 +00:00
thiggy1342
a0f1c86031
add framework test
2022-06-15 01:39:47 +00:00
thiggy1342
098101f471
add RubyZip::File.open to frameworks
2022-06-15 01:39:47 +00:00
thiggy1342
af6fbd439c
Merge branch 'main' into experimental-archive-api
2022-06-14 20:09:02 -04:00
Chris Smowton
efbe264f93
Accept toInt/intValue and similar test changes
2022-06-14 21:44:54 +01:00
Chris Smowton
d390dc0316
Map java.lang.Number methods to their Java equivalents
2022-06-14 21:44:54 +01:00
Chris Smowton
d3fa4951f6
Accept test changes renaming removeAt(int) -> remove(int)
2022-06-14 21:44:54 +01:00
Chris Smowton
3901f57550
Fix: don't crash when local functions happen to share the name of a function with a special JVM name
2022-06-14 21:44:54 +01:00
Chris Smowton
837bef60fe
Add java.lang.Enum ordinal and name accessors to special-cased JVM names
...
Kotlin represents these as read-only properties with unusual getter names.
2022-06-14 21:44:54 +01:00
Chris Smowton
d151bf632c
Kotlin: Rewrite MutableList.removeAt(int) -> remove(int)
...
The Kotlin authors changed this to avoid a clash on List<Int>, but we must reverse the renaming so the Kotlin and Java views of the same class file extract alike.
2022-06-14 21:44:54 +01:00
Mathias Vorreiter Pedersen
ef224b9c1d
Swift: Mark non-auto closures as callables in the CFG library.
2022-06-14 21:05:48 +01:00
Taus
d05e0e9516
Merge pull request #9526 from tausbn/ql-add-parser-support-for-parameterised-modules
...
QL: Add parser support for parameterised modules
2022-06-14 22:04:08 +02:00
Robert Marsh
1a94ffb726
C++: autoformat
2022-06-14 15:59:47 -04:00
Robert Marsh
e7e517bd6f
C++: Accept more updated test output
2022-06-14 15:54:50 -04:00
Mathias Vorreiter Pedersen
6c96f71d0c
Swift: Autogenerate and accept test changes.
2022-06-14 20:39:18 +01:00
Mathias Vorreiter Pedersen
4595a9cf0b
Swift: Extract parameters to closure expressions.
2022-06-14 20:38:57 +01:00
Chris Smowton
70e5cf786b
Merge pull request #9547 from smowton/smowton/fix/constructor-wildcard-arguments
...
Kotlin: Fix wildcard introduction vs. constructor parameters
2022-06-14 19:28:51 +01:00
Robert Marsh
d508826b0f
Merge branch 'main' into rdmarsh2/fix-ir-globals
2022-06-14 13:22:04 -04:00
Paolo Tranquilli
de52f9be7b
Swift: generated extractor tests
2022-06-14 18:01:29 +02:00
Robert Marsh
07a0b4df84
C++: update test expaectations
2022-06-14 11:43:05 -04:00
Mathias Vorreiter Pedersen
fceea04c3e
Merge pull request #9550 from geoffw0/deref
...
C++: Add test for Dereferenced.qll.
2022-06-14 16:37:33 +01:00
Rasmus Wriedt Larsen
cfd640b1b2
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-06-14 16:47:24 +02:00
Michael Nebel
d288b3d35d
C#: Refactor and narrow number of displayed results of the External library usage query.
2022-06-14 16:41:48 +02:00
Jeroen Ketema
5abb0338b9
Merge pull request #9552 from jketema/rc/3.6/braced
...
C++: Introduce relation for tracking braced initializers
2022-06-14 16:41:45 +02:00
Michael Nebel
51d2eb621b
C#: Refactor queries to use Results module and thus narrowing the number of returned results.
2022-06-14 16:40:53 +02:00
Michael Nebel
d5eebc8405
C#: Add a parameterized module for a telemetry result ordering predicate (will be needed to narrow the number of produced results).
2022-06-14 16:39:45 +02:00
Joe Farebrother
f46dd8cc85
Fix misspellings
2022-06-14 15:34:08 +01:00
dependabot[bot]
d210cd4a87
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ql
...
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam ) from 0.8.5 to 0.8.8.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.8 )
---
updated-dependencies:
- dependency-name: crossbeam-utils
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 14:07:41 +00:00
Nick Rolfe
a1c0048bee
Merge pull request #9540 from github/dependabot/cargo/ruby/crossbeam-utils-0.8.8
...
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ruby
2022-06-14 15:05:38 +01:00
Joe Farebrother
a6736a99e4
Apply doc review suggestions -
...
fix typos and capitilisation; reword description.
2022-06-14 14:56:24 +01:00
Joe Farebrother
c71586e1f8
Remove checks for dynamically registered recievers
2022-06-14 14:56:24 +01:00
Joe Farebrother
320c671b73
Adress reveiw comments - make use of existing ql libraries
2022-06-14 14:56:24 +01:00
Joe Farebrother
9d048e78af
Apply suggestions from code review - fix typos/style, make things private
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-06-14 14:56:23 +01:00
Joe Farebrother
d88d216388
Add change note
2022-06-14 14:56:23 +01:00
Joe Farebrother
2fc142f41f
Add security severity
2022-06-14 14:56:23 +01:00
Joe Farebrother
8e2e8cc77f
Add qhelp
2022-06-14 14:56:22 +01:00
Joe Farebrother
4aed1a1e23
Add test cases; fix handling of recievers declared through xml
2022-06-14 14:56:22 +01:00
Joe Farebrother
87f26bf033
Fix typos
2022-06-14 14:56:22 +01:00
Joe Farebrother
1959f49165
Add Improper Intent Verification query
2022-06-14 14:56:21 +01:00
Jeroen Ketema
f71807c968
Update cpp/ql/lib/change-notes/2022-05-30-braced-initializers.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-06-14 15:39:24 +02:00
Jeroen Ketema
2052494eee
C++: Fix typo in upgrade script
2022-06-14 15:39:14 +02:00
Jeroen Ketema
f020fdbda3
C++: Update DB scheme stats
2022-06-14 15:38:55 +02:00
Jeroen Ketema
34cbc6678f
C++: Introduce relation for tracking braced initializers
2022-06-14 15:38:45 +02:00
Geoffrey White
2683d011c0
Update cpp/ql/test/library-tests/controlflow/dereferenced/dereferenced.cpp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-06-14 14:33:37 +01:00
Ian Lynagh
b524fb4f3a
Java: Add a test for cycles in the type hierarchy
2022-06-14 14:08:19 +01:00
Ian Lynagh
304e2926c9
Java: Fix RefType.getAStrictAncestor() in the presence of type hierarchy cycles
2022-06-14 14:08:19 +01:00
Rasmus Lerchedahl Petersen
7b5d9ec7df
python: Straight port of tarslip
2022-06-14 15:01:13 +02:00
Taus
5b9c668e10
Python: Restrict test to Python 3
2022-06-14 12:58:35 +00:00
Geoffrey White
512731a38d
C++: Add test for Dereferenced.qll.
2022-06-14 13:53:28 +01:00
Paolo Tranquilli
b6342ba2a0
Swift: limit Cfg.ql to test source locations
2022-06-14 14:15:48 +02:00
Alex Denisov
26d3c4a7fc
Swift: extract system and builtin modules separately
2022-06-14 14:15:48 +02:00
Mathias Vorreiter Pedersen
ff55efff99
Merge pull request #9549 from github/alexdenisov/remove-to-string-from-unknown-element
...
Swift: remove toString from UnknownElement
2022-06-14 13:15:18 +01:00
Alex Denisov
311dcfa230
Swift: remove toString from UnknownElement
...
Another attempt to remove flakiness
2022-06-14 13:37:17 +02:00
Erik Krogh Kristensen
cb0a6936ad
add support for the "exports" property in a package.json
2022-06-14 13:31:47 +02:00
Erik Krogh Kristensen
92d1c84f05
bind the result in JsonValue::getBooleanValue
2022-06-14 13:22:09 +02:00
AlexDenisov
7123735b8d
Merge pull request #9546 from github/alexdenisov/extract-OtherConstructorDeclRefExpr
...
Swift: extract OtherConstructorDeclRefExpr
2022-06-14 13:11:18 +02:00
Chris Smowton
a9f43889ea
Fix wildcard introduction vs. constructor parameters
...
Previously we handled the case of *methods* with potentially-wildcarded types that Java nontheless constrains to be invariant, but missed out the constructor case.
2022-06-14 12:07:49 +01:00
Alex Denisov
9681358a6d
Swift: extract OtherConstructorDeclRefExpr
2022-06-14 12:53:25 +02:00
dependabot[bot]
5fe3ebd1d2
Bump regex from 1.5.4 to 1.5.5 in /ql
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 10:35:37 +00:00
Arthur Baars
b20d9c266f
Merge branch 'main' into dependabot/cargo/ruby/crossbeam-utils-0.8.8
2022-06-14 12:34:29 +02:00
Arthur Baars
6f63d9ab99
Merge pull request #9539 from github/dependabot/cargo/ruby/regex-1.5.5
...
Bump regex from 1.5.4 to 1.5.5 in /ruby
2022-06-14 12:33:30 +02:00
Mathias Vorreiter Pedersen
d94633ab85
Merge pull request #9542 from github/alexdenisov/extract-extensions
...
Swift: extract extension declarations
2022-06-14 11:23:00 +01:00
Arthur Baars
b4a1ef10a9
Merge pull request #9544 from github/aibaars-patch-1
...
Fix URL in readme
2022-06-14 12:11:29 +02:00
Alex Denisov
e677b78ab9
Swift: attach NominalTypeDecl to the ExtensionDecl
2022-06-14 12:09:26 +02:00
Taus
5d306c9c22
QL: Refactor SignatureExpr
2022-06-14 09:59:00 +00:00
yoff
699761889d
Merge pull request #7127 from jty-team/jty/python/emailInjection
...
Python: CWE-079 - Add Email injection query
2022-06-14 10:54:16 +02:00
Arthur Baars
72aad0f38f
Fix URL in readme
2022-06-14 10:49:45 +02:00
Alex Denisov
cf0fc5829f
Swift: extract extension declarations
2022-06-14 08:22:43 +02:00
thiggy1342
6bef71ea2c
tweaks to tests
2022-06-14 02:17:12 +00:00
thiggy1342
7bdec98e6f
draft tests
2022-06-14 02:13:15 +00:00
thiggy1342
c012c235c6
rough draft of check request verb query
2022-06-14 01:45:02 +00:00
dependabot[bot]
91d1adea9e
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ruby
...
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam ) from 0.8.5 to 0.8.8.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.8 )
---
updated-dependencies:
- dependency-name: crossbeam-utils
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 00:43:21 +00:00
dependabot[bot]
80e47dec31
Bump regex from 1.5.4 to 1.5.5 in /ruby
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 00:38:02 +00:00
Henry Mercer
f7cc46b84b
Merge pull request #9467 from github/dependabot/github_actions/actions/setup-python-4
...
Bump actions/setup-python from 3 to 4
2022-06-14 02:24:22 +02:00
dependabot[bot]
b78f30b58d
Bump actions/setup-python from 3 to 4
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-13 19:33:33 +00:00
Alex Ford
8d195e3188
Merge pull request #9157 from alexrford/crypto-op-block-mode
...
Ruby/Python: Add a `BlockMode` concept for `CryptographicOperations`
2022-06-13 21:32:36 +02:00
Mathias Vorreiter Pedersen
6c8982b46e
Merge pull request #9469 from rdmarsh2/rdmarsh2/swift/dataflow-inout
...
Swift: Dataflow through inout parameters
2022-06-13 18:11:11 +01:00
Robert Marsh
5f77552c37
Merge branch 'main' into rdmarsh2/fix-ir-globals
2022-06-13 12:43:08 -04:00
Mathias Vorreiter Pedersen
20d9aaf055
Merge pull request #9516 from MathiasVP/revert-9419-revert-9373-cfg-for-key-paths
...
Swift: Reintroduce control-flow for key paths
2022-06-13 17:34:12 +01:00
Taus
ba6a4c6399
QL: Use more precise type for getImplements
2022-06-13 16:06:05 +00:00
Taus
5a214afdb8
QL: Use more precise type for getParameter
2022-06-13 15:53:47 +00:00
Robert Marsh
d7f839a147
Swift: use ExitNode as CFG for InoutReturnNode
2022-06-13 15:50:30 +00:00
Taus
81e41106e7
QL: Add fields for signatureExpr
2022-06-13 15:47:56 +00:00
Robert Marsh
9f2abf3d47
Swift: more inout dataflow tests
2022-06-13 15:39:17 +00:00
Taus
8c46846b82
Add fields to ModuleParam children
2022-06-13 14:27:03 +00:00
Taus
0b8656e625
Rename Application to Instantiation
2022-06-13 14:25:55 +00:00
Taus
a08be0d9b9
QL: Add parser support for parameterised modules
2022-06-13 13:52:26 +00:00
Robert Marsh
84518c8d54
Merge pull request #9404 from MathiasVP/swift-get-enclosing-function
...
Swift: Add `getEnclosingFunction` to `AstNode`
2022-06-13 09:37:51 -04:00
Geoffrey White
3ae60808c1
Merge pull request #9399 from geoffw0/cleartextbufferwriteperf
...
C++: Improve performance of Printf::callsVariadicFormatter.
2022-06-13 14:32:55 +01:00
Erik Krogh Kristensen
caf1d45bc6
Merge pull request #9407 from erik-krogh/rubyFixJoin
...
RB: fix bad CP in the charPred for CipherOperation
2022-06-13 13:17:50 +02:00
Ian Lynagh
7c5a4909c6
Merge pull request #9468 from igfoo/igfoo/overloads
...
Kotlin: Put overloads together
2022-06-13 10:44:55 +01:00
Ian Lynagh
bdae353d4d
Merge pull request #9475 from igfoo/igfoo/builddir
...
Kotlin: Do each build in its own directory
2022-06-13 10:44:36 +01:00
Ian Lynagh
ae472f32de
Merge pull request #9453 from igfoo/igfoo/sam
...
Kotlin: Simplify samMember computation
2022-06-13 10:44:18 +01:00
Ian Lynagh
d8edc83ea2
Merge pull request #9451 from igfoo/igfoo/useValueParameter
...
Kotlin: Remove some redundant code
2022-06-13 10:43:54 +01:00
Ian Lynagh
72ea5973af
Merge pull request #9454 from igfoo/igfoo/extractFunction_idOverride
...
Kotlin: Remove unused idOverride argument to extractFunction
2022-06-13 10:43:31 +01:00
Mathias Vorreiter Pedersen
89bda047ff
Swift: Accept test changes.
2022-06-13 10:14:08 +01:00
Mathias Vorreiter Pedersen
7e5235b4d5
Revert "Merge pull request #9419 from github/revert-9373-cfg-for-key-paths"
...
This reverts commit 2187bf5dde , reversing
changes made to 8b1605a617 .
2022-06-13 10:12:22 +01:00
Mathias Vorreiter Pedersen
ae288332cc
Merge pull request #9511 from MathiasVP/fix-completion-for-patterns
...
Swift: Fix completion for "naked" patterns
2022-06-13 10:56:07 +02:00
Mathias Vorreiter Pedersen
32ef535ad7
Merge pull request #9430 from github/redsun82/swift-unknown-location
...
Swift: add `UnknownLocation`
2022-06-13 10:55:53 +02:00
Paolo Tranquilli
28d2fd7a22
Merge pull request #9416 from github/redsun82/swift-codegen-docs
...
Swift: document and partially simplify codegen
2022-06-13 10:50:16 +02:00
Calum Grant
28c0906886
Update ruby/ql/lib/codeql/ruby/frameworks/stdlib/Logger.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-06-13 09:41:41 +01:00
Mathias Vorreiter Pedersen
9d7afab185
Swift: Fix completion for patterns that occur outside 'CaseLabelItems'. Previously we'd add an unnecessary 'no-match' completion to these patterns even though they were always matching. This caused some confusing output in the graph tests in particular.
2022-06-13 09:24:18 +01:00
AlexDenisov
e1c7de98e8
Merge pull request #9427 from github/redsun82/swift-macos-arm-workaround
...
Swift: build x86_64 on arm64 macOS
2022-06-13 06:30:54 +02:00
thiggy1342
038e6363a9
update severity
2022-06-11 00:09:50 +00:00
thiggy1342
c7e67eb2e2
expand test coverage for sanitizers
2022-06-10 21:30:41 +00:00
Ian Lynagh
669c1faf29
Kotlin: Do each build in its own directory
...
This can make life easier when debugging.
2022-06-10 15:01:37 +01:00
Donatas Abraitis
3174c4fa9b
doc: Add missing closing bracket in basic-query-for-cpp-code
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org >
2022-06-10 09:49:52 +03:00
Robert Marsh
97815bfa61
Swift: fix implicit this usage
2022-06-09 18:50:40 +00:00
Robert Marsh
755c56dafe
Swift: autoformat
2022-06-09 18:50:39 +00:00
Robert Marsh
fca1afa493
Swift: fix inout parameter conflation at return
2022-06-09 17:09:49 +00:00
Robert Marsh
8d4830cd23
Swift: make dataflow test a path-problem
2022-06-09 17:09:49 +00:00
Robert Marsh
a7663adf90
Swift: add flow through inout parameters
2022-06-09 17:09:49 +00:00
Robert Marsh
21ba73138d
Swift: add CallExprCfgNode
2022-06-09 17:09:49 +00:00
Robert Marsh
cb3da0eedd
Swift: add some ParamDecl methods
2022-06-09 17:09:48 +00:00
Robert Marsh
776a2965ca
Swift: extract isInOut for parameters
2022-06-09 17:09:48 +00:00
Ian Lynagh
6055aaf048
Kotlin: Put overloads together
...
Makes it easier when reading the code.
The substituteTypeArguments functions aren't actually overloads, but I
think the same applies.
2022-06-09 17:43:11 +01:00
Dave Bartolomeo
5780f156d1
Merge pull request #9456 from dbartol/dbartol/go-suite-helpers/work
...
Fix `codeql/suite-helpers` dependency for Go
2022-06-09 12:04:15 -04:00
Rasmus Wriedt Larsen
d91b92511f
Python: Add change-note
2022-06-08 17:46:51 +02:00
Rasmus Wriedt Larsen
5b2d799fde
Python: Model certificate disabling in urllib3
2022-06-08 17:41:45 +02:00
Rasmus Wriedt Larsen
0d02ca07d7
Python: Add certificate disable test of urllib/urllib2
2022-06-08 17:41:45 +02:00
Rasmus Wriedt Larsen
049e87201c
Python: Model certificate disabling in httpx
2022-06-08 17:41:45 +02:00
Rasmus Wriedt Larsen
1a2a4232a8
Python: Refactor httpx tests
...
and improve QLDocs a bit
2022-06-08 17:41:45 +02:00
Rasmus Wriedt Larsen
f72a1d98bb
Python: Model certificate disabling in aiohttp.client
2022-06-08 17:41:45 +02:00
Rasmus Wriedt Larsen
4b07a7b7be
Python: Add missing QLDoc for requests
...
Also fix links
2022-06-08 17:41:42 +02:00
Rasmus Wriedt Larsen
f37d1775f1
Python: Improve requests tests
2022-06-08 17:41:11 +02:00
Rasmus Wriedt Larsen
c21e05aa44
Python: Use HTTP::Client::Request request for py/request-without-cert-validation
...
This is very much like the Ruby query, except we also have the origin
that does the disabling.
976daddd36/ruby/ql/src/queries/security/cwe-295/RequestWithoutValidation.ql (L18-L20)
2022-06-08 15:42:32 +02:00
Rasmus Wriedt Larsen
9cb249fc2f
Python: Add test we don't handle for py/request-without-cert-validation
2022-06-08 15:39:37 +02:00
Rasmus Wriedt Larsen
bb0435aba6
Merge branch 'main' into ruby-mad-argument-self
2022-06-08 14:19:29 +02:00
Paolo Tranquilli
8b52bb0c31
Swift: build x86_64 on arm64 macOS
...
This is a temporary workaround. At a later stage we will add
* a Swift/LLVM prebuilt package for arm64
* universal binary for the extractor
2022-06-08 10:25:38 +02:00
Dave Bartolomeo
5e5e2646e2
Fix codeql/suite-helpers dependency for Go
2022-06-07 10:55:49 -04:00
Ian Lynagh
5c9fea2283
Kotlin: Remove unused idOverride argument to extractFunction
2022-06-07 11:34:43 +01:00
Ian Lynagh
33e11b3014
Kotlin: Simplify samMember computation
2022-06-07 11:11:00 +01:00
thiggy1342
62291124ff
remove constraint for Zip::File.open
2022-06-06 21:20:44 +00:00
thiggy1342
3c62271dba
fix casing of Api
2022-06-06 21:18:08 +00:00
thiggy1342
074583eab8
add archive api file open query and test
2022-06-06 21:09:57 +00:00
Ian Lynagh
763f869e3f
Kotlin: Remove some redundant code
2022-06-06 20:49:36 +01:00
thiggy1342
c5db11ee2e
use select placeholder correctly
2022-06-06 14:01:02 +00:00
thiggy1342
6cb0717a07
Fix test syntax for sanitizer tests
2022-06-04 16:33:18 +00:00
thiggy1342
5ada3b76ed
Merge branch 'main' into experimental-decompression-api
2022-06-03 16:45:53 -04:00
thiggy1342
54fd7809fe
tweak metadata
2022-06-03 18:22:50 +00:00
thiggy1342
c5dc8779d1
Increased query robustness and test coverage
2022-06-03 18:05:56 +00:00
jorgectf
171239b78f
Format FlaskMail.qll and Sendgrid.qll
2022-06-03 18:27:45 +02:00
Paolo Tranquilli
a0acb19b68
Swift: remove redundant import
2022-06-03 15:28:48 +02:00
Paolo Tranquilli
01e1c13c29
Swift: add UnknownLocation
...
`getLocation()` will now exists for all entities. When there is no
valid location, the location will still not be emitted in the DB, but
on the QL side we will then assign a special `UnknownLocation` with
empty filename and 0 for line/column start/end.
This unknown location is currently emitted (with a unique `@` key) at
the start of every extraction, but we can move it elsewhere (and
possibly in a unique global trap file) at a later stage, possibly after
or when we rework the trap file strategy.
This should solve flakiness that was observed on the control flow tests,
which is probably caused by the `nodes` predicate in the `TestOutput`
class in `ControlFlowGraphImplShared.qll` not able to assign a proper
rank when the node does not have a location.
2022-06-03 14:59:22 +02:00
Tamás Vajk
4a025053cc
Merge pull request #9400 from tamasvajk/kotlin-fix-parcelize-symbols
...
Kotlin: Fix fake raw type symbols used by the Parcelize plugin
2022-06-03 13:34:22 +02:00
Rasmus Wriedt Larsen
50196d099b
Inline Expectation Tests: sync
2022-06-03 11:39:57 +02:00
Rasmus Wriedt Larsen
c1e6996e99
Inline Expectation Tests: Allow tag[foo bar]
...
This is partly motivated by the MaD tests which looks much better now in
my opinion.
I also wanted this for testing argument passing. In Python we're
adopting the same argument positions as Ruby has
[here](4f3751dfea/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowDispatch.qll (L508-L540) )
So it would be nice if `arg[keyword foo]=...` was allowed, without
having to transform the `toString()` result of an argument position into
something without a space.
2022-06-03 11:39:57 +02:00
Rasmus Wriedt Larsen
07c22a857f
Merge pull request #9420 from RasmusWL/sync-go-inline
...
Go: Sync InlineExpectationsTest
2022-06-03 11:37:13 +02:00
Rasmus Wriedt Larsen
aa78ce3c75
Merge pull request #9413 from github/RasmusWL/query-list-cli-tags
...
Misc: query-list should run on `codeql-cli/*` tags
2022-06-03 11:36:52 +02:00
Rasmus Wriedt Larsen
cceeaef6bf
Merge pull request #9412 from github/RasmusWL/labeler-permissions
...
Misc: Set permissions for labeler Action
2022-06-03 11:36:37 +02:00
Tamas Vajk
0a484aadf1
Improve code quality based on PR review
2022-06-03 11:17:13 +02:00
Tamas Vajk
ba5cf5b1b2
Kotlin: Fix fake raw type symbols used by the Parcelize plugin
2022-06-03 11:17:13 +02:00
AlexDenisov
0a861ff616
Merge pull request #9410 from github/alexdenisov/swift-extract-only-primary-files
...
Swift: extract only primary files
2022-06-03 10:44:18 +02:00
Alex Denisov
14384b7696
Swift: switch back to references
2022-06-03 10:22:25 +02:00
Paolo Tranquilli
87234938ef
Swift: correct typo
2022-06-03 08:45:59 +02:00
Chris Smowton
04422eeaee
Merge pull request #9378 from porcupineyhairs/goJwtSign
...
Golang : Add query to detect JWT signing vulnerabilities
2022-06-02 20:53:03 +01:00
Chris Smowton
d5ac7190cc
Remove duplicate function
2022-06-02 17:02:54 +01:00
Chris Smowton
e54b29a846
Autoformat
2022-06-02 15:58:29 +01:00
Chris Smowton
602495df4c
Replace cases accidentally handled by CompareExprSanitizer with ReturnedAlongsideErrorSanitizerGuard
2022-06-02 15:53:41 +01:00
Chris Smowton
70c74bfcc0
Merge pull request #9418 from smowton/smowton/admin/test-java-kotlin-map-entries
...
Kotlin: add test for Java and Kotlin both extending Map.Entry
2022-06-02 15:52:59 +01:00
Robert Marsh
43907b6a30
Merge pull request #9409 from github/alexdenisov/swift-fix-ctor-dtor-tostring
...
Swift: fix ctor/dtor names in toString
2022-06-02 10:34:03 -04:00
Chris Smowton
b48a07e7b8
Tighten up CompareExprSanitizer
...
- Document
- Only actually consider comparisons
- Don't sanitize literals
2022-06-02 15:18:38 +01:00
Chris Smowton
3155771abe
Rename empty-string sanitizer to reflect what it actually does.
2022-06-02 15:10:02 +01:00
Chris Smowton
bfbc1d48b7
Simplify redundant sanitizer
2022-06-02 15:02:41 +01:00
Chris Smowton
3d63cec1e8
Autoformat
2022-06-02 14:45:28 +01:00
Porcupiney Hairs
361b7037c6
Include suggested changes from review.
2022-06-02 19:11:44 +05:30
Paolo Tranquilli
ede6bd8ffe
Swift: document and partially simplify codegen
...
This adds:
* a base `README.md` file to `codegen`
* module docstrings for the modules in `generators`
* help strings on all command line flags
Moreover some unneeded command line flags (`--namespace`,
`--include-dir` and `--trap-affix`) have been dropped.
2022-06-02 15:28:57 +02:00
AlexDenisov
2187bf5dde
Merge pull request #9419 from github/revert-9373-cfg-for-key-paths
...
Revert "Swift: Control-flow for key paths"
2022-06-02 15:26:07 +02:00
Rasmus Wriedt Larsen
0b486ade9b
Go: Autoformat
2022-06-02 15:12:13 +02:00
Rasmus Wriedt Larsen
aadf7aefb0
Go: Use new location in hasLocationInfo
2022-06-02 15:05:58 +02:00
Paolo Tranquilli
c9d109ddd3
Revert "Swift: Control-flow for key paths"
2022-06-02 14:55:52 +02:00
Rasmus Wriedt Larsen
3f857e113c
Go: Adjust hasActualResult overrides
2022-06-02 14:55:27 +02:00
Rasmus Wriedt Larsen
86caf747f3
Go: Sync InlineExpectationsTest
2022-06-02 14:54:51 +02:00
Chris Smowton
ebb52adba6
Kotlin: add test for Java and Kotlin both extending Map.Entry
2022-06-02 13:30:39 +01:00
Chris Smowton
8b1605a617
Merge pull request #9405 from smowton/smowton/fix/restore-wildcard-types
...
Kotlin: Introduce / restore implied wildcard types
2022-06-02 13:26:11 +01:00
ihsinme
9d12f1be53
Update DangerousUseMbtowc.ql
2022-06-02 14:34:38 +03:00
ihsinme
77e4d05ea3
Update test.cpp
2022-06-02 14:33:59 +03:00
ihsinme
872dd0d59f
Update DangerousUseMbtowc.expected
2022-06-02 14:33:06 +03:00
Anders Schack-Mulligen
4e6e595b3a
Java: Add qldoc.
2022-06-02 13:30:27 +02:00
Chris Smowton
efc534abe7
Add implied wildcards when extracting type parameter bounds
...
kotlinc seems to always insert wildcards where type parameter variance implies them, and ignores @JvmSuppressWildcards at least in 1.6.20.
2022-06-02 11:37:15 +01:00
Porcupiney Hairs
1ef42a11ad
Include suggested changes from review.
2022-06-02 16:04:29 +05:30
Anders Schack-Mulligen
9f42ca8d14
Update java/ql/lib/semmle/code/java/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-02 12:00:37 +02:00
Anders Schack-Mulligen
002c456989
Update java/ql/lib/semmle/code/java/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-02 12:00:09 +02:00
Rasmus Wriedt Larsen
a3c4a2c3e0
Misc: query-list should run on codeql-cli/* tags
...
Since go doesn't need to be cloned with the same tag, that makes this change much easier to implement in practice 💪
2022-06-02 11:57:39 +02:00
Chris Smowton
c1592cb1dc
Accept test changes
2022-06-02 10:31:35 +01:00
Chris Smowton
910bb51094
Extract WildcardTypeAccesses
...
Their absence became more noticeable now that more implicit wildcards are being produced.
2022-06-02 10:31:08 +01:00
Rasmus Wriedt Larsen
b646195d14
Misc: Set permissions for labeler Action
...
Like in the example on
https://github.com/actions/labeler#create-workflow
2022-06-02 10:27:48 +02:00
Tamás Vajk
d7b06aa2ba
Merge pull request #9401 from tamasvajk/kotlin-cleanup
...
Kotlin: Reuse `codeQlWithHasQuestionMark`
2022-06-02 10:24:17 +02:00
Anders Schack-Mulligen
7214990762
Merge pull request #9408 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-06-02 10:01:15 +02:00
Mathias Vorreiter Pedersen
927aceb420
Merge pull request #9373 from MathiasVP/cfg-for-key-paths
2022-06-02 08:32:29 +01:00
Erik Krogh Kristensen
7c5ac63254
Merge branch 'main' into fieldUnusedInDisjunct
2022-06-02 09:06:46 +02:00
Paolo Tranquilli
3b57d4830b
Merge pull request #9402 from github/redsun82/swift-codegen-tweaks
...
Swift: merge `codegen` and `cppcodegen`
2022-06-02 09:02:47 +02:00
Paolo Tranquilli
c52d19d821
Merge pull request #9403 from redsun82/build-codeowners
...
CODEOWNERS: remove `BUILD.bazel` from codeql-ci-reviewers
2022-06-02 09:02:17 +02:00
Alex Denisov
6419af39f3
Swift: extract only primary files
...
While the (removed) comment is correct and the frontend can be called in
different modes, both `swift build` and `xcodebuild` always use
`-primary-files` when compiling Swift projects.
The other mode was present only within our test runner (`qltest.sh`), so
removing it and doing what the official build systems do simplifies our
code base.
Additionally, file archival is now a separate function/operation.
2022-06-02 08:57:03 +02:00
Alex Denisov
1dab01a31c
Swift: fix ctor/dtor names in toString
2022-06-02 08:28:46 +02:00
github-actions[bot]
ab4b7d8509
Add changed framework coverage reports
2022-06-02 00:18:51 +00:00
Erik Krogh Kristensen
536d226a6b
fix bad CP in the charPred for CipherOperation
2022-06-01 23:36:11 +02:00
Chris Smowton
dc7d07ff46
Extract correct implied wildcards for Java classes and @JvmSuppressWildcards-annotated entities
...
For Java classes this means following the structure of the underlying Java type to determine where the wildcard was really present and where the Java signature ruled it out. The annotation tracking simply means looking for @JvmSuppressWildcards on any surrounding class or function to turn off wildcard introduction by default.
2022-06-01 20:00:22 +01:00
Chris Smowton
37fce6ace9
Restore implicit wildcard types
...
The Kotlin compiler represents types like List<out CharSequence> internally as List<CharSequence> due to the fact that List's type parameter is covariant, and similarly Comparable<in CharSequence> where Comparable's type parameter is contravariant. However it restores use-site variance when emitting class files, so we must do the same thing for
compatability with Java code.
Note this is a partial solution because it will also add wildcards to Java .class files that *could* have a variance / wildcard but don't -- for example, a Java method could really take an invariant Comparable<CharSequence>, which is only achievable in Kotlin via the @JvmSuppressWildcards annotation. We also don't yet support
@JvmSuppressWildcards given on a surrounding class or function.
2022-06-01 19:58:40 +01:00
Mathias Vorreiter Pedersen
cde2880392
Swift: Add getEnclosingFunction to AstNode.
2022-06-01 16:40:08 +01:00
Paolo Tranquilli
0df8a9883a
CODEOWNERS: remove BUILD.bazel from codeql-ci-reviewers
2022-06-01 17:11:20 +02:00
Paolo Tranquilli
77f7fe8dbc
Swift: merge codegen and cppcodegen
...
Python code was simplified, and now a `--generate` option can be used
to drive what can be generated.
The extractor pack creation now will use an internally generated
dbscheme. This should be the same as the checked in one, but doing so
allows `bazel run create-extractor-pack` and `bazel run codegen` to be
run independently from one another, while previously the former had to
follow the latter in case of a schema change. This is the change that
triggered the above simplification, as in order for the two dbscheme
files to be identical, the first `// generated` line had to state the
same generator script.
2022-06-01 17:07:52 +02:00
Erik Krogh Kristensen
4b2b6fae88
Merge pull request #9395 from asgerf/js/fix-type-confusion
...
JS: Fix cartesian product in TypeConfusionThroughParameterTampering
2022-06-01 16:28:17 +02:00
Mathias Vorreiter Pedersen
7d962ac62b
Merge pull request #9397 from MathiasVP/use-autogenerated-parent-in-cfg-library
...
Swift: Use the autogenerated `getParent`
2022-06-01 14:45:43 +01:00
Mathias Vorreiter Pedersen
cb7be4f8ba
Merge pull request #9398 from github/redsun82/swift-getparent
...
Swift: simplify `GetImmediateParent.qll`
2022-06-01 14:35:20 +01:00
Mathias Vorreiter Pedersen
eabb5c7137
Swift: Respond to PR comments.
2022-06-01 14:34:22 +01:00
Paolo Tranquilli
3414028b1b
Swift: simplify GetImmediateParent.qll
2022-06-01 15:01:49 +02:00
Mathias Vorreiter Pedersen
db0498e38c
Swift: Use the autogenerated 'getParent' predicate in the CFG library.
2022-06-01 13:49:12 +01:00
Mathias Vorreiter Pedersen
ecce7f1f10
Merge pull request #9380 from github/redsun82/swift-getparent
...
Swift: generate `getParent` implementation
2022-06-01 13:48:48 +01:00
Paolo Tranquilli
6b90b2b05f
Swift: add children to IsPattern
2022-06-01 14:35:58 +02:00
Paolo Tranquilli
a4f97dd67a
Swift: add comment about unique in getImmediateParent
2022-06-01 14:32:59 +02:00
Paolo Tranquilli
bc0a32c26e
Swift: sort import list
...
Also fix parent tests with updated `statements.swift` file.
2022-06-01 14:32:59 +02:00
Paolo Tranquilli
3597efb728
Swift: rename to getImmediateParent and use hidden AST
2022-06-01 14:32:58 +02:00
Paolo Tranquilli
a894ba64c4
Swift: make test run in Python 3.8
2022-06-01 14:32:58 +02:00
Paolo Tranquilli
a86d0fc8a7
Swift: move getAChild to a separate module
2022-06-01 14:32:58 +02:00
Paolo Tranquilli
946e1f498a
Swift: generate getParent implementation
...
By explicitly marking children in the `schema.yml` file, an internal
`getAChild` predicate is implemented, that is in turn used in `AstNode`
to implement `getParent`.
This is yet to be used in the control flow library to replace the
hand-rolled implementation.
A further, more complex step is to use the same information to fully
generate the core implementation of `PrintAst` (including the
accessor string). This will be done later.
The `parent` tests use the same swift code as the extractor tests, and
this is currently enforced by `sync-files.py`. Notice that `qltest.sh`
had to be modified to deal with multiple files, which was not working
yet.
2022-06-01 14:32:58 +02:00
Ian Lynagh
6f9e9e889b
Merge pull request #9396 from igfoo/igfoo/labeler
...
CI: Add Kotlin and Go to labeler.yml
2022-06-01 13:30:22 +01:00
Ian Lynagh
ef4f09cf52
CI: Labeler: Don't label Kotlin for changenotes
...
They get labeled as Java. Given we aren't labeling shared QLL changes,
it makes sense not to label shared changenotes either.
2022-06-01 13:19:00 +01:00
Geoffrey White
cd4ff54743
C++: Improve performance of Printf::callsVariadicFormatter.
2022-06-01 13:17:10 +01:00
Ian Lynagh
67c4850c61
CI: Add Kotlin and Go to labeler.yml
2022-06-01 12:01:08 +01:00
Ian Lynagh
e0d9317889
Merge pull request #9389 from igfoo/igfoo/function_loc_override
...
Kotlin: Remove extractFunction's location override
2022-06-01 11:46:22 +01:00
Ian Lynagh
703ced3fe9
Merge pull request #9390 from igfoo/igfoo/valueparam
...
Kotlin: extractValueParameter: Simplify typeSubstitution logic
2022-06-01 11:46:05 +01:00
Jorge
897d5c9471
Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-06-01 12:44:08 +02:00
Asger F
db0ac7b3b3
JS: Fix cartesian product in TypeConfusionThroughParameterTampering
2022-06-01 11:37:23 +02:00
Paolo Tranquilli
4d6c8da74b
Swift: no perfect forwarding for label fetchers
...
While we need universal references to catch different value categories,
we don't need perfect forwarding as `fetchLabel` does not behave
differently on lvalue and rvalues.
2022-06-01 11:26:21 +02:00
Rasmus Wriedt Larsen
729cf79be7
Merge pull request #9351 from RasmusWL/django-file-read
...
Python: Support `read` on Django file
2022-06-01 10:45:26 +02:00
Anders Schack-Mulligen
9abd2259d3
Merge pull request #9381 from aschackmull/redos/perf
...
ReDoS: Improve performance in ExponentialBackTracking.qll.
2022-06-01 10:39:28 +02:00
Anders Schack-Mulligen
4f3751dfea
Merge pull request #9316 from hvitved/dataflow/edges-get-a-successor-consistency
...
Data flow: Make `PathGraph::edges/2` and `PathNode::getASuccessor/1` consistent
2022-06-01 10:38:25 +02:00
Michael Nebel
9cc10e4511
Merge pull request #9257 from michaelnebel/java/mad-commons-io-sha
...
Java: Update commons-io SHA for model regeneration and update models.
2022-06-01 09:46:30 +02:00
Paolo Tranquilli
6e44a12a67
Swift: make enable_if_t a non-type parameter
...
This disallows completely calling the disabled function (which could
be done by explicitly providing `void` otherwise).
2022-06-01 08:47:53 +02:00
Paolo Tranquilli
905cc23719
Swift: update comment
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
19f16678ac
Swift: change translation signature and detection
...
Translation now takes const references to swift entities and return
trap entries (instead of taking apointer as an out parameter).
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
c3cb0d6ad7
Swift: fix name extraction in VarDecl
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
86b4f16b3a
Swift: remove Binding<> class
...
That class was meant to allow aggregate initialization of generated
C++ entries having the label `id` as first argument.
As aggregate initialization turned out to be undesirable (names of
fields are not explicit, and `{}` must be inserted for empty
superclasses), this commit removes it and disallows aggregate
initialization altogether by defining empty constructors for generated
classes.
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
9231013401
Swift: use C++ entry style visitor in DeclVisitor
2022-06-01 08:41:43 +02:00
Robert Marsh
42ec6350eb
Merge pull request #9349 from MathiasVP/fix-inconsistent-cfg
...
Swift: Fix three CFG inconsistencies
2022-05-31 14:38:08 -04:00
Ian Lynagh
6be4afcf36
Kotlin: extractValueParameter: Simplify typeSubstitution logic
...
The type substitution is now done in the wrapper, so the worker doesn't
need to be passed typeSubstitution.
2022-05-31 19:23:54 +01:00
Porcupiney Hairs
ae2bc1b410
Include suggested changes from review.
2022-05-31 23:10:57 +05:30
Ian Lynagh
21d69ae819
Kotlin: Remove extractFunction's location override
...
It wasn't being used.
2022-05-31 17:43:25 +01:00
Mathias Vorreiter Pedersen
e2ddfcd437
Merge pull request #9387 from github/geoffw0-patch-2
...
Swift: Update readme
2022-05-31 16:34:17 +01:00
Robert Marsh
bd095abea4
Merge pull request #9388 from MathiasVP/cfg-for-yield
...
Swift: CFG for `yield`
2022-05-31 11:22:21 -04:00
Nick Rolfe
f417c12c5e
Merge pull request #9332 from github/post-release-prep/codeql-cli-2.9.3
...
Post-release preparation for codeql-cli-2.9.3
2022-05-31 16:17:50 +01:00
Mathias Vorreiter Pedersen
6386daf44c
Merge branch 'main' into fix-inconsistent-cfg
2022-05-31 15:59:53 +01:00
Robert Marsh
78fd0385fc
Merge pull request #9355 from MathiasVP/not-all-functions-throw
...
Swift: Only construct exceptional edges for calls that may throw
2022-05-31 10:56:31 -04:00
Mathias Vorreiter Pedersen
5f9d03f7c6
Swift: CFG for 'yield'.
2022-05-31 15:45:43 +01:00
Chris Smowton
9b7597bcdb
Merge pull request #9377 from porcupineyhairs/goPam
...
Golang : Add Query To Detect PAM Authorization Bugs
2022-05-31 15:42:45 +01:00
Geoffrey White
f598b26b03
Merge pull request #9384 from MathiasVP/qlpacks-for-swift
...
Swift: Add qlpacks
2022-05-31 15:39:20 +01:00
Mathias Vorreiter Pedersen
547cecf143
Merge pull request #9385 from MathiasVP/swift-extract-yield-stmt
...
Swift: Extract `yield` statements
2022-05-31 15:33:35 +01:00
Mathias Vorreiter Pedersen
a175f49759
Merge pull request #3 from geoffw0/swiftsrc
...
Swift: Add swift-security-and-quality, swift-security-extended packs.
2022-05-31 15:02:33 +01:00
Mathias Vorreiter Pedersen
b5d229d4d8
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-05-31 15:01:36 +01:00
Geoffrey White
01091ae1b9
Swift: Add codeql-suites.
2022-05-31 14:52:53 +01:00
Asger F
f70f769bb6
Merge pull request #9266 from asgerf/js/madman-prep
...
JS: Some fixes to support proper analysis of d.ts files
2022-05-31 15:43:40 +02:00
Mathias Vorreiter Pedersen
1d120486b4
Swift: Extract 'yield' statements.
2022-05-31 14:43:09 +01:00
Mathias Vorreiter Pedersen
9af31bab2a
Swift: Add qlpacks.
2022-05-31 13:59:44 +01:00
Tamás Vajk
7f5dcfaf0f
Merge pull request #9379 from tamasvajk/kotlin-android-specific-return-types
...
Kotlin: Change return type of Android specific `ConcurrentHashMap.keySet`
2022-05-31 14:00:36 +02:00
Porcupiney Hairs
e0f74a51ac
Include suggested changes from review.
2022-05-31 17:17:54 +05:30
Chris Smowton
d4f9c75315
Remove dead code
2022-05-31 11:14:36 +01:00
Chris Smowton
cea909f03e
Autoformat
2022-05-31 11:14:00 +01:00
CodeQL CI
9dd20f113d
Merge pull request #8603 from github/max-schaefer/better-amd-modelling
...
Approved by asgerf, erik-krogh
2022-05-31 03:10:32 -07:00
Chris Smowton
8b32eaf05c
Copyedits
2022-05-31 11:05:40 +01:00
Geoffrey White
ce3488b1b5
Update Swift readme
2022-05-31 10:56:28 +01:00
github-actions[bot]
ed2f3409bc
Post-release preparation for codeql-cli-2.9.3
2022-05-31 09:54:55 +00:00
Geoffrey White
de1fdd3bc9
Merge pull request #9382 from github/geoffw0-patch-2
...
Swift: Added Bazel install step.
2022-05-31 10:44:52 +01:00
Anders Schack-Mulligen
9212886767
Merge pull request #9286 from aschackmull/java/perf-customnullguard
...
Java: Improve customNullGuard performance.
2022-05-31 11:36:01 +02:00
Jeroen Ketema
ed9e798a81
Merge pull request #9362 from jketema/braced
...
C++: Introduce relation for tracking braced initializers
2022-05-31 11:29:10 +02:00
Geoffrey White
27968b60a5
Added Bazel install step.
2022-05-31 10:25:42 +01:00
Erik Krogh Kristensen
6cfd790cda
Merge pull request #9356 from erik-krogh/getRouting
...
JS: rewrite js/sensitive-get-query to use routing trees
2022-05-31 11:08:54 +02:00
Anders Schack-Mulligen
e36c59b285
ReDoS: Sync.
2022-05-31 11:04:42 +02:00
Anders Schack-Mulligen
e016feeb5c
ReDoS: Improve performance in ExponentialBackTracking.qll.
2022-05-31 11:04:03 +02:00
Jeroen Ketema
ce26124c01
Update cpp/ql/lib/change-notes/2022-05-30-braced-initializers.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-05-31 10:42:31 +02:00
Jeroen Ketema
e3046fb05b
C++: Fix typo in upgrade script
2022-05-31 10:37:46 +02:00
Tamas Vajk
90fdd7eaf9
Kotlin: Reuse codeQlWithHasQuestionMark
2022-05-31 08:47:25 +02:00
Erik Krogh Kristensen
95fae8155e
fix wrong comment
...
Co-authored-by: Asger F <asgerf@github.com >
2022-05-31 08:38:03 +02:00
Porcupiney Hairs
5c5e978d30
Remove local data flow query
2022-05-31 03:53:02 +05:30
Tamas Vajk
89ffefd45e
Kotlin: Change return type of Android specific ConcurrentHashMap.keySet
2022-05-30 23:45:38 +02:00
Jeroen Ketema
bb93179c45
Merge pull request #9279 from github/felicitymay-patch-1
...
Fix typo in recent docs update
2022-05-30 23:31:37 +02:00
Porcupiney Hairs
bd1ddc177e
Golang : Add query to detect JWT signing vulnerabilities
...
Supersedes github/codeql-go#705
2022-05-31 01:56:59 +05:30
Porcupiney Hairs
ae2cc378e5
Golang : Add Query To Detect PAM Authorization Bugs
2022-05-31 01:28:55 +05:30
Henry Mercer
a661a0cc7e
Merge pull request #9376 from github/henrymercer/internal-repo-preserve-invariant
...
Clean merge to preserve submodule invariant of internal repo
2022-05-30 20:28:43 +01:00
Henry Mercer
76375f8d73
Merge remote-tracking branch 'origin/main' into henrymercer/semmle-code-noop-merge
2022-05-30 20:14:22 +01:00
Erik Krogh Kristensen
6a6a63e1aa
Merge pull request #9354 from erik-krogh/jsStages
...
JS: collapse a few small stages
2022-05-30 20:31:54 +02:00
Henry Mercer
b1faba9880
Merge pull request #9359 from github/henrymercer/migrate-to-codeql-workspace
...
Migrate `.codeqlmanifest.json` to `codeql-workspace.yml`
2022-05-30 18:20:11 +01:00
Chris Smowton
1708719fdf
Merge pull request #9343 from smowton/smowton/fix/align-kotlin-java-generic-types
...
Kotlin: extract methods defined on collections types with their Java signatures
2022-05-30 17:52:58 +01:00
Mathias Vorreiter Pedersen
b88fe1b2b4
Swift: Add test case and accept changes.
2022-05-30 17:05:06 +01:00
Mathias Vorreiter Pedersen
eed42a4e14
Swift: Make a new scope for each KeyPath expression.
2022-05-30 17:05:06 +01:00
Mathias Vorreiter Pedersen
cd1800ec7e
Merge pull request #9371 from MathiasVP/extract-key-path-application
...
Swift: Extract KeyPath applications
2022-05-30 17:02:42 +01:00
Henry Mercer
99e6d2a925
Run relevant tests when codeql-workspace.yml is updated
2022-05-30 15:54:52 +01:00
Henry Mercer
ca764576be
Swift: Update mention of manifest file in docs
2022-05-30 15:54:52 +01:00
Andrew Eisenberg
e544a9b94b
Update codeql-workspace.yml
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-05-30 15:53:48 +01:00
Andrew Eisenberg
18c5474431
Add comment to codeql-workspace.yml
2022-05-30 15:53:48 +01:00
Andrew Eisenberg
c5dd8aa703
Convert .codeqlmanifest.json to codeql-workspace.yml
...
The semantics are the same, except one is json, the other is
yaml.
2022-05-30 15:53:48 +01:00
Mathias Vorreiter Pedersen
9175354bbd
Swift: Add test and accept changes.
2022-05-30 15:51:49 +01:00
Mathias Vorreiter Pedersen
52f0b0d8d8
Swift: Fix extraction of roots in 'KeyPathExpr'.
2022-05-30 15:46:54 +01:00
Mathias Vorreiter Pedersen
21527f66e1
Swift: Extract KeyPath applications and KeyPathDot expressions.
2022-05-30 15:46:18 +01:00
Jeroen Ketema
a833e77c30
C++: Update DB scheme stats
2022-05-30 16:26:26 +02:00
Jeroen Ketema
38be04461e
C++: Introduce relation for tracking braced initializers
2022-05-30 16:26:19 +02:00
Rasmus Wriedt Larsen
b6cc438390
Merge pull request #9368 from RasmusWL/test-model-api-graphs
...
Python: Port test model to API graphs
2022-05-30 15:45:13 +02:00
Mathias Vorreiter Pedersen
d8916568b6
Merge branch 'main' into fix-inconsistent-cfg
2022-05-30 14:07:10 +01:00
Mathias Vorreiter Pedersen
9b17493b3b
Merge branch 'main' into not-all-functions-throw
2022-05-30 14:03:29 +01:00
Asger F
c188aa87c7
Merge branch 'main' into js/madman-prep
2022-05-30 15:03:14 +02:00
Mathias Vorreiter Pedersen
7ca01443e8
Merge pull request #9342 from rdmarsh2/rdmarsh2/swift/dataflow-global-flow
...
Swift: initial interprocedural data flow implementation
2022-05-30 13:54:56 +01:00
Rasmus Wriedt Larsen
420dea0792
Python: Fix example TestCase
2022-05-30 14:48:06 +02:00
Rasmus Wriedt Larsen
08e64ea1b4
Python: Remove contrived test-case example
2022-05-30 14:45:34 +02:00
Rasmus Wriedt Larsen
4861a980be
Python: Fix cryptography modeling
...
The old code was my own suggestion, that I thought would just work, but
was also slightly skeptical about.
I tested out whether it works with the code below
```codeql
predicate foo(int input, string res) {
input = 1 and res = "that was one"
}
from int input, string res
where
input in [1, 2] and
if foo(input, res)
then any()
else res = "not one"
select input, res
```
which gave the 3 results
```
1 | that was one
1 | not one
2 | not one
```
only by rewriting the code to be the one below, did I get down to the 2
results I actually wanted. So I've done the same kind of rewrite in the
commit.
```codeql
predicate foo(int input, string res) {
input = 1 and res = "that was one"
}
from int input, string res
where
input in [1, 2] and
if foo(input, _)
then foo(input, res)
else res = "not one"
select input, res
```
2022-05-30 14:37:27 +02:00
yoff
2492744a9b
Merge pull request #8443 from haby0/py/CsvInjection
...
Python: Add CSV injection model
2022-05-30 14:31:28 +02:00
Rasmus Wriedt Larsen
a8b4b6a374
Python: Move test-modeling to API-graphs
...
Notice that although we loose the contrived examples in `test.py`, we do
gain support for real-world test-case construction, which seems worth
the tradeoff.
2022-05-30 14:13:06 +02:00
Rasmus Wriedt Larsen
a5dc4f430c
Python: Expand test-filter tests
...
With no virtual environment enabled, none of the third-party library
test case are found.
2022-05-30 14:11:50 +02:00
Mathias Vorreiter Pedersen
ef31aec29e
Swift: Autoformat.
2022-05-30 12:58:12 +01:00
Michael Nebel
61151d8980
Java: Update workflows and scripts usages to only generate summaries and sinks.
2022-05-30 13:53:44 +02:00
Mathias Vorreiter Pedersen
425d66e454
Update swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll
2022-05-30 12:52:48 +01:00
Mathias Vorreiter Pedersen
2106d48785
Swift: Add 'Argument.getIndex()' and use it in 'DataFlowDispatch'.
2022-05-30 12:51:29 +01:00
Mathias Vorreiter Pedersen
0d8a9458c6
Merge branch 'main' into rdmarsh2/swift/dataflow-global-flow
2022-05-30 12:46:06 +01:00
yoff
cd46f31cba
Merge branch 'main' into py/CsvInjection
2022-05-30 13:41:31 +02:00
Michael Nebel
72dd1a6ec9
Java: Generate models without sources.
2022-05-30 13:40:14 +02:00
Rasmus Wriedt Larsen
7a6646dcaf
Merge pull request #8883 from erik-krogh/pyMaD
...
Python: add MaD implementation
2022-05-30 13:31:07 +02:00
Michael Nebel
a0ae8b3a97
Merge pull request #9361 from michaelnebel/java/capturemodels-metadata
...
Java: Update capture models meta data.
2022-05-30 13:22:09 +02:00
Asger F
5f42866de3
Merge pull request #9318 from asgerf/js/type-confusion-parmaeter-tampering-barrier
...
JS: Fix FP in js/type-confusion-through-parameter-tampering
2022-05-30 12:52:37 +02:00
Erik Krogh Kristensen
b700972e6f
fix bad join in XmlParers::getAResult
2022-05-30 12:37:51 +02:00
Max Schaefer
820dfac48c
Manually write out a transitive closure.
2022-05-30 12:37:50 +02:00
Max Schaefer
ea70aaff57
Improve detection of UMD modules.
...
We previously required the `define` to appear directly as an expression statement, but there are common patterns where this is not the case.
2022-05-30 12:37:50 +02:00
Max Schaefer
47e425a184
Improve inVoidContext to take conditional expressions into account.
2022-05-30 12:37:50 +02:00
Erik Krogh Kristensen
adb40f9360
Merge pull request #9289 from erik-krogh/es2022
...
JS: Support the remaining of the finished ES2022 proposals
2022-05-30 12:27:19 +02:00
Erik Krogh Kristensen
ab28b0a690
Merge pull request #9348 from erik-krogh/polyRegSyntax
...
JS: use syntactically correct JS in poly-redos example
2022-05-30 12:26:04 +02:00
Erik Krogh Kristensen
e557d8839b
have the Instance token just be an alias for ReturnValue
2022-05-30 12:21:42 +02:00
Erik Krogh Kristensen
c7a8008897
Merge pull request #9235 from kaeluka/extractor-update-typescript-4_7
...
JS: Update the extractor to use TypeScript 4.7
2022-05-30 12:02:06 +02:00
Erik Krogh Kristensen
63e637503d
rewrite js/sensitive-get-query to use routing trees
2022-05-30 11:55:09 +02:00
Chris Smowton
49d9d8e7d6
Remove unused imports
2022-05-30 09:59:11 +01:00
Chris Smowton
2f436c800b
Merge pull request #9357 from smowton/smowton/fix/extension-properties-backing-fields
...
Kotlin: Disambiguate the names and trap labels of backing fields of extension properties
2022-05-30 09:55:02 +01:00
Asger F
cc42f2f824
Merge pull request #8606 from asgerf/js/api-graph-api
...
JS/Python/Ruby: Document how API graphs should be interpreted
2022-05-30 10:49:14 +02:00
Michael Nebel
815dff338d
Java: Update capture models meta data.
2022-05-30 09:44:39 +02:00
Michael Nebel
6a4a4cbbe4
Java: Re-generate commons-io models.
2022-05-30 08:16:58 +02:00
Michael Nebel
48da8dde6f
Java: Do not derive new write-file sinks.
2022-05-30 08:16:58 +02:00
Michael Nebel
ad4d8304ed
Java: Update hand written summary for writeLines as the generated one will be ignored.
2022-05-30 08:16:58 +02:00
Michael Nebel
7e5dd7a065
Java: Manually prefix kind column with generated.
2022-05-30 08:16:58 +02:00
Michael Nebel
0f33c3188c
Java: Re-arrange import pattern for generated models.
2022-05-30 08:16:58 +02:00
Michael Nebel
71bcae068e
Java: Avoid generating new regex-use sinks.
2022-05-30 08:16:58 +02:00
Michael Nebel
ff928bbb45
Java: Update commons-io SHA for model regeneration.
2022-05-30 08:16:58 +02:00
Michael Nebel
7d171f86ea
Merge pull request #9335 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-05-29 13:33:10 +02:00
github-actions[bot]
31c91a6faa
Add changed framework coverage reports
2022-05-29 00:16:56 +00:00
thiggy1342
09f082081f
Simple tests passing
2022-05-28 23:29:58 +00:00
thiggy1342
39baadbdd2
test ql packs must be in the security directory
2022-05-28 23:19:32 +00:00
Adam Thigpen
52ac93b82e
adding skeleton for experimental unit tests
2022-05-28 15:14:42 -04:00
Adam Thigpen
a37443106b
reduce false positives with some sanitizers
2022-05-28 15:14:42 -04:00
Adam Thigpen
2bf160c008
initial draft of decompression-api query
2022-05-28 15:14:32 -04:00
Chris Smowton
6ea87cd718
Accept test changes
2022-05-27 22:05:57 +01:00
Mathias Vorreiter Pedersen
7c25063f7f
Merge branch 'main' into swift-decls-in-cfg
2022-05-27 17:56:58 +01:00
Mathias Vorreiter Pedersen
c734646099
Swift: Accept test changes.
2022-05-27 17:42:51 +01:00
Mathias Vorreiter Pedersen
6d5504412a
Swift: Only create a 'ThrowCompletion' for functions that actually can throw.
2022-05-27 17:42:51 +01:00
Henry Mercer
013b4c8768
Swift: Update mention of manifest file in docs
2022-05-27 17:31:47 +01:00
Andrew Eisenberg
ce2bf8477c
Update codeql-workspace.yml
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-05-27 17:31:47 +01:00
Andrew Eisenberg
a82fea59e9
Add comment to codeql-workspace.yml
2022-05-27 17:31:47 +01:00
Andrew Eisenberg
7ab3a418be
Convert .codeqlmanifest.json to codeql-workspace.yml
...
The semantics are the same, except one is json, the other is
yaml.
2022-05-27 17:31:47 +01:00
Mathias Vorreiter Pedersen
b9809b4219
Swift: CFG for opening existentials.
2022-05-27 17:29:22 +01:00
Mathias Vorreiter Pedersen
02c73d3c1c
Swift: Fix implicit-this alert.
2022-05-27 17:25:56 +01:00
Chris Smowton
9ea139566d
Disambiguate the names and trap labels of backing fields of extension properties
2022-05-27 16:27:48 +01:00
Chris Smowton
6eb2935469
Merge pull request #9220 from smowton/smowton/fix/promoted-companion-object-fields
...
Associate certain companion object fields with the parent class
2022-05-27 16:19:10 +01:00
Erik Krogh Kristensen
62fd3fd90f
add test that we detect the used type variable in an infer type
2022-05-27 14:15:27 +00:00
Asger F
7e76e9a23b
Merge branch 'main' into js/type-confusion-parmaeter-tampering-barrier
2022-05-27 15:55:42 +02:00
Asger F
468a4df215
Update javascript/ql/lib/semmle/javascript/security/dataflow/TypeConfusionThroughParameterTamperingQuery.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-05-27 15:55:25 +02:00
Chris Smowton
9c62b349ec
Autoformat
2022-05-27 13:36:55 +01:00
Erik Krogh Kristensen
8c12a7289f
collapse a few small stages
2022-05-27 13:19:06 +02:00
Mathias Vorreiter Pedersen
2dcd7e16b1
Merge pull request #9353 from MathiasVP/swift-extract-throwing-and-async
...
Swift: Extract `isThrowing` and `isAsync`
2022-05-27 12:14:02 +01:00
Chris Smowton
a204c742d8
Associate certain companion object fields with the parent class
...
Specifically `const`, `lateinit` and `@JvmField` properties get a static field which belongs to the containing class not the companion object, such that Java can address them via the containing class name rather than have to navigate a companion object pointer.
2022-05-27 11:52:39 +01:00
Chris Smowton
a0d5d414b4
Kotlin: extract methods defined on collections types with their Java signatures
...
Collection, List and Map all define various methods which are either made more generic in Kotlin (e.g. `remove(Object) -> remove(E)`, `containsAll(Collection<?>) -> containsAll(Collection<E>)`), or are made invariant (e.g. `addAll(Collection<? extends E>) -> addAll(Collection<E>)`). This substitutes the types back to their Java signatures,
thereby avoiding differing trap labels and duplicated methods for these types and their descendents.
2022-05-27 11:51:46 +01:00
Mathias Vorreiter Pedersen
6815e731d2
Swift: Add test and accept output
2022-05-27 11:48:20 +01:00
Mathias Vorreiter Pedersen
45bbd24355
Swift: Extract whether a function type is throwing or async.
2022-05-27 11:48:01 +01:00
Alex Ford
5d4473bb2a
Merge pull request #8845 from alexrford/ruby/rbi-lib
...
Ruby: Add partial support for working with RBI (Ruby Interface) files
2022-05-27 11:43:44 +01:00
Henry Mercer
da02bcc4c6
Merge pull request #9352 from github/revert-9314-aeisenberg/manifest
...
Revert "Convert `.codeqlmanifest.json` file to `codeql-workspace.yml`"
2022-05-27 11:40:25 +01:00
Tom Bolton
5830db786e
Merge pull request #9285 from github/codeql-ci/js-atm-new-release
...
JS: Bump version numbers of ML-powered packs after 0.3.0 release
2022-05-27 11:39:45 +01:00
Henry Mercer
4091ba758d
Revert "Convert .codeqlmanifest.json file to codeql-workspace.yml"
2022-05-27 11:29:48 +01:00
Alex Ford
919555d168
Merge pull request #9341 from alexrford/ruby/activerecordinstance-public
...
Ruby: Make `ActiveRecordInstance` public and fix some misidentifications
2022-05-27 11:21:58 +01:00
Chris Smowton
55513e0dbb
Merge pull request #9350 from smowton/smowton/admin/mention-gradle-daemon
...
Docs: Note that Gradle builds should use `--no-daemon`
2022-05-27 10:37:33 +01:00
Rasmus Wriedt Larsen
5924e88a86
Python: Support read on Django file
2022-05-27 11:18:26 +02:00
Mathias Vorreiter Pedersen
a63378308d
Merge pull request #9340 from geoffw0/nocheckbeforeunsafeputuser
...
C++: Improve cpp/linux-kernel-no-check-before-unsafe-put-user
2022-05-27 10:17:46 +01:00
Chris Smowton
0925cf5c22
Docs: Note that Gradle builds should use --no-daemon
2022-05-27 10:06:35 +01:00
Mathias Vorreiter Pedersen
7d36bc1c73
Swift: Fix CFG for 'foreach' statements.
2022-05-27 10:01:12 +01:00
Mathias Vorreiter Pedersen
73c189957d
Swift: Fix CFG inconsistencies with StmtConditions.
2022-05-27 09:58:36 +01:00
Arthur Baars
e3ef258b0e
Merge pull request #9287 from aibaars/instance-variable-flow-2
...
Ruby: flow through getters/setters
2022-05-27 10:49:20 +02:00
Mathias Vorreiter Pedersen
4383aef1d2
Merge pull request #9328 from MathiasVP/swift-to-string
...
Swift: Improve `toString` implementations for Ast classes
2022-05-27 09:34:34 +01:00
Mathias Vorreiter Pedersen
795c0110e5
Swift: Accept more test changes.
2022-05-27 09:17:52 +01:00
Erik Krogh Kristensen
fef87db739
use syntactically correct JS in poly-redos example
2022-05-27 10:08:30 +02:00
Mathias Vorreiter Pedersen
52a10c826a
Merge branch 'main' into swift-to-string
2022-05-27 09:06:36 +01:00
jorgectf
e577a0e836
Update .expected tests
2022-05-27 00:13:40 +02:00
${sleep,7}
76c27c685f
Merge branch 'main' into jty/python/emailInjection
2022-05-26 16:27:57 -04:00
Andrew Eisenberg
57b9e6ee40
Merge pull request #9314 from github/aeisenberg/manifest
...
Convert `.codeqlmanifest.json` file to `codeql-workspace.yml`
2022-05-26 11:39:45 -07:00
Chris Smowton
f7d9238cda
Merge pull request #9331 from smowton/smowton/fix/kotlin-jar-file-entry-mtimes
...
Kotlin: use the same mtimes as Java
2022-05-26 19:37:16 +01:00
Robert Marsh
32e4c496f6
Swift: Dataflow through Phi nodes
2022-05-26 17:55:25 +00:00
Alex Ford
30f24697b4
Ruby: add missing qldoc
2022-05-26 18:50:57 +01:00
Robert Marsh
507fdef028
Swift: add more data flow tests
2022-05-26 17:33:12 +00:00
Andrew Eisenberg
b456334472
Update codeql-workspace.yml
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-05-26 10:21:55 -07:00
Andrew Eisenberg
5a1663efd3
Add comment to codeql-workspace.yml
2022-05-26 10:06:24 -07:00
Andrew Eisenberg
434259b296
Convert .codeqlmanifest.json to codeql-workspace.yml
...
The semantics are the same, except one is json, the other is
yaml.
2022-05-26 10:03:55 -07:00
Robert Marsh
81ac648065
Swift: flow out of calls via return statements
2022-05-26 16:58:53 +00:00
Alex Ford
4e0e4f9b5b
Ruby: make ActiveRecordInstance public
2022-05-26 17:54:02 +01:00
Alex Ford
fd8f1dc88f
Ruby: fix some misidentification of ActiveRecordModelInstantiations
2022-05-26 17:54:01 +01:00
Robert Marsh
ae6d16a40f
Swift: flow into callees via params
2022-05-26 16:53:42 +00:00
Robert Marsh
25c8b8141c
Swift: add params to CFG
2022-05-26 16:48:24 +00:00
Harry Maclean
c80a06a6d8
Ruby: Simplify posix-spawn modeling
2022-05-26 14:29:04 +01:00
Anna Railton
4cf3467ad7
Merge pull request #9338 from github/annarailton-patch-1
...
ATM: add `workflow_dispatch` to ATM JS tests
2022-05-26 14:25:48 +01:00
Harry Maclean
ee827604f7
Ruby: Model the posix-spawn gem
...
This gem exists primarily to provide methods that spawn subprocesses. We
model these as SystemCommandExecutions.
2022-05-26 14:16:08 +01:00
Geoffrey White
2bcf7e17c8
Understand syscalls better.
2022-05-26 14:01:09 +01:00
Anna Railton
202d2e037d
Add workflow_dispatch to Action
...
This is so we can trigger scheduled runs of these tests
2022-05-26 13:07:57 +01:00
Geoffrey White
e3ea7751d1
C++: Define sources better so that we catch all the test cases.
2022-05-26 12:44:17 +01:00
Robert Marsh
3213549a73
Merge pull request #9329 from MathiasVP/fixes-for-9291
...
Swift: Fixups for #9291
2022-05-26 07:25:24 -04:00
Chris Smowton
1f2248c1c8
Warn if jar file path not in expected form
2022-05-26 11:59:23 +01:00
Chris Smowton
3bd581a052
Kotlin: use the same mtimes as Java
...
Previously Kotlin's use of IntelliJ's VirtualFile interface meant we got the containing JAR file's mtime, not that of the individual file entry.
2022-05-26 11:59:23 +01:00
Tom Hvitved
ae1f5bbe25
Merge pull request #9334 from hvitved/ruby/dataflow/hash-splat-literal
2022-05-26 10:36:04 +02:00
Mathias Vorreiter Pedersen
df2c1972e9
Swift: Add CFG trees for local declarations and accept test changes.
2022-05-26 09:09:17 +01:00
Mathias Vorreiter Pedersen
b715a6b63b
Swift: Add test containing local declarations.
2022-05-26 09:06:13 +01:00
Mathias Vorreiter Pedersen
c7cc8d2592
Swift: Fix copy-paste error.
2022-05-25 21:36:24 +01:00
Robert Marsh
da90440ea3
Merge pull request #9333 from rdmarsh2/rdmarsh2/swift/dataflow-local-flow
...
Swift: local dataflow
2022-05-25 15:59:50 -04:00
Robert Marsh
aa77ea6bef
Swift: minimal tests for interprocedural flow
2022-05-25 19:24:34 +00:00
Robert Marsh
9f64622f31
Swift: data flow configurations working
2022-05-25 19:23:43 +00:00
Robert Marsh
d326b3a91c
Swift: global dataflow WIP
2022-05-25 18:54:47 +00:00
Robert Marsh
bba3564187
Swift: adjust for changes in main
2022-05-25 18:52:47 +00:00
Robert Marsh
91b34d5e8f
Swift: make LambdaCallKind a TODO
2022-05-25 18:26:38 +00:00
Robert Marsh
765e1e1115
Swift: autoformat
2022-05-25 18:26:38 +00:00
Robert Marsh
cf22ade9f3
Swift: initial local data flow implementation
2022-05-25 18:26:37 +00:00
Robert Marsh
117a1ad2f4
Swift: DataFlow expr and parameter nodes
2022-05-25 18:26:37 +00:00
Tom Hvitved
b3ce2d4a2b
Ruby: Data flow for hash-splat expressions in hash literals
2022-05-25 19:55:28 +02:00
Tom Hvitved
47051ec8c9
Merge pull request #9320 from hvitved/ruby/hash-splat-flow
...
Ruby: Flow through hash-splat parameters
2022-05-25 19:31:09 +02:00
Nick Rolfe
d5c8188625
Merge pull request #9330 from github/nickrolfe/ruby-typos
...
Ruby: fix spelling errors
2022-05-25 17:56:50 +01:00
Erik Krogh Kristensen
d199173923
add a getAPrimaryQlClass predicate to ExpressionWithTypeArguments
2022-05-25 16:10:13 +00:00
Nick Rolfe
385e442f7f
Ruby: fix spelling errors
2022-05-25 16:38:48 +01:00
Mathias Vorreiter Pedersen
fafdb016fa
Swift: Fixup based on review comments in #9291 .
2022-05-25 16:10:44 +01:00
Mathias Vorreiter Pedersen
f17afa8a11
Swift: Accept test changes.
2022-05-25 16:01:42 +01:00
Mathias Vorreiter Pedersen
dc2ba5b410
Swift: Implement better 'toString' overrides for all AST nodes.
2022-05-25 15:59:45 +01:00
Mathias Vorreiter Pedersen
0b6e35a2a9
Merge pull request #9291 from MathiasVP/swift-ipa-the-cfg
...
Swift: CFG for property reads and writes
2022-05-25 15:57:32 +01:00
Erik Krogh Kristensen
361b2aa6bb
Merge pull request #9325 from erik-krogh/CWE-940
...
JS: add CWE-940 to js/missing-origin-check
2022-05-25 16:41:40 +02:00
Arthur Baars
033df767ef
Ruby: allow fields in flow summaries
2022-05-25 16:01:04 +02:00
Arthur Baars
af428a1ac2
Address comments
2022-05-25 16:01:04 +02:00
Arthur Baars
b0a97f9b01
Ruby: flow through getters/setters
2022-05-25 16:01:04 +02:00
Asger F
a60caced98
JS: Update TRAP output
2022-05-25 15:59:58 +02:00
Nick Rolfe
79fb9e8fd2
Merge pull request #9159 from github/nickrolfe/join_order_tweak
...
Ruby: tweak join order in `API::Impl::edge`
2022-05-25 14:57:24 +01:00
Asger F
5964be4463
Merge branch 'main' into js/type-confusion-parmaeter-tampering-barrier
2022-05-25 15:53:24 +02:00
Asger F
893f4ab8fb
Merge pull request #9288 from asgerf/js/resource-exhaustion-no-buffer.from
...
JS: Remove Buffer.from sink from js/resource-exhaustion
2022-05-25 15:51:54 +02:00
Tom Hvitved
ce4959287a
Ruby: Flow through hash-splat expressions
2022-05-25 15:40:08 +02:00
Nick Rolfe
8cd261af0e
Merge pull request #9324 from hvitved/dataflow/prohibits-use-use-fix-join
...
Data flow: Fix bad join in `prohibitsUseUseFlow`
2022-05-25 14:39:06 +01:00
Mathias Vorreiter Pedersen
80fad348bb
Swift: Implement CFG for property reads, writes, and observers.
2022-05-25 13:46:14 +01:00
Mathias Vorreiter Pedersen
67cc1b503b
Swift: Implement step 3 from the previous commit message.
2022-05-25 13:44:59 +01:00
Mathias Vorreiter Pedersen
1f4924f978
Swift: Create a custom "AST" version of the public CFG classes. This is
...
necessary because the CFG library doesn't support the following
two requirements simultaneously:
1. Traverse AST classes by virtual dispatch
2. Construct ControlFlowElements from non-AST classes
Because the CFG trees derive from the a base type that must be a
subtype of `ControlFlowElement`. So if we make `ControlFlowElement`
an IPA type, we cannot write:
```
class AssignTree extends PostOrderTree instanceof AssignExpr { ... }
```
because `AssignExpr` is not a subtype of PostOrderTree (since
PostOrderTree is now a subtype of the new IPA type).
To fix this, Tom suggested the following (which is implemented in
this PR):
1. Create a copy of the CFG tree classes (i.e., Pre/PostOrderTree,
LeafTree, etc.) and call them AstPreOrderTree/AstPostOrderTree,
AstLeafTree, etc.
2. For each tree AstTree from step 1, create a instance of the
internal CFG library's appropriate class.
3. In `ControlFlowGraphImpl`, proceed as normal with virtual
dispatch using `instanceof`, but extend the AstTree classes
from step 1 instead of the CFG's own tree classes.
This works because each AstTree implements one of the CFG
library's tree classes (as per step 2).
This commit performs step 1 and 2. Step 3 will be the next commit.
2022-05-25 13:39:48 +01:00
Mathias Vorreiter Pedersen
ab268514a1
Swift: Create a custom IPA type for 'ControlFlowElement's and fixup various type annotations.
2022-05-25 13:39:48 +01:00
Tom Hvitved
4f95abc4f6
Python: Update expected test output
2022-05-25 14:39:37 +02:00
Tom Hvitved
bcdef98392
Data flow: Sync files
2022-05-25 14:39:37 +02:00
Tom Hvitved
a4023b8a1d
Data flow: Make PathGraph::edges/2 and PathNode::getASuccessor/1 consistent
2022-05-25 14:39:37 +02:00
Tom Hvitved
42f05dadc4
Data flow: Sync files
2022-05-25 14:21:22 +02:00
Tom Hvitved
3d072abcff
Data flow: Fix bad join in prohibitsUseUseFlow
...
Before
```
Tuple counts for FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow#1de78b88#ff@fdf8bdrq:
6099 ~0% {2} r1 = SCAN FlowSummaryImpl::Private::isParameterPostUpdate#1de78b88#fff OUTPUT In.2, In.0
787252695 ~2% {3} r2 = JOIN r1 WITH project#DataFlowImplCommon::ParamNode::isParameterOf#dispred#f0820431#fff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, true, Lhs.1
5360462712 ~0% {4} r3 = JOIN r2 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_021#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2, true, Lhs.0
7132 ~2% {2} r4 = JOIN r3 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb ON FIRST 3 OUTPUT Lhs.0, Lhs.3
5869 ~25% {1} r5 = JOIN r4 WITH DataFlowImplCommon::Cached::clearsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.1
1263 ~9% {1} r6 = JOIN r4 WITH DataFlowImplCommon::Cached::expectsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.1
7132 ~52% {1} r7 = r5 UNION r6
29593 ~26% {2} r8 = JOIN r7 WITH project#FlowSummaryImpl::Private::Steps::summaryArgParam0#1de78b88#ffff#2_201#join_rhs ON FIRST 1 OUTPUT Rhs.1, Rhs.2
return r8
```
After
```
Tuple counts for FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow#1de78b88#ff@aa7a37lj:
6099 ~4% {3} r1 = SCAN FlowSummaryImpl::Private::isParameterPostUpdate#1de78b88#fff OUTPUT In.0, true, In.2
8434 ~5% {2} r2 = JOIN r1 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
5869 ~5% {3} r3 = JOIN r2 WITH DataFlowImplCommon::Cached::clearsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.0, true, Lhs.1
1278 ~6% {3} r4 = JOIN r2 WITH DataFlowImplCommon::Cached::expectsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.0, true, Lhs.1
7147 ~6% {3} r5 = r3 UNION r4
7147 ~57% {2} r6 = JOIN r5 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
5892 ~26% {1} r7 = JOIN r6 WITH project#DataFlowImplCommon::ParamNode::isParameterOf#dispred#f0820431#fff ON FIRST 2 OUTPUT Lhs.0
29589 ~26% {2} r8 = JOIN r7 WITH project#FlowSummaryImpl::Private::Steps::summaryArgParam0#1de78b88#ffff#2_201#join_rhs ON FIRST 1 OUTPUT Rhs.1, Rhs.2
return r8
```
2022-05-25 14:21:22 +02:00
Erik Krogh Kristensen
ed907f6f63
add CWE-940 to js/missing-origin-check
2022-05-25 14:15:48 +02:00
yoff
a726340bb3
Merge branch 'main' into py/CsvInjection
2022-05-25 13:18:46 +02:00
Anders Schack-Mulligen
deddc52666
Merge pull request #9317 from github/release-prep/2.9.3
...
Release preparation for version 2.9.3
2022-05-25 12:43:36 +02:00
Tom Hvitved
a7b39ebeca
Ruby: Flow through hash-splat parameters
2022-05-25 12:37:22 +02:00
Erik Krogh Kristensen
efa895e912
update expected output
2022-05-25 10:33:39 +00:00
Erik Krogh Kristensen
f38d1f9a4e
merge main into ts47
2022-05-25 10:13:25 +00:00
Nick Rolfe
134cf4e0e1
Ruby: tweak join order in API::Impl::edge
2022-05-25 10:54:43 +01:00
Tom Bolton
67572bb770
Merge pull request #9193 from github/tombolton/add-counting-queries
...
JS: Add individual per-security-query counting queries
2022-05-25 10:02:28 +01:00
Tony Torralba
9c941dc7ab
Add Kotlin test for UnsafeAndroidAccess
2022-05-25 10:56:18 +02:00
Tony Torralba
f0b90b391f
Add Kotlin test for CleartextStorageSharedPrefs
2022-05-25 10:56:18 +02:00
Tony Torralba
85fab20086
Add Expr::getUnderlyingExpr predicate
2022-05-25 10:56:18 +02:00
Erik Krogh Kristensen
009ba4c280
update query id to the updated id
2022-05-25 10:55:33 +02:00
yoff
aadfa8eacd
Merge branch 'main' into py/CsvInjection
2022-05-25 10:43:08 +02:00
Michael Nebel
e9d371c650
Merge pull request #8600 from michaelnebel/csharp/dotnetruntimemodels
...
C#: Dotnet Runtime models.
2022-05-25 10:33:09 +02:00
Rasmus Wriedt Larsen
f7e58a9335
Ruby: Apply nomagic on parameterMatch instead
2022-05-25 10:07:02 +02:00
AlexDenisov
8b131adeb1
Merge pull request #9283 from github/alexdenisov/swift-integration-tests
...
Swift: add integration tests
2022-05-25 10:04:08 +02:00
Anders Schack-Mulligen
673355df65
Fix markdown lists
2022-05-25 10:02:48 +02:00
Rasmus Wriedt Larsen
0bf0e0e16c
Revert "Ruby: Fix performance for argumentPositionMatch"
...
as requested to use a different performance fix
and
Revert "Dataflow: Sync `DataFlowImplCommon`"
This reverts commit c9a833fc07
This reverts commit 911ddb9b2c .
2022-05-25 09:56:10 +02:00
Asger F
877a9d8bcc
JS: Fix FP in js/type-confusion-through-parameter-tampering
2022-05-25 09:53:46 +02:00
github-actions[bot]
1f1b364feb
Release preparation for version 2.9.3
2022-05-25 07:46:48 +00:00
Asger F
4913a7a911
Merge branch 'main' into js/resource-exhaustion-no-buffer.from
2022-05-25 09:25:00 +02:00
ihsinme
57127a5343
Update cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-05-25 09:38:02 +03:00
Michael Nebel
9cab92b16f
C#: Update flow summaries test after rebase. The rebase included a fix to the isAutoGenerated predicate, which means that a summary is only considered autogenerated, if no hand-written version exist. This affects the printing as well.
2022-05-25 08:28:15 +02:00
Michael Nebel
5b405bb4cf
C#: Update FlowSummaries test with generated printing (needed due to rebase).
2022-05-25 08:28:15 +02:00
Michael Nebel
ba7238d6e2
C#: Update XML Injectiont test output after rebase (query has been turned into a path-problem and the output is now affected by the added summaries for NameValueCollection).
2022-05-25 08:28:15 +02:00
Michael Nebel
75532432af
C#: Update flow summaries test (note that the test doesn't correctly print the generated flag at the moment).
2022-05-25 08:28:15 +02:00
Michael Nebel
c8ede58704
C#: Flow summaries has now been added for Exception stack trace, but not for ToString. The latter will be encoded as an extra taintstep in the analysis. To reduce noise for all uses of an exception itself an isSanitizerIn is introduced.
2022-05-25 08:28:15 +02:00
Michael Nebel
4d6d1c8376
C#: Since NameValueCollection now has a flow summary for the string indexer it is no longer consider an unsafe external api, which is why it has disappared from the result.
2022-05-25 08:28:14 +02:00
Michael Nebel
ee027f845c
C#: Since NameValueCollection now has a flow summary for the indexer it is considered a SafeExternalApiCallable and will thus not be included in the result of the test.
2022-05-25 08:28:14 +02:00
Michael Nebel
268230ef19
C#: Add QlDoc to the Generated file.
2022-05-25 08:28:14 +02:00
Michael Nebel
e2d6cd20c7
C#: Update tests due to new summaries for ProcessStartInfo.
2022-05-25 08:28:14 +02:00
Michael Nebel
9b8636aa23
C#: Update test because we now have a flow summary the string indexer for NameValueCollection.
2022-05-25 08:28:14 +02:00
Michael Nebel
d9c7ba471d
C#: Update taint steps test as the generated models now include a model for the getters for KeyValuePair (we only had manual summaries for the constructor).
2022-05-25 08:28:14 +02:00
Michael Nebel
f8e729025f
C#: Add generated Dotnet Runtime summary models that allows to up two reads and two stores and update flow summaries test.
2022-05-25 08:28:14 +02:00
Michael Nebel
3b62b45ea8
C#: Add generated framework models to ExternalFlow.
2022-05-25 08:28:14 +02:00
Tom Hvitved
efda248bea
Merge pull request #9315 from michaelnebel/swift/dataflowsync
...
Swift: Sync changes to DataFlowImplCommon from PR #9024 .
2022-05-25 08:24:15 +02:00
Michael Nebel
5f3a039c65
Swift: Sync changes to DataFlowImplCommon from PR #9024 .
2022-05-25 08:05:22 +02:00
Erik Krogh Kristensen
2da001ebd7
bump TypeScript version to stable release
2022-05-24 22:55:59 +02:00
Robert Marsh
8cc509e5e9
Merge pull request #9275 from MathiasVP/swift-add-dataflow-lib
...
Swift: Add shared dataflow library
2022-05-24 15:11:42 -04:00
Robert Marsh
54ac36718c
Merge pull request #9284 from MathiasVP/more-cfg-for-exprs
...
Swift: CFG for `TypeExpr`, `MemberRefExpr`, `DefaultArgumentExpr` and `ForceValueExpr`
2022-05-24 14:51:26 -04:00
Chris Smowton
98ef22358e
Merge pull request #9213 from smowton/smowton/fix/inherited-single-abstract-method
...
Kotlin: fix implementation of SAM classes that inherit their abstract method
2022-05-24 18:22:55 +01:00
Rasmus Wriedt Larsen
ae65af2c07
Ruby: Fix Argument[any] in Hash.qll
...
With this PR, `self` have to be explicitly added. A few edges were
removed, and I don't know why. It doesn't seem to affect results, so I
did not worry too much.
2022-05-24 18:09:52 +02:00
Rasmus Wriedt Larsen
04ac466189
Merge branch 'main' into ruby-mad-argument-self
2022-05-24 18:04:02 +02:00
Rasmus Wriedt Larsen
911ddb9b2c
Dataflow: Sync DataFlowImplCommon
2022-05-24 17:39:23 +02:00
Rasmus Wriedt Larsen
c9a833fc07
Ruby: Fix performance for argumentPositionMatch
...
before
[2022-05-24 17:29:07] (50s) Tuple counts for DataFlowImplCommon::argumentPositionMatch#4f8df883#fff/3@03b4073c after 35.8s:
156250456 ~2% {4} r1 = JOIN DataFlowDispatch::Cached::TParameterPosition#36b84300#f WITH DataFlowImplCommon::ArgNode::argumentOf#dispred#f0820431#fff CARTESIAN PRODUCT OUTPUT Rhs.2, Lhs.0 'ppos', Rhs.0, Rhs.1 'call'
0 ~0% {3} r2 = JOIN r1 WITH DataFlowDispatch::Cached::TAnyKeywordArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.2 'arg', Lhs.3 'call'
0 ~0% {3} r3 = JOIN r2 WITH DataFlowDispatch::Cached::TKeywordParameterPosition#36b84300#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.2 'call', Lhs.1 'arg', Lhs.0 'ppos'
156250456 ~2% {4} r4 = JOIN DataFlowDispatch::Cached::TParameterPosition#36b84300#f WITH DataFlowImplCommon::ArgNode::argumentOf#dispred#f0820431#fff CARTESIAN PRODUCT OUTPUT Lhs.0 'ppos', Rhs.0, Rhs.1 'call', Rhs.2
252424 ~0% {4} r5 = JOIN r4 WITH DataFlowDispatch::Cached::TSelfParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call'
121009 ~0% {3} r6 = JOIN r5 WITH DataFlowDispatch::Cached::TSelfArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.3 'call', Lhs.2 'arg', Lhs.1 'ppos'
121009 ~0% {3} r7 = r3 UNION r6
252424 ~0% {4} r8 = JOIN r4 WITH DataFlowDispatch::Cached::TBlockParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call'
11764 ~5% {3} r9 = JOIN r8 WITH DataFlowDispatch::Cached::TBlockArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.3 'call', Lhs.2 'arg', Lhs.1 'ppos'
252424 ~2% {4} r10 = JOIN r4 WITH DataFlowDispatch::Cached::TAnyKeywordParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call'
20865 ~2% {3} r11 = JOIN r10 WITH DataFlowDispatch::Cached::TKeywordArgumentPosition#36b84300#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.3 'call', Lhs.2 'arg', Lhs.1 'ppos'
32629 ~4% {3} r12 = r9 UNION r11
153638 ~4% {3} r13 = r7 UNION r12
252424 ~1% {4} r14 = JOIN r4 WITH DataFlowDispatch::Cached::TAnyParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call', Lhs.3
131415 ~0% {4} r15 = r14 AND NOT DataFlowDispatch::Cached::TSelfArgumentPosition#36b84300#f(Lhs.3)
131415 ~0% {3} r16 = SCAN r15 OUTPUT In.2 'call', In.1 'arg', In.0 'ppos'
0 ~0% {4} r17 = JOIN r1 WITH DataFlowDispatch::Cached::TAnyArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.2 'arg', Lhs.3 'call', Lhs.0
0 ~0% {4} r18 = r17 AND NOT DataFlowDispatch::Cached::TSelfParameterPosition#36b84300#f(Lhs.0 'ppos')
0 ~0% {3} r19 = SCAN r18 OUTPUT In.2 'call', In.1 'arg', In.0 'ppos'
131415 ~0% {3} r20 = r16 UNION r19
5553328 ~5% {5} r21 = JOIN r4 WITH DataFlowDispatch::Cached::TPositionalParameterPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call'
98201 ~0% {3} r22 = JOIN r21 WITH DataFlowDispatch::Cached::TPositionalArgumentPosition#36b84300#ff ON FIRST 2 OUTPUT Lhs.4 'call', Lhs.3 'arg', Lhs.2 'ppos'
149435008 ~0% {5} r23 = JOIN r4 WITH DataFlowDispatch::Cached::TKeywordParameterPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call'
17930 ~3% {3} r24 = JOIN r23 WITH DataFlowDispatch::Cached::TKeywordArgumentPosition#36b84300#ff ON FIRST 2 OUTPUT Lhs.4 'call', Lhs.3 'arg', Lhs.2 'ppos'
252424 ~0% {5} r25 = JOIN r4 WITH DataFlowDispatch::Cached::TPositionalParameterLowerBoundPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.0 'ppos', Lhs.1 'arg', Lhs.2 'call', Rhs.1
98786 ~0% {6} r26 = JOIN r25 WITH DataFlowDispatch::Cached::TPositionalArgumentPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.2 'arg', Lhs.3 'call', Lhs.0, Lhs.4, Rhs.1
98786 ~0% {6} r27 = SELECT r26 ON In.5 >= In.4
98786 ~3% {3} r28 = SCAN r27 OUTPUT In.2 'call', In.1 'arg', In.0 'ppos'
116716 ~0% {3} r29 = r24 UNION r28
214917 ~0% {3} r30 = r22 UNION r29
346332 ~0% {3} r31 = r20 UNION r30
499970 ~1% {3} r32 = r13 UNION r31
return r32
now
[2022-05-24 17:26:06] (14s) Tuple counts for DataFlowImplCommon::argumentPositionMatch#4f8df883#fff/3@97d3444p after 149ms:
1000304 ~9% {2} r1 = JOIN DataFlowDispatch::Cached::TParameterPosition#36b84300#f WITH DataFlowDispatch::Cached::TArgumentPosition#36b84300#f CARTESIAN PRODUCT OUTPUT Lhs.0 'ppos', Rhs.0
1616 ~0% {2} r2 = JOIN r1 WITH DataFlowDispatch::Cached::TSelfParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'ppos'
1 ~0% {2} r3 = JOIN r2 WITH DataFlowDispatch::Cached::TSelfArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'ppos'
1616 ~5% {2} r4 = JOIN r1 WITH DataFlowDispatch::Cached::TBlockParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'ppos'
1 ~0% {2} r5 = JOIN r4 WITH DataFlowDispatch::Cached::TBlockArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'ppos'
2 ~0% {2} r6 = r3 UNION r5
1616 ~0% {2} r7 = JOIN r1 WITH DataFlowDispatch::Cached::TAnyKeywordParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'ppos'
1533 ~0% {2} r8 = JOIN r7 WITH DataFlowDispatch::Cached::TKeywordArgumentPosition#36b84300#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'ppos'
1000304 ~0% {2} r9 = JOIN DataFlowDispatch::Cached::TParameterPosition#36b84300#f WITH DataFlowDispatch::Cached::TArgumentPosition#36b84300#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'ppos'
619 ~0% {2} r10 = JOIN r9 WITH DataFlowDispatch::Cached::TAnyKeywordArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.0
592 ~0% {2} r11 = JOIN r10 WITH DataFlowDispatch::Cached::TKeywordParameterPosition#36b84300#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'ppos'
2125 ~1% {2} r12 = r8 UNION r11
2127 ~1% {2} r13 = r6 UNION r12
1616 ~0% {2} r14 = JOIN r1 WITH DataFlowDispatch::Cached::TAnyParameterPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.0 'ppos', Lhs.1
1615 ~0% {2} r15 = r14 AND NOT DataFlowDispatch::Cached::TSelfArgumentPosition#36b84300#f(Lhs.1)
1615 ~2% {2} r16 = SCAN r15 OUTPUT In.1, In.0 'ppos'
619 ~0% {2} r17 = JOIN r9 WITH DataFlowDispatch::Cached::TAnyArgumentPosition#36b84300#f ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.0
618 ~0% {2} r18 = r17 AND NOT DataFlowDispatch::Cached::TSelfParameterPosition#36b84300#f(Lhs.0 'ppos')
618 ~0% {2} r19 = SCAN r18 OUTPUT In.1, In.0 'ppos'
2233 ~0% {2} r20 = r16 UNION r19
35552 ~0% {3} r21 = JOIN r1 WITH DataFlowDispatch::Cached::TPositionalParameterPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'ppos'
22 ~0% {2} r22 = JOIN r21 WITH DataFlowDispatch::Cached::TPositionalArgumentPosition#36b84300#ff ON FIRST 2 OUTPUT Lhs.1, Lhs.2 'ppos'
956672 ~0% {3} r23 = JOIN r1 WITH DataFlowDispatch::Cached::TKeywordParameterPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'ppos'
592 ~0% {2} r24 = JOIN r23 WITH DataFlowDispatch::Cached::TKeywordArgumentPosition#36b84300#ff ON FIRST 2 OUTPUT Lhs.1, Lhs.2 'ppos'
1616 ~0% {3} r25 = JOIN r1 WITH DataFlowDispatch::Cached::TPositionalParameterLowerBoundPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'ppos', Rhs.1
79 ~0% {4} r26 = JOIN r25 WITH DataFlowDispatch::Cached::TPositionalArgumentPosition#36b84300#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'ppos', Lhs.0, Lhs.2, Rhs.1
79 ~0% {4} r27 = SELECT r26 ON In.3 >= In.2
79 ~1% {2} r28 = SCAN r27 OUTPUT In.1, In.0 'ppos'
671 ~0% {2} r29 = r24 UNION r28
693 ~0% {2} r30 = r22 UNION r29
2926 ~0% {2} r31 = r20 UNION r30
5053 ~0% {2} r32 = r13 UNION r31
499970 ~6% {3} r33 = JOIN r32 WITH DataFlowImplCommon::ArgNode::argumentOf#dispred#f0820431#fff_201#join_rhs ON FIRST 1 OUTPUT Rhs.2 'call', Rhs.1 'arg', Lhs.1 'ppos'
return r33
2022-05-24 17:31:36 +02:00
Ian Lynagh
2e1db7ddcd
Merge pull request #9290 from igfoo/igfoo/kotlin1.7
...
Kotlin: Add support for the 1.7 RC
2022-05-24 16:16:19 +01:00
Nick Rolfe
dd52a70454
Merge pull request #9292 from github/nickrolfe/cfg_scope
...
Ruby: rename CfgScope::Range_ to CfgScopeImpl
2022-05-24 15:53:16 +01:00
Michael Nebel
daace0fe68
Merge pull request #9270 from michaelnebel/csharp/summarized-callable-fix
...
C#: Summarized callable
2022-05-24 16:36:44 +02:00
Anders Schack-Mulligen
a3177368f0
Java: Add support for BarrierGuards as parameterised modules.
2022-05-24 16:36:03 +02:00
Jeroen Ketema
1075a141a4
Merge pull request #9293 from jketema/query-typo
...
C++: Fix missing closing quote in `cpp/potential-buffer-overflow` qldoc
2022-05-24 16:16:57 +02:00
Ian Lynagh
81e876a27b
Kotlin: Update build.gradle to include the 1.7.0 RC
2022-05-24 15:14:17 +01:00
Ian Lynagh
d7c17b2bac
Kotlin: Add more withHasQuestionMark.kt's
2022-05-24 15:12:29 +01:00
Ian Lynagh
398f86bcc3
Kotlin: Build system tweaks
2022-05-24 15:11:35 +01:00
Ian Lynagh
f46a7c0a0f
Kotlin: Add 1.7.0 RC
2022-05-24 15:11:13 +01:00
Ian Lynagh
846edf825a
Kotlin: Use withHasQuestionMark wrapper
2022-05-24 15:10:39 +01:00
Ian Lynagh
807f03a878
Kotlin: Add withHasQuestionMark for older releases
2022-05-24 15:10:39 +01:00
Ian Lynagh
4448ba1111
Kotlin: Add compatibility source for 1.7.0-RC
2022-05-24 15:10:39 +01:00
Ian Lynagh
078733c5fe
Merge pull request #9263 from tamasvajk/kotlin-versions
...
Kotlin: Add support for versions 1.5.0, 1.5.10, and 1.5.21
2022-05-24 15:10:09 +01:00
tombolton
91fa17a05e
simplify imports in counting queries
2022-05-24 15:02:26 +01:00
tombolton
7e32614c25
refactor counting code into a library
2022-05-24 15:02:26 +01:00
tombolton
33964383d7
add individual per-security-query counting queries
2022-05-24 15:02:26 +01:00
Jeroen Ketema
f93fde564b
C++: Fix missing closing quote in cpp/potential-buffer-overflow qldoc
2022-05-24 15:36:37 +02:00
Nick Rolfe
4b4a15c1b6
Ruby: rename CfgScope::Range_ to CfgScopeImpl
2022-05-24 14:34:44 +01:00
Chris Smowton
edb678f7d0
Rename function
2022-05-24 14:15:40 +01:00
Tom Hvitved
728ccafe2b
Merge pull request #9024 from hvitved/dataflow/content-flow-lib
...
Data flow: Introduce `ContentDataFlow.qll`
2022-05-24 15:09:16 +02:00
Tom Hvitved
d61f6453d0
Merge pull request #8942 from hvitved/ruby/dataflow/hashes
...
Ruby: Data-flow through hashes
2022-05-24 14:48:55 +02:00
Asger F
ced1d21405
JS: Add getters for DeclarationSpace members
2022-05-24 14:30:36 +02:00
Asger F
039a7ba828
JS: Handle .d.mts files when generating module bindings
2022-05-24 14:30:36 +02:00
Asger Feldthaus
a5f2c949d3
JS: Add UnionOrIntersectionTypeExpr
2022-05-24 14:30:36 +02:00
Asger F
ec55c84abf
JS: Whitespace fixes in ASTExtractor
2022-05-24 14:30:36 +02:00
Asger F
d7e3e9e5db
JS: Fix extraction of identifiers in EXPORT_BASE context
...
This is needed to ensure that the base of the RHS of an ImportEqualsDeclaration is bound to a namespace. That is, B below should be bound to a namespace:
import A = B.C.D;
2022-05-24 14:30:36 +02:00
Asger F
665fa2af59
JS: Add test for export base scope
2022-05-24 14:30:36 +02:00
Asger F
c8bb0e2117
JS: Treat d.ts as a single extension in Folder.getJavaScriptFile
2022-05-24 14:30:36 +02:00
Asger F
987a830029
JS: Add test for import of d.ts file
2022-05-24 14:30:36 +02:00
Asger F
2e858db848
JS: Declare variables from ambient declarations
...
fixup
2022-05-24 14:30:36 +02:00
Asger F
74af9067a1
JS: Add node_modules to .gitignore
2022-05-24 14:29:11 +02:00
Tom Hvitved
1ae8087379
Update ruby/ql/lib/codeql/ruby/frameworks/core/Hash.qll
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-05-24 14:27:59 +02:00
Tom Hvitved
daf81ae90d
Address review comments
2022-05-24 14:27:59 +02:00
Tom Hvitved
ab46c075f7
Ruby: Add change note
2022-05-24 14:27:58 +02:00
Tom Hvitved
63c70b9e7a
Address review comments
2022-05-24 14:27:58 +02:00
Tom Hvitved
faf24a4f18
Ruby: Data-flow through hashes
2022-05-24 14:27:55 +02:00
Asger F
a955bd3695
JS: Change note
2022-05-24 14:18:06 +02:00
Asger F
7d4a191a32
JS: Simplify
2022-05-24 14:18:06 +02:00
Asger F
db4b6d620a
JS: Remove Buffer.from as sink for js/resource-exhaustion
2022-05-24 14:18:05 +02:00
Erik Krogh Kristensen
82c6c22d50
make a model for hasOwnProperty calls and similar
2022-05-24 14:13:53 +02:00
Arthur Baars
6781a76b96
Merge pull request #9206 from aibaars/instance-variable-flow
...
Ruby: flow through instance variables
2022-05-24 14:02:33 +02:00
Erik Krogh Kristensen
2a97dd9f6f
add support for Object.hasOwn(obj, key)
2022-05-24 13:59:25 +02:00
Tamás Vajk
730f54ade2
Merge pull request #9280 from tamasvajk/kotlin-map-kj-properties
...
Kotlin: Fix missing kotlin to java property mapping
2022-05-24 13:16:29 +02:00
Anders Schack-Mulligen
b688aabd19
Java: Improve customNullGuard performance.
2022-05-24 13:05:41 +02:00
Chris Smowton
ae56b823e0
Merge pull request #9282 from github/smowton/admin/go-tests-owner
...
Change owner of Go-related workflows
2022-05-24 11:47:09 +01:00
Erik Krogh Kristensen
1717d17fb3
add flow step for Array.prototype.at
2022-05-24 12:41:27 +02:00
github-actions[bot]
1fa2fd73f2
JS: Bump patch version of ML-powered library and query packs post-release
2022-05-24 10:40:45 +00:00
Erik Krogh Kristensen
fc25d14af7
add change note
2022-05-24 12:37:28 +02:00
Erik Krogh Kristensen
572f247fd9
bump the supported ECMAScript version to 2022
2022-05-24 12:34:29 +02:00
github-actions[bot]
53a25c8c42
JS: Bump minor version of ML-powered library and query packs
2022-05-24 10:34:26 +00:00
github-actions[bot]
1287925676
JS: Bump patch version of ML-powered model pack post-release
2022-05-24 10:34:26 +00:00
github-actions[bot]
171fe98084
JS: Bump ML model pack dependency of ML-powered model building and query packs
2022-05-24 10:34:26 +00:00
github-actions[bot]
e519304268
JS: Bump minor version of ML-powered model pack
2022-05-24 10:33:45 +00:00
Chris Smowton
71017a3b44
Alphabetically sort workflow codeowners
2022-05-24 11:20:51 +01:00
Erik Krogh Kristensen
2423c77b0c
Merge pull request #9281 from erik-krogh/jsQL
...
JS: various QL-for-QL fixes
2022-05-24 12:12:31 +02:00
Asger F
87cbf7b216
JS: Update ATM code
2022-05-24 11:57:30 +02:00
Asger F
631527fe49
JS: Rename Node.{getASource -> asSource, getASink -> asSink}
2022-05-24 11:57:30 +02:00
Asger F
bc601261ed
JS: Use 'ql' language for markdown snippets
2022-05-24 11:57:30 +02:00
Asger F
f80f8b6630
JS: Update a comment mentioning getARhs
2022-05-24 11:57:30 +02:00
Asger F
18dc39484d
Update javascript/ql/lib/semmle/javascript/ApiGraphs.qll
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-05-24 11:57:30 +02:00
Asger Feldthaus
1e96b1e559
JS: Fix typo
2022-05-24 11:57:30 +02:00
Asger Feldthaus
777d344dde
JS: Fix up qldoc for getAValueReachingSink
2022-05-24 11:57:30 +02:00
Asger Feldthaus
e2858b7b64
JS: Update ATM code
2022-05-24 11:57:30 +02:00
Asger Feldthaus
8da96ed403
JS: Update doc comment
2022-05-24 11:57:30 +02:00
Asger F
1ae97d9d54
Apply suggestions from code review
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-05-24 11:57:30 +02:00
Asger Feldthaus
9fad4b883b
JS: Autoformat
2022-05-24 11:57:30 +02:00
Asger Feldthaus
76ba78294f
JS: Make API::EntryPoint overrides optional
2022-05-24 11:57:30 +02:00
Asger Feldthaus
ce9c3b3eb5
JS: Also rename predicates on API::EntryPoint
2022-05-24 11:57:30 +02:00
Asger Feldthaus
19a5db9f89
JS: Rename getARhs -> getASink
2022-05-24 11:57:30 +02:00
Asger Feldthaus
4c6192670e
JS: Rename getAnImmediateUse -> getASource
2022-05-24 11:57:30 +02:00
Asger F
a7b73f44b2
Update javascript/ql/lib/semmle/javascript/ApiGraphs.qll
...
Co-authored-by: Calum Grant <42069085+calumgrant@users.noreply.github.com >
2022-05-24 11:57:30 +02:00
Asger F
73baa49c5d
Update javascript/ql/lib/semmle/javascript/ApiGraphs.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-05-24 11:57:30 +02:00
Asger Feldthaus
82c35e6f65
Mention that the interaction and be with any external codebase
2022-05-24 11:57:29 +02:00
Asger Feldthaus
6a12864dab
JS: Document how API graphs should be interpreted
2022-05-24 11:57:29 +02:00
Ian Lynagh
07e450d513
Merge pull request #9269 from igfoo/igfoo/cfg
...
Kotlin: Fix CFG
2022-05-24 10:53:00 +01:00
Alex Denisov
fa09078976
Swift: do not keep trap files for tests
2022-05-24 11:48:45 +02:00
Alex Denisov
8e8da66325
Swift: share .gitignore across all tests
2022-05-24 11:48:06 +02:00
Chris Smowton
fd60ab420d
Merge pull request #9278 from github/dependabot/github_actions/actions/setup-go-3
...
Bump actions/setup-go from 1 to 3
2022-05-24 10:24:31 +01:00
Mathias Vorreiter Pedersen
3e1a6a777e
Swift: Accept test changes.
2022-05-24 10:22:06 +01:00
Mathias Vorreiter Pedersen
dda60abfef
Swift: Add CFG for a couple more expressions.
2022-05-24 10:21:04 +01:00
Erik Krogh Kristensen
b2d3a7dca5
add change-note for the public renamed predicate
2022-05-24 11:20:08 +02:00
Alex Denisov
528f6f73c5
Swift: add integration tests
2022-05-24 11:12:35 +02:00
Mathias Vorreiter Pedersen
7752a38ee5
Merge pull request #9274 from MathiasVP/swift-extract-semantics-and-accessor-kinds
...
Swift: Extract semantics and accessor kinds
2022-05-24 10:12:30 +01:00
Chris Smowton
bd06a071c4
Change owner of Go-related workflows
2022-05-24 10:11:36 +01:00
Erik Krogh Kristensen
a404a8c61a
use more set literals instead of big disjunctions
2022-05-24 11:09:10 +02:00
Erik Krogh Kristensen
b48806968c
delete redundant import
2022-05-24 11:02:41 +02:00
Erik Krogh Kristensen
395ec106b9
remove unused field
2022-05-24 11:02:18 +02:00
Mathias Vorreiter Pedersen
21641eb1cd
Swift: Make the 'semantics.ql' test plantform-independent.
2022-05-24 10:00:14 +01:00
Erik Krogh Kristensen
d58fe8e193
add explicit this
2022-05-24 10:59:13 +02:00
Erik Krogh Kristensen
d1ad08ecb5
fix misspellings in predicate names
2022-05-24 10:57:13 +02:00
Harry Maclean
334c43a2b7
Ruby: Add tests for ActiveSupport modelling
2022-05-24 09:35:26 +01:00
Harry Maclean
deff24e8e0
Fix singleton set literal
2022-05-24 09:35:26 +01:00
Harry Maclean
1fd54ed8c3
Ruby: Recognised ActiveSupport::TaggedLogging as a logger
2022-05-24 09:35:26 +01:00
Harry Maclean
dc4ddf6899
Ruby: Recognise ActiveSupport::Logger as a logger
2022-05-24 09:35:26 +01:00
Harry Maclean
14d2ff6528
Ruby: Model ActiveSupport extensions to Enumerable
2022-05-24 09:35:26 +01:00
Harry Maclean
ad2eaf0835
Ruby: Flow for ActiveSupport String extensions
...
Add taint flow summaries for ActiveSupport String extensions which
transform the string in various ways, for example `camelcase` and
`underscore`.
DCA suggests this increases the sensitivity of rb/code-injection,
catching cases such as
params[:foo].camelcase.constantize
2022-05-24 09:35:26 +01:00
Tom Hvitved
6345816acf
Rework ContentDataFlow implementation
2022-05-24 10:34:06 +02:00
Mathias Vorreiter Pedersen
be453142b8
Merge pull request #8730 from geoffw0/reachesperf
...
C++: Better join order for reachesWithoutAssignment.
2022-05-24 09:22:21 +01:00
Jeroen Ketema
05f09919b0
Merge pull request #9276 from jketema/upgrade-script-script
...
Support Go and Swift in the `prepare-db-upgrade` script
2022-05-24 10:09:31 +02:00
Tamas Vajk
5a54218ac7
Kotlin: Fix missing kotlin to java property mapping
2022-05-24 10:03:17 +02:00
Tamas Vajk
19400249a9
Kotlin: Add test for missing kotlin to java property mapping
2022-05-24 10:02:32 +02:00
Mathias Vorreiter Pedersen
a0659072b5
Swift: Add tests and accept test changes.
2022-05-24 09:00:34 +01:00
Mathias Vorreiter Pedersen
cf5f1e593e
Swift: Extract new entities.
2022-05-24 08:57:05 +01:00
Mathias Vorreiter Pedersen
cdb081eaec
Swift: Update schema and update generated files.
2022-05-24 08:57:05 +01:00
Felicity Chapman
4ea892f2d2
Fix typo
2022-05-24 08:10:19 +01:00
Michael Nebel
42be60ea57
C#: Address codereview comments.
2022-05-24 08:21:39 +02:00
Michael Nebel
a8b103b89c
Java: Update dependencies.
2022-05-24 08:21:39 +02:00
Michael Nebel
94664f11f5
C#/Java/Ruby: Sync files.
2022-05-24 08:21:39 +02:00
Michael Nebel
eed02a2a9f
C#: Fix issue with isAutoGenerated predicate and make sure that data flow only use relevant summaries.
2022-05-24 08:21:38 +02:00
dependabot[bot]
dfa9d9ff85
Bump actions/setup-go from 1 to 3
...
Bumps [actions/setup-go](https://github.com/actions/setup-go ) from 1 to 3.
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](https://github.com/actions/setup-go/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-05-24 03:39:16 +00:00
Arthur Baars
8248f607e4
Merge pull request #9277 from github/aibaars/go-test-workflow
...
Go: trigger CI jobs on Go related changes only
2022-05-23 23:51:34 +02:00
Aditya Sharad
7853ea607f
Merge pull request #9243 from github/adityasharad/merge-codeql-go-docs
...
Docs: Update references to github/codeql-go
2022-05-23 14:37:23 -07:00
Arthur Baars
7a85ab1690
Go: trigger CI jobs on Go related changes only
2022-05-23 21:25:27 +02:00
Erik Krogh Kristensen
f8281b43b1
autoformat
2022-05-23 19:58:48 +02:00
Erik Krogh Kristensen
aa01cf11c2
Merge pull request #9125 from erik-krogh/exportObj
...
JS: recognize functions that return object of methods as library input
2022-05-23 19:57:34 +02:00
Erik Krogh Kristensen
0c10927adc
Merge pull request #9261 from erik-krogh/passport
...
JS: remove support for passport in the session-fixation query
2022-05-23 19:56:42 +02:00
Aditya Sharad
42f2fc2287
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-05-23 10:55:50 -07:00
Jeroen Ketema
34df9dc835
Support Go and Swift in the prepare-db-upgrade script
2022-05-23 19:09:00 +02:00
Mathias Vorreiter Pedersen
9b67912da2
Updated sync-identical-files.
2022-05-23 18:04:32 +01:00
Mathias Vorreiter Pedersen
f46fc34481
Swift: Add skeleton for shared dataflow library.
2022-05-23 18:03:47 +01:00
Mathias Vorreiter Pedersen
b681a10bfe
Swift: Add shared SSA library.
2022-05-23 18:01:43 +01:00
Erik Krogh Kristensen
b6a4f43737
expand qldoc for getNumArgument
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-05-23 18:51:33 +02:00
Arthur Baars
cf2eb0d3a1
Merge branch 'main' into instance-variable-flow
2022-05-23 18:48:51 +02:00
Chuan-kai Lin
d3ebc814f5
Merge pull request #8631 from github/cklin/merge-codeql-go
...
Merge codeql-go repository into codeql
2022-05-23 09:22:28 -07:00
Mathias Vorreiter Pedersen
9b0d84c1a3
Merge pull request #9268 from MathiasVP/swift-add-cfg-library
...
Swift: Extend AST classes and add control-flow library
2022-05-23 16:37:51 +01:00
Harry Maclean
905a37c273
Merge pull request #9137 from hmac/hmac/cfg-ql-class
...
Ruby: Add getAPrimaryQlClass to CfgNodes classes
2022-05-23 15:37:51 +01:00
Mathias Vorreiter Pedersen
358a8aba7a
Merge pull request #8994 from HansmannThibaut/main
...
C/C++ : Wrong Uint access
2022-05-23 15:31:23 +01:00
Mathias Vorreiter Pedersen
4ba29845e9
Swift: Fix Code Scanning alerts.
2022-05-23 15:18:36 +01:00
Ian Lynagh
8e64978ffd
Kotlin: Autoformat
2022-05-23 14:51:41 +01:00
Geoffrey White
dcbd5dd98a
Merge branch 'main' into reachesperf
2022-05-23 14:49:32 +01:00
Taus
3745526d69
Merge pull request #9108 from RasmusWL/promote-pam
...
Python: Promote `py/pam-auth-bypass`
2022-05-23 15:27:12 +02:00
Mathias Vorreiter Pedersen
ba28632c96
Update cpp/ql/src/experimental/Best Practices/WrongUintAccess.qhelp
2022-05-23 14:11:13 +01:00
CodeQL CI
04ca9cfaf4
Merge pull request #9234 from asgerf/js/api-graph-accessors
...
Approved by erik-krogh
2022-05-23 06:08:50 -07:00
Erik Krogh Kristensen
aadbc989ce
fix typo in comment
...
Co-authored-by: Asger F <asgerf@github.com >
2022-05-23 15:07:29 +02:00
Harry Maclean
ae3a30256b
Ruby: Add getAPrimaryQlClass to CfgNode
2022-05-23 14:02:23 +01:00
Rasmus Wriedt Larsen
85fa6fba63
Concepts: Move CryptographicOperation.isWeak to be Ruby specific
2022-05-23 14:39:06 +02:00
Tom Hvitved
64be958c52
Merge pull request #9262 from hvitved/ruby/local-source-node-antijoin
...
Ruby: Eliminate bad `isLocalSourceNode` antijoin
2022-05-23 14:36:03 +02:00
Tamas Vajk
ccc6d2501a
Kotlin: adjust build scripts to include versions 1.5.0, 1.5.10, and 1.5.21
2022-05-23 14:19:53 +02:00
Tamas Vajk
0dfbe7adfb
Kotlin: Add 1.5.21 specific files
2022-05-23 14:19:53 +02:00
Tamas Vajk
9df9d3ad03
Kotlin: Add 1.5.10 specific files
2022-05-23 14:19:53 +02:00
Tamas Vajk
83a1f687a1
Kotlin: Add 1.5.0 specific files
2022-05-23 14:19:52 +02:00
Erik Krogh Kristensen
ba844aa0ab
Merge branch 'main' into exportObj
2022-05-23 14:18:31 +02:00
yoff
23d64ffa04
Merge pull request #9135 from tausbn/python-modernise-py-jinja2-autoescape-false
...
Python: Modernise py/jinja2/autoescape-false
2022-05-23 14:18:06 +02:00
Mathias Vorreiter Pedersen
2882c42698
Swift: Sync identical files.
2022-05-23 13:13:26 +01:00
Mathias Vorreiter Pedersen
6540e1e8bf
Swift: Share 'ControlFlowGraphImplShared.qll' for Swift with Ruby and C#.
2022-05-23 13:12:45 +01:00
Mathias Vorreiter Pedersen
e98728b788
Swift: Fix casing on import alias.
2022-05-23 13:08:09 +01:00
Mathias Vorreiter Pedersen
83bcb53199
Swift: Add tests accept test changes.
2022-05-23 13:05:55 +01:00
Tamás Vajk
487425670e
Merge pull request #9229 from tamasvajk/kotlin-df-fix-list
...
Kotlin: extract non-private members of class supertypes
2022-05-23 14:04:31 +02:00
Rasmus Wriedt Larsen
3afa9425ef
Ruby: Add TAnyKeywordArgumentPosition and TAnyKeywordParameterPosition
2022-05-23 14:03:45 +02:00
Mathias Vorreiter Pedersen
9f8fbd7aa7
Swift: Add control-flow library.
2022-05-23 12:59:06 +01:00
Mathias Vorreiter Pedersen
26f0d3ac43
Swift: Add helper predicates on AST classes
2022-05-23 12:51:51 +01:00
Paolo Tranquilli
06a8cf6f1e
Merge pull request #9198 from github/redsun82/swift-self-contained-cpp-code-gen
...
Swift: make C++ code generation more self-contained
2022-05-23 13:45:58 +02:00
Asger F
0929f5eb49
JS: Update test assertions to new syntax
2022-05-23 13:12:52 +02:00
Asger Feldthaus
33dac5e95f
JS: API graph support for accessors (and classes)
2022-05-23 13:12:52 +02:00
yoff
8b9915e372
Python: Let the user help us identifying callbacks
2022-05-23 11:07:47 +00:00
Tom Hvitved
9cc9991c74
C#: Update ContentDataFlow test
...
Illustrates missing flow when the sink is inside a method that is also part of
a `subpath`.
2022-05-23 13:05:28 +02:00
Paolo Tranquilli
1e9fcfb338
Merge pull request #9265 from github/redsun82/swift-rm-codeqlmanifest
...
Swift: remove `.codeqlmanifest`
2022-05-23 13:00:58 +02:00
Erik Krogh Kristensen
7a3bbede1b
remove support for passport in the session-fixation query
2022-05-23 12:55:11 +02:00
Paolo Tranquilli
63f5a86699
Merge pull request #9264 from github/redsun82/swift-fix-ndebug-build
...
Swift: fix extractor built with `NDEBUG`
2022-05-23 12:50:49 +02:00
Paolo Tranquilli
a3f6682bbb
Swift: remove .codeqlmanifest
...
The extractor pack entry in there has been moved to the root manifest.
2022-05-23 12:49:08 +02:00
Paolo Tranquilli
ea6a249fee
Swift: fix extractor built with NDEBUG
...
There was a call with side effects in an `assert`, that was therefore
not being called with `NDEBUG` turned on, changing extractor results.
2022-05-23 12:35:54 +02:00
Ian Lynagh
62ece16cf4
Kotlin: Accept test changes
2022-05-23 11:27:22 +01:00
Ian Lynagh
42da7c6c58
Kotlin: Fix CFG
2022-05-23 11:27:22 +01:00
Arthur Baars
965f83e198
Reformat ControlFlowGraphImpl.qll
2022-05-23 12:22:47 +02:00
Arthur Baars
eabf2ed2d3
Apply suggestions from code review
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-05-23 12:18:48 +02:00
Tom Hvitved
d6b0772f7c
Ruby: Improve performance of instanceVariableSelfSynthesis
2022-05-23 12:08:41 +02:00
Arthur Baars
d86983b7c8
Ruby: use InstanceVariableRead/WriteAccess CFG nodes
2022-05-23 12:03:11 +02:00
Arthur Baars
5fa4f07f7d
Improve QLDoc
2022-05-23 11:59:28 +02:00
Arthur Baars
7ed60b19a2
Ruby: improve test case
2022-05-23 11:59:12 +02:00
Arthur Baars
29ea1b2f24
Ruby: rename getSelfVariableAccess to getReceiver
2022-05-23 11:30:29 +02:00
Arthur Baars
f6ca3921f9
Add change note
2022-05-23 10:59:54 +02:00
Tom Hvitved
bbdedf5f14
Ruby: Eliminate bad isLocalSourceNode antijoin
...
Gets rid of
```
Tuple counts for DataFlowPrivate::Cached::isLocalSourceNode#462ff392#f#antijoin_rhs@dd2f927s:
20905019 ~3% {2} r1 = JOIN DataFlowPrivate::Cached::TExprNode#462ff392#ff_1#higher_order_body WITH boundedFastTC(DataFlowPrivate::Cached::localFlowStepTypeTracker#462ff392#ff_10#higher_order_body,DataFlowPrivate::Cached::TExprNode#462ff392#ff_1#higher_order_body) ON FIRST 1 OUTPUT Rhs.1, Lhs.0
10420128 ~1496% {1} r2 = JOIN r1 WITH DataFlowPrivate::Cached::TExprNode#462ff392#ff_1#higher_order_body ON FIRST 1 OUTPUT Lhs.1
480918 ~8% {1} r3 = JOIN r1 WITH DataFlowPrivate::Cached::entrySsaDefinition#462ff392#f ON FIRST 1 OUTPUT Lhs.1
10901046 ~1218% {1} r4 = r2 UNION r3
return r4
```
2022-05-23 10:54:17 +02:00
Tamas Vajk
4732793fb6
Change type tests
...
Linux and MacOS produced different results, so the queried types are now limited to ones that are visible in the source code.
2022-05-23 10:39:22 +02:00
Tamas Vajk
d3e64f5135
Kotlin: extract non-private members of class supertypes
2022-05-23 10:39:22 +02:00
Tamas Vajk
b0c6db4cfc
Kotlin: add missing dataflow test for List::iterator
2022-05-23 10:39:22 +02:00
Tamas Vajk
ab920d31dc
Repro for kotlin-java difference with generic types
2022-05-23 10:39:22 +02:00
Michael Nebel
bf958ff5bb
Merge pull request #9255 from michaelnebel/csharp/test-clearscontent
...
C#: Remove default clears content.
2022-05-23 10:30:30 +02:00
Michael Nebel
c82ab6813f
Merge pull request #9256 from michaelnebel/csharp/test-ranking
...
C#: Rank summaries and source code in dataflow callables.
2022-05-23 10:29:52 +02:00
Anders Schack-Mulligen
f2218944f6
Merge pull request #9214 from hvitved/dataflow/lambda-fp-flow
...
Data flow: Do not discard call context when computing reverse lambda flow through jumps
2022-05-23 10:02:51 +02:00
Michael Nebel
217c414b6e
C#: Now that SummarizedCallableDefaultClears content has been removed, we need to explicitly say that fields are cleared.
2022-05-23 08:58:09 +02:00
Michael Nebel
ddde1d4607
C#: Remove default clears content.
2022-05-22 15:16:44 +02:00
Michael Nebel
f141336f64
C#: Fake location of methods as we want to use the defined summaries for testing purposes.
2022-05-22 15:14:58 +02:00
Michael Nebel
9f611d79ac
C#: Rank summaries and source code such that only one is used.
2022-05-22 15:14:19 +02:00
Chris Smowton
5119de8d22
Merge pull request #9238 from atorralba/atorralba/remove-xxe-sinks
...
Java: Remove org.dom4j.DocumentHelper:parseText as XXE sink
2022-05-21 17:33:06 +01:00
Erik Krogh Kristensen
7971b54771
Merge pull request #8891 from erik-krogh/qlMergeFix
...
QL: point the dataset measure workflow to a merge_stats.py file that exists
2022-05-20 22:33:59 +02:00
Aditya Sharad
4d74282175
Actions: Avoid cloning codeql-go when building query list docs
2022-05-20 12:10:21 -07:00
Aditya Sharad
beddd306f5
Docs: Update references to github/codeql-go
...
github/codeql-go is being merged into github/codeql.
Update references to `codeql-go` within the CodeQL CLI docs.
Add Go to the list of mentioned languages where applicable.
Leave an explanatory note in the setup instructions about the
previous requirement to check out `github/codeql-go`, and
mention this is no longer necessary.
The remaining references are to historical commits,
which will continue to exist.
2022-05-20 12:10:21 -07:00
Robert Marsh
6d267be1a1
C++: merge main and accept test changes
2022-05-20 14:37:09 -04:00
Chuan-kai Lin
7f96319b37
Clean up direct references to codeql-go
...
This commit removes special handling of the github/codeql-go repository in the
ql-for-ql-dataset_measure.yml and the query-list.yml workflows.
2022-05-20 10:23:48 -07:00
Chuan-kai Lin
827c7ab153
Go: fix search and tool paths for 'make test'
2022-05-20 10:22:47 -07:00
Arthur Baars
7bc6c10f5b
Go: fix search-path for 'make test'
2022-05-20 10:22:47 -07:00
Chuan-kai Lin
c58b5397c2
Go: delete test qhelp file
...
There shouldn't be qhelp files in the ql/test tree.
https://github.com/github/codeql/pull/8631#issuecomment-1087316116
2022-05-20 10:22:47 -07:00
Chuan-kai Lin
1276c41e83
codeql-go merge prep: integrate go/ into codeql
2022-05-20 10:22:47 -07:00
Chuan-kai Lin
097d5189e9
Merge branch 'main' into cklin/merge-codeql-go-prep
2022-05-20 10:22:19 -07:00
Chuan-kai Lin
aa514fff32
codeql-go merge prep: move into go/ directory
2022-05-20 10:07:19 -07:00
Arthur Baars
439dcc0731
Merge pull request #9241 from aibaars/fix-history
...
Kotlin changes
2022-05-20 17:31:57 +02:00
Arthur Baars
f3f0e06127
Merge branch 'main' into fix-history
2022-05-20 17:20:42 +02:00
Paolo Tranquilli
f2bc73bf8f
Merge pull request #9239 from github/redsun82/swift-visitors
...
Swift: transfer all visitors
2022-05-20 16:38:06 +02:00
Arthur Baars
68aeb2ba85
Update test output
2022-05-20 16:30:58 +02:00
Arthur Baars
d9c2b78aa2
Ruby: flow through instance variables
2022-05-20 16:30:58 +02:00
Paolo Tranquilli
fc165c1975
Swift: remove IDE generated comment header
2022-05-20 16:25:33 +02:00
Paolo Tranquilli
f52a849ab8
Merge branch 'main' into redsun82/swift-self-contained-cpp-code-gen
2022-05-20 16:16:35 +02:00
Tamás Vajk
144937a753
Merge pull request #9154 from tamasvajk/kotlin-error-warning-1
...
Kotlin: Adjust diagnostic message severity
2022-05-20 16:12:39 +02:00
Paolo Tranquilli
e6f2ab003c
Swift: remove empty DB-CHECK.expected files
2022-05-20 16:01:56 +02:00
Paolo Tranquilli
b0668ee6c2
Swift: remove unused decl properties
2022-05-20 15:42:28 +02:00
Paolo Tranquilli
553930d9e3
Swift: type visitor
...
This transfers the current state of `TypeVisitor` from the
proof-of-concept.
2022-05-20 15:42:20 +02:00
Paolo Tranquilli
922608c65a
Swift: expression visitor
...
This transfers the current status of `ExprVisitor` from the
proof-of-concept, together with some changes required for swift 5.6.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
3f45b73d62
Swift: pattern visitor
...
This transfers the current state of `PatternVisitor` from the
proof-of-concept.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
19506dae74
Swift: statement visitor
...
This transfers the current state of `StmtVisitor` in the PoC, plus some
changes required for the update to swift 5.6.
Also `getLabel` in `SwiftDispatcher` got renamed to `createLabel`, and
is now correctly outputting the label assignment to the trap file.
2022-05-20 15:41:27 +02:00
Paolo Tranquilli
d6ced16aa8
Swift: declaration visitor
...
This transfers the current state of `DeclVisitor` from the
proof-of-concept.
TODO: make the `declarations` tests in `extractor-tests` more
comprehensive.
2022-05-20 15:41:22 +02:00
Paolo Tranquilli
da7e700a8f
Merge pull request #9185 from github/redsun82/swift-tbd-rework
...
Swift: move TBD code to ql
2022-05-20 15:39:31 +02:00
Stephan Brandauer
cdceb66b07
add test for moduleSuffixes
2022-05-20 15:10:13 +02:00
Ian Lynagh
6652c27591
Merge pull request #9236 from igfoo/igfoo/kotlinc
...
Kotlin: Use 'which' to find kotlinc
2022-05-20 14:06:59 +01:00
Tamas Vajk
7aafc5f88c
Kotlin: Adjust diagnostic message severity
...
Make extraction messages `warning` if code is still extracted regardless of the reported issue. Make extraction messages `error` if some code is not extracted.
2022-05-20 14:55:16 +02:00
Ian Lynagh
73759705ae
Merge pull request #9121 from github/igfoo/mjson
...
Kotlin: Write the log file as Line-delimited JSON
2022-05-20 13:51:20 +01:00
Tony Torralba
98f70dc7d3
Remove org.dom4j.DocumentHelper:parseText as XXE sink
2022-05-20 14:45:26 +02:00
Tony Torralba
aba4a9aa4a
Merge pull request #9233 from atorralba/atorralba/fix-field-init-test
...
Kotlin: Fix test to correctly highlight lack of flow from field init
2022-05-20 14:37:22 +02:00
Stephan Brandauer
d6abb2e6bd
add new supported file types to versions-compilers.rst
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-05-20 14:34:53 +02:00
Stephan Brandauer
cb4b2e983b
delete test of removed feature
2022-05-20 14:33:07 +02:00
Ian Lynagh
3fd61581b3
Kotlin: Call the right kotlinc
2022-05-20 12:59:04 +01:00
Ian Lynagh
44efb34447
Kotlin: Use 'which' to find kotlinc
...
This means we handle kotlinc.batr and kotlinc.cmd on Windows.
2022-05-20 12:44:55 +01:00
Stephan Brandauer
813fbf27de
support for .mts and .cts file extensions
2022-05-20 13:33:52 +02:00
Ian Lynagh
4eddb6224b
Kotlin: Format a query
2022-05-20 12:07:35 +01:00
Ian Lynagh
df9f75832c
Kotlin: Fix diagnostics test
2022-05-20 12:07:35 +01:00
Ian Lynagh
f7fa00ef6c
Kotlin: Accept test output
2022-05-20 12:07:35 +01:00
Ian Lynagh
d6f8342431
Kotlin: Write the log file as Line-delimited JSON
2022-05-20 12:07:35 +01:00
Ian Lynagh
b5ad6f9c04
Kotlin: Add a LogMessage class
2022-05-20 12:07:35 +01:00
Ian Lynagh
d900c3d994
Merge pull request #9221 from smowton/smowton/admin/handle-missing-kotlinc-gracefully
...
Kotlin: Handle missing kotlinc gracefully
2022-05-20 12:06:06 +01:00
Erik Krogh Kristensen
204e01fc24
change getNumArgument to only count positional arguments
2022-05-20 12:43:06 +02:00
Ian Lynagh
d2cb1aa89c
Merge pull request #9218 from igfoo/igfoo/geninst
...
Kotlin: Avoid "generic specialisation" label collisions
2022-05-20 11:42:22 +01:00
Ian Lynagh
9844ae703e
Merge pull request #9219 from igfoo/igfoo/livelits
...
Improve LiveLiterals
2022-05-20 11:42:16 +01:00
Anders Schack-Mulligen
8beef45599
Merge pull request #9195 from aschackmull/java/perf-local-flow
...
Java: Performance fixes for local flow relation
2022-05-20 12:38:02 +02:00
Tony Torralba
775b53b7b4
Fix test to correctly highlight lack of flow from field init
2022-05-20 12:36:10 +02:00
Paolo Tranquilli
09967bfd42
Swift: add comment about CRTP
2022-05-20 12:35:58 +02:00
Paolo Tranquilli
f5b2c31a3c
Swift: rename DispatcherWrapper to VisitorBase
2022-05-20 12:25:45 +02:00
Paolo Tranquilli
da00bf99a1
Swift: move TBD code to ql
...
This allows to avoid bypassing label type correcness in the extractor,
and allows to independently resolve TBD extractions, as with this
approach TBD nodes do have the correctly typed trap label. The TBD
status is now a predicate on the QL side.
This requires:
* a default visit using the correct type, which is achieved via macro
metaprogramming in `VisitorBase.h`, following the way
`swift::ASTVisitor` is programmed
* a mapping from labels to corresponding binding trap entries. The
functor is defined in `TrapTagTraits.h` and instantiated in generated
`TrapEntries.h`
* Binding trap entries for TBD unknown entities must not have any other
field than the `id` (after all, we are supposed to not extract them
yet). This is why all unextracted fields in `schema.yml` have been
commented out, and will be uncommentend when visitors are added
2022-05-20 09:52:27 +02:00
Michael Nebel
20af134ff0
Merge pull request #9210 from michaelnebel/dataflow/summarizedcallablerefactor
...
DataFlow - SummarizedCallable refactor
2022-05-20 09:32:30 +02:00
Tamás Vajk
3407b0f055
Merge pull request #9152 from tamasvajk/kotlin-fix-parcelize-reflection-1
...
Kotlin: Fix extraction of reflective call generated by Parcelize
2022-05-20 09:06:21 +02:00
Chris Smowton
d9f65fe34f
Handle missing kotlinc gracefully
2022-05-19 21:54:18 +01:00
Chris Smowton
e80254b0a6
Fix generated implementation of an inherited single abstract method
...
For example, UnaryOperator<T> extends Function<T, T> without overriding / defining its own `apply` method.
2022-05-19 20:57:54 +01:00
Erik Krogh Kristensen
a5b11e88b4
update doc to make it clear that moduleImport(..) does not refer to PyPI names
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-05-19 20:00:43 +02:00
Ian Lynagh
f918b2e763
Merge pull request #9217 from igfoo/igfoo/tweak_logging
...
Kotlin: Tweak logging
2022-05-19 18:31:40 +01:00
Tony Torralba
5498f41248
Apply code review suggestion to increase precision in getValue
2022-05-19 17:35:34 +01:00
Tony Torralba
bc84ff2031
Improve docs of LiveLiteral
...
Also remove transitive closure from calls
2022-05-19 17:35:27 +01:00
Ian Lynagh
e153f30c01
Kotlin: Avoid "generic specialisation" label collisions
...
We had a global set of labels for generic specialisations that we'd
extracted, but these labels could contain references to other labels,
and thus you can get false collisions between labels for different TRAP
files. We now only keep the set for a single TRAP file, and live with
the extra TRAP duplication that we get from that.
2022-05-19 17:29:41 +01:00
Ian Lynagh
9e3cde001a
Kotlin: Tweak logging
...
Makes it easier to filter out the peak memory info
2022-05-19 16:59:52 +01:00
Chris Smowton
01aaa6ccbf
Merge pull request #9123 from smowton/smowton/fix/type-variable-in-scope-consistency
...
Kotlin: fix cases where type variables were used out of scope
2022-05-19 16:57:41 +01:00
Alex Ford
6b7abef405
Ruby: remove unnecessary CryptographicOperation#isWeak override
2022-05-19 16:01:34 +01:00
Alex Ford
8b7bb7c358
Ruby: add missing qldoc
2022-05-19 15:55:48 +01:00
Alex Ford
fb53fc5373
Javascript: add missing import in ConceptsImports.qll
2022-05-19 15:51:25 +01:00
Alex Ford
d3662cf54a
Deprecate CryptographicOperation#isWeak and add a default implementation
2022-05-19 15:46:13 +01:00
Alex Ford
3d66905dc6
Share the CryptographicOperation and BlockMode concepts between dynamic langs
2022-05-19 15:46:03 +01:00
Rasmus Wriedt Larsen
5d6fbcec64
Ruby: Autoformat
2022-05-19 16:30:12 +02:00
Rasmus Wriedt Larsen
e810ba4ef6
Ruby: Expand flowToAnyArg test
2022-05-19 16:27:04 +02:00
Tom Hvitved
3ebd4af24e
C#: Fix another test
2022-05-19 16:23:31 +02:00
Alex Ford
f8576fb05b
Python: avoid missing cryptography uses due to unhandled encryption modes
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-05-19 15:22:49 +01:00
Chris Smowton
c9232c075c
Autoformat
2022-05-19 15:18:10 +01:00
Rasmus Wriedt Larsen
0879b6ae12
Ruby: Fix Argument[any,any-named] handling for path component in MaD
2022-05-19 15:51:30 +02:00
Rasmus Wriedt Larsen
7784b9f879
Ruby: WIP: Make Argument[any] and any-named work
...
It's not fully working I think the problem is that the code below ties
up `Argument[x]` with parameter positions, and `Parameter[x]` with
argument positions. This flip might be correct for flow-summaries, but
it does NOT seem to be correct for the `path` component in MaD.
Specifically, quick-eval for ParameterPosition does NOT include `keyword key` while
quick-eval for ArgumentPosition DOES include `keyword key`!
For the test `Foo.sinkAnyNamedArg(key: tainted) # $ MISSING: hasValueFlow=tainted`
c8be8d30b3/ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModelsSpecific.qll (L130-L133)
2022-05-19 15:51:25 +02:00
Stephan Brandauer
67697e1066
update meta information and release note for typescript 4.7 upgrade
2022-05-19 15:45:27 +02:00
Stephan Brandauer
0f3448dc24
update tests for typescript 4.7
2022-05-19 15:45:19 +02:00
Rasmus Wriedt Larsen
df83a51e1e
Ruby: Add anyNamedArg summary test
2022-05-19 15:42:41 +02:00
Rasmus Wriedt Larsen
cb6e5c24fc
Ruby: Prepare for anyNamedArg summary test
2022-05-19 15:42:41 +02:00
Rasmus Wriedt Larsen
a7f627af0c
Ruby: Add test for Argument[any] and any-named
2022-05-19 15:42:41 +02:00
Rasmus Wriedt Larsen
cb5ad8b775
Ruby: Don't include Argument[self] in Argument[any]
...
For flow-sumamries
2022-05-19 15:42:41 +02:00
Tom Hvitved
909ad2a61a
Address review comment
2022-05-19 15:37:18 +02:00
Alex Ford
9e483ac4e0
Fix change note formatting
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-05-19 14:25:44 +01:00
Tom Hvitved
f83deb6571
Data flow: Sync files
2022-05-19 15:20:43 +02:00
Tom Hvitved
a18aef23f9
Data flow: Do not discard call context when computing reverse lambda flow through jumps
2022-05-19 15:19:41 +02:00
Tom Hvitved
ea703bc49a
Ruby: Add test that illustrates false negative lambda flow
2022-05-19 15:19:34 +02:00
Ian Lynagh
d18e03cf9a
Merge pull request #9212 from igfoo/igfoo/kotlin_mem
...
Kotlin: Log peak memory usge before and after extractor
2022-05-19 14:01:07 +01:00
Ian Lynagh
e319ab1b70
Kotlin: Format a query
2022-05-19 13:56:04 +01:00
Chris Smowton
1039e29b90
Adjust test result
2022-05-19 13:42:28 +01:00
Michael Nebel
575b8376f3
C#: Update Flow summaries QL test code based on refactor.
2022-05-19 14:41:24 +02:00
Chris Smowton
4f08981586
Expand warning message to note that there are known Java extractor bugs relating to this query
2022-05-19 13:37:18 +01:00
Ian Lynagh
9b40724dcb
Kotlin: Log peak memory usge before and after extractor
...
Ideally this would be in a more JSON-friendly format, and also in the
database, but this at least makes the information available.
2022-05-19 13:36:11 +01:00
Rasmus Wriedt Larsen
051754cf7e
Ruby: Add test of what Argument[any] for input/output includes
...
and an explicit test of what `Argument[self]` includes.
2022-05-19 14:02:22 +02:00
AlexDenisov
480c6b985b
Merge pull request #9211 from github/redsun82/swift-no-pip-install
...
remove `pip install` mention from README.md
2022-05-19 13:55:14 +02:00
Tom Hvitved
0a52420581
C#: Add ContentDataFlow test
2022-05-19 13:28:56 +02:00
Tom Hvitved
2b2ac06128
Data flow: Sync files
2022-05-19 13:28:56 +02:00
Tom Hvitved
bd9b6567c7
Data flow: Introduce ContentDataFlow.qll
2022-05-19 13:28:56 +02:00
Michael Nebel
ff1e6637ac
C#: Fix issue with summaryElement predicate.
2022-05-19 13:06:24 +02:00
Chris Smowton
e722c99218
Autoformat
2022-05-19 11:55:31 +01:00
Chris Smowton
4f54bb66b8
Accept consistency check failure
...
The Java extractor assigns a type with unbound type variables to the result of ImmutableSortedMap.of calls.
2022-05-19 11:55:31 +01:00
Chris Smowton
ea9aa59627
Add test
2022-05-19 11:55:31 +01:00
Chris Smowton
8a90ddefbb
Accept test changes
...
These are mainly moving the source locations and type specialisations in SAM-converted methods.
2022-05-19 11:55:31 +01:00
Chris Smowton
ada31f3075
Distinguish result type parameter names
...
This makes debugging a little easier.
2022-05-19 11:55:31 +01:00
Chris Smowton
49c9c36daf
Type-variable-in-scope consistency query: account for all enclosing elements that declare type parameters.
2022-05-19 11:55:31 +01:00
Chris Smowton
4e15f5f8c7
Fix extracted type arguments of kotlin.jvm.functions.FunctionN
...
Previously we accidentally extracted an argument type instead of the result type.
2022-05-19 11:55:31 +01:00
Chris Smowton
102cdcdab8
Fix type substitution and source locations in SAM-converted generic interface implementations
...
For example, in implementing Producer<T> by an actual lambda of type () -> Int, the return type should be Int, not T. This produced type-variable-out-of-scope consistency check failures.
2022-05-19 11:55:31 +01:00
Chris Smowton
048a530aac
Type parameter scoping check: distinguish type arguments from type parameters
...
I had forgotten that the Java QL lib regards a ParameterizedType as either an instantiation Generic<String>, or the unbound declaration Generic<T>.
2022-05-19 11:55:31 +01:00
Chris Smowton
b09b769932
Extract type parameters without substituting their parent functions
...
Otherwise references to type variables declared on kotlin.Xyz.someFunction can refer to its Java equivalent java.Xyz.someFunction if it has one.
2022-05-19 11:55:31 +01:00
Chris Smowton
d291e0cf10
Fix typeParametersInScope consistency query
...
The selection of type variables mentioned in a particular class previously didn't work as intended, so the consistency query would always pass.
2022-05-19 11:55:31 +01:00
Paolo Tranquilli
b66f1b27b0
remove pip install mention from README.md
...
It is not needed any more since pip requirements were coded in bazel.
2022-05-19 12:47:20 +02:00
Anders Schack-Mulligen
651d9d0a44
Java: Ensure cached predicates are in the same stage.
2022-05-19 11:39:41 +02:00
Michael Nebel
22b9ef2e7b
Java: Adapt ExternalApi to refactor.
2022-05-19 11:30:36 +02:00
Anders Schack-Mulligen
0e830f6052
C#/Ruby/Java: Fix pragmas.
2022-05-19 11:26:38 +02:00
Michael Nebel
94a72ec051
Java: Refactor SummarizedCallable.
2022-05-19 11:10:58 +02:00
Michael Nebel
73802cbd6d
Ruby: Refactor SummarizedCallable.
2022-05-19 11:04:18 +02:00
Michael Nebel
be79f20ef1
C#: Refactor SummarizedCallable.
2022-05-19 11:03:50 +02:00
Stephan Brandauer
b928ca518f
update dependency version to 4.7.1-rc
2022-05-19 10:47:08 +02:00
Erik Krogh Kristensen
fff70da650
Merge pull request #9182 from erik-krogh/useStringComp
...
use string equality instead of regexps to compare constant strings
2022-05-19 10:42:37 +02:00
Tom Hvitved
eef5022e3d
Merge pull request #9014 from michaelnebel/csharp/dataflowcallablerefactor
...
C#: Dataflow callable refactoring.
2022-05-19 09:02:38 +02:00
Erik Krogh Kristensen
215a6a72cc
Merge branch 'main' into useStringComp
2022-05-18 10:55:31 +02:00
Rasmus Wriedt Larsen
6611e5b4b8
Merge branch 'main' into promote-pam
2022-05-18 10:35:39 +02:00
Anders Schack-Mulligen
a4dac9fd2b
Merge pull request #9201 from Marcono1234/marcono1234/NumericType-type-qll
...
Java: Move `NumericType` to `Type.qll`
2022-05-18 10:31:40 +02:00
Rasmus Wriedt Larsen
b54de13d97
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-05-18 10:30:29 +02:00
Tom Hvitved
209a1e4bd8
Merge pull request #9202 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-05-18 10:26:55 +02:00
Tom Hvitved
5e57e82997
Merge pull request #9191 from hvitved/ruby/taint-tracking-stage
...
Ruby: Force cached taint tracking predicates to be evaluated in data flow stage
2022-05-18 09:54:38 +02:00
Anders Schack-Mulligen
af7df79289
Autoformat
2022-05-18 09:38:11 +02:00
Anders Schack-Mulligen
a4a004a322
Java: Simplify recursion prevention.
2022-05-18 09:27:55 +02:00
Anders Schack-Mulligen
d4c9fddae3
Java: Use fastTC.
2022-05-18 09:27:54 +02:00
Anders Schack-Mulligen
48ab5b2403
C#/Ruby/Java: Fix references.
2022-05-18 09:27:54 +02:00
Anders Schack-Mulligen
829eb7f7a5
C#/Ruby: Sync FlowSummaryImpl.
2022-05-18 09:27:48 +02:00
Anders Schack-Mulligen
25fda206b2
Java: Prevent accidental recursion through AdditionalValueStep.
2022-05-18 09:25:23 +02:00
Anders Schack-Mulligen
1d3b3204df
Merge pull request #9190 from hvitved/dataflow/summary-arg-param-no-materialize
...
Data flow: Do not materialize `summaryArgParam`
2022-05-18 09:17:57 +02:00
Erik Krogh Kristensen
7245591468
Merge pull request #7763 from erik-krogh/unused-field
...
QL: add unused-field query
2022-05-18 09:15:16 +02:00
Tom Hvitved
23ee033a57
C#: Review fixes
2022-05-18 07:48:21 +02:00
Michael Nebel
df6d86b9aa
C#: Use getUnderlyingCallable instead of asCallable.
2022-05-18 07:48:21 +02:00
Michael Nebel
6f7af11517
C#: Needs to be updated as SummaryParameterNodes are printed slightly different.
2022-05-18 07:48:21 +02:00
Michael Nebel
b41bb3fe08
C#: System.Web.HttpResponse.Write is now considered safe (known) and will this not show up as untrusted external API.
2022-05-18 07:48:21 +02:00
Michael Nebel
97c6d7884d
C#: Source and Sink models are now also considered summarized callables and thus considered safe as they are known external APIs.
2022-05-18 07:48:21 +02:00
Michael Nebel
aeadad62be
C#: Improve implementation.
2022-05-18 07:48:21 +02:00
Michael Nebel
26e2cad528
C#: Improve getCallable.
2022-05-18 07:48:21 +02:00
Michael Nebel
f78def5316
C#: Hide SummaryParamterNodes from path explanations.
2022-05-18 07:48:21 +02:00
Michael Nebel
220526f305
C#: Fix issues with summarized callables parameter types and other casting issues.
2022-05-18 07:48:21 +02:00
Michael Nebel
2c414b2201
C#: Add Summary parameter nodes.
2022-05-18 07:48:21 +02:00
Michael Nebel
0e3fc464a3
C#: Use SummarizedCallable external instead of the internal.
2022-05-18 07:48:20 +02:00
Michael Nebel
b578fcb069
C#: Use the external SummarizedCallable implementation.
2022-05-18 07:48:20 +02:00
Michael Nebel
4f7297715d
C#: Also extract callable from FlowSummary SummarizedCallable in DataFlowCallable.
2022-05-18 07:48:20 +02:00
Michael Nebel
3fa990a984
C#: Make sure that all callables with a summary are added to the external SummarizedCallable class.
2022-05-18 07:48:20 +02:00
Michael Nebel
4810419dfd
C#: Extend SummarizedCallable from FlowSummaryImpl.
2022-05-18 07:48:20 +02:00
Michael Nebel
eb022118f3
C#: Fix issue in ExternalApi.
2022-05-18 07:48:20 +02:00
Michael Nebel
68055bc022
C#: Update flow summaries test code.
2022-05-18 07:48:20 +02:00
Michael Nebel
c8a7354086
C#: Refactor to align implementation between languages.
2022-05-18 07:48:20 +02:00
Michael Nebel
0d61a2c797
C#: Add QL doc to SummarizedCallable.
2022-05-18 07:48:20 +02:00
Michael Nebel
2f2ca18898
C#: Update dependencies.
2022-05-18 07:48:20 +02:00
Michael Nebel
e70a283cfd
C#: Initial refactor of SummarizedCallable and DataFlowCallable (dependencies needs to be updates).
2022-05-18 07:48:19 +02:00
github-actions[bot]
91694b4bac
Add changed framework coverage reports
2022-05-18 00:15:25 +00:00
Marcono1234
c53d315697
Java: Move NumericType to Type.qll
2022-05-18 01:40:17 +02:00
Cornelius Riemenschneider
415c3d1c72
Merge pull request #740 from github/criemen/lua-tracing-config
...
Update Lua tracing config.
2022-05-18 01:03:16 +02:00
Cornelius Riemenschneider
d352253b02
Merge pull request #9187 from github/criemen/lua-tracing-configs
...
Update Lua tracing configs.
2022-05-18 01:03:15 +02:00
Erik Krogh Kristensen
d5f0446940
exclude self parameter from the API-graph edge for keywordParameter
2022-05-17 22:34:38 +02:00
Taus
b2fe615ef2
Python: Modernise weak file permissions query
...
Using API graphs instead of points-to.
Unfortunately, some results will be lost because of this, due to the
fact that points-to tracks bitwise operations on small numbers (i.e.
flags), whereas API graphs does no such thing. This means using
something like `stat.S_IWUSR | stat.S_IWGRP` will not work.
A custom type tracker (like the one used for `re` flags) could be used
to recapture this behaviour, but I think that's best left as future
work, as it's not clear to me that this query is actually worth the
effort it would take to implement this.
2022-05-17 20:20:15 +00:00
Mathias Vorreiter Pedersen
5d625d6156
Merge pull request #9188 from MathiasVP/fix-GetAPrimaryQlClassConsistency-for-swift
2022-05-17 20:47:24 +01:00
Erik Krogh Kristensen
6c7c9b6a4b
Merge pull request #9082 from erik-krogh/countZero
...
QL: add query warning about `count(...) = 0`.
2022-05-17 21:46:58 +02:00
Mathias Vorreiter Pedersen
a6ac14f4de
QL: Allow class + 'Base' in 'ql/primary-ql-class-consistency'.
2022-05-17 16:54:12 +01:00
Paolo Tranquilli
3a46db3f81
Swift: make C++ code generation more self-contained
...
This is solving a papercut, where the C++ build was relying on the
local dbscheme file to be up-to-date, even if all the information for
building is actually in `schema.yml`. This made a pure C++ development
cycle with changes to `schema.yml` clumsy, as it required a further
dbscheme generation step.
Now for C++ the dbscheme is generated internally in the build files, and
thus a change in `schema.yml` is reflected immediately in the C++ build.
A `swift/codegen` step for checked in generated code (including the
dbscheme) is still required, but a developer can do it just before
running QL tests or committing, instead of during each C++
recompilation.
Some directory reorganization was also carried out, moving specific
generator modules to a new `generators` python package, and only leaving
the two drivers at the top level.
2022-05-17 17:05:16 +02:00
Paolo Tranquilli
fbe7c5be81
Swift: move TBD code to ql
...
This allows to avoid bypassing label type correcness in the extractor,
and allows to independently resolve TBD extractions, as with this
approach TBD nodes do have the correctly typed trap label. The TBD
status is now a predicate on the QL side.
This requires:
* a default visit using the correct type, which is achieved via macro
metaprogramming in `VisitorBase.h`, following the way
`swift::ASTVisitor` is programmed
* a mapping from labels to corresponding binding trap entries. The
functor is defined in `TrapTagTraits.h` and instantiated in generated
`TrapEntries.h`
* Binding trap entries for TBD unknown entities must not have any other
field than the `id` (after all, we are supposed to not extract them
yet). This is why all unextracted fields in `schema.yml` have been
commented out, and will be uncommentend when visitors are added
2022-05-17 16:31:10 +02:00
Alex Ford
4bb6d1db3a
Add missing qldoc
2022-05-17 15:01:28 +01:00
Alex Ford
f92782d4e7
Ruby: fix some cases where we assume that a CryptographicOperation is using CBC when it is not
2022-05-17 14:57:11 +01:00
Alex Ford
c620fceb82
Ruby: remove unnecessary line from test
2022-05-17 14:57:11 +01:00
Alex Ford
6b496c78ef
Ruby: failing crypto op test
2022-05-17 14:57:11 +01:00
Tony Torralba
53f32f5a97
Merge pull request #9186 from atorralba/atorralba/kotlin-inline-expectations-tests
...
Kotlin: Add support for InlineExpectationsTest
2022-05-17 15:28:03 +02:00
Cornelius Riemenschneider
3b4d04dcc4
Update Lua tracing config.
2022-05-17 13:18:56 +00:00
Cornelius Riemenschneider
3836d1550a
Update Lua tracing configs.
2022-05-17 13:18:28 +00:00
Taus
ea32299ab0
Python: Use API-graph flow for boolean tracking
...
Introduces a false positive, but arguably that false positive should
have been there with the local flow as well.
2022-05-17 13:14:55 +00:00
Erik Krogh Kristensen
86e97c32d6
fix all ql/use-string-compare
2022-05-17 14:11:05 +02:00
Taus
ba8d73c2be
Python: Use API::CallNode
2022-05-17 12:00:17 +00:00
Geoffrey White
629e90f14b
Merge pull request #9176 from geoffw0/xxe9
...
C++: Clean up the XXE query QL.
2022-05-17 12:40:39 +01:00
Erik Krogh Kristensen
440e6214f0
CPP: correctly escape underscores in calls to .matches()
2022-05-17 13:21:02 +02:00
Erik Krogh Kristensen
e32a04fc06
QL: add use-string-compare query
2022-05-17 13:20:49 +02:00
Tony Torralba
dbf249b199
Accept only EOL comments as Kotlin expectation comments
2022-05-17 13:05:51 +02:00
Tom Hvitved
f1f96b7e5c
Ruby: Force cached taint tracking predicates to be evaluated in data flow stage
2022-05-17 12:54:26 +02:00
Tom Hvitved
284357d2a0
Data flow: Do not materialize summaryArgParam
2022-05-17 12:50:01 +02:00
Erik Krogh Kristensen
03da62713c
fix typo identified by QL-for-QL
2022-05-17 12:32:40 +02:00
Erik Krogh Kristensen
bb289e29b9
sync typo fix to JS/RB
2022-05-17 12:26:31 +02:00
Erik Krogh Kristensen
818975dc56
sync upstream typo fixes
2022-05-17 12:25:52 +02:00
Erik Krogh Kristensen
5d1c41c269
Merge branch 'main' into pyMaD
2022-05-17 12:23:03 +02:00
Erik Krogh Kristensen
2868eb61ea
add test for Parameter[any] and Parameter[any-named]
2022-05-17 12:08:53 +02:00
Geoffrey White
246093d375
C++: Move the two implementation imports.
2022-05-17 11:03:21 +01:00
Arthur Baars
fcb3b82bde
Merge pull request #9178 from aibaars/update-tree-sitter-ruby
...
Ruby: update tree-sitter-ruby
2022-05-17 11:47:41 +02:00
Erik Krogh Kristensen
f273ccf73b
add explicit test of what Parameter[0] matches
2022-05-17 11:17:15 +02:00
Erik Krogh Kristensen
ce21d7e5a8
use test-sink for sinks in the MaD test
2022-05-17 11:13:59 +02:00
Erik Krogh Kristensen
aef592fec8
make a more realistic test for self-parameter
2022-05-17 11:13:35 +02:00
Mathias Vorreiter Pedersen
1280d43e36
Merge pull request #9141 from github/post-release-prep/codeql-cli-2.9.2
...
Post-release preparation for codeql-cli-2.9.2
2022-05-17 10:01:37 +01:00
Mathias Vorreiter Pedersen
0b0161f261
Merge pull request #737 from github/post-release-prep/codeql-cli-2.9.2
...
Post-release preparation for codeql-cli-2.9.2
2022-05-17 10:01:21 +01:00
Tony Torralba
2b6d7bb3d8
Add support for InlineExpectationsTest to Kotlin
2022-05-17 10:55:00 +02:00
Tamás Vajk
3b07fe70a1
Merge pull request #9174 from tamasvajk/kotlin-fix-isUnspecialised
...
Kotlin: Fix parent class lookup from field initializers in `isUnspecialised`
2022-05-17 10:48:52 +02:00
Erik Krogh Kristensen
55ffdb4aa1
make most imports in ApiGraphModelsSpecific.qll private
2022-05-17 10:34:17 +02:00
Erik Krogh Kristensen
1f8e7c39f4
fix typo in comment
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-05-17 10:32:31 +02:00
Erik Krogh Kristensen
7abb7552a7
Merge pull request #9184 from erik-krogh/actionInjection
...
JS: change @id from js/actions/injection to js/actions/command-injection
2022-05-17 10:24:51 +02:00
Anders Schack-Mulligen
4f5ccfd76c
Merge pull request #9181 from Marcono1234/marcono1234/FloatingPointLiteral-rename
...
Java: Rename `FloatingPointLiteral` to `FloatLiteral`
2022-05-17 10:08:49 +02:00
Tom Hvitved
f2e28c311a
Merge pull request #9180 from hvitved/csharp/entity-framework-sql-sinks
...
C#: Add missing EntityFramework SQL sinks
2022-05-17 09:50:49 +02:00
Erik Krogh Kristensen
2550988006
change @id from js/actions/injection to js/actions/command-injection
2022-05-17 09:25:05 +02:00
Tamás Vajk
350d137b2e
Merge pull request #9145 from tamasvajk/kotlin-useless-param
...
Kotlin: Respect `override` modifier in useless parameter query
2022-05-17 08:43:59 +02:00
Tamás Vajk
fcb3d78eae
Merge pull request #9146 from tamasvajk/kotlin-inner-class-static
...
Kotlin: exclude Kotlin source from 'inner class could be static' check
2022-05-17 08:43:39 +02:00
Tamás Vajk
26553cefc5
Merge pull request #9149 from tamasvajk/kotlin-maybe-null
...
Kotlin: Exclude operands of `NotNullExpr` from NullMaybe query
2022-05-17 08:43:24 +02:00
Tamás Vajk
d8c22901c9
Merge pull request #9150 from tamasvajk/kotlin-MissingInstanceofInEquals
...
Kotlin: Add more type check casts to MissingInstanceofInEquals query
2022-05-17 08:43:06 +02:00
Marcono1234
4e1a73f4d9
Java: Rename FloatingPointLiteral to FloatLiteral
...
"Floating point" refers to both `double` and `float`, and is also used by
the JLS in this way. Therefore the old CodeQL class name for `float` literals
was misleading.
2022-05-16 22:06:04 +02:00
Tom Hvitved
15449b701f
C#: Add missing EntityFramework SQL sinks
2022-05-16 20:57:40 +02:00
Arthur Baars
05dce09037
Ruby: update tree-sitter-ruby
2022-05-16 19:08:46 +02:00
ihsinme
1a375ec653
Update cpp/ql/src/experimental/Security/CWE/CWE-670/DangerousUseSSL_shutdown.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-05-16 19:55:33 +03:00
Geoffrey White
cf932eb21c
C++: Repair typo fix from main.
2022-05-16 16:46:14 +01:00
Geoffrey White
7b1cd70300
Merge branch 'main' into xxe9
2022-05-16 16:45:24 +01:00
Nick Rolfe
c518150b49
Merge pull request #9132 from github/nickrolfe/misspelling
...
QL for QL: generalise non-US spelling query
2022-05-16 16:03:36 +01:00
Alex Ford
0cc0494586
codeql format
2022-05-16 15:54:31 +01:00
Alex Ford
bda1c21562
BrokenCryptoAlgorithm block mode change notes
2022-05-16 15:49:19 +01:00
Paolo Tranquilli
9abb3f0066
Merge pull request #9172 from github/redsun82/swift-variant-in-label-store
...
Swift: replace `getCanonicalPointer` with `std::variant`
2022-05-16 16:21:47 +02:00
Paolo Tranquilli
16e3b5bfc4
Swift: make monostate explicit
2022-05-16 15:51:43 +02:00
Erik Krogh Kristensen
23981cb323
Merge pull request #7626 from erik-krogh/CWE-377
...
JS: add query for detecting insecure temporary files
2022-05-16 15:25:17 +02:00
Tamas Vajk
d4cf877259
Rework parent lookup in isUnspecialised
2022-05-16 14:59:28 +02:00
Geoffrey White
9f3fa1c45d
C++: Consistent QLDoc.
2022-05-16 13:48:57 +01:00
Geoffrey White
b4a840e3ef
C++: Make the checks happy.
2022-05-16 13:36:41 +01:00
Geoffrey White
9976825234
C++: Slightly more logical layout.
2022-05-16 12:51:04 +01:00
Geoffrey White
19d1578733
C++: Clean up.
2022-05-16 12:49:01 +01:00
Geoffrey White
b332659fcb
C++: Split the XXE query into library files.
2022-05-16 12:41:41 +01:00
Geoffrey White
0ffd0b23ca
C++: Create an XmlLibrary class to clean up the code in XXE.ql.
2022-05-16 12:17:20 +01:00
Tamas Vajk
8ebdaf1fc2
Kotlin: Fix parent class lookup from field initializers
2022-05-16 12:14:28 +02:00
Tamas Vajk
de133e80a9
Kotlin: add diagnostic test for 'Unexpected specialised instance of generic anonymous class'
2022-05-16 12:13:33 +02:00
yoff
dac1b6867a
python: Avoid abstract class in public interface
...
use construction from Ruby with `ParameterNodeImpl`
2022-05-16 09:12:06 +00:00
Tom Hvitved
a9f6d203cd
Merge pull request #8971 from aibaars/safe-nagivation
...
Ruby: add safe navigation operator
2022-05-16 10:53:56 +02:00
Tamas Vajk
47ec38c35a
Kotlin: Exclude Kotlin files altogether from NullMaybe query
2022-05-16 10:52:20 +02:00
Mathias Vorreiter Pedersen
cee7aed81f
Merge pull request #9142 from geoffw0/xxe8
...
C++: Fixes some typos and increases the XXE query precision.
2022-05-16 09:45:33 +01:00
yoff
a7a646960d
python: sync other file
2022-05-16 08:15:16 +00:00
yoff
5794e64940
python: sync file
2022-05-16 08:12:25 +00:00
yoff
2822ed9594
Merge remote-tracking branch 'upstream/main' into python-dataflow/flow-summaries-from-scratch
2022-05-16 08:10:15 +00:00
Anders Schack-Mulligen
83f817ca45
Merge pull request #9134 from aschackmull/dataflow/perf-std-order
...
Dataflow: Improve standard order through easier type check elimination.
2022-05-16 10:05:17 +02:00
Paolo Tranquilli
1b9dcac2dd
Swift: replace getCanonicalPointer with std::variant
...
This turned out easier than expected previously. `llvm::PointerUnion`
was also considered, which would have less memory footprint, but it
would require more effort as it is lacking the same implicit conversions
and operators that `std::variant` provides.
Also renamed `ToTag<E>` to `TrapTagOf<E>` and introduced a derived
convenience functor `TrapLabelOf<E>`.
2022-05-16 09:59:36 +02:00
Tamás Vajk
f7d2b2767c
Merge pull request #9151 from tamasvajk/kotlin-comments-variables-1
...
Kotlin: Handle variables as comment owners
2022-05-16 09:32:19 +02:00
Tony Torralba
616b12d011
Merge pull request #8956 from atorralba/atorralba/intent-redirection-sanitizer-fix
...
Java: Fix Intent Redirection sanitizer
2022-05-16 09:21:04 +02:00
thibaut hansmann
e150a39fa0
C/C++ : fix name of cpp file + fix autoformat
2022-05-15 14:27:46 +02:00
ihsinme
f6ab338a16
Update DangerousUseSSL_shutdown.qhelp
2022-05-15 12:26:05 +03:00
Chris Smowton
ae83190629
Merge pull request #9164 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-05-14 08:44:37 +01:00
github-actions[bot]
1d39726604
Add changed framework coverage reports
2022-05-14 00:19:04 +00:00
Alex Ford
66736ebd9d
sync CryptoAlgorithmNames.qll (remove isWeakBlockMode predicate)
2022-05-13 21:26:01 +01:00
Chris Smowton
77461f7ad6
Merge pull request #730 from owen-mc/bugfix/build/go-mod-tidy
...
Run `go mod tidy -e` before building
2022-05-13 19:40:05 +01:00
Chris Smowton
32e294955a
Merge pull request #734 from cokeBeer/main
...
fix https://github.com/github/codeql/issues/9097
2022-05-13 19:38:55 +01:00
Chris Smowton
07c2f6e514
Merge pull request #9155 from smowton/smowton/fix/field-initializer-flow
...
Kotlin: Fix initializer field flow by extracting field finality
2022-05-13 18:41:55 +01:00
Chris Smowton
305ddb2169
Accept test changes
2022-05-13 17:44:26 +01:00
Chris Smowton
fbdd5a13c5
Autoformat
2022-05-13 17:40:58 +01:00
Chris Smowton
c76a774e35
Accept test changes
2022-05-13 17:40:58 +01:00
Chris Smowton
498d3700bd
Update java/ql/test/kotlin/library-tests/field-initializer-flow/test.ql
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-05-13 17:40:58 +01:00
Chris Smowton
81baca2c17
Fix initializer field flow by extracting field finality
2022-05-13 17:40:58 +01:00
Chris Smowton
2930bd4cc2
Only attempt go.mod updating if go >= 1.16
...
Prior to this (a) Go will attempt to update go.mod/sum anyhow, and (b) the `mod tidy -e` option isn't available.
2022-05-13 17:32:00 +01:00
AlexDenisov
eacb9f1dba
Merge pull request #9144 from github/alexdenisov/introduce-visitors
...
Swift: Introduce visitors
2022-05-13 17:57:47 +02:00
cokeBeer
7f21c0c3b7
fix format
2022-05-13 23:36:50 +08:00
Alex Ford
bc073eb460
python: update py/weak-cryptographic-algorithm to flag use of ECB block mode
2022-05-13 16:32:36 +01:00
Alex Ford
da135448a2
python: update tests for CryptographicOperation#getBlockMode
2022-05-13 16:32:36 +01:00
Alex Ford
9f2c59cd6d
python: implement getBlockMode for CryptographicOperations
2022-05-13 16:32:36 +01:00
Alex Ford
03e34e071a
ruby: inline expectations tests for CryptographicOperation concept
2022-05-13 16:32:36 +01:00
Alex Ford
4752c45fe5
ruby: update rb/weak-cryptographic-algorithm to specify the block mode if appropriate
2022-05-13 16:32:30 +01:00
Ian Lynagh
7ef9a19085
Merge pull request #9131 from github/igfoo/capture_output
...
Kotlin: Don't use capture_output or text
2022-05-13 15:59:14 +01:00
Tony Torralba
168a184602
Merge pull request #9127 from atorralba/atorralba/sensitive-info-log-improvs
...
Java: Sensitive Info Log query improvements
2022-05-13 16:57:32 +02:00
Alex Denisov
1b75034634
Swift: simplify CRTP monkey-patching
2022-05-13 16:54:15 +02:00
Alex Denisov
f857cd11c4
Swift: add comments about SwiftDispatcher lifetime
2022-05-13 16:47:45 +02:00
Ian Lynagh
153fd3a221
Kotlin: Fix diagnostics test
2022-05-13 15:36:30 +01:00
Ian Lynagh
98b0463e09
Kotlin: Accept test output
2022-05-13 15:36:30 +01:00
Ian Lynagh
b94597568a
Kotlin: Write the log file as Line-delimited JSON
2022-05-13 15:36:30 +01:00
Ian Lynagh
3ae5e1a5f7
Kotlin: Add a LogMessage class
2022-05-13 15:36:30 +01:00
Alex Ford
46bb247da9
ruby: add BlockMode concept
2022-05-13 15:33:20 +01:00
Alex Denisov
acbe9ff9f9
Swift: introduce visitors
2022-05-13 16:26:41 +02:00
AlexDenisov
4e9706470d
Merge pull request #9112 from AlexDenisov/alexdenisov/introduce-dispatcher
...
Swift: introduce dispatcher
2022-05-13 16:26:26 +02:00
Alex Denisov
43199fa723
Swift: clarify getCanonicalPointer
2022-05-13 16:14:16 +02:00
Alex Denisov
35467bc252
Swift: rely on llvm::sys::fs::real_path to get absolute path
2022-05-13 16:13:30 +02:00
cokeBeer
aa2d4450ad
add v1modulePath()
2022-05-13 21:24:58 +08:00
cokeBeer
75f2edd220
add v2modulePath()
2022-05-13 21:22:23 +08:00
cokeBeer
808dde2fc1
add v2modulePath()
2022-05-13 21:21:16 +08:00
Alex Denisov
043b1b9c4a
Swift: resolve symlinks
2022-05-13 15:20:30 +02:00
Alex Denisov
d7f4c6fb0b
Swift: add a comment about lifetime
2022-05-13 15:20:30 +02:00
Alex Denisov
c92576690f
Swift: change the return types of getCanonicalPointer
2022-05-13 15:20:30 +02:00
Alex Denisov
2f00945a23
Swift: change the return types of getCanonicalPointer
2022-05-13 15:20:30 +02:00
Alex Denisov
039aaec6b7
Swift: make TrapLabelStore store untyped label internally
2022-05-13 15:20:30 +02:00
Alex Denisov
e584afb895
Swift: fix format
2022-05-13 15:20:30 +02:00
Alex Denisov
7b9f88637e
Swift: describe TrapTagTraits API and implementation
2022-05-13 15:20:30 +02:00
Alex Denisov
efa4565af2
Swift: move generated code to generated directory
2022-05-13 15:20:29 +02:00
Tony Torralba
b9f3b3bd37
Apply code review suggestion
2022-05-13 15:09:06 +02:00
cokeBeer
252b19063e
Merge branch 'github:main' into main
2022-05-13 20:23:24 +08:00
Tamas Vajk
ef08554adb
Fix extraction of reflective call generated by Parcelize
2022-05-13 14:01:37 +02:00
Tamas Vajk
7376ec5d42
Handle variables as comment owners
2022-05-13 13:58:06 +02:00
Tamas Vajk
7d5844a9a4
Kotlin: Add more type check casts to MissingInstanceofInEquals query
2022-05-13 13:52:52 +02:00
Tamas Vajk
e2efef7bd7
Kotlin: Add more type check tests for MissingInstanceofInEquals query
2022-05-13 13:50:59 +02:00
Paolo Tranquilli
f52119dc81
Merge branch 'main' into alexdenisov/introduce-dispatcher
2022-05-13 13:44:01 +02:00
Tamas Vajk
c2a8965c90
Kotlin: Exclude operands of NotNullExpr from NullMaybe query
2022-05-13 13:42:10 +02:00
Tamas Vajk
e5d78687aa
Kotlin: Add test for NullMaybe query
2022-05-13 13:41:25 +02:00
Paolo Tranquilli
d531631a3a
Merge pull request #9147 from github/redsun82/swift-codegen-artifacts
...
Swift: publish C++ generated code as artifacts
2022-05-13 13:36:25 +02:00
Paolo Tranquilli
ccc77fa4a6
Merge branch 'main' into alexdenisov/introduce-dispatcher
2022-05-13 13:23:21 +02:00
Ian Lynagh
624cd41bd5
Merge pull request #9136 from igfoo/igfoo/qldoc
...
Kotlin: QLDoc tweaks from intrigus
2022-05-13 12:17:28 +01:00
Chris Smowton
7daba0bf55
Merge pull request #9122 from smowton/smowton/admin/update-kotlin
...
Kotlin: Apply changes since https://github.com/github/codeql/pull/9109 branched away from kotlin-main
2022-05-13 12:00:03 +01:00
Chris Smowton
e91a51aae6
Merge pull request #9113 from github/smowton/admin/claim-golang-support
...
Claim Go 1.18 support
2022-05-13 11:58:53 +01:00
Paolo Tranquilli
7a8ab7d2f5
Swift: merge generated headers into one artifact
2022-05-13 12:25:48 +02:00
Paolo Tranquilli
8cb9fd7eec
Swift: publish C++ generated code as artifacts
2022-05-13 11:48:27 +02:00
Chris Smowton
211580e608
Merge pull request #738 from hvitved/xml-dbscheme-files-folders
...
Drop redundant columns from `files` and `folders` relations in `xml.dbscheme`
2022-05-13 10:35:45 +01:00
Tamas Vajk
631ba8adcf
Kotlin: exclude Kotlin source from 'inner class could be static' check
2022-05-13 11:20:28 +02:00
Tamas Vajk
cd17e2eb28
Kotlin: add potentially static inner class test
2022-05-13 11:19:29 +02:00
Tamas Vajk
5ce2573cc1
Kotlin: Respect override modifier in useless parameter query
2022-05-13 11:08:35 +02:00
Tamas Vajk
6af4b74528
Kotlin: add useless parameter test for generic override
2022-05-13 11:07:22 +02:00
Tony Torralba
39fd1b48fc
Merge pull request #9143 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-05-13 09:37:29 +02:00
github-actions[bot]
05070fb6c4
Add changed framework coverage reports
2022-05-13 00:19:40 +00:00
Chris Smowton
5ec9390482
Autoformat
2022-05-12 22:37:54 +01:00
Chris Smowton
63dadd88aa
Revert "Identify data classes during extraction"
...
This reverts commit a61ba65c9f2182a578a7f4dbdb1c1657197f16cd, pending
adding a proper upgrade script for the DB change.
2022-05-12 22:37:30 +01:00
Tony Torralba
e3c2656ef1
Update java/ql/lib/semmle/code/java/frameworks/KotlinStdLib.qll
2022-05-12 22:37:06 +01:00
Tamas Vajk
cc92c6517b
Fix labels of extension function parameters
2022-05-12 22:37:06 +01:00
Tamas Vajk
a0f4960e31
Add test case for extension function called from java
2022-05-12 22:37:06 +01:00
Tamas Vajk
ccaafd74f3
Fix declaring type of companion field
2022-05-12 22:37:06 +01:00
Tamas Vajk
a8cf0383cf
Add test for companion field declaring type
2022-05-12 22:37:06 +01:00
Tamas Vajk
8b1a7c845c
Fix return type of <clinit> methods
2022-05-12 22:37:06 +01:00
Tamas Vajk
de003fd122
Add test for return type of <clinit> methods
2022-05-12 22:37:06 +01:00
Tamas Vajk
b0ee557a51
Fix expected test files
2022-05-12 22:37:06 +01:00
Tamas Vajk
59581439dd
Fix colliding property accessor and function names
2022-05-12 22:37:06 +01:00
Tamas Vajk
a51c2c496f
Add test with colliding property accessor and function names
2022-05-12 22:37:06 +01:00
Tamas Vajk
857a74cf14
Adjust class label generation to handle classes in field initializers
2022-05-12 22:37:06 +01:00
Tamas Vajk
394ec56d9d
Add test case for local class declaration in field initializer
2022-05-12 22:37:06 +01:00
Chris Smowton
4ceb2f13c4
Add test
2022-05-12 22:37:06 +01:00
Chris Smowton
2600dcd182
Fix extracting type accesses relating to proprerty getters/setters and SAM-converted methods
...
These should be handled the same as regular methods: extract type accesses for parameters and methods only if we're extracting "from source", i.e. at some point we're descended from extractFileContents.
2022-05-12 22:37:06 +01:00
Chris Smowton
301fa11450
Only extract parameter and method type-accesses once
...
Previously we extracted them whenever something was non-external, but this led to re-extraction when an instance of a generic type defined in source was extracted multiple times.
2022-05-12 22:37:06 +01:00
Chris Smowton
8d970a3cbd
Don't extract private members of instantiated or external classes
...
This is both consistent with the Java extractor's behaviour, and prevents us from trying to refer to anonymous types (e.g. anonymous objects that directly initialize properties) out of scope.
2022-05-12 22:37:06 +01:00
Tamas Vajk
fbae0f5053
Revert dataflow changes, extract actual iterator function
2022-05-12 22:37:06 +01:00
Tamas Vajk
538e05995a
Fix dataflow for kotlin.Array.iterator()
2022-05-12 22:37:03 +01:00
Tamas Vajk
776322bac2
Add foreach dataflow tests
2022-05-12 22:36:28 +01:00
Chris Smowton
7e17074b41
Allow arithmetic functions not mapping to Java equivalents
2022-05-12 22:36:28 +01:00
Chris Smowton
b1849f5f0a
Expand error message
2022-05-12 22:36:28 +01:00
Chris Smowton
22e48ca39a
Accept test changes
2022-05-12 22:36:28 +01:00
Chris Smowton
16af811b69
Allow imprecise matching for Kotlin -> Java method translation
...
This allows the particular case of Collection.toArray(IntFunction<T>) to match, since both Java and Kotlin functions take an IntFunction<T> but they use different function-local type variables.
This would also allow toArray(Array<T>) to work similarly.
2022-05-12 22:36:28 +01:00
Chris Smowton
77056c9bff
Add test expectations
2022-05-12 22:36:28 +01:00
Chris Smowton
71d2e7be3e
Don't replace own callables, and use a more exact replacement-finding test
2022-05-12 22:36:28 +01:00
Chris Smowton
ce87a89009
Replace Map and similar functions with their Java cousins
...
This didn't appear to be necessary because the Kotlin and Java versions of Map (for example) are designed to be compatible, but in certain cases their functions have the same erasure but not the same type (e.g. Map.getOrDefault(K, V) vs. Map.getOrDefault(Object, V).
These have different erasures which was leading to callable-binding inconsistencies.
2022-05-12 22:36:28 +01:00
Tamas Vajk
fa0bd0366c
Fix extension property labels
2022-05-12 22:36:28 +01:00
Tamas Vajk
25fce5f6bb
Identify data classes during extraction
2022-05-12 22:36:28 +01:00
Chris Smowton
1e78f2893c
Add test for special method getters
2022-05-12 22:36:28 +01:00
Chris Smowton
134f88fe8e
Accept test results
2022-05-12 22:36:27 +01:00
Chris Smowton
12e3401ae0
Map special getters onto their correct JVM names
...
These include Collection.size() for example, which has a Kotlin property called `size` but whose getter is not named `getSize()`.
These would normally be accounted for using `@JvmName`, but some core methods are lowered by a special compiler pass instead.
2022-05-12 22:36:27 +01:00
Chris Smowton
cb6941d212
Account for JVM type equivalency when recognising unspecialised types
...
(As before, these are not really unspecialised, they are instantiated by their own type parameters, but this replicates the behaviour of the Java extractor)
2022-05-12 22:36:27 +01:00
github-actions[bot]
11c95c576e
Post-release preparation for codeql-cli-2.9.2
2022-05-12 18:21:57 +00:00
Tom Hvitved
e68a727f9a
Drop redundant columns from files and folders relations in xml.dbscheme
2022-05-12 20:21:48 +02:00
github-actions[bot]
b7cbd8fd75
Post-release preparation for codeql-cli-2.9.2
2022-05-12 18:21:38 +00:00
Geoffrey White
776857e08b
C++: Change note.
2022-05-12 18:26:32 +01:00
Geoffrey White
7a35a346dc
C++: Increase query precision to 'high'.
2022-05-12 17:46:16 +01:00
Geoffrey White
0ad6289618
C++: Fix typos.
2022-05-12 16:32:20 +01:00
Nick Rolfe
6c52831143
Java: sync spelling correction in shared qll
2022-05-12 16:11:29 +01:00
Nick Rolfe
1115227f9d
Merge remote-tracking branch 'origin/main' into nickrolfe/misspelling
2022-05-12 16:10:27 +01:00
Nick Rolfe
320b6a1942
QL for QL: don't check spelling of deprecated nodes
2022-05-12 16:07:17 +01:00
Nick Rolfe
70666f6351
QL for QL: fix typos in comments
2022-05-12 16:03:39 +01:00
Nick Rolfe
8caad12011
Ruby: fix typos in comments
2022-05-12 16:02:20 +01:00
Nick Rolfe
2efa38aaa6
Python: fix typos in comments
2022-05-12 16:02:20 +01:00
Nick Rolfe
2ed42c327c
JS: fix typos in comments
2022-05-12 16:02:19 +01:00
Mathias Vorreiter Pedersen
39551fd84d
Merge pull request #9114 from geoffw0/xxe7
...
C++: Repair support for createLSParser in the CWE-611 XXE query.
2022-05-12 15:47:53 +01:00
Jeroen Ketema
941485d66f
Merge pull request #9130 from jketema/cpp17-init
...
C++: Handle C++17 if and switch initializers
2022-05-12 16:37:44 +02:00
Harry Maclean
64206a1c29
Ruby: Add getAPrimaryQlClass to CfgNodes classes
2022-05-12 15:32:36 +01:00
Anders Schack-Mulligen
8c8440a58a
Merge pull request #9101 from hvitved/dataflow/include-hidden
...
Data flow: Add `Configuration::includeHiddenNodes()`
2022-05-12 15:36:12 +02:00
Geoffrey White
df30d2286c
Merge branch 'main' into xxe7
2022-05-12 14:35:16 +01:00
Nick Rolfe
128fac4414
Java: fix typos in comments
2022-05-12 14:28:49 +01:00
Nick Rolfe
a50601c367
C#: fix typos in comments
2022-05-12 14:28:40 +01:00
Nick Rolfe
76cf8d1659
C++: fix typos in comments
2022-05-12 14:28:26 +01:00
Nick Rolfe
844eef173c
QL for QL: add predicate for other typos not in the shared typo db
2022-05-12 14:25:39 +01:00
Ian Lynagh
75ca116ef9
Kotlin: QLDoc tweaks from intrigus
2022-05-12 14:12:01 +01:00
Jeroen Ketema
723f3b09fe
C++: Address review comments
2022-05-12 15:09:06 +02:00
Ian Lynagh
02101fab6a
Kotlin: Don't use capture_output or text
...
Older python versions don't support them
2022-05-12 14:08:19 +01:00
Taus
a0f8e2f0b1
Python: Modernise py/jinja2/autoescape-false
...
A simple rewrite to use API graphs instead.
The handling of falsy values is potentially a bit more restrictive now,
as it only accounts for local flow. We should probably figure out a
better way of capturing this pattern, but I felt that this was out of
scope for the present PR.
2022-05-12 12:55:42 +00:00
Erik Krogh Kristensen
762f7bf7fe
Merge pull request #9115 from erik-krogh/fileAndFolder
...
JS: resolve main module when there is a folder with the same name as the main file
2022-05-12 14:55:28 +02:00
Jeroen Ketema
72823e9576
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-05-12 14:54:43 +02:00
Taus
e8b7262712
Merge pull request #9133 from tausbn/devcontainer-install-test-extension-dependencies
...
Devcontainer: Install test dependencies
2022-05-12 14:51:18 +02:00
Joe Farebrother
59e400d2e0
Merge pull request #7723 from joefarebrother/redos
...
Java: Add ReDoS queries
2022-05-12 13:50:38 +01:00
Erik Krogh Kristensen
fb077bec66
sync AccessPathSyntax changes
2022-05-12 14:46:54 +02:00
Erik Krogh Kristensen
dea5596289
update MaD test to reflect that dotted module names don't work
2022-05-12 14:45:29 +02:00
Erik Krogh Kristensen
31e9876de7
Merge branch 'main' into pyMaD
2022-05-12 14:43:16 +02:00
Erik Krogh Kristensen
4bef451156
Merge pull request #9021 from erik-krogh/actions
...
JS: promote `js/actions/injection` out of experimental
2022-05-12 14:38:38 +02:00
Anders Schack-Mulligen
adb56dfa39
Dataflow: Improve standard order through easier type check elimination.
2022-05-12 14:31:38 +02:00
Nick Rolfe
6058352fb0
QL for QL: add small test for misspelling query
2022-05-12 13:17:32 +01:00
Nick Rolfe
4321b5e1fa
QL for QL: generalise non-US spelling query
...
1. Catch common misspelling as well.
2. Also check names of classes, predicates, etc.
2022-05-12 13:17:32 +01:00
Taus
12b34bcf04
Devcontainer: Install test dependencies
...
These _should_ get installed automatically if missing, by in my
experience this can be a bit flaky. Installing theme here should make
this a bit more robust.
2022-05-12 12:17:04 +00:00
Rasmus Wriedt Larsen
7cd51d6147
Merge pull request #9126 from RasmusWL/moduleimport-with-dots
...
Python: Fully disallow `API::moduleImport` of module with dots
2022-05-12 14:16:25 +02:00
Alex Denisov
d0e2e2bec8
Swift: introduce SwiftDispatcher
2022-05-12 14:09:44 +02:00
Alex Denisov
8f8ece63e7
Swift: add extractor test for declarations
2022-05-12 14:09:44 +02:00
Alex Denisov
cfd242e489
Swift: add human readable string representation for Location and UnkownAstNode
2022-05-12 14:09:44 +02:00
AlexDenisov
dd900e622c
Merge pull request #9107 from redsun82/swift-arena
...
Swift: `TrapOutput`
2022-05-12 14:09:18 +02:00
Mathias Vorreiter Pedersen
3423729f4c
Merge pull request #736 from github/release-prep/2.9.2
...
Release preparation for version 2.9.2
2022-05-12 12:55:44 +01:00
yoff
0778d90ac1
python: fix implementation of lambdaCreation
...
- still identifying summarized callables by name.
I think ther shoudl perhaps be a `getAUse` next to `getACall`.
- also fix tests, adding a standard taint configuration
2022-05-12 11:35:57 +00:00
Rasmus Wriedt Larsen
795adf0566
Python: Fix API::moduleImport("foo.bar")
2022-05-12 13:33:00 +02:00
Rasmus Wriedt Larsen
3844c5b5c0
Python: Add change-note
2022-05-12 13:32:59 +02:00
Rasmus Wriedt Larsen
f8253f5fef
Python: Fully disallow API::moduleImport of module with dots
...
Inspired by discussion about this for MaD in
https://github.com/github/codeql/pull/8883#discussion_r865858084
2022-05-12 13:30:26 +02:00
Rasmus Wriedt Larsen
597a8414d9
Python: Add test of API::moduleImport with dots
...
This is currently semi-works -- the import is allowed, but doesn't
always work when used :|
2022-05-12 13:29:16 +02:00
Nick Rolfe
234a36ff61
Merge pull request #9119 from github/nickrolfe/non-us-spelling-fixes
...
Fix non-US spellings and the corresponding query
2022-05-12 12:29:14 +01:00
Erik Krogh Kristensen
fef4455ccc
apply suggestion from doc review
...
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com >
2022-05-12 13:28:45 +02:00
Jeroen Ketema
e23e5e5b12
C++: Add change notes for C++17 if and switch initializers
2022-05-12 12:56:50 +02:00
Jeroen Ketema
894380d701
C++: Update stats file
2022-05-12 12:56:50 +02:00
Jeroen Ketema
97bba115da
C++: Add upgrade and downgrade script
2022-05-12 12:56:50 +02:00
Jeroen Ketema
71c019e126
C++: Handle C++17 switch initializers
2022-05-12 12:56:50 +02:00
Jeroen Ketema
ebbd9c5b90
C++: Handle C++17 if initializers
2022-05-12 12:56:50 +02:00
github-actions[bot]
edbd5dd77a
Release preparation for version 2.9.2
2022-05-12 10:17:26 +00:00
Tony Torralba
f0a0ac100b
Add live literals as sanitizers for sensitive logging
2022-05-12 11:57:44 +02:00
Tom Hvitved
0a7892797e
Merge pull request #8938 from hvitved/ruby/with-without-mad-tokens
...
Ruby: Introduce `With(out)Element` MaD input tokens
2022-05-12 11:49:51 +02:00
Tony Torralba
5db8306fef
Stop considering usernames sensitive info
...
Require variables to be static to be considered constants
2022-05-12 11:46:52 +02:00
Nick Rolfe
12a43b6fae
C++: fix another use of AnalysedString
2022-05-12 10:38:13 +01:00
Harry Maclean
e8972b814f
Merge pull request #8635 from hmac/hmac/io-popen
...
Ruby: Model IO.popen
2022-05-12 21:17:55 +12:00
Nick Rolfe
a86b5a1586
C++: fix changenote formatting
2022-05-12 09:26:30 +01:00
Erik Krogh Kristensen
9050f9999c
recognize functions that return object of methods as library input
2022-05-12 09:56:19 +02:00
Erik Krogh Kristensen
b1e8b3332c
resolve main module when there is a folder with the same name as the main file
2022-05-12 08:20:30 +02:00
cokeBeer
ebcb040050
update fix
2022-05-12 09:53:49 +08:00
cokeBeer
c70358033d
update fix
2022-05-12 09:31:35 +08:00
Nick Rolfe
7cd6dc1a74
CPP: add changenote for AnalysedString -> AnalyzedString
2022-05-11 18:16:26 +01:00
Nick Rolfe
e1b277386a
Fix non-US spellings: s/analyse/analyze
2022-05-11 17:48:27 +01:00
Nick Rolfe
2d246a4034
QL for QL: fix checking spelling of 'analyze' in multi-line comments
...
`.` does not match a newline in `regexpMatch`, so we were missing some
comments.
2022-05-11 17:43:39 +01:00
Nick Rolfe
0af1976b74
JS: fix typos in qldoc comment
2022-05-11 17:42:43 +01:00
Paolo Tranquilli
ddb567b639
Swift: remove Tag nested alias in TrapLabel
2022-05-11 17:44:00 +02:00
Alex Ford
196c68b0bd
Merge remote-tracking branch 'origin/main' into ruby/rbi-lib
2022-05-11 16:31:39 +01:00
Paolo Tranquilli
f1413f29c6
Swift: move back file opening code
2022-05-11 16:53:51 +02:00
Alex Ford
a114050a6e
Ruby: document ConstantReadAccessAsRbiType class
2022-05-11 15:03:41 +01:00
Tom Hvitved
5df87d526c
Sync files
2022-05-11 15:17:27 +02:00
Tom Hvitved
884d3b2ff4
Ruby: Introduce With(out)Element MaD input tokens
2022-05-11 15:17:27 +02:00
Rasmus Wriedt Larsen
044829c3bb
Python: Add @security-severity to py/pam-auth-bypass
...
The value 8.1 was calculated by our internal tool. This corresponds to a
'High' severity, which from my gut feeling seems reasonable for
authorization bypass.
2022-05-11 14:57:21 +02:00
Geoffrey White
94e190c63a
C++: getClassAndName.
2022-05-11 13:47:51 +01:00
Paolo Tranquilli
a46582d7d5
Swift: replace friend in TrapLabel with unsafeCreateFromExplicitId
2022-05-11 14:42:55 +02:00
yoff
92c4c87058
python: sync file
2022-05-11 12:36:02 +00:00
yoff
4445cf152a
python: various fixes
...
- compilation
- alerts
- some review comments
2022-05-11 12:28:58 +00:00
Rasmus Wriedt Larsen
0956d506de
Python: Actually promote py/pam-auth-bypass
...
🤦
2022-05-11 13:44:47 +02:00
Chris Smowton
d9e7d34e03
Merge pull request #735 from github/smowton/admin/generics-change-note
...
Add change note announcing generics support
2022-05-11 12:06:09 +01:00
Paolo Tranquilli
e679612a5a
Swift: move most of TrapArena to TrapFile
2022-05-11 12:32:14 +02:00
Geoffrey White
f27c2f3031
C++: Fix more capitalization.
2022-05-11 11:27:57 +01:00
Arthur Baars
e1e13b599a
Fix CFG
2022-05-11 12:09:17 +02:00
Geoffrey White
00f7453fcb
C++: Fix capitalization.
2022-05-11 11:08:03 +01:00
Arthur Baars
d91b1891f1
Add change note
2022-05-11 12:06:08 +02:00
Arthur Baars
dbd9c1859d
Add more test cases for &. operator
2022-05-11 12:06:08 +02:00
Arthur Baars
76f806159c
Ruby: desugar safe navigation calls
2022-05-11 12:06:08 +02:00
Arthur Baars
c9f7568ca3
Ruby: add Call::isSafeNavigation
2022-05-11 12:06:08 +02:00
Geoffrey White
3dddc560a1
C++: Add LSParser specific transformer.
2022-05-11 11:02:01 +01:00
Geoffrey White
e3be7749ea
C++: Repair the LSParser sinks.
2022-05-11 11:02:01 +01:00
Geoffrey White
8852043558
C++: Additional test cases.
2022-05-11 11:01:26 +01:00
Chris Smowton
72022e65d5
Copyedit
2022-05-11 10:46:16 +01:00
Chris Smowton
7530943e07
Add change note announcing generics support
2022-05-11 10:42:58 +01:00
Paolo Tranquilli
e63d079322
Swift: transfer TrapArena
2022-05-11 11:28:38 +02:00
Chris Smowton
d41da9eabb
Claim Go 1.18 support
...
As of https://github.com/github/codeql-go/pull/686 landing we support extracting generics, dataflow analysis in programs that use generics, etc. Note this hasn't gone out in a release yet but I would expect it to be in 2.9.2.
2022-05-11 10:26:22 +01:00
Chris Smowton
440b3118cb
Merge pull request #686 from owen-mc/extract-generics
...
Extract generics
2022-05-11 10:14:58 +01:00
Erik Krogh Kristensen
f5329a3d1b
PY: fix ql/field-only-used-in-charpred warning
2022-05-11 09:54:55 +02:00
Erik Krogh Kristensen
94a9b3e873
fix all ql/counting-to-zero in some languages
2022-05-11 09:54:53 +02:00
Erik Krogh Kristensen
7149b98bb4
add ql/counting-to-zero
2022-05-11 09:51:56 +02:00
cokeBeer
2b51b4206e
fix https://github.com/github/codeql/issues/9097
2022-05-11 11:22:23 +08:00
Rasmus Wriedt Larsen
c890f9c4ac
Python: Fix change-note
2022-05-10 18:08:43 +02:00
Rasmus Wriedt Larsen
f68b281762
Python: Add change-note
2022-05-10 18:04:52 +02:00
Rasmus Wriedt Larsen
7e87e18b32
Python: Adjust name/description/select of PamAuthorization.ql
...
Thought that calling out the actual vulnerability would make things
easier for our end users :)
2022-05-10 18:02:17 +02:00
Rasmus Wriedt Larsen
c84f693151
Python: Adjust PamAuthorization examples
...
They did not have proper formatting (only 2 spaces), and I restructured
them a bit more so they look like code in the wild
2022-05-10 18:00:20 +02:00
Rasmus Wriedt Larsen
0c534444ad
Python: Format .qhelp file
...
99% of our .qhelp files have manually wrapped lines, so just wanted to
keep things consistent
2022-05-10 17:59:21 +02:00
Chris Smowton
c0fbd03133
Add qldoc for getTermInIntersection
2022-05-10 14:52:10 +01:00
Chris Smowton
3129c3dd69
Remove commented-out debug code
2022-05-10 14:52:10 +01:00
Chris Smowton
d330033908
Make objects-map-changed warning non-fatal
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
3c4b5202e3
Fix type aliases for instantiated generic types
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
d098bdc7f8
Reintroduce noinlined predicate to fix performance
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ac081dc47a
Make TypeParamParent map global
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8477053c90
Test calling generic functions from other files
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7f1f428b41
Remove invalid code in test
...
"type declarations inside generic functions are not currently supported"
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
aa62fabe26
Fix another place where type could be nil
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
06d139848d
Fix panic when type is unknown
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
2e8b9a9a7d
Fix extractor crash when missing type information
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ba147e8661
Test calls through variables
...
The tests which involve a flow through a receiver with a non-trivial access path
currently don't give the right result. This should be
fixed in a follow-up issue.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4a9aeacb69
Find callee through function instantiation
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
3790c4eb4d
Control flow for generic function instantiations
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0dee215e8c
Update CodeQL tests to go 1.18.1
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
a8a351f6ae
Improve comment
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
20562cb43d
Add missing this. to member predicate calls
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
5257c4ab45
Add control flow test
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
26d4acd3b6
generic function instantions aren't type exprs
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ce9c9cfe9d
CallExpr.getCalleeExpr should get uninstantiated function
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7a7ca619b3
Add data flow tests for generic structs, methods and functions
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4e71ab5cfc
Update comment above first extraction of packages
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
25b91d8155
Update tests
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8c15199ca9
Use generic struct field not instantiated one in Uses
...
We do not extract instantiated named types, and instead use the generic
type. But fields of the underlying struct of an instantiated named types
are obtained from the Uses map. We solve this keeping track of which
objects should be overridden by which other objects.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8276ca04b4
Use generic method not instantiated one in Uses
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
253ca2bb67
Address review comments 2
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
59aa7426ec
Add comments about entities without a parent scope
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
9abc7ea617
Address review comments 1
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4828430fd4
Extract all object types before emitting them
...
Note that `extractObjectType` calls `extractType` which may add
additional objects to the list that `ForEachObject` loops over, so
we should emit object types as a second pass.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4fa972fdc5
Rename variable for clarity
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
1da5399652
Fix obvious test failures
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0194eb98d7
Add an upgrade and downgrade script
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4d9937d1c6
Add tests
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
63d1663eb2
bug fix: label pointer-typed receivers correctly
...
We were trying to convert the object's type to a named type
to iterate through its methods, forgetting that it could also be
a pointer to a named type.
This bug was exposed because we no longer extract an object's
type before extracting it (unless it is a receiver), and when we
extracted a named type we extract its methods and when
extracting a method we extract its receiver and we always give
it the correct label in that situation.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
92c331402d
Extract type parameters in types, not just decls
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
213fa1fec2
Break out of loop when a match has been found
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
982f11f8c7
Make ScopedObjectID take a function
...
This is so that ExtractType() won't be called except in the case
of a receiver variable, which is important for extracting type
parameters.
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
f908a6f1dc
Rename parm to param for clarity
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
1e08201632
Extract type param declarations
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3510f2cdcd
Support non-basic interfaces in extractor
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
a05a525755
Extract generic type instantiations to new table
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
e84db95f9c
Extract generic function instantiations to new table
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
b8ab46d969
Add QL class for type parameter types
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3952b1c07a
Extract type parameter types (and update dbscheme)
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
f7dcb11816
Extract uninstantiated generic types only
2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
7f0a37913f
Use Go 1.18
2022-05-10 14:52:09 +01:00
yoff
f67be52b99
python: fix compilation
...
by making client code use the "new" class.
Really, this part of the split class should have the old name,
to minimise disruptions to clients.
Same goes for the other split classes.
2022-05-10 12:53:13 +00:00
yoff
db008f1939
python: summaries may allowParameterReturnInSelf
2022-05-10 12:48:42 +00:00
yoff
238c578f5a
python: Add LocalSourceParameterNode
...
This can be used when one wants to consider a
(source) parameter node as a local source.
2022-05-10 12:48:42 +00:00
yoff
28b239a9a4
python: add qldoc
2022-05-10 12:48:42 +00:00
yoff
da3634188d
python: variaous fixes
...
- sync summary files
- format files
- fix compilation
2022-05-10 12:48:42 +00:00
yoff
f14ee0e794
python: Flow summaries based on type tracking
...
Two classes have been inserted into the hierarchies:
- `NonLibraryDataFlowCallable` with a method `getACall2`.
This method implements "get a call, not considering flow summaries".
For `NonLibraryDataFlowCallable`s, `getACall` will defer to `getACall2`.
While you could have a synthesised call to such a callable,
it would not correspond to a `CallNode`.
- `NonLibraryDataFlowSourceCall` with methods
`getArg2` and `getCallable2`. These also refer to a call graph that
does not consider flow summaries.
`getArg2` is used to synthesise pre-update nodes for arguments.
`getCallable2` is used in `connects` to compute argument passing.
This is used to define data flow nodes for overflow arguments.
`getACall2` ensures that `LibraryCallableValue::getACall` is not called
when the charpred of `FunctionCall` is evaluated.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
506efcf051
python: refactor TDataFlowCall
...
- Branch predicates are made simple. In particular, they do not try to detect library calls.
- All branches based on `CallNode`s are gathered into one.
- That branch has been given a class `NonSpecialCall`, which is the new parent of call classes based on `CallNode`s. (Those classes now have more involved charpreds.)
- A new such class, 'LambdaCall` has been split out from `FunctionCall` to allow the latter to replace its
general `CallNode` field with a specific `FunctionValue` one.
- `NonSpecialCall` is not an abstract class, but it has some abstract overrides. Therefor, it is not
considered a resolved call in the test `UnresolvedCalls.qll`.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
d85844bb89
python: type tracking uses source nodes
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
81ca479ca9
Python: local flow for type tracking
...
summary flow is excluded from the local flow relation used for
typetracking, but included in the one used for global data flow.
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
177dea5307
python: use new syntax for flow summaries
...
also convert to inline tests
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
4024ce4777
python: some summary flows
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
8c263b349f
python: add summary flow steps
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
828db3a392
python: Add summary nodes
...
allowing more `OutNode`s (not restricting to `CallNode`s),
gives more flow in the `classesCallGraph` test
2022-05-10 12:48:42 +00:00
Rasmus Lerchedahl Petersen
80175a9af5
Python: Compiles and mostly pass tests
...
- add flowsummaries shared files
- register in indentical files
- fix initial non-monotonic recursions
- add DataFlowSourceCall
- add resolvedCall
- add SourceParameterNode
failing tests:
- 3/library-tests/with/test.ql
2022-05-10 12:48:42 +00:00
Tom Hvitved
712fe002b9
Data flow: Sync files
2022-05-10 12:41:10 +02:00
Tom Hvitved
bfabfc3601
Data flow: Add Configuration::includeHiddenNodes()
2022-05-10 12:40:46 +02:00
Harry Maclean
a6cab022f6
Ruby: Add missing import
2022-05-10 17:32:01 +12:00
Harry Maclean
7b63493fa9
Ruby: Fix identification IO.open args
2022-05-10 17:32:00 +12:00
Harry Maclean
79c6dc1af0
Refactor IO/File modelling
...
The main goal here is to get rid of the duplicate definitions of module
`IO`, which currently exist in both `frameworks/core/IO.qll` and
`frameworks/Files.qll`.
We do this by moving the classes inside `Files::IO` to `core/IO.qll`,
but moving most of the actual definitions of those classes to an
internal module `core.internal.FileOrIO`. This means both `Files.qll`
and `IO.qll` can depend on them without leaking them to end users.
2022-05-10 17:32:00 +12:00
Harry Maclean
2d12ad6238
Ruby: Model IO.popen
...
This method is very similar to `Kernel.system`: it executes its
arguments as a system command in various ways.
2022-05-10 17:32:00 +12:00
ihsinme
a7c69ba6ab
create new branchihsinme-patch-87 in fork
2022-05-09 13:15:27 +00:00
ihsinme
09cd168197
create new branchihsinme-patch-88 in fork
2022-05-09 13:05:06 +00:00
Erik Krogh Kristensen
fc1ab06c1c
autoformat
2022-05-09 12:39:38 +02:00
thibaut hansmann
f3f2e59472
C/C++ : Fix remove the useless variable
2022-05-09 12:01:42 +02:00
Mathias Vorreiter Pedersen
ef7363c48e
Merge pull request #732 from github/post-release-prep/codeql-cli-2.9.1
...
Post-release preparation for codeql-cli-2.9.1
2022-05-06 13:15:10 +01:00
github-actions[bot]
fea657ce01
Post-release preparation for codeql-cli-2.9.1
2022-05-05 19:05:56 +00:00
Alex Ford
4844e4f454
ruby: replace the dataflow layer RBI library with the AST layer version
2022-05-05 18:40:12 +01:00
Alex Ford
bedb1d4584
ruby: Add AST layer version of the RBI library
2022-05-05 18:37:56 +01:00
Alex Ford
961f867bed
Ruby: fix getAssociatedMethod predicate to include class methods
2022-05-05 18:09:42 +01:00
Alex Ford
1e3ab52e1f
ruby: tidy up methodSignatureSuccessorNodeRanked predicate
2022-05-05 18:09:42 +01:00
Alex Ford
08fa397877
ruby: new rbi test case
2022-05-05 18:09:27 +01:00
Erik Krogh Kristensen
efe306733e
move path-injection MaD to PathInjectionCustomizations.qll
2022-05-05 16:51:39 +02:00
thibaut hansmann
3006935141
C/C++ : FIx the research for UInt16, 32 and 64 + Fix 2 first line of the query
2022-05-05 15:22:50 +02:00
thibaut hansmann
c15c216c47
C/C++ : change Variable and ArrayType name + Add detection for Uint 32 and 64
2022-05-05 14:27:50 +02:00
Erik Krogh Kristensen
2292dc5a45
Merge pull request #12 from RasmusWL/move-tests-back
...
Move tests back into `frameworks/` folder
2022-05-05 14:23:05 +02:00
Rasmus Wriedt Larsen
dfe99b0b51
Python: Apply suggestions from code review
...
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com >
2022-05-05 14:14:44 +02:00
Rasmus Wriedt Larsen
0a589bed4e
Python: Add inline test of MaD sinks
...
This enables us to keep the framework modeling tests under `/frameworks`
folder
I had hoped to use `mad-sink[<kind>]` syntax, but that was not allowed
:(
Maybe it oculd be allowed in the future, but for now I'll stick with the
more ugly solution of `mad-sink__<kind>`
2022-05-05 13:11:43 +02:00
Erik Krogh Kristensen
0c0e280637
update the qhelp to mention that the GITHUB_TOKEN only sometimes has write-access
2022-05-05 12:12:29 +02:00
Erik Krogh Kristensen
c0152a46bc
rename getAReferencedExpression to getASimpleReferenceExpression and add examples of what it can parse
2022-05-05 11:02:47 +02:00
Erik Krogh Kristensen
dc1dc2a33a
parse the uses field in the getters instead of the charpred
2022-05-05 10:40:08 +02:00
Erik Krogh Kristensen
9ea0f71581
convert TODO to a note in Actions::Uses
2022-05-05 10:28:00 +02:00
Erik Krogh Kristensen
1f00ba812a
move YAMLMappingLikeNode to the standard library
2022-05-05 10:22:52 +02:00
Rasmus Wriedt Larsen
6ae5ef9f3b
Revert "move most of asyncpg test into SqlInjection after moving MaD sql-injection sink"
...
This reverts commit 4b9c9b0c8d .
2022-05-05 10:20:41 +02:00
Joe Farebrother
64227c9109
Fix codescanning alerts
2022-05-04 15:58:30 +01:00
Joe Farebrother
c7d30087d1
Fix issue with named backrefs; add needed import
2022-05-04 15:41:42 +01:00
Joe Farebrother
2d82dfba38
Reorder backreference predicates
2022-05-04 15:41:41 +01:00
Joe Farebrother
9078e13f1c
Apply reveiw suggestions
...
- make java imports private
- qdoc fixes
- reorder predicates
- simplifications
2022-05-04 15:41:41 +01:00
Joe Farebrother
b854a2185e
Fix use of sinkModel
2022-05-04 15:41:41 +01:00
Joe Farebrother
b08f22c24d
Remove unnecassary import
2022-05-04 15:41:41 +01:00
Joe Farebrother
66ab2bca75
Update PrintAst test output
2022-05-04 15:41:41 +01:00
Joe Farebrother
eec57d4f25
Simplify dataflow logic by using only one configuration, and expessing more sinks with models-as-data
2022-05-04 15:41:41 +01:00
Joe Farebrother
2a80540157
Sync shared files
2022-05-04 15:41:40 +01:00
Joe Farebrother
5e3ba130dc
Add a test for deeply nested sequences
2022-05-04 15:41:40 +01:00
Joe Farebrother
4ed2e8d1fd
Update tests to account for only regexes with quantifiers being considered
2022-05-04 15:41:40 +01:00
Joe Farebrother
e5ca924240
Allow quantifiers invoving {}; add comments
2022-05-04 15:41:40 +01:00
Chris Smowton
bc17d4b91f
Break the recursion between seqChild, RegExpTerm and TRegExpSequence
2022-05-04 15:41:40 +01:00
Chris Smowton
0d13864bc8
Restrict polynomial ReDoS' strings-parsed-as-regexes search to those that could possibly be interesting
...
In practice for polynomial ReDoS this means those regexes containing at least one potentially-infinite quantifier (* or +).
2022-05-04 15:41:39 +01:00
Joe Farebrother
0f606d987d
Remove redundant super call.
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-05-04 15:41:39 +01:00
Joe Farebrother
522a8aff6f
Fix filename case
2022-05-04 15:41:39 +01:00
Joe Farebrother
3d65a9cafc
Update shared files
2022-05-04 15:41:39 +01:00
Joe Farebrother
375ded4ede
Move check to exlude test cases so that it also covers exponential redos
2022-05-04 15:41:39 +01:00
Joe Farebrother
1605d36ddf
Refine polynomial redos sources to exclude length limited methods
2022-05-04 15:41:39 +01:00
Joe Farebrother
04edc10f1e
Exclude regexes from test code
2022-05-04 15:41:38 +01:00
Joe Farebrother
6794268a3c
Split PolynomialRedos definition into a library to avoid duplication in the tests
2022-05-04 15:41:38 +01:00
Joe Farebrother
c1290d9e2b
Sync shared redos library files.
2022-05-04 15:41:38 +01:00
Joe Farebrother
5555985ad6
Distingush between whether or not a regex is matched against a full string
...
Also some fixes and additional tests
2022-05-04 15:41:38 +01:00
Joe Farebrother
0a5268aeb4
Sync shared library changes across languages.
2022-05-04 15:41:38 +01:00
Joe Farebrother
bb562643c6
Support possessive quantifiers, which cannot backtrack.
...
They are approximated by limiting them to up to one repetition (effectively making *+ like ? and ++ like a no-op).
2022-05-04 15:41:37 +01:00
Joe Farebrother
49374b877a
Fix parsing of alternations in character classes
2022-05-04 15:41:37 +01:00
Joe Farebrother
5ba6bafbef
Use occursInRegex more ccnsistently throughout
2022-05-04 15:41:37 +01:00
Chris Smowton
f5809a7440
ReDoS performance fixes
2022-05-04 15:41:37 +01:00
Joe Farebrother
2d963176bf
Fix change note
2022-05-04 15:41:37 +01:00
Joe Farebrother
9bd3916800
Add change note
2022-05-04 15:41:37 +01:00
Joe Farebrother
3ce0c2c23b
Add more regex use functions in String
2022-05-04 15:41:36 +01:00
Joe Farebrother
5364001aa2
Update docs to be about Java
2022-05-04 15:41:36 +01:00
Joe Farebrother
c312b4b6b0
Add missing qldoc
2022-05-04 15:41:36 +01:00
Joe Farebrother
57ba8a4d1b
Improve handling of hex escapes; and support some named character classes
2022-05-04 15:41:36 +01:00
Joe Farebrother
5143585080
Fix to PolynomialRedos not finding results and to test cases not finding that
2022-05-04 15:41:36 +01:00
Joe Farebrother
91887ab229
Sync shared files
2022-05-04 15:41:36 +01:00
Joe Farebrother
e23162d91b
Add test cases for PolynomialRedos dataflow logic; make fixes
2022-05-04 15:41:35 +01:00
Joe Farebrother
5a4316d945
Add test cases for exponential redos query
2022-05-04 15:41:35 +01:00
Joe Farebrother
457cf41825
Support more escaped characters
2022-05-04 15:41:35 +01:00
Joe Farebrother
4b845d5dac
Move test cases to their own directory to avoid conflict
2022-05-04 15:41:35 +01:00
Joe Farebrother
9f4da65030
Improve calculation of locations of regex terms
2022-05-04 15:41:35 +01:00
Joe Farebrother
dd200e29d4
Improve char set depth calculation
2022-05-04 15:41:35 +01:00
Joe Farebrother
e797d2195c
Topologically sort RegexString
2022-05-04 15:41:34 +01:00
Joe Farebrother
bc109521aa
Simplify octal handling
2022-05-04 15:41:34 +01:00
Joe Farebrother
9e88c67c19
Add more test cases; make some fixes
2022-05-04 15:41:34 +01:00
Joe Farebrother
aa1337db86
Apply style suggestions from code review
2022-05-04 15:41:34 +01:00
Joe Farebrother
e954db293a
Convert snake case predicates to camel case
2022-05-04 15:41:34 +01:00
Joe Farebrother
5b61de67de
Implement style/doc suggestions from code review
2022-05-04 15:41:33 +01:00
Joe Farebrother
28649da187
Add parser tests; fix some parser issues.
...
[temporarily renamed existing regex/Test.java during rebasing to avoid conflict]
2022-05-04 15:41:33 +01:00
Joe Farebrother
8e1918216e
Add PrintAst support for regex terms
2022-05-04 15:41:33 +01:00
Joe Farebrother
ca422a2186
Use explicit this
2022-05-04 15:41:33 +01:00
Joe Farebrother
f9f7a01f57
Add Java ReDoS libraries to identical-files.json
2022-05-04 15:41:33 +01:00
Joe Farebrother
11e465f2ac
Implement remaining syntax differences
2022-05-04 15:41:33 +01:00
Joe Farebrother
7530902ad7
Add approximate support for nested character classes.
...
This shouldn't fail to parse on any correctly formed character class; but may give incorrect contents when nested classes are involved.
2022-05-04 15:41:33 +01:00
Joe Farebrother
d04c99b0be
Support quote sequences
2022-05-04 15:41:32 +01:00
Joe Farebrother
59945cd8b3
Add dataflow logic to PolynomialRedDoS
2022-05-04 15:41:30 +01:00
Joe Farebrother
37240f01d2
Copy Redos queries from python
...
Todo: Implement dataflow for polynomialredos; update docs to reference java rather than python
2022-05-04 15:40:58 +01:00
Joe Farebrother
a8f7a4459e
Port redos libraries from Python
2022-05-04 15:40:56 +01:00
Erik Krogh Kristensen
8e2b00d209
make the big disjunctions more readable by using a set literal
2022-05-04 16:15:17 +02:00
Erik Krogh Kristensen
31a4de902e
add missing security severity
2022-05-04 16:15:17 +02:00
Erik Krogh Kristensen
7530923af3
add missing qldoc
2022-05-04 16:14:59 +02:00
Erik Krogh Kristensen
d8cc82bdb1
add change-note
2022-05-04 16:14:59 +02:00
Erik Krogh Kristensen
df4bfef8c7
expand the qhelp for js/actions/injection
2022-05-04 16:14:59 +02:00
Erik Krogh Kristensen
48fb01f9f7
set js/actions/injection as a high precision warning query
2022-05-04 16:14:54 +02:00
Erik Krogh Kristensen
2a65d1d3ec
move js/actions/injection out of experimental
2022-05-04 16:14:19 +02:00
Erik Krogh Kristensen
fc6eedd07a
generalize the file pattern for github/actions related YAML
2022-05-04 16:14:19 +02:00
Erik Krogh Kristensen
bc470b89f1
leave a deprecated alias for Actions.qll
2022-05-04 16:14:19 +02:00
Erik Krogh Kristensen
9db67d4988
move the Actions API out of experimental
2022-05-04 16:14:19 +02:00
Alex Ford
1af5c680fa
ruby: drop the CallableCfgNode classes
2022-05-04 14:07:04 +01:00
Alex Ford
687602b6f1
ruby: drop a TODO
2022-05-04 14:06:37 +01:00
Alex Ford
4210973ade
ruby: drop unnecessary getExpr
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-05-04 14:04:34 +01:00
Owen Mansel-Chan
570d3f47c4
Use os.Stat instead of os.File.Stat
2022-05-04 10:11:53 +01:00
Erik Krogh Kristensen
4b9c9b0c8d
move most of asyncpg test into SqlInjection after moving MaD sql-injection sink
2022-05-04 10:59:02 +02:00
Erik Krogh Kristensen
a812d4dd34
move the MaD sql-injection sink to SqlInjectionCustomizations.qll
2022-05-04 10:59:02 +02:00
Erik Krogh Kristensen
571fc3e73b
Revert "deprecate SqlConstruction"
...
This reverts commit c0eca0d09a .
2022-05-04 10:59:02 +02:00
Erik Krogh Kristensen
1062aae21c
add test that the foo.bar package syntax works
2022-05-04 10:58:59 +02:00
Erik Krogh Kristensen
ead978187d
adjust the source-type for remote-flow from MaD
2022-05-03 22:53:41 +02:00
Robert Marsh
de68107a0e
C++: restrict global variable IR generation
2022-05-03 16:50:53 -04:00
Erik Krogh Kristensen
8ffc05c84b
count both named and positional arguments in the WithArity filter
2022-05-03 21:21:57 +02:00
Owen Mansel-Chan
22ccbbaae8
Run go mod tidy -e if go.mod exists
2022-05-03 14:57:13 +01:00
Robert Marsh
ffd2cd7f40
C++: cleanup some implicit this usage
2022-05-02 12:38:04 -04:00
Robert Marsh
7993cba457
C++: fix global vars accesses in global vars
2022-05-02 12:27:10 -04:00
Robert Marsh
b5a2a2e8c2
C++: test for global var access in a global var
2022-05-02 12:07:01 -04:00
Erik Krogh Kristensen
c0eca0d09a
deprecate SqlConstruction
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
6c67e51ec3
add test for the .Call token
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
9c3d45a16a
last test of taint steps
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
894252dfa7
third test of taint steps
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
0f1e070d82
second test of taint steps
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
649df1dd31
simple taint-flow test
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
a8790412dd
add support for the Argument[any] and Argument[any-named] tokens
2022-05-02 12:58:21 +02:00
Erik Krogh Kristensen
b1fa7f86a8
add support for the any argument tokens
2022-05-02 12:58:15 +02:00
Erik Krogh Kristensen
413d182bcf
add support for named parameters
2022-05-02 12:56:44 +02:00
Erik Krogh Kristensen
c1d3738fb8
fix API-graphs such that the first parameter is the first non-self parameter
2022-05-02 12:52:02 +02:00
Erik Krogh Kristensen
547047ef19
add self parameters to API-graphs, and add support for self parameters in MaD
2022-05-02 12:50:31 +02:00
Erik Krogh Kristensen
dc38aa8a96
add support for the Method[name] token
2022-05-02 12:50:29 +02:00
Erik Krogh Kristensen
ea01bcf5ec
have the Instance token be an alias for Subclass.ReturnValue
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
46acce0ad4
add support for the Subclass token
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
a02e812de8
add test for the Instance token
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
682cab3737
add test for awaited
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
48408ca45d
Add TODO list
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
8d60336396
add tests for callsite filters
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
20992af037
add test for parameter syntax
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
35b143a1a5
add tests for argument syntax
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
86a9bc6aca
add test for keyword arguments
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
d4b882519a
convert most of the asyncpg model to MaD
2022-05-02 12:45:21 +02:00
Erik Krogh Kristensen
1c2c9159a9
initial MaD implementation for Python
2022-05-02 12:45:19 +02:00
thibaut hansmann
83e26f41c0
C/C++ : Wrong Uint access
2022-05-01 14:53:52 +02:00
Robert Marsh
fe52dd93ef
C++: sync and accept new consistency test
2022-04-29 15:29:07 -04:00
Robert Marsh
d1c6022efc
C++: fix inconsistencies from IR global vars
2022-04-29 14:56:13 -04:00
Jeroen Ketema
5b80fd1432
C++: Update tests for frontend update
2022-04-29 11:46:01 -04:00
Robert Marsh
abdfd2297b
C++: Fix IR variable reuse for global var inits
2022-04-29 11:46:00 -04:00
Robert Marsh
259580aeeb
Revert "Merge pull request #8933 from MathiasVP/revert-globals"
...
This reverts commit 2517371a37 , reversing
changes made to db856798b9 .
2022-04-29 11:45:10 -04:00
Erik Krogh Kristensen
4585e8a874
QL: point the dataset measure workflow to a merge_stats.py file that exists
2022-04-29 15:31:07 +02:00
Tony Torralba
12320aa5d2
Fix Intent Redirection sanitizer
2022-04-29 12:19:49 +02:00
Erik Krogh Kristensen
dfe2140902
slight simplification
2022-04-29 11:22:12 +02:00
Owen Mansel-Chan
ee94eb5962
Merge pull request #727 from cklin/fix-ql-comments-syntax
...
Fix Beego references
2022-04-29 09:19:24 +01:00
Chuan-kai Lin
d2fccbea95
Fix Beego references
2022-04-28 12:52:21 -07:00
Mathias Vorreiter Pedersen
ff677cd756
Merge pull request #726 from github/release-prep/2.9.1
...
Release preparation for version 2.9.1
2022-04-28 14:45:19 +01:00
github-actions[bot]
bcd2c009e3
Release preparation for version 2.9.1
2022-04-28 11:58:54 +00:00
Mathias Vorreiter Pedersen
b8165d47b7
Merge pull request #724 from github/post-release-prep/codeql-cli-2.9.0
...
Post-release preparation for codeql-cli-2.9.0
2022-04-25 22:53:17 +01:00
Alex Ford
b956616a56
Ruby: fix alert
2022-04-25 11:25:57 +01:00
Alex Ford
869d827768
Revert "Ruby: extract rbi files"
...
This reverts commit ba9342e0f38f4468d04bad987a8f69e95fdbdd5f.
2022-04-24 22:48:52 +01:00
Alex Ford
de35bd987a
Ruby: extract rbi files
2022-04-24 22:48:52 +01:00
Alex Ford
ad3a9b19e4
Ruby: test files for RBI library
2022-04-24 22:48:52 +01:00
Alex Ford
e03ce8f9f2
Ruby: add experimental library to support RBI files
2022-04-24 22:48:52 +01:00
Alex Ford
e3e02c98ea
Ruby: Add ExprNodes::CallableCfgNode and ExprNodes::MethodBaseCfgNode
2022-04-24 22:27:20 +01:00
github-actions[bot]
59cc2898c9
Post-release preparation for codeql-cli-2.9.0
2022-04-21 19:22:17 +00:00
Mathias Vorreiter Pedersen
d2d92fad36
Merge pull request #723 from github/release-prep/2.9.0
...
Release preparation for version 2.9.0
2022-04-21 17:14:45 +01:00
Owen Mansel-Chan
6f91cc1cb1
Merge pull request #719 from owen-mc/bugfix/find-callee-through-function-variables
...
Look for callees through function variables
2022-04-21 17:00:59 +01:00
github-actions[bot]
355f4c6186
Release preparation for version 2.9.0
2022-04-21 14:48:55 +00:00
Owen Mansel-Chan
5f3b913d7f
Add change note
2022-04-21 11:34:51 +01:00
Owen Mansel-Chan
62489e1afd
Fix viableCallable for function variables
2022-04-21 11:32:08 +01:00
Owen Mansel-Chan
69c9099a24
Look for callees through function variables
2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
373017ab9d
Add tests for callees through function variables
2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
528a735a0d
Improve CallNode.getCalleeName
...
Note that any results from expr.getTarget().getName() are also results
from expr.getCalleeName(), so it was redundant to have a disjunction of
both of them.
2022-04-21 11:30:28 +01:00
Owen Mansel-Chan
b6702b644d
Improve documentation of CallExpr.getCalleeName
2022-04-21 11:30:27 +01:00
${sleep,7}
b5734ed6a2
Merge branch 'main' into jty/python/emailInjection
2022-04-20 09:50:08 -04:00
Geoffrey White
cdce72b87c
C++: Better join order for reachesWithoutAssignment.
2022-04-12 17:34:02 +01:00
Chris Smowton
a8eeef6ef8
Merge pull request #718 from owen-mc/fix-incorrect-integer-conversion-for-type-assertions
...
Integer conversion should ignore type assertions
2022-04-12 12:44:43 +01:00
Owen Mansel-Chan
f9f21e9891
Integer conversion should ignore type assertions
2022-04-12 10:58:07 +01:00
Edoardo Pirovano
b953fe39c2
Merge pull request #716 from github/edoardo/3.5-mergeback
...
Merge `rc/3.5` branch into `main`
2022-04-08 20:43:15 +01:00
Dave Bartolomeo
e3b7ba6b1f
Revert "Bump version of suite-helpers dependency"
...
This reverts commit 49e568ed44 .
2022-04-08 14:06:59 -04:00
Dave Bartolomeo
49e568ed44
Bump version of suite-helpers dependency
2022-04-08 13:11:33 -04:00
Owen Mansel-Chan
f196538953
Merge pull request #714 from owen-mc/fix-get-enclosing-callable
...
Extend DataFlowCallable to include file scopes
2022-04-08 17:02:35 +01:00
Edoardo Pirovano
16c0f11c00
Bump minor version of packs
2022-04-08 15:51:34 +01:00
Owen Mansel-Chan
b9ff1ccd45
Add change note
2022-04-08 15:23:24 +01:00
Ian Lynagh
6f6e8bfbd1
Merge pull request #713 from github/post-release-prep/codeql-cli-2.8.5
...
Post-release preparation for codeql-cli-2.8.5
2022-04-08 15:09:08 +01:00
Owen Mansel-Chan
76a0a51f39
Merge pull request #715 from owen-mc/print-empty-interface-with-single-space
...
Pretty-print empty interface without double space
2022-04-08 11:46:04 +01:00
Owen Mansel-Chan
880afea959
Pretty-print empty interface without double space
2022-04-08 06:09:56 +01:00
Owen Mansel-Chan
603c1d518e
Extend DataFlowCallable to include file scopes
...
The motivation is so that getEnclosingCallable() can cope with
nodes that are not in a callable.
2022-04-05 16:00:53 +01:00
github-actions[bot]
469af4c501
Post-release preparation for codeql-cli-2.8.5
2022-04-01 16:21:57 +00:00
Ian Lynagh
837d1fbe38
Merge pull request #712 from github/release-prep/2.8.5
...
Release preparation for version 2.8.5
2022-04-01 14:07:16 +01:00
github-actions[bot]
950519c884
Release preparation for version 2.8.5
2022-04-01 10:39:24 +00:00
Chris Smowton
314bd20eb2
Merge pull request #711 from rverme/patch-1
...
Address incorrectly referenced parameter in QLdoc
2022-04-01 11:22:57 +01:00
rverme
9b6dd60615
Address incorrectly reference parameter in QLdoc
...
The qldoc of the predicate `isParameterOf` mentions the parameter `fd` that does not exists and is possible replaced by `c`
2022-04-01 09:37:56 +02:00
Erik Krogh Kristensen
06fdaacd82
just look at the field name in the "detect uses of the field in an inbetween class"-check
2022-03-31 15:30:56 +02:00
Erik Krogh Kristensen
fa651d2f60
remove the override restriction from ql/unused-field
2022-03-31 15:30:19 +02:00
Ian Lynagh
e9acb4f8e8
Merge pull request #706 from github/post-release-prep/codeql-cli-2.8.4
...
Post-release preparation for codeql-cli-2.8.4
2022-03-30 16:35:29 +01:00
haby0
1e6893e230
Update python/ql/src/experimental/semmle/python/security/injection/CsvInjection.qll
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-03-30 22:54:30 +08:00
Owen Mansel-Chan
79e6f7876b
Merge pull request #710 from owen-mc/delete-consistency
...
Delete unused file DataFlowImplConsistency
2022-03-30 15:15:55 +01:00
haby0
8f2013c32e
Simplify StartsWithCheck
2022-03-30 19:04:03 +08:00
Owen Mansel-Chan
8a3a58ca76
Delete unused file DataFlowImplConsistency
2022-03-30 11:03:46 +01:00
haby0
bf8c7a2ea7
Added Sanitizer Guard
2022-03-29 14:29:33 +08:00
github-actions[bot]
9ba21923a3
Post-release preparation for codeql-cli-2.8.4
2022-03-21 19:36:39 +00:00
Ian Lynagh
30bd1a6eb6
Merge pull request #704 from github/release-prep/2.8.4
...
Release preparation for version 2.8.4
2022-03-21 16:27:35 +00:00
github-actions[bot]
b96eba9875
Release preparation for version 2.8.4
2022-03-21 13:26:27 +00:00
Erik Krogh Kristensen
f3ca6bbc2e
PY: update expected output after fixing bug in flask model
2022-03-17 09:42:30 +01:00
Erik Krogh Kristensen
879680057e
fix all ql/unused-field warnings
2022-03-17 09:41:42 +01:00
Erik Krogh Kristensen
d5fd0d6724
add ql/unused-field query
2022-03-17 09:40:16 +01:00
Erik Krogh Kristensen
4b50c68934
exclude annotation names
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
2a196611af
add not as a keyword
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
86c8737250
remove string constants from mentioned non-params
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
35c3c62f9e
apply suggestions from code review
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
daed33f5af
JS: fix more instances of ql/missing-parameter-qldoc
2022-03-16 22:58:28 +01:00
Erik Krogh Kristensen
3762ce2c72
QL: also report missing QLDoc for parameters when no parameters are documented
2022-03-16 22:56:54 +01:00
Erik Krogh Kristensen
f204a41122
QL: fix ql/missing-parameter-qldoc error in QL-for-QL
2022-03-16 22:56:53 +01:00
Erik Krogh Kristensen
53760799fc
sync files
2022-03-16 22:56:53 +01:00
Erik Krogh Kristensen
efba220b45
JS: fix most ql/missing-parameter-qldoc issues
2022-03-16 22:56:52 +01:00
Erik Krogh Kristensen
ecd3aceb07
QL: add test for ql/missing-parameter-qldoc
2022-03-16 22:54:35 +01:00
Erik Krogh Kristensen
af112a011a
QL: Add query detecting suspiciously missing parameters from the QLDoc of a predicate
2022-03-16 22:54:35 +01:00
Erik Krogh Kristensen
8c6022b78a
QL: add query detecting inconsistent deprecations
2022-03-16 22:37:34 +01:00
haby0
e11c74c580
Delete redundant comments
2022-03-15 15:25:08 +08:00
haby0
4195eef9ba
Add CSV injection model
2022-03-15 15:15:38 +08:00
Arthur Baars
be412b1b5d
Merge pull request #702 from github/post-release-prep/codeql-cli-2.8.3
...
Post-release preparation for codeql-cli-2.8.3
2022-03-14 21:04:37 +01:00
github-actions[bot]
4bd2553a7f
Post-release preparation for codeql-cli-2.8.3
2022-03-11 09:23:25 +00:00
Arthur Baars
77b879f480
Merge pull request #701 from github/release-prep/2.8.3
...
Release preparation for version 2.8.3
2022-03-11 08:07:57 +01:00
github-actions[bot]
e7cf172119
Release preparation for version 2.8.3
2022-03-10 19:43:52 +00:00
jorgectf
c155ac6e7a
Add HtmlEscaping sanitizer
2022-03-10 00:47:04 +01:00
Erik Krogh Kristensen
fb011c3529
QL: identify when a field not used in all disjuncts in a char-pred
2022-03-09 11:46:16 +01:00
Owen Mansel-Chan
807ef2e5ef
Merge pull request #700 from smowton/smowton/fix/filepath-clean
...
Treat path.Clean and filepath.Clean alike re: tainted path sanitization
2022-03-09 06:18:26 +00:00
jorgectf
3f43e6ef54
Fix FlaskMail's getTo
2022-03-08 18:45:53 +01:00
jorgectf
bbba1a21c4
Explicitly call this in SendGridMail
2022-03-08 18:40:20 +01:00
jorgectf
930fbf777c
Move getFlaskMailArgument inside FlaskMail and refactor
2022-03-08 18:38:32 +01:00
jorgectf
6b04344655
Refactor sendgridContent and sendgridWrite
...
Move the predicates inside `SendGridMail`.
See https://github.com/github/codeql/pull/7127#discussion_r821574462
2022-03-08 18:26:20 +01:00
jorgectf
6722671541
Refactor sendgridApiClient and sendgridApiSendCall
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-03-08 18:24:38 +01:00
Chris Smowton
e8084233b8
Treat path.Clean and filepath.Clean alike re: tainted path sanitization
2022-03-08 16:42:59 +00:00
jorgectf
3159d8e211
Correlate SendGridMail declaration with its predicates
2022-03-03 04:33:10 +01:00
Tamás Vajk
30c80622ed
Merge pull request #699 from github/post-release-prep/codeql-cli-2.8.2
...
Post-release preparation for codeql-cli-2.8.2
2022-03-01 11:44:45 +01:00
github-actions[bot]
dd3fc2d477
Post-release preparation for codeql-cli-2.8.2
2022-03-01 09:24:17 +00:00
jorgectf
67b672a467
Merge remote-tracking branch 'origin/main' into jty/python/emailInjection
2022-02-26 01:22:55 +01:00
jorgectf
2f2cf2c1f6
Use StrConst.getText() instead of Str_.getS()
2022-02-26 01:19:50 +01:00
Tamás Vajk
3125f49853
Merge pull request #698 from github/release-prep/2.8.2
...
Release preparation for version 2.8.2
2022-02-24 20:08:04 +01:00
Tamas Vajk
8d329c55ab
Fix typo in change logs
2022-02-24 16:10:44 +01:00
github-actions[bot]
3840ce8444
Release preparation for version 2.8.2
2022-02-24 14:56:57 +00:00
Chris Smowton
b1cdde6913
Merge pull request #697 from github/smowton/admin/move-change-note
...
Move new-query change note to src pack
2022-02-24 12:43:48 +00:00
Chris Smowton
60bd4648a1
Re-add change note to src pack
2022-02-24 11:06:00 +00:00
Chris Smowton
28c3c0090e
Move new query change note to src pack
2022-02-24 11:00:11 +00:00
Chris Smowton
106ee5b8a2
Merge pull request #696 from asgerf/asgerf/dot-separated-access-paths
...
Go: Switch to dot-separated access paths in summary specs
2022-02-22 15:34:27 +00:00
Owen Mansel-Chan
980c27423a
Merge pull request #681 from owen-mc/new-query/wrapped-error-always-nil
...
Add query "Wrapped error always nil"
2022-02-22 12:42:16 +00:00
Owen Mansel-Chan
0cd5e520aa
Update expected alert message
2022-02-22 11:14:19 +00:00
Asger Feldthaus
cb38df5980
Go: rewrite access paths to dot-style
2022-02-21 14:56:54 +01:00
Asger Feldthaus
846a876c44
Go: update to use new API exposed by FlowSummaryImpl.qll
2022-02-21 14:53:05 +01:00
Asger Feldthaus
da52cb24f6
Go: sync FlowSummaryImpl and AccessPathSyntax.qll
2022-02-21 14:40:23 +01:00
Owen Mansel-Chan
e8c2ab745e
Apply suggestions from code review from docs team
...
Co-authored-by: hubwriter <hubwriter@github.com >
2022-02-21 13:19:47 +00:00
Arthur Baars
0f15d71cd8
Merge pull request #694 from github/post-release-prep/codeql-cli-2.8.1
...
Post-release preparation for codeql-cli-2.8.1
2022-02-15 20:16:09 +01:00
github-actions[bot]
a89ae0b65e
Post-release preparation for codeql-cli-2.8.1
2022-02-11 11:07:13 +00:00
Owen Mansel-Chan
fbd73a3ed5
Merge pull request #690 from asgerf/asgerf/sync-flow-summary-impl
...
Go: sync FlowSummaryImpl.qll
2022-02-11 10:50:37 +00:00
Asger Feldthaus
620bdf22c2
Go: add new sink to completetest.ql as well
2022-02-11 09:44:27 +01:00
Arthur Baars
6403a23af3
Merge pull request #693 from github/release-prep/2.8.1
...
Release preparation for version 2.8.1
2022-02-11 09:38:37 +01:00
Asger Feldthaus
6bfc0a7a1c
Go: use parseConstantOrRange in parseReturn
2022-02-11 08:38:15 +01:00
Asger Feldthaus
66545dbe41
Go: fix parsing of n1..n2 in parseConstantOrRange
2022-02-11 08:35:18 +01:00
Asger Feldthaus
a26bfb0926
Go: add test with Argument[0..2] spec
2022-02-11 08:34:31 +01:00
github-actions[bot]
6f0e1a284f
Release preparation for version 2.8.1
2022-02-10 22:08:16 +00:00
Owen Mansel-Chan
317376583c
Minor changes to qhelp
2022-02-10 13:25:20 +00:00
Owen Mansel-Chan
a008bd4f25
Add a change note
2022-02-10 13:25:20 +00:00
Robin Neatherway
4ba4b5a811
Add query help for WrappedErrorAlwaysNil
2022-02-10 13:25:20 +00:00
Owen Mansel-Chan
98c60f31a6
Simplify comparison of DataFlow::Node and IR::Instruction
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-02-10 13:25:19 +00:00
Owen Mansel-Chan
9b61ed9578
Add query "Wrapped error always nil"
2022-02-10 13:25:19 +00:00
Asger Feldthaus
6d4b4df717
Go: auto format
2022-02-10 13:27:46 +01:00
Asger Feldthaus
f66cad85be
Go: sync FlowSummaryImpl.qll
2022-02-10 13:08:54 +01:00
Chris Smowton
b51b6069fc
Merge pull request #689 from github/codeql-cli-2.8.0-copy
...
Main merged into codeql-cli-2.8.0
2022-02-09 19:21:06 +00:00
Tamas Vajk
29391a173a
Merge branch 'main' into codeql-cli-2.8.0-copy
2022-02-09 18:25:08 +01:00
Tamás Vajk
92862fa4b5
Merge pull request #684 from github/post-release-prep/codeql-cli-2.8.0
...
Post-release preparation for codeql-cli-2.8.0
2022-02-09 18:07:28 +01:00
github-actions[bot]
b3d63aca33
Post-release preparation for codeql-cli-2.8.0
2022-02-09 16:41:28 +01:00
github-actions[bot]
9c12f1a5fa
Release preparation for version 2.8.0
2022-02-09 16:40:48 +01:00
Owen Mansel-Chan
85db49cd00
Merge pull request #685 from github/smowton/fix/windows-2019-ci
...
CI: Run on Windows 2019
2022-02-09 13:33:24 +00:00
Chris Smowton
c547f47ca2
CI: Run on Windows 2019
...
Tracer appears to not yet support win2022
2022-02-09 11:59:53 +00:00
Owen Mansel-Chan
034f3d5e76
Merge pull request #683 from lyoung-confluent/patch-2
...
Match gopkg.in import of squirrel for SQLi query
2022-02-08 12:19:15 +00:00
Luke Young
324f8f7eba
codeql query format
2022-02-07 11:24:02 -08:00
Erik Krogh Kristensen
4c317f5753
apply suggestions from doc review
...
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com >
2022-02-07 09:43:49 +01:00
Luke Young
3b32425567
remove .v1 from gopkg.in
2022-02-03 23:36:11 -08:00
Luke Young
dea1959e21
Match gopkg.in import of squirrel for SQLi query
2022-02-03 13:29:38 -08:00
Robin Neatherway
e3feece94e
Merge pull request #680 from github/rneatherway/example-query
...
Add an example query for inexhaustive switches
2022-02-02 17:33:22 +00:00
Erik Krogh Kristensen
35999a7f8f
add support for fs-extra methods in insecure-temporary-file
2022-02-02 15:14:43 +01:00
Erik Krogh Kristensen
573f17dc63
fix typos in documentation
...
Co-authored-by: Stephan Brandauer <kaeluka@github.com >
2022-02-02 15:00:38 +01:00
Robin Neatherway
4a4b9c30d7
Add an example query for inexhaustive switches
2022-02-02 11:38:15 +00:00
Owen Mansel-Chan
f351924fcc
Merge pull request #679 from owen-mc/add-error-expr-to-dbscheme
...
Add ErrorExpr to dbscheme
2022-02-01 13:32:57 +00:00
Chris Smowton
ee85d6c368
Undo whitespace change
2022-02-01 12:04:38 +00:00
Owen Mansel-Chan
613a85bcfb
Add ErrorExpr to dbscheme
2022-02-01 11:52:51 +00:00
Chris Smowton
d064b17d7b
Merge pull request #678 from smowton/smowton/feature/note-filepath-clean-sanitizer
...
Note that `filepath.Clean("/" + e)` is a sanitizer against path traversal attacks
2022-01-31 10:55:48 +00:00
Chris Smowton
de2ed83b55
Note that filepath.Clean("/" + e) is a sanitizer against path traversal attacks.
2022-01-28 19:32:58 +00:00
Andrew Eisenberg
28461f57ef
Merge pull request #675 from github/aeisenberg/examples-groups
...
Add new groups for examples packs
2022-01-27 09:26:15 -08:00
Tamás Vajk
14d227a232
Merge pull request #677 from github/release-prep/2.8.0
...
Release preparation for version 2.8.0
2022-01-27 13:36:19 +01:00
github-actions[bot]
d545716571
Release preparation for version 2.8.0
2022-01-27 10:40:14 +00:00
Andrew Eisenberg
9e0580da32
Add new groups for examples packs
...
Will make it easier to avoid publishing them.
2022-01-26 14:47:46 -08:00
Edoardo Pirovano
4a3e945346
Merge pull request #676 from github/edoardo/3.4-mergeback
...
Merge `rc/3.4` into `main`
2022-01-25 17:43:55 +00:00
Edoardo Pirovano
cc7b72af41
Merge branch rc/3.4 into main
2022-01-25 16:16:44 +00:00
Tom Hvitved
6a2f4719e8
Merge pull request #672 from github/post-release-prep/codeql-cli-2.7.6
...
Post-release preparation for codeql-cli-2.7.6
2022-01-24 13:01:01 +01:00
Owen Mansel-Chan
daabd3a045
Merge pull request #673 from owen-mc/refactor-returnvalue-n
...
Refactor `ReturnValue[n]` in data flow libraries
2022-01-24 10:47:22 +00:00
Chris Smowton
d6d1c943f1
Merge pull request #674 from erik-krogh/patches
...
use more set literals
2022-01-21 10:59:48 +00:00
Erik Krogh Kristensen
504e7a161d
simplify an redundant any() expression
2022-01-20 22:34:26 +01:00
Erik Krogh Kristensen
99994eeeb1
use set literals instead of big disjunctions
2022-01-20 22:33:40 +01:00
Chris Smowton
38048399d3
Merge pull request #671 from owen-mc/misc-clean-ups
...
Correct module name in file comment
2022-01-20 14:00:46 +00:00
Owen Mansel-Chan
44641de91b
Represent ReturnValue[n] correctly in test output
2022-01-20 13:06:35 +00:00
Owen Mansel-Chan
691bb97fdc
Move ReturnValue[]-specific code to non-shared file
2022-01-20 13:06:35 +00:00
github-actions[bot]
c52caa6322
Post-release preparation for codeql-cli-2.7.6
2022-01-20 12:59:04 +00:00
Owen Mansel-Chan
54855113c4
Correct module name in file comment
2022-01-20 12:30:52 +00:00
Chris Smowton
de07035c27
Merge pull request #670 from github/smowton/admin/remove-committed-binary
...
Delete accidentally committed binary file
2022-01-20 12:28:01 +00:00
Chris Smowton
8111fbb69b
Delete m
2022-01-20 10:57:11 +00:00
Tom Hvitved
8c00d3e643
Merge pull request #669 from github/release-prep/2.7.6
...
Release preparation for version 2.7.6
2022-01-20 10:45:00 +01:00
github-actions[bot]
1e5721b9b9
Release preparation for version 2.7.6
2022-01-20 08:21:09 +00:00
Owen Mansel-Chan
bfae3fdf97
Merge pull request #665 from owen-mc/update-function-get-a-call
...
Update `Function.getACall()`
2022-01-19 23:36:20 +00:00
Chris Smowton
5a2a15c9da
Merge pull request #668 from github/smowton/fix/no-pack-install-verify
...
Don't use codeql pack install --verify
2022-01-19 20:01:42 +00:00
Chris Smowton
7f39b1e12c
Don't use codeql pack install --verify
...
This shouldn't fail, but currently does due to a bug and is unnecessary in any case.
2022-01-19 18:40:05 +00:00
Owen Mansel-Chan
4d1dcb3260
Remove first disjunct as it is a subset of second disjunct
2022-01-19 16:21:06 +00:00
Owen Mansel-Chan
7fd2fff1ba
Merge pull request #666 from owen-mc/tainted-path-add-more-tests
...
Add tests for tainted path query checking the sanitizers and sanitizer guards work
2022-01-19 13:00:57 +00:00
Owen Mansel-Chan
85319b2dbf
Add tests for tainted path sanitizers and sanitizer guards
2022-01-19 09:49:15 +00:00
Owen Mansel-Chan
84f9b74f50
t Improve documentation of Function.getACall
2022-01-18 23:44:34 +00:00
Owen Mansel-Chan
3c02403701
Do not use getACall() when we only want direct calls
...
In both of these locations we do not want calls through interface methods.
2022-01-18 23:36:14 +00:00
Owen Mansel-Chan
1aebf4ccac
Merge pull request #664 from owen-mc/add-change-note-function-getacall
...
Add change note for change to `Function.getACall`
2022-01-18 18:12:29 +00:00
Owen Mansel-Chan
84116e1681
Update ql/lib/change-notes/2022-01-18-function-get-a-call.md
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-18 16:51:07 +00:00
Owen Mansel-Chan
fd1136a777
Add change note for change to Function.getACall
2022-01-18 16:42:57 +00:00
Erik Krogh Kristensen
2433eafef2
add query for detecting insecure temprary files
2022-01-18 14:54:56 +01:00
Tom Hvitved
429a9658e1
Merge pull request #657 from github/post-release-prep/codeql-cli-2.7.5
...
Post-release preparation for codeql-cli-2.7.5
2022-01-17 12:40:24 +01:00
Andrew Eisenberg
a83af5e14c
Merge pull request #661 from github/aeisenberg/changenote-upgrades-removal
...
Changenotes: Add changenotes for upgrades refactoring
2022-01-14 12:12:57 -08:00
Andrew Eisenberg
156588a6a7
Update change note
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2022-01-14 10:32:47 -08:00
Andrew Eisenberg
c86e96bcc2
Merge branch 'main' into post-release-prep/codeql-cli-2.7.5
2022-01-14 08:19:47 -08:00
Andrew Eisenberg
8a4120a08d
Changenotes: Add changenotes for upgrades refactoring
2022-01-12 11:38:43 -08:00
github-actions[bot]
970e8e1f91
Post-release preparation for codeql-cli-2.7.5
2022-01-12 13:28:33 +00:00
Andrew Eisenberg
2b8e4b2ffa
Merge pull request #628 from github/aeisenberg/upgrades/work
...
Push upgrades pack into lib pack
2022-01-11 14:09:06 -08:00
Andrew Eisenberg
6ceebc7d1e
Merge branch 'main' into aeisenberg/upgrades/work
2022-01-11 11:27:35 -08:00
Chris Smowton
6afd570c4c
Merge pull request #658 from smowton/smowton/feature/q-format-directive-is-safe
...
Note that the %q format directive escapes newlines, and therefore prevents log injection
2022-01-11 14:45:40 +00:00
Chris Smowton
6f598a6972
Fix formatting regex comment
2022-01-10 10:49:12 +00:00
Chris Smowton
ae5eadef28
Update ql/lib/semmle/go/frameworks/stdlib/Log.qll
...
Rename class
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2022-01-10 10:24:30 +00:00
Chris Smowton
6b4a50567a
Merge pull request #659 from smowton/smowton/fix/path-transformer-use-realpath
...
Path transformer: use fully resolved path
2022-01-06 19:11:16 +00:00
Chris Smowton
e0a3ec85f3
Path transformer: use fully resolved path
...
This makes source locations consistent between databases that do and don't use the `SEMMLE_PATH_TRANSFORMER` option in the case where the original source location isn't its own realpath (i.e, some parent directory is a symbolic link).
2022-01-05 16:31:31 +00:00
Chris Smowton
749698759a
Note that the %q format directive escapes newlines, and therefore prevents log injection
2022-01-05 16:04:20 +00:00
Chris Smowton
5760841812
Merge pull request #647 from smowton/smowton/admin/not-all-you-fmt-is-log
...
Declassify fmt.Fprintf as a log sink
2022-01-05 14:09:55 +00:00
Andrew Eisenberg
49d239f4bf
Push upgrades pack into lib pack
...
PR Related to https://github.com/github/semmle-code/pull/40918
Removes the upgrades pack and uses ql/lib/upgrades instead.
Also, fix malformed parameter in instruction.
Co-authored-by: Chris Smowton <smowton@github.com >
2022-01-04 11:32:52 -08:00
Tom Hvitved
a0766e08a1
Merge pull request #656 from github/release-prep/2.7.5
...
Release preparation for version 2.7.5
2022-01-04 18:57:50 +01:00
github-actions[bot]
980c162fe3
Release preparation for version 2.7.5
2022-01-04 14:44:48 +00:00
Owen Mansel-Chan
daa55eaae2
Merge pull request #651 from erik-krogh/patches
...
various automatic patches applied to codeql-go
2022-01-04 11:46:20 +00:00
Tom Hvitved
50457d1579
Merge pull request #653 from dbartol/dbartol/move-change-notes
...
Move change notes to proper location
2022-01-04 09:35:29 +01:00
Dave Bartolomeo
171aa8bd62
Move change notes to proper location
2022-01-03 17:38:09 -05:00
Dave Bartolomeo
091906d380
Merge pull request #644 from github/post-release-prep/codeql-cli-2.7.4
...
Post-release preparation for codeql-cli-2.7.4
2022-01-03 17:09:54 -05:00
github-actions[bot]
00aae7cba5
Post-release version bumps
2022-01-03 20:10:43 +00:00
Erik Krogh Kristensen
afe7ee17a0
run the use-set-literals patch
2021-12-20 17:55:19 +01:00
Erik Krogh Kristensen
d339f13629
run the non-us-language patch
2021-12-20 17:54:18 +01:00
Erik Krogh Kristensen
4459c8e7c6
run the redundant-cast patch
2021-12-20 17:53:09 +01:00
jorgectf
ede5d412ac
Update .expected
2021-12-19 19:57:08 +01:00
jorgectf
1b9567a1d8
Avoid using Str_ internal class
2021-12-19 19:56:58 +01:00
Chris Smowton
92d3da5e56
Declassify fmt.Fprintf as a log sink
...
In future we could try harder to find out whether you're Fprintf'ing to stdout, a file named xyz.log etc, but for now this causes Fprintf'ing to an HTTP writer to be mistaken for log-injection rather than just XSS.
2021-12-17 17:07:58 +00:00
Owen Mansel-Chan
da8f8e2eef
Refactor to use SummarizedCallable, sourceElement and sinkElement
2021-12-16 19:35:54 +00:00
Owen Mansel-Chan
ec3dd1e1c0
Revert "Update tests for no flow through receivers when no function body"
...
This reverts commit 06f889fce6 .
2021-12-16 19:35:54 +00:00
Owen Mansel-Chan
9b2f29bbcd
Allow data flow through receiver for modelled methods
2021-12-16 19:35:54 +00:00
Chris Smowton
ede57b6527
Merge pull request #637 from smowton/smowton/fix/log-injection-sanitizers
...
Fix sanitization by strings.Replace[All] in go/unsafe-quoting and go/log-injection
2021-12-16 12:28:40 +00:00
Chris Smowton
f5108449a5
Update change-notes/2021-12-14-strings-replace-sanitizers.md
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2021-12-15 20:07:34 +00:00
Chris Smowton
9de1532735
Add log-injection test using strings.ReplaceAll
2021-12-15 15:35:14 +00:00
Dave Bartolomeo
e1417f18bf
Merge pull request #640 from github/release-prep/2.7.4
...
Release preparation for version 2.7.4
2021-12-14 16:42:40 -05:00
github-actions[bot]
ee6ea0f8cb
Release preparation for version 2.7.4
2021-12-14 21:34:55 +00:00
Dave Bartolomeo
d14ea51954
Merge pull request #639 from github/dbartol/fix-change-notes
...
Fix change notes
2021-12-14 14:32:56 -05:00
Dave Bartolomeo
a3e5b4c99c
Move pre-packaging change notes to old-change-notes directory
2021-12-14 12:46:56 -05:00
Dave Bartolomeo
42ecc9b1c7
Move new change notes to appropriate pack
2021-12-14 12:46:19 -05:00
Chris Smowton
bd806a8ff7
Merge pull request #638 from owen-mc/test-database-sql-models
...
Add missing tests for DatabaseSql function models
2021-12-14 17:22:40 +00:00
Chris Smowton
f86510ee20
Update comment
2021-12-14 12:39:31 +00:00
Chris Smowton
c2b42ce091
Fix sanitization by strings.Replace[All] in go/unsafe-quoting and go/log-injection
2021-12-14 12:37:18 +00:00
Owen Mansel-Chan
6a2a8298dd
Add missing tests for DatabaseSql function models
2021-12-13 14:18:46 -05:00
Chris Smowton
9309abf8cd
Merge pull request #574 from sauyon/dataflow-update
...
Update dataflow libraries and add support for CSV summary flow
2021-12-13 11:28:28 +00:00
Chris Smowton
89b2a2f9b0
Merge pull request #633 from owen-mc/database-sql-model-incorrect
...
Fix incorrect type name in database/sql model
2021-12-13 11:01:38 +00:00
Chris Smowton
559aec1d64
Merge pull request #632 from owen-mc/refactor-variadic-helper-functions-for-builtin-functions
...
Refactor isVariadic helper functions
2021-12-13 10:59:42 +00:00
Chris Smowton
08c10bf97b
Merge pull request #625 from smowton/smowton/fix/minor-perf-improvements
...
Improve performance: join-order AllocationSizeOverflow's source and use `matches` not `regexpFind`
2021-12-13 10:36:02 +00:00
Owen Mansel-Chan
ce27b0da52
Fix incorrect type name in database/sql model
...
This error seems to have been introduced in
36bbf1eeb9
2021-12-12 17:47:52 -05:00
Owen Mansel-Chan
353aa8d603
Refactor isVariadic helper functions
...
Store information more naturally for built-in functions.
2021-12-12 16:56:26 -05:00
Dave Bartolomeo
b57d3296f1
Merge pull request #620 from github/aeisenberg/version-policies
...
Add version policies
2021-12-10 17:39:15 -05:00
Andrew Eisenberg
3cc48fea6a
Merge pull request #622 from github/post-release/v2.7.3
...
Post release/v2.7.3
2021-12-10 10:00:11 -08:00
Chris Smowton
e9e4f5a687
Improve performance: join-order AllocationSizeOverflow's source and use matches not regexpFind
...
The join order fix takes 10 seconds off that predicate; the get-a-flag changes take about 25% off compared to using regexes.
2021-12-10 12:23:50 +00:00
Chris Smowton
facda77852
Dataflow relations: narrow all dataflow nodes before taking product with Configurations
...
This is particularly important for ConversionWithoutBoundsCheckConfig which has 20 configs. By paring DataFlow::Node down to only those that have a local-flow successor, or only those with an isAdditionalFlowStep for some related configuration, the result size can be significantly reduced prior to taking the product against Configuration and finally paring down using config.fullBarrier etc.
Saves about 1m20s per analysis on cockroachdb.
2021-12-09 16:56:38 +00:00
Andrew Eisenberg
cedf55c46e
Update pack dependency
2021-12-09 07:58:14 -08:00
Owen Mansel-Chan
b234ba7f26
Fix bad join order in getAFalsifiedGuard
...
viableParamArg should be evaluated first.
2021-12-08 17:33:59 -05:00
Owen Mansel-Chan
06f889fce6
Update tests for no flow through receivers when no function body
...
This branch originally included a commit to enable flow through receivers
when there is no function body. This was dropped, to be pursued later.
2021-12-08 16:03:18 -05:00
Owen Mansel-Chan
88e7c44a6d
Update expected test results with extra nodes
2021-12-08 15:28:28 -05:00
Owen Mansel-Chan
a01f90b903
Give DataFlowCallable a user-facing name (Callable), move to Scopes.qll
...
I removed asFunctionNode() because it would need an import, but it
doesn't seem to be used anywhere.
2021-12-08 11:30:39 -05:00
Owen Mansel-Chan
a6532b988f
Allow implicit taint reads through more content types
2021-12-08 11:20:38 -05:00
Owen Mansel-Chan
754c838cc0
Fix accidental cartesian product
...
PointerContent needs to have the PointerType specified as well
2021-12-08 11:20:37 -05:00
Owen Mansel-Chan
d70307243c
Fix bad join order in BarrierGuard.guards/2
2021-12-08 11:20:37 -05:00
Owen Mansel-Chan
1a9ea38c0b
Update non-shared dataflow files to match sync
2021-12-08 11:20:36 -05:00
Owen Mansel-Chan
095fe6e4a7
Do not allow "Argument" on its own
...
# Conflicts:
# ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.expected
2021-12-08 11:20:36 -05:00
Sauyon Lee
b2f62b185d
Allow for Return[i] specifications
2021-12-08 11:20:36 -05:00
Owen Mansel-Chan
578a31ecd8
Keep call to defaultTaintSanitizerGuard
2021-12-08 11:20:35 -05:00
Owen Mansel-Chan
01bfbde9ae
Sync dataflow libraries again
2021-12-08 11:20:35 -05:00
Owen Mansel-Chan
1a299d2e09
Update sync-dataflow-libraries target in Makefile
...
The location of the dataflow libraries in codeql-go has changed
and there is a new file to be synced.
2021-12-08 11:20:34 -05:00
Owen Mansel-Chan
16fdb9aa11
Do not test ReturnValue as input for sink
...
The documentation in ExternalFlow.qll does not specify
that "ReturnValue" can be used as the input column.
2021-12-08 11:20:34 -05:00
Owen Mansel-Chan
63b944a1b4
Another instance of getEnclosingFunction -> getRoot
2021-12-08 11:20:34 -05:00
Chris Smowton
3cf1459c4f
Revert getACallee type change
2021-12-08 11:20:33 -05:00
Chris Smowton
6110506e02
Revert "Make getACallee return DataFlowCallable"
...
This reverts commit b4742ccdf81bec3f872923da79953c61dea103f6.
2021-12-08 11:20:33 -05:00
Owen Mansel-Chan
5ec0b09160
Diasble clearing content and add test for it
2021-12-08 11:20:32 -05:00
Owen Mansel-Chan
e940a53cc6
Test models of flow through fields
2021-12-08 11:20:32 -05:00
Owen Mansel-Chan
2d8fd71189
Comment on why summaryDataFlowCall is none()
2021-12-08 11:20:31 -05:00
Owen Mansel-Chan
adf3dc0c61
Move type assertion into declared type
2021-12-08 11:20:31 -05:00
Owen Mansel-Chan
9f763dd044
Move built-in models to ExternalFlow
2021-12-08 11:20:30 -05:00
Owen Mansel-Chan
d717734820
Do not allow "Argument" on its own
2021-12-08 11:20:30 -05:00
Owen Mansel-Chan
d2ca1fb2eb
Address review comments #2
2021-12-08 11:20:29 -05:00
Owen Mansel-Chan
12058a2621
Fix containerStoreStep and containerReadStep
2021-12-08 11:20:29 -05:00
Owen Mansel-Chan
ab8096b717
Add tests for more content types (Element, MapKey, MapValue)
2021-12-08 11:20:28 -05:00
Owen Mansel-Chan
b7aa85b054
Address some review comments
2021-12-08 11:20:28 -05:00
Owen Mansel-Chan
f375553933
Add variadic functions test for function models
2021-12-08 11:20:27 -05:00
Owen Mansel-Chan
b75def62fe
Add variadic functions test for external flow
2021-12-08 11:20:27 -05:00
Owen Mansel-Chan
d9848fe515
Add more tests for variadic functions
2021-12-08 11:20:27 -05:00
Owen Mansel-Chan
8044fb2519
Add more flow tests for external flow
2021-12-08 11:20:26 -05:00
Owen Mansel-Chan
63d997f820
(Unimportant) Fix module name for vendored stubs
...
This doesn't affect the test, but does mean that you can run
`go build` to check the test would build.
2021-12-08 11:20:26 -05:00
Owen Mansel-Chan
1929a1f7a7
Fix unrelated test in experimental
2021-12-08 11:20:25 -05:00
Owen Mansel-Chan
5e38f48b74
Autoformat
2021-12-08 11:20:25 -05:00
Owen Mansel-Chan
a3df3614a5
Convert completetest to an inline flow test
2021-12-08 11:20:24 -05:00
Owen Mansel-Chan
8f7a34f9cb
Fix external flow tests
2021-12-08 11:20:24 -05:00
Owen Mansel-Chan
71bf834765
Fix incorrect assumption
...
node2 doesn't have to be a PostUpdateNode
2021-12-08 11:20:23 -05:00
Sauyon Lee
3379790686
add flow test involving CSV
2021-12-08 11:20:22 -05:00
Sauyon Lee
a632a58221
add CSV models of append
2021-12-08 11:20:22 -05:00
Sauyon Lee
070e383516
allow empty namespaces for Go
2021-12-08 11:20:21 -05:00
Owen Mansel-Chan
70c9ca5611
Update documentation in ExternalFlow.qll
2021-12-08 11:20:21 -05:00
Owen Mansel-Chan
038f951e9f
Fix containerStoreStep
...
Update some comments as well, and change a variable name
2021-12-08 11:20:20 -05:00
Owen Mansel-Chan
be6501d8e4
Add tests for data and taint flow through arrays and var args
2021-12-08 11:20:20 -05:00
Sauyon Lee
2060731077
Add tests for external flow
2021-12-08 11:20:20 -05:00
Rasmus Wriedt Larsen
a650c56c0c
Tag queries with CWE-328
...
CWE-328: Use of Weak Hash, see https://cwe.mitre.org/data/definitions/328.html
2021-12-07 20:54:31 +00:00
Sauyon Lee
873f496038
Use basicLocalFlowStep instead of .getASuccessor
...
This prevents non-monotonic recursion through summary post-update nodes
2021-12-07 07:39:28 -05:00
Sauyon Lee
afe7edc093
Fix test output
...
Includes a bunch of new edges, but no new results
2021-12-07 07:39:28 -05:00
Sauyon Lee
0572c4785c
Model net http sources as csv
2021-12-07 07:39:27 -05:00
Sauyon Lee
bebdb0ba53
Add RangeIndexNode
2021-12-07 07:39:27 -05:00
Sauyon Lee
3750af41d3
Add standard container steps
2021-12-07 07:39:27 -05:00
Sauyon Lee
8c4a1d2559
Consider CSV remote sources as untrusted flow sources
2021-12-07 07:39:26 -05:00
Sauyon Lee
d62f417130
Remove uses of getEnclosingCallable
2021-12-07 07:39:26 -05:00
Sauyon Lee
30ab22f5a6
Fix compilation errors with new DataFlowCallable
2021-12-07 07:39:26 -05:00
Chris Smowton
b10d5cf0b0
Broaden ReturnNode to include return nodes of summaries
2021-12-07 07:39:25 -05:00
Chris Smowton
94d9d08489
Fix DataFlow::Node::getEnclosingCallable
2021-12-07 07:39:25 -05:00
Sauyon Lee
c8a2a6356a
Add summary parameter nodes
2021-12-07 07:39:25 -05:00
Sauyon Lee
4af4a11729
Make getACallee return DataFlowCallable
2021-12-07 07:39:24 -05:00
Sauyon Lee
8cba368ef5
Model archive/tar.FileInfoHeader in CSV
2021-12-07 07:39:24 -05:00
Sauyon Lee
86d3410041
Add asFunctionNode to new dataflowcallable
2021-12-07 07:39:23 -05:00
Sauyon Lee
d9383d9412
Don't use internal predicates in revel
2021-12-07 07:39:23 -05:00
Sauyon Lee
73684f483c
Allow for Return[i] specifications
2021-12-07 07:39:22 -05:00
Sauyon Lee
aa747ea5ff
Fix validation regexes for go
2021-12-07 07:39:22 -05:00
Sauyon Lee
0151cd4f2e
Document SourceOrSinkElement
2021-12-07 07:39:22 -05:00
Sauyon Lee
0b50b7b2b1
Make DataFlowCallable either a Function or a FuncLit
2021-12-07 07:39:21 -05:00
Sauyon Lee
3ac2a50497
Update test output
2021-12-07 07:39:21 -05:00
Owen Mansel-Chan
763861bef9
Keep call to defaultTaintSanitizerGuard
2021-12-07 07:39:21 -05:00
Sauyon Lee
e41d609921
Use newtype for SourceOrSinkElement
2021-12-07 07:39:20 -05:00
Sauyon Lee
9bfe1c94b3
autoformat
2021-12-07 07:39:20 -05:00
Sauyon Lee
16371ac488
Add support for summary elements
2021-12-07 07:39:19 -05:00
Sauyon Lee
96c58b58dd
Add EmptyInterfaceType
2021-12-07 07:39:19 -05:00
Sauyon Lee
26d00f1d5b
Move basicLocalFlowsStep to DataFlowPrivate
2021-12-07 07:39:19 -05:00
Sauyon Lee
3098a4ef16
Qualify uses and add imports in DataFlowNodes
2021-12-07 07:39:18 -05:00
Sauyon Lee
93f2569f1d
Refactor data-flow nodes
2021-12-07 07:39:18 -05:00
Sauyon Lee
9ceda08d13
Sync dataflow libraries
2021-12-07 07:39:12 -05:00
Sauyon Lee
4c67ef2b0b
Add FlowSummaryImpl to sync-dataflow-nodes target
2021-12-02 10:31:01 -05:00
Sauyon Lee
459f4d18a8
Fix sync-dataflow-libraries
2021-12-02 10:31:01 -05:00
Andrew Eisenberg
b714988d7c
Post release 2.7.3
2021-12-01 14:34:07 -08:00
Andrew Eisenberg
e9864c5506
Add version policies
...
This controls how the qlpacks' versions will change
after a release.
2021-12-01 09:37:11 -08:00
Dave Bartolomeo
b2ca04ce1b
Temporarily vendor codeql/suite-helpers
2021-12-01 11:40:10 -05:00
Chris Smowton
894102defd
Merge pull request #621 from owen-mc/extractor-add-variadic-to-type-label
...
Update extractor to distinguish variadic and non-variadic signature types
2021-12-01 15:44:09 +00:00
Owen Mansel-Chan
d0c9aacd54
Distinguish variadic and non-variadic signature types in extractor
2021-12-01 09:33:44 -05:00
Owen Mansel-Chan
628835d3b3
Add failing tests for isVariadic
...
`nonvariadicDeclaredFunction` has the same signature as
`variadicDeclaredFunction`, so it is being erroneously reported as
variadic.
2021-12-01 09:32:12 -05:00
Chris Smowton
e07958d64c
Merge pull request #619 from owen-mc/update-is-variadic
...
Update `isVariadic`
2021-12-01 08:48:16 +00:00
Dave Bartolomeo
02495e16d1
Merge pull request #618 from github/release-prep/2.7.3
...
Release preparation for version 2.7.3
2021-11-30 17:29:49 -05:00
github-actions[bot]
e4b5dceb14
Release preparation for version 2.7.3
2021-11-30 20:39:28 +00:00
Owen Mansel-Chan
e08007b287
Add missing qldocs for two isVariadic() predicates
2021-11-30 15:13:42 -05:00
Owen Mansel-Chan
acc5c4098a
Fix Function.isVariadic to work on external packages
...
Going via `getFuncDecl()` didn't work as we don't function declarations
from external packages. It works to use `getType()` instead.
2021-11-30 15:11:34 -05:00
Owen Mansel-Chan
a6d8deae3e
Add Fmt.Fprint to isVariadic tests
...
We didn't have any tests involving a function in an imported package.
2021-11-30 15:07:57 -05:00
Dave Bartolomeo
9373bdc206
Fix suite-helpers dependency
2021-11-30 11:35:26 -05:00
Dave Bartolomeo
8367fdbec4
Change notes
2021-11-29 16:47:56 -05:00
Dave Bartolomeo
52b68963d2
Prepare for automatic release prep
2021-11-29 16:47:30 -05:00
Erik Krogh Kristensen
adbe19878f
Merge pull request #615 from erik-krogh/explicit-this
...
apply the implicit-this patch to the remaining go code
2021-11-29 17:16:43 +01:00
Chris Smowton
b37fa9c447
Merge pull request #614 from owen-mc/always-extract-empty-interface-type
...
Always extract empty interface type
2021-11-29 12:15:52 +00:00
Erik Krogh Kristensen
1ade6c55d8
apply the implicit-this patch to the remaining go code
2021-11-29 13:10:04 +01:00
Owen Mansel-Chan
f9a3832aa2
Add extractor test that empty interface type exists
2021-11-26 15:16:09 -05:00
Owen Mansel-Chan
d35a46e2f3
Always extract an empty interface type
2021-11-26 15:04:05 -05:00
Tony Torralba
662f880ab8
Merge pull request #609 from github/atorralba/log-injection-query
...
Go: Add Log Injection query (CWE-117)
2021-11-24 15:41:43 +01:00
Tony Torralba
cc8d9bdc7f
Update ql/src/Security/CWE-117/LogInjection.qhelp
...
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com >
2021-11-24 13:57:34 +01:00
Chris Smowton
5ed4e3651b
Merge pull request #611 from tunnelshade/main
...
Add `Where` method of squirrel sql builders to query range
2021-11-23 11:13:19 +00:00
Chris Smowton
ab9ab106e5
Merge pull request #612 from smowton/smowton/fix/zipslip-sanitizer-guard-efficiency
...
Improve ZipSlip sanitizer guard efficiency
2021-11-23 09:35:54 +00:00
tunnelshade
aeaa861fc6
Add Where method of squirrel sql builders to query range
2021-11-23 10:11:31 +05:30
Chris Smowton
271e239dee
Introduce manual magic to TaintedPathSanitizerGuardAsBacktrackingSanitizerGuard
...
This avoids computing the full `localTaint` relation when actually there are few `TaintedPath::SanitizerGuard` instances to start from.
2021-11-22 17:41:56 +00:00
Chris Smowton
8bf78b07e5
Avoid recursively defining DataFlow::BarrierGuard
...
In fact there never was true recursion, but the compiler thought there could be because it supposed that ZipSlip::SanitizerGuard growing may introduce instances that happen to also satisfy TaintedPath::SanitizerGuard. In fact this never happens, but here we make it clear by defining the shared sanitizer guards outside the DataFlow::BarrierGuard hierarchy and then introducing the sanitizers in each query that uses them.
2021-11-22 17:36:06 +00:00
Tony Torralba
f2017b626e
Fix stubs
2021-11-22 09:15:12 +01:00
Tony Torralba
c9332cdccb
Fix *Depth log levels in glog and klog
2021-11-22 09:15:01 +01:00
Tony Torralba
d4a20f1222
Autoformat
2021-11-19 18:04:51 +01:00
Tony Torralba
c886d10388
Add Log Injection query
2021-11-19 17:55:34 +01:00
Chris Smowton
4cae4b23fc
Merge pull request #606 from github/criemen/update-tracing-config
...
Update tracing-config.lua to newest API.
2021-11-17 10:49:20 +00:00
Chris Smowton
b190c4ed4a
Merge pull request #608 from smowton/smowton/fix/missing-id
...
Add missing @id tag
2021-11-16 20:06:06 +00:00
Chris Smowton
33fd1aaf2a
Add missing @id tag
2021-11-16 18:52:41 +00:00
jorgectf
018aa11bb6
Make EmailSender an instance of EmailSender::Range
2021-11-16 13:17:43 +01:00
jorgectf
f35025344c
Merge branch 'jty/python/emailInjection' of https://github.com/jty-team/codeql into jty/python/emailInjection
2021-11-15 23:04:19 +01:00
jorgectf
5bd8de1514
Fix smtplib's _subparts taint config issue
2021-11-15 23:04:17 +01:00
Jorge
a905205f16
Merge branch 'github:main' into jty/python/emailInjection
2021-11-15 16:44:11 +01:00
Jorge
1be823d5e7
Apply suggestions from code review
...
Co-authored-by: ${sleep,5} <52643283+mrthankyou@users.noreply.github.com >
2021-11-15 16:41:51 +01:00
Cornelius Riemenschneider
b3e2a83298
Update tracing-config.lua to newest API.
2021-11-15 12:35:53 +01:00
jorgectf
129a81a2f8
Cover smtplib
2021-11-13 14:24:40 +01:00
jorgectf
e7cb762947
Add SmtpLib to Frameworks.qll and minimal fixes
2021-11-13 14:24:02 +01:00
jorgectf
dbdf102ea6
Make EmailSender an extendable API
2021-11-13 14:23:11 +01:00
jorgectf
63eadc8441
Polish sendgrid modeling
2021-11-13 02:12:58 +01:00
jorgectf
33b6f6fe61
Polish FlaskMail qldocs
2021-11-13 02:12:22 +01:00
jorgectf
1393b5b157
Add django qldocs
2021-11-13 02:11:45 +01:00
Chris Smowton
792bc4bce0
Merge pull request #596 from pupiles/feature/cwe-090
...
CWE-090: Ldap Injection
2021-11-10 11:31:36 +00:00
Chris Smowton
f3ba40e29d
Update test expectations
2021-11-10 09:42:19 +00:00
Chris Smowton
1ebb47feb3
Fix filename spelling error
2021-11-10 09:29:50 +00:00
Chris Smowton
2953a44b36
Revert changes to go.sum
2021-11-10 09:25:40 +00:00
pupiles
4d9ce49816
use stubs libs && add heuristic sanitizers
2021-11-10 14:12:45 +08:00
jorgectf
5b46b90e10
Fix additional taint step variables
2021-11-09 14:41:35 +01:00
pupiles
70a268dc6d
remove redundant reference lib
2021-11-09 21:35:46 +08:00
pupiles
97d4359881
add test code
2021-11-09 21:31:35 +08:00
Chris Smowton
f7e6b0ad5d
Merge pull request #603 from github/criemen/lua-tracing-config
...
Add port of the existing compiler-tracing.spec files to the new Lua tracing infrastructure.
2021-11-09 11:36:03 +00:00
Chris Smowton
2c5fe1dedc
File names should be camel-case
2021-11-09 10:45:09 +00:00
Chris Smowton
bc9300ebf5
Copyedit examples
...
Fragments suffice for illustration, and the two bad and good examples can be easily combined
2021-11-09 10:42:58 +00:00
Chris Smowton
c18b11a470
Copy-edit query:
...
* Regular comments to qldoc
* Improve naming
* Update out-of-date documentation from earlier versions of the query
2021-11-09 10:31:30 +00:00
Chris Smowton
dda425ca8d
Improve query style
...
No need to highlight the sink again in the message when the sink is the alert location to begin with
2021-11-09 10:08:02 +00:00
Chris Smowton
f7c19dea71
Copyedit qhelp
2021-11-09 10:05:18 +00:00
pupiles
7f68f85002
fomat .ql inline comment
2021-11-09 14:42:32 +08:00
Chris Smowton
f96733f270
Merge pull request #602 from github/criemen/update-tracing-config
...
Remove macos compatibility stanzas from tracing config.
2021-11-08 11:46:44 +00:00
Cornelius Riemenschneider
17a9dbfb62
Add port of the existing compiler-tracing.spec files to the new Lua tracing infrastructure.
2021-11-08 12:29:06 +01:00
Cornelius Riemenschneider
a49265fb63
Remove macos compatibility stanzas from tracing config.
2021-11-08 11:27:27 +01:00
jorgectf
c0a0c5d811
Cover footer and subscription_tracking html injection
2021-11-08 10:51:11 +01:00
jorgectf
5774ce2479
Improve django test
2021-11-08 10:34:16 +01:00
jorgectf
f4a73fcc59
Add RFS to sendgrid test
2021-11-08 10:33:57 +01:00
jorgectf
d316974157
Add HtmlContent additional taint step
2021-11-08 10:23:50 +01:00
pupiles
c97d0c6ce5
Remove redundant code
2021-11-05 13:14:28 +08:00
Chris Smowton
d1a2fbe96b
Merge pull request #573 from npesaresi/feature/SSRF
...
Yet another SSRF query for Golang
2021-11-04 17:36:21 +00:00
Chris Smowton
233269869c
Tidy sanitizers, using instanceof not extends or a charpred where possible
2021-11-04 16:26:14 +00:00
Chris Smowton
23855979d5
Include UntrustedFlowSource into ServerSideRequestForgery::Source but not vice versa
2021-11-04 16:19:22 +00:00
Chris Smowton
9e218a70bb
Make imports private
2021-11-04 15:32:37 +00:00
Chris Smowton
18028dca2d
Share repeated regex
2021-11-04 15:30:34 +00:00
Chris Smowton
648a70945d
Copyedit docs and improve naming
2021-11-04 15:30:29 +00:00
Chris Smowton
a9c853257d
Fix qhelp good example
2021-11-04 14:42:54 +00:00
Chris Smowton
5256725359
Copyedit qhelp
2021-11-04 14:41:38 +00:00
valeria-meli
b84f31e918
format
2021-11-04 10:01:38 -03:00
Valeria
9f52a6654e
Merge branch 'main' into feature/SSRF
2021-11-04 09:56:10 -03:00
pupiles
4f1052b3a7
feature add common sanitizer
2021-11-04 13:16:24 +08:00
Chris Smowton
6d90b81655
Merge pull request #597 from owen-mc/var-args
...
Update dbscheme to add table for variadic signature types
2021-11-03 11:29:45 +00:00
Chris Smowton
b023b405b1
Merge pull request #599 from smowton/smowton/fix/comparison-barrier-join-order
...
Improve join order in InsufficientKeySize.ql
2021-11-03 10:08:25 +00:00
Chris Smowton
a10407823a
Merge pull request #600 from owen-mc/incorrect-integer-conversion
...
Improve "Incorrect integer conversion" query
2021-11-02 17:00:29 +00:00
Owen Mansel-Chan
8ea1f87d2b
Add change note
2021-11-02 15:09:43 +00:00
Owen Mansel-Chan
7c1b7b8810
Fix strictnessOffset in isBoundFor
2021-11-02 15:09:39 +00:00
Owen Mansel-Chan
7de6e17d86
Recognise math.MaxInt and math.MaxUint
...
Treat them as if we were on a 32-bit architecture.
2021-11-02 15:09:06 +00:00
Owen Mansel-Chan
a104a50940
Move max int value call into UpperBoundCheckGuard
2021-11-02 15:09:06 +00:00
Owen Mansel-Chan
5027d3fa44
Avoid using getIntValue()
...
Because it does not have a result if the value is
too large to fit in a 32-bit signed integer type
2021-11-02 15:09:05 +00:00
Owen Mansel-Chan
2cc0c80188
Add extra tests
2021-11-02 15:09:05 +00:00
Owen Mansel-Chan
be22373f3e
Move Incorrect Integer Conversion tests to InlineFlowTest
2021-11-02 15:09:00 +00:00
Owen Mansel-Chan
109e3660f8
Split Incorrect Integer Conversion into query and lib files
...
This is in preparation for changing the tests to use inline
expectations
2021-11-02 12:43:54 +00:00
Owen Mansel-Chan
7d333d7dbe
Add InlineFlowTest as simple inline expectation test
2021-11-02 12:43:54 +00:00
Chris Smowton
a92f144469
Improve join order in InsufficientKeySize.ql
2021-11-02 10:54:51 +00:00
Owen Mansel-Chan
644c89b751
Update expected values for tests in the same folders
2021-11-01 21:38:41 +00:00
Owen Mansel-Chan
f2757135f2
Add tests for isVariadic() on FuncDef and Function
2021-11-01 16:00:50 +00:00
Owen Mansel-Chan
e6a57b22a2
Add isVariadic() on FuncDecl and Function
2021-11-01 16:00:49 +00:00
Owen Mansel-Chan
245d85ae97
Update dbscheme to add table for variadic signature types
2021-11-01 16:00:49 +00:00
Chris Smowton
c6c25eeff6
Merge pull request #598 from GleasonK/main
...
Fixed broken/moved/redirected links.
2021-11-01 12:08:59 +00:00
Chris Smowton
b365ac5c31
QL -> CodeQL
2021-11-01 10:43:24 +00:00
Chris Smowton
9cb783dffa
Better link for CONTRIBUTING.md section 4
2021-11-01 10:42:13 +00:00
jorgectf
356b07112a
Cover MimeType.amp as a vulnerable mimetype
2021-10-30 21:19:22 +02:00
jorgectf
3264e7be99
Merge branch 'jty/python/emailInjection' of https://github.com/jty-team/codeql into jty/python/emailInjection
2021-10-30 21:11:30 +02:00
thank_you
d9e4df7f97
Remove unnecessary comment
2021-10-30 14:00:58 -04:00
thank_you
3a4e3d5146
Remove comments from Python example tests
...
Besides removing comments, I also reduced the complexity of some of the Python code examples.
2021-10-30 14:00:51 -04:00
Kevin Gleason
49f4e3742f
Fixed broken/moved/redirected links.
2021-10-29 17:17:17 -04:00
pupiles
adea73da23
Merge branch 'main' into feature/cwe-090
2021-10-29 20:46:50 +08:00
pupiles
cd230bf9d7
feat:add ldap sink &&change code style
2021-10-29 20:44:03 +08:00
Chris Smowton
5cdeb40d6b
Merge pull request #594 from owen-mc/insufficient-key-size-barrier-guard
...
Add barrier guard for comparison in Insufficient Key Size query
2021-10-29 12:32:29 +01:00
Chris Smowton
004beab750
Add a good variant of test case foo10
2021-10-29 11:07:30 +01:00
zhouxufeng
89a03d46ea
add ldap inject source
2021-10-29 11:27:48 +08:00
jorgectf
4afcd9d207
[mrthankyou] smtplib partial modeling.
2021-10-28 19:18:59 +02:00
jorgectf
ba3ea700f5
Add Sendgrid dict data html body modeling
2021-10-28 18:47:54 +02:00
jorgectf
dbf5b24b86
Polish Sendgrid.qll qldoc
2021-10-28 18:26:35 +02:00
zhouxufeng
bcdf17d16f
feat ldap inject
2021-10-28 20:42:06 +08:00
jorgectf
e8e0f0fea8
Add temporary .expected
2021-10-28 14:22:14 +02:00
jorgectf
bf68495102
Polish FlaskMail qldocs
2021-10-28 14:21:43 +02:00
valeria-meli
434571067f
Merge branch 'main' into feature/SSRF
2021-10-28 09:06:58 -03:00
valeria-meli
9615544092
Merge commit 'e784c356916468d4f40b8f47899970c4e75dada9' into main
2021-10-28 09:06:17 -03:00
jorgectf
c9634f3c6f
Fix getFlaskMailArgument()
2021-10-28 13:54:14 +02:00
jorgectf
4c2a4226ef
Merge remote-tracking branch 'origin/main' into jty/python/emailInjection
2021-10-28 13:26:57 +02:00
Owen Mansel-Chan
599c276fd8
Add change note
2021-10-28 10:10:39 +01:00
Owen Mansel-Chan
e0e1a4671a
Address review comments
2021-10-28 10:10:39 +01:00
Owen Mansel-Chan
cdee44bbd1
Add barrier guard for comparison
2021-10-28 10:10:38 +01:00
Chris Smowton
e784c35691
Merge pull request #595 from sauyon/patch-1
...
Add comment to `HasEllpsisTable`
2021-10-27 19:10:12 +01:00
Sauyon Lee
74da4820ee
Add comment to HasEllpsisTable
2021-10-27 08:51:58 -07:00
Andrew Eisenberg
09e70a9b8a
Merge pull request #592 from github/aeisenberg/suite-helpers
...
Update references to suite-helpers
2021-10-25 14:26:06 -07:00
Andrew Eisenberg
4b8909fe10
Update references to suite-helpers
...
Use the new pack names instead of the old names.
2021-10-25 12:11:22 -07:00
Chris Smowton
efecc9ab80
Merge pull request #591 from owen-mc/update-inline-expectations-test
...
Update inline expectations test
2021-10-21 12:41:57 +01:00
Owen Mansel-Chan
f4d9f2f2fa
Remove unused test comments
...
These were introduced in 68dca955 . Currently they aren't doing anything
as there isn't an inline expectation test for the tag "source" in this
folder. It seems they were originally intended to indicate untrusted flow
sources, but they aren't needed as we are using "noflow" to only mark the
places where there isn't a flow.
2021-10-21 11:07:59 +01:00
Owen Mansel-Chan
e01291f880
Put space after MISSING: and SPURIOUS:
...
This is the preferred style now
2021-10-21 11:07:59 +01:00
Owen Mansel-Chan
f38fd5722f
Only one dollar sign in each comment
2021-10-21 11:07:58 +01:00
Owen Mansel-Chan
09ef621b2f
Put space after first dollar sign
2021-10-21 11:07:58 +01:00
Owen Mansel-Chan
b8bd40463e
Reorder MISSING labels
...
The behaviour has changed: previously, "f+:" and "f-:" only affected the
following entry, but "MISSING:" and "SPURIOUS:" affect all following
2021-10-21 11:07:57 +01:00
Owen Mansel-Chan
f28539928a
Quote expected values that have spaces
2021-10-21 11:07:57 +01:00
Owen Mansel-Chan
5f0f04de1c
Update labels for missing and spurious results
2021-10-21 11:07:57 +01:00
Owen Mansel-Chan
7961ba6b93
Add hasActualResult predicate not using Location
2021-10-21 11:07:50 +01:00
Owen Mansel-Chan
a9165ce4a6
Sync InlineExpectationsTest.qll
2021-10-21 05:21:18 +01:00
Chris Smowton
32d71e8247
Merge pull request #585 from github/jbj/getAPrimaryQlClass-file
...
Fix getAPrimaryQlClass for File classes
2021-10-19 11:17:07 +01:00
Chris Smowton
392c084da4
Merge pull request #589 from github/aeisenberg/suites-fix
...
Suites: Switch to the `queries` directive
2021-10-18 19:19:58 +01:00
Andrew Eisenberg
198acac383
Suites: Switch to the queries directive
...
The addition of the `defaultSuite` directive means that using
the `qlpack` directive in a query suite will only return the
queries in the default suite, not _all_ the queries in the
pack as was the prior behaviour. This change ensures that
all query suites resolve to the same queries as before.
2021-10-18 10:00:59 -07:00
Jonas Jensen
61a0c44ef6
Accept test changes: File -> GoFile
2021-10-15 08:04:58 +02:00
Andrew Eisenberg
25dc4f316b
Merge pull request #587 from github/aeisenberg/query-suite
...
Fix recursive reference in query suite
2021-10-14 09:53:56 -07:00
Andrew Eisenberg
de79eac0bb
Fix recursive reference in query suite
...
The line `- qlpack: codeql-go` references the pack's
default suite, which is this suite. Therefore this
reference is recursive and not allowed.
The change here aligns the query pack with other
languages.
2021-10-14 08:24:49 -07:00
Chris Smowton
a0a5462f50
Merge pull request #586 from github/erik-krogh/explicit-this
...
add explicit this qualifiers
2021-10-14 15:39:14 +01:00
Erik Krogh Kristensen
d27f42d287
add explicit this qualifiers
2021-10-14 12:45:14 +02:00
Jonas Jensen
1c245ba636
Fix getAPrimaryQlClass for File classes
2021-10-14 11:37:05 +02:00
Andrew Eisenberg
abe3f2148b
Merge pull request #584 from github/aeisenberg/tutorial
...
Move tutorial directly into each qlpack
2021-10-13 09:32:44 -07:00
Andrew Eisenberg
0786af19fb
Move tutorial directly into each qlpack
...
See also https://github.com/github/codeql/pull/6862
2021-10-12 14:39:15 -07:00
Andrew Eisenberg
fb5186d887
Merge pull request #583 from github/aeisenberg/defaultSuite
...
Add a defaultSuiteFile property
2021-10-12 14:27:40 -07:00
Andrew Eisenberg
705093d709
Fix property name
2021-10-12 13:04:28 -07:00
Andrew Eisenberg
da708c9743
Add a defaultSuite property
2021-10-12 12:48:01 -07:00
Chris Smowton
c6b9db37be
Merge pull request #581 from github/RasmusWL/normalize-qlpack
...
Packaging: Normalize src/qlpack.yml
2021-10-12 11:02:18 +01:00
Rasmus Wriedt Larsen
c7196916aa
Packaging: Normalize src/qlpack.yml
...
Port of 4) from https://github.com/github/codeql/pull/6605
> Dependencies from query packs to other packs are always "*" since
these dependencies are always from source and we should get the
latest.
Compare with [C++ change](https://github.com/github/codeql/pull/6605/files#diff-0236560ca1b9c19eb7c74d8bfecd1c78005e762122f8bcdaee9eb9b20460bf9c ).
2021-10-11 14:36:12 +02:00
Andrew Eisenberg
88ac6d7a40
Merge pull request #566 from dbartol/dbartol/refactor
...
Refactor Go pack into separate library and query packs
2021-10-07 09:41:47 -07:00
Dave Bartolomeo
3ea2152a86
Use a for loop
2021-10-07 11:35:42 -04:00
Dave Bartolomeo
590b4aac2a
Fix PR feedback
2021-10-07 11:00:15 -04:00
Dave Bartolomeo
eed0eab02c
Merge remote-tracking branch 'upstream/main' into dbartol/refactor
2021-10-07 10:49:45 -04:00
Chris Smowton
1c2b46e10d
Merge pull request #578 from github/rasmuswl/fix-hasLocationInfo-url
...
Fix `hasLocationInfo` URL reference
2021-09-29 14:06:01 +01:00
Rasmus Wriedt Larsen
8deaeb4ea1
Fix hasLocationInfo URL reference
...
Port of https://github.com/github/codeql/pull/6775
2021-09-29 13:53:55 +02:00
Chris Smowton
8b3682205b
Merge pull request #577 from intrigus-lgtm/patch-3
...
Update query description
2021-09-27 13:50:08 +01:00
intrigus-lgtm
d26841da57
Update query description
...
A wildcard origin does not allow Access-Control-Allow-Credentials: true.
This change had been made in 824b5a4b52
but I has been forgotten to update the query description.
2021-09-27 13:34:30 +02:00
Natalia Pesaresi
83613ea042
Merge branch 'main' into feature/SSRF
2021-09-24 17:52:51 -03:00
Nati Pesaresi
636000ce01
fix qlref
2021-09-24 17:50:26 -03:00
Nati Pesaresi
1de0b0401a
inheritance fix
2021-09-24 17:14:45 -03:00
Nati Pesaresi
ba552251e9
rm region tags
2021-09-24 17:08:52 -03:00
Chris Smowton
cc1d1d8d1b
Merge pull request #575 from hvitved/remove-reduced-env-var
...
Remove `CODEQL_REDUCE_FILES_FOLDERS_RELATIONS`
2021-09-22 16:51:06 +01:00
Tom Hvitved
9142079902
Remove CODEQL_REDUCE_FILES_FOLDERS_RELATIONS
2021-09-22 09:40:39 +02:00
Nati Pesaresi
a9a36ace3b
validator uuid
2021-09-17 18:01:43 -03:00
Nati Pesaresi
f913b1504a
codeql query format --in-place
2021-09-17 17:54:19 -03:00
Nati Pesaresi
746ce630f4
codeql query format --in-place
2021-09-17 17:53:01 -03:00
Natalia Pesaresi
63bb7ef56c
Merge branch 'main' into feature/SSRF
2021-09-17 17:46:32 -03:00
Nati Pesaresi
9ec35a0f99
merge main
2021-09-17 17:43:35 -03:00
Nati Pesaresi
2a20fe4b0e
beautify names
2021-09-17 17:40:56 -03:00
Natalia Pesaresi
a2bc1b57c1
Merge pull request #1 from npesaresi/feature/SSRF
...
CWE-918
2021-09-17 17:27:04 -03:00
Sauyon Lee
769456ee10
Merge pull request #572 from smowton/smowton/admin/revert-go-list
...
Revert "Merge pull request #554 from xhd2015/accelerate_go_list"
2021-09-16 10:48:18 -07:00
Chris Smowton
c13229d581
Revert "Merge pull request #554 from xhd2015/accelerate_go_list"
...
This reverts commit e5a2b6081d , reversing
changes made to ee893b252c .
2021-09-16 17:16:59 +01:00
Chris Smowton
0214c97589
Merge pull request #569 from smowton/smowton/fix/optimize-guarding-function
...
Use unique aggregate to optimize guardingFunction
2021-09-09 22:02:56 +01:00
Chris Smowton
f6a629ee30
Merge pull request #570 from github/smowton/admin/fix-upgrade-script
...
Fix broken upgrade script
2021-09-09 15:02:38 +01:00
Chris Smowton
848d6c56bb
Fix broken upgrade script
2021-09-09 13:48:14 +01:00
Sauyon Lee
e5a2b6081d
Merge pull request #554 from xhd2015/accelerate_go_list
...
Accelerating go-extractor by using 'go list -deps' instead of just 'go list'
2021-09-02 12:32:02 -07:00
Sauyon Lee
f9ce06b4c0
Check for nil when getting package info
2021-09-02 11:25:58 -07:00
Sauyon Lee
7d3c504c3c
Fix godoc
2021-09-02 11:25:57 -07:00
Sauyon Lee
89c9c7060c
Remove unnecessary environment set
2021-09-02 11:25:57 -07:00
Sauyon Lee
6ed6193973
Remove redundant map assignments and fix some typos
2021-09-02 11:25:57 -07:00
xhd2015
8532605be7
Accelerating go-extractor by using 'go list -deps' instead of just 'go list'
...
Change-Id: Icc77214809a0bb8536d751f21194690d58663dc5
2021-09-02 11:25:57 -07:00
Chris Smowton
88645cf0f1
Use unique aggregate to optimize guardingFunction
2021-08-31 18:38:44 +01:00
Tom Hvitved
ee893b252c
Merge pull request #560 from hvitved/drop-files-folders-columns
...
Drop redundant columns from `files` and `folders` relations
2021-08-26 19:30:35 +02:00
Tom Hvitved
c70a413b71
DB upgrade script
2021-08-26 13:41:44 +02:00
Tom Hvitved
a9a0cffb01
Drop redundant columns from files and folders relations
2021-08-26 13:41:44 +02:00
Sauyon Lee
1ab2c44310
Merge pull request #564 from sauyon/add-cfg
...
Uncomment CFG tests
2021-08-25 18:28:33 -07:00
Sauyon Lee
ec6ac9db7c
Remove useless nodes predicate
2021-08-25 17:16:46 -07:00
Sauyon Lee
630e46e1fd
Exclude files with build constraints from the cfg test
2021-08-25 17:16:46 -07:00
Sauyon Lee
5fbed2b219
Uncomment CFG tests
2021-08-25 17:16:46 -07:00
Dave Bartolomeo
d82580647e
Add reference to codeql/go-examples pack from test pack
2021-08-24 10:31:03 -04:00
Dave Bartolomeo
bcaf218cd4
Update readme with workflow changes
2021-08-24 10:31:03 -04:00
Dave Bartolomeo
bc9764fcde
Invoke bash explicitly for Windows
2021-08-24 10:31:03 -04:00
Dave Bartolomeo
a069fa6fda
Make install script executable
2021-08-24 10:31:03 -04:00
Dave Bartolomeo
7c70745e52
Build target to run codeql pack install
2021-08-24 10:31:02 -04:00
Dave Bartolomeo
3165b8dec1
Script to run codeql pack install
2021-08-24 10:31:02 -04:00
Dave Bartolomeo
12bb6728d1
Fix dependencies for Go test pack
2021-08-24 10:31:02 -04:00
Dave Bartolomeo
26fd45746c
Move Go QL library files into separate pack
2021-08-24 10:31:02 -04:00
Dave Bartolomeo
1726a8b65f
Initial makefile changes for pack refactoring
2021-08-24 10:31:01 -04:00
Dave Bartolomeo
6d829cfdf3
Modernize Go pack definitions
2021-08-24 10:31:01 -04:00
Dave Bartolomeo
b6c250cbff
Ignore .codeql directories
2021-08-24 10:31:01 -04:00
Chris Smowton
a6f3d464ae
Merge pull request #568 from igfoo/igfoo/getPrimaryQlClasses
...
Add getPrimaryQlClasses()
2021-08-24 14:13:50 +01:00
Ian Lynagh
6a86f1a91b
Add getPrimaryQlClasses()
...
This is a non-overridable predicate that concatenates all the
getAPrimaryQlClass() results into a comma-separated string.
2021-08-24 13:03:24 +01:00
Sauyon Lee
4df8fac91c
Merge pull request #559 from sauyon/xorm
...
Add Xorm support
2021-08-23 09:21:19 -07:00
Sauyon Lee
dc00a17fd2
Add Xorm license
2021-08-23 08:15:57 -07:00
sn00py
474287dc9f
Update SQL.qll
...
remove package
2021-08-23 08:15:57 -07:00
sn00py
7fc045e749
Add inline test for xorm
2021-08-23 08:15:57 -07:00
snoopywu
4975dccd34
Format SQL.qll
2021-08-23 08:15:57 -07:00
snoopywu
0174270a03
Add change note
2021-08-23 08:15:56 -07:00
snoopywu
8c608bad21
Add Xorm support
2021-08-23 08:15:56 -07:00
Chris Smowton
647bc51483
Merge pull request #563 from sauyon/go117
...
Add support for Go 1.17
2021-08-23 10:45:24 +01:00
Sauyon Lee
4a1daf173c
fixup model changes
2021-08-19 14:04:38 -07:00
Sauyon Lee
d4aa572109
Add tests for Go 1.17 library changes
2021-08-19 14:02:30 -07:00
Sauyon Lee
c41502de1e
Fix tests for go 1.17
2021-08-19 14:02:29 -07:00
Sauyon Lee
f20922dcc7
Handle - positions in errors
2021-08-19 14:02:29 -07:00
Sauyon Lee
5c7590db53
Exclude beta versions of the CodeQL CLI
2021-08-19 14:02:29 -07:00
Sauyon Lee
ab80f35451
Add change note for 1.17
2021-08-19 14:02:29 -07:00
Sauyon Lee
ef1238cdd3
Add test for conversion panic
2021-08-19 14:02:29 -07:00
Sauyon Lee
cb40498b41
Update actions to use go 1.17
2021-08-19 14:02:29 -07:00
Sauyon Lee
b1e91e578b
Add models for library changes
2021-08-19 14:02:26 -07:00
Sauyon Lee
040b166eb2
Add new style build constraints and add test for the old style
2021-08-19 14:00:04 -07:00
Sauyon Lee
189070cf2c
Add support for go:build style constraints
...
This doesn't account for the new syntax, but there was no syntax
parsing in the old version anyway, and the only user doesn't currently
care about semantics
2021-08-19 14:00:03 -07:00
Sauyon Lee
f39e43e5d0
Allow conversions to an array to panic
2021-08-19 14:00:03 -07:00
Sauyon Lee
2a5e7e24cd
Update dependencies for go1.17
2021-08-19 14:00:03 -07:00
Sauyon Lee
b9871add53
Merge pull request #565 from sauyon/remove-dots
...
Remove non-goific dot in method signatures
2021-08-19 13:41:25 -07:00
Sauyon Lee
ff1eb8ef43
Remove non-goific dot in method signatures
2021-08-19 12:36:59 -07:00
Owen Mansel-Chan
51b3f7f62d
Merge pull request #555 from owen-mc/upstream-weak-crypto-key
...
Promote weak crypto key from experimental
2021-08-18 12:57:27 +01:00
Owen Mansel-Chan
b96efc655e
Improve grammar and punctuation
2021-08-18 11:54:06 +01:00
Owen Mansel-Chan
6f2040da51
Add security severity score
2021-08-18 11:54:06 +01:00
Owen Mansel-Chan
8c97395884
Add change note
2021-08-18 11:54:05 +01:00
Owen Mansel-Chan
3bf2cf0ed8
Add precision metadata
2021-08-18 11:54:05 +01:00
Owen Mansel-Chan
9634e8d7b0
Update path in qlref file
2021-08-18 11:54:04 +01:00
Owen Mansel-Chan
ca01d55297
Promote insufficient key size query
...
Files were just moved - changes made in next commit
2021-08-18 11:54:04 +01:00
Chris Smowton
10e362a0f2
Merge pull request #562 from sauyon/remove-binary
...
Remove accidentally added binary
2021-08-17 19:55:26 +01:00
Chris Smowton
2b6dde8e6c
Merge pull request #561 from github/developer-happiness-query-suite
...
Add a query suite for new experimental "developer happiness" queries
2021-08-17 19:45:44 +01:00
Sauyon Lee
dc50d73008
Remove accidentally added binary
2021-08-17 10:11:04 -07:00
Sam Partington
78a4823bde
Ensure all 3 IDs are considered
...
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com >
2021-08-17 09:53:11 +01:00
Sam Partington
4e36d1f52f
Add a query suite for new experimental "developer happiness" queries
...
These are the queries added in https://github.com/github/codeql-go/pull/558 .
2021-08-16 18:05:31 +01:00
Chris Smowton
fbc65b3f87
Merge pull request #558 from sauyon/add-sample-queries
...
Add sample DB-related queries
2021-08-12 21:55:14 +01:00
Sauyon Lee
4c5d3ff344
Move defer in loop query to experimental
2021-08-12 10:13:30 -07:00
Sauyon Lee
02396dbd04
Add database query in loop query
...
co-authored-by: Robert <robertbrignull@github.com >
co-authored-by: Sam Partington <sampart@github.com >
2021-08-11 18:15:23 -07:00
Sauyon Lee
1ffeb26a61
Add query for a GORM error not checked
...
co-authored-by: Sam Partington <sampart@github.com >
co-authored-by: Robin Neatherway <rneatherway@github.com >
2021-08-11 18:15:23 -07:00
Nati Pesaresi
210d0f3d6a
cwe-918
2021-08-03 17:48:08 -03:00
Shati Patel
65e9262b41
Merge pull request #556 from github/shati-patel-patch-1
...
Update CODEOWNERS
2021-07-28 12:56:48 +01:00
Shati Patel
0c4674cf86
Update CODEOWNERS
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2021-07-28 11:54:25 +01:00
Shati Patel
e83af8e4ea
Update CODEOWNERS
2021-07-28 11:42:33 +01:00
Chris Smowton
e39753c72a
Merge pull request #552 from github/deferinloop-kind
...
Add @kind to deferinloop.ql
2021-07-19 11:17:26 +01:00
Chris Smowton
b03513bcd2
Merge pull request #542 from gagliardetto/cors-misconfig
...
Add query to detect CORS misconfiguration
2021-07-16 16:12:15 +01:00
Chris Smowton
87afdae1c7
use hasFlowTo where possible
2021-07-16 14:38:05 +01:00
Sam Partington
e227a4315f
Add @kind to deferinloop.ql
...
Required to use this query with the CodeQL CLI
2021-07-16 14:25:58 +01:00
Slavomir
52b650a1be
Add AllowOriginHeaderWrite and AllowCredentialsHeaderWrite classes
2021-07-16 00:01:55 +02:00
Slavomir
e92738a93f
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-07-16 00:42:36 +03:00
Chris Smowton
73227f12df
Merge pull request #539 from gagliardetto/fiber
...
Add web framework: github.com/gofiber/fiber
2021-07-15 17:53:45 +01:00
Slavomir
d252d6003f
Remove Protocol as UntrustedFlowSource
2021-07-15 16:20:33 +02:00
Slavomir
498332c186
Mention Fiber.json in Fiber.qll
2021-07-15 15:15:10 +02:00
Slavomir
7d1a632b61
Move fiber spec in the same folder as source
2021-07-15 15:12:02 +02:00
Slavomir
92e0f02d2a
Remove special cases inside if
2021-07-15 15:06:28 +02:00
Slavomir
66bd56f444
Don't use any() as sink
2021-07-05 13:14:56 +02:00
jorgectf
19a626742a
Almost fix getFlaskMailArgument(...)
2021-06-29 17:28:45 +02:00
jorgectf
b5ee7c3032
Specify plain-text body
2021-06-29 17:28:20 +02:00
jorgectf
e0013fcdbb
Fix Concepts.qll dependencies
2021-06-23 21:29:35 +02:00
jorgectf
7b9cbafd62
Move flask_mail to libraries/
2021-06-23 21:28:11 +02:00
jorgectf
70d651184b
Optimize Flask.qll
2021-06-23 21:21:45 +02:00
jorgectf
5e8f9959ef
Extend Sendgrid setters
2021-06-23 20:56:48 +02:00
jorgectf
9563faf918
Add Sendgrid modeling
2021-06-23 20:53:17 +02:00
jorgectf
bf1eb7238e
Cover django.core.mail
2021-06-23 18:37:55 +02:00
jorgectf
8ae864827a
Format ReflectedXSS.qll
2021-06-23 18:37:33 +02:00
jorgectf
355bb5c734
Format Flask.qll
2021-06-23 18:37:11 +02:00
jorgectf
eac5eba9d2
Move tests and qlref to test/
2021-06-23 18:36:44 +02:00
jorgectf
c323fbbf3c
Cover Flask-SendMail (Flask-Mail copy)
2021-06-23 17:26:14 +02:00
jorgectf
ae84df817a
Extend ReflectedXSS query
2021-06-23 17:08:28 +02:00
jorgectf
4c9ecf0d9b
Delete testing class-variable
2021-06-23 00:52:34 +02:00
jorgectf
7956b97ac3
Unit tests move and temporary ql
2021-06-23 00:40:05 +02:00
jorgectf
4d890ddeae
Polish flask_mail tests and code
2021-06-23 00:38:58 +02:00
jorgectf
48cd5062cf
Change EmailSender structure
2021-06-23 00:37:54 +02:00
Chris Smowton
cd1e14ed09
Merge pull request #549 from edoardopirovano/change-pragma
...
Performance: Remove `pragma[noopt]`
2021-06-22 19:14:52 +01:00
thank_you
20f321e623
Remove accidental slash
2021-06-22 13:03:23 -04:00
Edoardo Pirovano
65a34b4aa6
Performance: Remove pragma[noopt]
2021-06-22 10:05:53 +01:00
thank_you
c3eba25b0c
Add query tests
...
Most of these query tests need to be cleaned up. Also, some of these query tests will fail because no user-tainted data is passing into the email bodies that are generated and sent to a victim user.
2021-06-21 19:02:20 -04:00
thank_you
24d4415457
Create EmailClients.qll
2021-06-21 19:01:04 -04:00
Chris Smowton
52028cf363
Merge pull request #547 from edoardopirovano/fix-join-order
...
Performance: Fix bad join ordering
2021-06-21 20:11:22 +01:00
Edoardo Pirovano
a7c656db8b
Performance: Fix bad join ordering
2021-06-21 18:58:35 +01:00
Slavomir
c0f195ba16
Reduce false positives
2021-06-19 22:25:51 +02:00
edvraa
ac777d237d
autoformat
2021-06-17 09:23:26 +01:00
edvraa
0456d4793a
Fix path tracking
2021-06-17 09:23:26 +01:00
edvraa
4576b16f30
Use dataflow gettype
2021-06-17 09:23:26 +01:00
edvraa
062acedd49
Unify and make getValueForFieldWrite private
2021-06-17 09:23:26 +01:00
edvraa
236b623f60
Get rid of NetHttpCookieTrackingConfiguration
2021-06-17 09:23:26 +01:00
edvraa
031a79b8f5
Gorilla Store Save sink
2021-06-17 09:23:26 +01:00
edvraa
8110c3d059
Use HasFlow
2021-06-17 09:23:26 +01:00
edvraa
d60d18a8d0
Stay on dataflow level
2021-06-17 09:23:26 +01:00
edvraa
ed8d025bdf
Dedicated types
2021-06-17 09:23:26 +01:00
edvraa
cba4f0448e
Use package
2021-06-17 09:23:26 +01:00
edvraa
167496edff
Use MethodCallNode and hasQualifiedName
2021-06-17 09:23:26 +01:00
edvraa
5929f66efb
No need for Function f
2021-06-17 09:23:26 +01:00
edvraa
06c328c5aa
Fix comment
2021-06-17 09:23:26 +01:00
edvraa
3ac1b4ba0b
Use CallNode
2021-06-17 09:23:26 +01:00
edvraa
d06f4ca21e
Fix argumnt nr
2021-06-17 09:23:26 +01:00
edvraa
9224a315f1
inline isGinContextCookieFlow
2021-06-17 09:23:26 +01:00
edvraa
4d397d9974
Fix tests
2021-06-17 09:23:26 +01:00
edvraa
5349c98ae1
Comments
2021-06-17 09:23:26 +01:00
edvraa
0b9959e4ef
Default stub
2021-06-17 09:23:26 +01:00
edvraa
d32fa19c12
reformat
2021-06-17 09:23:26 +01:00
edvraa
4eb4787692
simplify expressions
2021-06-17 09:23:26 +01:00
edvraa
f537c479c9
path tracking
2021-06-17 09:23:26 +01:00
edvraa
253abc55d9
get rid of AuthCookieNameConfiguration
2021-06-17 09:23:26 +01:00
edvraa
9c0b83fd34
Use getAPredecessor
2021-06-17 09:23:26 +01:00
edvraa
ff06815db1
Code review
2021-06-17 09:23:26 +01:00
edvraa
cbaad2efb9
Sensitive cookie without HttpOnly
2021-06-17 09:23:26 +01:00
Chris Smowton
191a4c1101
Merge pull request #546 from github/calumgrant/security-severities
...
Add security-severity scores
2021-06-16 14:22:27 +01:00
Calum Grant
975e4d7284
Add security-severity scores
2021-06-15 15:56:57 +01:00
Slavomir
824b5a4b52
Wildcard origin does not allow Access-Control-Allow-Credentials: true
2021-06-05 10:40:28 +02:00
Chris Smowton
db0566c325
Merge pull request #543 from gagliardetto/clevergo-spec
...
Add codemill spec for clevergo
2021-06-03 13:59:59 +01:00
Slavomir
4662358b8d
Add flag checks
2021-06-03 12:53:52 +02:00
Slavomir
56e99b6efb
Convert header values to lowercase before comparing
2021-06-03 10:50:50 +02:00
Sauyon Lee
225a69aa27
Merge pull request #544 from github/erik-krogh/fix-primaryqlclass-typo
...
fix typo in the `getAPrimaryQlClass` implementation for `LabeledStmt`
2021-05-29 18:59:36 +00:00
Erik Krogh Kristensen
47d6412e1c
update expected output
2021-05-29 17:56:03 +00:00
Erik Krogh Kristensen
5b357e936b
fix typo in the getAPrimaryQlClass implementation for LabeledStmt
2021-05-29 19:01:16 +02:00
Slavomir
cb3cbc5e3f
Move spec to the same location of qll
2021-05-27 17:00:19 +02:00
Slavomir
4212eb7ac2
Add codemill spec for clevergo
2021-05-24 15:35:57 +02:00
Slavomir
521039d6a2
Add codemill spec
2021-05-24 15:34:16 +02:00
Slavomir
8525c58e1a
Improve qhelp doc
2021-05-24 15:19:50 +02:00
Slavomir
74f8f1dcdb
Cleanup
2021-05-24 15:19:35 +02:00
Sauyon Lee
1a67f8d867
Merge pull request #530 from edvraa/key
...
CWE-326: Insufficient key size
2021-05-24 01:11:16 +00:00
Slavomir
9d1f13fe9b
Add allowOriginIsWildcardOrNull predicate
2021-05-22 18:32:48 +02:00
Slavomir
924e445ce9
Add missing newline
2021-05-22 18:19:44 +02:00
Slavomir
f261f34f57
Add query to detect CORS misconfiguration
2021-05-22 18:14:13 +02:00
edvraa
c95295aa81
Simplify get int
2021-05-21 12:38:01 +01:00
edvraa
c9c22fd871
Change the message
2021-05-21 12:38:01 +01:00
edvraa
8414759f7d
Code review
2021-05-21 12:38:01 +01:00
edvraa
7e1c57689b
Insufficient key size
2021-05-21 12:38:01 +01:00
Sauyon Lee
d47d0303b0
Merge pull request #541 from smowton/smowton/admin/tag-lines-of-code
2021-05-14 19:11:40 +00:00
Chris Smowton
bc80772075
Tag lines of code query
2021-05-14 18:27:55 +01:00
Chris Smowton
6dcfbe8135
Merge pull request #540 from owen-mc/test-dataflow-pr-5773
...
Sync data-flow libraries
2021-05-12 10:49:33 +01:00
Owen Mansel-Chan
f0fd501a23
No need to cache isUnreachableInCall any more
2021-05-12 08:54:58 +01:00
Owen Mansel-Chan
a86390d850
Sync data-flow libraries
...
As of 2021-05-12
2021-05-12 08:54:11 +01:00
Slavomir
f644194354
Add package predicates
2021-05-10 15:18:47 +02:00
Slavomir
06fac54da3
Add web framework: github.com/gofiber/fiber
2021-05-10 15:12:32 +02:00
Chris Smowton
879666682d
Merge pull request #537 from gagliardetto/fix-clevergo
...
CleverGo: Update generated naming
2021-05-10 12:32:08 +01:00
Chris Smowton
1f9097430e
Merge pull request #535 from owen-mc/update-dataflow-libraries-2021-05-05
...
Update dataflow libraries 2021-05-05
2021-05-10 09:53:32 +01:00
Slavomir
7810461651
Update generated naming
2021-05-09 22:52:07 +02:00
Owen Mansel-Chan
fcbedee4c5
Keep call to defaultTaintSanitizerGuard
2021-05-06 15:06:29 +01:00
Owen Mansel-Chan
349df54905
Ignore lambda data flow for now
2021-05-06 13:57:49 +01:00
Owen Mansel-Chan
daf73553f6
Sync shared dataflow libraries
2021-05-05 16:58:30 +01:00
Chris Smowton
774717d2b8
Merge pull request #522 from gagliardetto/fix-clevergo
...
Improve CleverGo models
2021-04-30 17:11:56 +01:00
Slavomir
ea2909a362
HTTP::HeaderWrite: Don't override string getHeaderValue() with none()
2021-04-30 15:39:09 +01:00
Slavomir
110a3983c1
Regenerate codeql: Refactor HTTP::HeaderWrite
2021-04-30 15:39:09 +01:00
Slavomir
5578afa189
Regenerate using latest codemill generator.
2021-04-30 15:39:09 +01:00
Chris Smowton
0beaa7fdc9
Model content-type setters as HeaderWrites.
2021-04-30 15:39:09 +01:00
Chris Smowton
9ea8b34e47
HTTP ResponseBody: support HeaderWrites with hard-coded header values.
2021-04-30 15:39:09 +01:00
Chris Smowton
3fd2c7d4bb
Note response writers for existing HeaderWrite and HttpRedirect instances
2021-04-30 15:39:09 +01:00
Slavomir
36396df271
HttpResponseBody: Move .getAPredecessor*() to the test query.
2021-04-30 15:39:09 +01:00
Slavomir
989bfa2b1d
Improve naming and comments.
2021-04-30 15:39:09 +01:00
Slavomir
78b403f42e
Stub alternative HTTP::ResponseBody model implementation
2021-04-30 15:39:09 +01:00
Slavomir
ff848a502a
ResponseBody: Use .getAPredecessor*().getStringValue() instead of just .getStringValue()
2021-04-30 15:39:09 +01:00
Chris Smowton
3a0b36cdb8
Merge pull request #531 from sauyon/non-alert-queries
...
Non-alert queries
2021-04-27 17:49:49 +01:00
Sauyon Lee
bfe6e7510d
Evaluate symlinks for the dummy file
2021-04-27 08:32:21 -07:00
Sauyon Lee
d09cb7f228
Remove badpkg.go to make tests location-independent
2021-04-27 01:18:22 -07:00
Sauyon Lee
03c3b15caa
Improve autoformatting check
2021-04-27 01:18:21 -07:00
Sauyon Lee
27b72b53e5
Add diagnostic queries
2021-04-27 01:18:21 -07:00
Sauyon Lee
9f85846980
Add lines of code summary query
2021-04-27 01:18:20 -07:00
Sauyon Lee
fa5cb652d8
Fix lines of code counting
2021-04-27 01:18:20 -07:00
Sauyon Lee
ed978e439f
Add GoFile and move HtmlFile to Files.qll
2021-04-27 01:18:19 -07:00
Sauyon Lee
2a80a60468
Add GeneratedFile concept
2021-04-27 01:18:19 -07:00
Sauyon Lee
3393588353
Move concepts imports to Concepts.qll
2021-04-27 01:18:18 -07:00
Sauyon Lee
7a790340ed
Merge pull request #526 from sauyon/fix-bad-error-locs
...
Extract dummy files for errors without locations
2021-04-27 01:07:22 -07:00
Sauyon Lee
b808c187cf
Add test with curly braces in filename
2021-04-21 21:14:41 -07:00
Sauyon Lee
f15b65d07e
Extract dummy files for errors with no location
2021-04-21 21:14:40 -07:00
Sauyon Lee
488f7f5b9b
Use pre-transformed path for extractor fileinfo
2021-04-21 21:14:40 -07:00
Chris Smowton
90c4b5d63f
Switch to using HTML entities for escaping
2021-04-21 21:14:39 -07:00
Chris Smowton
06c958e61f
Extractor: tolerate curly braces in struct field tags, directory names
...
These previously produced malformed TRAP. I have checked the other uses of GlobalID and don't see any others that should require escaping.
2021-04-21 21:14:39 -07:00
Sauyon Lee
466d87684d
Merge pull request #528 from sauyon/tuple-map-read
2021-04-21 08:50:40 -07:00
Chris Smowton
9ab1a8d144
Reword change note
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2021-04-21 15:28:28 +01:00
Chris Smowton
e50ad90856
Elaborate comment and change-note a little
2021-04-21 12:36:43 +01:00
Chris Smowton
a152eec9f2
Add test for ExtractTupleElementInstruction.getResultType()
2021-04-21 12:33:51 +01:00
Chris Smowton
4fb714f445
Simplify implementation of ExtractTupleElementInstruction.getResultType
2021-04-21 12:33:00 +01:00
Sauyon Lee
7efbcec50d
Add change note
2021-04-20 23:27:03 -07:00
Sauyon Lee
50bb6187b8
Revert ReflectedXss.go to example
2021-04-20 23:27:03 -07:00
Sauyon Lee
d1daca541e
Add types for more tuple extractions
...
Specifically, extractions where the RHS is a map element read or a channel receive
will now have types.
2021-04-20 14:23:31 -07:00
Sauyon Lee
ba2da6d9a9
Add test exercising channel data flow
2021-04-20 14:23:31 -07:00
Chris Smowton
0cef5fb5d0
Add test case for map extraction
2021-04-20 14:23:29 -07:00
Chris Smowton
f40211bd20
Merge pull request #527 from smowton/smowton/fix/http-request-taint-tracking
...
Improve net/http taint-tracking fidelity
2021-04-20 12:40:19 +01:00
Chris Smowton
b2e92fa084
Remove needless model of Part.Read
...
Read already gets a model as an implementation of the `Reader` interface.
2021-04-20 11:05:36 +01:00
Chris Smowton
948e064440
Fix mis-modelling Part.Read
2021-04-20 11:03:17 +01:00
Chris Smowton
027a540c67
Update test expectations now that tuple-extracts not method calls are sources
2021-04-19 17:05:50 +01:00
Chris Smowton
a367950014
Restore OpenRedirect's exclusion of POST-only request components
2021-04-19 17:05:23 +01:00
Chris Smowton
685f4fa2a6
Add change note
2021-04-19 16:13:16 +01:00
Chris Smowton
7d258ae722
Improve net/http taint-tracking fidelity
...
* Don't taint error returns from http.Request methods
* Track taint across mime/multipart.Part methods
2021-04-19 16:05:23 +01:00
Chris Smowton
dbcf1e1cfa
Merge pull request #520 from sauyon/add-diagnosticfile
...
Add a new diagnostics file class and use it for errors
2021-04-09 15:48:57 +01:00
Sauyon Lee
80fe7384cd
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-04-09 14:30:23 +01:00
Sauyon Lee
4462948cfc
Add a new diagnostics file class and use it for errors
2021-04-09 14:30:23 +01:00
Chris Smowton
46b5f11457
Merge pull request #438 from gagliardetto/clevergo
...
Pilot #0 : Add web framework `clevergo`
2021-04-09 09:48:58 +01:00
Slavomir
8e839f376e
Put all tests file in to the CleverGo folder instead of having dedicated folders for each test.
2021-04-09 08:38:37 +01:00
Slavomir
4ae5bdbbec
Improve naming of files and elements.
2021-04-09 08:38:37 +01:00
Slavomir
7ea0434514
Move clevergo framework to experimental
2021-04-09 08:38:37 +01:00
Slavomir
3915305361
Refactor and improve HTTP:ResponseBody models and tests
2021-04-09 08:38:37 +01:00
Slavomir
8c18aa6cbd
Simplify HTTP::HeaderWrite
2021-04-09 08:38:37 +01:00
Slavomir
7edf739602
Model HTTP::HeaderWrite; regenerate stubs
2021-04-09 08:38:37 +01:00
Slavomir
93ff2459d1
Use docs instead of comments for classes.
2021-04-09 08:38:36 +01:00
Slavomir
0fe7050e7e
Add models for HTTP::ResponseBody
2021-04-09 08:38:36 +01:00
Slavomir
98b3cc2dc4
Fix autoformatting
2021-04-09 08:38:36 +01:00
Slavomir
c53d8d3e56
Add http redirect model
2021-04-09 08:38:36 +01:00
Slavomir
55c8d9b22c
Make naming more consistent
2021-04-09 08:38:36 +01:00
Slavomir
1de7196060
Regenerate dep stubs
2021-04-09 08:38:36 +01:00
Slavomir
0c1ae62ce9
Use //go:generate depstubber --vendor --auto
2021-04-09 08:38:36 +01:00
Slavomir
f95f35387f
Cleanup comments
2021-04-09 08:38:36 +01:00
Slavomir
bdc5f90c97
Cleanup comments
2021-04-09 08:38:36 +01:00
Slavomir
d3d7d2d103
Simplify UntrustedSources struct fields
2021-04-09 08:38:36 +01:00
Slavomir
c01259ec2c
Simplify UntrustedSources interface methods
2021-04-09 08:38:36 +01:00
Slavomir
54abdf1a95
Regenerate tests
2021-04-09 08:38:36 +01:00
Slavomir
a6c1acfaba
Fix imports
2021-04-09 08:38:36 +01:00
Slavomir
a90f609c53
Manually add packagePath() predicate
2021-04-09 08:38:36 +01:00
Slavomir
928c12da57
Simplify UntrustedSources methods
2021-04-09 08:38:36 +01:00
Slavomir
34dcf83e11
Fix module doc
2021-04-09 08:38:36 +01:00
Slavomir
11326eb34c
Update ql/src/semmle/go/frameworks/CleverGo.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-04-09 08:38:36 +01:00
Slavomir
c4ee6175b8
Add back bindingset to packagePath
2021-04-09 08:38:36 +01:00
Slavomir
7c62c63584
codeql: add packagePath predicate
2021-04-09 08:38:36 +01:00
Slavomir
dfbad0edb9
Regenerate code implementing the code review feedback
2021-04-09 08:38:36 +01:00
Slavomir
1bfe395662
Remove import DataFlow::PathGraph
2021-04-09 08:38:36 +01:00
Slavomir
6d9b7d3240
Add web framework: clevergo
2021-04-09 08:38:35 +01:00
Chris Smowton
7bf5abf6b0
Merge pull request #493 from gagliardetto/html-template-escaping-passthrough
...
Add CWE-79: HTML template escaping passthrough
2021-04-08 20:36:54 +01:00
Slavomir
68c0073c0b
Use PassthroughTypeName instead of string
2021-04-08 14:24:35 +01:00
Slavomir
7c35902724
Use DataFlow::Node as parameters
2021-04-08 14:24:35 +01:00
Slavomir
dc95902e56
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-04-08 14:24:35 +01:00
Slavomir
1a9b09e8bd
Add NumericType sanitizer
2021-04-08 14:24:35 +01:00
Slavomir
541c411086
Add isSanitizer predicate to FlowConfFromUntrustedToTemplateExecutionCall, and a test for it
2021-04-08 14:24:35 +01:00
Slavomir
8f124f8395
Add missing docs
2021-04-08 14:24:35 +01:00
Slavomir
e2b7c035ad
Use only one instance of TaintTracking.
2021-04-08 14:24:35 +01:00
Slavomir
280ffdf060
Fix test
2021-04-08 14:24:35 +01:00
Slavomir
5351a8eeb7
Use TaintTracking an TaintTracking2
2021-04-08 14:24:35 +01:00
Slavomir
b42d21f740
Improve comments and naming.
2021-04-08 14:24:35 +01:00
Slavomir
d5355eb6b4
Cleanup
2021-04-08 14:24:35 +01:00
Slavomir
cc31cd2fe2
Fix test
2021-04-08 14:24:35 +01:00
Slavomir
0bb5ef6af2
Fix test
2021-04-08 14:24:35 +01:00
Slavomir
7b4a748793
Remove DummySource
2021-04-08 14:24:35 +01:00
Slavomir
7e9f23ab8e
Refactor flow logic to ensure untrusted flows to conversion, and conversion flows to template-exec.
2021-04-08 14:24:35 +01:00
Slavomir
963631dedf
Improve naming.
2021-04-08 14:24:35 +01:00
Slavomir
687e556df6
Fixes from code review
2021-04-08 14:24:35 +01:00
Slavomir
ad91e4abcb
Remove DummySource
2021-04-08 14:24:35 +01:00
Slavomir
63d51205c9
Apply suggestions from code review
...
Co-authored-by: Sauyon Lee <sauyon@github.com >
2021-04-08 14:24:35 +01:00
Slavomir
49894341a8
Add CWE-79: HTML template escaping passthrough
2021-04-08 14:24:35 +01:00
Sauyon Lee
29bf388b83
Merge pull request #519 from sauyon/fix-consistency
...
Extract files for error locations
2021-04-02 01:37:11 -07:00
Chris Smowton
c742a131de
Remove filename containing hiragana
...
Good test, but unfortunately it turns out our ODASA build under Windows can't cope -- we get `make: *** No rule to make target 'language-packs/go/ql/test/library-tests/semmle/go/Files/�.go', needed by 'target/general/go-tools/output/tools/tokenizer.jar'. Stop.`
Evidently our windows Actions build *does* work, so this is possible in principle, but let's not delay this PR finding out the exact reasons why right now.
2021-04-01 08:57:15 +01:00
Sauyon Lee
4451920ada
fixup windows
2021-03-31 08:56:34 -07:00
Sauyon Lee
9b60aff45e
Sort extractor smoke test output
2021-03-31 08:12:19 -07:00
Sauyon Lee
44cb8f4f0f
Check database consistency in smoke tests
2021-03-31 03:37:55 -07:00
Sauyon Lee
cd6fb7d699
Extract files for error locations
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-03-31 03:37:55 -07:00
Sauyon Lee
7e3e2f9adf
Add file tests
2021-03-31 02:01:26 -07:00
Owen Mansel-Chan
2ef85291fd
Merge pull request #492 from owen-mc/promoted-field-data-flow-non-pointer-type
...
Add control flow nodes for implicit fields reads when reading a promoted field
2021-03-30 11:15:55 +01:00
Owen Mansel-Chan
2fce333a0b
Fix bad join order in getBaseInstruction
...
It was joining on the index first, rather than the selector expression
2021-03-30 10:13:31 +01:00
Owen Mansel-Chan
3e57ea0e75
Fix Revel template test
...
We want the controller, which is the type which embeds *Revel.Controller.
We have to skip the implicit field reads to get to the base of the selector
expression.
2021-03-30 10:13:30 +01:00
Owen Mansel-Chan
b507c0d584
Add implicit field reads for promoted method calls
2021-03-30 10:13:30 +01:00
Owen Mansel-Chan
a89a42df6f
Expand PromotedField to PromotedValueEntity
...
This includes promoted methods as well
2021-03-30 10:13:29 +01:00
Owen Mansel-Chan
770c770a8f
Add tests for promoted methods
...
We need implicit field reads for calls to promoted methods.
False negative flags have been added to make this pass on main.
2021-03-30 10:13:29 +01:00
Owen Mansel-Chan
42300819a5
Remove incorrect assumption
...
Now that we have implicit field reads, it is no longer the case
that the base of a field read instruction will be an eval
instruction.
2021-03-30 10:13:28 +01:00
Owen Mansel-Chan
44b4e211c1
Make ImplicitFieldReadInstruction extend ImplicitFieldReadInstruction
...
This avoids some code duplication.
2021-03-30 10:13:28 +01:00
Owen Mansel-Chan
00aac808d2
Address review comments
2021-03-30 10:13:27 +01:00
Owen Mansel-Chan
a5293fa835
Use index to determine selector base
2021-03-30 10:13:27 +01:00
Owen Mansel-Chan
015c0537c2
Add index to FieldReadInstruction
2021-03-30 10:13:27 +01:00
Owen Mansel-Chan
0d071b2119
Use depth for implicit field selection
2021-03-30 10:13:26 +01:00
Chris Smowton
204e313c3b
Improve documentation
2021-03-30 10:13:26 +01:00
Chris Smowton
6645613eb8
Deduplicate and document helper types
2021-03-30 10:13:25 +01:00
Chris Smowton
9a427931b7
Explicitly walk pointer types
...
In a previous draft these could use getBaseType*
2021-03-30 10:13:25 +01:00
Chris Smowton
660ba4e31c
Optimise selectorBase, similar to existing work on implicitFieldRead
2021-03-30 10:13:25 +01:00
Chris Smowton
8cde56dfc2
Neaten and fix documentation of selectorBase
2021-03-30 10:13:24 +01:00
Chris Smowton
9444774895
Add further hints that the range of possible addressed fields, and therefore the interesting selector expressions, are small
2021-03-30 10:13:24 +01:00
Chris Smowton
22a3fccf79
Use type to hint that constraining to embedded fields is a good first step
...
This improves the join order for `implicitFieldSelection`
2021-03-30 10:13:23 +01:00
Sauyon Lee
e1b4867a19
Refactor embedded field calculation to expose access chain
...
This allows us to reuse the embedded field calculation in the
logic for generating implicit field selection nodes.
2021-03-30 10:13:23 +01:00
Owen Mansel-Chan
c192a255c5
Add change note
2021-03-30 10:13:22 +01:00
Owen Mansel-Chan
f1b6139ace
Update expected results for ZipSlip to include implicit field reads
2021-03-30 10:13:22 +01:00
Owen Mansel-Chan
13cd19ee40
Make ImplicitFieldReadInstruction include implicit deref when needed
...
When an ImplicitFieldReadInstruction reads an embedded field which has
a pointer type, it now includes the implicit dereference.
It might be better to extend MkImplicitDeref to cover this case, so we have
an explicit instruction for this. Then it would be easier to see when
dereferences are happening, and hence when they might cause a nil pointer
dereference.
2021-03-30 10:13:22 +01:00
Owen Mansel-Chan
2d3caf48c1
Add implicit field reads for promoted fields
...
This may not work when the embedded fields are pointer types, as
we don't have anything corresponding to MkImplicitDeref
2021-03-30 10:13:21 +01:00
Owen Mansel-Chan
7ded91e81d
Make depth of promoted fields accessible
2021-03-30 10:13:21 +01:00
Owen Mansel-Chan
b6dddd36e1
Update FieldTarget.getBaseType()
...
It wasn't defined when `getBase()` was an EvalImplicitDerefInstruction.
Rewriting it like this means it should work no matter what type of
instruction `getBase()` is.
2021-03-30 10:13:20 +01:00
Owen Mansel-Chan
b32b3157d4
(Minor) Add missing this. to method call
2021-03-30 10:13:19 +01:00
Sauyon Lee
3045eec63d
Merge pull request #518 from smowton/smowton/fix/restore-extraction-under-codeql
...
Tolerate empty-string CODEQL_PLATFORM, and add smoke tests
2021-03-29 13:55:27 -07:00
Chris Smowton
87d8bc8d6f
Add basic extractor smoke test
...
This exercises the extractor via 'codeql', with and without tracing.
2021-03-29 14:53:44 +01:00
Chris Smowton
23b8af3a56
Tolerate empty-string CODEQL_PLATFORM
...
This is normal when invoked with tracing disabled, so we also don't log when this happens.
2021-03-29 11:34:50 +01:00
Chris Smowton
a8422ffe26
Merge pull request #517 from smowton/smowton/fix/restore-extraction-under-odasa
...
Unify two implementations of GetExtractorPath
2021-03-25 19:35:24 +00:00
Chris Smowton
aef0a07a50
Prefer CODEQL_* environment variables when set
2021-03-25 16:20:16 +00:00
Chris Smowton
244f66c358
Make diagnostics test platform-neutral
2021-03-25 14:44:18 +00:00
Chris Smowton
c2c88b0835
Unify two implementations of GetExtractorPath
...
This retains both their features:
* The new util.go one cached its result.
* The old go-autobuilder.go one worked under ODASA, where CODEQL_GO_EXTRACTOR_ROOT is unset but os.Executable is a useful substitute.
2021-03-25 11:24:39 +00:00
Aditya Sharad
a9235d4c76
Merge pull request #516 from github/adityasharad/actions/remove-docs-review-workflow
...
Actions: Remove docs-review workflow
2021-03-24 12:31:29 -07:00
Aditya Sharad
1937664c66
Actions: Remove docs-review workflow
...
Being replaced by internal automation that polls the repo for open labelled PRs, since this workflow currently cannot tag the docs team in a comment.
2021-03-24 11:25:08 -07:00
Tom Hvitved
ef50020cce
Merge pull request #514 from github/merge-rc/3.1
...
Merge branch 'rc/3.1' into 'main'
2021-03-23 10:28:50 +01:00
Tom Hvitved
e119e15f84
Merge branch 'rc/3.1' into 'main'
2021-03-23 09:10:20 +01:00
Sauyon Lee
5de362edd8
Merge pull request #510 from simon-engledew/patch-1
...
Add an example query for catching cases where defer is used in a loop.
2021-03-22 11:08:34 -07:00
Chris Smowton
af9c7c0dd9
Merge pull request #512 from smowton/smowton/admin/pick-performance-fix-onto-rc-31
...
Apply package perf fix to rc/3.1
2021-03-21 11:59:32 +00:00
Sauyon Lee
bcee55c402
Remove now-unnecessary bindingset annotations
2021-03-20 18:54:26 +00:00
Sauyon Lee
426a65b981
Restrict 'package' to real package paths
2021-03-20 18:54:26 +00:00
Simon Engledew
43b4cd69f8
Add review feedback
2021-03-19 14:21:45 +00:00
Simon Engledew
c6ae48f090
Create deferinloop.ql
...
Add example query for highlighting defers inside loops.
2021-03-19 13:16:21 +00:00
Sauyon Lee
d73d0f3b79
Merge pull request #499 from sauyon/extractor-profiling
...
Extract diagnostic information
2021-03-19 05:36:30 -07:00
Sauyon Lee
92c5999c4d
Update stats
2021-03-19 04:34:16 -07:00
Sauyon Lee
394feb03f1
Add tests for extractor diagnostics
2021-03-19 04:34:16 -07:00
Sauyon Lee
104b9cffbd
Extract extractor diagnostic information
2021-03-19 04:34:15 -07:00
Sauyon Lee
1ca2164058
Add GetExtractorPath util function
2021-03-19 04:34:14 -07:00
Sauyon Lee
95f93b8641
Add FileFor utility function for trap files
2021-03-19 04:34:14 -07:00
Sauyon Lee
d8885c580a
Add extractor diagnostic tables to the database
2021-03-19 04:34:13 -07:00
Sauyon Lee
25cc1b451d
Add support for float dbscheme columns
2021-03-19 04:30:01 -07:00
Sauyon Lee
104f58151c
Merge pull request #473 from sauyon/revel
...
Add models for Revel and HTML templates
2021-03-18 18:21:53 -07:00
Sauyon Lee
f2b390af5f
Force git not to modify line endings for HTML test files as well
2021-03-18 10:54:34 -07:00
Sauyon Lee
870fcb4531
Explicity pass working directory to index-files
2021-03-18 10:54:33 -07:00
Sauyon Lee
012825323d
Add change note
2021-03-18 10:54:33 -07:00
Sauyon Lee
68dca955a8
Rework tests and fix output
2021-03-18 10:54:32 -07:00
Sauyon Lee
c2321bd365
Add support for XSS sink kinds
2021-03-18 10:51:16 -07:00
Sauyon Lee
9f5a9cf7b8
Add HTTP template response body concept
2021-03-18 10:51:15 -07:00
Sauyon Lee
844f0e49a6
Add getEnclosingTextNode to template statements
2021-03-18 10:51:15 -07:00
Sauyon Lee
96d2777431
Add models for Revel raw templates
2021-03-18 10:51:14 -07:00
Sauyon Lee
4932574083
Add HTML template variable model
2021-03-18 10:51:14 -07:00
Sauyon Lee
e3f68771fc
Add VariableWithFields
2021-03-18 10:51:13 -07:00
Sauyon Lee
8438b893ec
Add HTML tracing capability
2021-03-18 10:51:12 -07:00
Sauyon Lee
ff2034d122
Merge pull request #506 from sn00pyd0g3/add-transport-roundtrip
...
Add Transport.RoundTrip()
2021-03-18 09:40:24 -07:00
sn00py
22c3110602
Update change-notes/2021-03-16-nethttp-updated.md
...
Co-authored-by: Sauyon Lee <sauyon@github.com >
2021-03-18 23:32:23 +08:00
snoopywu
4abf6bbbff
Merge branch 'add-transport-roundtrip' of https://github.com/sn00pyd0g3/codeql-go into add-transport-roundtrip
2021-03-16 23:55:16 +08:00
sn00py
263d813b58
Merge branch 'main' into add-transport-roundtrip
2021-03-16 23:54:53 +08:00
snoopywu
af60a448ad
Merge branch 'add-transport-roundtrip' of https://github.com/sn00pyd0g3/codeql-go into add-transport-roundtrip
2021-03-16 23:53:52 +08:00
snoopywu
161ce91159
Add changenote for #506
2021-03-16 23:51:26 +08:00
Chris Smowton
772b9b8178
Merge pull request #507 from owen-mc/cache-tcontrolflownode
...
Cache TControlFlowNode
2021-03-16 14:45:35 +00:00
Owen Mansel-Chan
f9c4e12c95
Make this. explicit
2021-03-16 13:40:58 +00:00
Owen Mansel-Chan
ea7ecbaa55
Add hint so optimizer doesn't choose bad join order
2021-03-16 13:40:58 +00:00
Owen Mansel-Chan
c940eb61e7
Cache TControlFlowNode
2021-03-16 13:40:58 +00:00
Chris Smowton
ea2b3906b9
Merge pull request #508 from sauyon/change-note-fix
...
Fix change note checker
2021-03-16 13:37:19 +00:00
Sauyon Lee
645e9867a4
Fix change note checker
2021-03-16 06:23:54 -07:00
sn00py
4318ffee3e
Merge branch 'main' into add-transport-roundtrip
2021-03-16 16:52:37 +08:00
Owen Mansel-Chan
8318dcf971
Merge pull request #502 from owen-mc/find-latest-codeql-cli-automatically
...
Find latest release of the CLI automatically
2021-03-16 06:22:50 +00:00
snoopywu
cee30cfde4
fix: autoformat
2021-03-16 01:43:33 +08:00
sn00py
00f12f9210
Update ql/src/semmle/go/frameworks/stdlib/NetHttp.qll
...
Co-authored-by: Sauyon Lee <sauyon@github.com >
2021-03-16 00:41:52 +08:00
Owen Mansel-Chan
52a535463d
Find latest release of the CLI automatically
...
Also download OS-specific zip files while we're at it.
There are two files in `codeql-win64.zip` called `codeql/codeql` and
`codeql/codeql.exe`. Because of the order they were put into the zip,
they come out in the order `codeql/codeql.exe` followed by
`codeql/codeql`, and something on Windows thinks that the second file
has the same name as the first. It's because it's trying to emulate
linux and running `codeql/codeql` could run either one of them. We need
to make sure we definitely have the `.exe` file, so we explicitly
extract it again afterwards. This workaround is already used in some
other places. The order that the zip file is made in has now been fixed
so this shouldn't be a problem for future releases, so this workaround
can be removed in future.
2021-03-15 09:25:51 +00:00
snoopywu
e1219480d8
Add Transport.RoundTrip()
2021-03-13 03:17:58 +08:00
Owen Mansel-Chan
4b004b8f25
Merge pull request #501 from owen-mc/add-problem-matchers-to-ci
...
Highlight error messages in CI
2021-03-12 15:22:33 +00:00
Cornelius Riemenschneider
1f4b91dcb0
Merge branch 'main' into add-problem-matchers-to-ci
2021-03-12 14:53:20 +01:00
Chris Smowton
c58ae845e0
Merge pull request #497 from sauyon/package-restrict
...
Fix performance issue with 'package'
2021-03-12 11:17:38 +00:00
Owen Mansel-Chan
ea7af2e4a2
Highlight error messages in CI
...
Copied problem-matchers from github/semmle-code, which is used for
running CI for github/codeql.
2021-03-11 17:14:38 +00:00
Owen Mansel-Chan
dcc1de4797
Merge pull request #500 from owen-mc/add-missing-qldoc
...
Add missing QLDoc for public declarations
2021-03-11 15:52:39 +00:00
Owen Mansel-Chan
5b09d35668
Add missing QLDoc for public declarations
2021-03-11 15:36:31 +00:00
Sauyon Lee
db20119267
Remove now-unnecessary bindingset annotations
2021-03-10 08:58:45 -08:00
Sauyon Lee
8ad1010860
Restrict 'package' to real package paths
2021-03-10 08:58:41 -08:00
Aditya Sharad
fecf265641
Merge pull request #496 from github/adityasharad/actions/docs-review-fix
...
Actions: Fix comment that tags the Docs team
2021-03-08 10:53:28 -08:00
Aditya Sharad
86052520a5
Actions: Fix comment that tags the Docs team
2021-03-08 09:18:59 -08:00
Chris Smowton
2752505e84
Merge pull request #495 from owen-mc/fix-evanphxjsonpatch-test
...
Model Apply methods correctly
2021-03-05 18:03:28 +00:00
Owen Mansel-Chan
0a48fef0e7
Model Apply methods correctly
...
They were accidentally modeled as functions
2021-03-05 15:55:44 +00:00
Aditya Sharad
769fddeb38
Merge pull request #491 from adityasharad/actions/docs-review
...
Actions: Add workflow to request docs review
2021-03-03 07:40:26 -08:00
Aditya Sharad
348f8c16d1
Actions: Add workflow to request docs review
...
When a PR is labelled with 'ready-for-docs-review',
this workflow comments on the PR to notify the GitHub CodeQL docs team.
Runs on `pull_request_target` events so it can write comments to the PR.
Since this runs in the context of the base repo, it must not check out the PR
or use untrusted data from the event payload.
2021-03-02 18:05:02 -08:00
Chris Smowton
530b791529
Merge pull request #490 from sauyon/gomoduleauto
...
Explicitly set GO111MODULE to auto
2021-03-01 12:45:39 +00:00
Sauyon Lee
0684143291
Merge pull request #483 from owen-mc/sync-dataflow-libraries
...
Sync dataflow libraries
2021-02-25 11:40:50 -08:00
Sauyon Lee
be14df042d
Explicitly set GO111MODULE to auto
2021-02-25 08:22:06 -08:00
Owen Mansel-Chan
f6ff3c009e
Merge branch 'main' into sync-dataflow-libraries
2021-02-24 14:14:44 +00:00
Owen Mansel-Chan
e1402b3881
Merge pull request #486 from owen-mc/add-missing-licences-for-stubbed-libraries
...
Add license files for stubbed dependencies
2021-02-23 18:32:42 +00:00
Owen Mansel-Chan
6c0fe2ed45
Merge branch 'main' into add-missing-licences-for-stubbed-libraries
2021-02-23 17:14:28 +00:00
Owen Mansel-Chan
b7323bf9b6
Merge pull request #487 from sauyon/add-shati
...
Add shati-patel to CODEOWNERS
2021-02-23 17:11:28 +00:00
Sauyon Lee
f3969372a4
Add shati-patel to CODEOWNERS
2021-02-23 09:00:10 -08:00
Owen Mansel-Chan
4728b7a866
Add license files for stubbed dependencies
2021-02-23 16:29:17 +00:00
Sauyon Lee
a4b701d2c5
Merge pull request #480 from sauyon/go116
...
Add preliminary support for go 1.16
2021-02-23 08:16:12 -08:00
Owen Mansel-Chan
7e37c2b63a
Merge pull request #485 from owen-mc/add-new-location-for-beego
...
Add new module path for beego and xmlpath
2021-02-23 11:06:47 +00:00
Owen Mansel-Chan
ff317e63de
Remove http:// in package path
2021-02-22 15:11:59 +00:00
Owen Mansel-Chan
f32b4883bf
Make use of URLs in comments more consistent
2021-02-22 15:08:20 +00:00
Owen Mansel-Chan
370afe3383
Fix incorrect calls to package()
2021-02-22 15:08:20 +00:00
Owen Mansel-Chan
083512acef
Add extra module path for xmlpath package
2021-02-22 15:08:20 +00:00
Owen Mansel-Chan
2bcf73c9fb
Add new module path for beego
...
Beego moved from astaxie/beego to beego/beego on 13 Dec 2020. The
old location still works but is not being updated.
2021-02-22 11:38:13 +00:00
Sauyon Lee
9e45b08178
Merge pull request #484 from sauyon/change-note-action
...
Actions: Add change note checker
2021-02-19 20:12:59 -08:00
Sauyon Lee
17cd04c6b2
Avoid attempting to build i386 darwin binaries
2021-02-19 10:20:29 -08:00
Sauyon Lee
65e6da9b0e
Actions: Add change note checker
...
Co-authored-by: Taus <tausbn@github.com >
2021-02-19 09:40:50 -08:00
Sauyon Lee
23103fd8e0
Add support for 'path/filepath.WalkDir'
2021-02-19 07:59:13 -08:00
Sauyon Lee
82849fe91a
Explicitly set GO111MODULE=off
2021-02-19 07:59:13 -08:00
Sauyon Lee
41cacd579f
Model moved io/ioutil functions
2021-02-19 07:59:12 -08:00
Sauyon Lee
4056ac4ab5
os.FileInfo -> io/fs.FileInfo
2021-02-19 06:25:52 -08:00
Sauyon Lee
adc2f08b76
Add tests for go 1.16 libraries
2021-02-19 06:25:51 -08:00
Sauyon Lee
a327fb7e97
Add support for go 1.16 frameworks
2021-02-19 06:25:51 -08:00
Owen Mansel-Chan
fbbe4692d8
Re-add call to defaultTaintSanitizerGuard()
2021-02-19 14:16:19 +00:00
Owen Mansel-Chan
1c1ebf817f
Rename default taint sanitizer predicate
...
`defaultTaintSanitizer()` is referenced in one of the files that
gets synced, so it is better for us to not change its name. We should
also keep `defaultTaintSanitizerGuard()` consistent.
2021-02-19 14:14:12 +00:00
Sauyon Lee
62ae3ec7c5
Add extractor test for go 1.16
2021-02-18 14:52:54 -08:00
Sauyon Lee
fc9bc68829
Add change note for go 1.16
2021-02-18 11:49:00 -08:00
Sauyon Lee
42939a70b8
Update go.mod to 1.16
2021-02-18 11:48:48 -08:00
Sauyon Lee
fee0355ea0
Update actions to use go 1.16
2021-02-18 11:48:36 -08:00
Owen Mansel-Chan
24d35c35a1
Add Unit class to DataFlowPrivate
2021-02-17 16:42:17 +00:00
Owen Mansel-Chan
4f55ecc995
Sync dataflow libraries
2021-02-17 16:32:16 +00:00
Sauyon Lee
e6d11fc99e
Merge pull request #475 from sauyon/yaml
...
Add models for gopkg.in/yaml
2021-02-16 15:11:47 +00:00
Chris Smowton
2be66d1d74
Merge pull request #479 from smowton/smowton/admin/add-missing-change-notes
...
Add missing change notes
2021-02-16 09:58:29 +00:00
Owen Mansel-Chan
1c6a68ae93
Merge pull request #478 from owen-mc/update-logrus-model
...
Simplify Logrus model
2021-02-16 07:35:44 +00:00
Sauyon Lee
1acbfaafcc
Add models for gopkg.in/yaml
2021-02-15 18:27:09 +00:00
Chris Smowton
95008d1ccb
Update change-notes/2021-02-09-html-templates.md
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2021-02-15 14:39:24 +00:00
Chris Smowton
6f5f1c4829
Add missing change notes
2021-02-15 14:07:10 +00:00
Owen Mansel-Chan
46cc9e9fa4
Add change note
2021-02-15 13:51:01 +00:00
Owen Mansel-Chan
a2c0b6ade6
Merge pull request #464 from owen-mc/list-constants-sanitizers
...
List of constants sanitizer guards (switch statement in function only)
2021-02-15 11:39:40 +00:00
Owen Mansel-Chan
6d29a35ac9
Factor the duplicate code in LogCall
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-15 11:20:19 +00:00
Owen Mansel-Chan
68c54d43e6
Move code to TaintTrackingUtil.qll
2021-02-15 10:18:00 +00:00
Owen Mansel-Chan
ef94cde0b3
Simplify Logrus model
...
Make methods which add data to entries sinks in their own right, rather
than trying to track the data flow of the entry to a later logging call.
This may cause some false positives, but only in the situation that
tainted data is added to an entry and that entry is never logged. It will
save us from false negatives when tainted data is added to an entry
which flows across a function boundary to a logging call.
2021-02-15 09:18:34 +00:00
Owen Mansel-Chan
4a2a1871f7
Merge pull request #476 from owen-mc/model-zap
...
Model zap
2021-02-13 13:15:06 +00:00
Owen Mansel-Chan
1dc474650a
Model zap
2021-02-11 14:35:36 +00:00
Chris Smowton
b9a1d9a17e
Merge pull request #474 from sauyon/update-codeql
...
Update actions codeql to 2.4.3
2021-02-11 12:34:51 +00:00
Chris Smowton
2d08173631
Merge pull request #442 from monkey-junkie/main
...
[CWE-369] Query for divide by zero detection
2021-02-11 12:11:45 +00:00
Chris Smowton
b84aef6b83
Prevent getACalleeSource() from sharing magic with other users of getASuccessor*
...
This avoids recursion through the magic side-condition as each discovery of a ListOfConstantsComparisonSanitizerGuard expands the set of things whose getASuccessor* is wanted, which in turn enlarges the set of transitive successors and causes getACalleeSource() to be pointlessly recomputed (pointlessly because all exprNode(getCalleeExpr())s were already computed)
2021-02-11 10:29:30 +00:00
Sauyon Lee
9452df1a5c
Update actions codeql to 2.4.3
2021-02-10 22:43:02 +00:00
Chris Smowton
617b5510d9
Merge pull request #465 from smowton/smowton/feature/less-equality-test-panic-edges
...
Remove panicking edges leading from an equality test where possible
2021-02-10 08:20:27 +00:00
user
c29ab8958f
tests and docs updated
2021-02-10 00:26:46 +03:00
Your Name
4b24e5641e
formatting + example
...
fix
test fix
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.qhelp
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.qhelp
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-10 00:26:46 +03:00
Your Name
bd09868686
test fixed, comments added
...
Update ql/src/experimental/CWE-369/DivideByZero.qhelp
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.qhelp
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.qhelp
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-10 00:26:46 +03:00
Your Name
8c5e0a42b3
test fixed
...
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-10 00:26:40 +03:00
Your Name
41e808dab4
conversion detect + tests
2021-02-10 00:26:40 +03:00
Your Name
a77f36fba8
formatting fix
...
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
Update ql/src/experimental/CWE-369/DivideByZero.ql
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-10 00:26:33 +03:00
Chris Smowton
ef658b292a
Fix join order for ListOfConstantsComparisonSanitizerGuard
2021-02-09 19:42:23 +00:00
Chris Smowton
1b9abc5310
Merge pull request #470 from sauyon/go116flagadd
...
Add -overlay to recognized go build flags
2021-02-09 18:31:41 +00:00
Sauyon Lee
8c60c614db
Add -overlay to recognized go build flags
2021-02-09 17:09:48 +00:00
Owen Mansel-Chan
abf59ec98f
Merge pull request #469 from github/owen-mc-code-owners-file
...
Create CODEOWNERS
2021-02-09 17:04:29 +00:00
Owen Mansel-Chan
5cab5b2912
Create CODEOWNERS
...
This is so that `@codeql-go` is automatically suggested as a reviewer for PRs
2021-02-09 17:02:29 +00:00
Chris Smowton
9a919cc6c8
Merge pull request #466 from smowton/smowton/fix/remove-html-template-models
...
Remove models for html/template execution
2021-02-09 11:55:13 +00:00
Chris Smowton
02d21cfce8
Remove models for html/template execution
...
These escape HTML and JavaScript anyhow; because they don't write to their return value they don't quite fit the form of EscapeFunction, so to be expedient I've simply removed their models entirely. Presumably the case where someone HTML-templates something and then uses it for a purpose where HTML sanitisation is insufficient is very rare anyhow.
2021-02-08 19:55:04 +00:00
Sauyon Lee
a325161819
Merge pull request #455 from sauyon/insecure-rng
...
Promote Insecure RNG Query
2021-02-06 08:42:26 -08:00
Sauyon Lee
00e5b7cdfc
InsecureRNG: Select first result in fn only
2021-02-05 22:51:09 -08:00
Chris Smowton
42ff256c42
Remove panicking edges leading from an equality test where possible
...
These exist because an equality comparison of explicitly-incomparable interface values can panic, as can comparisons of arrays or structs containing them. Other type comparisons cannot panic.
2021-02-04 15:58:54 +00:00
Owen Mansel-Chan
d75cc40483
Make test with multiple switch statements pass
...
Made various changes to make it work when there are multiple
switch statements.
Also addressed performance problems.
2021-02-04 14:30:06 +00:00
Owen Mansel-Chan
36fafadda5
Add fallthrough statements to switch statement tests
2021-02-03 15:26:07 +00:00
Owen Mansel-Chan
a7545cd11b
Add test with multiple switch statements
2021-02-03 14:38:53 +00:00
Owen Mansel-Chan
760d89b0d3
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-02-03 14:34:28 +00:00
Owen Mansel-Chan
5ec25de1fc
Add change note
2021-02-02 16:27:44 +00:00
Owen Mansel-Chan
08c59f0f48
Add a default sanitizer guard for list of constants comparison
...
Currently it only deals with the case of a switch statement in
a function.
2021-02-02 16:25:25 +00:00
Owen Mansel-Chan
4c30ed9054
Add predicate to get return statement from return instruction
2021-02-02 15:57:02 +00:00
Owen Mansel-Chan
c4eaf791e6
Add predicate for cast test passing edge in switch statement
2021-02-02 15:57:02 +00:00
Owen Mansel-Chan
dd079d4e51
(clean-up) Make use of this explicit
2021-02-02 11:04:16 +00:00
Owen Mansel-Chan
f279fa17af
(clean-up) Move comment
2021-02-02 11:03:52 +00:00
Sauyon Lee
73dc135480
Move insecure randomness query to cwe-338
...
Also give it a precision
2021-02-02 08:04:12 +00:00
Sauyon Lee
82bd293e5c
Polish insecure randomness query
2021-02-02 08:04:11 +00:00
Sauyon Lee
cfb9593af8
Move InsecureRandomness out of experimental
2021-02-01 15:54:51 +00:00
Sauyon Lee
48a52cfd2f
Merge pull request #437 from sauyon/goproxy
...
Model elazarl/goproxy
2021-01-28 06:05:52 +00:00
Chris Smowton
93aaa74c8c
Merge pull request #451 from sauyon/gokit
...
Add gokit models
2021-01-27 17:47:22 +00:00
Sauyon Lee
fb84df241a
Add change note for goproxy modeling
2021-01-27 17:38:23 +00:00
Sauyon Lee
53b468174f
Make InsecureHostnameRegex check for rejecting handlers
2021-01-27 17:38:22 +00:00
Sauyon Lee
4712afae83
Add models for github.com/elazarl/goproxy
2021-01-27 17:38:02 +00:00
Sauyon Lee
b0ddf4b68b
Add model for net/http.Error
2021-01-27 17:38:02 +00:00
Sauyon Lee
bf9bba79c2
Add getHeaderValue predicate to HTTP::HeaderWrite
2021-01-27 17:38:01 +00:00
Sauyon Lee
39c33c5db1
Add HTTP handler concept
2021-01-27 17:38:01 +00:00
Owen Mansel-Chan
b76ff0d233
Merge pull request #461 from owen-mc/avoid-unused-barrier-guards-in-scope
...
Move reused barrier guards into separate files
2021-01-26 06:08:29 +00:00
Owen Mansel-Chan
bf0f0aff5e
Move reused barrier guards into separate files
...
This way only the barrier guards that are used will be imported.
This is important because of the comment above BarrierGuard, which
warns about the potential danger of having classes that extend
BarrierGuard in scope which are not used.
2021-01-25 17:07:18 +00:00
Owen Mansel-Chan
e55db63184
Merge pull request #462 from owen-mc/make-path-containment-check-more-specific
...
Make PathContainmentCheck more specific
2021-01-25 16:46:33 +00:00
Sauyon Lee
3ed9e66c7a
Add gokit models
2021-01-25 08:15:14 -08:00
Owen Mansel-Chan
71d52500f7
Make PathContainmentCheck more specific
...
Recent changes to Property.checkOn mean that in the code
err == nil && <unrelated-condition>
PathContainmentCheck matches the first condition and the whole &&
expression. Originally it would have only matched the first condition,
and this commit restores that behaviour. This pattern appears 3 times in
the tests, which all still pass.
2021-01-25 15:05:57 +00:00
Max Schaefer
bc74bcec21
Merge pull request #459 from owen-mc/update-barrier-guard-comment
...
Make comment on BarrierGuard more specific
2021-01-25 14:34:20 +00:00
Owen Mansel-Chan
f8c3fbf845
Merge pull request #454 from owen-mc/default-taint-sanitizer-guard-equality-test-guard
...
Make EqualityTestGuard a default taint sanitizer guard
2021-01-25 14:24:08 +00:00
Owen Mansel-Chan
06c6ceda50
Make comment on BarrierGuard more specific
...
The problem that this comment is trying to warn about is the following:
say you have two subclasses of BarrierGuard BG1 and BG2, both of which
contain some node g. Also assume that you have a configuration C which
specifies BG1 as a barrier guard, but not BG2. Because g is contained in
both classes, you will then still get the barrier guard definition from
BG2 due to the way dynamic dispatch works in QL.
2021-01-25 13:16:23 +00:00
Owen Mansel-Chan
8acf572283
Add change note
2021-01-22 17:38:26 +00:00
Owen Mansel-Chan
71f2ed36f2
Make EqualityTestGuard a default taint sanitizer guard
...
It will apply to all configurations, not just those involving Xss.
2021-01-22 17:38:26 +00:00
Owen Mansel-Chan
7dfe5d9f07
Merge pull request #457 from owen-mc/cleanup-avoid-code-duplication
...
Reuse existing class instead of repeating it
2021-01-21 10:56:14 +00:00
Owen Mansel-Chan
7f00ab1f08
Merge pull request #456 from owen-mc/add-guarding-function-test
...
Add tests for guarding functions proxied by a variable
2021-01-21 10:55:54 +00:00
Your Name
ad22445d16
refactor
2021-01-21 01:52:00 +03:00
monkey-junkie
c8da633d7b
Update ql/src/experimental/CWE-369/DivideByZero.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2021-01-21 00:54:00 +03:00
Owen Mansel-Chan
7339f3e095
Reuse existing class instead of repeating it
...
This is already done elsewhere.
2021-01-20 16:11:33 +00:00
Owen Mansel-Chan
b623a4c8ec
Add tests for guarding functions proxied by a variable
...
Negation doesn't appear to be handled correctly, so one
of the lines is marked as a false positive.
2021-01-20 14:36:53 +00:00
Owen Mansel-Chan
e2a79f400e
Make use of this explicit
...
It makes it easier to understand the code.
2021-01-19 15:55:02 +00:00
Owen Mansel-Chan
903ff33b0d
Add class for default taint sanitizer guards
...
This allows us to specify taint sanitizer guards that apply in
all configurations.
2021-01-18 10:51:59 +00:00
Owen Mansel-Chan
83c26a3594
Improve predicate name
...
Renamed `defaultTaintSanitizer` to `isDefaultTaintSanitizer`.
2021-01-18 10:50:26 +00:00
Your Name
3251fb5c07
updated
2021-01-18 02:37:53 +03:00
Owen Mansel-Chan
fbe0474d0c
Merge pull request #453 from owen-mc/update-architectures
...
Update Architectures.qll
2021-01-15 16:01:52 +00:00
Owen Mansel-Chan
6219a28b13
Update Architectures.qll
2021-01-15 14:01:01 +00:00
Owen Mansel-Chan
2f9c1a6049
Merge pull request #452 from owen-mc/package-path
...
Use `package()` for package paths not in the standard library
2021-01-15 07:25:06 +00:00
Owen Mansel-Chan
5e2c066e8b
Use package() for package paths not in the standard library
...
This has the advantage that it deals with versioning. For example,
`package("a.io", "b")` matches "a.io/v2/b"
as well as "a.io/b".
At the same time I have created `packagePath()` predicates where they
seemed useful and tried to standardise them a bit.
2021-01-14 17:11:23 +00:00
Owen Mansel-Chan
62052a8772
Merge pull request #449 from owen-mc/model-couchbase-gocb
...
Model Couchbase Go library
2021-01-14 17:00:05 +00:00
Owen Mansel-Chan
a6b5e8b1db
Remove distinct between package paths for v1 and v2
2021-01-14 15:48:21 +00:00
Owen Mansel-Chan
5cd984f3ca
Merge pull request #450 from owen-mc/misc
...
Miscellaneous clean-ups
2021-01-13 12:33:21 +00:00
Owen Mansel-Chan
b5dfef894b
Add change note
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
d8105a5be0
Add tests for Couchbase v2 NoSQL queries
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
b02fc16dfc
Add tests for Couchbase v1 NoSQL queries
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
2ee20b3026
Add tests for Couchbase v1
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
d2164e16d1
Switch NoSQL tests to use inline expectations
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
a5ac947d16
Model Couchbase v2 NoSQL queries
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
7fc88ad85b
Model Couchbase v1 NoSQL query sinks
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
a973ce4539
Model Couchbase gocb v1
2021-01-13 09:18:54 +00:00
Owen Mansel-Chan
9a51de56de
Add comment explaining \Q and \E in regex
2021-01-12 16:56:04 +00:00
Owen Mansel-Chan
9236ad752b
Improve formatting and style in Gin.qll
2021-01-12 16:56:04 +00:00
Owen Mansel-Chan
71774ed2d4
Remove redundant code
...
RawMessage implements Marshaler and Unmarshaler, so these methods are
covered by the two sections below
2021-01-12 16:56:04 +00:00
Owen Mansel-Chan
57ee3a8a64
Use set literal
2021-01-12 16:56:04 +00:00
Owen Mansel-Chan
fe1f08fb12
Use existing predicate
...
There already exists the predicate
implements(string pkg, string tp, string name)
which does exactly what this code does
2021-01-12 16:55:51 +00:00
Sauyon Lee
3f1197d605
Merge pull request #448 from sauyon/autoformat
...
Autoformatter update
2021-01-12 14:29:45 +00:00
Sauyon Lee
c11028229a
Bump codeql version
2021-01-12 13:15:31 +00:00
Sauyon Lee
7a4dbc6fa7
Autoformatter update
2021-01-12 13:13:15 +00:00
Chris Smowton
c79e4f7836
Merge pull request #447 from smowton/smowton/admin/git-change-note
...
Add change-note for addition of `git` to the list of known interpreters for the go/command-injection query
2021-01-12 11:33:49 +00:00
Chris Smowton
a9cff82161
Add change-note for addition of git to the list of known interpreters for the go/command-injection query.
2021-01-11 18:48:54 +00:00
Chris Smowton
45635b67c6
Merge pull request #445 from smowton/smowton/feature/git-as-shell
...
Add 'git' as a possible command-interpreter, unless arguments are sanitized using "--"
2021-01-07 15:01:25 +00:00
Chris Smowton
83cee4a334
Add 'git' as a possible command-interpreter, unless arguments are sanitized using "--"
...
This is because some git flags can specify arbitrary commands to execute, but its positional arguments cannot, and "--" like in many commands instructs git to consume no further flags.
2021-01-07 11:54:41 +00:00
Chris Smowton
2dffd3e261
Merge pull request #443 from smowton/smowton/admin/missing-change-notes-2021-01
...
Add change-notes for recent PRs that were missing them
2021-01-05 11:41:35 +00:00
Chris Smowton
e6327f502c
Merge pull request #444 from smowton/smowton/admin/merge-rc-126
...
Merge rc/1.26 back into `main`
2021-01-05 11:40:34 +00:00
Chris Smowton
19921ed115
Add change-notes for recent PRs that were missing them
2021-01-05 11:39:26 +00:00
Chris Smowton
2b608e5822
Merge remote-tracking branch 'origin/rc/1.26' into HEAD
2021-01-04 15:32:15 +00:00
monkey-junkie
de566da91c
Update DivideByZero.ql
2021-01-03 00:55:10 +03:00
monkey-junkie
d81ec15990
Update DivideByZeroBad.go
2021-01-03 00:54:42 +03:00
Your Name
4b36a62834
divide by zero rule
2021-01-03 00:51:34 +03:00
Sauyon Lee
ace9271cc4
Merge pull request #441 from twpayne/contributing-building-and-testing
...
Docs: Add building and testing to contributing guide
2020-12-29 11:13:37 -08:00
Tom Payne
06721ce189
Docs: Add building and testing to contributing guide
2020-12-29 00:28:17 +01:00
Sauyon Lee
2ba26f69c0
Merge pull request #440 from twpayne/regexp-anchors
...
Support more regexp anchors
2020-12-23 11:42:06 -08:00
Tom Payne
9bbdf86487
Support more regexp anchors
2020-12-23 14:04:33 +01:00
Chris Smowton
5647a47bd4
Merge pull request #436 from sauyon/InVisionApp/main
...
Refactor HTTP tests
2020-12-18 12:08:46 +00:00
Jason Rogers
baa169cc77
Refactored HTTP tests
...
This will align test location with the library.
2020-12-17 08:10:06 -08:00
Owen Mansel-Chan
e3d0ccabae
Merge pull request #435 from owen-mc/use-implements-where-possible
...
Use `implements` for interface methods
2020-12-17 16:02:14 +00:00
Owen Mansel-Chan
d184f245ed
Use implements for interface methods
...
This means we will find more things.
2020-12-17 12:42:18 +00:00
Owen Mansel-Chan
dcb6cc3a7c
Merge pull request #434 from owen-mc/model-kubernetes-secret
...
Model Secret and SecretList from k8s.io/api/core/v1
2020-12-16 17:17:21 +00:00
Chris Smowton
8060993b3b
Merge pull request #430 from smowton/smowton/feature/model-beego-orm
...
Model the Beego ORM subpackage
2020-12-16 16:08:18 +00:00
Owen Mansel-Chan
0cb0879381
Model Secret and SecretList from k8s.io/api/core/v1
2020-12-16 16:03:48 +00:00
Chris Smowton
44a63b2f94
Model the Beego ORM subpackage
2020-12-16 14:39:58 +00:00
Owen Mansel-Chan
87f2cad475
Merge pull request #427 from owen-mc/model-kubernetes-secret
...
Model kubernetes SecretInterface
2020-12-15 17:12:45 +00:00
Chris Smowton
de93b59245
Merge pull request #419 from smowton/smowton/feature/model-beego
...
Model Beego web framework
2020-12-15 16:15:59 +00:00
Owen Mansel-Chan
0980a50627
Remove erroneous import from stub
2020-12-15 16:00:58 +00:00
Owen Mansel-Chan
676ca529b5
Add tests
2020-12-15 16:00:58 +00:00
Owen Mansel-Chan
6ca2e0e38e
Add SecretInterface as source for cleartext logging query
2020-12-15 16:00:58 +00:00
Owen Mansel-Chan
8fd055bc60
Model SecretInterface from k8s.io/client-go/kubernetes/typed/core/v1
2020-12-15 16:00:51 +00:00
Chris Smowton
8e7abbac0a
Model Beego web framework
...
This excludes the ORM, email and validation components, which I will follow up with seperately.
2020-12-15 14:04:36 +00:00
Chris Smowton
8b6f229bd3
SafeUrlFlow: allow libraries to add sources
2020-12-15 14:01:59 +00:00
Sauyon Lee
3617a801db
Merge pull request #429 from sauyon/smowton/admin/refactor-http-module
...
Refactor HTTP module
2020-12-14 09:25:43 -08:00
Jason Rogers
3a83fbd765
Refactor HTTP module
...
This makes it easier to identify related classes and support future expansion.
2020-12-14 07:16:24 -08:00
Owen Mansel-Chan
e4316768ef
Merge pull request #426 from owen-mc/model-k8s-io-apimachinery-pkg-runtime
...
Model k8s.io/apimachinery/pkg/runtime
2020-12-09 09:16:47 +00:00
Owen Mansel-Chan
c17f1618e0
Add change note
2020-12-09 06:45:08 +00:00
Owen Mansel-Chan
4d3eb47784
Fix stubbing
...
Depstubber can only stub one package at a time. We have to do some
manual editing to make a stubbed package use another stubbed package.
2020-12-09 06:45:08 +00:00
Owen Mansel-Chan
e5fb401d50
Model runtime
2020-12-09 06:45:08 +00:00
Owen Mansel-Chan
290a4dcdf4
Merge pull request #414 from owen-mc/model-evanphx-json-patch
...
Model evanphx/json-patch
2020-12-08 17:36:10 +00:00
Owen Mansel-Chan
0b50ee7755
Change to Inline Expectations Test
2020-12-08 16:38:13 +00:00
Owen Mansel-Chan
e786fa07ee
Add change note
2020-12-08 16:15:01 +00:00
Owen Mansel-Chan
5ebd637ca7
Model evanphx/json-patch
2020-12-08 16:15:01 +00:00
Chris Smowton
6b8003b0f2
Merge pull request #420 from smowton/smowton/admin/upgrade-codeql-240-and-autoformat
...
Upgrade CI toolchain to CodeQL 2.4.0
2020-12-07 14:16:19 +00:00
Chris Smowton
563f74bd45
Upgrade CI toolchain to CodeQL 2.4.0
...
Also reformat code (the autoformatter has changed slightly)
2020-12-07 12:35:07 +00:00
Chris Smowton
a794e05c74
Merge pull request #417 from smowton/smowton/fix/reduce-symlink-loop-finding-cost
...
Unsafe-unzip-symlinks: reduce cost of `getAnEnclosingLoop`
2020-12-03 12:21:38 +00:00
Chris Smowton
c1669d732b
Unsafe-unzip-symlinks: reduce cost of getAnEnclosingLoop
...
This used to get the closest enclosing loops of all expressions; now it is restricted to those surrounding interesting expressions.
2020-12-02 14:33:38 +00:00
Chris Smowton
f9fc01bd73
Merge pull request #415 from smowton/smowton/feature/errorf-returns-non-nil
...
Note that `fmt.Errorf` returns non-nil
2020-12-01 12:04:23 +00:00
Chris Smowton
63079b3e9d
Merge pull request #416 from smowton/smowton/admin/cherrypick-suspicious-char-fix
...
Cherry-pick #395 (suspicious-char-in-regex FP fix) onto rc/1.26
2020-12-01 11:45:14 +00:00
Owen Mansel-Chan
8c33979425
Merge pull request #388 from owen-mc/untrusted-data-flow-to-external-api
...
Untrusted data flow to external API
2020-12-01 11:25:58 +00:00
Sauyon Lee
b2ae6550ec
Add additional tests for suspicious character in regexp regexp
2020-11-30 19:15:17 +00:00
Sauyon Lee
09d41952dc
SuspiciousCharacterInRegexp: Add fix for raw string literals
2020-11-30 19:15:17 +00:00
Sauyon Lee
568b365575
Add isRaw to StringLit
2020-11-30 19:15:17 +00:00
Chris Smowton
5d17b27770
Note that fmt.Errorf returns non-nil
...
This enables recognising more guarding functions that return nil/non-nil conditional on a barrier guard.
2020-11-30 19:10:58 +00:00
Chris Smowton
3338a0b10d
Merge pull request #402 from smowton/smowton/feature/zipslip-more-generous-sanitisers
...
ZipSlip: redefine sources closer to their origin, and make sanitizers more generous
2020-11-27 18:25:07 +00:00
Owen Mansel-Chan
bfbf102408
Remove restriction on void and boolean-returning methods
...
When the taint was in the receiver, we were excluding methods which
return nothing or a boolean.
2020-11-27 16:51:24 +00:00
Owen Mansel-Chan
7730d66d76
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-11-27 16:17:54 +00:00
Chris Smowton
70015b2c32
Add tests for zipslip using a utility function to check that the archive header is safe
...
Note this currently contains some cases that are safe but are still flagged, because of weaknesses in the guardingFunction predicate.
2020-11-27 15:11:57 +00:00
Sauyon Lee
627241aaa5
Merge pull request #401 from sauyon/stored-command
...
Add stored command query
2020-11-27 06:37:02 -08:00
Chris Smowton
1eb8fff7e1
ZipSlip: redefine sources closer to their origin, and make sanitizers more generous.
...
Previously we considered certain fields of `tar` or `zip` file headers to be sources, but this meant subsequent references to the same field were not considered sanitized. For example, at least some real-world projects used a pattern like `if isIllegalPathTraversal(hdr.Name) { return nil; } ... /* other code using hdr.Name */`. By associating a source with the field-read `.Name` rather than the header itself, we were unable to see that the subsequent read was guarded by the sanitizer function.
Relatedly, it is common to use some intermediary taint-propagating function, as in `clean(s string) { if strings.HasPrefix("..", filepath.Clean(filepath.Join(target, s))) ...`, in the implementation of a sanitizer. We now follow the taint propagation (locally) backwards towards the function parameter, marking the predecessor functions and ultimately the parameter `s` as sanitized in addition to the direct argument to `strings.HasPrefix`. Existing sanitizing-function logic can then sometimes lift this out into the caller too.
2020-11-27 13:57:25 +00:00
Chris Smowton
f775adf306
Merge pull request #404 from smowton/smowton/feature/improved-guarding-function
...
Recognise many more guarding functions
2020-11-27 13:56:31 +00:00
Chris Smowton
c6f14de065
Merge pull request #413 from smowton/smowton/admin/document-cond-root-etc
...
Clarify naming and add documentation around `hasSemantics` and cousins
2020-11-26 16:59:07 +00:00
Owen Mansel-Chan
0ee00d8647
Apply suggestions from code review
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-11-26 16:49:02 +00:00
Owen Mansel-Chan
bf78189e21
Make two separate queries
2020-11-26 14:59:13 +00:00
Owen Mansel-Chan
dec7967c7a
Update qhelp files
2020-11-26 14:57:56 +00:00
Owen Mansel-Chan
e7697963d3
Exclude local function pointers
2020-11-26 14:57:56 +00:00
Owen Mansel-Chan
05fe388ba3
Mark hashing functions as safe
...
See https://github.com/github/codeql-go-team/issues/219 for issue to
model this better
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
d3bef7fc4f
Model safe external APIs
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
4184a6ecd8
Add testing frameworks
...
Add "github.com/golang/mock/gomock", several packages under
"github.com/stretchr/testify", £gotest.tools/assert",
"k8s.io/client-go/testing" and "testing"
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
410cf49af8
Shorten function using set literal
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
18c66e84f7
Make more package paths accessible
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
171e433593
Exclude test files
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
fe5822ae3a
Exclude functions in packages which have some modeled functions
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
ff542508aa
Exclude sinks from common queries
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
b698276e3a
Update function name to give better text output
2020-11-26 14:57:55 +00:00
Owen Mansel-Chan
50a32f47d5
First draft
2020-11-26 14:57:50 +00:00
Chris Smowton
fb814e949d
Clarify naming and add documentation around hasSemantics and cousins
2020-11-26 13:34:58 +00:00
Chris Smowton
2377337564
Treat functions that directly return a BarrierGuard like BarrierGuards themselves
2020-11-26 13:27:53 +00:00
Chris Smowton
387a13f22a
Add support for barrier guards in functions that indicate success by returning nil
...
Typically these are returning a nil error when sanitization succeeds.
2020-11-24 12:39:05 +00:00
Chris Smowton
7bbf9ed860
Merge pull request #410 from github/lgtm.com
...
Merge lgtm.com into main
2020-11-23 17:17:42 +00:00
Chris Smowton
ed6804859a
Merge pull request #409 from smowton/smowton/admin/missing-change-notes-rc126
...
Add change notes for PRs that omitted them
2020-11-23 11:11:56 +00:00
Sauyon Lee
0bf09307cf
Add StoredCommand query
2020-11-23 02:11:44 -08:00
Chris Smowton
62c51f9125
Merge pull request #408 from smowton/smowton/admin/add-missing-doc-strings
...
Add docstrings to all public elements
2020-11-20 17:37:47 +00:00
Chris Smowton
e241f8469b
Add change notes for PRs that omitted them
2020-11-20 16:15:12 +00:00
Chris Smowton
af432c71ff
Add docstrings to all public elements.
2020-11-20 15:35:42 +00:00
Sauyon Lee
793d6f6053
Merge pull request #399 from sauyon/stored-xss
...
Add stored XSS query
2020-11-19 23:23:21 -08:00
Chris Smowton
93a7cc944a
Merge pull request #403 from smowton/smowton/fix/type-assertion-dataflow
...
Add data-flow edge `from -> to` in the context `to, ok := from.(*Type)`
2020-11-19 16:13:55 +00:00
Chris Smowton
c93b2b709d
Merge pull request #407 from smowton/smowton/fix/isunreachableincall-slowness
...
Improve join order in `isUnreachableInCall`
2020-11-19 11:22:48 +00:00
Chris Smowton
38e383858e
Merge pull request #394 from smowton/smowton/feature/unsafe-unzip-symlink
...
Add query checking for unpacking of symlinks without using EvalSymlinks to spot existing ones.
2020-11-18 19:10:18 +00:00
Chris Smowton
d1f607ccd8
Improve join order in isUnreachableInCall
2020-11-18 19:06:52 +00:00
Owen Mansel-Chan
7433d448d9
Merge pull request #406 from owen-mc/update-dataflow-libs-2
...
Update dataflow libs 2
2020-11-17 21:17:52 +00:00
Chris Smowton
3d8470e1e2
Add and use TypeCastNode::getResultType
...
This can differ from `getType` when a `TypeAssertExpr` returns a (result, ok) pair.
2020-11-17 16:03:33 +00:00
Owen Mansel-Chan
ce67418cdc
Update tests
...
These changes match those in https://github.com/github/codeql/pull/4440
2020-11-17 15:48:50 +00:00
Owen Mansel-Chan
d3154d0aa7
Sync dataflow libraries
...
`make sync-dataflow-libraries`
2020-11-17 15:48:50 +00:00
Owen Mansel-Chan
4bfe088c0f
Update dataflow branch from master to main
2020-11-17 15:48:50 +00:00
Chris Smowton
1d850873f3
Add data-flow edge from -> to in the context to, ok := from.(*Type)
2020-11-17 10:59:59 +00:00
Chris Smowton
79c010a601
Move unsafe-unzip-symlink query into qll file and give it customization points.
2020-11-16 09:57:26 +00:00
Chris Smowton
500d78dafa
Include os.Readlink as a probable sanitiser.
...
A couple of projects seem to walk links one unit at a time, rather than just throwing `EvalSymlinks` at the whole potentially suspect path.
2020-11-16 09:57:26 +00:00
Chris Smowton
2193642c6e
Expand query to notice Symlink and archive iterator calls that do not directly share a loop
...
We look across function-call boundaries to check there is some common enclosing loop, but false-positives are more likely if in practice there is no control-flow path from the archive iterator to the Symlink call and back.
2020-11-16 09:57:26 +00:00
Chris Smowton
1a2c209259
Add query checking for unpacking of symlinks without using EvalSymlinks to spot existing ones.
...
This is usually dangerous because (if the archive is untrusted) the intent is usually to permit within-archive symlinks, e.g. dest/a/parent -> .. -> dest/a is an acceptable link to unpack. However if EvalSymlinks is not used to take already-unpacked symlinks into account, it becomes possible to sneak tricks like dest/escapes -> dest/a/parent/.. through, which create links leading out of the archive for later abuse.
2020-11-16 09:57:26 +00:00
Chris Smowton
43f9351094
Merge pull request #405 from igfoo/igfoo/portability
...
Use more portable syntax in codeql-tools/autobuild.sh
2020-11-13 14:59:54 +00:00
Ian Lynagh
f5223bae4c
Use more portable syntax in codeql-tools/autobuild.sh
2020-11-13 14:30:04 +00:00
Sauyon Lee
7279d4090d
Apply suggestions from code review
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-11-12 21:26:53 -08:00
Sauyon Lee
f129949a38
Apply review comments
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-11-11 23:49:23 -08:00
Sauyon Lee
efddef7fa2
Add tests for stored XSS query
2020-11-11 23:13:12 -08:00
Sauyon Lee
d517125507
Add tests for SQL framework
2020-11-11 23:13:12 -08:00
Sauyon Lee
30b17d9762
Add StoredXSS query
2020-11-11 23:13:11 -08:00
Sauyon Lee
36bbf1eeb9
Improve models for database/sql
2020-11-11 22:10:16 -08:00
Chris Smowton
82a5b5f264
Merge pull request #369 from sauyon/checkdeps
...
Check dependencies before skipping dependency installation
2020-11-11 09:54:33 +00:00
Chris Smowton
04cec8b542
Merge pull request #400 from sauyon/autoformat
...
Autoformat tests
2020-11-11 09:51:50 +00:00
Nick Rolfe
c7e03cbd98
Merge pull request #398 from github/nickrolfe/getFileBySourceArchiveName
...
Replace getEncodedFile with getFileBySourceArchiveName predicate
2020-11-10 18:19:00 +00:00
Sauyon Lee
5a9b8a5465
Autoformat
2020-11-10 09:35:29 -08:00
Sauyon Lee
80c2fcdbb8
Autoformat tests
2020-11-10 09:35:16 -08:00
Nick Rolfe
17b6401c22
Replace getEncodedFile with getFileBySourceArchiveName predicate
...
While also making it work with paths for databases created on Windows.
2020-11-10 16:43:21 +00:00
Chris Smowton
235b7c0bc5
Merge pull request #395 from sauyon/regexp
...
SuspiciousCharacterInRegexp: Add fix for raw string literals
2020-11-10 12:18:38 +00:00
Sauyon Lee
0950baf4b7
Add additional tests for suspicious character in regexp regexp
2020-11-09 10:36:27 -08:00
Sauyon Lee
eb26b0abd1
SuspiciousCharacterInRegexp: Add fix for raw string literals
2020-11-09 10:10:47 -08:00
Sauyon Lee
52d253a95b
Add isRaw to StringLit
2020-11-09 10:08:51 -08:00
Chris Smowton
33f43626b3
Merge pull request #396 from sauyon/remove-code-scanning
...
Remove code scanning temporarily
2020-11-09 10:58:55 +00:00
Sauyon Lee
920f7153c8
autobuilder: Add dependency check
...
Sometimes build scripts succeed without installing dependencies, for
example if they are unrelated to Go or if they simply always exit
successfully. Therefore, added a check that dependencies at least
resolve before skipping dependency installation.
2020-11-09 02:13:48 -08:00
Sauyon Lee
4a53bfdebf
autobuilder: Only set mod mode when go.mod exists
2020-11-09 02:13:47 -08:00
Sauyon Lee
cc0a40e712
Remove code scanning until build tracing is implemented.
2020-11-09 02:11:05 -08:00
Chris Smowton
0938437d13
Merge pull request #373 from smowton/smowton/feature/golang-x-net-html
...
Add models for the read side of golang.org/x/net/html
2020-11-06 16:20:45 +00:00
Calum Grant
b54e76bdc7
Merge commit '3c84f11d5bf344cf5a667a04ccabcfb30f677c9c' into lgtm.com
...
# Conflicts:
# extractor/cli/go-autobuilder/go-autobuilder.go
2020-11-06 15:55:16 +00:00
Sauyon Lee
a78c35b95e
Simplify net/http ResponseBody logic
2020-11-06 11:18:46 +00:00
Sauyon Lee
8a306af77b
Make HTTP::ResponseWriter handle PostUpdateNodes in getANode
2020-11-06 11:18:46 +00:00
Chris Smowton
3817ae80e5
Add support for html.Render method.
...
This entails generalising Http::ResponseBody to account for any modelled function writing to a ResponseWriter.
2020-11-06 11:04:53 +00:00
Chris Smowton
02f353eabd
Add models for the read side of golang.org/x/net/html
...
This covers cases where an HTML document is retrieved and then parts of its structure are output without proper escaping.
2020-11-06 11:04:53 +00:00
Chris Smowton
03bbef7286
Add models for the read side of golang.org/x/net/html
...
This covers cases where an HTML document is retrieved and then parts of its structure are output without proper escaping.
2020-11-06 11:04:53 +00:00
Chris Smowton
e4aa252d6b
Merge pull request #381 from sauyon/gomodfix
...
Update dependencies and clean go.mod
2020-11-06 10:14:22 +00:00
Chris Smowton
582f8e444b
Merge pull request #393 from smowton/smowton/fix/cfg-assignment-underscores
...
CFG: fix lastNode relating to assignments with underscores on the LHS
2020-11-03 14:32:57 +00:00
Chris Smowton
3b927f3b6b
CFG: fix lastNode relating to assignments with underscores on the LHS
...
For example, "x, _ := a, b" would produce an incorrect CSV that branched to the next statement after evaluating "b", skipping the assignment to 'x'. We already had test coverage for function returns, so I'm reasonably confident this only affects parallel assigns, not destructuring ones like "x, y := f()".
2020-11-03 12:00:54 +00:00
Sauyon Lee
3c84f11d5b
Merge pull request #385 from github/sauyon-patch-1
...
Enable code scanning
2020-10-29 11:00:08 -07:00
Chris Smowton
cbc2443236
Merge pull request #390 from smowton/smowton/admin/links-master-to-main
...
Docs: replace master with main and QL4E with VSCode
2020-10-29 11:06:33 +00:00
Chris Smowton
1c75c9d1e9
Docs: Master -> main and Semmle/ql -> github/codeql everywhere
...
Also fix a reference to QL for Eclipse, and remove some incidental trailing whitespace
2020-10-29 11:04:49 +00:00
Chris Smowton
0f637c5887
Merge pull request #379 from smowton/model-revel
...
Model Revel
2020-10-28 09:56:25 +00:00
Chris Smowton
7ddb289910
Merge pull request #389 from github/aibaars/fix-broken-links
...
Update links in ql/docs/experimental.md
2020-10-28 09:55:21 +00:00
Arthur Baars
31cd26fded
Update links in ql/docs/experimental.md
2020-10-28 10:12:52 +01:00
Chris Smowton
0bf80641e8
Revel: mark header reads as user-controlled data
2020-10-26 12:26:37 +00:00
Chris Smowton
f0c0a890a5
Move OpenUrlRedirect customisation into the query's qll file
2020-10-26 12:25:56 +00:00
Chris Smowton
4a2c4bf1b8
Merge pull request #387 from sauyon/testing-framework
...
Add a testing framework
2020-10-26 10:32:22 +00:00
Sauyon Lee
64ac49a618
Merge pull request #380 from sauyon/funtionmodel-shortcuts
...
Add utility predicates to FunctionModel
2020-10-23 02:26:51 -07:00
Chris Smowton
e9278b5477
Merge pull request #386 from smowton/smowton/admin/improve-error-messages
...
Improve error messages
2020-10-23 08:27:03 +01:00
Chris Smowton
26b7deccf5
Autobuilder: fall back when os.Executable fails
...
This can happen under tracing, perhaps because of https://github.com/github/codeql-tracer/issues/29
2020-10-22 20:04:47 +02:00
Sauyon Lee
47f40d5f3e
Add tests for log frameworks
2020-10-22 09:18:53 -07:00
Sauyon Lee
671b427e1e
Add shared testing framework
...
It has been modified to use `hasLocation` instead of `Location`
2020-10-22 09:18:52 -07:00
Sauyon Lee
1e034a1dd5
Add logrus to go.qll
2020-10-22 09:18:52 -07:00
Chris Smowton
82de513764
Merge pull request #384 from sauyon/gobuild
...
extractor: Extract the working directory if no packages are passed
2020-10-22 15:43:48 +01:00
Chris Smowton
3716f6d7e9
Improve error messages
2020-10-22 14:42:23 +01:00
Chris Smowton
6122223b37
Merge pull request #383 from smowton/smowton/feature/work-around-broken-os-executable
...
Autobuilder: fall back when os.Executable fails
2020-10-22 14:41:37 +01:00
Sauyon Lee
ec52bdd536
Enable code scanning
2020-10-22 06:07:15 -07:00
Sauyon Lee
e22bf96ba3
extractor: Extract the working directory if no packages are passed
2020-10-22 05:22:33 -07:00
Chris Smowton
5cc695f1d5
Autobuilder: fall back when os.Executable fails
...
This can happen under tracing, perhaps because of https://github.com/github/codeql-tracer/issues/29
2020-10-22 13:19:55 +01:00
Sauyon Lee
4356f38b8f
Update dependencies and clean go.mod
2020-10-22 04:57:21 -07:00
Chris Smowton
62c6b0dc37
Add support for more Revel untrusted sources
2020-10-21 17:28:28 +01:00
Chris Smowton
2818da4df9
Advance to latest codeql-cli release
2020-10-21 17:27:18 +01:00
Sauyon Lee
e823712adf
Add utility predicates to FunctionModel
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-10-21 09:16:04 -07:00
Chris Smowton
9aceae8bd6
Revel: add support and tests for Render and Redirect sinks.
2020-10-20 10:00:05 +01:00
Owen Mansel-Chan
b2b8f10418
Fix stub for Revel
...
Embedded fields aren't stubbed correctly
2020-10-19 15:47:08 +01:00
Owen Mansel-Chan
4dfa9d58c0
Model Revel
2020-10-19 15:47:07 +01:00
Owen Mansel-Chan
f4f29be8ac
Add ability to specify default taint sanitizers
...
This allows library models to specify taint sanitizers.
2020-10-19 15:46:33 +01:00
Owen Mansel-Chan
01ad7acb6f
Remove unnecessary import
2020-10-19 15:46:33 +01:00
Owen Mansel-Chan
f49ff279b8
Merge pull request #375 from owen-mc/spew
...
Model Spew logging framework
2020-10-16 13:20:13 +01:00
Owen Mansel-Chan
b89775ac65
Update change-notes/2020-10-14-spew.md
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-10-16 10:56:27 +01:00
Chris Smowton
2b07e6a0f4
Merge pull request #324 from sauyon/tracing
...
Build tracing
2020-10-15 11:27:34 +01:00
Chris Smowton
4746789fe8
Merge pull request #224 from sauyon/no-vendor
...
Skip vendor directories for go.mod extraction
2020-10-15 11:03:26 +01:00
Sauyon Lee
e5afd1dcb6
go-extractor: clarify --mimic error message
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-10-14 09:43:10 -07:00
Sauyon Lee
25eebe95e4
autobuilder: Clarify error message
2020-10-14 09:42:12 -07:00
Sauyon Lee
3c6626c604
Don't trace through problem binaries on OS X
...
See https://github.com/github/semmle-code/pull/37764
2020-10-14 09:42:12 -07:00
Sauyon Lee
3addb962a9
Add change note for build tracing
2020-10-14 09:42:12 -07:00
Sauyon Lee
2e73f3efd1
Add change note for go.mod extraction change
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-10-14 09:25:39 -07:00
Sauyon Lee
1ba1029a13
Use comment-based tests for GoModExpr
2020-10-14 09:25:38 -07:00
Sauyon Lee
34837c10ce
Fix tests for go.mod files
2020-10-14 09:25:38 -07:00
Sauyon Lee
3242df4177
Use package root directory to find go.mod files
2020-10-14 09:13:57 -07:00
Owen Mansel-Chan
8811758e44
Add change note
2020-10-14 14:49:50 +01:00
Owen Mansel-Chan
4b76966a49
Model Spew logging framework
2020-10-14 14:47:22 +01:00
Chris Smowton
b2fef01d28
Merge pull request #378 from smowton/smowton/admin/change-note-typo
...
Fix changenote typo
2020-10-14 13:33:21 +01:00
Chris Smowton
72ee460a64
Fix changenote typo
2020-10-14 13:32:26 +01:00
Chris Smowton
0afa0e75c4
Merge pull request #374 from smowton/smowton/feature/more-accurate-allocation-overflow
...
Improve accuracy of allocation-size-overflow by excluding len(...) calls that never see a large operand
2020-10-14 13:25:45 +01:00
Chris Smowton
83a7411a05
Improve accuracy of allocation-size-overflow by excluding len(...) calls that never see a large operand
...
This is achieved by splitting the query into two pieces: (1) trace flow from indefinitely large object creation to len(...) calls, then (2) considering those particular len(...) calls as taint propagators, trace taint from the same sources all the way to an allocation call. This is more accurate than the previous solution, which considered any len(...) call to propagate taint, potentially confusing an array that stored a large value in one of its cells for an array which is itself of large size.
2020-10-14 10:16:08 +01:00
Chris Smowton
59f8717ca2
Merge pull request #372 from smowton/smowton/feature/golang-x-net-context
...
Extend `context` models to cover its old `golang.org/x/net/context` home.
2020-10-13 10:33:36 +01:00
Chris Smowton
40869480e1
Extend context models to cover its old golang.org/x/net/context home.
2020-10-12 12:27:19 +01:00
Chris Smowton
b370a865f1
Merge pull request #370 from max-schaefer/fix-formatting-targets
...
Fix escaping in Makefile targets.
2020-10-09 10:56:07 +01:00
Max Schaefer
9db478aa03
Fix escaping in Makefile targets.
...
Previously, invoking `make autoformat` would run a command of this form:
```sh
... | grep \\.go$ | ...
```
Note that the `$` is not escaped. This probably wasn't intended, even though it happens to work anyway, since the shell doesn't try to expand lone `$`s.
More problematically, invoking `make check-formatting` would run a command of this form:
```sh
... | grep \\.go| ...
```
Note that the `$` is gone, so it matches `.go` anywhere in the file name. In particular, it matches `ql/test/library-tests/semmle/go/frameworks/Protobuf/vendor/google.golang.org/protobuf/LICENSE`, which I think is responsible for the somewhat mysterious "expected 'package', found Copyright" errors we've been seeing from CI.
This PR fixes both targets to run
```sh
... | grep '\.go$' | ...
```
Because of the single quotes we only need a single backslash, and the `$` gets left alone.
2020-10-09 09:07:24 +01:00
Sauyon Lee
85c92251d6
Add a new binary for tracing
2020-10-08 23:31:06 -07:00
Sauyon Lee
de0582a67f
autobuilder: extract out attempted build commands
2020-10-08 23:31:05 -07:00
Sauyon Lee
cd63ea84aa
extractor: revamp argument parsing
2020-10-08 23:31:05 -07:00
Sauyon Lee
2da89c6527
extractor: factor out run from autobuilder
2020-10-08 23:31:05 -07:00
Sauyon Lee
eaf5342b7d
Enable Go modules while determining module directory
2020-10-08 23:31:05 -07:00
Sauyon Lee
16796529fc
Add package directory as a wanted root
2020-10-08 23:31:05 -07:00
Chris Smowton
024e8ef715
Merge pull request #368 from sauyon/xpath-fix
...
Update XPathExpressionString to match the Range pattern
2020-10-08 09:24:04 +01:00
Sauyon Lee
43de6ea836
Update XPathExpressionString to match the Range pattern
...
Fixes #367
2020-10-07 14:29:05 -07:00
Chris Smowton
c8a2d30e39
Merge pull request #360 from smowton/smowton/feature/stack-trace-exposure
...
Add stack-trace exposure query
2020-10-07 11:08:37 +01:00
Chris Smowton
d7dcf27f57
Merge pull request #362 from smowton/smowton/admin/refactor-function-node
...
Refactor DataFlow::FunctionNode as a concrete class
2020-10-06 15:08:54 +01:00
Chris Smowton
0eb7ac94cc
Add stack-trace exposure query
...
This is a port of `java/stack-trace-exposure`, and does the same job: warn that a stack dump is written to an HTTP response.
2020-10-06 14:42:59 +01:00
Chris Smowton
68bb7b02fe
Refactor DataFlow::FunctionNode as a concrete class
...
This makes it easier to refine FunctionNode without having to define abstract members.
2020-10-06 14:02:57 +01:00
Chris Smowton
5bdff0f9d3
Merge pull request #363 from smowton/smowton/fix/use-realpath-for-gopath
...
Autobuilder: Use fully resolved path for GOPATH
2020-10-05 10:53:17 +01:00
Chris Smowton
6b6c862274
Autobuilder: Use fully resolved path for GOPATH
...
Otherwise on systems where /tmp is a symlink (e.g. default OSX setup), GOPATH does not match the current working directory after os.Chdir'ing to that directory (os.Chdir resolves symlinks, unlike a shell's 'cd' command), which causes `dep` to fail complaining that it is being run from outside GOPATH.
2020-10-02 17:05:47 +01:00
Chris Smowton
e8710612d8
Merge pull request #361 from smowton/smowton/admin/fix-broken-qhelp-links
...
Fix OWASP broken links
2020-10-01 14:28:30 +01:00
Chris Smowton
4af5765275
Fix OWASP broken links
2020-10-01 13:06:03 +01:00
Chris Smowton
1be34c0c90
Merge pull request #359 from smowton/smowton/fix/suspicious-regex-qhelp
...
Improve variable names in example code
2020-09-30 11:03:10 +01:00
Max Schaefer
3490d35926
Merge pull request #358 from smowton/smowton/admin/qhelp-action
...
Add Action to build and upload qhelp
2020-09-29 17:31:07 +01:00
Chris Smowton
1cfad846c8
Improve variable names in example code
...
These were inherited from the JS version of the example, which concerns HTML.
2020-09-29 16:37:06 +01:00
Chris Smowton
6b28c0705a
Add Action to build and upload qhelp
2020-09-29 16:16:25 +01:00
Max Schaefer
3dde501b54
Merge pull request #356 from max-schaefer/api-cleanup
...
Add and move around a few convenience predicates
2020-09-29 08:32:53 +01:00
Max Schaefer
97fb967d5c
Add a few tests.
2020-09-28 10:58:28 +01:00
Max Schaefer
56f295f741
Add a few useful shortcuts.
2020-09-25 16:58:28 +01:00
Sauyon Lee
2ba9bbfd8b
Merge pull request #355 from sauyon/moddir-fix
...
Improve extractor logging and a minor readability fix
2020-09-25 05:44:35 -07:00
Sauyon Lee
7ea3b34e4b
extractor: Reorganize code to be in a slightly more sensible order
2020-09-25 04:23:35 -07:00
Sauyon Lee
e158b39287
Improve extractor logging
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-25 04:23:31 -07:00
Max Schaefer
8667b64a1c
Make result variables aware of their index.
2020-09-25 10:51:32 +01:00
Chris Smowton
88c740bbbc
Merge pull request #353 from gagliardetto/remove-duplicate-models
...
Remove duplicate models (the end)
2020-09-24 13:31:18 +01:00
Slavomir
4f7edb85da
Fix package count
2020-09-24 12:41:14 +02:00
Slavomir
1f5da54ac9
Update change-notes/2020-09-23-stdlib.md
...
Co-authored-by: Chris Smowton <smowton@github.com >
2020-09-24 12:40:39 +02:00
Arthur Baars
575c56c426
Merge pull request #354 from github/aibaars/lgtm-go-lines-of-comment
...
LGTM: add Metrics/FLinesOfComment.ql to go-lgtm-full.qls
2020-09-24 12:22:07 +02:00
Arthur Baars
240f3ed7dc
LGTM: add Metrics/FLinesOfComment.ql to go-lgtm-full.qls
2020-09-24 11:04:15 +02:00
Max Schaefer
907ae20a16
Merge pull request #350 from smowton/smowton/feature/bad-regex-escape-query
...
Add query spotting probably-bad escapes in regular expressions.
2020-09-24 09:49:16 +01:00
Slavomir
8e007623ca
Improve change note
2020-09-23 18:03:11 +02:00
Slavomir
ef20f75cbe
Add change note
2020-09-23 17:52:52 +02:00
Slavomir
8b397c1eff
Remove this. from the generated method and interface models
2020-09-23 17:28:44 +02:00
Slavomir
539127b1d1
Remove models for methods for which there already is a models for the interface they implement.
2020-09-23 17:16:01 +02:00
Chris Smowton
59138048bb
Add query spotting probably-bad escapes in regular expressions.
...
Inspired by js/useless-regexp-character-escape, but much much simpler because the Go source code parser forbids unrecognised escapes and its regex engine refuses to compile \\x where x is not a character class or other special token (e.g. start-of-word).
2020-09-23 15:07:22 +01:00
Chris Smowton
a094ddb988
Merge pull request #349 from gagliardetto/stdlib-339-340-342-346-347
...
Merge #339 #340 #342 #346 #347
2020-09-23 14:38:04 +01:00
Chris Smowton
1a3589ac06
Merge pull request #352 from smowton/smowton/feature/http-newrequest
...
Add model for net/http.NewRequest
2020-09-23 09:56:17 +01:00
Max Schaefer
6130720e00
Merge pull request #348 from max-schaefer/functioninput_entrynode
...
Ensure `FunctionInput`s corresponding to results have an entry node
2020-09-23 09:15:18 +01:00
Chris Smowton
c1fbbfb05a
Add model for net/http.NewRequest noting that if the URL is tainted then the response should be considered tainted also.
2020-09-23 08:46:36 +01:00
Slavomir
364b6810ce
Sort stdlib imports
2020-09-22 18:50:12 +02:00
Slavomir
a7148638aa
Merge branch 'standard-lib-pt-6' into stdlib-339-340-342-346-347
2020-09-22 18:44:14 +02:00
Slavomir
61a0cfa06a
Merge branch 'standard-lib-pt-4' into stdlib-339-340-342-346-347
2020-09-22 18:43:30 +02:00
Slavomir
315514085f
Merge branch 'standard-lib-pt-9' into stdlib-339-340-342-346-347
2020-09-22 18:43:14 +02:00
Slavomir
0510404112
Merge branch 'standard-lib-pt-12' into stdlib-339-340-342-346-347
2020-09-22 18:42:46 +02:00
Slavomir
1a5d582750
Remove Regexp
2020-09-22 13:37:39 +02:00
Slavomir
e742525be5
Fix (*Logger).Writer() model
2020-09-22 13:35:55 +02:00
Slavomir
bff19d5a37
Move and extend Log module for package log with taint-tracking
2020-09-22 13:35:55 +02:00
Slavomir
3a7406b14c
Remove redundant Read and Write method models
2020-09-22 13:33:37 +02:00
Slavomir
3abf0e8d29
Add taint-tracking for crypto/x509 package
2020-09-22 13:33:37 +02:00
Slavomir
3acb7a5311
Add taint-tracking for crypto/tls package
2020-09-22 13:33:37 +02:00
Slavomir
5e0e3cc2cc
Add taint-tracking for crypto/rsa package
2020-09-22 13:33:37 +02:00
Slavomir
742319c071
Move to stdlib and expand crypto/cypher package taint-tracking
2020-09-22 13:33:37 +02:00
Slavomir
434c4bca9c
Add taint-tracking for crypto package
2020-09-22 13:33:37 +02:00
Max Schaefer
c61881acb3
Merge pull request #344 from smowton/smowton/feature/echo-models
...
Add models for the Echo framework
2020-09-22 10:45:02 +01:00
Max Schaefer
2d4f17c91c
Ensure result inputs always have an entry node.
2020-09-22 09:08:17 +01:00
Max Schaefer
4b56581122
Fix input nodes for results that are not assigned to an SSA variable.
2020-09-22 09:06:16 +01:00
Max Schaefer
9c640fff4f
Add a new test for FunctionInputsAndOutputs.
2020-09-22 09:04:49 +01:00
Max Schaefer
c905149579
Merge pull request #341 from gagliardetto/standard-lib-pt-10
...
Move to stdlib and extend the models for `fmt` package
2020-09-21 22:10:56 +01:00
Chris Smowton
7b917f9dd7
Add utility functions for getting FunctionInputs and FunctionOutputs.
2020-09-21 17:35:40 +01:00
Chris Smowton
397282f41a
Add models for the Echo framework
2020-09-21 17:35:40 +01:00
Chris Smowton
bdb3e54299
Add tests for stdlib-http fields that aren't supposed to cause open-redirect alerts
2020-09-21 16:26:46 +01:00
Chris Smowton
b6b7bd2717
Generalise model of HTTP libraries
...
* Allow for HTTP response methods that define a content-type without a corresponding header write
* Factor out stdlib-http-specific classification of fields that aren't vulnerable to an open-redirect exploit
2020-09-21 16:26:39 +01:00
Slavomir
0005775e2b
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-09-21 16:23:21 +02:00
Slavomir
dedeb7bbf1
Add taint-tracking for container/ring package
2020-09-21 12:34:00 +02:00
Slavomir
75e3ee6e77
Add taint-tracking for container/list package
2020-09-21 12:32:39 +02:00
Slavomir
4ecf9b0f6b
Add taint-tracking for container/heap package
2020-09-21 12:30:47 +02:00
Chris Smowton
6770c74b7f
Merge pull request #345 from gagliardetto/from-331-to-337
...
Merge #331 , #332 , #333 , #334 , #335 , #336 , #337
2020-09-21 09:34:41 +01:00
Slavomir
a7dba54001
Merge branch 'standard-lib-pt-15' into from-331-to-337
2020-09-20 18:25:29 +02:00
Slavomir
ad53583b5e
Remove methods on IP
2020-09-20 18:23:56 +02:00
Slavomir
17868dd6b1
Merge branch 'standard-lib-pt-16' into from-331-to-337
2020-09-20 15:47:35 +02:00
Slavomir
ed965c7101
Merge branch 'standard-lib-pt-19' into from-331-to-337
2020-09-20 15:47:14 +02:00
Slavomir
53e0e3ffbf
Merge branch 'standard-lib-pt-20' into from-331-to-337
2020-09-20 15:46:47 +02:00
Slavomir
9d1381349f
Merge branch 'standard-lib-pt-23' into from-331-to-337
2020-09-20 15:46:26 +02:00
Slavomir
1d13ca58ff
Merge branch 'standard-lib-pt-22' into from-331-to-337
2020-09-20 15:46:02 +02:00
Slavomir
cd151fcdd1
Merge branch 'standard-lib-pt-5' into from-331-to-337
2020-09-20 15:45:46 +02:00
Slavomir
5e7b279569
Remove model for a method that satisfies an interface that already has its own model.
2020-09-20 15:38:37 +02:00
Slavomir
3fd6f9c400
Extend QueryString::Range with database/sql/driver interfaces' methods
2020-09-20 15:38:37 +02:00
Slavomir
24e8a18d22
Add database/sql/driver taint-tracking
2020-09-20 15:38:37 +02:00
Slavomir
5e4d75561c
Add database/sql/driver taint-tracking
2020-09-20 15:38:37 +02:00
Slavomir
6f0bfbfa96
Add taint-tracking to database/sql package in the SQL module
2020-09-20 15:38:37 +02:00
Slavomir
55a8e24055
Taint-track package expvar
2020-09-20 15:38:37 +02:00
Slavomir
29382744fe
Taint-track package errors
2020-09-20 15:38:37 +02:00
Slavomir
4127cb5cc4
Remove rune/byte read/write from TaintStep/io.go
2020-09-20 15:35:02 +02:00
Slavomir
07fdd3d17a
Fix TaintStep.expected: fix io.Pipe logic, remove rune/byte read/write
2020-09-20 15:33:11 +02:00
Slavomir
c4a493f003
Remove models for methods where there are already interface models
2020-09-20 15:13:48 +02:00
Slavomir
dc159eeee1
Remove io.Writer model from io/ioutil
2020-09-20 15:13:48 +02:00
Slavomir
f1cdfff331
Import IoIoutil module
2020-09-20 15:13:48 +02:00
Slavomir
073fae9ff8
Move to stdlib and extend the module for io/ioutil package
2020-09-20 15:13:48 +02:00
Slavomir
45dfc2bcf2
Move to stdlib, extend and refactor the Io module
2020-09-20 15:13:48 +02:00
Slavomir
a784a25a61
Remove (net.IP).UnmarshalText
2020-09-20 15:01:42 +02:00
Slavomir
1578a66731
Remove models for net.Parse*
2020-09-20 15:01:42 +02:00
Slavomir
e14f857761
Add taint-tracking for package net/textproto
2020-09-20 15:01:42 +02:00
Slavomir
75751d732b
Add taint-tracking for package net/mail
2020-09-20 15:01:42 +02:00
Slavomir
e6cb8fe5ce
Add taint-tracking for package net/http/httputil
2020-09-20 15:01:42 +02:00
Slavomir
85f9760662
Move existing net/http classes from private module StdlibHttp to stdlib.NetHttp
2020-09-20 15:01:41 +02:00
Slavomir
e66fcef396
Add taint-tracking for net/http package
2020-09-20 15:01:41 +02:00
Slavomir
fa04d5a74d
Add taint-tracking for package net
2020-09-20 15:01:41 +02:00
Slavomir
c89cfc8867
Use go 1.14.3
2020-09-20 14:52:40 +02:00
Slavomir
8eeb019b5c
Move existing OS (all caps name) module classes to stdlib.Os module (notice the camelcase name)
2020-09-20 14:52:40 +02:00
Slavomir
f811dff527
Add taint-tracking for package os
2020-09-20 14:52:40 +02:00
Chris Smowton
fee596ac83
Merge pull request #343 from smowton/smowton/feature/chi-models
...
Add models for the Chi web framework
2020-09-16 11:38:08 +01:00
Chris Smowton
1bf366c1e3
Add models for the Chi web framework
...
This is mostly simple as the framework uses ordinary net/http methods and ordinary Go contexts for most purposes.
2020-09-16 09:14:23 +01:00
Slavomir
b529cf4c86
Import Fmt module
2020-09-15 19:19:30 +02:00
Max Schaefer
88e03c3ee5
Merge pull request #322 from gagliardetto/standard-lib-pt-11
...
Add taint-tracking for packages in `html/*`
2020-09-15 17:54:35 +01:00
Slavomir
375ac63499
Move to stdlib and extend the models for fmt package
2020-09-15 17:27:56 +02:00
Slavomir
a340270dc1
Move html TemplateEscape out of Texttemplate module
2020-09-14 15:47:52 +02:00
Slavomir
9a560e994c
Remove redundant field
2020-09-14 15:47:51 +02:00
Slavomir
ce67720542
Add taint-tracking for html/template package.
2020-09-14 15:47:51 +02:00
Slavomir
35136bbb2c
Add escape function.
2020-09-14 15:47:51 +02:00
Slavomir
52d4c71ec2
Add taint-tracking for html package.
2020-09-14 15:47:51 +02:00
Chris Smowton
8d7cbe3aa5
Merge pull request #323 from gagliardetto/standard-lib-pt-8
...
Add taint-tracking for packages in `encoding/*`
2020-09-14 14:41:19 +01:00
Chris Smowton
3ba85576ea
Merge pull request #338 from smowton/smowton/admin/update-dataflow-libs-2020-09-14
...
Port codeql#4238 (Dataflow: small fixes for naming in taint tracking)…
2020-09-14 14:19:06 +01:00
Slavomir
6bbe0182ca
Rename Syscall_non_windows.go to Syscall_non_win.go
2020-09-14 13:34:24 +02:00
Slavomir
4c2537017f
Fix TaintStep.expected: add params to json.MarshalIndent
2020-09-14 13:10:25 +02:00
Slavomir
64a61bd648
Remove redundant taint-tracking from MarshalingFunction and UnmarshalingFunction classes in EncodingXml module.
2020-09-14 13:10:25 +02:00
Slavomir
947bbabf62
Extend MarshalingFunction and UnmarshalingFunction with encoding/pem
2020-09-14 13:10:25 +02:00
Slavomir
d472d5abe5
Remove redundant taint-tracking from MarshalingFunction and UnmarshalingFunction classes in EncodingJson module.
2020-09-14 13:10:25 +02:00
Slavomir
ed2e5b0f92
Extend MarshalingFunction and UnmarshalingFunction with encoding/asn1
2020-09-14 13:10:25 +02:00
Slavomir
afede9bde5
Remove encoder taint-tracking for encoding/hex
2020-09-14 13:10:25 +02:00
Slavomir
96a700becb
Remove encoder taint-tracking for encoding/base64
2020-09-14 13:10:25 +02:00
Slavomir
0baca5fa6c
Remove encoder taint-tracking for encoding/base32
2020-09-14 13:10:25 +02:00
Slavomir
828d3863a0
Remove encoder taint-tracking for encoding/ascii85
2020-09-14 13:10:25 +02:00
Slavomir
f3a61ed65c
Add MarshalFunction and UnmarshalFunction classes to EncodingXml module.
2020-09-14 13:10:25 +02:00
Slavomir
b4ff653071
Add taint-tracking for encoding/xml
2020-09-14 13:10:25 +02:00
Slavomir
e7fc3c5039
Add taint-tracking for encoding/pem
2020-09-14 13:10:25 +02:00
Slavomir
669ed91b0b
Move EncodingJson to stdlib; add Escape class.
2020-09-14 13:10:25 +02:00
Slavomir
24c23ba333
Add taint-tracking for encoding/json
2020-09-14 13:10:25 +02:00
Slavomir
f5fc9494fc
Remove old EncodingHex module
2020-09-14 13:10:25 +02:00
Slavomir
74fdfba85c
Add taint-tracking for encoding/hex
2020-09-14 13:10:25 +02:00
Slavomir
7a42992850
Add taint-tracking for encoding/gob
2020-09-14 13:10:25 +02:00
Slavomir
57518c7e3d
Add taint-tracking for encoding/csv
2020-09-14 13:10:25 +02:00
Slavomir
df55bb459f
Add taint-tracking for encoding/binary
2020-09-14 13:10:25 +02:00
Slavomir
20b4826e8e
Add taint-tracking for encoding/base64
2020-09-14 13:10:25 +02:00
Slavomir
7060367de5
Add taint-tracking for encoding/base32
2020-09-14 13:10:24 +02:00
Slavomir
ba78eda277
Add taint-tracking for encoding/asn1
2020-09-14 13:10:24 +02:00
Slavomir
412ba1263b
Add taint-tracking for encoding/ascii85
2020-09-14 13:10:24 +02:00
Slavomir
a47842d1c3
Add taint-tracking for package encoding
2020-09-14 13:10:24 +02:00
Slavomir
27ba893ba2
Add taint-tracking for context package
2020-09-14 13:09:45 +02:00
Slavomir
eb3a18f172
Add taint-tracking for package sort
2020-09-14 13:08:54 +02:00
Slavomir
71dbb244f9
Move existing Regexp module to stdlib
2020-09-14 13:08:16 +02:00
Slavomir
7f3a911f86
Add taint-tracking for package regexp
2020-09-14 13:08:16 +02:00
Slavomir
c2fc26a96a
Remove Range method on sync.Map
2020-09-14 13:04:52 +02:00
Slavomir
d51518f411
Add taint-tracking for sync/atomic package
2020-09-14 13:04:52 +02:00
Slavomir
e47715b2a9
Add taint-tracking for sync package
2020-09-14 13:04:52 +02:00
Chris Smowton
86ed037fd3
Port codeql#4238 (Dataflow: small fixes for naming in taint tracking) to Go's local copy of the dataflow libs
2020-09-14 12:01:30 +01:00
Slavomir
d929e8313a
Build syscall.StringSlicePtr only on non-windows OS
2020-09-14 12:49:41 +02:00
Slavomir
702a984dc0
Comment out test for syscall.StringSlicePtr because it's not present on windows.
2020-09-14 12:49:41 +02:00
Slavomir
72ef65f257
Add taint-tracking for syscall
2020-09-14 12:49:41 +02:00
Chris Smowton
362d210bc5
Merge pull request #330 from smowton/smowton/admin/standard-lib-pt-21-with-sanitiser
...
Move `strconv` and `strings` packages' taint-tracking to stdlib, and expand them + sanitise substrings of the HTTP Authorization header
2020-09-14 11:25:57 +01:00
Chris Smowton
b9b306aade
CleartextLogging: sanitize strings.Split(authheader, ":")[0] and similar
...
These can represent a username, method name or other non-sensitive component of an Authorization header. For greater precision we could split the query into one investigating Authorization headers and one investigating other sources of sensitive data that can't be sanitized by splitting this way.
2020-09-14 09:46:14 +01:00
Slavomir
cf29f9dede
Remove taint-tracking on single bytes and runes
2020-09-14 09:46:14 +01:00
Slavomir
6d3e6ded26
Fix: the Append* functions do not modify the dst slice argument.
2020-09-14 09:46:14 +01:00
Slavomir
9293bcde1d
Fix ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected: calls to strings.NewReader are a step now.
2020-09-14 09:46:14 +01:00
Slavomir
3075294cd8
Move strings module to stdlib, and add more taint-tracking classes to it.
2020-09-14 09:46:13 +01:00
Slavomir
42c7f8cc0d
Add taint-tracking for strconv package; rename module StrConv to Strconv and move into stdlib
2020-09-14 09:44:25 +01:00
Max Schaefer
b8d36b936e
Merge pull request #321 from gagliardetto/standard-lib-pt-14
...
Add taint-tracking for packages inside `mime/*`
2020-09-14 09:26:29 +01:00
Max Schaefer
c10942d044
Merge pull request #320 from gagliardetto/standard-lib-pt-24
...
Add taint-tracking for packages inside `text/*`
2020-09-11 15:57:14 +01:00
Max Schaefer
c889bc3dae
Merge branch 'main' into standard-lib-pt-24
2020-09-11 14:09:50 +01:00
Chris Smowton
84def5f6c2
Merge pull request #327 from smowton/smowton/feature/more-post-update-nodes
...
Add PostUpdateNodes for nested structs and arrays
2020-09-11 12:47:20 +01:00
Max Schaefer
903cffe7ed
Merge pull request #317 from gagliardetto/standard-lib-pt-18
...
Add taint-tracking for `reflect` package
2020-09-11 11:26:48 +01:00
Chris Smowton
650bc1d38f
Add PostUpdateNodes for derferenced expressions on an access path to a field- or element-write
2020-09-11 10:46:58 +01:00
Max Schaefer
e9bf3317b5
Merge pull request #328 from owen-mc/gorm-exec
...
Update GORM model
2020-09-11 08:41:09 +01:00
Max Schaefer
3758c6b7d8
Merge pull request #329 from smowton/smowton/feature/xss-detect-more-json-encoding
...
Reflected XSS query: exclude more uses of encoding/json.Marshal
2020-09-11 08:38:30 +01:00
Owen Mansel-Chan
13e82de53d
Add change note
2020-09-10 17:29:06 +01:00
Chris Smowton
405babf5af
Reflected XSS query: exclude more uses of encoding/json.Marshal
...
Previously we only detected these if the marshalling directly fed the request body within the same function; now it's a general sanitiser for the purposes of XSS.
2020-09-10 16:52:06 +01:00
Owen Mansel-Chan
3af90c9fc8
Update GORM tests
2020-09-10 13:48:12 +01:00
Owen Mansel-Chan
d807e8de75
Add more methods from GORM as sinks
...
Cf. https://gorm.io/docs/security.html
2020-09-09 16:18:41 +01:00
Owen Mansel-Chan
95c1f754c6
Add alternative package locations
2020-09-09 14:52:26 +01:00
Max Schaefer
baf048f293
Merge pull request #326 from owen-mc/change-note-for-allocation-size-overflow-sanitizers
...
Add change note for #296
2020-09-08 16:53:05 +01:00
Owen Mansel-Chan
cd6020810a
Add change note for #296
2020-09-08 16:32:12 +01:00
Chris Smowton
5068b8b195
Add PostUpdateNodes for nested structs and arrays
...
This creates a PostUpdateNode for x in the contexts `x.field[element]`, `x.field.otherfield`, `x[element].field` and so on.
Most uses of PostUpdateNode implicitly assume its old definition, but our protobuf model benefits.
2020-09-08 16:28:02 +01:00
Max Schaefer
65c449cff0
Merge pull request #325 from max-schaefer/revert-237
...
Revert "Revert "autobuilder: Add support for GITHUB_REPOSITORY environment variable""
2020-09-08 08:04:58 +01:00
Max Schaefer
52a659183d
Merge pull request #314 from smowton/smowton/admin/bump-golang-tools
...
Bump to latest version of golang.org/x/tools
2020-09-07 16:02:55 +01:00
Max Schaefer
655e229d1e
Revert "Revert "autobuilder: Add support for GITHUB_REPOSITORY environment variable""
...
This reverts commit ccfccb4828 .
2020-09-07 15:14:52 +01:00
Max Schaefer
1821cca5d2
Merge pull request #285 from smowton/protobufs
...
Protobuf modelling
2020-09-07 11:42:37 +01:00
Slavomir
25e3f75ddc
Add taint-tracking for mime/quotedprintable package.
2020-09-06 17:45:09 +02:00
Slavomir
99b251d4f0
Add taint-tracking for mime/multipart
2020-09-06 17:42:57 +02:00
Slavomir
c44d426794
Add taint-tracking for mime package.
2020-09-06 17:39:41 +02:00
Slavomir
3b2e16e292
Move text/template classes to TextTemplate module inside stdlib.
2020-09-06 17:32:34 +02:00
Slavomir
0d5c7e3132
Add taint-tracking for text/template template.
2020-09-06 17:32:34 +02:00
Slavomir
db0b09beb4
Add taint-tracking for text/tabwriter package.
2020-09-06 17:32:34 +02:00
Slavomir
4df363d2ce
Add taint-tracking for text/scanner package.
2020-09-06 17:32:34 +02:00
Chris Smowton
cfba0896f0
Improve code style
...
No behavioural changes
2020-09-04 17:05:32 +01:00
Chris Smowton
fb85ccb2a5
Look through implicit deref operations when propagating taint down a chain of field- and element-access instructions.
...
This enables us to use PostUpdateNode properly. Also introduce a test showing a case where this doesn't work, because the underlying variable doesn't have a post-update node.
2020-09-04 17:03:52 +01:00
Chris Smowton
3635d7d007
Introduce and use writeComponent
2020-09-04 17:03:52 +01:00
Chris Smowton
2a863fbbe7
Abbreviate protobuf package names
2020-09-04 17:03:52 +01:00
Chris Smowton
18ed6bd1ee
Add missing qldoc
2020-09-04 17:03:52 +01:00
Chris Smowton
90915284ba
Move getUnderlyingNode into Protobuf.qll
...
This is its only user for now.
2020-09-04 17:03:52 +01:00
Chris Smowton
59f9c6073d
Introduce instruction type for component access
...
This is the union of a field-access and an element-access instruction
2020-09-04 17:03:52 +01:00
Chris Smowton
455cf0c502
Add support and tests for protobuf messages with map fields
2020-09-04 17:03:52 +01:00
Chris Smowton
b2d4e2692f
Taint underlying aggregates of protobuf messages when an element is written
...
For example, writing to a[b].c[d] taints 'a'.
2020-09-04 17:03:52 +01:00
Chris Smowton
3d82308e07
Introduce common base class for ElementReadNode and FieldReadNode
2020-09-04 17:03:52 +01:00
Chris Smowton
56f6e67671
Protobufs: improve comment and code style
...
No functional changes
2020-09-04 15:14:49 +01:00
Chris Smowton
65dc6272d1
Remove prototype tests
...
I don't think we need these when we have the end-to-end taintFlows test.
2020-09-04 15:14:49 +01:00
Chris Smowton
b639b6ec6a
Remove redundant copies of the generated protoc output
2020-09-04 15:14:49 +01:00
Chris Smowton
8058d096d2
Model and test UnmarshalOptions.Unmarshal
...
Support for UnmarshalOptions.UnmarshalState is dropped for now as too hard to model.
2020-09-04 15:14:49 +01:00
Chris Smowton
c2ff2df403
Add test showing false-negative for MarshalState
2020-09-04 15:14:49 +01:00
Chris Smowton
42d6250b8d
Add modern-API variants of tests
2020-09-04 15:14:49 +01:00
Chris Smowton
8682eb9dec
Add tests showing imprecision of our current implementation
2020-09-04 15:14:49 +01:00
Chris Smowton
a832342ecb
Add test for unmarshalling submessages
2020-09-04 15:14:49 +01:00
Chris Smowton
596204f79d
Add (currently-failing) expectations for submessage tainting
2020-09-04 15:14:49 +01:00
Chris Smowton
c9296abe25
Restrict tainting from field-writes to Message types
2020-09-04 15:14:49 +01:00
Chris Smowton
95798590ce
Implement MarshalState method
...
Currently relies on blanket field-write propagation.
2020-09-04 15:14:49 +01:00
Chris Smowton
c34fc3c9ad
Add tests for MarshalAppend and MarshalState
...
The MarshalState test doesn't work yet, because we don't know to read taint from the Message field of the input or write it to the Buf field of the output
2020-09-04 15:14:49 +01:00
Chris Smowton
2ca6157836
Protobuf: support both legacy and modern APIs
2020-09-04 15:14:49 +01:00
Chris Smowton
df0238a352
Fix proto.Clone method
...
This is top-level, not a member.
2020-09-04 15:14:49 +01:00
Chris Smowton
e76c07d77b
Temporarily taint all structs from field writes
...
This should be either refined to just Message types, or else a macro taint step should be added conducting taint from field-write-of-argument to Marshal's result.
On the read-side we're currently fine: the bytes are tainted, so the object is tainted, so the field reads are tainted.
2020-09-04 15:14:49 +01:00
Chris Smowton
19e1dacced
WIP: add more (manual) protobuf models, and a test that checks various taint-flow cases
...
Only some of the cases are currently working.
2020-09-04 15:14:49 +01:00
Sauyon Lee
4ff325aa13
--wip-- [skip ci]
2020-09-04 15:14:49 +01:00
Slavomir
095baeb8b6
Remove taint-tracking of booleans and numbers (but keep uintptr)
2020-09-04 12:06:34 +02:00
Max Schaefer
25e4245568
Merge pull request #291 from smowton/smowton/admin/oauth2-query-polish
...
Promote OAuth2-misuse query to mainline
2020-09-04 10:50:31 +01:00
Chris Smowton
47958e6de8
Go.mod comments: trim newlines
...
These weren't previously reported as part of the comment text, but are as of the latest version of golang.org/x/tools
2020-09-03 15:54:56 +01:00
Slavomir
5e62b002ff
Fix: Append* does not modify the dst slice argument.
2020-09-03 15:43:16 +02:00
Slavomir
e7f2fb27eb
Add taint-tracking for reflect package
2020-09-03 15:43:16 +02:00
Chris Smowton
380410e687
Go autoformat: exclude vendor/ directory
2020-09-03 14:37:26 +01:00
Chris Smowton
e386346a25
Extractor: tolerate ast.File structures without a package declaration
...
In earlier versions of golang/x/tools these would be omitted entirely; now they can result in ast.File structures whose ast.Package field is zero (NoPos), and in my experience these contain no information in their other fields either.
2020-09-03 14:32:23 +01:00
Max Schaefer
c7b4db8d16
Merge pull request #319 from aeisenberg/patch-1
...
Update devcontainer memory settings
2020-09-03 14:31:11 +01:00
Andrew Eisenberg
2e8e970978
Update devcontainer memory settings
...
CodeQL CLI needs a minimum of 2G of memory. By default, the memory used is slightly less than that, leading to poor performance.
This change also removes two old, unused settings.
2020-09-02 12:07:05 -07:00
Chris Smowton
b487799f69
Oauth2 state query: avoid duplicate paths by excluding variable references as sources
2020-09-02 17:40:53 +01:00
Chris Smowton
6fea8abd82
Oauth2 state query: improve code style
...
No behavioural changes intended.
2020-09-02 15:06:23 +01:00
Chris Smowton
2f175e365e
Oauth2 state query: remove unnecessary isSource overload
2020-09-02 15:05:22 +01:00
Chris Smowton
8f99972833
OAuth2 CSRF query: improve documentation
2020-09-02 15:05:22 +01:00
Chris Smowton
0ba42f7f87
OAuth2 state query: set precision
2020-09-02 15:05:22 +01:00
Chris Smowton
406ea741f4
Improve comment style
2020-09-02 15:05:22 +01:00
Chris Smowton
faf43efb60
Promote OAuth2 constant-state query to mainline
2020-09-02 15:05:22 +01:00
Chris Smowton
0ee7bbbaa7
Extend oauth2 tests
2020-09-02 15:05:21 +01:00
Chris Smowton
f61c62d2d8
Generalise isReturnedWithError
...
It now recognises any function returning an Error alongside other return values
2020-09-02 15:05:21 +01:00
Chris Smowton
9e4ee0accf
OAuth2 constant state query: trace local URLs across reference operations and Sprintf calls
2020-09-02 15:05:21 +01:00
Chris Smowton
050a823397
OAuth2 exclusion: hide cases that clearly target an out-of-band process or private HTTP server
2020-09-02 15:05:21 +01:00
Chris Smowton
bcb65157e6
Oauth2-state query: treat log calls the same as stdout printers
...
These presumably get to the user somehow, and in conjunction with stdin use are enough to identify use of oauth at the terminal.
2020-09-02 15:05:21 +01:00
Chris Smowton
3d877fc67d
Oauth2 state: note bufio.NewScanner is also a sign of probable terminal-interactive use
2020-09-02 15:05:21 +01:00
Chris Smowton
6fee4f382f
Constant-oauth2-state: exclude strings returned alongside an error value
...
For example, getState() { ... return "", someError } is commonly seen in the wild.
2020-09-02 15:05:21 +01:00
Chris Smowton
aac303c0a2
Merge pull request #287 from smowton/smowton/feature/restore-repo-after-build
...
Restore repo layout post-autobuild
2020-09-02 13:38:36 +01:00
Chris Smowton
246e8b1b27
Make failure to restore a file to its original location non-fatal
2020-09-02 11:44:43 +01:00
Chris Smowton
8de188a6ca
Restore repo layout post-autobuild
2020-09-02 11:44:43 +01:00
Max Schaefer
be64f3ed22
Merge pull request #316 from gagliardetto/standard-lib-pt-17
...
Move `path` and `path/filepath` packages to stdlib
2020-09-02 08:26:11 +01:00
Slavomir
386005d361
Add path and path/filepath packages to stdlib
2020-09-01 13:09:41 +02:00
Sauyon Lee
976151c08f
Merge pull request #315 from max-schaefer/fix-frontend-errors
...
Fix frontend errors in test.
2020-08-28 12:40:11 -07:00
Max Schaefer
2fe8fb9d83
Fix frontend errors in test.
2020-08-28 12:01:33 +01:00
Max Schaefer
031a48ecd3
Merge pull request #296 from owen-mc/allocation-size-overflow-improve-sanitizers-easy
...
Add new sanitizer guard to Allocation size overflow query
2020-08-28 07:44:45 +01:00
Max Schaefer
b4550f244b
Merge pull request #313 from github/rc/1.25
...
Merge rc/1.25 into main
2020-08-27 14:27:26 +01:00
Sauyon Lee
1743dae7b0
Merge pull request #312 from smowton/smowton/autobuilder-fixes-fixed-further
...
Autobuilder: always check the vendor directory works and if go.mod exists
2020-08-27 04:16:04 -07:00
Chris Smowton
af1be2f465
Bump to latest version of golang.org/x/tools
2020-08-27 11:57:21 +01:00
Chris Smowton
4d084372b5
Fix autobuilder Go version comparison
...
The semver package requires versions of the form v1.2.3, and unhelpfully evaluates any malformed versions as equal.
2020-08-27 11:02:23 +01:00
Chris Smowton
c6dbb9fcb2
Tidy up -mod argument stringification
2020-08-27 10:46:36 +01:00
Chris Smowton
b13b54f7d7
Don't try to use -mod=... when go.mod doesn't exist
...
Also don't pass a blank argument to `go` when using an old version.
2020-08-26 13:56:36 +01:00
Chris Smowton
9ad2d6c119
Factor default and custom install paths
...
These now follow the same route:
* Run a default or custom build script
* If needed, check if vendor/ is usable
* If it isn't, or if their build failed, install dependencies using go get etc
This commit shouldn't cause any behavioural change.
2020-08-26 12:02:54 +01:00
Chris Smowton
859b427881
Check if the vendor/ directory is usable, even after a successful build
2020-08-26 11:53:50 +01:00
Sauyon Lee
8f6b25e0ac
autobuilder: Use -mod=mod for vendor directories wihtout modules.txt
2020-08-26 11:25:30 +01:00
Sauyon Lee
70d425d317
autobuilder: move vendor check before dependency installation check
...
This means dependency installation is still attempted when a vendor
directory is inconsistent.
2020-08-26 11:25:30 +01:00
Sauyon Lee
852ae9397b
autobuilder: Test for vendor inconsistency
2020-08-26 11:25:30 +01:00
Sauyon Lee
28c69743a4
Add workaround for go 1.14 explicit vendoring requirement
...
This only applies for module files for which no Go version has
been specified; Go will assume these should be parsed with the
latest Go version, which will cause them to fail if the vendor
directory has been generated with an old version of Go, as
the vendor/modules.txt will not meet the new requirements for
consistency.
2020-08-26 11:25:30 +01:00
Max Schaefer
34d5e970ff
Merge pull request #311 from owen-mc/add-missing-change-notes
...
Add missing change notes
2020-08-26 11:21:00 +01:00
Owen Mansel-Chan
7fd5e7e978
Add change note for https://github.com/github/codeql-go/pull/277
2020-08-26 10:54:18 +01:00
Owen Mansel-Chan
ad6c94e8f9
Add change note for https://github.com/github/codeql-go/pull/251
2020-08-26 07:58:19 +01:00
Owen Mansel-Chan
210208b003
Add change note for https://github.com/github/codeql-go/pull/226
2020-08-26 07:46:56 +01:00
Owen Mansel-Chan
d4a377b7cc
Add change note for https://github.com/github/codeql-go/pull/107
...
The model for websocket was included in another change note
2020-08-26 07:21:05 +01:00
Owen Mansel-Chan
944b69066e
Add change note for github/codeql-go#125
2020-08-26 07:20:24 +01:00
Max Schaefer
3376e45508
Merge pull request #309 from owen-mc/restore-gin-change-note
...
Add change note for Gin framework
2020-08-25 10:42:57 +01:00
Owen Mansel-Chan
dc99a62dca
Add change note for Gin framework
...
This was originally put in too early because the Gin framework was
accidentally not added to the default includes.
This reverts commit 41e98d6afc .
2020-08-25 10:29:42 +01:00
Sauyon Lee
0de8ac3b87
Merge pull request #305 from max-schaefer/consistency-queries
...
Enable consistency queries in tests
2020-08-25 01:01:11 -07:00
Max Schaefer
76f3bd63ac
Merge pull request #306 from max-schaefer/fix-stringops-magic
...
Prevent misoptimisation in `StringOps`.
2020-08-25 08:45:54 +01:00
Max Schaefer
b72c4f958c
Fix tests for ExprHasNoEffect on non-Linux systems.
2020-08-25 08:05:19 +01:00
Max Schaefer
4c82ad6064
Apply suggestions from code review
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-08-25 07:37:11 +01:00
Max Schaefer
bdcb1f233c
Prevent misoptimisation in StringOps.
2020-08-24 20:11:23 +01:00
Max Schaefer
ab19d40f4b
Merge pull request #304 from max-schaefer/fix-frontend-errors
...
Fix frontend errors in tests
2020-08-24 18:44:32 +01:00
Max Schaefer
57180c24c7
Simplify consistency query.
...
Unlike the old ODASA consistency queries, new consistency queries can have expected results, so there is no need to have special handling of files with expected errors.
2020-08-24 17:39:28 +01:00
Max Schaefer
d7cfcf46a5
Run tests with consistency queries.
2020-08-24 17:39:28 +01:00
Max Schaefer
181438b827
Bump CodeQL version for CI to 2.2.5.
2020-08-24 17:39:28 +01:00
Max Schaefer
42c1116ac7
Merge pull request #303 from github/rc/1.25
...
Merge rc/1.25 into main
2020-08-24 17:22:56 +01:00
Max Schaefer
c06531d9c0
Fix tests for InsecureHostKeyCallback.
2020-08-24 17:18:28 +01:00
Max Schaefer
4d4129313a
Fix tests for Gorestful.
2020-08-24 17:18:06 +01:00
Max Schaefer
aad9ce0c97
Fix tests for OpenUrlRedirect.
2020-08-24 17:06:26 +01:00
Max Schaefer
4e202666dc
Fix tests for InsecureHostKeyCallback.
2020-08-24 17:06:01 +01:00
Max Schaefer
368227fff5
Fix tests for NegativeLengthCheck.
2020-08-24 17:04:55 +01:00
Max Schaefer
149ceda636
Fix tests for Gorestful.
2020-08-24 17:04:31 +01:00
Max Schaefer
a0a8a584a4
Fix error in ellipsis.go.
2020-08-24 17:01:16 +01:00
Sauyon Lee
402b239520
Merge pull request #300 from srt32/patch-1
...
Update bad / good message for CWE 079
2020-08-24 08:57:26 -07:00
Owen Mansel-Chan
a669fa4aa1
Do not flow taint through remainder expressions
...
If the tainted operand is the first operand then it is being bounded above
by the remainder expression. If it is the second operand then
2020-08-24 16:18:08 +01:00
Owen Mansel-Chan
aed3ef4cde
Improve performance of new barrier guard
...
Some projects on lgtm were taking >1 hour, and with this commit they take
<10 minutes
2020-08-24 16:18:08 +01:00
Simon Taranto
bd9100eb4e
Update other file too
2020-08-24 09:00:26 -06:00
Max Schaefer
5dc822886b
Merge pull request #302 from max-schaefer/fix-qhelp
...
Fix qhelp for incorrect integer-conversion query.
2020-08-24 11:20:32 +01:00
Max Schaefer
111d2a745b
Fix qhelp for incorrect integer-conversion query.
...
It seems qhelp doesn't like `<code>` inside `<a>`.
2020-08-24 09:55:43 +01:00
Simon Taranto
7adf477e2d
Update bad / good message for CWE 079
...
Previously, the "good" example still had the "BAD: " comment in it which was confusing.
This change updates the good example to have a "GOOD: " comment instead.
2020-08-21 15:31:47 -06:00
Owen Mansel-Chan
caf77e2a44
Merge pull request #298 from smowton/smowton/admin/changenote-blank-lines
...
Remove blank lines from changenote
2020-08-20 16:05:29 +01:00
Chris Smowton
b983778cd1
Merge pull request #297 from ginsbach/noinferred
...
remove reliance on InferredBinding
2020-08-20 11:52:14 +01:00
Chris Smowton
cc2a153c57
Remove blank lines from changenote
2020-08-20 11:45:29 +01:00
Owen Mansel-Chan
dbf1d24e19
Add new barrier guard for second half of path
2020-08-20 11:37:07 +01:00
Chris Smowton
ce93a449fa
Merge pull request #295 from owen-mc/remove-gin-change-note
...
Remove gin change note
2020-08-20 10:39:13 +01:00
Owen Mansel-Chan
41e98d6afc
Remove change note so it isn't accidentally put into this release
2020-08-20 10:27:51 +01:00
Owen Mansel-Chan
53cc3621ad
Change date on Gin change note
...
The Gin model wasn't added to the default imports
till 2020-08-19
2020-08-20 10:27:41 +01:00
Philip Ginsbach
1149d43488
remove reliance on InferredBinding from InsecureFeatureFlag::getAFlagName
2020-08-20 10:26:46 +01:00
Chris Smowton
89e420d49f
Merge pull request #294 from smowton/smowton/admin/reenable-checkout-v2
...
Revert "Downgrade to checkout@v1 to work around https://github.com/actions/checkout/issues/237 "
2020-08-20 07:48:12 +01:00
Chris Smowton
9b9b0b217e
Revert "Downgrade to checkout@v1 to work around https://github.com/actions/checkout/issues/237 "
...
This reverts commit 8aaa7c8925 .
The bug it was working around (if it ever did) has been fixed.
2020-08-19 17:53:25 +01:00
Owen Mansel-Chan
0260438ff3
Merge pull request #293 from owen-mc/import-gin-framework-by-default
...
Import Gin framework by default
2020-08-19 17:24:29 +01:00
Chris Smowton
33d35112e1
Merge pull request #292 from smowton/smowton/admin/document-public-predicates
...
Document undocumented public symbols
2020-08-19 15:52:06 +01:00
Owen Mansel-Chan
35e336fe96
Add tests for sanitizers and sanitizer guards
2020-08-19 15:36:48 +01:00
Owen Mansel-Chan
17b3d56195
Remove unnecessary string concat
2020-08-19 15:36:48 +01:00
Owen Mansel-Chan
103e655395
Import Gin framework by default
2020-08-19 15:26:12 +01:00
Chris Smowton
60d3de1911
Document undocumented public symbols
2020-08-19 14:29:12 +01:00
Chris Smowton
1e7bbcc23a
Merge pull request #290 from sauyon/openredirect-uri
...
Open URL Redirect: make isValidURI and the like sanitizers
2020-08-18 10:07:43 +01:00
Sauyon Lee
5b9fb2a28b
openurlredirect: make isValidURI and the like sanitizers
2020-08-17 10:45:46 -07:00
Chris Smowton
c07db2a373
Merge pull request #289 from smowton/gorand
...
(admin) Slightly cleaned up version of Insufficient Randomness
2020-08-17 12:00:26 +01:00
dilanbhalla
986f3c3084
Add experimental query detecting use of an insecure PRNG in a cryptographic context
2020-08-17 10:52:36 +01:00
Max Schaefer
d675daa1d1
Merge pull request #284 from dilanbhalla/gocrypto
...
Adding Crypto Query/Library
2020-08-14 12:00:18 +01:00
dilanbhalla
a58070f920
fixed build test error
2020-08-14 01:56:30 -07:00
dilanbhalla
7f980a4901
pr fixes
2020-08-14 00:45:08 -07:00
Max Schaefer
fe6cf8c625
Merge pull request #275 from owen-mc/incorrect-integer-conversion
...
Incorrect integer conversion
2020-08-13 20:19:47 +01:00
Owen Mansel-Chan
951d59752a
Address review comments 7
2020-08-13 18:22:58 +01:00
dilanbhalla
40d3f22193
fixing commit error
2020-08-12 10:49:11 -07:00
Owen Mansel-Chan
2e60d40ccd
Address review comments 6
2020-08-12 17:07:29 +01:00
Owen Mansel-Chan
69212b9ad9
Deal with build constraints
...
Note that build constraints can be explicit (comments at the top of the
file) or implicit (part of the file name)
2020-08-12 17:07:29 +01:00
dilanbhalla
37eca95d44
restructured library
2020-08-11 23:53:50 -07:00
dilanbhalla
79002b0c38
pr fixes
2020-08-11 10:34:45 -07:00
Owen Mansel-Chan
08d9af1bd7
Merge pull request #280 from owen-mc/negative-length-check-unsigned
...
Extend negativeLengthCheck query to unsigned integers
2020-08-11 11:59:24 +01:00
Owen Mansel-Chan
1e0b9cc6a3
Address review comments 5
2020-08-11 10:57:02 +01:00
Owen Mansel-Chan
97bbdca8a3
Extend negativeLengthCheck query to unsigned integers
...
Like return values from len and cap, unsigned integers are never negative
2020-08-11 10:48:03 +01:00
dilanbhalla
2ee654d643
attempting to fix autoformat build error
2020-08-11 01:07:53 -07:00
Max Schaefer
117fd686c4
Merge pull request #276 from gagliardetto/standard-lib-pt-3
...
Add taint tracking for the compress/* packages
2020-08-11 07:56:45 +01:00
Max Schaefer
cb5c596ab6
Merge pull request #283 from github/rc/1.25
...
Merge rc/1.25 into main
2020-08-11 07:51:17 +01:00
Owen Mansel-Chan
c7a8730c40
Improve tests of paths with more than one sink
2020-08-11 07:24:58 +01:00
Owen Mansel-Chan
4907f6529e
Address review comments 4
2020-08-11 07:24:58 +01:00
dilanbhalla
4433f193f9
pr fixes for typo and qldoc
2020-08-10 16:06:02 -07:00
dilanbhalla
7ce9e976c2
removing precision tag
2020-08-10 12:06:10 -07:00
dilanbhalla
95342cdea7
adding go crypto library
2020-08-10 11:56:41 -07:00
Owen Mansel-Chan
ed469a355e
Fix mistake in test
2020-08-10 17:32:49 +01:00
Max Schaefer
097775bf64
Merge pull request #282 from sauyon/tomain
...
Fix one use of master in README
2020-08-10 17:03:22 +01:00
Max Schaefer
61f4d8ddfc
Merge pull request #278 from max-schaefer/fix-upgrade-performance
...
Improve performance of upgrade script
2020-08-10 17:01:49 +01:00
Max Schaefer
d31b4d262f
Merge pull request #281 from max-schaefer/has_ellipsis
...
Teach extractor to distinguish calls with an ellipsis from calls without
2020-08-10 16:51:38 +01:00
Owen Mansel-Chan
30f176246a
Address review comments 3
2020-08-10 15:21:20 +01:00
Max Schaefer
6d35c60acb
Add pragma to prevent accidental inlining.
2020-08-10 14:51:28 +01:00
Max Schaefer
2ef421255a
Add a clarifying comment.
2020-08-10 14:49:19 +01:00
Max Schaefer
9385857c39
Add a regression test.
2020-08-10 14:48:13 +01:00
Owen Mansel-Chan
89eae10d96
Address review comments 2
2020-08-10 11:07:44 +01:00
Owen Mansel-Chan
4bfb2b4138
Address review comments 1
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
681ca9065a
Add change note
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
06d1eb9bdb
Add tests for incorrect integer conversion
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
329888e62c
Add query for incorrect integer conversion
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
34fa07267b
Add modeling to Stdlib.qll
...
Adds classes for some integer-parsing functions and a constant from
strconv, plus a class for calls to integer-parsing functions.
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
ac49aa2527
Delete experimental query and tests for it
2020-08-10 11:04:25 +01:00
Owen Mansel-Chan
3a6aa58e48
Fix typo in QLDoc
2020-08-10 11:04:25 +01:00
Max Schaefer
c2a26f8ec9
Don't allow varargs as function outputs.
...
In a call of the form `f(xs...)`, when we say that `f` taints its 0th argument its ambiguous whether that means that it taints the slice `xs` or its 0th element `xs[0]`.
In practice, it's usually the latter, but we have no way of expressing that using our current `FunctionOutput` implementation.
2020-08-10 07:30:23 +01:00
Max Schaefer
bdfd1d131f
Teach extractor to record the presence of an ellipsis in a call expression.
2020-08-10 07:30:23 +01:00
Sauyon Lee
0b97e486a2
Fix one use of master in README
2020-08-07 08:49:57 -07:00
Max Schaefer
97291e4c41
Merge pull request #279 from github/rc/1.25
...
Merge rc/1.25 into master
2020-08-06 11:18:11 +01:00
Max Schaefer
75795d80c4
Improve performance of upgrade script.
2020-08-06 09:51:36 +01:00
Max Schaefer
90bab34e88
Merge pull request #277 from sauyon/file-url-fix
...
autobuilder: Don't try to determine import paths for file URLs
2020-08-06 09:46:10 +01:00
Sauyon Lee
8e6c1835dd
autobuilder: Don't try to determine import paths for file URLs
...
Also improve logging
2020-08-05 23:21:34 -07:00
Slavomir
b0259632e1
Remove Read method
2020-08-05 18:37:35 +02:00
Slavomir
6fda46b565
Add compress/zlib taint tracking
2020-08-05 18:35:47 +02:00
Slavomir
441d29b2b7
Add compress/lzw taint tracking
2020-08-05 18:34:05 +02:00
Slavomir
053496dbcc
Add compress/gzip taint tracking
2020-08-05 18:32:51 +02:00
Slavomir
7e5077c174
Add compress/flate taint tracking
2020-08-05 18:31:13 +02:00
Slavomir
6e2af3ead1
Add compress/bzip2 taint tracking
2020-08-05 18:29:12 +02:00
Max Schaefer
4e409aa9fa
Merge pull request #274 from gagliardetto/standard-lib-pt-2
...
Add taint tracking for bufio and bytes packages
2020-08-05 17:10:08 +01:00
Slavomir
df71f0bf8b
Remove ReadByte, WriteByte, ReadRune, WriteRune
2020-08-04 17:53:50 +03:00
Slavomir
ff81ad622f
Fix back ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected
2020-08-04 17:22:40 +03:00
Slavomir
c1f2e77488
Fix generated codeql
2020-08-04 17:11:55 +03:00
Slavomir
6b1bbf16aa
Remove taint-tracking for objects that implement io.Reader
2020-08-04 16:01:30 +03:00
Slavomir
72254b7682
Fix ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected
2020-08-04 15:36:34 +03:00
Slavomir
3fd6062b3d
Add taint-tracking for package "bytes"
2020-08-04 14:15:26 +03:00
Slavomir
dd8e1243a2
Add bufio taint-tracking
2020-08-04 14:11:00 +03:00
Max Schaefer
b057cbee7b
Merge pull request #256 from smowton/smowton/admin/cwe-327-cleanup
...
Polish CWE-327 (weak TLS config) query
2020-08-03 10:28:53 +01:00
Sauyon Lee
5de55d02d7
Merge pull request #273 from max-schaefer/unresolved-reference
...
Speed up `unresolvedReference`.
2020-08-02 22:31:13 -07:00
Max Schaefer
f6da34b546
Speed up unresolvedReference.
2020-07-31 14:13:05 +01:00
Chris Smowton
7e65575e95
Merge pull request #272 from smowton/smowton/admin/fix-makefile-escaping
...
Escape go-fmt file filter
2020-07-30 20:05:04 +01:00
Chris Smowton
2a7754af59
Factor ErrorType out of two duplicate tests
2020-07-30 17:25:53 +01:00
Chris Smowton
4b6810eefc
InsecureFeatureFlag: make getAFlag a member of FlagKind
2020-07-30 17:23:01 +01:00
Chris Smowton
7dd20107fe
Insecure-TLS query: trivial style and typo fixes
2020-07-30 17:18:54 +01:00
Chris Smowton
3c1daf08f8
Escape go-fmt file filter
...
This should have been looking for \.go$, but I forgot to escape the dollar sign in a Makefile
2020-07-30 17:06:01 +01:00
Max Schaefer
2134757ebf
Merge pull request #261 from smowton/smowton/admin/cleanup-cwe-322
...
Polish CWE-322: detect and exclude cases where host-checking is optional
2020-07-30 10:38:57 +01:00
Chris Smowton
cce3a70412
Insecure-TLS: restrict sources to potentially interesting integers.
2020-07-29 16:46:36 +01:00
Chris Smowton
d7c0671ea1
Add test using SSH host-key checker factory knownhosts.New
...
This produces a secure host-key checker; we assume by default that an opaque function not otherwise specified returns an acceptable checker, but we need to particularly cope with its multiple return values to handle this factory function.
2020-07-29 16:30:51 +01:00
Chris Smowton
d0e86f787d
SSH host checking: Expand definition of a host-key checking function to include calls with multiple return types
...
For example, https://godoc.org/golang.org/x/crypto/ssh/knownhosts#New returns a host-key checker and an error value, and we previously didn't consider the first return value a candidate checker function.
2020-07-29 16:06:38 +01:00
Chris Smowton
e89cd16cb1
Move query-specific flag definitions into their respective .ql files
2020-07-29 15:21:49 +01:00
Chris Smowton
f31ed52943
Clean up InsecureFeatureFlag
...
Move the flag regexes inline, use `any` instead of a constructor function to select a particular flag kind, and remove explicit limitation on the common superclass FlagKind.
2020-07-29 15:15:50 +01:00
Chris Smowton
f162a5be94
Promote CWE-322 out of experimental status
2020-07-29 14:43:47 +01:00
Chris Smowton
99f08750f3
Polish CWE-322: detect and exclude cases where host-checking is optional
2020-07-29 14:43:47 +01:00
Max Schaefer
2831ffdad0
Merge pull request #270 from smowton/smowton/cleanup/ricterz-libraries
...
Add support for Gorm, Gorestful, Sqlx and Json-iterator
2020-07-29 14:21:41 +01:00
Max Schaefer
f8b8af5ac5
Merge pull request #269 from aibaars/lgtm-suites
...
CodeQL: complete LGTM suites
2020-07-29 07:19:41 +01:00
Arthur Baars
0db8ba881b
CodeQL: complete LGTM suites
2020-07-28 20:36:53 +02:00
Chris Smowton
abfae4365f
Move CWE-327 out of experimental
2020-07-28 15:47:44 +01:00
Chris Smowton
026dc5c97f
Add changelog notes regarding added library support
2020-07-28 14:57:14 +01:00
Chris Smowton
0e6feb923c
Add test for json-iterator package, and support more of its API
...
Specifically the top-level functions Unmarshal and UnmarshalFromString are just convenience wrappers around the type API, which is the usual documented way to use the library.
2020-07-28 14:52:10 +01:00
Chris Smowton
e19f476341
Add test for Sqlx
2020-07-28 14:52:10 +01:00
Chris Smowton
f5caf7e9e2
Add test for Gorm
2020-07-28 14:52:10 +01:00
Chris Smowton
a813607a76
go-restful model: Add support for ReadEntity method
2020-07-28 14:52:10 +01:00
Chris Smowton
3c4a1b90fe
Add test for Go-restful
2020-07-28 14:52:10 +01:00
Chris Smowton
b96546b0f8
Improve style of library models
2020-07-28 14:40:48 +01:00
Max Schaefer
e9ae697d0d
Merge pull request #251 from gagliardetto/standard-lib-pt-1
...
Add taint-tracking for archive/tar and archive/zip
2020-07-28 14:27:02 +01:00
Chris Smowton
88cb435843
Split security flags into more distinct categories
...
There are now three categories: general security or option flags, those related to TLS version selection, and those related to certificate configuration. The TLS and disabled-certificate-check queries use two categories each.
2020-07-28 13:54:37 +01:00
Chris Smowton
3c244e2235
Insecure-TLS: remove obsolete TODO
...
The case noted works fine.
2020-07-28 13:04:16 +01:00
Chris Smowton
9b4e189374
Insecure-TLS: Use DataFlow::Node::getRoot, and factor getEnclosingFunction
2020-07-28 11:55:58 +01:00
Chris Smowton
2751552cbe
Insecure-TLS: Reintroduce tests for InsecureCipherSuites()
...
These stopped producing an alert because they used a variable name that acknowledges an insecure setup
2020-07-28 11:55:58 +01:00
Chris Smowton
db9760082d
Insecure-TLS: simplify warning message
2020-07-28 11:55:58 +01:00
Chris Smowton
2a0642b67b
Insecure-TLS: remove is-test-file filter
2020-07-28 11:55:58 +01:00
Chris Smowton
5c8534f56e
EXCUSED -> OK
2020-07-28 11:55:58 +01:00
Chris Smowton
d0c76187da
Fix comment
2020-07-28 11:55:58 +01:00
Chris Smowton
a10db25b7d
Remove redundant constraint
2020-07-28 11:55:58 +01:00
Chris Smowton
779901cdbd
Reference Mozilla's TLS advice in qhelp
2020-07-28 11:55:58 +01:00
Chris Smowton
718c4e8531
Add change note for insecure-TLS query
2020-07-28 11:55:58 +01:00
Chris Smowton
db27f8477a
Update CWE-327 test
...
This now checks various carve-outs for probable feature / compatibility flags
2020-07-28 11:55:58 +01:00
Chris Smowton
21d107e0e9
Check for suspected feature-flags more uniformly
...
These are now checked of all source *and* sink nodes, and the checks are factored with similar paths for is-insecure and is-old flags.
2020-07-28 11:55:58 +01:00
Chris Smowton
7d294c5d81
Factor and generalise InsecureFeatureFlag
...
The same path is now used to classify flags relating to old/legacy versions.
2020-07-28 11:21:51 +01:00
Chris Smowton
34c8cc5019
Improve documentation and function naming
2020-07-28 11:21:51 +01:00
Chris Smowton
17200a8569
Use SsaWithFields to find similar good-tls-version flows
...
Note: if accepted, merge this into a previous commit before submitting the PR
2020-07-28 10:31:45 +01:00
Chris Smowton
a7e549e771
Exclude TLS version sources accompanied by a non-nil error
...
It is common to return 0 has a dummy value with an error; these are very likely not going to be used as a real TLS version.
2020-07-28 10:31:44 +01:00
Chris Smowton
af960ed2cd
Exclude more hits whose context suggests an intentionally old TLS configuration
2020-07-28 10:31:44 +01:00
Chris Smowton
8afa0c51d9
Filter out bad TLS versions where there is a converging flow supplying a good version
...
I'm supposing these usually indicate something configurable, rather than a hard-coded insecure choice. The *default* being insecure is still a problem, but probably not amenable to automated analyses.
2020-07-28 10:31:44 +01:00
Chris Smowton
b66a91bd5f
Exclude InsecureTLS problems guarded by feature flags
2020-07-28 10:31:44 +01:00
Chris Smowton
6058c90485
Factor predicates for identifying security-related feature flags from DisabledCertificateCheck
2020-07-28 10:31:44 +01:00
Chris Smowton
a6ab92bbca
Supress paths that extend beyond the first sink
...
For this particular query it's hardly ever interesting to complain about a bad cipher suite being configured, then read from the list and re-added elsewhere. In such a case the longer path will be detected when the shorter one is fixed in any case.
2020-07-28 10:31:44 +01:00
Chris Smowton
08ec017e4c
Cleanup: disjunction -> set literal
2020-07-28 10:31:44 +01:00
Chris Smowton
75d69efb15
Merge pull request #267 from smowton/smowton/feature/print-ast-label-package-node
...
PrintAst: Label File nodes' package-name children, and ensure that child comes before all declarations
2020-07-24 13:30:12 +01:00
Chris Smowton
b4e15fb17a
Merge pull request #268 from smowton/smowton/admin/downgrade-checkout-action
...
Downgrade to checkout@v1 to work around https://github.com/actions/checkout/issues/237
2020-07-24 13:28:06 +01:00
Chris Smowton
8aaa7c8925
Downgrade to checkout@v1 to work around https://github.com/actions/checkout/issues/237
2020-07-24 11:24:51 +01:00
Chris Smowton
454993fe64
PrintAst: Label File nodes' package-name children, and ensure that child comes before all declarations
2020-07-24 11:08:57 +01:00
Ricter Z
bb2d5ea6b5
add some sinks in commonly-used SQL libraries
2020-07-23 16:19:42 +01:00
Chris Smowton
b9e61115f3
Merge pull request #266 from sauyon/query-tags
...
Add correctness tag to MistypedExponentiation
2020-07-22 15:27:46 +01:00
Chris Smowton
6c4a1d0a34
Merge pull request #264 from smowton/smowton/feature/printast-restrict-files
...
PrintAst: improve support for restricting subsets of the AST to print
2020-07-22 15:20:14 +01:00
Chris Smowton
f8d141f7ff
PrintAst: Sort root File nodes by relative path.
...
This should make graphtext output deterministic, rather than depending on the order the results interpretation step happens to see the nodes.
2020-07-22 13:43:34 +01:00
Sauyon Lee
c9df4d81b4
Add correctness tag to MistypedExponentiation
2020-07-22 04:26:56 -07:00
Chris Smowton
c30d198f3d
Switch to using top-level function declarations to filter PrintAst
...
This means it's no longer possible to ask for the AST of a function literal, but this is hopefully a niche use-case that we can add if and when there is demand.
2020-07-22 10:40:41 +01:00
Owen Mansel-Chan
3018874f69
Merge pull request #259 from gagliardetto/oauth2-fixed-state
...
CWE-352: Use of constant `state` in Oauth2 flow
2020-07-21 17:11:46 +01:00
Chris Smowton
09990f9764
Configure plugin AST printer to ignore comments and only print one file
2020-07-21 17:01:07 +01:00
Chris Smowton
b8c4004c59
PrintAst: support excluding comments
2020-07-21 17:01:07 +01:00
Chris Smowton
e0aa59ced1
PrintAst: improve support for restricting subsets of the AST to print
...
* Exclude function definitions, not just their children, when excluded by configuration
* Allow excluding files
* Test both features
2020-07-21 17:00:28 +01:00
Chris Smowton
a625a4c7d5
Merge pull request #263 from smowton/smowton/feature/order-functypeexpr-children
...
PrintAst: order parameter and result declarations
2020-07-21 15:47:26 +01:00
Andrew Eisenberg
f35343e618
Merge pull request #262 from aeisenberg/aeisenberg/print-ast
...
Add the printAst contextual query
2020-07-20 11:11:42 -07:00
Slavomir
02b5fce67e
Add go.mod to CWE-352 test folder
2020-07-20 17:46:12 +03:00
Chris Smowton
ce0cc31b03
PrintAst: order parameter and result declarations
...
This adds support for generally overriding the default AstNode child ordering, and uses it to sort parameter and result declarations in the context of a FuncTypeExpr in left-to-right textual order.
2020-07-20 14:32:42 +01:00
Andrew Eisenberg
0ae1330c02
Add the printAst contextual query
...
This is similar to the cpp query for printing the AST in the
context of VS Code.
This PR also includes a small refactoring to extract the
`getEncodedFile` predicate to a new `qll` file.
2020-07-17 10:12:48 -07:00
Slavomir
27f62b0b3a
Fix examples
2020-07-17 13:12:18 +03:00
Slavomir
ee2804dfb1
Improve comments
2020-07-17 11:01:25 +03:00
Slavomir
ee4356501a
Apply suggestions from code review
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2020-07-16 18:36:40 +03:00
Slavomir
fb78818db7
Fix .expected
2020-07-16 18:33:35 +03:00
Slavomir
ef7198c0cb
Improve query scenarios
2020-07-16 18:29:15 +03:00
Slavomir
282f7af6d9
Improve comments, naming, docs
2020-07-16 12:52:41 +03:00
Slavomir
8cc8b8ef47
Add CWE-352: CSRF because of constant oauth2 state value
2020-07-16 12:38:08 +03:00
Slavomir
437f4b7eab
Fix go autoformat
2020-07-15 19:12:33 +03:00
Slavomir
9cd86f9be8
Generated Go files: add what they were generated with
2020-07-15 19:05:12 +03:00
Slavomir
f7a03c0862
Update main.go
2020-07-15 19:05:12 +03:00
Slavomir
19348d2773
Simplify tests
2020-07-15 19:05:12 +03:00
Slavomir
1591ed3440
Implement code review feedback
2020-07-15 19:05:12 +03:00
Slavomir
5b63228690
Add StdlibTaintFlow.expected
2020-07-15 19:05:12 +03:00
Slavomir
19287fb5ff
Add taint-tracking for archive/tar and archive/zip
2020-07-15 19:05:12 +03:00
Chris Smowton
830f83f21a
Merge pull request #257 from smowton/smowton/fix/go-mod-comment-group-indices
...
Extractor: assign unique indices to comment-groups in go.mod files
2020-07-13 15:40:14 +01:00
Chris Smowton
3ab948f81c
Extractor: assign unique indices to comment-groups in go.mod files
...
The schema requires that (parent, index) is a key.
2020-07-13 11:28:28 +01:00
Sauyon Lee
32510eb2d0
Merge pull request #255 from max-schaefer/alias-types
...
Improve modelling of alias declarations
2020-07-10 21:07:48 -07:00
Max Schaefer
4eac5a1d4e
Add test to demonstrate that aliases have entities.
...
There are, however, no corresponding types.
2020-07-10 14:41:15 +01:00
Max Schaefer
1a8688a8f4
Extract enough information to distinguish type definitions from alias declarations.
2020-07-10 14:12:51 +01:00
Max Schaefer
4257a68c27
Include newlines in messages printed by go-gen-dbscheme.
2020-07-10 14:08:37 +01:00
Max Schaefer
9347413e77
Merge pull request #254 from smowton/smowton/admin/fix-go-autoformat
...
Make the gofmt CI test actually fatal
2020-07-10 14:01:44 +01:00
Chris Smowton
d05657ddff
Make the gofmt CI test actaully fatal
...
Turns out gofmt doesn't actually return 1 when it finds problems, only when it finds source files which don't compile (all of which are now excluded).
This also fixes existing overlooked inconsistencies as a result of this mistake.
2020-07-10 11:02:50 +01:00
Max Schaefer
302eb55d23
Merge pull request #245 from smowton/smowton/feature/missing-error-check-query-conservative
...
Add query searching for missing error checks on functions that return a (pointer, error) pair
2020-07-09 15:37:32 +01:00
Chris Smowton
429a385a20
Add query searching for missing error checks on functions that return a (pointer, error) pair
2020-07-09 13:06:31 +01:00
Max Schaefer
02920abc62
Merge pull request #249 from smowton/smowton/feature/comment-group-ast-node-parents
...
Make CommentGroups AST-children of Files
2020-07-08 19:58:13 +01:00
Chris Smowton
6bf3802b3f
Make CommentGroups AST-children of Files
...
Previously they were roots, with children hanging off them. Now they are children of Files, and both CommentGroups and Comments can be discovered using AstNode.getAChild.
The PrintAst pass is also adapted to account for their new position.
2020-07-08 17:49:47 +01:00
Max Schaefer
650cb5e626
Merge pull request #253 from smowton/smowton/admin/gofmt-in-ci
...
Add Go autoformatting to the 'autoformat' make target and to CI
2020-07-08 17:37:17 +01:00
Chris Smowton
ce94c68e0a
Add Go autoformatting to the 'autoformat' make target and to CI
...
Existing gofmt complaints are fixed, and files that specifically test queries that relate to badly formatting code are tagged as such.
2020-07-08 14:20:19 +01:00
Max Schaefer
26eeb3c658
Merge pull request #252 from gagliardetto/patch-3
...
taint-tracking: String() must return a string type
2020-07-08 12:01:20 +01:00
Slavomir
59071732a8
taint-tracking: String() must return a string type
...
Make sure that the taint-tracking class for the `String()` method checks that the result type is a string.
2020-07-08 12:34:13 +03:00
Max Schaefer
bc778b5899
Merge pull request #243 from max-schaefer/cve-2019-11250
...
Improvements to clear-text logging query
2020-07-07 16:03:40 +01:00
Max Schaefer
3a897a9dd0
Merge pull request #247 from shati-patel/docs
...
Docs: Editorial changes to library modeling topic
2020-07-07 13:37:51 +01:00
Max Schaefer
b4c56928c4
Merge pull request #248 from max-schaefer/location-doc
...
Port Location qldoc update.
2020-07-07 13:37:36 +01:00
Max Schaefer
47a858610d
Merge pull request #239 from smowton/smowton/feature/find-noreturn-user-functions
...
Switch from using mustPanic to mayReturnNormally to construct a call-expression's CFG
2020-07-07 13:37:18 +01:00
Chris Smowton
6e5ee47ade
Switch from using mustPanic to mayReturnNormally to construct a call-expression's CFG
...
We also use this to note that user-defined functions can only return normally if their CFG normal exit node is reachable, and annotate some well-known functions as noreturn.
For example, this will by fiat declare os.Exit noreturn (never returns normally), and will also notice that a user function `func myExit() { os.Exit(1) }` is also noreturn, because it doesn't have any control-flow edges that reach the normal return node.
2020-07-07 11:40:06 +01:00
Max Schaefer
842860d7ca
Port Location qldoc update.
...
cf https://github.com/github/codeql/pull/3907
2020-07-07 10:58:00 +01:00
Shati Patel
5ddcf92859
Editorial changes to library modeling topic
2020-07-07 10:02:33 +01:00
Max Schaefer
d8ff2d1641
Merge pull request #246 from smowton/smowton/feature/nuisance-dead-code-warnings
...
UnreachableStatement: tolerate more harmless unreachable return statements
2020-07-07 09:26:48 +01:00
Chris Smowton
5b34c05916
UnreachableStatement: tolerate more harmless unreachable return statements
...
The Golang compiler isn't particularly good at spotting paths that don't need a return statement due to a dominating noreturn statement (e.g. os.Exit(1)), so dead return statements are common. We already tried to tolerate some instances of this pattern; this additionally allows 'true' and 'false' literals, and anything of type 'error'.
The carte-blanche for error values aims to accommodate the pattern "abort(); return whateverErrorWouldOtherwiseBeAppropriate();", which is probably preferable to "return nil", a misleading no-error indication.
2020-07-06 17:02:26 +01:00
Max Schaefer
61bc51c133
Merge pull request #242 from max-schaefer/remove-experimental-precision
...
Remove `@precision` from experimental query.
2020-07-03 10:53:18 +01:00
Max Schaefer
5343315ad0
Remove @precision from experimental query.
...
We'll add it back when we take it out of experimental status.
2020-07-03 09:51:24 +01:00
Max Schaefer
570b232836
Merge pull request #235 from gagliardetto/bad-unsafe
...
Query to find wrong uses of package "unsafe"
2020-07-03 09:36:10 +01:00
Slavomir
94c0bc361d
Improve comments and alerts
2020-07-02 22:10:17 +03:00
Max Schaefer
534ab94067
Merge pull request #241 from max-schaefer/update-data-flow
...
Update shared data-flow libraries
2020-07-02 14:07:32 +01:00
Max Schaefer
b83076853f
Add change note.
2020-07-02 12:03:43 +01:00
Max Schaefer
89e9c6c2da
Teach clear-text logging query to ignore dummy passwords.
2020-07-02 12:02:56 +01:00
Max Schaefer
63187a0889
Make clear-text logging sources more precise.
2020-07-02 12:02:56 +01:00
Max Schaefer
7b903dd062
Teach CleartextLogging not to track through error.Error() and fmt.Stringer.String().
...
These two are very heavily overloaded and cause all sorts of false positives.
2020-07-02 12:02:56 +01:00
Max Schaefer
f807aa8b5e
Merge pull request #233 from owen-mc/library-modeling
...
Create guide for modeling go libraries
2020-07-02 12:01:45 +01:00
Max Schaefer
dc5813b159
Data flow: Remove big-step relation in flow-through code
...
cf https://github.com/github/codeql/pull/3857
2020-07-02 11:55:41 +01:00
Max Schaefer
09d2fe391e
Data flow: Replace getErasedRepr() and Node::getTypeBound() with getNodeType().
...
cf https://github.com/github/codeql/pull/3854
2020-07-02 11:55:41 +01:00
Max Schaefer
7925db7911
Merge pull request #240 from max-schaefer/fix-frontend-errors
...
Fix frontend errors
2020-07-02 10:14:39 +01:00
Max Schaefer
25c969d14c
Model message components for Fprintf and friends more precisely.
2020-07-02 09:41:03 +01:00
Max Schaefer
c80314a3fb
Treat non-sensitive header retrieval as a barrier.
2020-07-02 09:41:03 +01:00
Max Schaefer
29cbac429f
Fix stub for crypto/ssh.
2020-07-02 07:51:29 +01:00
Max Schaefer
5ac8ba9cef
Fix an error in Types test.
2020-07-02 07:51:16 +01:00
Max Schaefer
eeae713c2f
Dataflow: Refactor dispatch with call context.
...
cf https://github.com/github/codeql/pull/3804
2020-07-01 20:02:40 +01:00
Slavomir
b919ee03bf
Merge branch 'bad-unsafe' of https://github.com/gagliardetto/codeql-go into bad-unsafe
2020-07-01 17:36:50 +03:00
Slavomir
267057b4b2
Use Nodes instead of Expressions
2020-07-01 17:33:40 +03:00
Owen Mansel-Chan
4a002c3044
Address review comments and delete md file
2020-07-01 15:08:00 +01:00
Max Schaefer
f74a94e382
Merge pull request #170 from sauyon/tracing
...
Extract more dependency ASTs
2020-07-01 14:25:52 +01:00
Owen Mansel-Chan
3a2a33b956
Convert to reStructuredText
...
Annoyingly rst won't easily let you make some text monospace inside the
text for a link. The only other things I've changed from pandoc's output
are changing "code::" to "code-block::" and adding whitespace to get the
lists to format correctly.
2020-07-01 10:43:08 +01:00
Slavomir
62ccceb543
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-07-01 12:16:40 +03:00
Slavomir
87c2ac3caf
Remove deprecated; plus aesthetic fix
2020-07-01 12:11:41 +03:00
Owen Mansel-Chan
126d214a2d
Address review comments
2020-07-01 10:04:55 +01:00
Slavomir
37af579f27
Implement code review feedback
2020-07-01 12:02:12 +03:00
Max Schaefer
05da78d0f2
Merge pull request #238 from owen-mc/tfunctionoutput-receiver-separate-case
...
Make receiver a separate case in TFunctionOutput
2020-07-01 09:53:13 +01:00
Slavomir
7475170ced
Fix getBaseType
2020-07-01 11:21:15 +03:00
Slavomir
7f65424556
Fix comments and tests
2020-07-01 10:40:34 +03:00
Slavomir
9421476bea
Add IndexExpr logic and example
2020-07-01 10:21:16 +03:00
Slavomir
036a1faffa
Remove redundancy
2020-06-30 23:00:19 +03:00
Slavomir
c5354a88f0
Update tests
2020-06-30 22:11:05 +03:00
Slavomir
22e9c75d68
If pointer is to an IndexExpr, the use base type of that index expression
2020-06-30 22:07:40 +03:00
Sauyon Lee
6e5e9ce5de
Improve comments for extractor utility functions
2020-06-30 11:44:10 -07:00
Sauyon Lee
c6dfcf7365
Merge pull request #237 from github/revert-165-support-actions
...
Revert "autobuilder: Add support for GITHUB_REPOSITORY environment variable"
2020-06-30 11:40:34 -07:00
Owen Mansel-Chan
83fffa6350
Address review comments
2020-06-30 18:37:00 +01:00
Owen Mansel-Chan
826603a396
Make receiver a separate case in TFunctionOutput
...
This is for consistency with TFunctionInput, which already does this
2020-06-30 17:15:52 +01:00
Owen Mansel-Chan
88e2ae1b2e
Address review comments
2020-06-30 17:00:05 +01:00
Remco Vermeulen
a89b87f643
CWE-322 InsecureHostKeyCallback ( #234 )
2020-06-30 15:38:21 +01:00
Max Schaefer
ccfccb4828
Revert "autobuilder: Add support for GITHUB_REPOSITORY environment variable"
2020-06-30 15:13:26 +01:00
Chris Smowton
595866a6d8
Extractor: give the go.mod comment groups a source location ( #232 )
...
The comment group is now omitted entirely if empty, and otherwise delimits the range of the comments ascribed to this group.
2020-06-30 14:59:13 +01:00
Max Schaefer
e374f92555
Merge pull request #236 from max-schaefer/update-data-flow
...
Update data-flow libraries
2020-06-30 14:32:56 +01:00
Slavomir
8238d111b5
Fix tests
2020-06-30 13:37:44 +03:00
Slavomir
c28e83a793
Add references
2020-06-30 12:53:51 +03:00
Slavomir
3181ac6ec8
Add qhelp file and examples
2020-06-30 12:43:42 +03:00
Slavomir
27ac4c3236
Fix comment
2020-06-30 12:12:03 +03:00
Max Schaefer
df4265e31b
Add more tests for clear-text logging.
2020-06-30 10:05:01 +01:00
Max Schaefer
ef340954e4
Add mask* as a heuristic name for an obfuscating function.
2020-06-30 10:05:01 +01:00
Max Schaefer
e6a44d4578
Add HTTP-request headers as a source for clear-text logging.
2020-06-30 10:05:01 +01:00
Max Schaefer
e692af21ac
Extend model of glog to also cover two API-compatible forks.
2020-06-30 10:05:01 +01:00
Slavomir
6f396b9ad8
Add comments to codeql query
2020-06-30 11:47:14 +03:00
Slavomir
8473ed0d81
Add tests
2020-06-30 11:31:24 +03:00
Slavomir
c71ecd678e
Initial commit for: wrong use of package unsafe
2020-06-30 10:45:03 +03:00
Owen Mansel-Chan
63b2afb4ce
Create guide for modeling go libraries
2020-06-29 11:46:09 +01:00
Max Schaefer
2b3e3bda8f
Data flow: Model field clearing.
...
cf https://github.com/github/codeql/pull/3762
2020-06-29 11:06:35 +01:00
Max Schaefer
f7ed65692f
Data flow: Use accessPathLimit() in partial flow as well.
...
cf. https://github.com/github/codeql/pull/3494
2020-06-29 11:02:35 +01:00
Max Schaefer
5275168253
Make target branch configurable for sync-dataflow-libraries.
...
You can now do `make DATAFLOW_BRANCH=<committish> sync-dataflow-libraries`; default is still `master`.
2020-06-29 10:02:59 +01:00
Max Schaefer
76f482682c
Merge pull request #182 from owen-mc/gin-framework
...
Move model for Gin framework out of experimental
2020-06-26 20:26:48 +01:00
Max Schaefer
91ca2bb434
Merge pull request #231 from max-schaefer/taint-through-range
...
Propagate taint through `range` statements
2020-06-26 19:58:53 +01:00
Sauyon Lee
468d9812c4
Merge pull request #227 from max-schaefer/cve-2018-15798
...
Teach `OpenUrlRedirect` to propagate out of `URL.Path` and a few other fields.
2020-06-26 06:21:59 -07:00
Max Schaefer
57f8b08568
Update expected test output.
...
The tests for `UnsafeTLS` now work as expected.
2020-06-26 11:30:26 +01:00
Max Schaefer
66ec160f64
Add change note.
2020-06-26 11:20:45 +01:00
Max Schaefer
258a276242
Propagate taint through range loops.
2020-06-26 11:20:45 +01:00
Max Schaefer
ce3007395f
Rename arrayStep to elementStep, which is more accurate.
2020-06-26 11:20:45 +01:00
Max Schaefer
ba82a76948
Merge pull request #229 from max-schaefer/getAPrimaryQlClass
...
Rename `describeQlClass` to `getAPrimaryQlClass`.
2020-06-26 07:51:04 +01:00
Max Schaefer
9904b9e926
Allow flow through more URL fields.
2020-06-26 07:50:08 +01:00
Max Schaefer
3bf934d64b
Add change note.
2020-06-25 22:23:49 +01:00
Owen Mansel-Chan
82361ce060
Fix modelling of Params part 2
2020-06-25 21:55:10 +01:00
Owen Mansel-Chan
cf47159a30
Change how Param and Params are modeled
...
Previously any read of type Param or Params was a source. Now reading
Context.Params is a source. This should reduce the number of duplicate
paths.
2020-06-25 21:55:10 +01:00
Owen Mansel-Chan
9fd892ab94
Fix context bind sources
...
Using FunctionOutput was recommended in the first PR but not implemented.
2020-06-25 21:55:00 +01:00
Owen Mansel-Chan
93399c6348
Add tests for bind methods with pointer-typed variables
2020-06-25 16:17:57 +01:00
Max Schaefer
d290bea39a
Rename describeQlClass to getAPrimaryQlClass.
2020-06-25 15:08:01 +01:00
Max Schaefer
a89e4971ac
Merge pull request #221 from gagliardetto/bad-tls
...
Add CWE-327 (unsafe TLS)
2020-06-25 09:18:42 +01:00
Sauyon Lee
380060c7e4
extractor: Refactor regexp compilation for the relative directory check
2020-06-24 23:29:55 -07:00
Sauyon Lee
9e8d386f3c
Clarify change note
2020-06-24 23:29:55 -07:00
Sauyon Lee
fa391b1516
extractor: Factor out common bits for running go list
2020-06-24 23:29:54 -07:00
Sauyon Lee
ebdd724b75
Simplify logic for deciding whether to extract a package
2020-06-24 23:29:53 -07:00
Sauyon Lee
e25b882e42
Clarify some comments
...
As suggested in code review
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-06-24 23:29:52 -07:00
Sauyon Lee
9bd1f87d66
Address review comments
2020-06-24 23:29:51 -07:00
Sauyon Lee
de2f407c69
Add change note for more dependency AST extraction
2020-06-24 23:29:50 -07:00
Sauyon Lee
7863bb656e
Use the -mod argument from the build when calling go list
2020-06-24 23:29:49 -07:00
Sauyon Lee
296d2d5fd3
extractor: modify FileExists to check that the path isn't a directory
2020-06-24 23:29:48 -07:00
Sauyon Lee
3513c352e6
extractor: Factor out FileExists utility function
2020-06-24 23:29:48 -07:00
Sauyon Lee
f197975c6e
Extract packages more intelligently
...
We now extract packages that have the same module root as the specified packages, as determined by
the `go list` command.
2020-06-24 23:29:47 -07:00
Slavomir
95b76dceca
Remove check
2020-06-24 21:39:23 +03:00
Slavomir
4dc1399385
Update comments on the lines that have incorrect flagging
2020-06-24 15:11:33 +03:00
Sauyon Lee
6883a97628
Merge pull request #223 from max-schaefer/update-data-flow
...
Data flow: Track precise types during field flow
2020-06-24 00:10:54 -07:00
Max Schaefer
8c27e16190
Merge pull request #226 from smowton/smowton/fix/remove-spurious-cfg-edge-from-expressionless-switch
...
Remove spurious control-flow edge around switch block without a test
2020-06-24 07:47:37 +01:00
Slavomir
3aa9b25673
Fix comment
2020-06-23 22:40:25 +03:00
Chris Smowton
4882f277f5
Remove spurious control-flow edge around switch block without a test-expression
...
Previously we thought it possible to get from top to bottom of a block like "switch { case f(): ... }", when in fact this is only possible if there are no case blocks to execute.
I also add tests for two possible corner cases of a switch without a test-expression: a completely empty switch (the 'true' is indeed the last node) and switch with an empty default block (a single 'skip' is generated for the default block and the 'true' is not the last node)
2020-06-23 17:46:08 +01:00
Chris Smowton
1dc427a2c5
Cleanup: use TypeSwitchStmt.getAssign, not a raw child accessor
2020-06-23 17:46:08 +01:00
Max Schaefer
4e6d9b3811
Teach OpenUrlRedirect to propagate out of URL.Path and a few other fields.
2020-06-23 15:29:18 +01:00
Slavomir
561c5b91d2
Implement code review feedback
2020-06-23 16:07:05 +03:00
Max Schaefer
95011cebc2
Merge pull request #225 from sauyon/unqualify-functioninput
...
Unqualify uses of FunctionInput and FunctionOutput
2020-06-23 11:24:46 +01:00
Slavomir
56727b220b
Try different ways of passing taint through a field
2020-06-23 12:14:49 +03:00
Sauyon Lee
ecff1e6a16
Unqualify uses of FunctionInput and FunctionOutput
2020-06-22 22:25:33 -07:00
Max Schaefer
d3e6e5c0b3
Data flow: Track precise types during field flow
...
cf https://github.com/github/codeql/pull/3456
2020-06-22 20:53:05 +01:00
Slavomir
4ab929a656
Simplify
2020-06-22 17:54:07 +03:00
Slavomir
29eba441d7
Determine TLS version from int value
2020-06-22 17:50:20 +03:00
Slavomir
70bc4c81a0
Fix typo
2020-06-22 17:15:56 +03:00
Slavomir
783f710188
Fix comments
2020-06-22 17:12:15 +03:00
Slavomir
e38d4ecd9c
Fix typos
2020-06-22 17:00:31 +03:00
Slavomir
bbf8d7306b
Add CWE-327
2020-06-22 16:54:14 +03:00
Max Schaefer
d8374adbde
Merge pull request #219 from max-schaefer/refine-virtual-dispatch
...
Refine potential targets for method call through interface
2020-06-22 13:47:48 +01:00
Max Schaefer
b2ea23685c
Merge pull request #220 from max-schaefer/master
...
Temporarily disable CodeQL analysis
2020-06-22 13:46:51 +01:00
Max Schaefer
b64d3467aa
Temporarily disable CodeQL analysis
...
https://github.com/github/codeql-go/pull/184 added a regression test for the non-termination it was fixing. The fix hasn't made it into Code Scanning yet, so for the time being it will fail with precisely that non-termination when analysing the regression tests.
2020-06-22 12:18:29 +01:00
Max Schaefer
1f68a32cdc
Add change note.
2020-06-22 09:22:47 +01:00
Max Schaefer
759e3d5632
Further refine potential call targets for interface calls.
...
The call target must belong to the method set of a type that implements the interface type of the method call receiver, if any.
For example, assume `h` has type `hash.Hash`, then `h.Write(...)` should only be resolved to implementations of `Write` in types implementing `hash.Hash`, not arbitrary other `Writer`s.
2020-06-22 09:22:47 +01:00
Max Schaefer
1c58028ae3
Expose receiver type in isInterfaceCallReceiver.
2020-06-22 09:22:47 +01:00
Max Schaefer
0e5e116217
Add a few more utility predicates to DataFlow::Node.
2020-06-22 09:22:47 +01:00
Max Schaefer
18db1fe79f
Merge pull request #184 from max-schaefer/lookup-fields-in-cyclic-struct
...
Fix field lookup in cyclic structs
2020-06-21 09:23:57 +01:00
Max Schaefer
47c4c55923
Merge pull request #185 from github/max-schaefer-patch-2
...
Set up Code Scanning
2020-06-20 10:41:25 +01:00
Sauyon Lee
8742f09343
Merge pull request #186 from max-schaefer/fix-test-compile-errors
...
Fix compiler errors in tests.
2020-06-19 08:28:34 -07:00
Chris Smowton
6c230980a3
Merge pull request #187 from max-schaefer/fill-in-qldoc
...
Add qldoc for three public predicates in `PrintAst.qll`.
2020-06-19 15:30:24 +01:00
Max Schaefer
0f4297ff5c
Add qldoc for three public predicates in PrintAst.qll.
...
It's bland, but we try to maintain a 100% documentation coverage for our public library elements.
2020-06-19 14:25:57 +01:00
Max Schaefer
314bda2a7f
Fix compiler errors in tests.
2020-06-19 14:21:10 +01:00
Max Schaefer
df02ad404e
Set up Code Scanning
2020-06-19 14:02:31 +01:00
Max Schaefer
79b0ea8d77
Merge pull request #183 from smowton/smowton/cleanup/field-parent
...
Clean up @field and @fieldparent usage
2020-06-19 11:30:52 +01:00
Chris Smowton
3c8153ca1e
Clean up @field and @fieldparent usage
...
* Centralise use of raw types and database predicates in FieldParent and FieldBase classes
* Deduplicate type predicates common to all fields
* Deduplicate predicates common to function parameters and results
2020-06-19 11:00:42 +01:00
Max Schaefer
c31a7fc228
Add a few more tests.
2020-06-19 09:28:12 +01:00
Max Schaefer
2df8c275e0
Fix field lookup in cyclic structs.
2020-06-19 08:16:09 +01:00
Max Schaefer
7c2358c1d0
Merge pull request #181 from sauyon/reflectedxss-fps
...
ReflectedXSS refinement
2020-06-18 11:14:13 +01:00
Max Schaefer
7af168fc3b
Merge pull request #179 from smowton/smowton/feature/printast
...
Add barebones PrintAST for Go
2020-06-17 17:02:53 +01:00
Owen Mansel-Chan
c5cb55afc6
Add a change note
2020-06-17 15:14:16 +01:00
Owen Mansel-Chan
2282def1e2
Merge pull request #180 from owen-mc/email-injection
...
Move email injection query out of experimental folder
2020-06-17 15:11:31 +01:00
Chris Smowton
1a823b21f1
PrintAst: Emit relative paths for file nodes
...
This is a workaround for codeql run test not itself truncating absolute paths
when comparing against actual output.
2020-06-17 15:03:29 +01:00
Owen Mansel-Chan
49abd0b9b1
Add test using hashing
2020-06-17 14:33:53 +01:00
Chris Smowton
80b9be1004
Add simple PrintAst test
...
This both checks that many common control-flow structures print as expected, and checks our unique child node numbering, which would otherwise give the same label to a file's package (its 0th child expression) and its 0th declaration.
2020-06-17 14:25:45 +01:00
Owen Mansel-Chan
83697f62ac
Address review comments on qhelp
2020-06-17 14:21:37 +01:00
Chris Smowton
bd7b7c06b5
Add AstNode.getCanonicalQlClass and use it in PrintAst
...
This gives those classes satisfied by an AstNode that are considered useful for developer understanding, cf. getAQlClass which returns all satisfied classes and hides overridden ones, even if they are interesting.
2020-06-17 13:47:23 +01:00
Owen Mansel-Chan
3a3fbfff45
Update moved files
2020-06-17 11:36:11 +01:00
Owen Mansel-Chan
d7c6391b41
Move Gin files out of experimental
...
No changes have been made to the files in this commit
2020-06-17 11:34:09 +01:00
Owen Mansel-Chan
f926808c8a
Address review comments
2020-06-17 10:11:41 +01:00
Sauyon Lee
ed87c346cf
Add tests for the ReflectedXSS HTML content type sniffing regexp
2020-06-17 00:28:03 -07:00
Sauyon Lee
95235c8415
Add change note for reflected xss regexp fixes
2020-06-17 00:28:03 -07:00
Sauyon Lee
4f3854c052
ReflectedXSS: Ignore whitespace for HTML content type detection
2020-06-17 00:28:02 -07:00
Chris Smowton
464773d99a
Add initial implementation of PrintAST for Go
...
Known shortcomings:
* Uses getAQlClass rather than tagging AST nodes with a canonical class, as the C++ version of the same query does
* Types and go.mod lines are not printed informatively (typically we just get a short description of the node kind, e.g. 'function type')
* Children are always named for their child indices; we should give informative names to the edges where an accessor is declared (e.g. IfStmt names its children 'init', 'cond', 'if', 'else')
2020-06-16 17:21:56 +01:00
Owen Mansel-Chan
a3bc094731
Add change note
2020-06-16 15:48:39 +01:00
Owen Mansel-Chan
1b49bcc3b3
Put code snippets from qhelp in test folder
2020-06-16 15:44:51 +01:00
Owen Mansel-Chan
336eba1be4
Add Hash.Write and similar as sanitizers
2020-06-16 12:48:43 +01:00
Sauyon Lee
1853e990a3
ReflectedXss: Allow regexp to match newlines
2020-06-16 00:43:12 -07:00
Owen Mansel-Chan
f27ecdabb8
Set precision to high
2020-06-15 17:42:19 +01:00
Owen Mansel-Chan
4f6ce61de2
Move EmailInjection query out of experimental
2020-06-15 17:42:19 +01:00
Max Schaefer
a88bf4c9fa
Merge pull request #177 from sauyon/whitelist
...
Use allow or allowlist instead of whitelist
2020-06-13 19:44:51 +01:00
Sauyon Lee
66f733d798
Use allow or allowlist instead of whitelist
2020-06-12 09:16:41 -07:00
Owen Mansel-Chan
282b8cb9e4
Merge pull request #175 from owen-mc/array-slice-literal
...
Add classes for array and slice literals
2020-06-12 12:12:02 +01:00
Owen Mansel-Chan
e6217d90d7
Provide better strings for map and struct literals
2020-06-12 11:23:58 +01:00
Owen Mansel-Chan
dc113ab19f
Update tests for new strings
2020-06-12 10:40:13 +01:00
Owen Mansel-Chan
e9c2958095
Add classes for array and slice literals
2020-06-12 10:40:13 +01:00
Max Schaefer
47804d68c7
Merge pull request #176 from max-schaefer/update-data-flow
...
Data flow: Allow nodes to be hidden from path explanations
2020-06-12 07:23:15 +01:00
Owen Mansel-Chan
f11b956583
Add a superclass for literals ( #172 )
2020-06-11 19:53:40 +01:00
Max Schaefer
40ffa221bc
Merge pull request #171 from owen-mc/typeexprs-extend-typeexpr
...
Make `ArrayTypeExpr` and so on extend `TypeExpr`
2020-06-11 17:20:29 +01:00
Max Schaefer
b164cf33c7
Merge pull request #174 from github/rc/1.24
...
Merge rc/1.24 into master
2020-06-11 17:19:23 +01:00
Max Schaefer
9e3681cda4
Merge pull request #173 from owen-mc/update-ast-class-reference
...
Update AST class reference
2020-06-11 16:47:43 +01:00
Owen Mansel-Chan
71005f19c6
Update AST class reference
...
To match https://github.com/github/codeql/pull/3685
2020-06-11 16:08:36 +01:00
Owen Mansel-Chan
c891d22f74
Make ArrayTypeExpr and so on extend TypeExpr
...
To avoid a recursive definition, need to replace ArrayTypeExpr with@arraytypeexpr and so on in isTypeExprBottomUp(Expr e).
2020-06-11 11:06:15 +01:00
Max Schaefer
c6537f6d3b
Data flow: Allow nodes to be hidden from path explanations
...
cf https://github.com/github/codeql/pull/3657
2020-06-11 09:59:40 +01:00
Max Schaefer
24e2a294ed
Merge pull request #169 from max-schaefer/rc/1.24
...
Merge rc/1.24 into master
2020-06-11 09:15:28 +01:00
Max Schaefer
d8f1873635
Merge branch 'master' into rc/1.24
2020-06-11 08:10:22 +01:00
Owen Mansel-Chan
c30893aba7
Add AST class reference ( #164 )
2020-06-10 15:59:48 +01:00
Max Schaefer
8787f0b4f0
Merge pull request #165 from sauyon/support-actions
...
autobuilder: Add support for GITHUB_REPOSITORY environment variable
2020-06-10 09:45:18 +01:00
Sauyon Lee
4cd3f89128
Merge pull request #168 from max-schaefer/make-autoformat
...
Add Make target to autoformat all QL.
2020-06-09 12:55:57 -07:00
Sauyon Lee
ba0f922a28
autobuilder: Add support for GITHUB_REPOSITORY environment variable
...
This is for use within GitHub actions
2020-06-09 11:52:23 -07:00
Max Schaefer
1342d8688e
Autoformat.
2020-06-09 17:38:18 +01:00
Max Schaefer
b4b78ff923
Use newer version of CodeQL.
2020-06-09 17:36:38 +01:00
Max Schaefer
6b5657b5fb
Add PR check to ensure everything is autoformatted.
2020-06-09 17:31:29 +01:00
Max Schaefer
04af08ca0d
Add Make target to autoformat all QL.
...
Use
```sh
make autoformat
```
to format all `.ql` and `.qll` files under `ql/src`.
Use
```sh
make AUTOFORMAT=--check-only autoformat
```
to check that all `.ql` and `.qll` files under `ql/src` are correctly formatted and fail if they are not.
2020-06-09 17:27:53 +01:00
Max Schaefer
524b11b81a
Merge pull request #163 from robertbrignull/more-suites
...
Add more code-scanning suites
2020-06-04 09:53:14 +01:00
Robert Brignull
9ee57374cb
add more code-scanning suites
2020-06-01 10:58:49 +01:00
Max Schaefer
b37bdec66c
Merge pull request #157 from owen-mc/isresult-consistency
...
Make FunctionOutput.isResult(0) and CallNode.getResult(0) match single results
2020-05-29 17:13:21 +01:00
Max Schaefer
2f7ff6b56c
Merge pull request #162 from max-schaefer/open-url-redirect-formvalue
...
Consider `Request.FormValue(...)` as a source for URL redirects.
2020-05-29 15:56:50 +01:00
Max Schaefer
8f0592a079
Consider Request.FormValue(...) as a source for URL redirects.
...
Despite its name, this method doesn't just handle form values but also query parameters.
2020-05-29 15:03:05 +01:00
Sauyon Lee
b1db53e733
Merge pull request #161 from max-schaefer/more-mutable-types
...
Broaden definition of mutable types for taint tracking
2020-05-29 06:55:16 -07:00
Max Schaefer
64c60f6153
Merge pull request #160 from sauyon/readme
...
Add links to the CodeQL CLI and LGTM.com
2020-05-29 07:13:20 +01:00
Sauyon Lee
51026a7142
Add links to the CodeQL CLI and LGTM.com
2020-05-28 22:38:23 -07:00
Owen Mansel-Chan
36fa2c29fa
Simplify more code
2020-05-28 17:40:23 +01:00
Owen Mansel-Chan
65608a2912
Address review comments
2020-05-28 17:24:37 +01:00
Max Schaefer
e3501ddb44
Introduce more post-update nodes.
...
To model (taint) flow through functions, we introduce post-update nodes for arguments (including receivers), but only if that argument is mutable.
However, previously our criterion for determining whether an argument is mutable was a little too restrictive. In particular, we would not consider a struct-typed argument as mutable, since structs are passed by value. While this is reasonable for data flow, it is unnecessarily restrictive for taint, since it makes perfect sense to track deep taint through structs.
So instead we now turn things round and instead consider _all_ types to be mutable except for primitive types (booleans, numbers, and strings).
2020-05-28 15:33:09 +01:00
Max Schaefer
0dd7676bd8
Add another function-model test.
2020-05-28 15:31:00 +01:00
Max Schaefer
1c5dd51992
Add codespaces configuration
2020-05-28 13:09:21 +00:00
Owen Mansel-Chan
bbce7d1f05
Simplify existing code
2020-05-28 13:07:08 +01:00
Owen Mansel-Chan
1c5a4605d6
Add CallNode.getAResult()
2020-05-28 12:49:05 +01:00
Owen Mansel-Chan
1580591b73
Address review comments
2020-05-28 12:49:05 +01:00
Max Schaefer
e7095baa39
Fix nonHtmlContentType.
2020-05-27 16:52:11 +01:00
Owen Mansel-Chan
f0e1147551
Make CallNode.getResult(0) match single results
2020-05-27 10:24:09 +01:00
Owen Mansel-Chan
4be805966f
Make FunctionOutput.isResult(0) match single results
2020-05-27 10:24:09 +01:00
Owen Mansel-Chan
ae2ed877ee
Add tests for CallNode.getResult
2020-05-27 10:24:09 +01:00
Owen Mansel-Chan
53cfbcc255
Add tests for FunctionOutput.isResult
2020-05-27 10:24:03 +01:00
Max Schaefer
8596a99f9d
Merge pull request #156 from max-schaefer/update-data-flow
...
Data flow: Remove deprecated predicates.
2020-05-26 16:16:44 +01:00
Max Schaefer
a59e754403
Data flow: Remove deprecated predicates.
...
cf https://github.com/github/codeql/pull/3515
2020-05-26 11:09:35 +01:00
Max Schaefer
1f54edfe99
Add make target for synchronising data-flow libraries.
2020-05-26 11:09:07 +01:00
Max Schaefer
63fddfc705
Merge pull request #155 from sauyon/dbscheme-binary
...
Create a new entry point for generating dbschemes
2020-05-26 10:17:39 +01:00
Sauyon Lee
aef7524f35
Add a go-gen-dbscheme for generating dbschemes
2020-05-22 08:04:40 -07:00
Max Schaefer
4206408826
Merge pull request #153 from max-schaefer/cleanup-107
...
More cleanup
2020-05-22 13:18:46 +01:00
Max Schaefer
223d0dbf0b
Fix missing </p> in qhelp.
2020-05-22 11:18:27 +01:00
Max Schaefer
bccf750e2e
Sort go.qll alphabetically.
2020-05-22 11:12:31 +01:00
Max Schaefer
1d479d9a73
Add change note.
2020-05-22 11:11:58 +01:00
Max Schaefer
3c8fa02356
Regularise a few comments.
2020-05-22 11:11:58 +01:00
Max Schaefer
adc3ce8274
Extend documentation for package and use it in two more places.
...
The predicate now works with an empty package path.
The way this is implemented is perhaps slightly non-obvious: the `($|/)\\Q" + path + "\\E"` part of the regular expression either matches the end of the string (and `path` must then be empty), or a slash followed by `path` (which may or may not be empty).
We do allow non-canonical import paths ending in `/`, which the compiler rejects. We could disallow that by putting a `(?!$)` assertion after the `/`, but that seems overkill.
2020-05-22 11:11:58 +01:00
Max Schaefer
31c636fa55
Standardise on capitalisation WebSocket.
2020-05-22 11:11:58 +01:00
Max Schaefer
1d910a9622
Merge pull request #148 from owen-mc/syntax-examples-for-ast-classes
...
Add syntax examples to qldoc comments for AST classes
2020-05-22 10:48:18 +01:00
Owen Mansel-Chan
df8bfab6d6
Address review comments
2020-05-22 10:06:23 +01:00
Max Schaefer
e7ad4f9308
Merge pull request #152 from github/jf205-patch-1
...
Link README.md to the CodeQL repo
2020-05-22 09:44:03 +01:00
Owen Mansel-Chan
2c8e4a2b34
Add syntax examples to qldoc comments for AST classes
2020-05-22 09:28:50 +01:00
James Fletcher
e596c988f1
Update README.md
2020-05-21 16:43:04 +01:00
Max Schaefer
27cab43448
Merge pull request #151 from sauyon/remove-binary
...
Remove accidentally committed binary
2020-05-20 22:24:42 +01:00
Max Schaefer
f1b5a18aa2
Merge pull request #109 from porcupineyhairs/WebsocketXss
...
Model websocket read and write functions.
2020-05-20 19:45:25 +01:00
Sauyon Lee
8b9abf1abb
Add main to .gitignore
2020-05-20 09:19:51 -07:00
Sauyon Lee
0b7eea7852
Remove accidentally added binary
2020-05-20 09:19:42 -07:00
Sauyon Lee
581a81ca1a
Add missing licenses for websocket libraries
2020-05-20 09:16:38 -07:00
Sauyon Lee
92aad7ea1e
Fix dependency stubs for websocket framework
2020-05-20 09:01:46 -07:00
Sauyon Lee
a2e2e260b2
Merge branch 'master' into WebsocketXss
2020-05-20 08:57:36 -07:00
Porcupiney Hairs
d1d4c2e492
Golang : Add WebSocket Read and Write Functions.
2020-05-20 20:48:43 +05:30
Sauyon Lee
f599a502fc
Merge pull request #150 from max-schaefer/cleanup-108
...
Various cleanups
2020-05-20 08:13:48 -07:00
Max Schaefer
4a5b29e78f
Add a missing qldoc comment.
2020-05-20 14:37:38 +01:00
Max Schaefer
ed3a06ea5d
Autoformat QL.
2020-05-20 14:35:01 +01:00
Max Schaefer
b871f54e4d
Fix frontend error in ql/test/query-tests/Security/CWE-079.
2020-05-20 14:34:36 +01:00
Max Schaefer
7773828347
Fix frontend errors in ql/test/library-tests/semmle/go/frameworks/Websocket.
2020-05-20 14:34:22 +01:00
Max Schaefer
7e314f037a
Fix frontend errors in ql/test/library-tests/semmle/go/Packages.
2020-05-20 14:27:00 +01:00
Max Schaefer
806cfc7c5e
Merge pull request #149 from max-schaefer/cleanup-130
...
Clean up NoSQL library
2020-05-20 13:55:54 +01:00
Max Schaefer
f5a8e07cf0
Merge pull request #107 from porcupineyhairs/ssrf
...
Add SSRF query to codeql-go
2020-05-20 13:55:07 +01:00
Max Schaefer
9a4bee9448
Add change note.
2020-05-20 10:10:28 +01:00
Max Schaefer
267416f61f
Rename a predicate to clarify that it is MongoDB specific.
2020-05-20 10:08:49 +01:00
Max Schaefer
cc24a8879f
Rewrite a taint step to make more idiomatic use of the data-flow library.
2020-05-20 10:05:43 +01:00
Max Schaefer
8cc76edee4
Rephrase a comment and split up some very long lines.
2020-05-20 10:05:26 +01:00
Max Schaefer
d7b82b2355
Rename a few modules and classes to reflect the fact that NoSQL queries are not usually strings.
2020-05-20 10:04:59 +01:00
Sauyon Lee
f2bbbe30e2
Stub WebSocket dependencies
2020-05-19 19:53:03 +05:30
Porcupiney Hairs
2b5989cff2
Add improvements for codeql-go SSRF query
2020-05-19 19:53:03 +05:30
Max Schaefer
6d93f48933
Merge pull request #147 from owen-mc/redundant-recover
...
Go: Add query for redundant calls to recover
2020-05-19 07:14:27 +01:00
Owen Mansel-Chan
275be36e4a
Update change-notes/2020-05-18-redundant-recover.md
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2020-05-19 06:31:47 +01:00
Owen Mansel-Chan
23a7db5d4d
Minor textual corrections
2020-05-18 17:05:49 +01:00
Owen Mansel-Chan
fbee7fe983
Add new query for redundant calls to recover
2020-05-18 16:13:46 +01:00
Sauyon Lee
e57edccdab
Merge pull request #145 from max-schaefer/allocation-size-overflow-is-big
...
Simplify logic in AllocationSizeOverflow query.
2020-05-15 11:20:01 -07:00
Max Schaefer
8a8082f6ad
Merge pull request #144 from max-schaefer/interface-method-implements
...
Refine `Method.implements` so that interface methods only implement themselves.
2020-05-15 17:01:28 +01:00
Max Schaefer
27cb92fb86
Use .pp() in a few tests selecting types.
2020-05-15 15:54:23 +01:00
Max Schaefer
9c7e46386f
Simplify logic in AllocationSizeOverflow query.
2020-05-15 11:20:11 +01:00
Max Schaefer
d300ec6324
Refine Method.implements so that interface methods only implement themselves.
...
Without this restriction, the two `m`s in the following example are considered to implement each other, even though they aren't logically related:
```go
type I interface {
m()
}
type J interface {
m()
}
type K struct {
I
J
}
```
Previously, interface methods would sometimes implement themselves and sometimes not (see changes to test output for examples).
2020-05-15 11:09:17 +01:00
Max Schaefer
87c1bcad0a
Merge pull request #143 from github/max-schaefer-patch-1
...
Clarify which types have a qualified name.
2020-05-15 08:40:13 +01:00
Max Schaefer
24d8c7ea17
Clarify which types have a qualified name.
2020-05-15 07:31:51 +01:00
Max Schaefer
d41e41812b
Merge pull request #141 from sauyon/reflectedxss-fps
...
ReflectedXss improvements
2020-05-15 07:23:39 +01:00
Sauyon Lee
5e633b2c74
Add EqualityTestNode.getPolarity
2020-05-14 14:38:59 -07:00
Sauyon Lee
5e2b973ac4
Update comment in ReflectedXss test
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-05-14 14:35:08 -07:00
Sauyon Lee
ee0f3c9fba
Address review comments
2020-05-14 02:30:14 -07:00
Sauyon Lee
804165c9ef
Fix comment in ReflectedXss nonhtmlcontenttype
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-05-14 02:28:15 -07:00
Max Schaefer
1fbf552ef5
Merge pull request #140 from sauyon/depstubber-update
...
Update dependency stubs
2020-05-14 09:29:17 +01:00
Sauyon Lee
97b3ec5cfc
Update dependency stubs
2020-05-13 10:07:14 -07:00
Sauyon Lee
ac55287210
Merge pull request #138 from max-schaefer/fix-tests
...
Fix frontend errors in two tests and a code example
2020-05-13 08:50:35 -07:00
Sauyon Lee
b8b9ff13f3
Merge pull request #139 from max-schaefer/cleanup-131
...
Cleanup of `io` model
2020-05-13 08:29:45 -07:00
Max Schaefer
d5fcf28e03
Add change note.
...
While we didn't see any new results in the evaluation, this is a fairly substantial amount of changes, so adding a change note is probably justified.
2020-05-13 15:55:52 +01:00
Max Schaefer
e852caea07
Cleanup of Io module.
...
- Undid rename from `Io` to `IO`
- Ensured function signatures in comments have leading `func`
- Removed superfluous `extends Function` clauses
- Renamed a few classes to be more consistent.
2020-05-13 15:55:52 +01:00
Max Schaefer
41b5fc17ab
Inline two single-use predicates.
...
This fixes a TODO.
2020-05-13 15:40:36 +01:00
Max Schaefer
6e58524b78
Fix a typo.
2020-05-13 15:40:31 +01:00
Max Schaefer
ec2314310e
Fix code example in query.
2020-05-13 15:38:48 +01:00
Max Schaefer
ac9e39120b
Fix unused variable in test.
2020-05-13 15:28:49 +01:00
Max Schaefer
e034458574
Fix MongoDB tests.
2020-05-13 15:25:54 +01:00
Sauyon Lee
83a3b6336f
Add change note
2020-05-13 04:31:23 -07:00
Sauyon Lee
748dd6801e
Handle HTTP response writers that are fields
2020-05-13 04:31:07 -07:00
Sauyon Lee
9e5645fa9d
Add similar predicate to SsaWithFields
2020-05-13 03:56:55 -07:00
Sauyon Lee
2089cb4543
Merge pull request #133 from max-schaefer/cleanup-conditional-bypass
...
Cleanup conditional-bypass query
2020-05-13 02:31:13 -07:00
Max Schaefer
005e49fe94
Merge pull request #130 from porcupineyhairs/MongoInjection
...
Golang : Add MongoDB injection support
2020-05-13 09:43:49 +01:00
Sauyon Lee
24e939730a
Merge pull request #134 from max-schaefer/fix-test-errors
...
Fix frontend errors in tests
2020-05-13 01:38:30 -07:00
Max Schaefer
89d633ac3f
Merge pull request #120 from porcupineyhairs/SensitiveActionBypass
...
User-controlled bypass of sensitive action
2020-05-12 19:48:24 +01:00
Max Schaefer
d438b5ec03
Merge pull request #131 from porcupineyhairs/IO
...
Model stdlib's IO package.
2020-05-12 19:41:40 +01:00
Slavomir
84e2a5ddd2
Add experimental library: gin web framework ( #117 )
2020-05-12 14:27:11 +01:00
Max Schaefer
6f21b4030e
Merge pull request #135 from sauyon/tempfile-test
...
Add support for ioutil TempFile and TempDir
2020-05-12 14:25:38 +01:00
Sauyon Lee
21bfaec0d3
TaintedPath: Add change note for tempfiles
2020-05-12 05:44:19 -07:00
Porcupiney Hairs
e51bc42bfb
fix metadata
2020-05-12 17:31:24 +05:30
Sauyon Lee
33e4961c95
ReflectedXss: Add an equality test guard
2020-05-12 04:53:18 -07:00
Sauyon Lee
1ef06e9e40
Add getType to SsaWithFields
2020-05-12 04:52:44 -07:00
Max Schaefer
5dac94d24c
Merge pull request #116 from gagliardetto/CWE-681
...
CWE 681
2020-05-12 11:59:08 +01:00
Slavomir
556f527193
Exclude results in test files
2020-05-12 13:12:47 +03:00
Slavomir
e5e74f34d7
Add note on why the zero is commented out in Lt32BitFlowConfig
2020-05-12 13:06:11 +03:00
Slavomir
623d5b3a97
Add comments
2020-05-12 13:00:50 +03:00
Slavomir
ea7c38c99c
Remove references section from qhelp file
2020-05-12 13:00:27 +03:00
Slavomir
67a7294d10
Simplify and remove deprecated; add severity
2020-05-12 12:51:13 +03:00
Sauyon Lee
58e41e9302
ReflectedXss: More broadly exclude values with a constant prefix
2020-05-11 15:49:37 -07:00
Max Schaefer
a55c828fe4
Update ql/src/experimental/CWE-840/ConditionalBypass.ql
...
Co-authored-by: porcupineyhairs <61983466+porcupineyhairs@users.noreply.github.com >
2020-05-11 15:26:30 +01:00
Porcupiney Hairs
d0061bfd4b
Golang : Add MongoDB injection support
...
This PR adds support for MongoDB injection to the existing SQL injection query.
This models the official Golang MongoDB driver.
A brief summary of changes made in this query are :
1. A `NoSQL.qll` files has been created to model a `NoSQLQueryString`.
2. An entry is added in `go.qll` by default as I find these changes may be generally useful.
3. Library tests along with there expected outputs are added.
4. Query tests are added. However, I am unable to add the expected output as qltest
can't find depstubber. However, these can be easily added. I have created a separate
codeql-go database with the same files and ran the query against the same. I can see
there should be 14 correct results added from this PR.
2020-05-11 19:55:48 +05:30
Porcupiney Hairs
9b53ad3b3c
model IO package
2020-05-11 19:39:01 +05:30
Porcupiney Hairs
c1856ba260
fix tests
2020-05-11 19:32:28 +05:30
Max Schaefer
4a7171d91e
Fix frontend errors in BadRedirectCheck tests.
2020-05-11 11:45:21 +01:00
Max Schaefer
17dd99d326
Fix frontend errors in Mux tests.
2020-05-11 11:45:08 +01:00
Max Schaefer
df9902512f
More cleanup in help and tests.
...
In particular, I have copied over the examples referenced in the qhelp into the test folder and made sure they compile.
2020-05-11 11:07:38 +01:00
Max Schaefer
287dda0ab5
Minor cleanup in query and tests.
2020-05-11 11:05:40 +01:00
Max Schaefer
78201a2c5f
Rename ConditionBypass* to ConditionalBypass* for consistency with other languages.
2020-05-11 10:47:00 +01:00
Max Schaefer
3e830b69b5
Merge pull request #121 from porcupineyhairs/conditionBypass
...
User-controlled bypass of a comparision
2020-05-11 10:41:33 +01:00
Slavomir
5df81d3210
Apply suggestions from code review
...
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-05-11 12:37:14 +03:00
Sauyon Lee
181c03ebf3
Add support for ioutil TempFile and TempDir
2020-05-10 18:25:55 -07:00
Porcupiney Hairs
b32ac2a47f
fix tests
2020-05-11 04:51:17 +05:30
Porcupiney Hairs
4aba80b0bd
include changes from review
2020-05-11 04:05:41 +05:30
Porcupiney Hairs
3d10ec7e51
remove some obvious false positives and include changes from review
2020-05-11 03:13:01 +05:30
Max Schaefer
0e779d0b64
Merge pull request #62 from max-schaefer/update-data-flow
...
Port recent data-flow improvements
2020-05-07 16:07:33 +01:00
Max Schaefer
994536e93b
Add change note.
2020-05-07 11:46:31 +01:00
Max Schaefer
70f87b59d2
Data flow: Support stores into nodes that are not PostUpdateNodes.
...
cf https://github.com/github/codeql/pull/3312
2020-05-06 19:43:27 +01:00
Max Schaefer
fd2e618be2
Data flow: No more summaries
...
cf https://github.com/github/codeql/pull/3110
2020-05-06 19:43:27 +01:00
Max Schaefer
968d4d9cdd
Revert the join order fix from https://github.com/github/codeql/pull/2872 .
...
cf https://github.com/github/codeql/pull/3202
2020-05-06 19:43:27 +01:00
Max Schaefer
f2b43f65f9
Data flow: Exclude param-param flow through identical params.
...
cf https://github.com/Semmle/ql/pull/3060
2020-05-06 19:43:27 +01:00
Max Schaefer
aabe2f2f82
Data flow: No magic in returnFlowCallableCand.
...
cf https://github.com/Semmle/ql/pull/3142
2020-05-06 19:43:27 +01:00
Max Schaefer
c9ba6dd672
Fix up hasLocationInfo predicate.
2020-05-06 19:43:27 +01:00
Max Schaefer
5cd9168e4d
Data flow: Refactoring + performance improvements
...
cf https://github.com/Semmle/ql/pull/2903
2020-05-06 19:43:27 +01:00
Max Schaefer
96120e1e35
Update expected output.
2020-05-06 19:43:27 +01:00
Max Schaefer
8d10a8dd5b
Fix bug in type pruning.
...
cf https://github.com/Semmle/ql/pull/3020
2020-05-06 19:43:27 +01:00
Max Schaefer
d008d2a6a8
Fix performance issue in partial paths exploration.
...
cf https://github.com/Semmle/ql/pull/3021
2020-05-06 19:43:27 +01:00
Max Schaefer
1d4a993d87
Merge pull request #132 from max-schaefer/extends-this-class
...
Fix copy-pasted typo.
2020-05-06 19:42:55 +01:00
Max Schaefer
d6a5a72c01
Fix copy-pasted typo.
2020-05-06 13:54:28 +01:00
Sauyon Lee
164149b29a
Merge pull request #129 from max-schaefer/fix-argument-post-update-nodes
...
Fix and improve taint-tracking through function arguments
2020-05-06 02:57:01 -07:00
Max Schaefer
08f5451fce
Address review comments.
2020-05-06 07:32:15 +01:00
Max Schaefer
9f59777cc9
Merge pull request #119 from jcreedcmu/jcreed/jump-to-def-ide
...
Add queries for ide search.
2020-05-05 15:10:58 +01:00
Jason Reed
5653889a39
Exclude IDE queries from query suites.
2020-05-05 09:22:44 -04:00
Max Schaefer
2fb3d39f61
Merge pull request #128 from sauyon/mux
...
Add support for Mux library
2020-05-05 13:57:37 +01:00
Max Schaefer
a79f2b4f44
Add change note for CleartextLogging.
2020-05-05 12:05:09 +01:00
Max Schaefer
b177d58c88
Tweak test.
...
The query under test isn't a `@problem` query, so we should refer to "alerts".
2020-05-05 12:05:09 +01:00
Max Schaefer
60a6c96863
Simplify modeling of NewContent.
2020-05-05 12:05:09 +01:00
Max Schaefer
5a96b0e8ac
Add two function models for handling MIME APIs.
2020-05-05 12:05:09 +01:00
Max Schaefer
be94f2b9e6
Improve and extend various standard-library function models.
2020-05-05 12:05:09 +01:00
Max Schaefer
ca0d9cc66e
Merge pull request #127 from max-schaefer/clean-up-email-injection
...
Clean up `EmailInjection.qll` and related libraries.
2020-05-05 11:56:43 +01:00
Sauyon Lee
a841077cbe
Add support for Mux library
2020-05-05 03:25:08 -07:00
Max Schaefer
54f10157b0
Update ql/src/semmle/go/frameworks/Email.qll
...
Co-authored-by: Sauyon Lee <sauyon@github.com >
2020-05-05 11:24:19 +01:00
Max Schaefer
e632c75de3
Add support for taint models involving "backwards" taint propagation from results to arguments.
2020-05-04 16:36:38 +01:00
Max Schaefer
5e8e51993e
Simplify SmtpData.
2020-05-04 16:36:38 +01:00
Max Schaefer
5b0c48e332
Add taint models for fmt.Fprintf and io.WriteString.
2020-05-04 16:36:38 +01:00
Max Schaefer
d0e8d6efda
Fix post-update nodes for function arguments.
2020-05-04 16:36:38 +01:00
Max Schaefer
b1899374b9
Merge pull request #126 from max-schaefer/new-style-change-notes
...
Switch to new-style change notes.
2020-05-04 15:42:24 +01:00
Max Schaefer
04a19b7150
Clean up EmailInjection.qll and related libraries.
2020-05-04 09:13:23 +01:00
porcupineyhairs
657108d598
Add Email Content Injection Query ( #108 )
...
This adds a query for Email content injection issues.
It models the Golang's net/smtp library as well as
the Sendgrid email library (581 stars).
2020-05-04 07:54:30 +01:00
Max Schaefer
980241603b
Switch to new-style change notes.
2020-05-01 07:57:13 +01:00
Sauyon Lee
cd1d699208
Improve BadRedirectCheck query
...
We now look for a path from the variable being checked to a redirect.
Additionally, several sources of false positives have been eliminated, and a model of relevant parts of the Macaron framework has been added.
2020-05-01 07:13:16 +01:00
Slavomir
836b8965e2
Beautify .qhelp file
2020-04-30 16:59:30 +03:00
Slavomir
127cd3d003
Refactor query
2020-04-30 16:46:19 +03:00
Slavomir
b9fae2e5d0
Add newline
2020-04-30 16:46:19 +03:00
Slavomir
6f1f60896a
autoformat
2020-04-30 16:46:19 +03:00
Slavomir
c9c7e6c0a9
Add more test cases: add negative cases
2020-04-30 16:46:19 +03:00
Slavomir
d713087364
Mention in qhelp file: CWE-190: Integer Overflow or Wraparound
2020-04-30 16:46:19 +03:00
Slavomir
4517d4513f
Update qhelp file and go examples
2020-04-30 16:46:19 +03:00
Slavomir
f093226dab
Move query to experimental
2020-04-30 16:46:19 +03:00
Slavomir
57ac636d60
Change alert message
2020-04-30 16:46:19 +03:00
Slavomir
fe661b227c
Improve alert message inside select statement
2020-04-30 16:46:19 +03:00
Slavomir
05314a19ee
Add comments, improve naming
2020-04-30 16:46:19 +03:00
Slavomir
b176c4ad19
Add ParseFloat, ParseInt, ParseUint
2020-04-30 16:46:19 +03:00
Slavomir
8ecc2b9523
add comments, improve naming, refactor
2020-04-30 16:46:19 +03:00
Slavomir
fd9e3a005e
fix comments
2020-04-30 16:46:19 +03:00
Slavomir
6d2c5be196
rename OverflowingConversionExpr to NumericConversionExpr
2020-04-30 16:46:19 +03:00
Slavomir
74481c4bad
CWE-681: initial commit
2020-04-30 16:46:19 +03:00
Max Schaefer
dd4f1ca70b
Merge pull request #125 from gagliardetto/exec-syscall
...
Add syscall functions to SystemCommandExecutors
2020-04-30 07:21:28 +01:00
Sauyon Lee
417102c120
Merge pull request #124 from github/rc/1.24
...
Merge rc/1.24 into master
2020-04-29 12:27:56 -07:00
Slavomir
a357121e89
Fix test by removing a unix-only func; add windows-only funcs
2020-04-29 19:17:24 +03:00
Slavomir
a93477c301
Add syscall functions to SystemCommandExecutors
2020-04-29 18:31:07 +03:00
Max Schaefer
d3fea0f171
Merge pull request #123 from sauyon/dependency-licenses
...
Add license files for dependency stubs
2020-04-29 14:45:25 +01:00
Sauyon Lee
157139bb46
Add license files for dependencies
2020-04-29 04:04:38 -07:00
Sauyon Lee
6953d3b2ba
Merge pull request #122 from max-schaefer/receiver-output
...
Fix `getExitNode` for receiver outputs.
2020-04-29 01:25:43 -07:00
Max Schaefer
a1222344eb
Add tests.
2020-04-29 07:55:24 +01:00
Max Schaefer
0546c527af
Fix getExitNode for receiver outputs.
2020-04-28 21:41:29 +01:00
Porcupiney Hairs
9948596e2c
User-controlled bypass of a comparision
2020-04-28 23:24:28 +05:30
Porcupiney Hairs
92576e9c11
User-controlled bypass of sensitive action
2020-04-28 23:18:58 +05:30
Jason Reed
6489538623
Add queries for ide search.
...
This enables jump-to-definition and find-references in the VS Code
extension, for golang source archives.
2020-04-28 12:00:24 -04:00
Max Schaefer
3a39085e62
Merge pull request #114 from sauyon/action-update
...
Use CodeQL version 2.1.1 for tests
2020-04-27 09:12:37 +01:00
Sauyon Lee
b3c363d1c2
Try setting destination for expand-archive
2020-04-23 22:39:19 -07:00
Sauyon Lee
38f744ddd6
Action: Use expand-archive on Windows
2020-04-23 20:04:19 -07:00
Sauyon Lee
78bffa96b3
Use CodeQL version 2.1.1
2020-04-23 18:41:42 -07:00
Sauyon Lee
b3beca0a1c
Merge pull request #111 from github/rc/1.24
...
Merge rc/1.24 into master
2020-04-23 17:46:12 -07:00
Sauyon Lee
ae21ac23c1
Merge pull request #105 from max-schaefer/fail-tests-with-errors
...
Add consistency query flagging tests with unexpected frontend errors
2020-04-20 01:31:43 -07:00
Max Schaefer
97b1d3a57c
Fix extraction of error positions for paths containing colon.
2020-04-20 08:04:16 +01:00
Max Schaefer
c19c16c655
Merge pull request #106 from github/1.24/SD-61-Go-finalize-notes
...
1.24 release: finalize change notes for Go
2020-04-17 15:03:47 +01:00
Felicity Chapman
70525d0e64
Minor editorial changes
2020-04-17 13:19:11 +01:00
Max Schaefer
c15094ab9e
Mark frontend errors as expected in ImposibleInterfaceNilCheck.
2020-04-17 09:51:06 +01:00
Max Schaefer
ef497afc20
Mark a frontend error in DeadStoreOfLocal tests as expected.
2020-04-17 09:51:06 +01:00
Max Schaefer
13762bd76c
Mark frontend errors in Types/unknownFunction.go as expected.
2020-04-17 09:51:06 +01:00
Max Schaefer
c6a37fdf1d
Add consistency query flagging unexpected frontend errors.
2020-04-17 09:51:06 +01:00
Max Schaefer
bf42271d14
Add convenience predicate to class Error.
2020-04-17 09:39:26 +01:00
Max Schaefer
05a6f21aea
Merge pull request #104 from github/rc/1.24
...
Merge rc/1.24 into master.
2020-04-16 10:53:50 +01:00
Max Schaefer
00546804e3
Merge pull request #103 from max-schaefer/fix-disabled-certificate-check-qldoc
...
Fix misformatted header comment for `DisabledCertificateCheck`.
2020-04-16 09:59:55 +01:00
Max Schaefer
245b99dd42
Fix misformatted header comment for DisabledCertificateCheck.
2020-04-16 08:43:33 +01:00
Max Schaefer
699208adae
Merge pull request #102 from marcogario/integeroverflow_qhelp
...
Integeroverflow.qhelp: use paragraphs within sections
2020-04-15 14:09:55 +01:00
Marco Gario
14e4e2d40f
Integeroverflow.qhelp: use paragraphs within sections
2020-04-15 12:15:25 +01:00
Sauyon Lee
882805207a
Merge pull request #98 from max-schaefer/extract-frontend-errors
...
Add support for extracting frontend errors
2020-04-15 01:40:31 -07:00
Sauyon Lee
777818e019
Merge pull request #99 from github/rc/1.24
...
Merge rc/1.24 into master
2020-04-15 01:33:46 -07:00
Max Schaefer
d452fc04ad
Merge pull request #101 from sauyon/bufio-change-note
...
Add change note for buffered i/o
2020-04-15 08:48:58 +01:00
Sauyon Lee
8ca310e6b6
Add change note for buffered i/o
2020-04-15 00:37:50 -07:00
Sauyon Lee
d3e62b0480
Merge pull request #100 from max-schaefer/add-missing-change-notes
...
Add two missing change notes.
2020-04-15 00:33:54 -07:00
Max Schaefer
95c2cb19cf
Add two missing change notes.
2020-04-15 07:57:47 +01:00
Max Schaefer
8341ce0d46
Merge pull request #97 from max-schaefer/fix-frontend-errors
...
Fix a few compiler errors in tests
2020-04-14 17:17:03 +01:00
Max Schaefer
dd9738f9a6
Better fix for frontend errors in DeadStoreOfLocal tests.
2020-04-14 16:07:23 +01:00
Max Schaefer
bc9c47ad5e
Merge pull request #96 from sauyon/stub-deps
...
Use the depstubber for test stubbing
2020-04-14 15:24:22 +01:00
Max Schaefer
013d88e511
Fix frontend errors in DisabledCertificateCheck tests.
2020-04-14 10:51:29 +01:00
Max Schaefer
cb2f15f770
Fix frontend errors in AllocationSizeOverflow test.
2020-04-14 10:51:29 +01:00
Max Schaefer
590f146477
Fix frontend errors in DeadStoreOfLocal tests.
2020-04-14 10:51:29 +01:00
Max Schaefer
1bedd9df5d
Fix frontend errors in MistypedExponentiation test.
2020-04-14 10:51:29 +01:00
Max Schaefer
127f232c3d
Fix frontend errors in FlowSteps test.
2020-04-14 10:51:29 +01:00
Max Schaefer
d565a26d5b
Add QL library for working with Go frontend errors.
2020-04-14 10:29:36 +01:00
Max Schaefer
f2d11538ce
Add upgrade script.
2020-04-14 10:29:36 +01:00
Sauyon Lee
a3ad54e8b9
Add tests for ginkgo test files
2020-04-13 22:59:23 -07:00
Sauyon Lee
385603a7a1
Use stubber for SQL tests
2020-04-13 22:59:22 -07:00
Sauyon Lee
06559e0ebf
Use stubber for SystemCommandExecution tests
...
Also remove redundant tests
2020-04-13 22:59:21 -07:00
Sauyon Lee
42d16ca80b
Use stubber for CWE-643 tests, and test example
2020-04-13 22:59:20 -07:00
Sauyon Lee
adc8730f1f
Use stubber for CWE-312 tests
2020-04-13 22:59:18 -07:00
Sauyon Lee
5e765a9ca1
Use stubber for CWE-089 tests
2020-04-13 20:15:24 -07:00
Max Schaefer
c38edf77ce
Update stats.
2020-04-09 16:39:47 +01:00
Max Schaefer
a837d5f4ce
Add support for extracting Go frontend errors.
2020-04-09 16:39:47 +01:00
Max Schaefer
cf8eff543c
Merge pull request #94 from max-schaefer/more-testing-frameworks
...
Recognise more testing frameworks
2020-04-09 11:57:46 +01:00
Max Schaefer
d344687f52
Add change note.
2020-04-09 09:41:09 +01:00
Max Schaefer
1bf835f156
Add tests.
2020-04-09 09:41:02 +01:00
Max Schaefer
d5c8570bfc
Recognise imports of well-known testing frameworks.
2020-04-09 09:40:53 +01:00
Max Schaefer
e30e5685b2
Fix recognition of Test, Benchmark, and Example as test cases.
2020-04-09 09:40:25 +01:00
Max Schaefer
be9e9720d5
Introduce class TestFile and use it.
2020-04-09 09:16:45 +01:00
Max Schaefer
43309b98fd
Merge pull request #93 from max-schaefer/autoformat
...
Autoformat QL and Go
2020-04-08 08:06:46 +01:00
Max Schaefer
96ee5f1c4e
Merge pull request #92 from max-schaefer/baselib-extractor
...
Add extractor field to QL packs.
2020-04-08 07:48:25 +01:00
Max Schaefer
1fe5e7f901
Autoformat Go files.
2020-04-08 07:32:43 +01:00
Max Schaefer
ddf2bdb44b
Autoformat all QL.
2020-04-08 07:32:43 +01:00
Max Schaefer
c9ef6f77a2
Merge pull request #91 from max-schaefer/disabled-certificate-check
...
Add new query DisabledCertificateCheck.
2020-04-08 07:11:15 +01:00
Max Schaefer
90dfebb4bd
Add extractor field to QL packs.
2020-04-07 14:41:54 +01:00
Max Schaefer
f074d89b54
Merge pull request #88 from max-schaefer/readsField
...
Improve handling of field reads through pointer
2020-04-07 09:02:10 +01:00
Max Schaefer
8fba9a98d4
Add new query DisabledCertificateCheck.
2020-04-07 09:01:41 +01:00
Max Schaefer
2ec335fb1a
Autoformat.
2020-04-07 07:16:50 +01:00
Max Schaefer
fb661aadcc
Merge pull request #90 from github/p0-patch-1
...
Delete outdated COPYRIGHT file
2020-04-06 15:32:50 +01:00
Max Schaefer
42bc5353e3
Refine our modelling of test functions and split it out into a separate library.
2020-04-06 14:46:13 +01:00
Pavel Avgustinov
c45a5cf1f2
Update copyright date
2020-04-06 14:37:09 +01:00
Pavel Avgustinov
291150a755
Delete outdated COPYRIGHT file
...
This seems to be copied from Semmle/ql, and it claims the wrong license.
2020-04-06 14:35:44 +01:00
Sauyon Lee
a663eaae23
Merge pull request #89 from max-schaefer/extractor-profiling
...
Add environment variables for dumping CPU and memory profiles.
2020-04-06 03:33:08 -07:00
Max Schaefer
1f7441e027
Make readsField and friends work modulo implicit dereferences, like writesField.
2020-04-06 11:06:46 +01:00
Max Schaefer
76f2748cbc
Teach SsaWithFields to properly handle implicit dereferences.
2020-04-06 09:23:07 +01:00
Max Schaefer
4a1071cac6
Merge pull request #77 from robertbrignull/code_scanning_suites
...
Add code-scanning suites
2020-04-06 09:14:58 +01:00
Max Schaefer
5721d1fb3e
Merge pull request #86 from sauyon/dependency-fix
...
Allow dependencies to match imports of subpackages
2020-04-03 20:35:07 +01:00
Max Schaefer
c240fdbd45
Merge pull request #87 from max-schaefer/more-qldoc
...
Add missing QlDoc.
2020-04-03 19:43:38 +01:00
Sauyon Lee
e1a7269a45
Allow dependencies to match imports of subpackages
2020-04-03 10:42:19 -07:00
Max Schaefer
d13d2f27e6
Add missing QlDoc.
2020-04-03 17:08:56 +01:00
Max Schaefer
407493094d
Merge pull request #75 from sauyon/ssrf-refinement
...
SSRF query refinements
2020-04-03 09:31:24 +01:00
Sauyon Lee
dcd6aaf69a
Alphabetize change notes
2020-04-03 00:01:19 -07:00
Sauyon Lee
ea3a7e8038
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-04-02 23:58:39 -07:00
Sauyon Lee
e27947e280
Add comment for new url concatenation sanitizer
2020-04-02 23:58:39 -07:00
Sauyon Lee
3c02b3ab74
Add SafeUrlFlowCustomizations doc comment
2020-04-02 23:58:38 -07:00
Sauyon Lee
c68e509508
OpenUrlRedirect: Fix some comments
2020-04-02 23:58:37 -07:00
Sauyon Lee
4e5b17e18d
Sanitize hostname if there is a slash and a previous component
2020-04-02 23:58:36 -07:00
Sauyon Lee
4b3982154a
Add a SafeUrlFlow configuration
2020-04-02 23:58:35 -07:00
Sauyon Lee
4bcffe2d47
RequestForgery: Add a safe URL sanitizer
2020-04-02 23:58:34 -07:00
Sauyon Lee
1c859a8991
Address review comments
2020-04-02 23:58:33 -07:00
Sauyon Lee
3577d75607
RequestForgery: Add change note
2020-04-02 23:58:17 -07:00
Sauyon Lee
89a03c8b67
RequestForgery: Add high precision
2020-04-02 23:49:58 -07:00
Sauyon Lee
830c3fce2a
RequestForgery: Add tests
2020-04-02 23:49:57 -07:00
Sauyon Lee
314787956b
Allow write base to be inside an implicit dereference
2020-04-02 23:49:56 -07:00
Sauyon Lee
e9b0f88946
RequestForgery: Add taint step for URL Host assignment
2020-04-02 23:49:55 -07:00
Sauyon Lee
12928d9f17
HTTP: Add model for Client.Do
2020-04-02 23:49:55 -07:00
Sauyon Lee
6876eabf54
RequestForgery: Add query help
2020-04-02 23:49:54 -07:00
Sauyon Lee
b23c75afb6
RequestForgery: move query from experimental
2020-04-02 23:49:53 -07:00
Max Schaefer
77c282824e
Merge pull request #81 from gagliardetto/system-executors
...
Expand system executors (continuation of #70 )
2020-04-03 07:24:05 +01:00
Sauyon Lee
f9610f22e7
Merge pull request #85 from max-schaefer/codeql-stats
...
Use CodeQL for creating stats
2020-04-02 10:57:20 -07:00
Max Schaefer
b28cd112fe
Merge pull request #83 from max-schaefer/max-goroutines
...
Introduce official environment variable for goroutine limiting.
2020-04-02 13:49:21 +01:00
Max Schaefer
325bb7ca23
Merge pull request #84 from shati-patel/move-documentation
...
Docs: Move "CodeQL for Go" out of this repo
2020-04-02 13:48:51 +01:00
Shati Patel
3af3548c30
Remove "learn-ql" folder
2020-04-02 11:56:15 +01:00
Shati Patel
6126d32d82
Remove .rst files from this repo
2020-04-02 11:35:19 +01:00
Shati Patel
3a12c1c2d4
Docs: Add README with links to new docs location
2020-04-02 11:35:14 +01:00
Slavomir
b5f14d1296
Add awk and similar
2020-04-02 13:07:43 +03:00
Slavomir
81bc3c03a9
Add more commands
2020-04-02 13:03:22 +03:00
Max Schaefer
510b6070c9
Introduce official environment variable for goroutine limiting.
...
We've had to tell people how to do this, so we should have a name for it that doesn't refer to a defunct company.
2020-04-02 10:45:52 +01:00
Max Schaefer
ddb6f2ca6a
Update stats.
2020-04-02 10:15:20 +01:00
Max Schaefer
17a8c722cd
Use CodeQL for creating stats.
2020-04-02 10:15:10 +01:00
Slavomir
32beebd059
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
Co-Authored-By: Sauyon Lee <sauyon@github.com >
2020-04-02 12:09:06 +03:00
Sauyon Lee
bc59fa40d7
Merge pull request #73 from intrigus-lgtm/make-CWE-643-supported
...
Make cwe 643 supported
2020-04-01 17:45:45 -07:00
Sauyon Lee
eba8dd0a36
Merge pull request #82 from github/max-schaefer-patch-1
...
Improve autobuilder logging
2020-04-01 09:07:55 -07:00
Sauyon Lee
c2eb3f5d6b
Merge pull request #80 from max-schaefer/build-command-env-var
...
Introduce `CODEQL_GO_EXTRACTOR_BUILD_COMMAND` as an alias for `LGTM_INDEX_BUILD_COMMAND`.
2020-04-01 09:07:31 -07:00
Max Schaefer
611751a9c3
Improve autobuilder logging
2020-04-01 15:31:50 +01:00
intrigus
be21d49cf2
Add precision to query
2020-04-01 16:15:24 +02:00
intrigus
3a381b2fbf
Add change note
2020-04-01 16:15:09 +02:00
intrigus
a524cc4716
Properly match methods defined in classes
2020-04-01 16:04:24 +02:00
intrigus
615fe09ed7
Format go test stubs
2020-04-01 15:52:55 +02:00
Slavomir
a25a21eb11
Add change-note
2020-04-01 15:14:22 +03:00
Slavomir
33c18b0d11
expand system executors
2020-04-01 15:12:48 +03:00
Max Schaefer
efc9ecefc8
Introduce CODEQL_GO_EXTRACTOR_BUILD_COMMAND as an alias for LGTM_INDEX_BUILD_COMMAND.
...
We've occasionally had to tell people to set this variable manually, so we might as well have an alias that doesn't refer to a soon-to-be obsolete product.
2020-04-01 09:35:57 +01:00
intrigus
4924be54a7
Fix one test method
2020-03-31 16:46:29 +02:00
intrigus
0586fe9235
Add missing stubs in vendor/
2020-03-31 16:46:08 +02:00
Max Schaefer
590f01d0c2
Add environment variables for dumping CPU and memory profiles.
...
These are intentionally undocumented for now.
2020-03-31 07:50:06 +01:00
Max Schaefer
1c40d6c1ce
Merge pull request #78 from sauyon/1.14-change-note
...
Add change notes for Go 1.14 support
2020-03-31 07:34:26 +01:00
intrigus
66451a776d
Add test cases for all libraries
...
Note: This is currently missing appropriate vendoring
so will probably fail for now.
2020-03-30 23:44:25 +02:00
intrigus
e18d15070a
Switch to jbowtie/gokogiri
2020-03-30 23:42:44 +02:00
intrigus
b097826dd8
Add missing class qualifiers
2020-03-30 23:42:13 +02:00
intrigus
051f17ce67
Fix class name
2020-03-30 23:37:37 +02:00
Sauyon Lee
3d3f35cc48
Add change notes for Go 1.14 support
2020-03-30 13:45:37 -07:00
Max Schaefer
487b1e3f80
Merge pull request #76 from max-schaefer/even-more-qldoc
...
Add Qldoc for the last few remaining predicates.
2020-03-30 11:58:28 +01:00
Max Schaefer
28ed803fae
Data flow: Add module doc comment for TaintTrackingImpl.qll
...
cf https://github.com/Semmle/ql/pull/3155
2020-03-30 11:21:53 +01:00
Max Schaefer
bb34c91b38
Add Qldoc for the last few remaining predicates.
...
Apart from a missing module doc comment for `TaintTrackingImpl.qll` which we'll need to synchronize with the other languages (https://github.com/Semmle/ql/pull/3155 ), this gets us to 100% Qldoc coverage.
2020-03-30 10:38:25 +01:00
intrigus
26cfa93947
Ignore type incompatible sinks
2020-03-27 21:32:53 +01:00
Robert Brignull
df4c686921
add code scanning suites
2020-03-27 17:14:28 +00:00
intrigus
8278dd358e
Try to fix test
2020-03-27 16:13:00 +01:00
intrigus
21feb9d996
Add byte slice type
2020-03-27 15:37:36 +01:00
intrigus
d609c0ca43
Shorten example code
2020-03-27 15:31:20 +01:00
intrigus
c5a1185939
Apply style suggestions
2020-03-27 15:29:21 +01:00
intrigus
b24c23389c
Don't match unexported functions
2020-03-27 15:21:00 +01:00
Max Schaefer
cf6e255a6d
Merge pull request #74 from sauyon/http-formvalue
...
HTTP Library Improvements
2020-03-27 14:07:30 +00:00
intrigus-lgtm
5eaaa4264a
Apply suggestions from code review
...
Co-Authored-By: Sauyon Lee <sauyon@github.com >
2020-03-27 13:42:30 +01:00
Sauyon Lee
080d14ea50
Add a test for the Read taint step
2020-03-27 04:22:13 -07:00
Sauyon Lee
4747524fee
Address review comments
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-03-27 04:15:30 -07:00
Sauyon Lee
05761bc2cd
Address review comments
2020-03-27 04:03:30 -07:00
Sauyon Lee
a4f1e2b527
Add a model for Read methods on io.Reader
2020-03-26 18:57:44 -07:00
intrigus
be50db1cc7
Move XPath injection query to supported query
...
The XPath injection query is moved to the supported queries.
Removed unnecessary code from the go test file
2020-03-26 20:19:58 +01:00
intrigus
03023e8205
Add XPath model to default imports
2020-03-26 20:19:19 +01:00
intrigus
35a6fdb589
Add XPath framework models
2020-03-26 20:18:16 +01:00
Sauyon Lee
1f4d67b77b
OpenUrlRedirect: Whitelist some more fields and methods
2020-03-26 07:20:51 -07:00
Sauyon Lee
541c82a7f3
HTTP: Add some more untrusted fields and methods
...
Also, fix up broken tests.
2020-03-26 07:20:14 -07:00
Sauyon Lee
e1b0bed6b3
Merge pull request #72 from max-schaefer/improve-virtual-call-resolution
...
Refine virtual call targets by local reasoning where possible
2020-03-26 06:00:59 -07:00
Max Schaefer
46a1a4e010
Add a test.
2020-03-25 20:34:34 +00:00
Max Schaefer
e6bdc1809b
Update ql/src/semmle/go/dataflow/internal/DataFlowDispatch.qll
...
Co-Authored-By: Sauyon Lee <sauyon@github.com >
2020-03-25 15:04:48 +00:00
Max Schaefer
13b61383e2
Merge pull request #65 from sauyon/openredirect-fps
...
OpenUrlRedirect: Expand safe URL flow configuration
2020-03-25 15:04:21 +00:00
Sauyon Lee
fbc2499118
OpenUrlRedirect: Add change note for fixed FPs
2020-03-25 04:01:17 -07:00
Sauyon Lee
f77d46f296
Address review comments.
2020-03-25 04:01:15 -07:00
Sauyon Lee
bd5f0b01cf
Fix tests
2020-03-25 04:01:14 -07:00
Sauyon Lee
9321ff9110
OpenUrlRedirect: Add support for url.Host reassignments
2020-03-25 04:01:14 -07:00
Sauyon Lee
5f83dbd07b
OpenUrlRedirect: Exclude header sources
2020-03-25 04:01:13 -07:00
Sauyon Lee
49aa43bd49
Make header Get and Values calls into taint steps
2020-03-25 04:01:12 -07:00
Sauyon Lee
83a417f52e
OpenUrlRedirect: Use a taint-tracking safe URLs
2020-03-25 04:01:11 -07:00
Sauyon Lee
932840b0a3
Address review comments.
2020-03-25 04:01:10 -07:00
Sauyon Lee
fd88d913f7
Fix tests
2020-03-25 04:01:09 -07:00
Sauyon Lee
cc13a5d618
OpenUrlRedirect: Expand safe URL flow configuration
...
Also add some more tests
2020-03-25 04:01:08 -07:00
Max Schaefer
6edbe74c09
Revert "Add queries to inspect and measure dispatch differences."
...
This reverts commit 752ee3909a .
2020-03-25 10:43:05 +00:00
Max Schaefer
4ca87b84db
Merge pull request #68 from adityasharad/go/request-forgery
...
Add experimental query for request forgery.
2020-03-25 09:09:34 +00:00
Aditya Sharad
c44e5379df
Experimental: Remove query precision for now.
...
Address review comment.
2020-03-24 10:57:51 -07:00
Aditya Sharad
4f32d6651c
Experimental: Add sanitiser edge for request forgery.
...
Consider a URL string sanitised if the hostname cannot be controlled.
This approach is used by URL redirection queries.
2020-03-24 10:57:51 -07:00
Aditya Sharad
f984532236
Experimental: Add query for request forgery.
...
Tracks the flow of tainted data from untrusted input to the URL of an HTTP request.
Ported from the corresponding query for JavaScript, though currently limited in scope.
Includes companion libraries for customisation.
2020-03-24 10:57:51 -07:00
Aditya Sharad
d41e6a9d85
Model HTTP request functions in net/http package.
2020-03-24 10:57:51 -07:00
Aditya Sharad
b057ce8d46
Concepts: Add HTTP::ClientRequest class and module.
...
Extensible model of client requests to a URL.
Ported from the CodeQL JavaScript library.
2020-03-24 10:57:51 -07:00
Max Schaefer
330f11c2a3
Merge pull request #71 from intrigus-lgtm/patch-1
...
Fix error in Qldoc
2020-03-24 16:55:22 +00:00
intrigus-lgtm
24b3133e0c
Fix error in Qldoc
2020-03-24 17:53:51 +01:00
Max Schaefer
8dda4bd97f
Merge pull request #66 from intrigus-lgtm/CWE-643
...
CWE-643 XPathInjection on Go
2020-03-24 10:53:57 +00:00
Sauyon Lee
81e13473db
Merge pull request #69 from max-schaefer/issue-72
...
Track taint through element writes.
2020-03-24 03:41:05 -07:00
Max Schaefer
752ee3909a
Add queries to inspect and measure dispatch differences.
2020-03-24 09:34:42 +00:00
Max Schaefer
084fa80a57
Refine virtual call targets by local reasoning where possible.
2020-03-24 09:34:42 +00:00
intrigus
1f635806b3
Fix copy-paste errors, remove debugging code
2020-03-23 16:49:45 +01:00
intrigus-lgtm
9187bacd3c
Apply suggestion from code review
...
Use getUnderlyingType() to account for named aliases.
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-03-23 16:45:56 +01:00
Sauyon Lee
4ff3177fae
Merge pull request #67 from max-schaefer/more-qldoc
...
Add missing Qldoc for modules.
2020-03-23 05:29:40 -07:00
Max Schaefer
62b79721ea
Track taint through element writes.
...
This adds a taint step from `pred` to (the post-update node) of `succ` in `succ[idx] = pred` and its syntactic variants.
Unlike for structs, where partially tainted values are quite common, the theory is that arrays, maps, and slices are usually either completely tainted or completely clean.
2020-03-23 09:15:01 +00:00
intrigus
d81c9b145e
Update query help to use goxpath
2020-03-20 21:38:46 +01:00
intrigus
948b79df87
Update xpath example, use goxpath package
2020-03-20 21:38:46 +01:00
intrigus
c7ead88b91
Restructure query, add default sanitizer
2020-03-20 21:38:46 +01:00
intrigus-lgtm
ec40cf0379
Apply suggestions from review
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-03-20 21:38:02 +01:00
Max Schaefer
60fe6f4390
Add missing Qldoc for modules.
2020-03-20 17:36:08 +00:00
intrigus
d6ff6b74c5
CWE-643 XPathInjection on Go
2020-03-19 22:26:37 +01:00
Max Schaefer
37aaba10b7
Merge pull request #64 from sauyon/examples-in-json
...
Add examples qlpack.yml to CodeQL manifest
2020-03-19 07:54:39 +00:00
Sauyon Lee
f60f6ea7d0
Add examples qlpack.yml to CodeQL manifest
2020-03-18 09:30:45 -07:00
Max Schaefer
f53732ec5a
Merge pull request #39 from sauyon/go1.14
...
Go 1.14 support
2020-03-18 10:08:50 +00:00
Max Schaefer
0a59470640
Fix tests. ( #3 )
2020-03-18 02:10:24 -07:00
Max Schaefer
60ce9c5acd
Merge pull request #59 from max-schaefer/go-pg
...
Add model of `go-pg/pg`.
2020-03-18 07:35:23 +00:00
Max Schaefer
ad1324d2dd
Add test.
2020-03-17 12:08:42 +00:00
Max Schaefer
49c5779112
Add model of go-pg/pg.
2020-03-17 12:08:42 +00:00
Sauyon Lee
e9b47298ed
Merge pull request #61 from max-schaefer/better-method-sets
...
Reformulate `Method.hasQualifiedName` in terms of method sets
2020-03-17 07:46:19 -04:00
Max Schaefer
8cadc94f49
Clarify behaviour of getMethod on struct types.
2020-03-17 10:58:58 +00:00
Max Schaefer
74bcfdd01c
Remove an unused and potentially confusing predicate.
2020-03-16 13:24:57 +00:00
Max Schaefer
0fc7febd1d
Add another test.
2020-03-13 15:54:39 +00:00
Max Schaefer
f41151350a
Merge pull request #60 from sauyon/bitwise-xor-fps
...
MistypedExponentiation: Add a heuristic to reduce FPs
2020-03-13 15:46:03 +00:00
Max Schaefer
8898858fff
Add tests.
2020-03-13 14:19:27 +00:00
Max Schaefer
5175f1dcbe
Take promoted methods into account when computing method sets.
2020-03-13 14:19:27 +00:00
Max Schaefer
d0c6206a6a
Reformulate hasQualifiedName in terms of method sets.
2020-03-13 14:19:27 +00:00
Sauyon Lee
78ad006e68
Merge pull request #55 from max-schaefer/tainted-arithmetic
...
Add new query `AllocationSizeOverflow`.
2020-03-13 07:16:54 -07:00
Max Schaefer
39fa6052e6
Also treat second argument to make (slice capacity) as an allocation size.
2020-03-13 12:17:53 +00:00
Max Schaefer
864c85e886
Fix typo.
2020-03-13 10:27:58 +00:00
Max Schaefer
b2f1da8942
Simplify a condition.
2020-03-13 10:27:58 +00:00
Max Schaefer
d66888e651
Make query more extensible.
2020-03-13 10:27:58 +00:00
Max Schaefer
ea36d49218
Add new query AllocationSizeOverflow.
2020-03-13 10:18:51 +00:00
Sauyon Lee
ea5e6a324d
Add change note
2020-03-13 03:10:55 -07:00
Sauyon Lee
630d0cef89
Address review comments
2020-03-12 09:13:52 -07:00
Sauyon Lee
6e681f829b
MistypedExponentiation: Add a heuristic to reduce FPs
2020-03-12 09:13:52 -07:00
Max Schaefer
2c751f2945
Merge pull request #58 from max-schaefer/desemmlify
...
Docs: Remove some Semmle references.
2020-03-12 16:05:48 +00:00
Sauyon Lee
b64a43f578
Merge pull request #57 from max-schaefer/trap.gz
...
Gzip TRAP files
2020-03-12 06:24:32 -07:00
Max Schaefer
270ae0926a
Docs: Remove some Semmle references.
2020-03-12 10:57:06 +00:00
Max Schaefer
6b0ba750e6
Put gzip writer on top of bufio writer.
2020-03-12 08:40:22 +00:00
Max Schaefer
d7d5447689
Merge pull request #46 from sauyon/force-extract-methods
...
Extract methods when they don't exist
2020-03-12 08:16:44 +00:00
Sauyon Lee
2e8958583b
Merge pull request #56 from max-schaefer/issue-66
...
Standardize experimental contribution
2020-03-11 14:18:35 -07:00
Max Schaefer
8901ba62e0
Gzip TRAP files.
2020-03-11 15:14:37 +00:00
Max Schaefer
8136ebbb91
Merge pull request #54 from sauyon/vendor-support
...
extractor: Use -mod=vendor when a vendor directory exists
2020-03-11 11:36:49 +00:00
Max Schaefer
b3022c9fc8
Standardise RangeAnalysis.qll.
...
This brings the library in line with our usual syntactic conventions regarding QLDoc and names. I've also made a few superficial simplifications here and there.
Overall, the code would benefit from being rewritten to make use of the data-flow graph, but that is a larger undertaking.
2020-03-11 11:20:59 +00:00
Max Schaefer
a95b9c8e02
Rename a few files and clean up wording.
2020-03-11 11:04:42 +00:00
Max Schaefer
2fd925fe90
Autoformat.
2020-03-11 10:47:23 +00:00
Sauyon Lee
5056b5f161
Apply review comments.
...
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-03-11 03:26:18 -07:00
Sauyon Lee
1f83aa4586
Add a -mod=vendor change note
2020-03-11 03:10:35 -07:00
Max Schaefer
f1d489f6f9
Merge pull request #51 from singleghost/master
...
Add integer overflow detection support for codeql-go.
2020-03-11 10:00:39 +00:00
Sauyon Lee
57b874e047
extractor: Only skip dependency installation when vendor folder is detected
2020-03-11 02:59:33 -07:00
Max Schaefer
a8c1731f9d
Merge pull request #50 from sauyon/uintptr
...
Make uintptrtype a subclass of unsignedintegertype
2020-03-11 09:57:00 +00:00
Sauyon Lee
ecd4c42428
extractor: Factor out method extraction
...
This fixes a subtle bug where the underlying interface type was used
as the receiver when constructing method labels, causing some database
inconsistencies.
2020-03-10 22:01:16 -07:00
Sauyon Lee
0daf8c1fa3
extractor: Extract methods when their labels don't exist
2020-03-10 20:36:49 -07:00
Sauyon Lee
ccae530508
extractor: minor refactoring to use variables
2020-03-10 20:36:13 -07:00
Sauyon Lee
0aa46becf9
extractor: Use -mod=vendor when a vendor directory exists
2020-03-10 16:44:03 -07:00
singleghost
2aa2f608a3
Move files related to integer overflow detection under the src/experimental folder
2020-03-10 19:02:05 +08:00
Max Schaefer
7ec7b17ce7
Merge pull request #53 from sauyon/close-files
...
extractor: Close files even when writes fail
2020-03-10 09:38:02 +00:00
Sauyon Lee
79ab831776
extractor: Close files even when writes fail
2020-03-10 00:52:33 -07:00
Sauyon Lee
cdf3bc4fa0
Merge pull request #52 from max-schaefer/issue-48
...
Improve taint-tracking through pointers and other fixes
2020-03-09 06:36:43 -07:00
Sauyon Lee
2428efcb6d
Make @uintptrtype a @unsignedintegertype
2020-03-09 04:40:02 -07:00
Sauyon Lee
5b81775670
Fix constant values test data
2020-03-09 04:40:01 -07:00
Max Schaefer
4dca00e99c
Merge pull request #45 from sauyon/go-mod-libs
...
Go.mod extraction libraries and tests
2020-03-09 09:40:41 +00:00
singleghost
77ec4c913f
Add integer overflow detection support for codeql-go.
...
I wrote a ql library which can perform range analysis on expression and
can detect whether an arithmetic operation may overflow. I wrote this library with reference to the `SimpleRangeAnalysis.qll` for C language. I hope this helps a little bit for those who want to detect integer overflow issues in code.
2020-03-07 21:34:38 +08:00
Sauyon Lee
2d879458ba
Merge pull request #49 from max-schaefer/more-function-outputs
...
Make `FunctionOutput` more useful
2020-03-06 09:41:40 -08:00
Max Schaefer
1be0cc57a8
Add test case from https://github.com/github/codeql-go/issues/48 .
2020-03-06 17:35:50 +00:00
Max Schaefer
bcb9ce2498
Add another test for StringBreak.
2020-03-06 17:35:50 +00:00
Max Schaefer
bf6865b96a
Add model of ioutil.ReadAll
2020-03-06 17:35:50 +00:00
Max Schaefer
f599243a34
Conflate references and referents more thoroughly in taint tracking.
2020-03-06 17:35:50 +00:00
Max Schaefer
aa8bc972d9
Address review comments.
2020-03-06 15:03:45 +00:00
Sauyon Lee
3d88032f81
Address review comments.
...
Co-authored-by: Max Schaefer <max-schaefer@github.com >
2020-03-06 06:51:30 -08:00
Sauyon Lee
43fbf47da3
Add a change note about go.mod extraction
2020-03-06 06:51:28 -08:00
Sauyon Lee
555b0a9527
Add a GoModFile class
2020-03-06 06:51:27 -08:00
Sauyon Lee
38596dddc0
Address review comments.
...
Co-authored-by: Max Schaefer <max-schaefer@github.com >
2020-03-06 06:51:26 -08:00
Sauyon Lee
34f34e2241
GoModExpr.qll: Rename getOffsetToken to GoModLine.getToken
...
Also add getRawToken to do what getToken did before, and fix up
documentation.
2020-03-06 06:51:25 -08:00
Sauyon Lee
4b9cc87c2e
Add test for replace line with versions
2020-03-06 06:51:24 -08:00
Sauyon Lee
25577a8108
Remove DependencyCustomizations
2020-03-06 06:51:24 -08:00
Sauyon Lee
78239accd5
Dependencies: Make getAnImport() more precise
...
In particular, ensure that the go file importing the dependency is under
the directory of the file where the dependency is declared.
Co-authored-by: Max Schaefer <max-schaefer@github.com >
2020-03-06 06:51:23 -08:00
Sauyon Lee
b27e63ba83
Address review comments
...
Co-authored-by: Max Schaefer <max-schaefer@github.com >
2020-03-06 06:51:22 -08:00
Sauyon Lee
dd3f98c549
extractor: Don't log directory being walked for go.mod files
2020-03-06 06:51:21 -08:00
Sauyon Lee
5911b7005a
Add tests for dependencies library
2020-03-06 06:51:20 -08:00
Sauyon Lee
dddc8cecd4
Add go.mod expression tests
2020-03-06 06:51:19 -08:00
Sauyon Lee
6c78490bbe
Add libraries modeling dependencies
2020-03-06 06:51:18 -08:00
Sauyon Lee
d92e49fb17
Add libraries for go.mod expressions
2020-03-06 06:51:17 -08:00
Max Schaefer
f875afca53
Merge pull request #47 from sauyon/use-bufio
...
Use bufio and don't sync FS
2020-03-06 10:59:30 +00:00
Max Schaefer
3a7910da5a
Introduce (un-)marshaling functions as a concept and instantiate it with the functions in encoding/json.
2020-03-06 10:07:54 +00:00
Max Schaefer
9bcbfb2911
Fix flow step from global functions to their use.
...
How does anything work.
2020-03-06 09:41:35 +00:00
Max Schaefer
a7ecb50a34
Add taint-tracking model for append.
2020-03-06 09:41:35 +00:00
Max Schaefer
4f061005cb
Add a taint-tracking model for copy.
2020-03-06 09:41:35 +00:00
Max Schaefer
3f8d2117d8
Introduce post-update nodes for arguments with a mutable type.
2020-03-06 09:41:35 +00:00
Max Schaefer
b99c63d180
Factor out an auxiliary predicate.
2020-03-06 09:41:35 +00:00
Max Schaefer
af2c7aae5d
Don't rely on flow through function models in definition of PostUpdateNode.
2020-03-06 09:41:35 +00:00
Max Schaefer
185d0910c3
Sharpen stringConcatStep to exclude addition.
2020-03-06 09:41:35 +00:00
Sauyon Lee
c027bbaadf
Use buffered writers
2020-03-05 21:12:15 -08:00
Sauyon Lee
14e758a6ea
HTTP: Add model for Header.Values()
2020-03-05 13:44:16 -08:00
Sauyon Lee
c243bb4243
Add tests for go1.14 overlapping embedded methods
2020-03-05 13:44:15 -08:00
Sauyon Lee
85c8893f57
Action: Use go 1.14
2020-03-05 13:44:14 -08:00
Sauyon Lee
a758ececd9
go.mod: Use go 1.14 and update dependencies
2020-03-05 13:44:11 -08:00
Max Schaefer
b8338896be
Merge pull request #33 from sauyon/extract-go-mod
...
Add extraction for go.mod files
2020-03-05 09:38:21 +00:00
Sauyon Lee
f2358a0a86
Find all go.mod files before extraction
2020-03-04 16:08:55 -08:00
Sauyon Lee
cca762dbc0
gomodextractor.go: Emit pseudo comment groups to table
2020-03-04 06:26:44 -08:00
Sauyon Lee
e75497ed3b
update stats sha and stats
2020-03-04 06:26:43 -08:00
Sauyon Lee
db4efd6124
Add support for extracting go.mod files
2020-03-04 06:26:42 -08:00
Sauyon Lee
89caafb0e1
labels.go: Make label generation slightly more uniform
2020-03-04 06:21:20 -08:00
Sauyon Lee
70e916376c
labels.go: Make LocalID more generic
2020-03-04 06:21:19 -08:00
Sauyon Lee
a403d60acc
Add go mod dependency
...
Also update tools dependency to latest master
2020-03-04 06:21:18 -08:00
Sauyon Lee
66a3d40348
Fix typos in tables.go
2020-03-04 06:21:17 -08:00
Sauyon Lee
d694d59757
Merge pull request #44 from max-schaefer/remove-uniqueness
...
Remove a mistaken uniqueness annotation.
2020-03-04 06:20:58 -08:00
Max Schaefer
1ae0dd46ec
Clarify method identity.
2020-03-04 12:53:37 +00:00
Max Schaefer
6a3730ead2
Merge pull request #43 from sauyon/phony-testdb
...
Makefile: make testdb target phony
2020-03-04 12:08:09 +00:00
Sauyon Lee
c3b57e4e74
Makefile: make testdb target phony
2020-03-04 03:27:11 -08:00
Max Schaefer
264478f4b8
Remove a mistaken uniqueness annotation.
2020-03-04 10:34:55 +00:00
Sauyon Lee
5e71a04fdf
Merge pull request #42 from max-schaefer/experimental-guidelines
...
Add guidelines for experimental CodeQL queries and libraries.
2020-03-02 10:22:41 -08:00
Sauyon Lee
2dc42b8814
Merge pull request #41 from max-schaefer/interface-embedding
...
Fix `NamedType.getMethod` to take interface embedding into account.
2020-03-02 10:21:24 -08:00
Max Schaefer
56e07356fc
Update ql/test/experimental/README.md
...
Co-Authored-By: Felicity Chapman <felicitymay@github.com >
2020-03-02 10:20:07 +00:00
Max Schaefer
cef017071f
Move guidelines into ql folder.
2020-03-02 09:23:06 +00:00
Max Schaefer
2629f55d95
Add guidelines for experimental CodeQL queries and libraries.
2020-02-28 14:43:00 +00:00
Max Schaefer
90f1a7da75
Fix NamedType.getMethod to take interface embedding into account.
2020-02-28 10:37:14 +00:00
Max Schaefer
2eba7dee6f
Add new table methodhosts associating interface methods with named types.
...
In particular, methods from embedded interfaces will be associated with the same named type as those from the outer interface, even though their receiver types may be different.
2020-02-28 10:24:04 +00:00
Max Schaefer
6dfd5fd934
Extend Types tests to cover interfaces.
2020-02-28 10:22:59 +00:00
Sauyon Lee
545379c050
Merge pull request #40 from max-schaefer/phonify-extractor
...
Make extractor targets phony.
2020-02-27 09:53:27 -08:00
Max Schaefer
7148b66d31
Make extractor targets phony.
2020-02-27 12:32:05 +00:00
Max Schaefer
a52e33ecc0
Merge pull request #38 from sauyon/use-text
...
.gitattributes: Use -text instead of binary
2020-02-27 08:27:31 +00:00
Sauyon Lee
8e909a49e9
.gitattributes: Use -text instead of binary
...
Also only add attributes to go files under the ql directory
2020-02-27 00:23:56 -08:00
Sauyon Lee
fe4003fc69
Merge pull request #37 from max-schaefer/clarify-field-identity
...
Clarify field identity
2020-02-26 11:49:29 -08:00
Max Schaefer
9bf5a31351
Clarify field identity.
...
Like-named fields declared in identical types are identical. This can be a little confusing, since such fields will have multiple declarations and multiple locations, so it's worth calling out explicitly in the documentation.
2020-02-26 10:10:47 +00:00
Sauyon Lee
b931539f68
Merge pull request #36 from max-schaefer/remove-unused-predicate
...
Remove an unused predicate.
2020-02-25 09:40:42 -08:00
Max Schaefer
34c66c4245
Remove an unused predicate.
2020-02-25 10:46:09 +00:00
Sauyon Lee
7a918efbf8
Merge pull request #34 from max-schaefer/receiver-flow
...
Propagate data flow through receivers
2020-02-24 23:58:28 -08:00
Sauyon Lee
836146a3bf
Merge pull request #35 from max-schaefer/field-package
...
Make `Field.getPackage()` behave sensibly.
2020-02-24 23:52:02 -08:00
Max Schaefer
0f99842f34
Make Field.getPackage() behave sensibly.
...
Previously it was never defined, now it gives you the package of the type the field is declared in. This means we have to override `Field.hasQualifiedName/2` to avoid a field `f` in a package `pkg` being considered to have qualified name `pkg.f`.
2020-02-24 12:14:51 +00:00
Max Schaefer
5fbae15d0e
Don't track receivers into virtual calls.
2020-02-24 09:56:09 +00:00
Max Schaefer
d1e020f74d
Treat receiver variables as parameters.
...
The inter-procedural data-flow libraries expects this to be the case, but I actually never got round to implementing it.
2020-02-24 09:56:09 +00:00
Max Schaefer
77613a38c5
Add test, which does not work yet.
2020-02-24 09:55:42 +00:00
Sauyon Lee
4d58ebbae6
Merge pull request #32 from max-schaefer/update-data-flow
...
Port recent data-flow improvements
2020-02-21 09:45:14 -08:00
Sauyon Lee
bfbd08c51d
Merge pull request #31 from max-schaefer/string-break-source
...
Sharpen the sources for `StringBreak`.
2020-02-21 09:35:58 -08:00
Max Schaefer
6251f1141c
Simplify getACallee().
2020-02-21 11:14:35 +00:00
Max Schaefer
285f392a12
Sharpen the sources for StringBreak.
...
`json.Marshal` returns two results, we only want to consider the first one as a source.
2020-02-21 10:19:09 +00:00
Max Schaefer
7230912e56
Track simple call contexts in nodeCand[Fwd]1.
...
See https://github.com/Semmle/ql/pull/2822 .
2020-02-21 09:30:53 +00:00
Max Schaefer
90cdf4857f
Improve join-order in pathStep predicate.
...
See https://github.com/Semmle/ql/pull/2872 .
2020-02-21 09:29:13 +00:00
Max Schaefer
e9447a0e16
Merge pull request #29 from max-schaefer/fix-missing-qldoc
...
Add missing QLDoc for public elements.
2020-02-21 08:11:27 +00:00
Max Schaefer
6375be7089
Address review comment.
2020-02-20 20:36:58 +00:00
Max Schaefer
044def4e1f
Merge pull request #243 from sauyon/incomplete-hostname-fix
...
IncompleteHostnameRegexp: Use a reluctant regexp
2020-02-20 20:33:56 +00:00
Sauyon Lee
b851fe0c05
Merge pull request #30 from max-schaefer/build_command-override
...
Ensure `LGTM_INDEX_BUILD_COMMAND` takes precedence over build-command guessing.
2020-02-20 12:25:03 -08:00
Max Schaefer
dc6a8917a4
Add missing QLDoc for public elements.
2020-02-20 13:59:12 +00:00
Max Schaefer
d7e6c59fab
Merge pull request #28 from sauyon/test-fixes
...
Add Action for testing using the CodeQL CLI
2020-02-20 09:50:30 +00:00
Max Schaefer
bdf757b8ac
Ensure LGTM_INDEX_BUILD_COMMAND takes precedence over build-command guessing.
2020-02-20 08:59:56 +00:00
Sauyon Lee
3e6a96d21b
IncompleteHostnameRegexp: Use a reluctant regexp
...
This should help make results more comprehensible by including the
maximal string after an unescaped dot.
2020-02-19 13:04:16 -08:00
Sauyon Lee
6b51fefb1e
Add Action for testing using the CodeQL CLI
2020-02-19 12:23:03 -08:00
Sauyon Lee
1e56ffbf90
Remove test actions
2020-02-19 11:29:33 -08:00
Sauyon Lee
1b7186347d
Merge pull request #25 from max-schaefer/library-overview
...
Add library overview
2020-02-19 01:39:14 -08:00
Max Schaefer
4b371ac85a
Remove rogue full stop.
2020-02-19 08:14:15 +00:00
Max Schaefer
2764b70364
Data flow: generalize flow-through summaries.
2020-02-18 14:30:25 +00:00
Max Schaefer
31557e8c19
Rename ArrowExpr to RecvExpr and address further review comments.
2020-02-18 08:39:31 +00:00
Max Schaefer
c47f9da0f9
Merge pull request #241 from shati/cookbook-changenotes
...
Mention Go cookbook queries in 1.24 change notes
2020-02-17 15:39:16 +00:00
Shati Patel
6b0f8a4088
Mention cookbook queries in 1.24 changenotes
2020-02-17 14:38:46 +00:00
Max Schaefer
d3288f19f9
Improve data-flow performance.
2020-02-17 09:49:13 +00:00
Max Schaefer
ec9ba8aa7f
Address review comments.
2020-02-17 09:23:08 +00:00
Max Schaefer
f60b5daf94
Apply suggestions from code review
...
Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com >
Co-Authored-By: Sauyon Lee <sauyon@github.com >
2020-02-17 08:48:16 +00:00
Max Schaefer
65c116538c
Write library overview.
2020-02-14 12:50:04 +00:00
Max Schaefer
9379f74308
Merge pull request #24 from sauyon/runelit
...
Add a RuneLit alias for CharLit
2020-02-13 09:07:38 +00:00
Max Schaefer
c7d29311e6
Merge pull request #232 from sauyon/makefile-improvements
...
Makefile improvements
2020-02-13 08:51:51 +00:00
Max Schaefer
69eae987d1
Merge pull request #240 from sauyon/rune-literal-string-value
...
Make rune literal string value its value
2020-02-13 08:47:56 +00:00
Sauyon Lee
ed3971af47
Makefile: make tools-ARCH no longer build the tokenizer
2020-02-12 15:52:43 -08:00
Sauyon Lee
bf2b655586
Makefile: make all target build extractor instead of tools
2020-02-12 15:52:42 -08:00
Sauyon Lee
dc9d790bd3
Makefile: Make better use of built-in variables
2020-02-12 15:52:42 -08:00
Sauyon Lee
1262935085
Update stats
2020-02-12 15:52:41 -08:00
Sauyon Lee
01f4bfe4b8
Makefile: Use codeql to create stats database
2020-02-12 15:52:40 -08:00
Sauyon Lee
92025ad9bd
Add a RuneLit alias for CharLit
...
Also change the doc comment on CharLit to RuneLit
2020-02-12 15:17:14 -08:00
Sauyon Lee
eb990c9de7
BadRedirectCheck: Use new rune literal string values
2020-02-12 15:14:59 -08:00
Sauyon Lee
74bb4f707d
Make rune literal string value its value
2020-02-12 15:14:58 -08:00
Max Schaefer
cb1d2935d4
Merge pull request #23 from github/sauyon-actions-1
...
Implement Actions CI
2020-02-12 20:41:59 +00:00
Sauyon Lee
1365da2224
examples/variable: Select declaration as well as the variable
...
This makes the test platform-independent
2020-02-12 10:41:58 -08:00
Sauyon Lee
fdb7852cf6
Force git not to mangle line endings for files relevant to tests
2020-02-10 16:11:56 -08:00
Sauyon Lee
22029410f0
Create an action workflow for CodeQL tests
2020-02-10 16:11:55 -08:00
Sauyon Lee
ae96bd88bc
Merge pull request #239 from max/virtual-dispatch
...
Call-graph API cleanup
2020-02-10 15:05:13 -08:00
Max Schaefer
acd27cdee6
Merge pull request #238 from sauyon/semmle-to-github
...
Rename the go module to github.com/github/codeql-go
2020-02-10 21:02:05 +00:00
Max Schaefer
6aa0d631dd
Address review comments.
2020-02-10 20:59:13 +00:00
Sauyon Lee
677ed6ebf4
Fix tests to use codeql-go repository name
2020-02-10 11:00:01 -08:00
Sauyon Lee
5417102c37
Rename the go module to github.com/github/codeql-go
2020-02-10 11:00:00 -08:00
Max Schaefer
d6f3005e0e
Merge branch '235-head'
2020-02-07 20:12:47 +00:00
Max Schaefer
5571f1eac7
Rename Comparison to ComparisonExpr.
2020-02-07 16:24:42 +00:00
Max Schaefer
ad7dfa258c
Rename ParenExpr.getExpression() to getExpr() for consistency with similar predicates in other classes.
2020-02-07 16:24:42 +00:00
Sauyon Lee
1a21c14f2f
Remove build ignore from HardcodedCredentials example
2020-02-07 03:13:14 -08:00
Sauyon Lee
e4d228fa0f
Fix CleartextStorage tests
2020-02-07 03:13:13 -08:00
Sauyon Lee
6300fdf85e
Remove accidentally added CleartextStorage tests
2020-02-07 03:13:12 -08:00
Sauyon Lee
559ac8f0d2
Fix squirrel test build
2020-02-07 03:12:19 -08:00
Max Schaefer
72de4728a2
Suppress unhelpful magic.
2020-02-07 11:09:33 +00:00
Max Schaefer
69edfe08df
Make regular expression for format strings more precise.
2020-02-07 11:05:44 +00:00
Max Schaefer
8b0d271717
Locally resolve calls to function expressions.
2020-02-07 11:05:44 +00:00
Max Schaefer
f6305f019d
Minor refactoring.
2020-02-07 11:05:44 +00:00
Max Schaefer
46a8f8c8ed
Remove Function.getACallExpr.
2020-02-07 11:05:44 +00:00
Max Schaefer
39b7272241
Teach Function.getACall to take virtual dispatch into account.
2020-02-07 11:05:44 +00:00
Max Schaefer
84002f585e
Remove CallExpr.getACallee().
2020-02-07 11:05:44 +00:00
Max Schaefer
cf0e38b22c
Move virtual dispatch resolution from CallExpr to CallNode and generalise it very slightly.
2020-02-07 11:05:44 +00:00
Max Schaefer
253a394ae0
Make CallNode.getCalleeName() more robust to missing type information.
2020-02-07 11:05:44 +00:00
Max Schaefer
93a84684a5
Remove predicate CallExpr.calls.
...
This sort of reasoning should be done at the data-flow level.
2020-02-07 11:05:44 +00:00
Max Schaefer
9400442bea
Add call graph test.
...
This test uses annotations to encode the expected output directly into the source, hence the `.expected` files are trivial.
2020-02-07 11:05:41 +00:00
Sauyon Lee
5dbebe44f5
Package tests: also select raw database path
2020-02-07 02:25:26 -08:00
Sauyon Lee
2cb61911c3
Package tests: Limit to specific packages
2020-02-07 02:23:28 -08:00
Sauyon Lee
9a9561bb12
Remove vendored path prefix of vendored packages
2020-02-07 02:17:54 -08:00
Sauyon Lee
c94f5dafb3
Merge pull request #237 from Semmle/go-build-env-windows
...
Fix extractor build on Windows.
2020-02-06 09:06:33 -08:00
Max Schaefer
d18eb9717a
Fix environment setup on Windows.
2020-02-06 14:28:16 +00:00
Max Schaefer
61ee9a45ca
Merge pull request #234 from sauyon/reflectedxss-fixes
...
ReflectedXss: Remove FPs from constant prefix Fprintfs
2020-02-06 09:22:44 +00:00
Sauyon Lee
39f5376eed
ReflectedXss: Add change note for Fprintf FPs
2020-02-05 19:07:42 -08:00
Sauyon Lee
0dca13a5d9
Address review comments
2020-02-04 11:13:41 -08:00
Sauyon Lee
87865afa42
ReflectedXss: Remove FPs from constant prefix Fprintfs
2020-02-03 16:00:33 -08:00
Sauyon Lee
3c88eab84c
Merge pull request #229 from max/string-break
...
Add query to find unsafe quoting
2020-02-03 09:47:36 -08:00
Max Schaefer
af3d91ffd3
Add query StringBreak.
2020-02-03 09:01:40 +00:00
Max Schaefer
63ca382a0c
Reorganise modelling of string concatenation.
2020-02-03 09:01:40 +00:00
Sauyon Lee
da2924251b
Merge pull request #230 from max/remove-deprecated-flow-predicates
...
Remove deprecated flow predicates.
2020-01-30 11:29:05 -08:00
Max Schaefer
3afce956ab
Remove deprecated flow predicates.
2020-01-30 11:45:19 +00:00
Max Schaefer
69a91b537f
Add change note for autobuilder changes
...
https://git.semmle.com/Semmle/go/pull/210 did not include a change note.
2020-01-30 11:36:23 +00:00
Max Schaefer
ef60f1cbf7
Merge pull request #210 from sauyon/autobuilder-run-make
...
autobuilder: run build if relevant files exist
2020-01-29 16:32:43 +00:00
Max Schaefer
8bb769b4f9
Merge pull request #228 from sauyon/codeql-test
...
Makefile: Make extractor-common extractor target
2020-01-29 09:23:53 +00:00
Max Schaefer
be183596c8
Merge pull request #211 from sauyon/open-redirect-fps
...
OpenUrlRedirect: resolve some FPs
2020-01-29 09:18:07 +00:00
Sauyon Lee
7676a56af6
Makefile: Make extractor-common extractor target
2020-01-28 14:38:15 -08:00
Sauyon Lee
41d04f3d96
Revert "Add DataFlow2"
...
This reverts commit 6a0203f33303847d9e7006ca67b1dba31428748b.
2020-01-28 13:01:37 -08:00
Sauyon Lee
478f906d7a
HTTP: Use Field.getQualifiedName in UserControlledRequestField
...
Also autoformat.
2020-01-28 13:01:36 -08:00
Sauyon Lee
d2e5322b94
Apply review comments
2020-01-28 13:01:35 -08:00
Sauyon Lee
3eee780fdd
TaintTracking: minor functionNodeStep call improvement
...
Co-Authored-By: Max Schaefer <max@semmle.com >
2020-01-28 13:01:34 -08:00
Sauyon Lee
9af436566f
OpenUrlRedirect: Use a data-flow configuration to track whole URLs
2020-01-28 13:01:33 -08:00
Sauyon Lee
a2b5bb85ab
OpenUrlRedirect: Fix test compilation
2020-01-28 13:01:19 -08:00
Sauyon Lee
e17f548780
Add DataFlow2
2020-01-28 12:59:47 -08:00
Sauyon Lee
30d2fb0b7f
TaintTracking: Make functionModelStep take a FunctionModel
...
This makes using only some function models easier.
2020-01-28 12:59:46 -08:00
Sauyon Lee
260b33be7e
OpenUrlRedirect: Add untrusted methods
...
Also use more up-to-date data-flow APIs
2020-01-28 12:59:45 -08:00
Sauyon Lee
abfdd7ee1e
OpenUrlRedirect: make functions like isValidRedirect barrier guards
2020-01-28 12:59:44 -08:00
Sauyon Lee
82635a46ad
OpenUrlRedirect: only make some parts of the URL untrusted
2020-01-28 12:59:43 -08:00
Max Schaefer
2b92cd5ba5
Merge pull request #209 from sauyon/bad-redirect-sanitiser
...
Bad redirect sanitiser
2020-01-28 20:11:46 +00:00
Sauyon Lee
aa33595b0f
Address review comments
2020-01-28 08:26:37 -08:00
Sauyon Lee
497bfeee83
BadRedirectSanitizer: Use SsaWithFields instead of ValueEntity
2020-01-27 17:33:54 -08:00
Sauyon Lee
f897f68ead
SsaWithFilds: Add a getQualifiedName predicate
2020-01-27 17:33:53 -08:00
Sauyon Lee
a31ad88fc9
BadRedirectSanitizer: Transition to using data-flow API
2020-01-27 17:33:53 -08:00
Sauyon Lee
abc9438cd3
Apply suggestions from code review
...
Co-Authored-By: Max Schaefer <max@semmle.com >
2020-01-27 17:33:52 -08:00
Sauyon Lee
3a73658a9c
BadRedirectSanitizer: Bind e to hp
...
Address doc review comments
2020-01-27 17:33:51 -08:00
Sauyon Lee
aa28724f7c
Add BadRedirectCheck query
2020-01-27 17:33:50 -08:00
Sauyon Lee
9c6aa80718
Move OpenUrlRedirect tests into their own directory
2020-01-27 17:33:49 -08:00
Sauyon Lee
c889cb3501
Add getAnOperand to OperatorExpr
2020-01-27 17:33:48 -08:00
Sauyon Lee
edecb4e128
Merge pull request #227 from max/redundant-expr-bug
...
Fix hash-consing of literals
2020-01-27 11:35:40 -08:00
Max Schaefer
3c1a68ee8f
Fix hash-consing of literals.
...
We shouldn't rely on the literal value given in the `literals` table, but use the exact value (where available) instead.
2020-01-27 12:05:48 +00:00
Sauyon Lee
496ad5d051
Merge pull request #226 from max/fix-classify-files-regex
...
Fix regex in ClassifyFiles.
2020-01-24 21:01:01 -08:00
Sauyon Lee
6e4880bc53
Merge pull request #220 from max/example-queries
...
Add example queries
2020-01-24 09:42:31 -08:00
Max Schaefer
d293388172
Add failing test case for RedundantExpr.
2020-01-24 16:20:08 +00:00
Max Schaefer
77b86150d6
Fix regex in ClassifyFiles.
...
`Comment.getText()` does not include the delimiter.
2020-01-24 14:05:13 +00:00
Max Schaefer
c30b1d98ea
Address review comments.
2020-01-24 10:26:59 +00:00
Max Schaefer
ebea811a83
Add example queries.
2020-01-24 10:26:59 +00:00
Max Schaefer
9507a22f48
Merge pull request #213 from sauyon/codeql-test
...
Use codeql for testing and add binary cross compilation support
2020-01-24 09:40:47 +00:00
Sauyon Lee
2bd88d5b61
Merge pull request #225 from max/impossible-interface-nil-check-robustness
...
Make ImpossibleInterfaceNilCheck more robust.
2020-01-23 16:06:03 -08:00
Sauyon Lee
3a53269a52
Merge pull request #223 from max/update-dataflow
...
Add support for taint-getter/setter summaries in data flow.
2020-01-23 16:03:05 -08:00
Sauyon Lee
a6a8375ae5
Merge pull request #224 from max/make-implicit-deref-explicit
...
Make implicit dereferences explicit
2020-01-23 00:50:18 -08:00
Max Schaefer
47104a3db8
Add explanatory comment.
2020-01-23 08:14:57 +00:00
Max Schaefer
5895c6ac69
Fix typo.
...
Co-Authored-By: Sauyon Lee <sauyon@github.com >
2020-01-23 08:10:20 +00:00
Sauyon Lee
fe23f88468
Merge pull request #221 from max/cleanup
...
Minor fixes
2020-01-22 00:52:58 -08:00
Max Schaefer
fe56c207a3
Make ImpossibleInterfaceNilCheck more robust.
...
It no longer flags alerts that may be simply caused by missing type information.
2020-01-21 10:04:57 +00:00
Max Schaefer
d78ba06a8d
Add change note.
2020-01-21 09:56:59 +00:00
Max Schaefer
baeae0f69c
Add a few variants to test.
2020-01-21 09:56:59 +00:00
Max Schaefer
6671b61fd3
Model panic from out-of-bounds index expression.
2020-01-21 09:56:59 +00:00
Max Schaefer
f42a2b060c
Take implicit dereferences in index and slice expressions into account as well.
2020-01-21 09:56:59 +00:00
Max Schaefer
a4f5ad7412
Refactor implementation of SliceNode.
2020-01-21 09:56:59 +00:00
Max Schaefer
44b9bcf7a1
Autoformat.
2020-01-21 09:56:59 +00:00
Max Schaefer
64049d8f3d
Make taint tracking less syntactic.
2020-01-21 09:56:59 +00:00
Max Schaefer
9f897132f2
Update HTTP library.
2020-01-21 09:56:59 +00:00
Max Schaefer
a2879dc754
Model implicit dereferences in data flow.
2020-01-21 09:56:59 +00:00
Max Schaefer
ba9d2fb2eb
Add IR instructions to model implicit pointer dereferences.
2020-01-21 09:56:59 +00:00
Max Schaefer
efc5f10f07
Streamline definition of UserControlledRequestField.
2020-01-21 09:56:59 +00:00
Max Schaefer
39b28a4969
Make CallNode.getReceiver() less syntactic.
2020-01-21 09:56:59 +00:00
Max Schaefer
ef964632be
Remove CallExpr.getQualifier() and its single, pointless, use.
2020-01-21 09:56:59 +00:00
Max Schaefer
8fc414b93f
Autoformat.
2020-01-21 09:56:59 +00:00
Max Schaefer
1d33a619d9
Add failing test case.
2020-01-20 20:46:12 +00:00
Max Schaefer
5eb95c7895
Add support for taint-getter/setter summaries in data flow.
2020-01-20 11:29:12 +00:00
Sauyon Lee
32fa033a55
Makefile: Add exe suffix back to tools/bin targets
2020-01-17 14:05:29 -08:00
Sauyon Lee
52fe0afa48
Makefile: Delete entire test db in clean
2020-01-17 14:05:27 -08:00
Sauyon Lee
1eb9466de2
Use codeql for testing and add binary cross compilation support
...
Also add support for building the extractor inside this repository
so that users can build and use the extractor, and an up-to-date
version can be used for testing.
2020-01-17 14:05:26 -08:00
Sauyon Lee
471d843025
Merge pull request #222 from max/switch-guard-nodes
...
Switch guard nodes
2020-01-17 21:44:59 +00:00
Sauyon Lee
4e5fd46bc6
autobuilder: Close stdin of subprocesses
...
This fixes issues where build programs were prompting for input,
causing the build to hang indefinitely.
2020-01-17 12:43:07 -08:00
Sauyon Lee
53e5ebba20
autobuilder: Run build tools if relevant files exist
2020-01-17 12:43:06 -08:00
Sauyon Lee
c76684851f
autobuilder: run make if Makefile exists
2020-01-17 12:43:05 -08:00
Sauyon Lee
2d97b396b7
Merge pull request #20 from github/sort-change-notes
...
Sort lines in change notes.
2020-01-17 09:01:46 -08:00
Max Schaefer
08ba795565
Sort lines in change notes.
2020-01-17 15:46:50 +00:00
Max Schaefer
d8b97afcab
Implement Field.hasQualifiedName.
2020-01-17 13:16:35 +00:00
Max Schaefer
e5e6f73081
Make Field extend Variable.
2020-01-17 13:15:43 +00:00
Max Schaefer
4ee8f08bf5
Adjust Location.toString() to match what other parts of the toolchain print.
2020-01-17 13:08:43 +00:00
Max Schaefer
2558e67c2b
Give entities a location.
2020-01-17 13:08:43 +00:00
Max Schaefer
24f9fce7a1
Rename MkCaseNode as suggested.
2020-01-17 10:32:39 +00:00
Max Schaefer
e86201829e
Add an explanatory comment.
2020-01-17 10:27:36 +00:00
Max Schaefer
98c7c4a255
Autoformat.
2020-01-17 10:25:10 +00:00
Sauyon Lee
aa9489ea28
Merge pull request #218 from max/field-refs
...
Fix handling of references to fields and methods
2020-01-16 14:26:55 -08:00
Sauyon Lee
7040b76cf6
Merge pull request #219 from max/new-env-vars
...
Teach extractor about CodeQL environment variables.
2020-01-15 11:37:26 -08:00
Max Schaefer
1ad90b6739
Teach extractor about CodeQL environment variables.
2020-01-15 14:01:30 +00:00
Max Schaefer
ad432965db
Remove DeclaredEntity.getDecl().
...
It's not particularly useful except for functions, and the name is easy to confuse with `Entity.getDeclaration()`. Instead we now have `getFuncDecl()` just for functions, and a bit more API on `Function` to avoid its use where possible.
2020-01-15 13:14:06 +00:00
Max Schaefer
b7a830593d
Correctly create extract nodes for returns where we cannot infer the type of the returned expression, but know from context that it must be a tuple type.
2020-01-15 10:22:29 +00:00
Max Schaefer
86708f7867
Merge pull request #212 from sauyon/dependency-update
...
Dependency update
2020-01-15 09:18:14 +00:00
Sauyon Lee
f32a785127
Merge pull request #217 from max/issue-24
...
Switch RedundantExpr query back to using AST instead of global value numbering.
2020-01-14 13:05:44 -08:00
Max Schaefer
3d508d44e7
Fix global value numbering.
2020-01-14 20:44:13 +00:00
Max Schaefer
2fdd45255c
Add two new tests.
2020-01-14 17:06:42 +00:00
Max Schaefer
61976d8dea
Fix code that does not account for the fact that Field is a subtype of ValueEntity.
2020-01-14 15:52:48 +00:00
Max Schaefer
0c254f8cd1
Fix a typo.
2020-01-14 15:35:18 +00:00
Max Schaefer
c96cebb022
Make reads(ValueEntity) and writes(ValueEntity) work for fields.
2020-01-14 15:35:18 +00:00
Sauyon Lee
1125c1ac41
Merge pull request #216 from Semmle/add-sql-tx-support
...
Add tests for https://github.com/github/codeql-go/pull/15
2020-01-14 01:55:29 -08:00
Max Schaefer
efc72fa01a
Remove Entity.getAUse() and replace uses with getAReference().
...
The former had result type `Ident`, so it wouldn't pick up references to methods and fields. Apart from that, it is subsumed by the latter anyway.
2020-01-14 07:15:43 +00:00
Max Schaefer
d339d55faa
Merge pull request #15 from RicterZ/add-sql-tx-support
...
Add sql.Tx.Exec/Query... support
2020-01-13 08:38:32 +00:00
Max Schaefer
d55ebd731d
Autoformat.
2020-01-13 08:37:32 +00:00
Max Schaefer
36c620d1dd
Add tests and change note.
2020-01-13 08:37:01 +00:00
Ricter Zheng
a6e0dcaefc
Add sql.Tx.Exec/Query... support
...
Ref: https://golang.org/pkg/database/sql/#Tx.ExecContext
2020-01-13 15:17:55 +08:00
Sauyon Lee
00dd464697
Update stats
2020-01-10 19:27:47 -08:00
Sauyon Lee
f01ef40af3
Update golang.org/x/tools dependency
2020-01-10 19:27:46 -08:00
Sauyon Lee
5985559161
Merge pull request #214 from max/issue-26
...
Model `Header.Get` as a source of untrusted input.
2020-01-10 19:26:43 -08:00
Max Schaefer
384d21b0e9
Switch RedundantExpr query back to using AST instead of global value numbers.
...
Most current alerts (https://lgtm.com/rules/1510380685982/alerts/ ), while technically correct, are likely intentional and harmless. This change keeps only the interesting ones: https://lgtm.com/query/2999122885894714237
2020-01-10 14:46:54 +00:00
Max Schaefer
c60ddb0f7c
Model Header.Get as a source of untrusted input.
2020-01-10 12:29:18 +00:00
Max Schaefer
1cafec56ad
Add condition guard nodes for some switch statements.
...
We now create condition guard nodes for `cond1` and `cond2` in
```
switch {
case cond1:
s1
case cond2:
s2
default:
s3
}
```
to record the fact that `cond1` is known to be true at `s1` and false at `cond2`, and that `cond2` is known to be true at `s2` and false at `default`.
2020-01-10 10:37:51 +00:00
Max Schaefer
e7514bf133
Add new test cases for CFG construction.
2020-01-09 17:20:39 +00:00
Sauyon Lee
3ab68cb624
Merge pull request #208 from max/incomplete-url-scheme-check
...
Add `IncompleteUrlSchemeCheck` query
2020-01-08 00:50:58 -08:00
Max Schaefer
3d7046e38c
Apply suggestions from code review
...
Co-Authored-By: Shati Patel <shati@semmle.com >
2020-01-07 20:07:44 +00:00
Max Schaefer
0d2fe473d7
Add IncompleteUrlSchemeCheck query.
2020-01-07 14:46:49 +00:00
Max Schaefer
9cff56b975
Rename StringConcatenation.qll to StringOps.qll and add HasPrefix class.
2020-01-07 14:46:49 +00:00
Max Schaefer
aeb9840144
Add SliceNode class.
2020-01-06 15:36:54 +00:00
Sauyon Lee
db40535b70
Merge pull request #207 from max/uber-fixes
...
Various library improvements
2020-01-03 17:18:49 -08:00
Max Schaefer
638fe07da0
Move getReceiver from MethodCallNode to CallNode.
2020-01-03 14:14:18 +00:00
Max Schaefer
bb4052a574
Generalise result type of getACallee.
2020-01-03 14:14:18 +00:00
Max Schaefer
59498f53f0
Move FuncDec.getACall into FuncDecl.
...
Also changes the result from a `CallExpr` to a `CallNode` for consistency with `Function.getACall`.
2020-01-03 14:13:38 +00:00
Sauyon Lee
0a39124223
Merge pull request #206 from max/generalise-alert-suppression
...
Alert suppression through single-line /* */ style comments.
2020-01-02 11:47:44 -08:00
Max Schaefer
6f82310a9e
Alert suppression through single-line /* */ style comments.
2020-01-02 14:34:11 +00:00
Sauyon Lee
9fd7db7e43
Merge pull request #205 from max/trap-writer-long-strings
...
Teach TRAP writer to truncate strings longer than 1MiB.
2019-12-27 11:35:34 -08:00
Max Schaefer
121c940ace
Teach TRAP writer to truncate strings longer than 1MiB.
...
The evaluator cannot in general handle strings that are longer than 1MiB when UTF8-encoded. Similar to other extractors, we now truncate such strings to fit within the size limit.
2019-12-18 14:18:56 +00:00
Max Schaefer
1df3585c92
Merge pull request #204 from Semmle/rc/1.23
...
Merge rc/1.23 into master
2019-12-11 10:28:00 +00:00
Sauyon Lee
d3bf87d0f5
Merge pull request #203 from max/quieten-hard-coded-cred
...
Make HardcodedCredentials query less noisy.
2019-12-10 16:43:15 -08:00
Max Schaefer
75d78b3f62
Reduce precision of HardcodedCredentials to "medium".
2019-12-10 16:12:48 +00:00
Max Schaefer
46c4670796
Make HardcodedCredentials query less noisy.
...
Considering "cert" and "account" to be sensitive leads to a massive number of false positives, especially on cockroach and kubernetes.
2019-12-10 14:14:36 +00:00
Max Schaefer
7894eb3a60
Merge pull request #202 from sauyon/incomplete-hostname-fix
...
IncompleteHostname: disallow unescaped dot before TLD
2019-12-10 08:17:32 +00:00
Sauyon Lee
10907c8b04
IncompleteHostnameRegexp: disallow unescaped dot before TLD
2019-12-09 08:47:17 -08:00
Max Schaefer
7876c37998
Merge pull request #14 from henrymercer/fix-contributing-link
...
Fix Code of Conduct link in CONTRIBUTING.md
2019-12-09 12:55:33 +00:00
Henry Mercer
3c08314782
Fix Code of Conduct link in CONTRIBUTING.md
2019-12-09 12:42:46 +00:00
Sauyon Lee
bc8974d32d
Merge pull request #201 from max/update-data-flow
...
Update data flow and taint-tracking libraries
2019-12-06 18:26:27 -08:00
Sauyon Lee
34d619038b
Merge pull request #200 from Semmle/codeql-test
...
Adapt Go tests to `codeql test`
2019-12-06 10:34:59 -08:00
Henning Makholm
7bc68c4302
Adapt Go tests to codeql test
...
These changes make the tests work with the coming `codeql test` support.
The `queries.xml` file defines which extractor the `codeql test`
runner will use to extract databases for the tests. In the future one
will be able to write this information in `qlpack.yml`, but we can't
do that immediately because the _existing_ CodeQL tooling would refuse
to parse a `qlpack.yml` that has the new field in it.
2019-12-06 18:27:47 +01:00
Max Schaefer
62a50bac2a
Update taint-tracking libraries.
...
This brings `TaintTrackingImpl.qll` up-to-date with the other languages as of https://github.com/Semmle/ql/pull/2480 .
2019-12-06 14:07:35 +00:00
Max Schaefer
53f5e13af1
Update data-flow libraries.
...
This brings `DataFlowImpl.qll` and `DataFlowImplCommon.qll` up-to-date with the other languages as of https://github.com/Semmle/ql/pull/2480 .
2019-12-06 12:14:53 +00:00
Sauyon Lee
2fc9e37655
Merge pull request #199 from max/notype-test
...
Add test for handling of expressions without extracted type.
2019-12-06 01:59:32 -08:00
Max Schaefer
594824f19c
Add test for handling of expressions without extracted type.
2019-12-06 09:21:55 +00:00
Max Schaefer
47f449cc0c
Merge remote-tracking branch 'external/master'
2019-12-06 09:04:16 +00:00
Max Schaefer
80e7376189
Merge pull request #198 from sauyon/hardcoded-cred-fix
...
HardcodedCredentials: Exclude passwords that include '0123456789'
2019-12-06 09:02:17 +00:00
Max Schaefer
6bda80a47b
Merge pull request #197 from Semmle/rc/1.23
...
Merge rc/1.23 into master
2019-12-06 09:01:18 +00:00
Sauyon Lee
2de7c6f5fc
HardcodedCredentials: Exclude passwords that include '0123456789'
2019-12-05 15:37:50 -08:00
Sauyon Lee
eb639c6cf7
Merge pull request #196 from max/no-type
...
Make `Expr.getType()` robust against incomplete `type_of` table.
2019-12-05 14:31:48 -08:00
Max Schaefer
8364ba3d38
Make Expr.getType() robust against incomplete type_of table.
2019-12-05 17:05:02 +00:00
Sauyon Lee
94ed3ef979
Merge pull request #13 from github/fix-dead-store
...
Fix a dead assignment.
2019-12-02 10:48:55 -08:00
Max Schaefer
ce6d031ce9
Update .lgtm.yml to classify examples.
2019-12-02 12:04:28 +00:00
Shati Patel
e4346a17de
Merge pull request #195 from max/impossible-interface-nil-check
...
Add new query ImpossibleInterfaceNilCheck
2019-11-27 11:15:05 +00:00
Max Schaefer
ba54cde86e
Add two references.
2019-11-27 10:47:42 +00:00
Max Schaefer
e5a12e9738
Add new query ImpossibleInterfaceNilCheck.
2019-11-26 20:28:53 +00:00
Max Schaefer
f4a24b0353
Improve type information for tuple elements.
...
We would previously rely on the type information of the target variable into which the element is stored, but that could be a more general type.
For example, in the assignment
```go
x, y := f()
```
the type of `x` might be an interface while the type of `f()[0]` is a concrete type implementing that interface.
2019-11-26 16:19:17 +00:00
Sauyon Lee
1d21347578
Merge pull request #194 from max/field-write-through-embedded-pointer
...
Fix DeadStoreOfField false positive.
2019-11-25 13:14:24 -08:00
Max Schaefer
ee723d8a4f
Fix DeadStoreOfField false positive.
...
We should look into properly desugaring embedded types in the IR, but for now this workaround should suffice.
2019-11-25 20:21:16 +00:00
Sauyon Lee
2c921d9418
Merge pull request #193 from max/header-xss
...
Don't flag header injection as XSS.
2019-11-25 11:56:54 -08:00
Sauyon Lee
61c2478541
Merge pull request #12 from github/rc/1.23
...
Merge rc/1.23 into master
2019-11-25 09:20:17 -08:00
Max Schaefer
8bd45593e0
Merge pull request #11 from github/1.23/SD-4095-finalize-change-notes-go
...
1.23: SD-4095 Minor text changes to analysis change notes
2019-11-25 15:56:17 +00:00
Felicity Chapman
de2c7d8884
Minor text changes
2019-11-25 15:48:58 +00:00
Max Schaefer
adf9764085
Don't flag header injection as XSS.
...
All results I have seen from this are uninteresting.
2019-11-25 15:06:53 +00:00
Shati Patel
b21e4404b5
Merge pull request #192 from max/constant-length-comparison
...
Add new query ConstantLengthComparison.
2019-11-25 11:07:58 +00:00
Max Schaefer
db4e6789bb
Address doc review comment.
...
Co-Authored-By: Shati Patel <shati@semmle.com >
2019-11-25 10:44:41 +00:00
Max Schaefer
e16a81cba9
Apply review suggestions.
2019-11-25 09:15:57 +00:00
Max Schaefer
cdb843516a
Introduce DataFlow::Node.getBasicBlock() and use it.
2019-11-25 09:14:15 +00:00
Max Schaefer
1ff032d11e
Add new query ConstantLengthComparison.
2019-11-22 20:55:14 +00:00
Max Schaefer
26a656b838
Merge pull request #189 from sauyon/use-taint-split
...
Use split taint predicates to emulate taint
2019-11-22 17:51:09 +00:00
Sauyon Lee
50b48e1c9e
Merge pull request #191 from max/isEmptyInterfaceNoInline
...
Mark `isEmptyInterface` as `noinline`.
2019-11-22 09:45:06 -08:00
Max Schaefer
e367a48f6e
Mark isEmptyInterface as noinline.
2019-11-22 09:19:34 +00:00
Sauyon Lee
4ea45dbf34
Use data-flow API in stringConcatStep
2019-11-21 23:48:23 -08:00
Sauyon Lee
9651a0bfc4
Use the split taint predicate to emulate taint where required
...
In particular, the OpenUrlRedirect and CleartextLogging queries, which both have taint flow into
an object when one of its fields is written.
2019-11-21 22:58:36 -08:00
Sauyon Lee
c0730fe4cc
Make taintStep public
2019-11-21 22:58:25 -08:00
Sauyon Lee
73922e98d7
Merge pull request #188 from Semmle/rc/1.23
...
Merge rc/1.23 into master
2019-11-21 22:52:12 -08:00
Max Schaefer
228e95a646
Merge pull request #185 from sauyon/open-redirect-fp1
...
OpenRedirect: treat assignments to Url.Path as a barrier
2019-11-21 16:51:16 +00:00
Sauyon Lee
81ba71e47b
Address review comments
2019-11-21 08:29:01 -08:00
Shati Patel
d8c6361312
Merge pull request #187 from max/rc/1.23
...
Add change notes for 1.23.
2019-11-21 16:07:21 +00:00
Max Schaefer
7136713a5f
Add change notes for 1.23.
2019-11-21 15:50:40 +00:00
Max Schaefer
a54d30c053
Merge pull request #186 from sauyon/taint-split
...
Split taintStep into many predicates
2019-11-20 20:39:27 +00:00
Sauyon Lee
3f437612e1
Add qldoc to all taint step predicates.
2019-11-20 11:27:24 -08:00
Sauyon Lee
1092fe5870
Move SsaWithFields to the Ssa file and rework it for public use
...
Also use it in OpenRedirect
2019-11-20 11:20:55 -08:00
Sauyon Lee
4c9bf2265e
OpenRedirect: treat assignments to Url.Path as a barrier
2019-11-20 11:20:54 -08:00
Max Schaefer
215fe26a73
Fix a dead assignment.
2019-11-20 10:28:12 +00:00
Max Schaefer
f94ce88ea4
Add .lgtm.yml to classify tests.
2019-11-20 10:24:54 +00:00
Sauyon Lee
09865a5f5c
Add a field read taint step
2019-11-18 23:58:01 -08:00
Sauyon Lee
e0c589060a
Split taintStep into many predicates
2019-11-18 23:58:00 -08:00
Max Schaefer
8cc60ba543
Add more codeql metadata files.
2019-11-14 10:35:21 +00:00
Sauyon Lee
eda858eafb
Merge pull request #184 from max/cleartext-logging-constant
...
Teach `CleartextLogging` not to flag constant sources.
2019-11-14 01:21:04 -05:00
Max Schaefer
616d78e2a5
Teach CleartextLogging not to flag constant sources.
2019-11-13 14:25:32 +00:00
Max Schaefer
50cde34878
Merge pull request #181 from sauyon/hardcoded-sensitive
...
HardcodedCredentials: Use SensitiveActions
2019-11-13 09:21:45 +00:00
Max Schaefer
ed95cdea56
Merge pull request #183 from sauyon/regexp-improvements
...
OpenUrlRedirect: Use the regexp library for RegexpCheck
2019-11-13 09:20:19 +00:00
Max Schaefer
899ae102b0
Merge pull request #182 from sauyon/fix-newline
...
autobuilder: Add a missing newline to the usage blurb
2019-11-13 09:19:22 +00:00
Sauyon Lee
3b39f5c2e1
OpenUrlRedirect: Use the regexp library for RegexpCheck
2019-11-12 15:14:05 -08:00
Sauyon Lee
2ba680ef4c
autobuilder: Add a missing newline to the usage blurb
2019-11-12 15:11:03 -08:00
Sauyon Lee
4e4d94da7b
Merge pull request #180 from max/receiver-deref-update
...
Conservatively handle indirect updates through pointer-type receiver.
2019-11-12 17:56:13 -05:00
Sauyon Lee
50a008900c
HardcodedCredentials: Use SensitiveActions
2019-11-12 14:08:44 -08:00
Max Schaefer
5726ec179c
Merge pull request #9 from github/autobuilder-add-print
...
autobuilder: Add line printing the environment and build versions of Go
2019-11-12 16:24:19 +00:00
Max Schaefer
06fe00006a
Conservatively handle indirect updates through pointer-type receiver.
...
Method references `x.m` where the receiver of `m` is a pointer implicitly take the address of `x`, so they should be treated much the same as `&x` in terms of data flow. (Ideally we'd make this explicit in the data-flow graph itself, but that's for another PR.)
2019-11-12 08:54:47 +00:00
Sauyon Lee
7c45316aa7
autobuilder: Add line printing the environment and build versions of Go
2019-11-08 19:59:52 -08:00
Max Schaefer
d14eb855fc
Go analysis support for CodeQL.
2019-11-08 12:16:26 +00:00