Skip to content

Commit dd52ef8

Browse files
committed
Rename Env
1 parent 76834cb commit dd52ef8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

javascript/ql/lib/semmle/javascript/Actions.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ module Actions {
104104
}
105105

106106
/** An environment variable in 'env:' */
107-
abstract class Env extends YamlNode, YamlString {
107+
abstract class EnvVariable extends YamlNode, YamlString {
108108
/** Gets the name of this environment variable. */
109109
abstract string getName();
110110
}
111111

112112
/** A workflow level 'global' environment variable. */
113-
class WorkflowEnvVariable extends Env {
113+
class WorkflowEnvVariable extends EnvVariable {
114114
string envName;
115115
Workflow workflow;
116116

@@ -124,11 +124,11 @@ module Actions {
124124
}
125125

126126
/** A job level environment variable. */
127-
class JobEnv extends Env {
127+
class JobEnvVariable extends EnvVariable {
128128
string envName;
129129
Job job;
130130

131-
JobEnv() { this = job.getEnv().lookup(envName) }
131+
JobEnvVariable() { this = job.getEnv().lookup(envName) }
132132

133133
/** Gets the job this field belongs to. */
134134
Job getJob() { result = job }
@@ -138,11 +138,11 @@ module Actions {
138138
}
139139

140140
/** A step level environment variable. */
141-
class StepEnv extends Env {
141+
class StepEnvVariable extends EnvVariable {
142142
string envName;
143143
Step step;
144144

145-
StepEnv() { this = step.getEnv().lookup(envName) }
145+
StepEnvVariable() { this = step.getEnv().lookup(envName) }
146146

147147
/** Gets the step this field belongs to. */
148148
Step getStep() { result = step }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private predicate isExternalUserControlledWorkflowRun(string context) {
108108
* is where the external user controlled value was assigned to.
109109
*/
110110
bindingset[injection]
111-
predicate isEnvTainted(Actions::Env env, string injection, string context) {
111+
predicate isEnvTainted(Actions::EnvVariable env, string injection, string context) {
112112
Actions::getEnvName(injection) = env.getName() and
113113
Actions::getASimpleReferenceExpression(env) = context
114114
}

0 commit comments

Comments
 (0)