Skip to content

Commit 536c35c

Browse files
authored
security: pin github actions to commit sha (#2317)
1 parent 7e96caa commit 536c35c

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

.github/workflows/codacy-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
steps:
3030
# Checkout the repository to the GitHub Actions runner
3131
- name: Checkout code
32-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333

3434
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
3535
- name: Run Codacy Analysis CLI
3636
continue-on-error: true
37-
uses: codacy/[email protected].5
37+
uses: codacy/codacy-analysis-cli-action@562ee3e92b8e92df8b67e0a5ff8aa8e261919c08 # v4.4.7
3838
with:
3939
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
4040
# You can also omit the token and run the tools that support default configurations
@@ -51,6 +51,6 @@ jobs:
5151
# Upload the SARIF file generated in the previous step
5252
- name: Upload SARIF results file
5353
continue-on-error: true
54-
uses: github/codeql-action/upload-sarif@v3
54+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
5555
with:
5656
sarif_file: results.sarif

.github/workflows/codeql.yml

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

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
45+
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v3
59+
uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +69,6 @@ jobs:
6969
# ./location_of_script_within_repo/buildscript.sh
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v3
72+
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
7373
with:
7474
category: "/language:${{matrix.language}}"

.github/workflows/sync-release-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ jobs:
1313
update-version:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
fetch-depth: 0
1919
- name: Run release-tagger
20-
uses: tj-actions/release-tagger@v4
20+
uses: tj-actions/release-tagger@1a9264b0fd99a1ef92c4fd2f077f292900cc79b6 # v4.0.0
2121
- name: Sync release version.
22-
uses: tj-actions/sync-release-version@v13
22+
uses: tj-actions/sync-release-version@2a7ef0deb39b3ecce887ee99d2261c6cef989d84 # v13.16
2323
id: sync-release-version
2424
with:
2525
pattern: '${{ github.repository }}@'
2626
only_major: true
2727
paths: |
2828
README.md
2929
- name: Run git-cliff
30-
uses: tj-actions/git-cliff@v1
30+
uses: tj-actions/git-cliff@7b2afa2d0b650c50cde5a7b173a74753ecd29072 # v2.0.2
3131
- name: Create Pull Request
32-
uses: peter-evans/create-pull-request@v7
32+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
3333
with:
3434
base: "main"
3535
labels: "merge when passing"

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ jobs:
1111

1212
steps:
1313
- name: Checkout to branch
14-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515

1616
- name: shellcheck
17-
uses: reviewdog/[email protected]
17+
uses: reviewdog/action-shellcheck@5ebd09ddbe2ebb471646ce234c6c8dd18663ca7c # v1.30.0
1818

1919
lint:
2020
name: Run Lint
2121
runs-on: ubuntu-latest
2222

2323
steps:
2424
- name: Checkout to branch
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
with:
2727
ref: ${{ github.event.pull_request.head.sha }}
2828
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
2929
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
3030

3131
- name: Setup Node.js 20.x
32-
uses: actions/setup-node@v4
32+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3333
with:
3434
node-version: 20.x
3535
cache: yarn
@@ -76,7 +76,7 @@ jobs:
7676

7777
- name: Verify Changed files
7878
if: failure()
79-
uses: tj-actions/verify-changed-files@v20
79+
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
8080
id: verify-changed-files
8181
with:
8282
files: |
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Push changes
9494
if: failure() && steps.verify-changed-files.outputs.files_changed == 'true'
95-
uses: ad-m/github-push-action@master
95+
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0
9696
with:
9797
github_token: ${{ secrets.PAT_TOKEN }}
9898
branch: ${{ github.head_ref }}
@@ -112,12 +112,12 @@ jobs:
112112
fetch-depth: [0, 1]
113113

114114
steps:
115-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
115+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
116116
with:
117117
fetch-depth: ${{ matrix.fetch-depth }}
118118

119119
- name: Setup Node.js 20.x
120-
uses: actions/setup-node@v4
120+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
121121
with:
122122
node-version: 20.x
123123
cache: yarn

.github/workflows/update-readme.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
sync-assets:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Run auto-doc
17-
uses: tj-actions/auto-doc@v3
17+
uses: tj-actions/auto-doc@b10ceedffd794ec29a8fa8700529f40c1b64a951 # v3.6.0
1818
with:
1919
use_code_blocks: true
2020
use_major_version: true
2121

2222
- name: Run remark
23-
uses: tj-actions/remark@v3
23+
uses: tj-actions/remark@10fc40701928cbafcc4a2d241679579d218144ff # v3
2424

2525
- name: Verify Changed files
26-
uses: tj-actions/verify-changed-files@v20
26+
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
2727
id: verify_changed_files
2828
with:
2929
files: |
@@ -37,7 +37,7 @@ jobs:
3737
3838
- name: Create Pull Request
3939
if: failure()
40-
uses: peter-evans/create-pull-request@v7
40+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
4141
with:
4242
base: "main"
4343
labels: "merge when passing"

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inputs:
8181
runs:
8282
using: 'composite'
8383
steps:
84-
- uses: reviewdog/action-setup@v1
84+
- uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v1.3.2
8585
if: inputs.skip_annotations == 'false'
8686
with:
8787
reviewdog_version: v0.20.0
8888
- name: Get changed files
8989
id: changed-files
90-
uses: tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 # v46
90+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
9191
if: inputs.all_files == 'false'
9292
with:
9393
path: ${{ inputs.path }}

0 commit comments

Comments
 (0)