Skip to content

Commit e442bef

Browse files
committed
ci: pin GitHub Actions to commit SHAs for security
Pin all GitHub Actions references to specific commit SHAs instead of version tags to improve security and reproducibility: - actions/checkout@v4 → eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 - actions/setup-python@v5 → f677139bbe7f9c59b41e40162b753c062f5d49a3 - pypa/gh-action-pypi-publish@v1.12.4 → ab69e431e9c9f48a3310be0a56527c679f56e04d - actions/github-script@v7 → 60a0d83039c74a4aee543508d2ffcb1c3799cdea - docker/setup-qemu-action@v3 → 49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - docker/setup-buildx-action@v3 → c47758b77c9736f4b2ef4073d4d51994fabfe349 - docker/login-action@v3 → 9780b0c442fbb1117ed29e0efdff1e18412f7567 - docker/build-push-action@v5 → 4f58ea79222b3b9dc2c8bbdd6debcef730109a75 This follows GitHub security best practices by ensuring exact versions are used and preventing potential supply chain attacks from compromised tags.
1 parent 4672706 commit e442bef

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

.github/workflows/pr-preview.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
contents: read
1212
pull-requests: write
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1515
with:
1616
fetch-depth: 0
17-
- uses: actions/setup-python@v5
17+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1818
with:
1919
python-version: '3.x'
2020

@@ -43,14 +43,14 @@ jobs:
4343
4444
- name: Publish to Test PyPI
4545
if: steps.version_check.outputs.exists != 'true'
46-
uses: pypa/gh-action-pypi-publish@v1.12.4
46+
uses: pypa/gh-action-pypi-publish@ab69e431e9c9f48a3310be0a56527c679f56e04d
4747
with:
4848
repository-url: https://test.pypi.org/legacy/
4949
verbose: true
5050

5151
- name: Comment on PR
5252
if: steps.version_check.outputs.exists != 'true'
53-
uses: actions/github-script@v7
53+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
5454
env:
5555
VERSION: ${{ env.VERSION }}
5656
with:
@@ -120,21 +120,21 @@ jobs:
120120
exit 1
121121
122122
- name: Set up QEMU
123-
uses: docker/setup-qemu-action@v3
123+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
124124

125125
- name: Set up Docker Buildx
126-
uses: docker/setup-buildx-action@v3
126+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
127127

128128
- name: Login to Docker Hub with Organization Token
129129
if: steps.verify_package.outputs.success == 'true'
130-
uses: docker/login-action@v3
130+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
131131
with:
132132
username: ${{ secrets.DOCKERHUB_USERNAME }}
133133
password: ${{ secrets.DOCKERHUB_TOKEN }}
134134

135135
- name: Build & Push Docker Preview
136136
if: steps.verify_package.outputs.success == 'true'
137-
uses: docker/build-push-action@v5
137+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
138138
env:
139139
VERSION: ${{ env.VERSION }}
140140
with:

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
id-token: write
1111
contents: read
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1414
with:
1515
fetch-depth: 0
16-
- uses: actions/setup-python@v5
16+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1717
with:
1818
python-version: '3.x'
1919

@@ -66,16 +66,16 @@ jobs:
6666
6767
- name: Publish to PyPI
6868
if: steps.version_check.outputs.pypi_exists != 'true'
69-
uses: pypa/gh-action-pypi-publish@v1.12.4
69+
uses: pypa/gh-action-pypi-publish@ab69e431e9c9f48a3310be0a56527c679f56e04d
7070

7171
- name: Set up QEMU
72-
uses: docker/setup-qemu-action@v3
72+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
7373

7474
- name: Set up Docker Buildx
75-
uses: docker/setup-buildx-action@v3
75+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
7676

7777
- name: Login to Docker Hub with Organization Token
78-
uses: docker/login-action@v3
78+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
7979
with:
8080
username: ${{ secrets.DOCKERHUB_USERNAME }}
8181
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -102,7 +102,7 @@ jobs:
102102
if: |
103103
steps.verify_package.outputs.success == 'true' &&
104104
steps.docker_check.outputs.docker_exists != 'true'
105-
uses: docker/build-push-action@v5
105+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
106106
env:
107107
VERSION: ${{ env.VERSION }}
108108
with:

.github/workflows/version-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
check_version:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1515
with:
1616
fetch-depth: 0 # Fetch all history for all branches
1717

@@ -39,7 +39,7 @@ jobs:
3939
"
4040
4141
- name: Manage PR Comment
42-
uses: actions/github-script@v7
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
4343
if: always()
4444
env:
4545
MAIN_VERSION: ${{ env.MAIN_VERSION }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.11"
9+
version = "2.2.12"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.2.11'
2+
__version__ = '2.2.12'

0 commit comments

Comments
 (0)