Skip to content

Commit fd2b8d4

Browse files
authored
Merge pull request #1452 from vechain/revert-1447-fix/zizmor-security-fixes-20251021-101928
Revert "[zizmor] Security fixes for workflow vulnerabilities"
2 parents 14b24a4 + 32a15d1 commit fd2b8d4

File tree

11 files changed

+31
-33
lines changed

11 files changed

+31
-33
lines changed

‎.github/workflows/gosec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Run Gosec
2525
id: gosec-run
2626
continue-on-error: true
27-
uses: securego/gosec@6be2b51fd78feca86af91f5186b7964d76cb1256 # v2.22.10
27+
uses: securego/gosec@master
2828
with:
2929
args: '-exclude=G104,G115,G304,G406,G507 -exclude-dir=builtin/gen ./...'
3030

@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/checkout@v4
4040

4141
- name: Notify Slack
42-
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
42+
uses: slackapi/slack-github-action@v1.25.0
4343
env:
4444
SLACK_WEBHOOK_URL: ${{ secrets.GOSEC_SLACK_WEBHOOK }}
4545
with:

‎.github/workflows/license-check.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: License Check
16-
uses: apache/skywalking-eyes@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91 # v0.6.0
16+
uses: apache/skywalking-eyes@v0.6.0

‎.github/workflows/lint-go.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...
3030
3131
- name: golangci-lint
32-
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
32+
uses: golangci/golangci-lint-action@v8
3333
with:
3434
version: v2.2.1
3535
# use the default if on main branch, otherwise use the pull request config

‎.github/workflows/on-master-commit.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
echo "commit_message=$(git show-branch --no-name HEAD)" >> "$GITHUB_ENV"
121121
122122
- name: Notify Slack
123-
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
123+
uses: slackapi/slack-github-action@v1.25.0
124124
env:
125125
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
126126
with:

‎.github/workflows/on-pre-release.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
# This step validates that the tag is a pre-release
2121
run: |
22-
prerelease=$(gh release view ${GITHUB_REF_NAME} --json isPrerelease | jq -r '.isPrerelease')
22+
prerelease=$(gh release view ${{ github.ref_name }} --json isPrerelease | jq -r '.isPrerelease')
2323
if [ "$prerelease" != "true" ]; then
2424
echo "Tag is not a pre-release"
2525
exit 1
@@ -28,7 +28,7 @@ jobs:
2828
- name: Validate VERSION
2929
run: |
3030
version=$(cat cmd/thor/VERSION)
31-
tag="${GITHUB_REF_NAME}"
31+
tag="${{ github.ref_name }}"
3232
tag="${tag#v}" # Remove the "v" prefix from the tag
3333
tag="${tag%%-rc.*}" # Remove the "-rc.*" suffix from the tag
3434
if [ "$tag" != "$version" ]; then
@@ -50,7 +50,7 @@ jobs:
5050
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5151
# This step validates that the tag is an official release
5252
run: |
53-
prerelease=$(gh release view ${GITHUB_REF_NAME} --json isPrerelease | jq -r '.isPrerelease')
53+
prerelease=$(gh release view ${{ github.ref_name }} --json isPrerelease | jq -r '.isPrerelease')
5454
if [ "$prerelease" != "true" ]; then
5555
echo "Tag is not a release candidate"
5656
exit 1

‎.github/workflows/on-release.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
- name: Validate Tag
2323
run: |
24-
node -e "if (!/^v\d+\.\d+\.\d+$/.test('${GITHUB_REF_NAME}')) { console.error('Invalid version provided');process.exit(1);}"
24+
node -e "if (!/^v\d+\.\d+\.\d+$/.test('${{ github.ref_name }}')) { console.error('Invalid version provided');process.exit(1);}"
2525
2626
- name: Validate VERSION
2727
run: |
2828
version=$(cat cmd/thor/VERSION)
29-
tag="${GITHUB_REF_NAME}"
29+
tag="${{ github.ref_name }}"
3030
tag="${tag#v}" # Remove the "v" prefix from the tag
3131
if [ "$tag" != "$version" ]; then
3232
echo "VERSION file does not match tag"
@@ -47,7 +47,7 @@ jobs:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
# This step validates that the tag is an official release
4949
run: |
50-
prerelease=$(gh release view ${GITHUB_REF_NAME} --json isPrerelease | jq -r '.isPrerelease')
50+
prerelease=$(gh release view ${{ github.ref_name }} --json isPrerelease | jq -r '.isPrerelease')
5151
if [ "$prerelease" != "false" ]; then
5252
echo "Tag is not an official release"
5353
exit 1

‎.github/workflows/publish-docker-images.yaml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ jobs:
4545

4646
- name: Set up QEMU
4747
if: ${{ github.event_name != 'pull_request' }}
48-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
48+
uses: docker/setup-qemu-action@v3
4949

5050
- name: Set up Docker Buildx
5151
if: ${{ github.event_name != 'pull_request' }}
52-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
52+
uses: docker/setup-buildx-action@v3
5353

