Skip to content

Commit d3728a2

Browse files
authored
GitHub workflow vulnerabilities fixes - NEXT (#799)
* Update github workflow to use hashes instead of tag * Added tag version comments alongside with the hashes * Fix for injection vulnerability in workflows/check-files.yml * Removed empty spaces
1 parent 3725428 commit d3728a2

18 files changed

+42
-40
lines changed

.github/actions/checkout-with-stable-pkgs/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
using: "composite"
88
steps:
99
- name: Checkout repository
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
1111
with:
1212
fetch-depth: 0
1313
fetch-tags: true

.github/workflows/check-circular-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
# Checkout the branch of our repo that triggered this action
2323
- name: Workflow trigger checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2525
with:
2626
persist-credentials: false
2727

.github/workflows/check-entangled-specs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
steps:
2121
# Checkout the branch of our repo that triggered this action
2222
- name: Workflow trigger checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2424
with:
2525
persist-credentials: false
2626

2727
# We use the same major/minor version of Python that Azure Linux ships
2828
- name: Setup Python 3.12
29-
uses: actions/setup-python@v5
29+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5
3030
with:
3131
python-version: 3.12
3232

.github/workflows/check-files.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ jobs:
1717
steps:
1818

1919
- name: Check out code
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2121

2222
- name: Get base commit for PRs
2323
if: ${{ github.event_name == 'pull_request' }}
2424
run: |
25-
git fetch origin ${{ github.base_ref }}
26-
echo "base_sha=$(git rev-parse origin/${{ github.base_ref }})" >> $GITHUB_ENV
27-
echo "Merging ${{ github.sha }} into ${{ github.base_ref }}"
25+
git fetch origin ${ORIGIN_BASE_REF}
26+
echo "base_sha=$(git rev-parse origin/${ORIGIN_BASE_REF})" >> $GITHUB_ENV
27+
echo "Merging ${{ github.sha }} into ${ORIGIN_BASE_REF}"
28+
env:
29+
ORIGIN_BASE_REF: ${{ github.base_ref }}
2830

2931
- name: Get base commit for Pushes
3032
if: ${{ github.event_name == 'push' }}

.github/workflows/check-license-map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
steps:
2525
# Checkout the branch of our repo that triggered this action
2626
- name: Workflow trigger checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2828
with:
2929
persist-credentials: false
3030

3131
- name: Setup Python 3.12
32-
uses: actions/setup-python@v5
32+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5
3333
with:
3434
python-version: 3.12
3535

.github/workflows/check-manifests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Check out code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2525
with:
2626
persist-credentials: false
2727

.github/workflows/check-package-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
sed -i "/^%license/a %doc $license_file_name" "$REGULAR_PKG_SPEC_PATH"
120120
121121
steps:
122-
- uses: actions/checkout@v4
122+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
123123

124124
- name: Checkout a stable version of the specs
125125
uses: ./.github/actions/checkout-with-stable-pkgs

.github/workflows/check-package-cgmanifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Check out code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2525
with:
2626
persist-credentials: false
2727

.github/workflows/check-source-signatures.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
steps:
2525
# Checkout the branch of our repo that triggered this action
2626
- name: Workflow trigger checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2828
with:
2929
persist-credentials: false
3030
fetch-depth: 0
3131

3232
# For consistency, we use the same major/minor version of Python that Azure Linux ships
3333
- name: Setup Python 3.12
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5
3535
with:
3636
python-version: 3.12
3737

.github/workflows/check-spec.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
steps:
2222
# Checkout the branch of our repo that triggered this action
2323
- name: Workflow trigger checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
2525
with:
2626
fetch-depth: 0
2727
persist-credentials: false
2828

2929
# For consistency, we use the same major/minor version of Python that Azure Linux ships
3030
- name: Setup Python 3.12
31-
uses: actions/setup-python@v5
31+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5
3232
with:
3333
python-version: 3.12
3434

@@ -63,7 +63,7 @@ jobs:
6363
echo "toolchain-spec-list=$(make --no-print-directory -sC toolkit printvar-toolchain_spec_list)" >> "$GITHUB_ENV"
6464
6565
- name: Main branch checkout
66-
uses: actions/checkout@v4
66+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4
6767
with:
6868
ref: '3.0'
6969
path: '3.0-checkout'

0 commit comments

Comments
 (0)