Commit Graph

4303 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
d53d275bba Merge pull request #11450 from d10c/swift/missing-enum-cases
Swift: extract missing cases of `AccessorKind` and `AccessSemantics` enums
2022-11-30 11:18:52 +00:00
Owen Mansel-Chan
55c4643b20 Dataflow: Sync. 2022-11-30 11:00:07 +00:00
Tony Torralba
56f5214782 Remove invalid MaD row 2022-11-30 11:10:30 +01:00
Paolo Tranquilli
d165c4963d CI: add workaround for nested composite actions issue
Because of https://github.com/actions/runner/issues/2009 the deeply
nested action cache was failing to save the cache in the post run phase.

For the moment we just avoid the nesting with a copy-pasted action
snippet.
2022-11-30 10:47:29 +01:00
Nora Dimitrijević
91edeacb9f Swift: update .expected test files 2022-11-29 19:39:48 +01:00
Paolo Tranquilli
47702b9e14 Swift: tentative fix for the bazel cache 2022-11-29 18:16:33 +01:00
Nora Dimitrijević
c5b4e87f6d Swift: AccessorDecl tests for new cases 2022-11-29 16:00:00 +01:00
erik-krogh
e5f1fe86e4 don't crash on non-existing cache in swift 2022-11-29 15:02:08 +01:00
Karim Ali
9048d5d79b fix expected output for LocalTaint 2022-11-29 15:38:44 +02:00
Paolo Tranquilli
d7313082c9 Merge pull request #11466 from github/redsun82/cache
Swift: optimize bazel caching in CI
2022-11-29 14:31:16 +01:00
Karim Ali
9d17fae00c fix expected output for TaintInline 2022-11-29 15:24:12 +02:00
Karim Ali
c0085cbb1a fix expected output for Taint.ql 2022-11-29 15:18:39 +02:00
Tony Torralba
bf023b0aed Use dominance in path injection sanitizer to avoid FNs 2022-11-29 13:33:27 +01:00
Tony Torralba
52ebf66d21 Add basic path sanitizer 2022-11-29 11:55:04 +01:00
Tony Torralba
1576ee9410 Add additional stub to avoid errors when building on Linux 2022-11-29 11:55:03 +01:00
Tony Torralba
8cc66172c3 Add path injection query 2022-11-29 11:55:03 +01:00
Paolo Tranquilli
52a117aaf5 Swift: optimize bazel caching in CI
Previously the cache would become stale. Now the same incremental
cache mechanism in use for the QL cache is adopted (and factored out
in a separate action).

Namely, pushes on main will populate the cache using the commit hash as
key, while PRs will try to use the cache of their merge base, read-only.

