Tom Hvitved
99e70e9a50
Data flow: Sync files
2022-11-20 10:19:23 +01:00
Paolo Tranquilli
aaa96b20ed
Swift: fix python compatibility with CI
2022-11-18 17:51:20 +01:00
Paolo Tranquilli
6dcdf8c71f
Swift: fix bazel setup
2022-11-18 17:22:44 +01:00
Paolo Tranquilli
aeb7b0d050
Swift: remove ModifiedStubMarkedAsGeneratedError
2022-11-18 17:13:12 +01:00
Nora Dimitrijević
8f5af3fca6
Merge branch 'main' into swift/js-injection
2022-11-18 17:07:20 +01:00
Paolo Tranquilli
2cd58817d7
Swift: skip QL code generation on untouched files
...
This is a developer QoL improvement, where running codegen will skip
writing (and especially formatting) any files that were not changed.
**Why?** While code generation in itself was pretty much instant, QL
formatting of generated code was starting to take a long time. This made
unconditionally running codegen quite annoying, for example before each
test run as part of an IDE workflow or as part of the pre-commit hook.
**How?** This was not completely straightforward as we could not work
with the contents of the file prior to code generation as that was
already post-processed by the QL formatting, so we had no chance of
comparing the output of template rendering with that. We therefore store
the hashes of the files _prior_ to QL formatting in a checked-in file
(`swift/ql/.generated.list`). We can therefore load those hashes at
the beginning of code generation, use them to compare the template
rendering output and update them in this special registry file.
**What else?** We also extend this mechanism to detect accidental
modification of generated files in a more robust way. Before this patch,
we were doing it with a rough regexp based heuristic. Now, we just store
the hashes of the files _after_ QL formatting in the same checked file,
so we can check that and stop generation if a generated file was
modified, or a stub was modified without removing the `// generated`
header.
2022-11-18 16:56:01 +01:00
Geoffrey White
16a84bd94a
Merge branch 'main' into alamofire2
2022-11-18 09:28:46 +00:00
Geoffrey White
2780d9a9a3
Merge branch 'main' into optionals2
2022-11-17 18:16:46 +00:00
Nora Dimitrijević
8b332778e3
Swift: update @security-severity
2022-11-17 18:08:06 +01:00
Mathias Vorreiter Pedersen
2796c46598
Merge pull request #11292 from github/redsun82/swift-remove-ipa-from-dbscheme-cpp
...
Swift: remove synthesized classes from the dbscheme
2022-11-16 16:00:58 +00:00
Paolo Tranquilli
1c69a1f012
Swift: fix typo in docstring
2022-11-16 16:36:48 +01:00
Paolo Tranquilli
27df44f5ad
Swift: replace empty IpaInfo() with a clearer True value
2022-11-16 16:35:17 +01:00
Tom Hvitved
67b6a82cf1
Merge pull request #11198 from hvitved/ssa/expose-phi-reads
...
SSA: Expose phi-read nodes
2022-11-16 15:11:58 +01:00
Geoffrey White
127888f3c1
Merge branch 'main' into alamofire2
2022-11-16 13:32:13 +00:00
Geoffrey White
c8630bbe4f
Merge branch 'main' into optionals2
2022-11-16 13:31:08 +00:00
Tom Hvitved
67e8ec1a5f
Swift: Update expected test output
2022-11-16 13:36:03 +01:00
Anders Schack-Mulligen
94bca4399a
Merge pull request #11183 from aschackmull/dataflow/groupflow
...
Dataflow: Introduce support for src/sink grouping in path results.
2022-11-16 12:59:01 +01:00
Paolo Tranquilli
bafb9ae020
Swift: add upgrade/downgrade scripts
2022-11-16 12:00:26 +01:00
Paolo Tranquilli
a3d33e27e2
Swift: ignore IPA classes in dbscheme
2022-11-16 11:39:10 +01:00
Paolo Tranquilli
88a0c4053b
Swift: move hierarchy IPA logic to schema.py
2022-11-16 11:14:17 +01:00
Nora Dimitrijević
09b669a584
Swift: Add direct call to remote source to a test
...
Strangely, there are two separate paths to each of the JSEvaluateScript
sinks: one passing through the JSString constructor, one omitting this
step.
2022-11-15 21:57:46 +01:00
Nora Dimitrijević
52e5d541ef
Update swift/ql/src/queries/Security/CWE-094/UnsafeJsEval.qhelp
...
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com >
2022-11-15 21:15:04 +01:00
Nora Dimitrijević
fccb581765
Update swift/ql/src/queries/Security/CWE-094/UnsafeJsEval.qhelp
...
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com >
2022-11-15 21:14:56 +01:00
Nora Dimitrijević
cb7d9d5f3f
Update swift/ql/src/queries/Security/CWE-094/UnsafeJsEval.qhelp
...
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com >
2022-11-15 21:14:50 +01:00
Nora Dimitrijević
8db8f14f99
Update swift/ql/src/queries/Security/CWE-094/UnsafeJsEval.qhelp
...
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com >
2022-11-15 21:14:37 +01:00
Nora Dimitrijević
b42482c960
Update swift/ql/src/queries/Security/CWE-094/UnsafeJsEval.qhelp
...
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com >
2022-11-15 21:14:18 +01:00
Geoffrey White
e81c62e402
Swift: Correct comment.
2022-11-15 18:34:51 +00:00
Geoffrey White
7c1fb5d4a6
Swift: Add qldoc for AutoClosureExpr.
2022-11-15 18:31:30 +00:00
Geoffrey White
4eee375296
Swift: Add AutoClosureExpr.getExpr.
2022-11-15 18:31:30 +00:00
Geoffrey White
13d6deb9c4
Swift: Make similar enhancements to unary operations.
2022-11-15 18:31:30 +00:00
Geoffrey White
70075e2832
Swift: Add qldoc for BinaryExpr.
2022-11-15 18:31:21 +00:00
Geoffrey White
3c46b0cad1
Swift: Add BinaryExpr.getOperator().
2022-11-15 18:04:48 +00:00
Geoffrey White
fa86e75330
Update swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-11-15 17:49:23 +00:00
AlexDenisov
f069802abb
Merge pull request #11277 from github/redsun82/swift-remove-ipa-from-dbscheme-cpp
...
Swift: remove IPA classes from `cppgen`
2022-11-15 18:34:59 +01:00
AlexDenisov
eb2f1ff559
Merge pull request #11274 from github/redsun82/swift-remove-double-newlines-in-schema
...
Swift: remove double newlines in schema
2022-11-15 18:34:32 +01:00
Geoffrey White
1b6317d584
Update swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-11-15 17:19:32 +00:00
Paolo Tranquilli
56b207e41f
Swift: remove IPA classes from cppgen
2022-11-15 17:07:52 +01:00
Tony Torralba
89a8ccb828
Merge pull request #11273 from atorralba/atorralba/swift/string-utf8-step
...
Swift: Add `AdditionalTaintStep`
2022-11-15 16:46:26 +01:00
Tony Torralba
8ca004fde1
Add AdditionalTaintStep
2022-11-15 16:14:22 +01:00
Paolo Tranquilli
635391eae8
Swift: autopep8 integration tests
2022-11-15 15:43:05 +01:00
Paolo Tranquilli
c2171c01e1
Swift: remove double newlines in schema
...
While PEP8 mandates those, they look bad in the schema file.
`autopep8` already ignores those, and they were single newlines at some
point until an overeager IDE has "fixed" them at some point without me
realizing.
Also, the pre-commit configuration was updated to take `schema.py` into
account.
2022-11-15 15:00:30 +01:00
Geoffrey White
9887e2b53b
Merge branch 'main' into alamofire2
2022-11-15 12:19:54 +00:00
Geoffrey White
ae5689b295
Swift: Update comment.
2022-11-15 12:04:10 +00:00
Geoffrey White
4c806a442a
Swift: Dataflow through ? :.
2022-11-15 12:01:09 +00:00
Geoffrey White
52d5578fb5
Swift: Dataflow through second argument of ??.
2022-11-15 11:43:43 +00:00
Geoffrey White
2dbb891942
Swift: Dataflow through ??.
2022-11-15 11:42:43 +00:00
Geoffrey White
9b38e1102a
Swift: Add more tests of optionals.
2022-11-15 11:41:04 +00:00
Tony Torralba
5791e8b9a2
Slight renaming
2022-11-14 15:46:44 +01:00
Tony Torralba
07de92cdb6
Move AEXML.qll to avoid nesting
2022-11-14 15:46:44 +01:00
Tony Torralba
f2888dcb1e
Add sinks and tests for the AEXML library.
2022-11-14 15:46:44 +01:00