Commit Graph

4303 Commits

Author SHA1 Message Date
Dave Bartolomeo
c5622135a6 Add lock files for Swift packs 2022-09-14 10:21:40 -04:00
Paolo Tranquilli
dad0e4decc Revert "Swift: print a helpful message on macOS ARM" 2022-09-14 10:34:46 +02: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
Paolo Tranquilli
c3320a3afe Apply suggestions from code review
Co-authored-by: hubwriter <hubwriter@github.com>
2022-09-14 08:21:58 +02:00
Paolo Tranquilli
9227203336 Swift: print a helpful message on macOS ARM
Also remove the tentative way compilation was expected to be fixed on
macOS ARM without really working.

In the future we will create universal binaries (which requires
compiling our prebuilt package for ARM as well), but until then we must
require the developer to pass `--cpu=darwin_x86_64` to the build
command when building on an ARM macOS platform like the M1. This will be
printed out explicitly now if it's not the case.
2022-09-13 11:00:47 +02:00
Paolo Tranquilli
43e5abac39 Swift: do not extract unresolved things from IfConfigDecl
This avoids extracting things that are unresolved within an
`IfConfigDecl` instance:
* all conditions
* all inactive code blocks
This is meant to test out the hypothesis that this should solve some
extractor issues. If going through with it we should definitely change
the schema model for this.

Also, tests have not been updated and are expected to fail.
2022-09-12 16:34:28 +02:00
AlexDenisov
be21b26d46 Merge pull request #10045 from github/alexdenisov/swift-cwe-757
Swift: CWE-757: insecure TLS configuration
2022-09-12 15:25:15 +02:00
AlexDenisov
568eb3a118 Update swift/ql/src/queries/Security/CWE-757/InsecureTLS.qhelp
Co-authored-by: hubwriter <hubwriter@github.com>
2022-09-12 14:00:29 +02:00
Paolo Tranquilli
776df33f55 Swift: fix typos and comments in testCrypto.swift 2022-09-12 08:47:43 +02: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
6223103bbd Swift: add more testing to WeakSensitiveDataHashing 2022-09-09 11:02:08 +02:00
Paolo Tranquilli
fccf07c5bc Swift: tweak qhelp file for WeakSensitiveDataHashing 2022-09-09 11:01:24 +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
erik-krogh
26d8553f6e ensure consistent casing of names 2022-09-09 10:34:14 +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
Alex Denisov
a8a2c9e212 Swift: CWE-757: update severity 2022-09-08 10:40:16 +02:00
Alex Denisov
d455a557be Swift: CWE-757: update docs and user facing text 2022-09-08 10:31:23 +02:00
Alex Denisov
d18ad665b6 Swift: CWE-757: Insecure TLS configuration 2022-09-08 09:34:04 +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
Mathias Vorreiter Pedersen
417b2152d8 Merge pull request #10319 from geoffw0/cleartextbarrier 2022-09-08 00:30:57 +01:00
Paolo Tranquilli
a5233c0d01 Swift: fix @id 2022-09-07 16:17:45 +02:00
Paolo Tranquilli
19b13ee4e3 Swift: first draft of query targeting weak hashing 2022-09-07 15:58:35 +02:00
Geoffrey White
d1867b9716 Merge pull request #10284 from geoffw0/stringlengthcleanup
Swift: Improve swift/string-length-conflation
2022-09-06 14:07:02 +01:00
Geoffrey White
d0cda04909 Swift: Clearer, possibly more efficient implementation. 2022-09-06 13:48:04 +01:00
Geoffrey White
0741266cea Swift: Switch from isSanitizerIn to isSanitizer. 2022-09-06 13:37:49 +01:00
Geoffrey White
8281d92e71 Swift: Add barriers for encryption. 2022-09-06 13:37:49 +01:00
Geoffrey White
9683a95162 Swift: Add a few more test cases. 2022-09-06 13:37:48 +01:00
Tom Hvitved
9ebabd1e1f SSA: Strip shared from namespace and qlpack name 2022-09-05 11:17:30 +02:00
Geoffrey White
a14efcfb69 Merge branch 'main' into stringlengthcleanup 2022-09-02 19:26:28 +01:00
Geoffrey White
e96e965bf9 Swift: Rename 'member' -> 'memberRef' for readability. 2022-09-02 19:21:58 +01:00
Geoffrey White
361ddb844e Swift: Simplify isSource (behaviour preserving). 2022-09-02 19:21:52 +01:00
Geoffrey White
5b528573ce Swift: Update similar cases. 2022-09-02 19:21:51 +01:00
Geoffrey White
c3a8da4570 Swift: Use getABaseTypeDecl() to improve StringLengthConflation.ql. 2022-09-02 19:21:50 +01:00
Mathias Vorreiter Pedersen
b471b51535 Swift: Add convenience member predicates to 'TypeDecl'. 2022-09-02 18:23:07 +01: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
2234070bfe Swift: ...and accept the test 2022-09-02 15:36:46 +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
aad77c2388 Swift: Use TypeDecl.getABaseTypeDecl(). 2022-09-01 10:42:09 +01: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
Geoffrey White
d3250a7e16 Swift: Fix finding base classes. 2022-09-01 09:01:56 +01:00
Geoffrey White
92a927efa7 Swift: Remove special case (no longer required). 2022-09-01 08:53:51 +01:00