Skip to content

Commit 9406576

Browse files
committed
Make predicate name clearer
1 parent 79218a3 commit 9406576

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/ql/src/Security/CWE-094/ExpressionInjection.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ private predicate isExternalUserControlledWorkflowRun(string context) {
104104
}
105105

106106
/**
107-
* Holds if the env variable name in `${{ env.name }}`
108-
* is where the external user controlled value was assigned to.
107+
* Holds if environment name in the `injection` (in a form of `env.name`)
108+
* is tainted by the `context` (in a form of `github.event.xxx.xxx`).
109109
*/
110110
bindingset[injection]
111-
predicate isEnvTainted(string injection, string context) {
111+
predicate isEnvInterpolationTainted(string injection, string context) {
112112
exists(Actions::Env env, string envName, YamlString envValue |
113113
envValue = env.lookup(envName) and
114114
Actions::getEnvName(injection) = envName and
@@ -125,7 +125,7 @@ predicate isRunInjectable(Actions::Run run, string injection, string context) {
125125
(
126126
injection = context
127127
or
128-
isEnvTainted(injection, context)
128+
isEnvInterpolationTainted(injection, context)
129129
)
130130
}
131131

@@ -142,7 +142,7 @@ predicate isScriptInjectable(Actions::Script script, string injection, string co
142142
(
143143
injection = context
144144
or
145-
isEnvTainted(injection, context)
145+
isEnvInterpolationTainted(injection, context)
146146
)
147147
)
148148
}

0 commit comments

Comments
 (0)