Skip to content

Commit 59592cc

Browse files
Merge pull request #85 from github/improve_reusable_workflow_calls
Improve reusable workflow calls
2 parents e9dfd9c + 116d83d commit 59592cc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class DataFlowCallable instanceof Cfg::CfgScope {
9898
string getName() {
9999
if this instanceof ReusableWorkflow
100100
then
101+
//result = this.(ReusableWorkflow).getLocation().getFile().getRelativePath()
101102
result =
102103
this.(ReusableWorkflow)
103104
.getLocation()
@@ -107,7 +108,17 @@ class DataFlowCallable instanceof Cfg::CfgScope {
107108
.getLocation()
108109
.getFile()
109110
.getRelativePath()
110-
.indexOf("/.github/workflows") + 1)
111+
.indexOf("/.github/workflows") + 1) or
112+
result =
113+
this.(ReusableWorkflow)
114+
.getLocation()
115+
.getFile()
116+
.getRelativePath()
117+
.suffix(this.(ReusableWorkflow)
118+
.getLocation()
119+
.getFile()
120+
.getRelativePath()
121+
.indexOf(".github/workflows"))
111122
else
112123
if this instanceof CompositeAction
113124
then

0 commit comments

Comments
 (0)