Skip to content

Commit 418ae5c

Browse files
committed
Pin actions by using hashes removing tags like @v2. or @master
Now that actions are being scanned by dependabot, this is easier to keep up with. This also clears multiple security issues flagged by ossf-scorecard.
1 parent 8699650 commit 418ae5c

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/anchore.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout the code
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
40+
# v3.3.0
4041
- name: Build the Docker image
4142
run: docker pull python:3-alpine; docker build . --file scripts/Docker/Dockerfile --tag localbuild/testimage:latest
4243
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
43-
uses: anchore/scan-action@v3
44+
uses: anchore/scan-action@dafbc97d7259af88b61bd260f2fde565d0668a72 # v3.3.4
4445
id: scan
4546
with:
4647
image: "localbuild/testimage:latest"
4748
fail-build: true
4849
- name: Upload Anchore Scan Report
4950
if: always()
50-
uses: github/codeql-action/upload-sarif@v2
51+
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5
52+
# v2.2.4
5153
with:
5254
sarif_file: ${{ steps.scan.outputs.sarif }}
5355
- name: Inspect action SARIF report

.github/workflows/ci-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ jobs:
9090
# if: {{ false }}
9191
# continue running if step fails
9292
# continue-on-error: true
93-
uses: actions/checkout@v3
93+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
9494

9595
# Setup version of Python to use
9696
- name: Set Up Python ${{ matrix.python-version }}
97-
uses: actions/setup-python@v4
97+
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
9898
with:
9999
python-version: ${{ matrix.python-version }}
100100
cache: 'pip'
@@ -223,15 +223,15 @@ jobs:
223223
224224
- name: Upload coverage to Codecov
225225
# see: https://github.com/codecov/codecov-action#usage
226-
uses: codecov/codecov-action@v3
226+
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
227227
with:
228228
verbose: true
229229
token: ${{ secrets.CODECOV_TOKEN }}
230230

231231
- name: Upload coverage to Coveralls
232232
# python 2.7 and 3.6 versions of coverage can't produce lcov files.
233233
if: matrix.python-version != '2.7' && matrix.python-version != '3.6'
234-
uses: coverallsapp/github-action@master
234+
uses: coverallsapp/github-action@3284643be2c47fb6432518ecec17f1255e8a06a6 # master
235235
with:
236236
github-token: ${{ secrets.GITHUB_TOKEN }}
237237
path-to-lcov: coverage.lcov
@@ -264,7 +264,7 @@ jobs:
264264
runs-on: ubuntu-latest
265265
steps:
266266
- name: Coveralls Finished
267-
uses: coverallsapp/github-action@master
267+
uses: coverallsapp/github-action@3284643be2c47fb6432518ecec17f1255e8a06a6 # master
268268
with:
269269
github-token: ${{ secrets.github_token }}
270270
parallel-finished: true

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ jobs:
4747

4848
steps:
4949
- name: Checkout repository
50-
uses: actions/checkout@v2
50+
uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0
5151

5252
# Initializes the CodeQL tools for scanning.
5353
- name: Initialize CodeQL
54-
uses: github/codeql-action/init@v2
54+
uses: github/codeql-action/init@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
5555
with:
5656
languages: ${{ matrix.language }}
5757
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -62,7 +62,7 @@ jobs:
6262
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6363
# If this step fails, then you should remove it and run the build manually (see below)
6464
- name: Autobuild
65-
uses: github/codeql-action/autobuild@v2
65+
uses: github/codeql-action/autobuild@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
6666

6767
# ℹ️ Command-line programs to run using the OS shell.
6868
# 📚 https://git.io/JvXDl
@@ -76,4 +76,4 @@ jobs:
7676
# make release
7777

7878
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@v2
79+
uses: github/codeql-action/analyze@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4

0 commit comments

Comments
 (0)