Commit Graph

563 Commits

Author SHA1 Message Date
Geoffrey White
fa5e03a53d Swift: Add tests of URL.resourceBytes and URL.lines. 2022-09-27 18:58:56 +01:00
Geoffrey White
69dd2c0eec Swift: Add a test of taint sources. 2022-09-27 18:58:56 +01:00
Anders Schack-Mulligen
1687d08587 Dataflow: Sync. 2022-09-26 16:10:03 +02:00
Geoffrey White
ed3d3e4ff0 Swift: fix regression. 2022-09-23 21:01:25 +01:00
erik-krogh
1fe76ecc0a update expected output 2022-09-23 12:27:06 +02:00
erik-krogh
6c3ed6cd0e update alert-messages to follow the style-guide 2022-09-23 12:23:40 +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
44f4ff18dd Swift: accept regression 2022-09-22 11:17:07 +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
3fd8136dc7 Swift: accept test results 2022-09-20 15:37:09 +02:00
Mathias Vorreiter Pedersen
90f24d3e82 Merge pull request #10430 from geoffw0/cleartextmissing
Swift: Fix missing results in swift/cleartext-storage-database
2022-09-20 14:23:29 +01: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
Geoffrey White
3573dd6728 Swift: Address review comments. 2022-09-20 12:17:21 +01:00
Erik Krogh Kristensen
a4cd913aea Merge pull request #10312 from erik-krogh/fix-caseDiff
ensure consistent casing of names
2022-09-19 10:43:12 +02:00
Geoffrey White
213cd94047 Swift: Update the test. 2022-09-16 13:24:37 +01:00
Geoffrey White
c3c86a79ee Swift: Update comment. 2022-09-14 21:08:52 +01:00
Geoffrey White
dc47771937 Swift: Fix locationless results. 2022-09-14 20:43:24 +01:00
Geoffrey White
25840996f6 Swift: Use a slightly different approach to fix false positive. 2022-09-14 20:43:23 +01:00
Geoffrey White
7b96cb071a Swift: Remove the original sink cases as they are no longer required. 2022-09-14 20:43:22 +01:00
Geoffrey White
e0100d7b98 Swift: Expand sinks and fix issue with post-update notes to catch the missing test results. 2022-09-14 20:43:22 +01:00
Geoffrey White
eb2a0af4cc Swift: Additional test case. 2022-09-14 20:43:21 +01: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
Paolo Tranquilli
c3320a3afe Apply suggestions from code review
Co-authored-by: hubwriter <hubwriter@github.com>
2022-09-14 08:21:58 +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