fix(security): harden GitHub Actions workflows against expression injection

Move ${{ }} expressions from run: blocks into step-level env: blocks,
then reference them as properly-quoted shell variables.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Marco Nenciarini 2026-03-03 18:25:22 +01:00
parent 79238f5772
commit d9b5a735a5

View File

@ -51,10 +51,12 @@ jobs:
# We use a GitHub token with write permissions to create the release,
# otherwise we won't be able to trigger a new run when pushing on main.
- name: Run release-please
env:
REPO_URL: ${{ github.repository }}
run: |
npx release-please release-pr \
--token="${{ secrets.REPO_PAT }}" \
--repo-url="${{ github.repository }}"
--repo-url="${REPO_URL}"
npx release-please github-release \
--token="${{ secrets.REPO_PAT }}" \
--repo-url="${{ github.repository }}"
--repo-url="${REPO_URL}"