Skip to content

Commit 6a99845

Browse files
author
Alvaro Muñoz
committed
Remove old code to handle redirections to GITHUB_ENV
Redirections to GITHUB_ENV are better handled now by the Bash module ----
1 parent b7aba1f commit 6a99845

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

ql/lib/codeql/actions/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -266,21 +266,6 @@ predicate envCtxLocalStep(Node nodeFrom, Node nodeTo) {
266266
madSource(nodeFrom, _, "env." + astTo.getFieldName())
267267
or
268268
astTo.getTarget() = astFrom
269-
or
270-
// e.g:
271-
// - run: echo ISSUE_KEY=$(echo "${{ github.event.pull_request.title }}") >> $GITHUB_ENV
272-
// - run: echo ${{ env.ISSUE_KEY }}
273-
exists(Run run, string script, Expression expr, string line, string key, string value |
274-
run.getScript() = script and
275-
run.getAnScriptExpr() = expr and
276-
line = script.splitAt("\n") and
277-
key = line.regexpCapture("echo\\s+([^=]+)\\s*=(.*)>>\\s*\\$GITHUB_ENV", 1) and
278-
value = line.regexpCapture("echo\\s+([^=]+)\\s*=(.*)>>\\s*\\$GITHUB_ENV", 2) and
279-
value.indexOf(expr.getRawExpression()) > 0 and
280-
key = astTo.getFieldName() and
281-
expr = astFrom and
282-
expr.getEnclosingWorkflow() = run.getEnclosingWorkflow()
283-
)
284269
)
285270
)
286271
}

0 commit comments

Comments
 (0)