Skip to content

Commit e66d3d8

Browse files
committed
Update expected js sarif for scan
and change htmlsink def to updated one
1 parent 3b1847d commit e66d3d8

3 files changed

Lines changed: 3 additions & 23 deletions

File tree

.github/workflows/javascript.sarif.expected

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Fragment.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class FragmentLoad extends InvokeNode, MethodCallNode {
1717
or
1818
exists(RequiredObject requiredModule, SapDefineModule sapModule |
1919
this = requiredModule.asSourceNode().getAMemberCall("load") and
20-
//ensure it is an sap module define
20+
/* ensure it is an sap module define */
2121
requiredModule.getEnclosingFunction() = sapModule.getArgument(1)
2222
)
2323
}

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5View.qll

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,6 @@ predicate isBuiltInControl(string qualifiedTypeUri) {
186186
)
187187
}
188188

189-
/**
190-
* A UI5 Fragment that might include XSS sources and sinks in standard controls.
191-
*/
192-
abstract class UI5Fragment extends File {
193-
abstract UI5Control getControl();
194-
195-
abstract UI5BindingPath getASource();
196-
197-
abstract UI5BindingPath getAnHtmlISink();
198-
}
199-
200189
/**
201190
* A UI5 View that might include XSS sources and sinks in standard controls.
202191
*/
@@ -716,16 +705,7 @@ class XmlFragment extends UI5View instanceof XmlFile {
716705
type = result.getControlTypeName() and
717706
ApiGraphModelsExtensions::sinkModel(getASuperType(type), path, "ui5-html-injection", _) and
718707
property = path.replaceAll(" ", "").regexpCapture("Member\\[([^\\]]+)\\]", 1) and
719-
result.getBindingTarget() = control.getAttribute(property) and
720-
/* If the control is an `sap.ui.core.HTML` then the control should be missing the `sanitizeContent` attribute */
721-
(
722-
getASuperType(type) = "HTMLControl"
723-
implies
724-
(
725-
not exists(control.getAttribute("sanitizeContent")) or
726-
control.getAttribute("sanitizeContent").getValue() = "false"
727-
)
728-
)
708+
result.getBindingTarget() = control.getAttribute(property)
729709
)
730710
}
731711

0 commit comments

Comments
 (0)