Nick Rolfe
1eba8277ee
Merge pull request #7614 from github/nickrolfe/array_flow_summaries
...
Ruby: add more Array/Enumerable flow summaries
2022-02-09 09:57:59 +00:00
Harry Maclean
3206384884
Merge pull request #7824 from github/hmac/constantize
2022-02-09 08:30:21 +13:00
Tom Hvitved
b2419d60bd
Merge pull request #7090 from hvitved/ruby/perf
...
Ruby: Cache more predicates
2022-02-08 20:02:33 +01:00
Tom Hvitved
3b5267eca5
Ruby: Cache DataFlow::Node::{toString,getLocation}
2022-02-08 13:03:42 +01:00
Tom Hvitved
f337459a4a
Ruby: Cache capturedEntryWrite
2022-02-08 13:03:42 +01:00
Tom Hvitved
b041bc03d1
Ruby: Cache ConditionBlock::(immediately)Controls
2022-02-08 13:03:41 +01:00
Tom Hvitved
4037d1ff96
Ruby: Cache ErbDirective::getAChildStmt
2022-02-08 13:03:41 +01:00
Tom Hvitved
4c5f32ba4a
Ruby: Cache exprNodeReturnedFrom
2022-02-08 13:03:31 +01:00
Tom Hvitved
45412fa17f
Cache hasLocalSource
2022-02-08 13:03:27 +01:00
Nick Rolfe
8881031d0a
Ruby: add upgrade/downgrade scripts
2022-02-08 09:57:55 +00:00
Nick Rolfe
2037368f62
Ruby: make node column unique
2022-02-08 09:55:34 +00:00
Nick Rolfe
e049f08c24
Ruby: update dbscheme stats
2022-02-07 12:42:34 +00:00
Nick Rolfe
b3b2bba618
Ruby: make some generated predicates final
2022-02-07 12:17:50 +00:00
Nick Rolfe
e8855c3718
Ruby: add db upgrade script
2022-02-07 12:10:36 +00:00
Nick Rolfe
388d361ec3
Ruby: put AST node locations in a single table
2022-02-07 12:10:36 +00:00
Tom Hvitved
dc09e87cb2
Ruby: Use SimpleSummarizedCallable in a few more places
2022-02-07 11:05:32 +01:00
Arthur Baars
ac03fab986
Merge pull request #7753 from aibaars/ruby-3.1
...
Ruby 3.1 features
2022-02-06 21:06:16 +01:00
Nick Rolfe
9744cf2457
Ruby: apply suggested simplification from review
2022-02-04 17:14:47 +00:00
Nick Rolfe
aaff3226c9
Ruby: prefer ...isInt(x) over x = ...getInt()
2022-02-04 17:10:22 +00:00
Nick Rolfe
45962f1cad
Ruby: make this unique for each method
...
Even when summaries are shared in a single class.
2022-02-04 17:03:55 +00:00
Nick Rolfe
7a9ddc28bf
Ruby: address some more feedback on array flow summaries
2022-02-04 16:33:27 +00:00
Nick Rolfe
ed00f2b0d2
Ruby: address some feedback on array flow summaries
2022-02-04 13:40:39 +00:00
Nick Rolfe
161d766ba9
Ruby: address review comments on array_flow.rb
2022-02-04 11:59:59 +00:00
Harry Maclean
ab7fd89653
Merge pull request #7663 from github/hmac/api-graph-subclass
...
Ruby: Add basic subclassing support to API Graphs
2022-02-04 10:19:07 +13:00
Arthur Baars
6525035f0a
Address comments
2022-02-03 13:47:03 +01:00
Tom Hvitved
6bb71f051b
Merge pull request #7791 from hvitved/dataflow/inline-local-flow-star
...
Data flow: Inline `local(Expr|Instruction)?(Flow|Taint)`
2022-02-03 09:02:43 +01:00
Harry Maclean
c65ca8ff86
Model calls to constantize as code executions
...
`constantize` is an ActiveSupport extension to `String` that attempts to
look up a constant with a name matching the receiver.
2022-02-03 15:22:07 +13:00
Harry Maclean
704b58519f
Ruby: Include subclasses in more API calls
...
Change the behaviour of `API::getInstance()` and `API::getReturn()` to
include results on subclasses of the current API node.
2022-02-03 11:35:59 +13:00
Arthur Baars
a22868ba27
Merge branch 'main' into ruby-3.1
2022-02-02 19:00:03 +01:00
Arthur Baars
3b05cb621c
Address comment
2022-02-02 14:11:45 +01:00
Arthur Baars
fdcef6225b
Ruby: fix QL warnings
2022-02-02 13:29:09 +01:00
Tom Hvitved
712418e5f8
Merge pull request #7781 from hvitved/dataflow/summary-stack-bottom-less-nonlinear
...
Data flow: Reduce non-linear recursion in `SummaryComponentStack::bottom`
2022-02-02 10:35:53 +01:00
Harry Maclean
fb00a6c61b
Merge pull request #7666 from github/hmac/file-open-access
...
Ruby: Add File.open as a FileSystemAccess
2022-02-02 07:32:16 +13:00
Nick Rolfe
990e07b986
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-01-31 20:08:24 +00:00
Tom Hvitved
f2352d8272
Data flow: Inline local(Expr|Instruction)?(Flow|Taint)
...
Computing a full transitive closure is often bad; by inlining all calls we are
providing more context to the QL optimizer.
2022-01-31 14:33:41 +01:00
Arthur Baars
abf3ce6223
Ruby: expressions in pin operator ^
2022-01-28 19:47:31 +01:00
Arthur Baars
00fb4d3776
Ruby: Values in Hash literals and keyword arguments can be omitted
2022-01-28 19:47:31 +01:00
Arthur Baars
3e2ca61c01
Ruby: support anonymous block parameters/arguments
2022-01-28 19:47:31 +01:00
Arthur Baars
b9258e78ca
Ruby: non-local variables in variable reference pattern
2022-01-28 19:47:31 +01:00
Arthur Baars
e5eb01ca45
Ruby: add upgrade scripts
2022-01-28 19:47:31 +01:00
Arthur Baars
c85012460a
Ruby: update dbscheme stats
2022-01-28 19:47:31 +01:00
Arthur Baars
c6a36a50c2
Ruby: regenerate dbscheme and library
2022-01-28 19:47:31 +01:00
Tom Hvitved
682163962a
Data flow: Sync files
2022-01-28 13:01:24 +01:00
Nick Rolfe
c0e1384f4a
Ruby: move Array/Enumerable flow summaries to their own file
2022-01-28 11:33:59 +00:00
Nick Rolfe
6c0eb8beee
Ruby: update array flow summaries to use getConstantValue()
2022-01-28 11:33:59 +00:00
Nick Rolfe
693ff6a904
Ruby: add flow summaries for remaining Array methods
2022-01-28 11:33:59 +00:00
Nick Rolfe
030cfa36da
Ruby: add flow summaries for all remaining Enumerable methods
2022-01-28 11:33:59 +00:00
Harry Maclean
b01f81aab3
Use modified getAPath predicate for test
2022-01-28 19:45:52 +13:00
Harry Maclean
a1b0f02e6e
Ruby: Introduce API::getAnImmediateSubclass()
...
class A; end
class B < A; end
class C < B; end
In the example above, `getMember("A").getAnImmediateSubclass()` will
select only uses of B, whereas `getMember("A").getASubclass()` will
select uses of A, B and C. This is usually the behaviour you want.
2022-01-28 16:44:03 +13:00
Nick Rolfe
6f06263d49
Ruby: add more properties for ordering nodes in graph tests
2022-01-27 13:57:43 +00:00