Swift: Add more sinks to swift/cleartext-logging
#14485
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds more sinks for the
swift/cleartext-logging
query, along with some summary models forTextOutputStream
and related classes, which as you can see in the tests can be used to move data around before (potentially) outputting it.The models for
assert
,assertionFailure
,precondition
andpreconditionFailure
do not work in the tests at present. I believe, like some of the existing cases, we are waiting for better handling of@autoclosure
. I've made a note in the relevant issue to come back to this.On the MRVA 1000 we go from 20,655 to 75,403 identified sinks for this query! A pretty big increase, though many of the new results are calls to
assert
,preconditionFailure
,fatalError
etc that:@autoclosure
.asserts
where the default empty string message is used.Nevertheless there are more sinks (not limited to the above), and I don't see any incorrect sinks. No new results.