To avoid the cache growing out of control, a simple cache eviction is
done on pushes.
2022-11-29 11:43:54 +01:00
Geoffrey White
63c139fdbe Merge branch 'main' into constructor 2022-11-29 10:40:19 +00:00
AlexDenisov
0f87eb45db Merge pull request #11470 from github/redsun82/swift-fix-ci
Swift: revert `swift-actions/setup-swift`
2022-11-29 11:39:08 +01:00
Nora Dimitrijević
93cce0f4c2 Swift: upgrade script 2022-11-29 11:31:08 +01:00
Nora Dimitrijević
13bbee73d8 Swift: Add .generated.list file from codegen 2022-11-29 11:31:07 +01:00
Nora Dimitrijević
931173350f Swift: extract missing cases of AccessorKind and AccessSemantics
This resolves the warnings that were showing up during extractor-pack
compilation.
2022-11-29 11:31:07 +01:00
Nora Dimitrijević
36e7235493 Swift: fix -Wmissing-braces warning in extractor
By initializing va_list the standard way,
i.e. leaving it uninitialized until va_start().
2022-11-29 11:31:07 +01:00
Nora Dimitrijević
c89c449a2c Swift: silence cmake/vscode intellisense Problem
i.e. "TrapLabel not found"
2022-11-29 11:27:33 +01:00
Paolo Tranquilli
9a25de3ef1 Swift: revert swift-actions/setup-swift 2022-11-29 11:17:08 +01:00
Karim Ali
f0d9dabca2 updated expected output for LocalTaint and Tain 2022-11-29 12:13:10 +02:00
Karim Ali
9b3c4e8db2 add test case for unicodeScalars 2022-11-29 12:12:10 +02:00
Karim Ali
7541b01a86 add test case for utf8CString 2022-11-29 12:12:10 +02:00
Karim Ali
58a87396ba add taint steps for fields of String
if a String is tainted, then all its fields (including those declared in extensions) should be tainted as well
2022-11-29 12:12:10 +02:00
Mathias Vorreiter Pedersen
4233c91a7e Merge pull request #11469 from atorralba/atorralba/swift/fix-local-taint
Swift: Fix local taint
2022-11-29 10:00:12 +00:00
Tony Torralba
0e59257442 Fix local taint steps
Local taint should include local flow and simple summaries through library code
2022-11-29 10:36:56 +01:00
Tom Hvitved
f3dca95958 Merge pull request #11087 from hvitved/dataflow/summary-ctx
Data flow: Add summary/return context to pruning stages 2-4
2022-11-29 10:36:53 +01:00
Geoffrey White
c3dc9672f7 Merge branch 'main' into constructor 2022-11-29 09:30:03 +00:00
Geoffrey White
e0c8a8ecff Merge pull request #11458 from geoffw0/simplify
Swift: Simplify some QL.
2022-11-29 09:29:12 +00:00
Geoffrey White
cf7cd2b470 Swift: Convert to MaD. 2022-11-28 19:02:56 +00:00
Geoffrey White
03ae2821c3 Update swift/ql/lib/codeql/swift/frameworks/Alamofire/Alamofire.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2022-11-28 18:24:28 +00:00
Geoffrey White
349a10c013 Swift: codegen. 2022-11-28 17:41:41 +00:00
Geoffrey White
96e04e7f63 Swift: Use ConstructorDecl in place of name matching. 2022-11-28 17:39:45 +00:00
Geoffrey White
e97aee5d9d Swift: QLDoc. 2022-11-28 17:39:44 +00:00
Geoffrey White
410609fed4 Swift: Make ConstructorDecl, DestructorDecl into MethodDecls. 2022-11-28 17:20:43 +00:00
Geoffrey White
edb6325117 Swift: Fix comment. 2022-11-28 17:07:34 +00:00
Geoffrey White
aa5c893d5e Swift: Further simplify. 2022-11-28 17:07:34 +00:00
Geoffrey White
97bd91ed19 Swift: Simplify using ApplyExpr.getArgumentWithLabel. 2022-11-28 16:51:46 +00:00
Paolo Tranquilli
28bf0c9e03 Merge pull request #11365 from github/redsun82/swift-integration-test-pack
Swift: fix extractor tests pack
2022-11-28 17:02:54 +01:00
Paolo Tranquilli
ace7146164 Merge pull request #11454 from erik-krogh/swift-test
Swift: CI cache fixes
2022-11-28 16:24:22 +01:00
Mathias Vorreiter Pedersen
3716d67cc9 Merge pull request #11451 from geoffw0/wkuserscript
Swift: models for WKUserScript
2022-11-28 14:24:19 +00:00
Geoffrey White
f291320655 Merge pull request #11447 from geoffw0/localflow2
Swift: Update queries to use LocalFlowSource
2022-11-28 14:18:01 +00:00
erik-krogh
751ffbd9c8 use different keys for different caches 2022-11-28 14:44:07 +01:00
Geoffrey White
30468dd419 Swift: Implement field content as well. 2022-11-28 12:27:33 +00:00
Geoffrey White
ffbd201450 Swift: Implement basic model of WKUserScript. 2022-11-28 12:20:29 +00:00