Paolo Tranquilli
521e6235b5
Swift: use std::filesystem and picoSHA2
...
This replaces usages of `llvm::fs` and string manipulation with
`std::filesystem`, also replacing `std::string` with
`std::filesystem::path` where it made sense.
Moreover MD5 hashing used in macOS file remapping was replaced by
SHA256 hashing using a small header-only SHA256 C++ library with an
MIT license, https://github.com/okdshin/PicoSHA2 .
File contents hashing was relocated to the newly created `file` library
for later planned reuse.
2022-10-26 13:23:44 +02:00
Paolo Tranquilli
e422a4eef9
Swift: move TargetFile to a separate lib
2022-10-26 10:54:51 +02:00
Paolo Tranquilli
c8788bb5cd
Swift: move libraries from tools to third_party
2022-10-26 07:05:56 +02:00
Geoffrey White
53fa91f8ba
Swift: Add comment.
2022-10-25 16:51:57 +01:00
Geoffrey White
a67bd4d903
Swift: Fix name clash.
2022-10-25 16:40:27 +01:00
Geoffrey White
3d025ea77e
Merge pull request #10903 from geoffw0/review
...
Swift: Add some summary queries.
2022-10-25 14:47:09 +01:00
Geoffrey White
b59f01f968
Swift: Use UnknownFile.
2022-10-25 13:44:13 +01:00
Karim Ali
18dd0f650c
update iterations threshold to most recent OWASP recommendation
...
which is at least 120,000 iterations for secure password hashing
2022-10-25 14:01:40 +02:00
Karim Ali
408c7bebe5
fix .expected file
2022-10-25 13:24:37 +02:00
Karim Ali
e8f55b9f0d
update output message
2022-10-25 13:24:37 +02:00
Karim Ali
c0ac29db16
clarify qhelp + add references to it
2022-10-25 13:24:37 +02:00
Karim Ali
4b7cb706f6
fix error in checking # of iterations
...
plus also simplify the pattern matching of the sink classes
2022-10-25 13:24:37 +02:00
Karim Ali
0d2e7d43b9
add expected output
2022-10-25 13:24:37 +02:00
Karim Ali
5179a99abb
fix test cases to use the correct class name
2022-10-25 13:24:37 +02:00
Karim Ali
c4b2519e6c
initial draft of the Swift query for CWE-916
2022-10-25 13:24:37 +02:00
Paolo Tranquilli
d419749eb2
Swift: fix missing extraction of function bodies in SPM builds
...
For some reason `-experimental-skip-non-inlinable-function-bodies-without-types`
is passed to the frontend, which will skip extraction of most bodies.
By suppressing that option the problem goes away.
2022-10-24 17:11:13 +02:00
Paolo Tranquilli
6651c9447e
Swift: failing test for extracting function bodies
2022-10-24 17:10:38 +02:00
Tony Torralba
30f5fb6d83
Update expectations after merge
2022-10-24 14:24:13 +02:00
Tony Torralba
f523fbc9d0
Merge branch 'main' into atorralba/swift/customurlschemes
2022-10-24 11:41:50 +02:00
Tony Torralba
3973e1ce04
Update swift/ql/test/library-tests/dataflow/dataflow/FlowConfig.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-10-24 11:37:51 +02:00
Paolo Tranquilli
90d4861b70
Merge pull request #10875 from github/redsun82/swift-codegen-doc
...
Swift: add infrastructure for documenting generated code
2022-10-24 10:14:57 +02:00
Tony Torralba
80f7d58fae
Add missing tests for not-quite-working flow steps
2022-10-24 09:37:22 +02:00
Geoffrey White
8a8b1aff7f
Swift: Restrict expressions count to expressions with locations.
2022-10-21 18:57:15 +01:00
Geoffrey White
3215295d06
Swift: simpkify SummaryStats.ql description.
2022-10-21 18:48:08 +01:00
Paolo Tranquilli
6bd09b1858
Merge branch 'main' into redsun82/swift-codegen-doc
2022-10-21 15:31:52 +02:00
Paolo Tranquilli
408968a417
Swift: fix swift compilation in QL tests
2022-10-21 15:20:38 +02:00
Paolo Tranquilli
bd62f2be0e
Merge branch 'main' into redsun82/swift-fix-qltest-failure-reporting
2022-10-21 14:07:19 +02:00
Paolo Tranquilli
04f6debb88
Swift: fix bazel packaging
2022-10-21 13:42:24 +02:00
Paolo Tranquilli
dbdf6ea489
Swift: fix qltest failure reporting
...
`qltest.sh` was not exiting with a failure when the extractor was
failing.
2022-10-21 12:54:09 +02:00
Paolo Tranquilli
cf7a5f877b
Swift: add qltest.sh tests
2022-10-21 12:54:09 +02:00
Tony Torralba
7a43bdbf05
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-10-21 10:20:01 +02:00
Geoffrey White
138643519c
Merge pull request #10757 from geoffw0/sqlinject
...
Swift: Query for SQL injection
2022-10-20 18:55:38 +01:00
Geoffrey White
661106c1a0
Apply suggestions from code review
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-10-20 17:54:40 +01:00
Geoffrey White
5a3577679d
Swift: Improve metadata.
2022-10-20 12:44:56 +01:00
Geoffrey White
adeef309f3
Swift: Add some queries to help examine databases.
2022-10-20 12:34:07 +01:00
Paolo Tranquilli
7144383505
Swift: fix british spelling of behaviour
2022-10-20 11:43:46 +02:00
Paolo Tranquilli
f9df8a645f
Swift: fix potential name conflict on schema class fields
2022-10-20 11:30:05 +02:00
Paolo Tranquilli
8813aea893
Swift: allow default class doc name to be set for properties
2022-10-20 11:23:13 +02:00
Paolo Tranquilli
c22a7e1c81
Swift: rename _DocnameModifier to _DocModifier
2022-10-20 11:05:55 +02:00
Paolo Tranquilli
37b405f134
Swift: add generated docs for predicates
2022-10-20 11:05:01 +02:00
Paolo Tranquilli
22bd10132f
Swift: insert blank line between doc and desc
2022-10-20 10:49:26 +02:00
Paolo Tranquilli
b65f49bd50
Swift: document introducer_int
2022-10-20 10:46:12 +02:00
Paolo Tranquilli
7b181a2de0
Swift: change doc of Immediate property getters
2022-10-20 10:39:37 +02:00
Paolo Tranquilli
6830c2f355
Swift: enhance property docs
2022-10-20 10:35:47 +02:00
Paolo Tranquilli
9abaa5c0b3
Swift: rename doc_name with doc in properties
2022-10-20 08:59:08 +02:00
Paolo Tranquilli
492d5aec78
Swift: rename doc to description in properties
2022-10-20 08:57:41 +02:00
Geoffrey White
5b1e138300
Swift: Another qhelp edit.
2022-10-19 20:49:26 +01:00
Geoffrey White
495f744cd3
Swift: Attempt to address qhelp suggestions.
2022-10-19 20:44:27 +01:00
Geoffrey White
05d9c7b892
Swift: More 'an SQL' -> 'a SQL'.
2022-10-19 19:44:59 +01:00
Geoffrey White
83dc6d1564
Apply suggestions from code review
...
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com >
2022-10-19 19:42:35 +01:00