CWE 830 test where both branches in a ternary are unsafe

This commit is contained in:
Stephan Brandauer
2022-02-22 09:01:46 +01:00
parent 2934aa1a3a
commit d80cd1aeb5
3 changed files with 13 additions and 5 deletions

View File

@@ -69,8 +69,7 @@ module StaticCreation {
}
override string getProblem() {
result =
"Script loaded from content delivery network with no integrity check."
result = "Script loaded from content delivery network with no integrity check."
}
}
@@ -78,7 +77,9 @@ module StaticCreation {
class IframeElementWithUntrustedContent extends AddsUntrustedUrl instanceof HTML::IframeElement {
IframeElementWithUntrustedContent() { isUntrustedSourceUrl(super.getSourcePath()) }
override string getProblem() { result = "HTML iframe element loaded using unencrypted connection." }
override string getProblem() {
result = "HTML iframe element loaded using unencrypted connection."
}
}
}