Skip to content

Commit 4891c1e

Browse files
committed
Added QLdoc and simplified QL in source class
1 parent 4773917 commit 4891c1e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ private class ExternalRemoteFlowSource extends RemoteFlowSource {
185185
override string getSourceType() { result = ap.getSourceType() }
186186
}
187187

188-
// Angular @Input() decorator on a member declaration.
188+
/**
189+
* Angular @Input() decorator on a member declaration.
190+
*/
189191
class InputMember extends MemberDeclaration {
190192
InputMember() {
191193
exists(Decorator decorator, Expr expr |
@@ -196,7 +198,9 @@ class InputMember extends MemberDeclaration {
196198
}
197199
}
198200

199-
// Use of an Angular @Input() member.
201+
/**
202+
* Use of an Angular @Input() member, modelled as `InputMember`.
203+
*/
200204
class InputMemberUse extends DataFlow::Node {
201205
InputMemberUse() {
202206
exists(InputMember member, string memberName, ThisExpr ta, FieldAccess fa |
@@ -208,8 +212,11 @@ class InputMemberUse extends DataFlow::Node {
208212
}
209213
}
210214

215+
/**
216+
* A remote flow source that is a member of an Angular component class.
217+
*/
211218
private class AngularInputUse extends RemoteFlowSource {
212-
AngularInputUse() { exists(InputMemberUse inputUse | this = inputUse) }
219+
AngularInputUse() { this instanceof InputMemberUse }
213220

214221
override string getSourceType() { result = "Angular @Input()" }
215222
}

0 commit comments

Comments
 (0)