Skip to content

Commit f98e30e

Browse files
stuggiclaude
andcommitted
Remove tj-actions/branch-names from build workflow
Replace tj-actions/branch-names with github.ref_name which provides the branch name natively without a third-party action. The tj-actions GitHub namespace was compromised in March 2025 (CVE-2025-30066) and using actions from that namespace is no longer recommended. Pass the value via env: to avoid shell interpolation of untrusted input in run: blocks. Jira: OSPRH-31655 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 31a17b1 commit f98e30e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/build-openstack-baremetal-operator.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@v3
4747

48-
- name: Get branch name
49-
id: branch-name
50-
uses: tj-actions/branch-names@v7.0.7
51-
5248
- name: Set latest tag for non main branch
53-
if: "${{ steps.branch-name.outputs.current_branch != 'main' }}"
49+
if: github.ref_name != 'main'
50+
env:
51+
BRANCH_NAME: ${{ github.ref_name }}
5452
run: |
55-
echo "latesttag=${{ steps.branch-name.outputs.current_branch }}-latest" >> $GITHUB_ENV
53+
echo "latesttag=${BRANCH_NAME}-latest" >> $GITHUB_ENV
5654
5755
- name: Buildah Action
5856
id: build-openstack-baremetal-operator-agent

0 commit comments

Comments
 (0)