5454
- name: Log in to Docker Hub
55-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
55+
uses: docker/login-action@v3
5656
# Only log in to Docker Hub if the event is a release
5757
if: ${{ inputs.environment == 'docker-publish' && github.event_name != 'pull_request' }}
5858
with:
5959
username: ${{ secrets.DOCKERHUB_USERNAME }}
6060
password: ${{ secrets.DOCKERHUB_TOKEN }}
6161

6262
- name: Log in to the Container registry
63-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
63+
uses: docker/login-action@v3
6464
if: ${{ github.event_name != 'pull_request' }}
6565
with:
6666
registry: ghcr.io
@@ -69,15 +69,15 @@ jobs:
6969

7070
- name: Extract metadata (tags, labels) for Docker
7171
id: meta
72-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5
72+
uses: docker/metadata-action@v5
7373
with:
7474
# default to ghcr.io for workflow_dispatch
7575
images: ${{ inputs.images || format('ghcr.io/{0}', github.repository) }}
7676
# use the branch + sha if workflow_dispatch
7777
tags: ${{ inputs.tags || format('type=raw,value={0}-{1}', github.ref_name, github.sha) }}
7878

7979
- name: Push to Registry(s)
80-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
80+
uses: docker/build-push-action@v6
8181
with:
8282
context: .
8383
platforms: ${{ github.event_name != 'pull_request' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
@@ -89,7 +89,7 @@ jobs:
8989
labels: ${{ steps.meta.outputs.labels }}
9090

9191
- name: Scan for vulnerabilities
92-
uses: crazy-max/ghaction-container-scan@4d8e0acba576e46016cbd65b9ecfc604e85e3990 # v3
92+
uses: crazy-max/ghaction-container-scan@v3
9393
if: ${{ github.event_name == 'pull_request' || github.ref_name == 'master' }}
9494
with:
9595
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}

‎.github/workflows/release-binaries.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
tar czf "${ARCHIVE_NAME##*/}" "$(basename "$RELEASE_BINARY_NAME")"
8383
8484
- name: Upload Binary
85-
uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1
85+
uses: alexellis/upload-assets@0.4.1
8686
env:
8787
GITHUB_TOKEN: ${{ github.token }}
8888
with:
@@ -135,7 +135,7 @@ jobs:
135135
Compress-Archive -Path (Split-Path -Leaf $Env:RELEASE_BINARY_NAME) -DestinationPath (Split-Path -Leaf $Env:ARCHIVE_NAME)
136136
137137
- name: Upload Binary
138-
uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1
138+
uses: alexellis/upload-assets@0.4.1
139139
env:
140140
GITHUB_TOKEN: ${{ github.token }}
141141
with:

‎.github/workflows/test-e2e.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
uses: actions/checkout@v4
2626

2727
- name: Set up QEMU
28-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
28+
uses: docker/setup-qemu-action@v3
2929

3030
- name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
31+
uses: docker/setup-buildx-action@v3
3232

3333
- name: Build and export
34-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
34+
uses: docker/build-push-action@v6
3535
with:
3636
context: .
3737
tags: vechain/thor:${{ github.sha }}

‎.github/workflows/test-smoke.yaml‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828

2929
- name: Set up QEMU
3030
if: steps.download-artifact.outcome == 'failure'
31-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
31+
uses: docker/setup-qemu-action@v3
3232

3333
- name: Set up Docker Buildx
3434
if: steps.download-artifact.outcome == 'failure'
35-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
35+
uses: docker/setup-buildx-action@v3
3636

3737
- name: Build and export
3838
if: steps.download-artifact.outcome == 'failure'
39-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
39+
uses: docker/build-push-action@v6
4040
with:
4141
context: .
4242
tags: vechain/thor:${{ github.sha }}
@@ -70,13 +70,13 @@ jobs:
7070
7171
if [ "${{ github.event_name }}" = "pull_request" ]; then
7272
# For pull_request events, we only look at the PR's base branch
73-
if [[ "${GITHUB_EVENT_PULL_REQUEST_BASE_REF}" == release/* ]]; then
74-
REF="${GITHUB_EVENT_PULL_REQUEST_BASE_REF}"
73+
if [[ "${{ github.event.pull_request.base.ref }}" == release/* ]]; then
74+
REF="${{ github.event.pull_request.base.ref }}"
7575
fi
7676
else
7777
# For push events, we check the branch or tag that was pushed
78-
if [[ "${GITHUB_REF_NAME}" == release/* ]]; then
79-
REF="${GITHUB_REF_NAME}"
78+
if [[ "${{ github.ref_name }}" == release/* ]]; then
79+
REF="${{ github.ref_name }}"
8080
fi
8181
fi
8282

@@ -89,8 +89,6 @@ jobs:
8989
fi
9090

9191
echo "DRAUPNIR REF: $(<$GITHUB_OUTPUT)"
92-
env:
93-
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
9492

9593
- name: Checkout
9694
uses: actions/checkout@v4

0 commit comments

Comments
 (0)