From 165cda6dfe594428f429c11ab0c179a6d2db4fcf Mon Sep 17 00:00:00 2001 From: hectorcast-db Date: Thu, 18 Jul 2024 09:50:39 +0200 Subject: [PATCH] [Internal] Fix processing of `quoted` titles (#3790) ## Changes Fix processing of `quoted` titles. Follows GitHub recommendations https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#good-practices-for-mitigating-script-injection-attacks ## Tests This PR --- .github/workflows/message.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/message.yml b/.github/workflows/message.yml index ab54041af3..048a71e4c3 100644 --- a/.github/workflows/message.yml +++ b/.github/workflows/message.yml @@ -20,8 +20,10 @@ jobs: fetch-depth: 0 - name: Validate Tag + env: + TITLE: ${{ github.event.pull_request.title }} run: | - TAG=$(echo ${{ github.event.pull_request.title }} | sed -ne 's/\[\(.*\)\].*/\1/p') + TAG=$(echo "$TITLE" | sed -ne 's/\[\(.*\)\].*/\1/p') if grep -q "tag: \"\[$TAG\]\"" .codegen/changelog_config.yml; then echo "Valid tag found: [$TAG]" else