Skip to content

Commit 356c200

Browse files
author
Alvaro Muñoz
committed
Composite Action steps's getEnclosingJob should return the calling job
1 parent 0d55b4e commit 356c200

File tree

1 file changed

+4
-1
lines changed
  • ql/lib/codeql/actions/ast/internal

1 file changed

+4
-1
lines changed

ql/lib/codeql/actions/ast/internal/Ast.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ abstract class AstNodeImpl extends TAstNode {
105105
/**
106106
* Gets the enclosing Job.
107107
*/
108-
JobImpl getEnclosingJob() { result.getAChildNode*() = this.getParentNode() }
108+
JobImpl getEnclosingJob() {
109+
result.getAChildNode*() = this.getParentNode() or
110+
result = this.getEnclosingCompositeAction().getACallerJob()
111+
}
109112

110113
/**
111114
* Gets the enclosing workflow if any.

0 commit comments

Comments
 (0)