Skip to content

Commit d7b5e4c

Browse files
committed
update predicate visibility
1 parent 9083cda commit d7b5e4c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ql/lib/codeql/ruby/security/XSS.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private module Shared {
122122
AssignExpr getAnAssignExpr() { result.getLeftOperand() = this.getExpr() }
123123
}
124124

125-
predicate isFlowFromLocals(DataFlow::Node node1, DataFlow::Node node2) {
125+
private predicate isFlowFromLocals(DataFlow::Node node1, DataFlow::Node node2) {
126126
// node1 is a `locals` argument to a render call...
127127
exists(RenderCall call, Pair kvPair, string hashKey |
128128
call.getLocals().getAKeyValuePair() = kvPair and
@@ -153,7 +153,7 @@ private module Shared {
153153
)
154154
}
155155

156-
predicate isFlowFromControllerInstanceVariable(DataFlow::Node node1, DataFlow::Node node2) {
156+
private predicate isFlowFromControllerInstanceVariable(DataFlow::Node node1, DataFlow::Node node2) {
157157
// instance variables in the controller
158158
exists(
159159
ActionControllerActionMethod action, VariableReadAccess viewVarRead, AssignExpr ae,
@@ -170,7 +170,7 @@ private module Shared {
170170
)
171171
}
172172

173-
predicate isFlowIntoHelperMethod(DataFlow::Node node1, DataFlow::Node node2) {
173+
private predicate isFlowIntoHelperMethod(DataFlow::Node node1, DataFlow::Node node2) {
174174
// flow from template into controller helper method
175175
exists(
176176
ErbFile template, ActionControllerHelperMethod helperMethod,
@@ -185,11 +185,11 @@ private module Shared {
185185
}
186186

187187
pragma[noinline]
188-
predicate isHelperMethodNameMatch(ActionControllerHelperMethod helperMethod, MethodCall call) {
188+
private predicate isHelperMethodNameMatch(ActionControllerHelperMethod helperMethod, MethodCall call) {
189189
helperMethod.getName() = call.getMethodName()
190190
}
191191

192-
predicate isFlowFromHelperMethod(DataFlow::Node node1, DataFlow::Node node2) {
192+
private predicate isFlowFromHelperMethod(DataFlow::Node node1, DataFlow::Node node2) {
193193
// flow out of controller helper method into template
194194
exists(ErbFile template |
195195
template = node2.getLocation().getFile() |

0 commit comments

Comments
 (0)