Commit Graph

653 Commits

Author SHA1 Message Date
Tony Torralba
1d745a6365 Merge pull request #10774 from atorralba/atorralba/swift/url-field-summaries
Swift: Add summaries for tainted URL fields
2022-10-18 15:32:23 +02:00
Tony Torralba
0eeaf71716 Simplify models by introducing TaintInheritingContent 2022-10-18 12:36:18 +02:00
Paolo Tranquilli
e29fe54b3c Swift: remove redudant import 2022-10-18 12:35:35 +02:00
Paolo Tranquilli
f4f5e3e382 Swift: remove redundant module namespace 2022-10-18 12:32:31 +02:00
Paolo Tranquilli
af3f782ad5 Swift: fix TypeDecl.qll 2022-10-18 12:21:06 +02:00
Paolo Tranquilli
581939d139 Swift: replace non-genereated Base suffixes
This is the effect of running
```
find swift/ql/lib/codeql/swift/elements -type f | xargs sed -ri 's/\b([A-Z]\w+)Base\b/Generated::\1/g'
```
followed by reformatting.
2022-10-18 12:21:06 +02:00
Paolo Tranquilli
307c885c1f Swift: use Generated:: instead of Base suffix
This commit changes `codegen` and the generated classes.
2022-10-18 12:21:06 +02:00
Geoffrey White
040d72e7f1 Merge pull request #10857 from geoffw0/locationstring
Swift: Give Location a useful toString
2022-10-17 18:10:51 +01:00
Paolo Tranquilli
3a99b9845e Merge pull request #10856 from github/redsun82/swift-show-ql-class-in-collapsed-hierarchy-tests
Swift: show QL class in generated tests on collapsed hierarchies
2022-10-17 16:38:24 +02:00
Geoffrey White
dcf254a9e3 Swift: Make QL-for-QL happy. 2022-10-17 14:23:28 +01:00
Geoffrey White
0281bfedda Merge pull request #10689 from d10c/swift/cleartext-storage-nsuserdefaults
Swift: Query for CWE-312: Exposure of sensitive information using NSUserDefaults
2022-10-17 14:05:17 +01:00
Geoffrey White
13f9834fde Merge pull request #10780 from karimhamdanali/swift-hardcoded-key
Swift: detect hardcoded encryption keys
2022-10-17 14:02:31 +01:00
Geoffrey White
85e164d4f6 Swift: QLDoc some stuff while we're here. 2022-10-17 13:22:44 +01:00
Geoffrey White
3b9151cb24 Swift: Restore UnknownLocation.toString(), it seems helpful. 2022-10-17 13:11:22 +01:00
Paolo Tranquilli
e49268d036 Swift: show QL class in generated tests on collapsed hierarchies
In those kinds of tests the results may have different final classes
that are not necessarily visible (or tested) solely through the string
representation. For better testing and reading of expected results,
`getQlPrimaryClasses` is added in these cases.
2022-10-17 14:08:04 +02:00
Geoffrey White
9c8bbe384b Swift: Add Location.toString. 2022-10-17 12:48:17 +01:00
Geoffrey White
4d0c23c4da Swift: Add a test of Location.qll. 2022-10-17 12:45:26 +01:00
Paolo Tranquilli
789be9a1ad Swift: add ImplicitConversionExpr test 2022-10-17 12:57:44 +02:00
Karim Ali
bbc03a1578 add false negatives to the test case 2022-10-17 12:54:34 +02:00
Karim Ali
bb3bf64364 update example with both AES and Blowfish for better clarity 2022-10-17 12:54:34 +02:00
Karim Ali
b840a41222 fix typo in doc 2022-10-17 12:54:34 +02:00
Karim Ali
e942cfb98e fix typos in docs and in-code comments 2022-10-17 12:54:34 +02:00
Karim Ali
aef9645bd6 change use of toString() to getName() 2022-10-17 12:54:34 +02:00
Karim Ali
81e027f225 address QLDoc style comments 2022-10-17 12:54:34 +02:00
Karim Ali
d56c82ff75 add a query that detects hardcoded keys 2022-10-17 12:54:34 +02:00
Tony Torralba
81d38132cf Fix test expectations 2022-10-17 12:00:51 +02:00
Tony Torralba
1e4850044c Increase precision of the URL(string:relativeTo:) models 2022-10-17 11:29:30 +02:00
Anders Schack-Mulligen
6ef5fac239 Merge pull request #10814 from aschackmull/dataflow/synth-global
Dataflow: Add support for synthetic global fields in MaD.
2022-10-17 08:34:26 +02:00
Josh Soref
eaa8ca0752 spelling: parameter
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 19:42:46 -04:00
Josh Soref
6d8074e3c6 spelling: observer
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 19:42:46 -04:00
Josh Soref
9b9b54a905 spelling: implementation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 19:42:46 -04:00
Josh Soref
243991fae7 spelling: constants
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 19:42:46 -04:00
Josh Soref
893c5457a8 spelling: disambiguation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 10:56:40 -04:00
Anders Schack-Mulligen
f1634d3dca Dataflow: Add support for C#/Python/Ruby/Swift. 2022-10-13 14:29:27 +02:00
Anders Schack-Mulligen
69bf13b1d4 Dataflow: Sync. 2022-10-13 14:19:12 +02:00
Anders Schack-Mulligen
036724ce8d Dataflow: Sync. 2022-10-13 11:03:30 +02:00
Tony Torralba
4b2aa93a05 Update test expectations after rebase 2022-10-11 17:54:59 +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
Nora Dimitrijević
b7ad287cb1 Swift: rename stub parameters to match docs. 2022-10-10 18:46:39 +02:00
Tom Hvitved
ffb2b1c15e Data flow: Sync files 2022-10-10 15:39:13 +02:00
Nora Dimitrijević
8664017fe4 Swift: Working tests 2022-10-10 14:08:04 +02:00
Nora Dimitrijević
8a08a3ecce Merge branch 'main' into swift/cleartext-storage-nsuserdefaults 2022-10-10 14:06:32 +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