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
Tony Torralba
7db1eb98f5
Sync files
2022-09-08 17:32:03 +02:00
Tom Hvitved
b3653cc3d0
Merge pull request #10216 from hvitved/ssa/shared-lib
...
SSA: Create a new `codeql/shared-ssa` library pack and move implementation there
2022-09-08 15:39:29 +02:00
Michael Nebel
e265b07a93
Merge pull request #10127 from michaelnebel/csharp/clearscontent
...
C#: Replace clears content with CSV summaries.
2022-09-08 09:26:08 +02:00
Paolo Tranquilli
19b13ee4e3
Swift: first draft of query targeting weak hashing
2022-09-07 15:58:35 +02:00
Geoffrey White
d0cda04909
Swift: Clearer, possibly more efficient implementation.
2022-09-06 13:48:04 +01:00
Geoffrey White
8281d92e71
Swift: Add barriers for encryption.
2022-09-06 13:37:49 +01:00
Tom Hvitved
9ebabd1e1f
SSA: Strip shared from namespace and qlpack name
2022-09-05 11:17:30 +02:00
Paolo Tranquilli
48761b8667
Merge pull request #10233 from github/redsun82/swift-conversions-in-print-ast
...
Swift: show conversions in `PrintAst`
2022-09-02 16:13:21 +02:00
Paolo Tranquilli
3d0d3ecfca
Swift: fix stupid typo
2022-09-02 15:35:22 +02:00
Paolo Tranquilli
c842ae40f6
Swift: make node properties consistent with other languages
2022-09-02 15:31:37 +02:00
Paolo Tranquilli
e3e9774956
Swift: print conversions similarly to C++
2022-09-02 15:31:37 +02:00
Michael Nebel
5511bc8e28
Java/Ruby/Swift: Sync files.
2022-09-02 15:17:24 +02:00
Tom Hvitved
ba62b9e822
Address review comments
2022-09-02 13:07:27 +02:00
Tom Hvitved
6b728acd9e
Use specific codeql/shared-ssa pack for the SSA library
2022-09-01 21:23:33 +02:00
Geoffrey White
8ff0a191be
Merge pull request #10254 from MathiasVP/swift-base-and-derived-on-decls
...
Swift: Add `getBaseTypeDecl` to `TypeDecl`
2022-09-01 10:35:29 +01:00
Mathias Vorreiter Pedersen
96752f0fc4
Merge pull request #10061 from geoffw0/cleartext
...
Swift: Queries for CWE-311 (originally CWE-200)
2022-09-01 09:39:58 +01:00
Mathias Vorreiter Pedersen
e294b8f74a
Swift: Add convenience member predicates to 'TypeDecl'.
2022-09-01 09:28:37 +01:00
Tom Hvitved
8e5d6ba4f9
SSA: Create a new shared library pack and move implementation there
2022-09-01 09:36:49 +02:00
Tom Hvitved
d5200efef3
Merge pull request #10203 from hvitved/ssa/param-module
...
SSA: Make shared library a parameterized module
2022-09-01 09:27:05 +02:00
Geoffrey White
60fad4d652
Merge remote-tracking branch 'upstream/main' into swiftcleanup
2022-08-31 16:04:39 +01:00
Geoffrey White
be88c4f171
Swift: Clean up the URL.init model.
2022-08-31 15:25:24 +01:00
Paolo Tranquilli
122433096d
Swift: fix wrong class name
2022-08-31 14:19:21 +02:00
Tom Hvitved
643efb3d6b
Swift: Adapt to parameterized SSA implementation
2022-08-31 11:56:24 +02:00
Tom Hvitved
760c7beb94
SSA: Sync files
2022-08-31 11:45:15 +02:00
Mathias Vorreiter Pedersen
f846c262dc
Merge pull request #10157 from MathiasVP/swift-field-flow-2
...
Swift: Add field flow
2022-08-31 10:42:00 +01:00
Paolo Tranquilli
aa54e4bb46
Swift: add some typing information to PrintAst
2022-08-31 11:31:15 +02:00
Paolo Tranquilli
a237f691b5
Swift: show conversions in PrintAst
...
This also showcases the customizability of the `PrintAst` infrastructure
resting on generated code.
2022-08-31 11:28:17 +02:00
Paolo Tranquilli
c0f477e5c1
Swift: reorder generic type param children in nominal types
2022-08-31 10:57:34 +02:00
Paolo Tranquilli
66e6c7bb13
Swift: make GenericTypeParamDecls children
2022-08-31 10:47:36 +02:00
Paolo Tranquilli
3ce76e6c08
Swift: preserve base order in code generation
2022-08-31 10:45:22 +02:00
Paolo Tranquilli
742cf0a593
Swift: hide orphaned DeclRefExpr nodes
2022-08-31 08:35:00 +02:00
Paolo Tranquilli
8f09485414
Swift: enhance PrintAst testing
...
The `ParentChild` tests have been generalized to test all `PrintAst`
by factoring out `PrintAstNode` into a separate file.
The `child.ql` and `parent.ql` tests have been removed as they are
subsumed by `PrintAst.ql`. Also, a new `no_parent_child_loops` is
added to detect back edges to a root node (back edges to a non-root
node are already detected by `no_double_parents.ql`).
2022-08-31 06:54:30 +02:00
Paolo Tranquilli
cd632dcfee
Swift: minor tweaks
...
Replace string singleton with a newtype-based one, and fix some doc
comment cosmetics.
2022-08-31 06:39:35 +02:00
Mathias Vorreiter Pedersen
a4209df239
Merge branch 'main' into swift-field-flow-2
2022-08-30 18:52:23 +01:00