From e283b4895b240b3b613d39294a126ec0cb808c2f Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 26 Nov 2020 17:03:51 +0300 Subject: [PATCH] Fixed vulnerability in Github Action that updates user-agent for DNS. --- .github/workflows/user_agent_updater.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/user_agent_updater.yml b/.github/workflows/user_agent_updater.yml index eee5c8b2c..a19b3271f 100644 --- a/.github/workflows/user_agent_updater.yml +++ b/.github/workflows/user_agent_updater.yml @@ -44,12 +44,14 @@ jobs: git remote set-url origin $url - name: Delete branch. + env: + ref: ${{ github.event.pull_request.head.ref }} if: | env.isPull == '1' && github.event.action == 'closed' - && startsWith(github.head_ref, env.headBranchPrefix) + && startsWith(env.ref, env.headBranchPrefix) run: | - git push origin --delete ${{ github.head_ref }} + git push origin --delete $ref - name: Write a new version of Google Chrome to the user-agent for DNS. if: env.isPull == '0'