Skip to content

Pass github.base_ref to the changelog check through env - #154

Merged
turegjorup merged 1 commit into
developfrom
fix/changelog-base-ref-env
Oct 5, 2026
Merged

turegjorup merged 1 commit into
developfrom
fix/changelog-base-ref-env

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

The changelog workflow interpolated ${{ github.base_ref }} straight into the run: shell command; it now goes through env and is quoted.

Changes

  • github/workflows/changelog.yaml (linked into the Drupal and Symfony templates) and templates/python/.github/workflows/changelog.yaml: BASE_REF in env, "origin/$BASE_REF" in the command

Why

GitHub recommends passing expression values to scripts through environment variables rather than interpolating them, so the shell never parses them as code (Security hardening for GitHub Actions). The risk is low here, since base_ref is a branch in the target repository, but the safe form costs two lines. Found while adopting the Python template in itk-devops/itk-server-harvest#32.

@turegjorup turegjorup self-assigned this Oct 5, 2026
@turegjorup
turegjorup requested a review from cableman October 5, 2026 11:59
@turegjorup
turegjorup merged commit bee7b05 into develop Oct 5, 2026
44 checks passed
@turegjorup
turegjorup deleted the fix/changelog-base-ref-env branch October 5, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants