Skip to content

Commit 3b8665b

Browse files
[StepSecurity] ci: Harden GitHub Actions (#461)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
1 parent d3b5140 commit 3b8665b

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/codeql-analysis.yml

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

4646
steps:
4747
- name: Checkout repository
48-
uses: actions/checkout@v3.5.3
48+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4949
with:
5050
persist-credentials: false
51-
- uses: actions/cache@v3.3.1
51+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
5252
with:
5353
path: ~/.m2/repository
5454
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -57,7 +57,7 @@ jobs:
5757
5858
# Initializes the CodeQL tools for scanning.
5959
- name: Initialize CodeQL
60-
uses: github/codeql-action/init@v2
60+
uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
6161
with:
6262
languages: ${{ matrix.language }}
6363
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@v2
71+
uses: github/codeql-action/autobuild@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
8282
# make release
8383

8484
- name: Perform CodeQL Analysis
85-
uses: github/codeql-action/analyze@v2
85+
uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1

.github/workflows/coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ jobs:
2929
java: [ 8 ]
3030

3131
steps:
32-
- uses: actions/checkout@v3.5.3
32+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
3333
with:
3434
persist-credentials: false
35-
- uses: actions/cache@v3.3.1
35+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
3636
with:
3737
path: ~/.m2/repository
3838
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3939
restore-keys: |
4040
${{ runner.os }}-maven-
4141
- name: Set up JDK ${{ matrix.java }}
42-
uses: actions/setup-java@v3.11.0
42+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
4343
with:
4444
distribution: 'temurin'
4545
java-version: ${{ matrix.java }}
4646
- name: Build with Maven
4747
run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress
4848

4949
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v3
50+
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
5151
with:
5252
files: ./target/site/jacoco/jacoco.xml

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ jobs:
4343
fail-fast: false
4444

4545
steps:
46-
- uses: actions/checkout@v3.5.3
46+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4747
with:
4848
persist-credentials: false
49-
- uses: actions/cache@v3.3.1
49+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
5050
with:
5151
path: ~/.m2/repository
5252
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
5353
restore-keys: |
5454
${{ runner.os }}-maven-
5555
- name: Set up JDK ${{ matrix.java }}
56-
uses: actions/setup-java@v3.11.0
56+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
5757
with:
5858
distribution: 'temurin'
5959
java-version: ${{ matrix.java }}

.github/workflows/scorecards-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
steps:
4141

4242
- name: "Checkout code"
43-
uses: actions/checkout@v3.5.3 # 3.1.0
43+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4444
with:
4545
persist-credentials: false
4646

0 commit comments

Comments
 (0)