Commit Graph

784 Commits

Author SHA1 Message Date
jorgectf
21f8135fa6 Move to experimental folder 2021-04-27 19:54:08 +02:00
thank_you
62f3e8d64a Add sanitizer for ObjectId
ObjectId is a sanitizer used to sanitize strings into valid MongoDB ids. During research we've found that this method is used.

ObjectId returns a string representing an id. If at any time ObjectId can't parse it's input (like when a tainted dict in passed in), then ObjectId will throw an error preventing the query from running.
2021-04-26 15:35:42 -04:00
Rasmus Wriedt Larsen
56c409737d Python: Port py/weak-cryptographic-algorithm
The other query (py/weak-sensitive-data-hashing) is added in future commit
2021-04-22 15:23:38 +02:00
Taus
71780228ae Python: Rename TypeTrackerPrivate.qll 2021-04-21 13:08:26 +00:00
Taus
489e1e94e4 Python: Prevent bad joins
Adds a few unbinds to prevent bad joins from occurring.

Firstly, we never want to join `StepSummary::step` with
`TypeTracker::append` on `summary` as the first join, as the resulting
relation is absolutely massive. So we decouple the two occurrences of
`summary` by unbinding each of them.

Secondly, in some cases the node we're stepping to (`nodeTo` for type
trackers, `nodeFrom` for type backtrackers) will get joined eagerly
with the typetracker one is defining, and again this produces an
uncomfortably large intermediate join. A bit of unbinding prevents this
as well.
2021-04-21 11:44:34 +00:00
Taus
9e95f6e7c1 Python: Remove typePreservingStep
This requires a bit of explanation, so strap in.

Firstly, because we use `LocalSourceNode`s as the start and end points
of our `StepSummary::step` relation, there's no need to include
`simpleLocalFlowStep` (via `typePreservingStep`) in `smallstep`. Indeed,
since the successor node for a `step` is a `LocalSourceNode`, and local
sources never have incoming flow, this is entirely futile -- we can find
values for `mid` and `nodeTo` that satisfy the body of `step`, but
`nodeTo` will never be a `LocalSourceNode`.

With this in mind, we can simplify `smallstep` to only refer to
`jumpStep`.

This then brings the other uses of `typePreservingStep` into question.
The only other place we use this predicate is in the `TypeTracker` and
`TypeBackTracker` `smallstep` predicates. Note, however, that here we
no longer need `jumpStep` to be part of `typeTrackingStep` (as it is
already accounted for in `StepSummary::smallstep`) so we can simplify
to `simpleLocalFlowStep`. At this point, `typePreservingStep` is unused.

Finally, because of the way `smallstep` is used in `step` (inside
`StepSummary`), `nodeTo` must always be a `LocalSourceNode`, so I have
propagated this restriction to `smallstep` as well. We can always lift
this restriction later, but for now it seems like it's likely to cause
fewer surprises to have made this explicit.
2021-04-21 11:12:06 +00:00
thank_you
7773c53124 Replace any(string) with _ wildcard 2021-04-20 08:49:08 -04:00
thank_you
bbd3552392 Rename predicate to getQuery 2021-04-20 08:47:37 -04:00
thank_you
c5fbbc0551 Refactor SqlAlchemy model
- Replaced classes that look for SqlAlchemy instances with predicates
- General clean-up of code
2021-04-19 18:56:00 -04:00
thank_you
a854fb8f8b Add documentation and refactor code 2021-04-15 15:22:15 -04:00
Thank You
f1e71e21ed Add SqlAlchemy module 2021-04-14 22:00:25 -04:00
Rasmus Wriedt Larsen
364d48948f Merge pull request #3810 from dilanbhalla/syntaxpython
Python: Function/Class Naming Convention (Syntax)
2021-04-12 10:42:17 +02:00
jorgectf
4615927eeb Fix flask_mongoengine Call 2021-04-09 22:27:53 +02:00
jorgectf
166385755a Polish Calls naming 2021-04-09 21:49:41 +02:00
jorgectf
208b53e4d2 Polish query file 2021-04-09 21:36:21 +02:00
jorgectf
983af32ab5 Polish qhelp examples 2021-04-09 21:36:11 +02:00
jorgectf
fa5869afe7 Polish qhelp and examples 2021-04-09 21:31:45 +02:00
jorgectf
a6b3aefb0b Add flask_mongoengine sink 2021-04-09 21:30:17 +02:00
jorgectf
1c34230efb Fix documentation typo 2021-04-09 01:58:18 +02:00
jorgectf
f140601241 Write documentation 2021-04-09 01:57:23 +02:00
jorgectf
b020ea6e3a Polish documentation 2021-04-09 01:50:23 +02:00
jorgectf
a2e8d88a07 Write documentation 2021-04-09 01:47:44 +02:00
jorgectf
e9c4574552 Apply structure 2021-04-09 01:26:53 +02:00
jorgectf
789c5857fa Create qhelp example 2021-04-09 01:26:28 +02:00
jorgectf
ce3fb6be21 Improve qhelp 2021-04-09 01:26:16 +02:00
jorgectf
b0c498629a Init restructuring 2021-04-09 01:02:03 +02:00
jorgectf
6158dd6bce Finish Sinks 2021-04-09 01:02:02 +02:00
jorgectf
bd894ae8b3 Fix flask test 2021-04-09 01:02:02 +02:00
jorgectf
3be916e82b Polish FlaskHeaderCall 2021-04-09 01:02:01 +02:00
jorgectf
46c5cb1136 Polish WerkzeugHeaderCall 2021-04-09 01:02:00 +02:00
jorgectf
6f89b3f3d9 Init Header Injection query 2021-04-09 01:02:00 +02:00
jorgectf
cd75433e39 Fix qhelp examples extension 2021-04-09 00:52:50 +02:00
jorgectf
015d203fcb Improve tests, move them and create qhelp examples 2021-04-09 00:50:47 +02:00
jorgectf
2392be08c7 Improve sink 2021-04-09 00:50:04 +02:00
jorgectf
20fc5db49e Polish query file 2021-04-09 00:49:30 +02:00
jorgectf
63bd32359a Improve qhelp 2021-04-09 00:48:57 +02:00
jorgectf
82f47f8571 Polish metadata 2021-04-08 23:55:34 +02:00
jorgectf
b405c675c2 Add qhelp last newline 2021-04-08 23:49:33 +02:00
jorgectf
95bfdc4955 Move tests to /test 2021-04-08 23:45:03 +02:00
jorgectf
1554f4f48d Create qhelp examples 2021-04-08 23:44:46 +02:00
jorgectf
3c1ca72324 Improve qhelp 2021-04-08 23:44:30 +02:00
jorgectf
7296879bc9 Polish tests 2021-04-08 23:11:20 +02:00
jorgectf
8661cb0719 Polish LDAP3Query 2021-04-08 22:56:12 +02:00
jorgectf
a1850ddad4 Change LDAP config (qll) filename 2021-04-08 22:55:48 +02:00
Dilan
d73ba13b28 autoformat fix 2021-04-08 11:41:58 -07:00
jorgectf
33423eaef3 Optimize calls 2021-04-08 00:31:53 +02:00
jorgectf
7e456494ef Set up taint config and custom sink 2021-04-08 00:20:04 +02:00
jorgectf
8ca6e84268 Refactor Calls to use ApiGraphs 2021-04-08 00:19:46 +02:00
jorgectf
aa7763b3d2 Set up Concepts 2021-04-08 00:19:14 +02:00
jorgectf
db1f54a5f3 Polish query file 2021-04-08 00:19:00 +02:00