Commit Graph

17948 Commits

Author SHA1 Message Date
Rasmus Wriedt Larsen
01f5b3dc63 Python: Add a script that we can't classify usage of 2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
3e7e9636ea Python: Add ModuleValue.{isUsedAsModule, isUsedAsScript}
and a few test cases
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
b4ab0b55be Python: Modernise Statements/RedundantAssignment 2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
79a4d7e9cc Python: Add some confusing (but valid) property tests 2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
67e9edb820 Python: Add PropertyValue
+ Extend PropertyInternal.getSetter to handle non-decorator
+ Add PropertyInternal.getDeleter

It seems like a bit hacky way to do things, since we're not using the
PropertySetterOrDeleter class at all, but for now I'll leave it be.
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
e747add485 Python: Descriptor tests fixup (3/3)
Better tests for properties
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
aed7bfb820 Python: Descriptor tests fixup (2/3)
Test format improved
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
3f49aeecfe Python: Descriptor tests fixup (1/3) 2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
13568b7b9f Python: Modernise Statements/ queries
Almost. Left out a few things marked with TODO
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
83d40f167b Python: Update py/ineffectual-statement
e.(StrConst).isDocString() can only hold if e instanceof StrConst, since we have
that condition on the line above, we can safely remove this condition.
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
6e349eb6e7 Python: Make py/side-effect-in-assert handle example
Also removed parantheses
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
ae8dbd81f3 Python: Update test-file for py/redundant-assignment
now the test code can be pasted, and actually works ;)
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
381668871d Python: Autoformat statements 2020-02-19 14:05:55 +01:00
Geoffrey White
df29143b7e C++: Fix a test that should be working on the AST dataflow. 2020-02-19 13:02:24 +00:00
Alistair Christie
fab7955c75 Make small editorial changes 2020-02-19 12:54:58 +00:00
Geoffrey White
c94582a1c0 Merge pull request #2861 from MathiasVP/gvn-use-impl
C++: Import AST GVN module for tests
2020-02-19 11:16:11 +00:00
james
6ff1c99ae3 docs: a few content updates 2020-02-19 11:08:18 +00:00
semmle-qlci
5e0f21a162 Merge pull request #2854 from max-schaefer/js/regexp-bounded-quantifier-fix
Approved by esbena
2020-02-19 10:12:13 +00:00
Mathias Vorreiter Pedersen
59a19679ea C++/C#: Sync identical files after merge 2020-02-19 11:06:00 +01:00
Mathias Vorreiter Pedersen
bbcc1e1c37 Merge branch 'master' into sync-ir-valuenumbering-internals 2020-02-19 10:43:48 +01:00
Mathias Vorreiter Pedersen
3a05a82c1d C++: Accept output 2020-02-19 10:35:03 +01:00
Asger Feldthaus
77105f6572 JS: Do not flag void operands MissingAwait 2020-02-19 09:30:03 +00:00
Mathias Vorreiter Pedersen
246ef694f6 Merge branch 'master' into gvn-use-impl 2020-02-19 10:29:46 +01:00
Erik Krogh Kristensen
344060e139 accept IO redirections as OK 2020-02-19 10:12:24 +01:00
Max Schaefer
4346691cdc JavaScript: Distinguish {lo} and {lo,} in the regular expression parser. 2020-02-19 08:26:14 +00:00
james
d3eb5334b8 docs: update titles, some links, add intros 2020-02-19 07:37:35 +00:00
james
2245d64c52 docs: tidy up ql-for-cpp 2020-02-19 07:09:01 +00:00
Rebecca Valentine
2fa20eb805 Fixes bug introduced by merge of foresight additions. 2020-02-18 21:37:52 -08:00
Rebecca Valentine
7997e1dc98 Merge branch 'master' into objectapi-to-valueapi-expectedmappingforformatstring 2020-02-18 21:33:12 -08:00
Rebecca Valentine
9e3ed214d0 Python: ObjectAPI to ValueAPI: Foresight Additions (#2819)
* Adds the...Type() predicates as foresight modernizations.

* Removes predicates that are not currently ported/portable

* Adds range types

* Update python/ql/src/semmle/python/objects/ObjectAPI.qll

Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>

* Update python/ql/src/semmle/python/objects/ObjectAPI.qll

Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>

* Swaps xType for just x, at least when it's new

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2020-02-18 21:29:20 -08:00
Rebecca Valentine
810efef9de Adds python3 test 2020-02-18 15:02:47 -08:00
Rebecca Valentine
e55f01d905 Adds new UseofApply test case and results to the Python2 tests dir 2020-02-18 12:12:25 -08:00
Rebecca Valentine
9338d21aaf Removes unnecessary explanation 2020-02-18 11:43:43 -08:00
Rebecca Valentine
4059a99da6 Autoformats the query 2020-02-18 11:43:31 -08:00
Erik Krogh Kristensen
73a7d406a5 add query for useless use of cat 2020-02-18 19:18:45 +01:00
Robert Marsh
ff876aaedf C++: Accept test output with IR enabled 2020-02-18 09:48:21 -08:00
Rebecca Valentine
d0617ef7bc Autoformat 2020-02-18 09:00:31 -08:00
Felicity Chapman
2a5ac2e829 Fix failing Sphinx tests 2020-02-18 16:50:48 +00:00
Robert Marsh
adfe5f30a1 Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams 2020-02-18 08:42:27 -08:00
Mathias Vorreiter Pedersen
cc4c780573 Merge pull request #2860 from jbj/isInCycle-neighbors
C++: Manual magic for `isInCycle`
2020-02-18 17:41:19 +01:00
Robert Marsh
aaf6926c34 Merge pull request #2851 from jbj/ir-enable-only
C++: Use IR for security.TaintTracking and GVN
2020-02-18 11:37:34 -05:00
Alistair Christie
fdbc74825e Java topics - change titles & add intros 2020-02-18 16:34:55 +00:00
Felicity Chapman
74d93ba704 Tidy up some references 2020-02-18 16:05:01 +00:00
semmle-qlci
ba67faf461 Merge pull request #2863 from shati-patel/master
Approved by felicitymay
2020-02-18 15:56:10 +00:00
Taus
ffbb5d0529 Merge pull request #2739 from RasmusWL/python-modernise-security
Python: modernise Security/ queries
2020-02-18 16:28:53 +01:00
Felicity Chapman
8a44f51fc5 Bring headings more into line with content models 2020-02-18 13:18:02 +00:00
Felicity Chapman
8ab4cebc9b Add reusable for other resources and make 'Further reading' section 2020-02-18 12:16:33 +00:00
Felicity Chapman
38e40622f1 Update topic titles and update map topic as discussed with JF and SP 2020-02-18 12:03:51 +00:00
Calum Grant
c3b88210aa C#: Add runtime idenfitiers to project files. 2020-02-18 11:52:41 +00:00
Mathias Vorreiter Pedersen
4cad5549ee C++: Directly import AST GVN module in tests 2020-02-18 12:21:14 +01:00