Commit Graph

2114 Commits

Author SHA1 Message Date
Anders Schack-Mulligen
036724ce8d Dataflow: Sync. 2022-10-13 11:03:30 +02:00
Mathias Vorreiter Pedersen
fc810ddbf4 Merge pull request #10775 from atorralba/atorralba/swift/custom-url-scheme-sources
Swift: Add taint sources for custom URL scheme URLs
2022-10-11 16:47:52 +01:00
Tony Torralba
8525db5af6 Add summaries for tainted URL fields 2022-10-11 17:24:26 +02:00
Tony Torralba
f4d43deec4 Add taint sources for custom URL scheme URLs 2022-10-11 17:19:04 +02:00
Tony Torralba
0892a5795d Add taint step for subscript expressions 2022-10-11 15:33:45 +02:00
Tom Hvitved
ffb2b1c15e Data flow: Sync files 2022-10-10 15:39:13 +02:00
Tom Hvitved
296ec94a2a Data flow: Sync files 2022-10-09 19:48:45 +02:00
Mathias Vorreiter Pedersen
10eb548156 Merge pull request #10699 from MathiasVP/swift-mad-summaries 2022-10-06 17:44:35 +01:00
Mathias Vorreiter Pedersen
cfbb9e3339 Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2022-10-06 17:04:56 +01:00
Mathias Vorreiter Pedersen
7a425ffcc3 Update swift/ql/lib/codeql/swift/elements/type/NominalType.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2022-10-06 16:59:31 +01:00
Mathias Vorreiter Pedersen
0065a5af96 Swift: Accept path-explanation test changes. 2022-10-06 10:30:18 +01:00
Mathias Vorreiter Pedersen
1edd4d855a Swift: Add an example with flow through a callback function. 2022-10-06 10:30:11 +01:00
Mathias Vorreiter Pedersen
197f036797 Swift: Support local MaD steps in both dataflow and taintflow. 2022-10-06 10:30:04 +01:00
Mathias Vorreiter Pedersen
9d069b32b0 Swift: Create ArgumentNodes and OutNodes for MaD. 2022-10-06 10:29:59 +01:00
Mathias Vorreiter Pedersen
0b6ea703ea Swift: Create explicit parameter nodes for source parameters and MaD parameters. 2022-10-06 10:29:52 +01:00
Mathias Vorreiter Pedersen
bba70a70fb Swift: Support selecting fields in Swift MaD. 2022-10-06 10:29:45 +01:00
Tom Hvitved
0beea9fd1a Fix typos 2022-10-05 15:54:52 +02:00
Tom Hvitved
6f518c1996 Data flow: Sync files 2022-10-05 12:58:29 +02:00
Geoffrey White
e196caa7bd Merge pull request #10595 from MathiasVP/swift-class-or-struct
Swift: Add `ClassOrStructDecl` class
2022-10-04 14:56:53 +01:00
Mathias Vorreiter Pedersen
2593120300 Merge pull request #10597 from geoffw0/swifttaintsource
Swift: URL taint sources
2022-10-04 09:22:27 +01:00
Geoffrey White
1fb54ad3e3 Swift: make QLDoc style check happy. 2022-09-28 09:28:48 +01:00
Geoffrey White
9780dffa79 Merge pull request #10596 from geoffw0/swifturl
Swift: URL is a struct, not a class
2022-09-28 09:15:29 +01:00
Tom Hvitved
df2b586e7c Merge pull request #10577 from hvitved/dataflow/get-a-read-content-fan-in
Data flow: Fix bad join-order when getAReadContent has large fan-in
2022-09-27 20:04:58 +02:00
Geoffrey White
1248810e35 Swift: Add model for URL.resourceBytes and URL.lines. 2022-09-27 18:58:56 +01:00
Geoffrey White
d2c74913c8 Swift: Repair UnsafeWebViewFetch query via taint summary. 2022-09-27 18:25:32 +01:00
Mathias Vorreiter Pedersen
485568331a Swift: Add a class that's the union of struct and class. 2022-09-27 17:52:12 +01:00
Tom Hvitved
335e1a8233 Address review comments 2022-09-27 13:36:52 +02:00
Tom Hvitved
45fc62f16b Data flow: Sync files 2022-09-26 20:39:48 +02:00
Anders Schack-Mulligen
1687d08587 Dataflow: Sync. 2022-09-26 16:10:03 +02:00
Tom Hvitved
ad6b870f94 Data flow: Sync files 2022-09-22 15:01:33 +02:00
Tom Hvitved
f0f4fe7286 Merge pull request #10444 from hvitved/ruby/stmt-sequence-post-update
Ruby: Add post-update nodes for compound arguments
2022-09-22 13:18:51 +02:00
Alex Denisov
ecb5708b66 Swift: fix static assert? 2022-09-22 11:17:07 +02:00
Alex Denisov
b364647d76 Swift: add stubs for new exprs 2022-09-22 11:17:07 +02:00
Alex Denisov
d937234f83 Swift: add stubs for new types 2022-09-22 11:17:07 +02:00
Alex Denisov
13fe02edfa Swift: NestedArchetypeType was removed 2022-09-22 11:17:04 +02:00
Paolo Tranquilli
96897a0cdc Swift: implement python schema
The information that was contained in `schema.yml` is now in
`swift/schema.py`, which allows a more integrated IDE experience
for writing and navigating it.

