Commit 5c35d7d
committed
cascading-runs: do verify that the sender is trusted
The cascading runs feature of GitForWindows' GitHub App basically
listens for Check Runs to be completed, and upon their completion, other
automation is triggered. There are currently two such cascades:
- When the `tag-git` Check Run in a regular Git for Windows PR has
completed (which is expected to be triggered via the `/git-artifacts`
slash command by a trusted user), the corresponding `git-artifacts`
workflow runs have been triggered, one per supported CPU architecture.
- When the `git-artifacts` Check Runs complete on a commit on
git-for-windows/git's `main` branch that does _not_ correspond to a
release, the `upload-snapshot` workflow needs to be triggered.
In both instances, we need to validate that the source of these Check
Runs is the intended one. We need that because Check Runs are also
created for regular workflow jobs, and so far the validation goes by
Check Run name, which is easily faked in a crafted PR.
So let's verify that the Check Run events in question were sent by a
trusted actor (and most notably _not_ by GitHub Actions implicit Check
Runs corresponding to PR workflow runs).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 02d5c0e commit 5c35d7d
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| 118 | + | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| |||
136 | 147 | | |
137 | 148 | | |
138 | 149 | | |
| 150 | + | |
| 151 | + | |
139 | 152 | | |
140 | 153 | | |
141 | 154 | | |
| |||
0 commit comments