jorgectf
eac5eba9d2
Move tests and qlref to test/
2021-06-23 18:36:44 +02:00
jorgectf
7956b97ac3
Unit tests move and temporary ql
2021-06-23 00:40:05 +02: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
Rasmus Wriedt Larsen
3d5f379b8c
Merge branch 'main' into sensitive-improvements
2021-06-11 10:48:20 +02:00
Rasmus Wriedt Larsen
dd457f9641
Python: Fix tests
2021-06-10 15:58:56 +02:00
Rasmus Wriedt Larsen
04db33513e
Merge branch 'main' into sensitive-improvements
2021-06-10 15:11:09 +02:00
Rasmus Wriedt Larsen
ea0c1d7db3
Python: Better handling of sensitive functions
...
This solution was the best I could come up with, but it _is_ a bit
brittle since you need to remember to add this additional taint step
to any configuration that relies on sensitive data sources... I don't
see an easy way around this though :|
2021-06-10 15:08:21 +02:00
Rasmus Wriedt Larsen
f167143a84
Python: Use real config in TestSensitiveDataSources
...
This will enable better tests in just one second
2021-06-10 15:01:31 +02:00
Rasmus Wriedt Larsen
c341643ec1
Python: Add more tests for sensitive function handling
2021-06-10 14:36:05 +02:00
Rasmus Wriedt Larsen
eb4f168dd4
Python: Clarify SensitiveAttributeAccess
...
The comment about imports was placed wrong. I also realized we didn't
even have a single test-case for
`this.(DataFlow::AttrRead).getAttributeNameExpr() = sensitiveLookupStringConst(classification)`
so I added that (notice that this is only `getattr(foo, x)` and not
`getattr(foo, "password")`)
2021-06-10 14:09:47 +02:00
yoff
716627c1dd
Merge pull request #5878 from RasmusWL/fix-concept-tests-pretty-print
...
Python: Fix concept tests pretty print
2021-06-10 11:21:08 +02:00
Rasmus Wriedt Larsen
aaddd36236
Python: Add another type-tracking attr test
...
This one just works out of the box 💪
2021-06-09 14:20:50 +02:00
Rasmus Wriedt Larsen
89cba216ca
Python: Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2021-06-09 14:15:59 +02:00
Rasmus Wriedt Larsen
3d2de03674
Python: Add type-tracking test for attr set in function
2021-06-08 19:03:53 +02:00
Rasmus Wriedt Larsen
dcd448b743
Python: Refactor formatting
2021-06-08 19:03:53 +02:00
Rasmus Wriedt Larsen
09de1bcf44
Python: Add tests for type-tracking attrs on instances
2021-06-08 19:03:53 +02:00
Rasmus Wriedt Larsen
3819a361b5
Python: Autoformat
2021-06-07 14:16:33 +02:00
Rasmus Wriedt Larsen
350f79e1e1
Python: Model sensitive data based on variable names
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
f5fd0f8d1c
Python: Model sensitive data based on parameter names
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
925e67d734
Python: Model sensitive data from subscripts
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
00a71a1c41
Python: Port sensitive data modeling
...
No longer using points-to 🎉
2021-06-04 11:28:07 +02:00
Rasmus Wriedt Larsen
3b68c87b6c
Python: Add sensitive data test-cases
2021-06-03 13:38:29 +02:00
Rasmus Wriedt Larsen
d5f2846394
Merge branch 'main' into jorgectf/python/ldapInjection
2021-05-26 11:01:48 +02:00
Rasmus Wriedt Larsen
35793a10bb
Merge pull request #5889 from japroc/python-clickhouse-driver
...
Python: Implement module ClickHouseDriver.qll
2021-05-25 14:25:28 +02:00
jorgectf
37d6ff76a3
Update tests and .expected
2021-05-21 17:47:53 +02:00
Evgenii Protsenko
1e40213abb
use <class> instead of <class>::Range
2021-05-20 22:56:08 +03:00
Rasmus Wriedt Larsen
0292ca6b67
Merge pull request #5880 from tausbn/python-limit-builtins
...
Python: Limit set of globals that may be built-ins
2021-05-20 14:47:22 +02:00
CodeQL CI
17afbdf258
Merge pull request #5635 from RasmusWL/port-weak-crypto-algorithm
...
Approved by yoff
2021-05-20 01:22:32 -07:00
Rasmus Wriedt Larsen
61ad5d0673
Python: Allow printing PostUpdateNode in ConceptsTest.qll
...
See how this works in `test_json.py`
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
9dbb364cca
Python: Move json tests to be part of stdlib
...
This is better, since the modeling is also part of Stdlib.qll
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
51a25e45fe
Python: Use shared prettyExpr in ConceptsTest.qll
...
This required quite some changes in the expected output. I think it's much more
clear what the selected nodes are now 👍 (but it was a bit boring work to fix
this up)
2021-05-19 17:10:33 +02:00
Rasmus Wriedt Larsen
f66dccafda
Python: Rename prettyExp => prettyExpr
...
So we're consistenly using `expr` and not leaving our the `r`.
2021-05-19 17:10:33 +02:00
CodeQL CI
23e8092452
Merge pull request #5864 from RasmusWL/some-framework-modeling
...
Approved by tausbn
2021-05-19 02:31:06 -07:00
Evgenii Protsenko
af75d85b2e
ClickHouseSQLInjection.qll : add tests
2021-05-18 22:49:11 +03:00
Rasmus Wriedt Larsen
97fadd9970
Merge branch 'main' into port-weak-crypto-algorithm
2021-05-18 14:04:18 +02:00
Taus
fe12e620dd
Python: Avoid clobbering range in test
...
This was an unwanted interaction between two unrelated tests, so I
switched to a different built-in in the second test. I also added a test
case that shows an unfortunate side effect of this more restricted
handling of built-ins.
2021-05-12 18:42:10 +00:00
yoff
0e5a2c4573
Merge pull request #5442 from jorgectf/jorgectf/python/redos
...
Python: Add Regular Expression Injection query
2021-05-11 12:11:35 +02:00
Rasmus Wriedt Larsen
72d08f4d6e
Python: Model json load/dump
2021-05-10 15:10:30 +02:00
Rasmus Wriedt Larsen
63f28d7d9b
Python: Model keyword args to json loads/dumps
2021-05-10 15:10:29 +02:00
Rasmus Wriedt Larsen
784e0cdb96
Python: Improve tests of json module
...
Inspired by the work on previous commit
2021-05-10 15:10:28 +02:00
jorgectf
12ccd7e3b6
Update .expected
2021-04-27 19:54:39 +02:00
jorgectf
05ee853c4e
Remove wrong comment
2021-04-27 19:54:39 +02:00
jorgectf
d968eea914
Move expected to /test
2021-04-27 19:54:38 +02:00
jorgectf
81d23c066c
Move tests and qlref from /src to /test
2021-04-27 19:54:37 +02:00
Rasmus Wriedt Larsen
499adc26a3
Python: Extend SensitiveDataSource tests
...
Now it contains all the sort of things we actually support 👍
2021-04-22 15:23:40 +02:00
Rasmus Wriedt Larsen
794a86a6b0
Python: Add SensitiveDataSource
2021-04-22 15:23:39 +02:00
Rasmus Wriedt Larsen
59edd18c34
Python: Move framework test-files out of experimental
...
This PR was rebased on newest main, but was written a long time ago when all the
framework test-files were still in experimental. I have not re-written my local
git-history, since there are MANY updates to those files (and I dare not risk
it).
2021-04-22 15:23:37 +02:00
Rasmus Wriedt Larsen
1616975e06
Python: Model hashlib from standard library
2021-04-22 15:23:37 +02:00
Rasmus Lerchedahl Petersen
5a4e661e60
Merge branch 'main' of github.com:github/codeql into python-support-pathlib
2021-04-22 15:04:21 +02:00
Rasmus Wriedt Larsen
7ffbfa8043
Python: Expand stdlib md5 tests with keyword-arguments
2021-04-22 14:51:20 +02:00