Formatting

This commit is contained in:
aegilops
2025-01-03 16:43:00 +00:00
parent a23f4ee007
commit 4773917876
2 changed files with 14 additions and 18 deletions

View File

@@ -253,7 +253,7 @@ module DomBasedXss {
/**
* A write to the `innerHTML` property of a DOM element, viewed as an XSS sink.
*
*
* Uses the Angular Renderer2 API, instead of the default `Element.innerHTML` property.
*/
class AngularRender2SetPropertyInnerHtmlSink extends Sink {

View File

@@ -189,31 +189,27 @@ private class ExternalRemoteFlowSource extends RemoteFlowSource {
class InputMember extends MemberDeclaration {
InputMember() {
exists(Decorator decorator, Expr expr |
decorator.getElement() = this
and decorator.getExpression() = expr
and expr.(CallExpr).getCallee().(VarRef).getName() = "Input"
decorator.getElement() = this and
decorator.getExpression() = expr and
expr.(CallExpr).getCallee().(VarRef).getName() = "Input"
)
}
}
// Use of an Angular @Input() member.
class InputMemberUse extends DataFlow::Node {
InputMemberUse() {
exists(InputMember member, string memberName, ThisExpr ta, FieldAccess fa |
memberName = member.getName()
and fa.getBase() = ta
and fa.getPropertyName() = memberName
and this.asExpr() = fa
)
}
InputMemberUse() {
exists(InputMember member, string memberName, ThisExpr ta, FieldAccess fa |
memberName = member.getName() and
fa.getBase() = ta and
fa.getPropertyName() = memberName and
this.asExpr() = fa
)
}
}
private class AngularInputUse extends RemoteFlowSource {
AngularInputUse() {
exists( InputMemberUse inputUse |
this = inputUse
)
}
AngularInputUse() { exists(InputMemberUse inputUse | this = inputUse) }
override string getSourceType() { result = "Angular @Input()" }
}
}