Rasmus Wriedt Larsen
f6215f2300
Python: Refactor field-flow test
2022-02-01 17:59:03 +01:00
Rasmus Wriedt Larsen
cc4fe38fbd
Python: Delete dedicated argumentRouting<N> tests
...
I feel like they don't bring any value anymore, since we have the nice
inline expectation tests. If I'm wrong, happy to revert this commit
though.
2022-02-01 17:51:33 +01:00
Rasmus Wriedt Larsen
54f53c828e
Python: Refactor argumentRoutingTest.ql to be more generic
...
I checked to see that the tests still works. If I deleted the `arg5`
annotation, it got failures:
```diff
diff --git a/python/ql/test/experimental/dataflow/coverage/argumentPassing.py b/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
index e218bdde9b..71816c1e01 100644
--- a/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
+++ b/python/ql/test/experimental/dataflow/coverage/argumentPassing.py
@@ -46,7 +46,7 @@ def argument_passing(
c,
d=arg4, #$ arg4 func=argument_passing
*,
- e=arg5, #$ arg5 func=argument_passing
+ e=arg5,
f,
**g,
):
diff --git a/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected b/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
index e69de29bb2..22037a40c3 100644
--- a/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
+++ b/python/ql/test/experimental/dataflow/coverage/argumentRoutingTest.expected
@@ -0,0 +1,2 @@
+| argumentPassing.py:49:7:49:10 | ControlFlowNode for arg5 | Unexpected result: arg5= |
+| argumentPassing.py:49:7:49:10 | ControlFlowNode for arg5 | Unexpected result: func=argument_passing |
```
2022-02-01 17:50:06 +01:00
Rasmus Wriedt Larsen
76f3d74fed
Python: Remove extra whitespace from argumentPassing.py
2022-02-01 17:48:16 +01:00
Rasmus Wriedt Larsen
5ee755db09
Python: Require MISSING: flow annotations for normal data-flow tests
...
I had to rewrite the SINK1-SINK7 definitions, since this new requirement
complained that we had to add this `MISSING: flow` annotation :D
Doing this implementation also revealed that there was a bug, since I
did not compare files when checking for these `MISSING:` annotations. So
fixed that up in the implementation for inline taint tests as well.
(extra whitespace in argumentPassing.py to avoid changing line numbers
for other tests)
2022-02-01 17:46:53 +01:00
Erik Krogh Kristensen
e06f6529f1
refactor API-graph labels to an IPA type
2022-02-01 17:32:08 +01:00
Rasmus Wriedt Larsen
2bc4a60496
Python: Unify normal dataflow test setup
...
I went with NormalDataflowTest to signify that if you don't know what
you're looking for, this is probably the one. I did not want to just
call it DataflowTest, since that becomes a big vague when there are also
`FlowTest.qll` and `MaximalFlowTest.qll` -- I'm open to renaming this
though 👍
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
41319607a9
Python: Use InlineExpectationsTest for field-flow tests
...
I deleted the old tests, so it's very clear what tests to look for
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
d6f415bae2
Python: Run match tests if Python 3.10 or newer
...
Also fixes a bug in the tests
2022-02-01 17:31:31 +01:00
liangjinhuang
1885b683f7
style:formatDocument
2022-02-02 00:21:26 +08:00
liangjinhuang
af2e8ff8c6
feat:modify source regular matching rules
2022-02-02 00:10:15 +08:00
Henry Mercer
368839edfc
JS: Fix QLDoc style in ExtractMisclassifiedEndpointFeatures.ql
2022-02-01 15:39:15 +00:00
Arthur Baars
ea901adb3c
Merge pull request #7799 from github/aibaars/fix-ruby-workflows
...
Ruby: use ruby specific cache key
2022-02-01 16:28:14 +01:00
Henry Mercer
db0b4fc463
JS: Add model building pack for ML-powered queries
...
Tests are currently still internal. They will be migrated to
`github/codeql` in a subsequent PR.
2022-02-01 15:03:26 +00:00
Arthur Baars
73d60550ce
QL-QL: fix cache keys
2022-02-01 15:57:59 +01:00
Erik Krogh Kristensen
0f85a52f09
Merge pull request #7773 from erik-krogh/CWE-367
...
JS: add a js/file-system-race query
2022-02-01 15:36:13 +01:00
Rasmus Wriedt Larsen
a4bb0cc5d8
Python: Run tests for fieldflow/test.py
2022-02-01 15:32:07 +01:00
Rasmus Wriedt Larsen
1390f034f3
Python: Delete duplicated tests
...
All the same tests are present in `fieldflow/test.py`
2022-02-01 15:31:30 +01:00
Arthur Baars
6451a71a78
Ruby: use ruby specific cache key
2022-02-01 15:18:09 +01:00
Rasmus Wriedt Larsen
1394b38032
Python: Improve customSanitizer tests
...
Before we didn't show how we treated the value _after_ the check. But we
do actually handle this nicely 💪
2022-02-01 15:09:29 +01:00
Mathias Vorreiter Pedersen
3597d80340
Merge pull request #7787 from Yonah125/main
...
C/C++ : Useless test
2022-02-01 14:01:27 +00:00
Jeroen Ketema
ff1c971100
Add query for missing mode argument in open/openat calls
2022-02-01 14:52:22 +01:00
Rasmus Lerchedahl Petersen
1e2428cb6b
python: create LDAP module in Concepts
2022-02-01 14:39:58 +01:00
Nick Rolfe
5828a61fec
Merge pull request #7795 from github/nickrolfe/graph_test_edge_ordering
...
Ruby/C#: add semmle.order attribute to edges in CFG tests
2022-02-01 13:36:15 +00:00
Rasmus Lerchedahl Petersen
c2cd58edc4
python: rewrite to separate configurations
...
source nodes get duplicated, so perhaps flow states
are actually better for performance?
2022-02-01 14:36:11 +01:00
Erik Krogh Kristensen
a51f892a99
move dot in qhelp
...
Co-authored-by: Esben Sparre Andreasen <esbena@github.com >
2022-02-01 14:34:30 +01: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
Michael Nebel
2c6e35f55e
C#: Add more attribute testcases.
2022-02-01 14:06:45 +01:00
Rasmus Lerchedahl Petersen
7df5c70c6f
python: update frameworks.rst
2022-02-01 13:54:34 +01:00
Rasmus Lerchedahl Petersen
bec8c0daea
python: update change note
2022-02-01 13:39:03 +01:00
Rasmus Lerchedahl Petersen
c587084758
python: use standard InstanceSource construction
2022-02-01 13:31:16 +01:00
Michael Nebel
31a70a17a4
C#: Add attribute tests for delegate types.
2022-02-01 13:29:26 +01:00
Michael Nebel
8ee27be908
C#: Small change in the attribute elements test. We now require that the attribute should be in source code and not the attributable.
2022-02-01 13:29:26 +01:00
Michael Nebel
7d1d2e792c
C#: Add specialized ql classes for each attribute kind and update AST printing.
2022-02-01 13:29:26 +01:00
Michael Nebel
5a6667efc5
C#: Update attribute test cases.
2022-02-01 13:29:26 +01:00
Michael Nebel
c94cdfa79a
C#: Update the extractor to include the kind of the extracted attributes. Furthermore, include method return attributes.
2022-02-01 13:29:26 +01:00
Michael Nebel
e86ac73628
C#: Add attribute kind to the dbscheme for the attribute relation.
2022-02-01 13:29:26 +01:00
Erik Krogh Kristensen
e6c90670e6
Merge pull request #7740 from erik-krogh/CWE-347
...
JS: promote the js/jwt-missing-verification query out of experimental
2022-02-01 13:10:35 +01: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
museljh
012434b152
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 19:00:06 +08:00
museljh
a6002186bd
Update python/ql/src/experimental/Security/CWE-338/InsecureRandomness.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 18:59:12 +08:00
Jeroen Ketema
dbac927721
Take into account that the 4th argument of openat may be omitted
...
This matches what is done for `open`.
2022-02-01 11:41:07 +01:00
Rasmus Wriedt Larsen
f7a0b17ed6
Merge pull request #7687 from yoff/python/PathInjection-FlowState
...
python: Rewrite path injection query to use flow state
2022-02-01 11:33:37 +01:00
yoff
b120721942
Update python/ql/src/Security/CWE-090/LdapInjection.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 11:02:47 +01:00
Rasmus Lerchedahl Petersen
119a7e4f34
python: provide links for Flask
2022-02-01 10:55:45 +01:00
Rasmus Lerchedahl Petersen
ecea392a08
python: rewrite qhelp overview
...
(combining the Java version and the JS version)
2022-02-01 10:47:18 +01:00
Rasmus Lerchedahl Petersen
26befebfc2
python: drop precision and add severity score
...
Given both the original FP score and our concerns
regarding sanitizers, `@precision medium`, which
is aligned with other languages, feels appropriate.
2022-02-01 10:34:36 +01:00
Rasmus Lerchedahl Petersen
7511b33512
python: "command" -> "log"
2022-02-01 10:23:16 +01:00
yoff
45f0bfd8f0
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-02-01 10:06:37 +01:00