Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift:chore - Improvements Tests of all Swift Rules #953

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

wiliansilvazup
Copy link
Contributor

@wiliansilvazup wiliansilvazup commented Jan 26, 2022

Add improvements for swift rules with scenarios vulnerables and safe codes in yours tests.
Follow the issue #630 for more details.
Notes:

Why before swift tool using horusec-engine found 16 vulnerabilities and now found only 4?

  • Abouts rule HS-SWIFT-14, Before in examples folder this rule is found 11 times and now is showed only 3 times, because I changed to only get the specific code loadHTMLString avoiding repetition of vulnerabilities.
  • About rule HS-SWIFT-20, Before in examples folder this rule is found 5 times and now is showed only 1 time, because I changed to only get the specific code UIWebView\(\) other thing before it was just UIWebView and it can generate a lot of false positives and now it does not.

Signed-off-by: wilian wilian.silva@zup.com.br

internal/services/engines/swift/rules_test.go Outdated Show resolved Hide resolved
internal/services/engines/swift/rules.go Outdated Show resolved Hide resolved
@wiliansilvazup wiliansilvazup force-pushed the chore/swift-rules-tests branch 2 times, most recently from 2add364 to 3780ebf Compare January 28, 2022 13:17
@wiliansilvazup wiliansilvazup force-pushed the chore/swift-rules-tests branch from 3780ebf to 190b4da Compare February 2, 2022 18:31
@wiliansilvazup wiliansilvazup force-pushed the chore/swift-rules-tests branch 4 times, most recently from 19cb566 to c5dc712 Compare February 3, 2022 11:56
Copy link
Contributor

@iancardosozup iancardosozup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve conflicts and make your commit verified

Add improvements for swift rules with scenarios vulnerables and safe codes in yours tests.
Follow the issue #630 for more details.
Notes:
> Why before swift tool using horusec-engine found 16 vulnerabilities and now found only 1?
* Abouts rule HS-SWIFT-14, Before in examples folder this rule is found 11 times
and now is showed only 3 times, because I changed to only get the specific code
`loadHTMLString` avoiding repetition of vulnerabilities.
* About rule HS-SWIFT-20, Before in examples folder this rule is found 5 times
and now is showed only 1 time, because I changed to only get the specific code
`UIWebView\(\)` other thing before it was just UIWebView and
it can generate a lot of false positives and now it does not.

Signed-off-by: wilian <wilian.silva@zup.com.br>
Signed-off-by: Wilian Gabriel <wilian.silva@zup.com.br>
@wiliansilvazup wiliansilvazup force-pushed the chore/swift-rules-tests branch from c5dc712 to c15ec96 Compare February 8, 2022 14:29
@wiliansilvazup
Copy link
Contributor Author

resolve conflicts and make your commit verified

done

@wiliansilvazup wiliansilvazup merged commit 43c551d into main Feb 9, 2022
@wiliansilvazup wiliansilvazup deleted the chore/swift-rules-tests branch February 9, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants