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
753dca91b1
Python: weak-crypto: Make algorithm selection less brittle
...
As discussed in https://github.com/github/codeql/pull/5635#discussion_r633477154
2021-05-19 17:47:09 +02:00
Rasmus Wriedt Larsen
22d4d7956a
Python: Fix typo in QLDoc
2021-05-19 17:47:05 +02:00
Rasmus Wriedt Larsen
8d1e7da851
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-19 17:42:46 +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
yoff
60da193620
Update python/ql/src/semmle/python/frameworks/Cryptodome.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2021-05-19 08:08:59 +02:00
Rasmus Wriedt Larsen
97fadd9970
Merge branch 'main' into port-weak-crypto-algorithm
2021-05-18 14:04:18 +02:00
Rasmus Wriedt Larsen
6c755024ac
Python: Refactor code, inline some type-tracking
2021-05-18 14:03:36 +02:00
Rasmus Wriedt Larsen
770429fd68
Python: Autoformat
2021-05-18 14:02:46 +02:00
Rasmus Wriedt Larsen
9156316b14
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-18 11:53:11 +02:00
Rasmus Wriedt Larsen
0ade23ab2a
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-05-18 11:49:59 +02:00
CodeQL CI
12b1bbe484
Merge pull request #5897 from erik-krogh/uid
...
Approved by RasmusWL, esbena
2021-05-17 06:01:04 -07:00
Robin Neatherway
f378513ea3
Add lines-of-code tags
...
This is a proposed method for advertising which queries are measuring
the lines of code in a project in a more robust manner than inspecting
the rule id.
Note that the python "LinesOfUserCode" query should _not_ have this
property, as otherwise the results of the two queries will be summed.
2021-05-14 11:20:43 +01:00
Erik Krogh Kristensen
9d60ec035f
fix casing on the uid regexp
2021-05-13 23:04:30 +02:00
Erik Krogh Kristensen
662e335424
keep python in sync
2021-05-13 22:54:39 +02:00
Anders Schack-Mulligen
74ae2e0857
Merge pull request #5773 from hvitved/dataflow/aggressive-caching
...
Data flow: Cache most language-dependent predicates
2021-05-12 09:41:55 +02:00
Tom Hvitved
d66506b0a3
Data flow: Rename {Argument,Parameter}NodeExt to {Arg,Param}Node
2021-05-11 14:40:10 +02: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
yoff
549c9eee1a
Merge pull request #5739 from RasmusWL/share-sensitive-data-modeling
...
Python/JS: Share sensitive data modeling
2021-05-11 11:53:59 +02:00
Rasmus Wriedt Larsen
1b0d5053e7
Python: simplejson load/dump only works with lib installed
...
Which I had done locally. Problem is the same about not having PostUpdateNode
when points-to is not able to resolve the call, so I'm happy to just make CI
happy right now, and hopefully we'll get a fix to the underlying problem soon 😊
2021-05-10 16:21:29 +02:00
Rasmus Wriedt Larsen
c2a6b811fc
Python: Add modeling of ujson PyPI package
...
The problem with `tainted_filelike` not having taint, is that in the call
`ujson.dump(tainted_obj, tainted_filelike)`
there is no PostUpdateNote for `tainted_filelike` :( The reason is that
points-to is not able to resolve the call, so none of the clauses in
`argumentPreUpdateNode` matches
See 08731fc6cf/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll (L101-L111)
Let's deal with that issue in an other PR though
2021-05-10 15:10:31 +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
Rasmus Wriedt Larsen
3fe9a3d933
Python: Add modeling of simplejson PyPI package
...
I noticed that we don't handle PostUpdateNote very well in the concept tests,
for exmaple for `json.dump(...)` there _should_ have been an `encodeOutput` as
part of the inline expectations.
I'll work on fixing that up in a separate PR, to keep things clean.
2021-05-10 15:10:27 +02:00
yoff
78370cf63f
Update python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll
2021-05-10 14:53:40 +02:00
Rasmus Wriedt Larsen
8afdf26540
Python: Add modeling of idna PyPI package
2021-05-10 11:47:11 +02:00
Rasmus Wriedt Larsen
7ed20a8b2c
Python: Add reminder to update docs for new frameworks
2021-05-10 10:55:21 +02:00
Rasmus Wriedt Larsen
dc4a0c1d38
Python/JS: Fix typo
2021-05-05 10:13:54 +02:00
CodeQL CI
95f26aadd3
Merge pull request #5681 from yoff/python-support-pathlib
...
Approved by tausbn
2021-05-04 09:20:24 -07:00
Taus
483199878d
Merge pull request #5793 from RasmusWL/fix-qldoc
...
Python: Minor fix to Django RawSQL QLDoc
2021-05-03 18:18:02 +02:00
intrigus
08731fc6cf
Fix typo.
2021-04-29 20:26:34 +02:00
Jorge
bd4b189373
Polish documentation consistency
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-29 16:26:28 +02:00
Arthur Baars
6693c5bdd0
Merge pull request #5395 from tausbn/python-share-typetracker
...
Python: Make the type tracking implementation shareable
2021-04-29 12:06:12 +02:00
CodeQL CI
84d43946de
Merge pull request #5755 from RasmusWL/non-alert-data-part1
...
Approved by tausbn
2021-04-29 02:51:34 -07:00
jorgectf
213d011a8c
Edit code example in CompiledRegex
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-29 11:10:03 +02:00
Rasmus Lerchedahl Petersen
16bde2729d
Python: add flow from methods to calls
2021-04-28 17:02:24 +02:00
Tom Hvitved
c35a2b959a
Python: Update data-flow caching
2021-04-28 14:49:05 +02:00
Rasmus Wriedt Larsen
baa926359e
Python: Minor fix to Django RawSQL QLDoc
2021-04-28 12:18:27 +02:00
Rasmus Wriedt Larsen
8b9c5f8228
Python/JS: Remove "Only added to aid with internal rewrite"
2021-04-28 11:50:06 +02:00
Rasmus Wriedt Larsen
f2b4e31e7f
Python: Make Diagnostics tests pass
...
I had comitted a bad .expected file it seems, and since the encoding for UTF-8
is named differently from Python 2 to Python 3, we're only going to run the test
for one version.
2021-04-28 10:21:59 +02:00
Taus
4ae3a23089
Python: Limit absolute imports
...
Limits the behaviour of github/codeql#5614 in two ways:
First, we only consider files that are contained in the source archive.
This prevents unnecessary computation involving files in e.g. the
standard library.
Secondly, we ignore any relative imports (e.g. `from .foo import ...`),
as these only work inside packages anyway.
This fixes an observed performance regression on projects that include
`google-cloud-sdk` as part of their source code.
2021-04-27 21:47:38 +00:00
jorgectf
21e01b809f
Add code example in CompiledRegex
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:42 +02:00
jorgectf
8a800986a2
Remove unused class variables
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:42 +02:00
jorgectf
20b532ec5e
Update to-cast sink's naming
...
Signed-off-by: jorgectf <jorgectf@protonmail.com >
2021-04-27 19:54:41 +02:00
Jorge
c0c71c509c
Apply suggestions from code review
...
Update `RegexExecution` docs and use `flowsTo()` instead of `getALocalSource()`.
Co-authored-by: yoff <lerchedahl@gmail.com >
2021-04-27 19:54:41 +02:00
jorgectf
c4322848ec
Polish qhelp
2021-04-27 19:54:40 +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
3fae3fd93e
Take ApiGraphs out of Concepts.qll
2021-04-27 19:54:39 +02:00