Skip to content

Commit d11f565

Browse files
committed
cascading-runs: can only be triggered via G4WHelper-owned Check Runs
The cascading runs are supposed to be triggered by Check Runs that were created and updated by the GitForWindowsHelper GitHub App. Let's ensure that that's the case, lest an enterprisey attacker somehow manages to trigger those cascading runs when they shouldn't trigger. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 285e586 commit d11f565

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

GitForWindowsHelper/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ module.exports = async function (context, req) {
6666
try {
6767
const { cascadingRuns, handlePush } = require('./cascading-runs.js')
6868
if (req.headers['x-github-event'] === 'check_run'
69+
&& req.body.app?.slug === 'gitforwindowshelper'
6970
&& req.body.repository.full_name === 'git-for-windows/git'
7071
&& req.body.action === 'completed') return ok(await cascadingRuns(context, req))
7172

0 commit comments

Comments
 (0)