Another minor change is that `schema.Class` now has a `str` `group`
field instead of a `pathlib.Path` `dir` one.
2022-09-21 15:53:09 +02:00
Paolo Tranquilli
935d5d9619 Merge branch 'main' into redsun82/swift-ifconfigdecl-ql 2022-09-21 13:21:08 +02:00
Paolo Tranquilli
239ec74c3a Revert accidental file change 2022-09-21 12:16:57 +02:00
Paolo Tranquilli
69dfdf5a34 Swift: fix IfConfigDecl in QL libraries
This fixes `IfConfigDecl` for both the AST printer and control flow
libraries.

It turns out that the active lements of an `IfConfigDecl` are already
listed in the enclosing scope (like a `BraceStmt`), so they should not
be listed as children, and `IfConfigDecl` can be jsut a leaf in the
control flow.
2022-09-21 12:12:55 +02:00
Tom Hvitved
db8b6ac69a Data flow: Sync files 2022-09-21 11:02:24 +02:00
Paolo Tranquilli
a50f3f752b Swift: move toposort in schema.py
This makes the result of code generation independent of the order
in which classes are defined in the schema, and makes additional
topological sorting not required.

Being independent from schema order will be important for reviewing the
move to a pure python schema, as generated code will be left untouched.
2022-09-21 10:49:12 +02:00
Paolo Tranquilli
b4df557c5a Merge branch 'main' into redsun82/swift-do-not-extract-inactive-ifconfig-clauses 2022-09-20 15:41:34 +02:00
Paolo Tranquilli
dfc91bb0f0 Swift: make type non optional in TypeRepr 2022-09-20 15:23:27 +02:00
Paolo Tranquilli
72a4bd3f1e Swift: group unresolved elements and remove their tests 2022-09-20 15:22:20 +02:00
Paolo Tranquilli
7ae68fcc03 Swift: rework IfConfigDecl schema 2022-09-20 15:11:58 +02:00
Dave Bartolomeo
c5622135a6 Add lock files for Swift packs 2022-09-14 10:21:40 -04:00
Mathias Vorreiter Pedersen
6074f22d3f Merge pull request #10335 from github/redsun82/swift-weak-hashing-phase-1
Swift: first version of query targeting weak hashing
2022-09-14 08:29:47 +01:00
Tony Torralba
569fad667a Merge pull request #10360 from atorralba/atorralba/fix-taint-implicit-reads
Dataflow: Fix implicit reads in taint tracking when FlowStates are used
2022-09-09 14:28:39 +02:00
Paolo Tranquilli
a8a34addde Merge branch 'main' into redsun82/swift-weak-hashing-phase-1 2022-09-09 11:07:41 +02:00
Paolo Tranquilli
c739bbb051 Swift: bake in isProbablySafe in SensitiveExpr
Also restructured the code a bit in the weak hashing query.
2022-09-09 11:00:02 +02:00